====== IP configuration ====== ===== Debian ===== # The loopback network interface auto lo iface lo inet loopback # The primary network interface allow-hotplug eth0 iface eth0 inet static address 192.168.21.2/24 gateway 192.168.21.1 iface eth0 inet6 static address fd18:76a0:3427:201::2/64 iface eth0 inet6 auto === IPv6: token or DHCP === iface eth0 inet6 auto #SLAAC pre-up /sbin/ip token set ::48 dev eth0 #configure static token with changing prefix iface eth1 inet6 dhcp #DHCPv6 ((token setup from [[https://medium.com/@xchewtoyx/token-ipv6-post-8ad39d645636]])) === IPv6: EUI-64 === net.ipv6.conf.default.addr_gen_mode = 0 net.ipv6.conf.eth0.addr_gen_mode = 0 === DHCPv4 DUID identifier === ''ifupdown'' sends ''dhclient -i'' Flag (use DHCPv6 DUID for v4) by default now. To revert backt to MAC-Address set following item in ''dhclient.conf'':((https://superuser.com/a/1553114)) send dhcp-client-identifier = hardware; or this option in ''/etc/network/interface'':((https://superuser.com/a/1648918)) iface eth0 inet dhcp client no === Disable v6 completely === net.ipv6.conf.eth0.disable_ipv6 = 1 #replace eth0 with desired interface or all ===== Ubuntu 18.04 ===== # This file is generated from information provided by # the datasource. Changes to it will not persist across an instance. # To disable cloud-init's network configuration capabilities, write a file # /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following: # network: {config: disabled} network: ethernets: eth0: dhcp4: no addresses: - 192.168.25.40/24 - 2001:6b0:1234:1470::40/64 gateway4: 192.168.25.1 gateway6: 2001:6b0:1234:1470::1 version: 2 sudo netplan apply ===== IPv6 Token ===== **not persistent** sudo ip token set ::27 dev eth0 **persistent** add token addr and fe80 with that number iface eth0 inet6 auto pre-up /sbin/ip token set ::40 dev eth0 up /sbin/ip -6 addr add fe80::40/64 dev eth0 ===== Mit ip addr ===== sudo ip addr add 2003:59:6034::26:4/64 dev eth1 sudo ip route add ::/0 via 2003:59:6034::1 dev eth1 ===== Token in /etc/network/interfaces ===== https://gist.github.com/xchewtoyx/f90e4696e9726711673b81d8aff8acff#file-gistfile1-txt