Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Original Question

I am running Ubuntu and network manager. I have two different interfaces, eth0 and eth1. Network manager has (as far as I can tell) correctly added this manual route:

~$ ip route

default via 172.16.0.2 dev eth1  proto static 
10.0.0.0/8 via 172.16.0.2 dev eth1  proto static 
130.35.0.0/16 via 172.16.0.2 dev eth1  proto static 
...
172.16.0.0/12 dev eth1  proto kernel  scope link  src 172.16.0.15  metric 1 
192.135.82.0/24 via 172.16.0.2 dev eth1  proto static 

eth0 appears down, but that seems to me to be a separate problem. Even given the above routes, the IP stack seems to be preferring eth0:

~$ ping 130.35.249.52
PING 130.35.249.52 (130.35.249.52) 56(84) bytes of data.
^C
--- 130.35.249.52 ping statistics ---
18 packets transmitted, 0 received, 100% packet loss, time 17132ms

~$ ping -Ieth1 130.35.249.52
PING 130.35.249.52 (130.35.249.52) from 172.16.0.15 eth1: 56(84) bytes of data.
64 bytes from 130.35.249.52: icmp_seq=1 ttl=57 time=210 ms

Additionally,

~$ ip rule
0:  from all lookup local 
32766:  from all lookup main 
32767:  from all lookup default 

~$ netstat -nr
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
0.0.0.0         172.16.0.2      0.0.0.0         UG        0 0          0 eth1
10.0.0.0        172.16.0.2      255.0.0.0       UG        0 0          0 eth1
130.35.0.0      172.16.0.2      255.255.0.0     UG        0 0          0 eth1
...
172.16.0.0      0.0.0.0         255.240.0.0     U         0 0          0 eth1
192.135.82.0    172.16.0.2      255.255.255.0   UG        0 0          0 eth1

~$ ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 08:00:27:01:b1:f6 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::a00:27ff:fe01:b1f6/64 scope link 
       valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 08:00:27:35:eb:24 brd ff:ff:ff:ff:ff:ff
    inet 172.16.0.15/12 brd 172.31.255.255 scope global eth1
       valid_lft forever preferred_lft forever
    inet6 fe80::a00:27ff:fe35:eb24/64 scope link 
       valid_lft forever preferred_lft forever

How can I force the IP stack to obey those routes?

Routing Successful

~$ ip route get 130.35.249.52
130.35.249.52 via 172.16.0.2 dev eth1  src 172.16.0.15
    cache

This situation is getting a little bit more screwy. It seems that the failure in the first ping is temporary, the second ping to eth1 succeeds, and then subsequent pings to eth0 route correctly. It's difficult for me to determine how the IP stack gets into this state, but for now I'm going to try to solve a different DNS-related problem.

share|improve this question
    
Among the left out lines there is none with eth0? What is the output of ip rule? –  Hauke Laging Apr 2 at 17:35
    
eth0 is not mentioned. See above for ip rule. –  Reinderien Apr 2 at 17:53
    
Please update your port to include netstat -nr output. –  Deano Apr 2 at 18:15
    
Please also add the output of ip addr. –  Hauke Laging Apr 2 at 18:15
1  
Please post the whole output of ip route, as well as the output of ip route get 130.35.249.52 –  BatchyX Apr 2 at 20:08

1 Answer 1

up vote 0 down vote accepted

The problem turned out to be that UDP packets were not being passed. I don't know why. TCP DNS works just fine. In the end I used network-manager-openconnect and only retained one virtual adapter in VirtualBox, and it works.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.