seagal
2008-09-15, 06:34 PM
請問有人知道,為什麼我在centos5.2架設了dhcp server,在client有抓到IP,但就是無法上網,我看了dhcpd.leases也有記錄我client主機有分配到ip,但就是無法上網,有人知道為什麼嗎?是不是只要設定/etc/dhcpd.conf就可以使用dhcp了呢?
以下是我網卡的設定(一張網卡分別設eth0和eth0:0)
eth0的設法如下
DEVICE=eth0
BOOTPROTO=none
HWADDR=00:0d:8a:c2:f5:e0
dhcp_hostname=ns1.tehcaa.com.tw
TYPE=Ethernet
IPADDR=203.54.67.123
NETMASK=255.255.255.0
GATEWAY=203.54.67.254
-----------------------------------------------
eth0:0的設法如下
DEVICE=eth0:0
BOOTPROTO=none
BROADCAST=192.168.1.255
IPADDR=192.168.1.2
TYPE=Ethernet
NETMASK=255.255.255.0
NETWORK=192.168.1.0
TYPE=Etherner
---------------------------------------------
/etc/dhcpd.conf設法如下
ddns-update-style interim;
ignore client-updates;
subnet 192.168.1.0 netmask 255.255.255.0 {
# --- default gateway
option routers 192.168.1.2;
option subnet-mask 255.255.255.0;
option nis-domain "tehcaa.com.tw";
option domain-name "tehcaa.com.tw";
option domain-name-servers 61.31.233.1,168.95.1.1;
option time-offset -18000; # Eastern Standard Time
# option ntp-servers 192.168.1.1;
# option netbios-name-servers 192.168.1.1;
# --- Selects point-to-point node (default is hybrid). Don't change this unless
# -- you understand Netbios very well
# option netbios-node-type 2;
range dynamic-bootp 192.168.1.128 192.168.1.200;
default-lease-time 21600;
max-lease-time 43200;
# we want the nameserver to appear at a fixed address
host ns {
next-server marvin.redhat.com;
hardware ethernet 12:34:56:78:AB:CD;
fixed-address 207.175.42.254;
}
}
贊助商連結
以下是我網卡的設定(一張網卡分別設eth0和eth0:0)
eth0的設法如下
DEVICE=eth0
BOOTPROTO=none
HWADDR=00:0d:8a:c2:f5:e0
dhcp_hostname=ns1.tehcaa.com.tw
TYPE=Ethernet
IPADDR=203.54.67.123
NETMASK=255.255.255.0
GATEWAY=203.54.67.254
-----------------------------------------------
eth0:0的設法如下
DEVICE=eth0:0
BOOTPROTO=none
BROADCAST=192.168.1.255
IPADDR=192.168.1.2
TYPE=Ethernet
NETMASK=255.255.255.0
NETWORK=192.168.1.0
TYPE=Etherner
---------------------------------------------
/etc/dhcpd.conf設法如下
ddns-update-style interim;
ignore client-updates;
subnet 192.168.1.0 netmask 255.255.255.0 {
# --- default gateway
option routers 192.168.1.2;
option subnet-mask 255.255.255.0;
option nis-domain "tehcaa.com.tw";
option domain-name "tehcaa.com.tw";
option domain-name-servers 61.31.233.1,168.95.1.1;
option time-offset -18000; # Eastern Standard Time
# option ntp-servers 192.168.1.1;
# option netbios-name-servers 192.168.1.1;
# --- Selects point-to-point node (default is hybrid). Don't change this unless
# -- you understand Netbios very well
# option netbios-node-type 2;
range dynamic-bootp 192.168.1.128 192.168.1.200;
default-lease-time 21600;
max-lease-time 43200;
# we want the nameserver to appear at a fixed address
host ns {
next-server marvin.redhat.com;
hardware ethernet 12:34:56:78:AB:CD;
fixed-address 207.175.42.254;
}
}
贊助商連結