vi /etc/sysconfig/network
GATEWAYDEV=eth0
vi /etc/dhcpd.conf
ddns-update-style none; #<==不要更新 DDNS 的設定
default-lease-time 259200; #<==預設租約為 3 天
max-lease-time 518400; #<==最大租約為 6 天
option routers 163.17.242.254; #<==這就是預設路由
option broadcast-address 163.17.242.255; #<==這是廣播位址啊
option domain-name-servers 168.95.1.1,8.8.8.8;
subnet 163.17.242.0 netmask 255.255.255.0 {
range 163.17.242.100 163.17.242.250; #<==分配的 IP 範圍
option subnet-mask 255.255.255.0; #<==可重複設定 netmask 位址
option nis-domain xx; #<==額外給的 NIS 相關參數
option domain-name "lsps.tcc.edu.tw"; #<==在 /etc/resolv.conf 給一個搜尋>領域
}
subnet 192.168.0.0 netmask 255.255.255.0 {
range 192.168.0.200 192.168.0.250; #<==分配的 IP 範圍
option subnet-mask 255.255.255.0; #<==可重複設定 netmask 位址
option nis-domain xx205; #<==額外給的 NIS 相關參數
option domain-name "205.lsps.tcc.edu.tw";
}
# /etc/init.d/network restart
# /etc/init.d/dhcpd restart