K.S. Bhaskar via plug on 1 Dec 2020 14:00:08 -0800


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] Getting an IPv6 address with DHCP


After playing a few rounds of whack-a-mole because the IPv6 issues affected other machines (which became apparent during reboots after a power failure from a thunderstorm yesterday)…

Debian/Ubuntu systems have /var/lib/dhclient6*.leases files. The first line of the file has a DUID, followed by a history of DHCP assigned IPv6 leases, When a machine requests an IPv6 address via DHCP, it seems to send the DUID as well as the last assigned IPv6 address(es) so that the DHCP server can reassign the same address if available, even if a static IPv6 address is reserved for that DUID.

What I had to do on each machine (DHCP client) was:
On the firewall (DHCP server):
Reboot each machine. They should come up with the correct IPv6 addresses. If not, rinse and repeat the process for each machine which does not.

The above is a simplification of what I actually did. I floundered a lot, but I believe the above is the essence of the magic spell.

Regards
– Bhaskar

On Sat, Nov 28, 2020 at 5:41 PM K.S. Bhaskar <ksbhaskar@gmail.com> wrote:
I have a Raspberry Pi 3 that after a somewhat complicated migration path from 64-bit Ubuntu 18.04 to Ubuntu 20.04 is not getting its assigned IPv6 address via DHCP (it did previously, and our other machines also get their IPv6 addresses the same way).

Freshly booted, it has its own internally generated IPv6 address, and the DHCP-assigned IPv4 address, but not the DHCP-assigned IPv6 address:

# ip addr show eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether b8:27:eb:cd:91:39 brd ff:ff:ff:ff:ff:ff
    inet 192.168.192.230/24 brd 192.168.192.255 scope global dynamic eth0
       valid_lft 6606sec preferred_lft 6606sec
    inet6 fe80::ba27:ebff:fecd:9139/64 scope link
       valid_lft forever preferred_lft forever
#


If I run dhclient manually (shown here with the -v flag), it gets its DHCP-assigned IPv6 address, but complains about it

# dhclient -6 -v eth0
Internet Systems Consortium DHCP Client 4.4.1
Copyright 2004-2018 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on Socket/eth0
Sending on   Socket/eth0
PRC: Confirming active lease (INIT-REBOOT).
XMT: Forming Confirm, 0 ms elapsed.
XMT:  X-- IA_NA eb:cd:91:39
XMT:  | X-- Confirm Address fda9:d20:c58:262f:fedc:ba98:7654:2029
XMT:  V IA_NA appended.
XMT: Confirm on eth0, interval 960ms.
RCV: Reply message on eth0 from fe80::2ec:acff:fecd:e009.
RCV:  X-- Server ID: 00:01:00:01:22:db:cb:dd:00:ec:ac:cd:e0:09
message status code Success: "All addresses still on link."
PRC: Bound to lease 00:01:00:01:22:db:cb:dd:00:ec:ac:cd:e0:09.
cmp: EOF on /tmp/tmp.7SrYfbTNaR which is empty
#

Pages turned up by my search engine suggest that putting the machine name in /etc/hosts will do the trick, but it does not. There is nothing unusual in /etc/network/interfaces:

root@thorin:~# cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet dhcp
iface eth0 inet6 dhcp
root@thorin:~#

I'm at a bit of a loss as to where to troubleshoot next. Any suggestions are greatly appreciated. Thank you in advance.

Regards
– Bhaskar

___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug