0

i have a little question.

Consider i have DHCP0 server (192.168.1.X) and DHCP1 server (10.0.1.X).

I have a board running Linux with connman. Connect my board on DHCP0, start my board. Connman starts and set IP address by DHCP to eth0 interface : 192.168.1.2

Disconnect the board from DHCP0 and connect it to DHCP1.

Why the IP address is not renewed in 10.0.1.X on eth0 ? See that i have the same behavior on my Ubuntu 18.04 without connman. I suppose it is a normal behavior. So, can i configure connman to renew DHCP IP address at "link up" ?

To renew IP address i need to

$ ifconfig eth0 down
$ ifconfig eth0 up

or

$ systemctl restart connman

Thanks for your return

Sylvain

3
  • Don't know why "Hello" is missing, so "Hello everybody !!"
    – sylvg
    Commented Apr 3, 2019 at 12:31
  • How are you reconnecting the board to the new server? I.e. what do you unplug from where? And is this reconnection shown if you have ip monitor link running? Commented Apr 3, 2019 at 12:37
  • I just unpluged the cable from my board. Forgot to say that we have a switch on our board. 2 ports enabled on GMAC0 for eth1, and 3 ports enabled on GMAC1 for eth0. So for eth1, we can see two switch ports sw0p0 and sw0p1. When i unplug cable, with ip monitor link i see that it is sw0p1 which is linked down, and not eth1. Maybe the problem comes from here.
    – sylvg
    Commented Apr 3, 2019 at 13:27

1 Answer 1

0

Forgot to say that we have a switch on our board. 2 ports enabled on GMAC0 for eth1, and 3 ports enabled on GMAC1 for eth0. So for eth1, we can see two switch ports sw0p0 and sw0p1. When i unplug cable, with ip monitor link i see that it is sw0p1 which is linked down, and not eth1

That's a pretty important omission.

Your eth0 isn't connected directly to the DHCP server – it's just a "CPU port" on the internal GMAC1 switch. Even if it goes through an internal switch, it still goes through a switch – and it has the same effect that the "CPU↔switch" link remains up completely independently from the "switch↔DHCPserver" link.

So there's no "link up" event on eth0 because the link never goes down!

It's possible that the internal switch driver might support some method to propagate link state from one external port to the internal port... Alternatively, if "sw0p1" shows up as a real network interface, then userspace such as ifplugd could be used to monitor its link state and restart connman accordingly.

1
  • That's what i asked to our kernel team.Can connamn do the same thing as ifplugd ? If not, can th two work together ?
    – sylvg
    Commented Apr 4, 2019 at 8:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .