Hmm... according to whois
, 211.136.17.107 is part of network segment 211.136.16.0/21, which belongs to China Mobile.
If you use a distribution that is based on Debian or Ubuntu, you could install the resolvconf
package and modify the /etc/resolvconf/interface-order
file to say you specifically want the records for eth0
first, then the records for eth2
.
If you don't have resolvconf
available, you might want to examine the hook script(s) used by dhcpcd
and modify them to order the DNS server addresses as you wish. The hook script is configured with the script
keyword in dhcpcd.conf
; if not specified, the default is usually something like /usr/lib/dhcpcd/dhcpcd-run-hooks
(check your man dhcpcd.conf
for possible distribution-specific modifications).
Alternatively, you could work around the problem by adding a custom route for the nameservers that don't automatically get routed the right way. Since nameserver 192.168.8.1 is also your default gateway, it must be in your local network segment and so the correct interface is automatically preferred for it. But for the 211.136.. nameservers, adding a route like
ip route add 211.136.16.0/21 via 10.67.145.17 dev eth2
should stop attempts to reach them through the wrong interface. Note that the IP address after the via
keyword is the gateway address specified by DHCP on eth2, so you'll probably want to create/modify a dhcpcd hook script to create that route when configuring eth2, using the gateway address specified by the DHCP service instead of hardcoding it.