Ubuntu 18.04 / 3.16 IP changes

Moderators: odroid, mdrjr

Ubuntu 18.04 / 3.16 IP changes

Unread postby Sebas_Ledesma » Wed Jul 18, 2018 4:21 am

Hi:

I'm facing a strange problem with the Ethernet wired in the C2, the ip changes from time to time, ie: 192.168.0.103 -> 192.168.0.122 -> 192.168.0.103.
My router has a 'lease time' of 120 minutes but I'm think that it's changing faster than that, also with old 3.14 (and same router settings) the IP remained without changes.
There is any configuration to avoid changing the IP (and not using static IP)?

thanks in advance.

Sebas
Sebas_Ledesma
 
Posts: 64
Joined: Thu Jun 08, 2017 2:49 am
languages_spoken: english
ODROIDs: c2

Re: Ubuntu 18.04 / 3.16 IP changes

Unread postby rooted » Wed Jul 18, 2018 5:23 am

Check to see if your MAC address is changing with each boot.
User avatar
rooted
 
Posts: 5885
Joined: Fri Dec 19, 2014 9:12 am
Location: Gulf of Mexico, US
languages_spoken: english

Re: Ubuntu 18.04 / 3.16 IP changes

Unread postby Sebas_Ledesma » Wed Jul 18, 2018 5:36 am

The device it's not rebooting, it changes while running.
And the MAC is the same between boots, I know because when connecting from Windows using ssh the first time that connects with a specific MAC it asks me to validate the MAC.
I've testing lighttp (in the other Odroid I use apache2), I'm not sure if this is related, in the 'old' C2 running 16.04+3.14 I'm using apache.

Sebas
Sebas_Ledesma
 
Posts: 64
Joined: Thu Jun 08, 2017 2:49 am
languages_spoken: english
ODROIDs: c2

Re: Ubuntu 18.04 / 3.16 IP changes

Unread postby rooted » Wed Jul 18, 2018 6:04 am

Very weird, I don't recall seeing an IP change on a running system.

Anything in the system log?
User avatar
rooted
 
Posts: 5885
Joined: Fri Dec 19, 2014 9:12 am
Location: Gulf of Mexico, US
languages_spoken: english

Re: Ubuntu 18.04 / 3.16 IP changes

Unread postby Sebas_Ledesma » Wed Jul 18, 2018 6:30 am

I see DHCPREQUEST changing from 192.168.0.103 -> 192.168.0.122/123, I'm suspicting of a power managenet issue or lighttpd conflict.

I've uploaded the syslog to
https://wetransfer.com/downloads/a3abab ... ient_email

Sebas
Sebas_Ledesma
 
Posts: 64
Joined: Thu Jun 08, 2017 2:49 am
languages_spoken: english
ODROIDs: c2

Re: Ubuntu 18.04 / 3.16 IP changes

Unread postby mad_ady » Wed Jul 18, 2018 2:58 pm

Are you sure you have only one authoritative dhcp server in your network? If you have two dhcp servers at half the lease time the client asks for a renew and may receive a nack from the other server causing it to ask for a new ip which it may receive from the other server. You should have dhcp logs in /var/log/syslog and you can check when this happens and correlate it with your router's logs.
User avatar
mad_ady
 
Posts: 4896
Joined: Wed Jul 15, 2015 5:00 pm
Location: Bucharest, Romania
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1

Re: Ubuntu 18.04 / 3.16 IP changes

Unread postby Sebas_Ledesma » Wed Jul 18, 2018 11:12 pm

My LAN configuration hasn't changed: a have two cable modems with a router load balancer that acts as DHCP server.
With the others Odroid C2 running 16.04/3.14 the IP keeps the same, even when rebooting the odroid or the router (obviously if I shut down both at the same time then the IP changes).
These are my first tests with 3.16, maybe I did something wrong :?:

Sebas
Sebas_Ledesma
 
Posts: 64
Joined: Thu Jun 08, 2017 2:49 am
languages_spoken: english
ODROIDs: c2

Re: Ubuntu 18.04 / 3.16 IP changes

Unread postby Sebas_Ledesma » Wed Jul 25, 2018 2:14 am

I've found this article "DHCP changing the IP address suddenly on embedded systems":
http://billauer.co.il/blog/2012/10/dhcp-ip-ntpdate-rtc/

Wich seem pretty similar to my syslog:
Code: Select all
Jul 24 14:01:54 odroid NetworkManager[604]: <info>  [1532451714.8468] dhcp4 (eth0): state changed bound -> expire
Jul 24 14:01:54 odroid NetworkManager[604]: <info>  [1532451714.9114] dhcp4 (eth0): canceled DHCP transaction, DHCP client pid 1819
Jul 24 14:01:54 odroid NetworkManager[604]: <info>  [1532451714.9115] dhcp4 (eth0): state changed expire -> done
Jul 24 14:01:54 odroid NetworkManager[604]: <info>  [1532451714.9122] device (eth0): scheduling DHCPv4 restart in 120 seconds, 3 tries left (reason: lease expired)
Jul 24 14:03:55 odroid NetworkManager[604]: <info>  [1532451835.5816] dhcp4 (eth0): activation: beginning transaction (timeout in 45 seconds)
Jul 24 14:03:55 odroid NetworkManager[604]: <info>  [1532451835.5871] dhcp4 (eth0): dhclient started with pid 7586
Jul 24 14:03:55 odroid dhclient[7586]: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 3 (xid=0x214db620)
Jul 24 14:03:55 odroid dhclient[7586]: DHCPREQUEST of 192.168.0.112 on eth0 to 255.255.255.255 port 67 (xid=0x20b64d21)
Jul 24 14:03:55 odroid dhclient[7586]: DHCPOFFER of 192.168.0.112 from 192.168.0.1
Jul 24 14:03:55 odroid dhclient[7586]: DHCPACK of 192.168.0.112 from 192.168.0.1
Jul 24 14:03:55 odroid NetworkManager[604]: <info>  [1532451835.8859] dhcp4 (eth0):   address 192.168.0.112
Jul 24 14:03:55 odroid NetworkManager[604]: <info>  [1532451835.8859] dhcp4 (eth0):   plen 24 (255.255.255.0)
Jul 24 14:03:55 odroid NetworkManager[604]: <info>  [1532451835.8860] dhcp4 (eth0):   gateway 192.168.0.1
Jul 24 14:03:55 odroid NetworkManager[604]: <info>  [1532451835.8860] dhcp4 (eth0):   lease time 14400
Jul 24 14:03:55 odroid NetworkManager[604]: <info>  [1532451835.8861] dhcp4 (eth0):   nameserver '192.168.0.1'
Jul 24 14:03:55 odroid NetworkManager[604]: <info>  [1532451835.8861] dhcp4 (eth0): state changed unknown -> bound
Jul 24 14:03:55 odroid avahi-daemon[609]: Withdrawing address record for 192.168.0.126 on eth0.
Jul 24 14:03:55 odroid avahi-daemon[609]: Leaving mDNS multicast group on interface eth0.IPv4 with address 192.168.0.126.
Jul 24 14:03:55 odroid avahi-daemon[609]: Interface eth0.IPv4 no longer relevant for mDNS.
Jul 24 14:03:55 odroid avahi-daemon[609]: Joining mDNS multicast group on interface eth0.IPv4 with address 192.168.0.112.
Jul 24 14:03:55 odroid avahi-daemon[609]: New relevant interface eth0.IPv4 for mDNS.
Jul 24 14:03:55 odroid avahi-daemon[609]: Registering new address record for 192.168.0.112 on eth0.IPv4.
Jul 24 14:03:55 odroid dbus-daemon[569]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.freedesktop.nm-dispatcher.service' requested by ':1.12' (uid=0 pid=604 comm="/usr/sbin/NetworkManager --no-daemon ")
Jul 24 14:03:55 odroid systemd[1]: Starting Network Manager Script Dispatcher Service...
Jul 24 14:03:55 odroid dhclient[7586]: bound to 192.168.0.112 -- renewal in 5790 seconds.
Jul 24 14:03:55 odroid dbus-daemon[569]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
Jul 24 14:03:55 odroid systemd[1]: Started Network Manager Script Dispatcher Service.
Jul 24 14:03:55 odroid nm-dispatcher: req:1 'dhcp4-change' [eth0]: new request (1 scripts)
Jul 24 14:03:55 odroid nm-dispatcher: req:1 'dhcp4-change' [eth0]: start running ordered scripts...



Sebas
Sebas_Ledesma
 
Posts: 64
Joined: Thu Jun 08, 2017 2:49 am
languages_spoken: english
ODROIDs: c2

Re: Ubuntu 18.04 / 3.16 IP changes

Unread postby mad_ady » Wed Jul 25, 2018 3:10 am

Interesting article. I wasn't aware of that problem. I always use dhcp with static mac binding.
It seems your system requested a different address for some reason.
If it's because of a time jump you can install fake-hwclock to simulate a rtc on reboot. On startup it will restore the last known clock keeping ssl certificates working and preventing large time jumps
User avatar
mad_ady
 
Posts: 4896
Joined: Wed Jul 15, 2015 5:00 pm
Location: Bucharest, Romania
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1

Re: Ubuntu 18.04 / 3.16 IP changes

Unread postby Sebas_Ledesma » Fri Jul 27, 2018 1:12 am

In my case the IP changes several times along the day, no need to reboot.
That breaks my SSH connections and also the WinSCP connection. Also I have problems with my application receiving streaming due the IP changed.
I´m analyzing how to avoid that, if possible without switching to static IP.

Sebas
Sebas_Ledesma
 
Posts: 64
Joined: Thu Jun 08, 2017 2:49 am
languages_spoken: english
ODROIDs: c2


Return to Issues

Who is online

Users browsing this forum: No registered users and 16 guests