2 default routes.

Q'center app, Helpdesk app
Post Reply
brunoga
New here
Posts: 3
Joined: Sat May 05, 2012 9:29 pm

2 default routes.

Post by brunoga »

Some recent (as in a couple of months ago at most) Linux Station update changed it so now it has 2 interfaces. The external internet one (eth0) and another one (eth1) used for the VNC server connection (and probably something else). This is not really an issue but Linux Station is also creating 2 default routes, one for each interface:

$ route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 10.0.3.1 0.0.0.0 UG 100 0 0 eth1
default 192.168.86.1 0.0.0.0 UG 101 0 0 eth0
10.0.3.0 * 255.255.255.0 U 100 0 0 eth1
link-local * 255.255.0.0 U 1000 0 0 eth1
192.168.86.0 * 255.255.255.0 U 100 0 0 eth0

This mostly works (even if it is weird to have 2 non-balancing default routes) except when I try to redirect a port from my router to Linux. Due to the 2 default routes, it does not work.

If i manually remove the default route on the internal interface:

$ sudo route del default gw 10.0.3.1

$ route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default testwifi.here 0.0.0.0 UG 101 0 0 eth0
10.0.3.0 * 255.255.255.0 U 100 0 0 eth1
link-local * 255.255.0.0 U 1000 0 0 eth1
192.168.86.0 * 255.255.255.0 U 100 0 0 eth0

Then redirecting ports work again.

Now, it looks like the network configuration files inside Linux Station itself have no effect and the container itself is what sets the interfaces. I looked at the lxc config and it is indeeding setting both interfaces but it is not saying anything at at point to explicitly add default routes to both interfaces.

Any ideas on how to solve this in a permanent way?

Note that even without restarting Linux station, the other default shows up again after a while.

Thanks in advance.
ianmacd
Getting the hang of things
Posts: 56
Joined: Mon Jul 23, 2012 5:43 pm

Re: 2 default routes.

Post by ianmacd »

I can't answer the question you are asking but the issue you seem to be having is due to asymmetric routing. Linux should be sending packets back out the same interface that they came in on.

Can you describe your network setup further please? Have you bound certain services to specific interfaces?

Thanks.

Ian.
brunoga
New here
Posts: 3
Joined: Sat May 05, 2012 9:29 pm

Re: 2 default routes.

Post by brunoga »

I don't think the actual network setup is relevant here. As I am talking about Linux Station, both eth0 and eth1 are virtual network cards. eth0 happens to be bridged with the actual physical interface that has internet access while eth1 is purely virtual (it is not connected to my actual network at all) and is only used for the VNC server in Linux station (it seems).

Because of this, having a default route assigned to the ip on eth1 looks completely wrong and is most likely a bug in Linux Station.
Post Reply

Return to “NAS Management”