Answers:
设置子网时,请使用dhcpd.conf中的routers选项
option routers 239.252.197.1;
从http://linux.die.net/man/8/dhcpd
subnet 239.252.197.0 netmask 255.255.255.0 {
range 239.252.197.10 239.252.197.250;
default-lease-time 600 max-lease-time 7200;
option subnet-mask 255.255.255.0;
option broadcast-address 239.252.197.255;
option routers 239.252.197.1;
option domain-name-servers 239.252.197.2, 239.252.197.3;
option domain-name "isc.org";
}
如果您无权访问DHCP服务器,则可以在/ etc / network / interfaces文件中执行此操作。这类似于仅使用DHCP并指定网关才能静态设置的方式。
iface eth0 inet dhcp
gateway 10.21.8.1