Re: Addresses not deleted when cable pulled
jobhunts02
Tue Mar 06 02:41:43 2018
Thank you very much for that information. I do not have to pull the cable to see the "deleted" message in dhcpcd.log.
On another run, in /var/log/messages:
Mar 6 02:14:59 2018 4550V2 ntpd[7371]: Deleting interface #3 eth1, 192.168.2.150#123, interface stats: received=0, sent=0, dropped=0, active_time=4 secs
This occurs before the dhcpcd.log shows it was deleted:
Mar 06 02:15:17 [6615]: eth1: deleted IP address 192.168.2.150/24
I will look into why this 3rd party software deleted it.
Mar 06 02:14:46 [6615]: dhcpcd-7.0.0 starting
Mar 06 02:14:46 [6615]: all: disabling kernel IPv6 RA support
Mar 06 02:14:46 [6615]: eth1: if_disable_autolinklocal: Operation not supported
Mar 06 02:14:46 [6615]: eth1: disabling kernel IPv6 RA support
Mar 06 02:14:46 [6615]: eth1: executing `/etc/conf/bin/dhcpcd-up' PREINIT
Mar 06 02:14:46 [6615]: eth1: executing `/etc/conf/bin/dhcpcd-up' CARRIER
Mar 06 02:14:46 [6615]: eth1: delaying IPv4 for 0.9 seconds
Mar 06 02:14:47 [6615]: eth1: using hwaddr 54:39:68:0d:4b:f3
Mar 06 02:14:47 [6615]: eth1: soliciting a DHCP lease
Mar 06 02:14:47 [6615]: eth1: sending DISCOVER (xid 0x2d117e84), next in 4.8 seconds
Mar 06 02:14:48 [6615]: eth1: offered 192.168.2.150 from 192.168.2.1
Mar 06 02:14:48 [6615]: eth1: sending REQUEST (xid 0x2d117e84), next in 3.1 seconds
Mar 06 02:14:48 [6615]: eth1: acknowledged 192.168.2.150 from 192.168.2.1
Mar 06 02:14:48 [6615]: eth1: probing address 192.168.2.150/24
Mar 06 02:14:48 [6615]: eth1: probing for 192.168.2.150
Mar 06 02:14:48 [6615]: eth1: ARP probing 192.168.2.150 (1 of 3), next in 1.9 seconds
Mar 06 02:14:50 [6615]: eth1: ARP probing 192.168.2.150 (2 of 3), next in 1.7 seconds
Mar 06 02:14:52 [6615]: eth1: ARP probing 192.168.2.150 (3 of 3), next in 2.0 seconds
Mar 06 02:14:54 [6615]: eth1: DAD completed for 192.168.2.150
Mar 06 02:14:54 [6615]: eth1: leased 192.168.2.150 for 604800 seconds
Mar 06 02:14:54 [6615]: eth1: renew in 302400 seconds, rebind in 529200 seconds
Mar 06 02:14:54 [6615]: eth1: writing lease `/var/db/dhcpcd/eth1.lease'
Mar 06 02:14:54 [6615]: eth1: adding IP address 192.168.2.150/24 broadcast 192.168.2.255
Mar 06 02:14:54 [6615]: eth1: adding route to 192.168.2.0/24
Mar 06 02:14:54 [6615]: eth1: adding default route via 192.168.2.1
Mar 06 02:14:54 [6615]: eth1: ARP announcing 192.168.2.150 (1 of 2), next in 2.0 seconds
Mar 06 02:14:54 [6615]: eth1: executing `/etc/conf/bin/dhcpcd-up' BOUND
Mar 06 02:15:17 [6615]: eth1: ARP announcing 192.168.2.150 (2 of 2)
Mar 06 02:15:17 [6615]: eth1: deleted IP address 192.168.2.150/24
Mar 06 02:15:17 [6615]: eth1: deleting route to 192.168.2.0/24
Mar 06 02:15:17 [6615]: eth1: deleting default route via 192.168.2.1
Mar 06 02:15:17 [6615]: eth1: executing `/etc/conf/bin/dhcpcd-up' EXPIRE
-----Original Message-----
From: Roy Marples <roy@xxxxxxxxxxxx>
To: jobhunts02 <jobhunts02@xxxxxxx>; dhcpcd-discuss <dhcpcd-discuss@xxxxxxxxxxxx>
Sent: Mon, Mar 5, 2018 4:09 pm
Subject: Re: [dhcpcd-discuss] Addresses not deleted when cable pulled
On 05/03/2018 20:40, jobhunts02@xxxxxxx wrote:
> Here is the info you requested:
>
> # uname -a
> Linux 4550V2 3.10.87-rt80-Cavium-Octeon #152 SMP Mon Mar 5 12:02:58 PST
> 2018 mips64 unknown
>
> # cat /var/log/dhcpcd.log
> Mar 05 20:28:36 [6448]: dhcpcd-7.0.0 starting
You could try dhcpcd-7.0.1, but I'm pretty sure this isn't a dhcpcd issue.
> Mar 05 20:28:42 [6448]: eth1: adding IP address 192.168.2.150/24
> broadcast 192.168.2.255
> Mar 05 20:28:42 [6448]: eth1: adding route to 192.168.2.0/24
> Mar 05 20:28:42 [6448]: eth1: adding default route via 192.168.2.1
> Mar 05 20:28:42 [6448]: eth1: ARP announcing 192.168.2.150 (1 of 2),
> next in 2.0 seconds
> Mar 05 20:28:42 [6448]: eth1: executing `/etc/conf/bin/dhcpcd-up' BOUND
> Mar 05 20:29:08 [6448]: eth1: ARP announcing 192.168.2.150 (2 of 2)
Yay, you got a lease.
> Mar 05 20:29:08 [6448]: eth1: deleted IP address 192.168.2.150/24
> Mar 05 20:29:08 [6448]: eth1: deleting route to 192.168.2.0/24
> Mar 05 20:29:08 [6448]: eth1: deleting default route via 192.168.2.1
> Mar 05 20:29:08 [6448]: eth1: executing `/etc/conf/bin/dhcpcd-up' EXPIRE
But something else deleted it right away.
dhcpcd spotted this and noted that something had "deleted" the leased IP
address.
If dhcpcd deleted it, it would have used the word "deleting" instead.
As the address was lost, dhcpcd then expired the lease.
What is most curious is that it was deleted exactly when the ARP
announcement finished.
> Mar 05 20:29:35 [6448]: eth1: carrier lost
> Mar 05 20:29:35 [6448]: eth1: executing `/etc/conf/bin/dhcpcd-up' NOCARRIER
And carrier was then lost at this point.
As a 3rd party had removed the address and dhcpcd had dropped the lease
earlier, dhcpcd didn't take any action at carrier down.
> But 192.168.2.150 is not removed from eth1:
> # ifconfig eth1
> eth1 Link encap:Ethernet HWaddr 54:39:68:0D:4B:F3
> inet addr:192.168.2.150 Bcast:192.168.2.255 Mask:255.255.255.0
> inet6 addr: fe80::5639:68ff:fe0d:4bf3/64 Scope:Link
> UP BROADCAST MULTICAST MTU:1500 Metric:1
> RX packets:6 errors:0 dropped:0 overruns:0 frame:0
> TX packets:18 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:0
So something else added it back again most likely and not dhcpcd.
What other software are you running?
Roy
Archive administrator: postmaster@marples.name