Hi,

On 24 July 2014 10:21, G <i...@asidev.com> wrote:
> Hi folks,
> I have a strange bahaviour using connman 1.20

If possible try to upgrade to latest release (1.24), it fixes lot of
bugs, although probably does not fix your issue.

>
> I have a device with an ethernet card and a wifi card
>
> Both card are with dhcp and are connected to the same network (I know this
> is not good, but I can't do in a different way). Furthermore the ethernet
> card got a static IP on a different subnet

>
> So my routing table looks like this
>
> root@razor:~# ip route
> 192.168.10.100 via 192.168.10.100 dev eth0
> 192.168.10.100 dev eth0  scope link
> 192.168.10.100 dev wlan0  scope link  metric 10
> 10.189.189.0/24 dev eth0  proto kernel  scope link  src 10.189.189.1
> 192.168.10.0/24 dev eth0  proto kernel  scope link  src 192.168.10.109
> 192.168.10.0/24 dev wlan0  proto kernel  scope link  src 192.168.10.107
> metric 10
> 224.0.0.0/24 dev eth0  scope link
> default via 192.168.10.100 dev eth0
>
> 192.168.10.100 is the dhcp server / default gateway (simply a wireless
> router); 10.189.189.0/24 is a control subnet used to reach other devives
> through a switch (no VLAN)
>
> You can see that the route via eth0 is preferred because of a lower metric
>
> root@razor:~# ip route get 192.168.10.100
> 192.168.10.100 dev eth0  src 192.168.10.109
>     cache  ipid 0x34b2 mtu 1500 advmss 1460 hoplimit 64
>
> The problem arise when I disconnect the ethernet cable, because the routing
> table doesn't change at all and if I check the previous route I obtain
>
> root@razor:~# ip route get 192.168.10.100
> 192.168.10.100 dev eth0  src 10.189.189.1
>     cache  mtu 1500 advmss 1460 hoplimit 64
>
> So the route goes via eth0, using the static configured ip
>
> The interface looks like this
>
> root@razor:~# ip link
> 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
>     link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
> 2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,DYNAMIC,UP> mtu 1500 qdisc
> pfifo_fast state DOWN qlen 1000
>     link/ether 00:21:84:30:03:78 brd ff:ff:ff:ff:ff:ff
> 3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen
> 1000
>     link/ether 00:21:84:26:01:84 brd ff:ff:ff:ff:ff:ff
>
> Is this the expected behaviour under these conditions?

I tried this setup with my laptop and did not see exacly similar issue
(although my ethernet was reconnected to same subnet as wifi). My
ethernet got always the default route after toggling ethernet cable.

So both ethernet and wifi connected at the same time the routing table
looked like this

Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
0.0.0.0         192.168.178.1   0.0.0.0         UG        0 0          0 em1
192.168.178.0   0.0.0.0         255.255.255.0   U         0 0          0 em1
192.168.178.0   0.0.0.0         255.255.255.0   U         0 0          0 wlp3s0
192.168.178.1   0.0.0.0         255.255.255.255 UH        0 0          0 wlp3s0
192.168.178.1   0.0.0.0         255.255.255.255 UH        0 0          0 em1

Then after disconnecting ethernet and reconnecting it again I got

Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
0.0.0.0         192.168.178.1   0.0.0.0         UG        0 0          0 em1
192.168.178.0   0.0.0.0         255.255.255.0   U         0 0          0 wlp3s0
192.168.178.0   0.0.0.0         255.255.255.0   U         0 0          0 em1
192.168.178.1   0.0.0.0         255.255.255.255 UH        0 0          0 em1
192.168.178.1   0.0.0.0         255.255.255.255 UH        0 0          0 wlp3s0

So the routes are in slightly different order but that does not matter
in this case.

>
> Why routes through eth0 (which is down) aren't removed from routing table?

The removal of the eth route seem to have failed (probably because
they are in the same subnet as wifi). We should already remove all the
routes via some interface when that interface is taken down but this
seems to not have happened. I wonder if this could be related to your
static IP address for ethernet. Could you try whether the situation
changes if you use always dhcp addresses?


Cheers,
Jukka
_______________________________________________
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman

Reply via email to