Broken routes to DNS in dual stack network
After connecting to WLAN, DNS queries don't work due to incorrect routes to DNS servers (in this example the servers are 62.xxx.xxx.245, 62.xxx.xxx.246, 2001:14b8:1000:0:x:x:x:1, 2001:14b8:1000:0:x:x:x:2; addresses are mangled with x manually):
# ip r sh
default via 192.168.0.1 dev wlan0
62.xxx.xxx.245 dev wlan0 scope link
62.xxx.xxx.245 via 192.168.0.1 dev wlan0
62.xxx.xxx.246 dev wlan0 scope link
62.xxx.xxx.246 via 192.168.0.1 dev wlan0
192.168.0.0/24 dev wlan0 proto kernel scope link src 192.168.0.12
192.168.0.1 dev wlan0 scope link
# ip -6 r sh
2001:14b8:1000:0:x:x:x:1 dev wlan0 metric 1
2001:14b8:1000:0:x:x:x:2 dev wlan0 metric 1
2001:14ba:16fe:xxxx::/64 dev wlan0 proto kernel metric 256
unreachable fe80::/64 dev lo proto kernel metric 256 error -101
fe80::/64 dev wlan0 proto kernel metric 256
default via fe80::x:x:x:x dev wlan0 proto kernel metric 1024 expires 1794sec
# ip a sh
...
11: wlan0: <BROADCAST,MULTICAST,DYNAMIC,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 100
...
inet 192.168.0.12/24 brd 192.168.0.255 scope global wlan0
inet6 2001:14ba:16fe:x:x:x:x:x/64 scope global
valid_lft forever preferred_lft forever
...
If "dev wlan0" routes to DNS servers are removed manually, everything works ok. Not sure if it is related, but the problem seemed to appear at the same time when the operator (DNA Welho) enabled IPv6. Other tested devices work ok (Symbian, Fedora Linux).
There are some errors in journal:
kesä 02 20:06:27 Jolla kernel: wlan0: IPv6 duplicate address 2001:14ba:16fe:x:x:x:x:x detected!
...
kesä 02 20:06:29 Jolla connmand[696]: Adding host route failed (No such process)
kesä 02 20:06:29 Jolla connmand[696]: Adding host route failed (No such process)
kesä 02 20:06:29 Jolla connmand[696]: Set IPv6 host route error (Invalid argument)
kesä 02 20:06:29 Jolla connmand[696]: Set IPv6 host route error (Invalid argument)
Seems that in some cases, the incorrect route gets added over and over again so manually deleting it is not possible. In these cases, connmand is also flooding "Set IPv6 host route error" to journal.
Jari K ( 2015-06-03 09:16:20 +0200 )editSame situation here ("eduroam" at University of Lausanne, CH).
You'll notive that the DNS server DOES NOT lie on the same subnet as the IP given to the phone (that's a common configuration on "eduroam" accross unis, and I suspect in some enterprises too). Route table:
The "scope link" routes are utterly wrong. Name resolution fails, until I :
Using the DNS with a gateway now works.
All these are the actual (non-mangled) addresses as used at this University. I can run tests if that can help fixing the problem.
DrYak ( 2015-06-05 21:00:09 +0200 )edit