「DHCP」- 杂项

  CREATED BY JENKINSBOT

使用dhclient(8)命令,但不添加默认路由

方法一,一个手动hack的方法

Re: Stop dhclient from adding a default gateway

方法二,一个“简单?”的方法

Multiple DHCP uplinks – How to ignore DNS and default route on all but one?
what is “rfc3442-classless-static-routes” in /etc/dhcp/dhclient.conf(无关文章)
(1)复制/etc/dhcp/dhclient.conf为/etc/dhcp/dhclient.no-routers.conf文件。
(2)并将文件/etc/dhcp/dhclient.no-routers.conf中request指令中的routers去掉。
(2)使用dhclient(8)命令时,指定配置文件dhclient -cf /etc/dhcp/dhclient.no-routers.conf -v eth0。