1
I'm running Ubuntu 14.04 with dual NIC's. I'm seeing a problem where by one of the NIC's doesn't seem to want to use it's default gateway to route traffic. One NIC is operating with a Public IP address and the other inside the LAN. eth0 is operating without issue.
The following is the output from /etc/network/interfaces
auto eth0
iface eth0 inet static
address X.X.X.71
netmask 255.255.255.0
network X.X.X.0
broadcast 1.1.1.255
gateway X.X.X.1
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 8.8.8.8
auto eth1
iface eth1 inet static
address 10.2.8.13
netmask 255.255.255.0
network 10.2.8.0
broadcast 10.2.8.255
gateway 10.2.8.254
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 10.2.14.5 10.2.14.6
The server can ping the default gateway no problem through eth1 but when I traceroute out to 8.8.8.8, the server doesn't even seem to try using the configured Gateway for eth1
user@myserver:~$ sudo traceroute -i eth1 8.8.8.8
traceroute to 8.8.8.8 (8.8.8.8), 30 hops max, 60 byte packets
1 * * *
2 * * *
3 * * *
4 * * *
5 * * *
6 *^Z
[8]+ Stopped sudo traceroute -i eth1 8.8.8.8
Initially I suspected Firewall or a routing issue but looking at this traceroute, it leads me to believe it is a problem on the server as it doesn't send requests to it's DG for external addresses. No other addresses within that private IP space have problems accessing external networks and I have checked for individual ACL's blocking that IP
EDIT: Looking into this further it seems like you can't actually set a default gateway per interface. A default gateway is set for the whole system. Is there any way around this or how are dual network interfaces normally configured?
how could the private network address cross into a public address? have you a nat solution?? – Francisco Tapia – 2015-05-27T14:29:09.077
1Im not looking for the traffic to cross as such. It's a network monitoring system. The second interface (LAN) is simply to management interface for the monitoring GUI. I've managed to work around it in that I have changed the configuration to remove the WAN IP address and set the WAN interface to use promiscuous mode without any IP set. Therefore the system now uses the DG on the LAN interface. Question still standards though. Say you had 2 different interfaces on your LAN with 2 different DG configured? – mactire – 2015-05-27T18:05:39.410
(i really want to understand) u said u want to trace 8.8.8.8 from your eth1 (considering eth1 is the interface configured with a private adress) and nothing, now my question is how could get a response from a 8.8.8.8?? is there any fixed route who send all traffic =/= private address is forwarding to an especific interface who can reach it for example eth0 and if exist do you have NAT feature to translate private address to public one?? – Francisco Tapia – 2015-05-27T18:14:20.533
Ignore the relationship between the 2 interfaces. There is none really. The 10.2.8.13 address should try to contact 10.2.8.254 as it's DG because 8.8.8.8 is not on it's network. It doesn't. I want it to simply contact it's DG to route the traffic. Likewise if I selected eth0 to ping 8.8.8.8 I would expect it to contact x.x.x.1 to route to 8.8.8.8, which it does no problem
The only way I could see of getting traffic to route to where I want it (private IP space but separate subnet) is with a static route. i.e route add -net 10.0.0.0 netmask 255.0.0.0 gw 10.2.8.254 dev eth1 – mactire – 2015-05-27T21:10:28.543