Bug #1345
closedStatic routes to DNS on local subnet should not be added
0%
Description
In /sbin/dhclient-script : add_new_resolv_conf(),
it says:
@
# Add a route to the nameserver out the correct interface
# so that mulitple wans work correctly with multiple dns
# also backup the nameserver for later route removal
echo $nameserver >>/var/etc/nameserver_$interface
$ROUTE add $nameserver -iface $interface
Unfortunately, adding these routes will cause problems if the nameservers are not in the same network of that interface.
For example,
dhclient: New IP Address (re1): 172.16.26.99
dhclient: New Subnet Mask (re1): 255.255.255.0
dhclient: New Broadcast Address (re1): 172.16.26.255
dhclient: New Routers (re1): 172.16.26.254
dhclient: Adding new routes to interface: re1
will add some direct routes like
172.16.3.95 1a:8b:41:87:38:99 UHS 0 0 1500 re1
172.16.3.96 1a:8b:41:87:38:99 UHS 0 0 1500 re1
@
, where 172.16.3.95 and 172.16.3.96 are the nameservers.
However, these servers are not in the same network and need another router to reach.
So these servers become unreachable.
Updated by Furen Xiao over 13 years ago
By the way, this happened with OPT1 interface, with DHCP of course.
Updated by Chris Buechler over 13 years ago
- Subject changed from Add a route to the nameserver out the correct interface? to Static routes to DNS on local subnet should not be added
Updated by Chris Buechler almost 10 years ago
- Status changed from New to Closed
not sure if this behaved differently in earlier base OS versions, but it doesn't hurt anything in 8.3 and 10.x base versions.