nmcli connection modify bahnhof ipv6.method dhcp
nmcli connection modify bahnhof ipv6.addr-gen-mode eui64
nmcli connection modify bahnhof ipv6.dhcp-duid ll
nmcli connection modify bahnhof ipv6.dhcp-iaid 123456
nmcli connection modify bahnhof ipv6.never-default no
#
sudo sysctl net.ipv6.conf.enp5s0.accept_ra=1
sudo sysctl net.ipv6.conf.all.accept_ra=1
sudo sysctl net.ipv6.conf.default.accept_ra=1
nmcli connection show bahnhof | grep -E "ipv6.method|ipv6.addr-gen-mode|ipv6.dhcp-duid|ipv6.dhcp-iaid|ipv6.never-default"
* # ipv6 troubleshooting.
# ndp Neighbor Discovery Protocol
# ra Router Advertisements
# pd Prefix Delegation
# The IPv6 address ff02::2 is a multicast address. Specifically, it is the all-routers multicast address for the link-local scope.
sudo rdisc6 <interface>
sudo rdisc6 enp5s0
# Enable debug of NetworkManager.
vim /etc/systemd/journald.conf /etc/NetworkManager/conf.d/95-nm-debug.conf ; systemctl restart systemd-journald ; systemctl restart NetworkManager
# dhcp ipv6
nmcli -f DHCP6 device show enp5s0
DHCP6.OPTION[1]: dhcp6_client_id = 00:03:00:01:68:05:ca:01:f7:ac
DHCP6.OPTION[2]: dhcp6_name_servers = 2001:9b0::53:1 2001:9b0::53:2
DHCP6.OPTION[3]: iaid = 00:01:e2:40
DHCP6.OPTION[4]: ip6_address = 2001:9b1:402d:0:ffff:9207:aa1:5f1b
# dhclient.conf
# -6 ipv6, -d debug, -v verbose, -n dont configure interface, -w wait after finnish.
dhclient -6 -d -v -n -w
# Figure out default gateway. Let below command running.
ping6 ff02::2%enp5s0
# Look how to configure default router.
ip -6 n
# Set default route according to output above.
ip -6 route add default via fe80::8ee5:efff:fe5b:ef9 dev enp5s0
# Add manual default router.
nmcli connection modify bahnhof ipv6.gateway fe80::8ee5:efff:fe5b:ef9
nmcli connection modify bahnhof ipv6.method dhcp
nmcli connection modify bahnhof ipv6.addr-gen-mode eui64
nmcli connection modify bahnhof ipv6.dhcp-duid ll
nmcli connection modify bahnhof ipv6.dhcp-iaid 123456
nmcli connection modify bahnhof ipv6.never-default true
nmcli connection modify bahnhof ipv6.ignore-auto-routes true
# Enable ra on all interfaces.
sysctl -a | grep "accept_ra = 0" | sed 's/0$/1/g;s/ //g' | while read i ; do sysctl $i ; done
# dhcpv6 dp
nmcli connection modify bahnhof \
ipv6.method auto \
ipv6.dhcp-duid stable-uuid \
ipv6.ip6-privacy 0 \
ipv6.addr-gen-mode eui64 \
ipv6.ra-timeout 20 \
ipv6.dhcp-send-hostname yes \
ipv6.addr-gen-mode stable-privacy
# Manage connection from cli.
/etc/NetworkManager/system-connections/bahnhof.nmconnection
# Test addresses.
2001:4860:4860::8888 2001:4860:4860::8844 8.8.8.8 8.8.4.4
ndptool
sudo ndptool monitor --ifname=enp5s0
NDP payload len 32, from addr: fe80::8ee5:efff:fe5b:ef9, iface: enp5s0
Type: NA
NDP payload len 32, from addr: 2001:9b1:402d::1, iface: enp5s0
Type: NS
NDP payload len 32, from addr: 2001:9b1:402d::1, iface: enp5s0
Type: NA
NDP payload len 32, from addr: fe80::8ee5:efff:fe5b:ef9, iface: enp5s0
Type: NS
NDP payload len 32, from addr: fe80::8ee5:efff:fe5b:ef9, iface: enp5s0
Type: NA
Neighbor Discovery Protocol (NDP)
Neighbor Solicitation(NS)
Is an ICMPv6 message type used by nodes on an IPv6 network to:
Determine the link-layer (MAC) address of a neighbor
Verify the reachability of a neighbor
Perform Duplicate Address Detection (DAD)