Debian: More ipv6 addresses then ipv4
do you know how I can add 3 static ipv6 addresses under Debian while I only have 2 ipv4 addresses?
auto lo
iface lo inet loopback
auto eth0 eth0:0 eth0:1
iface eth0 inet dhcp
iface eth0 inet static
address 109.74.192.6
netmask 255.255.255.0
broadcast 109.74.192.255
gateway 109.74.192.1
iface eth0:0 inet static
address 178.79.180.239
netmask 255.255.255.0
iface eth0 inet6 static
address 2a01:7e00:0000:0000:f03c:91ff:fe96:59f7
netmask 64
gateway fe80:0000:0000:0000:0000:0000:0000:0001
iface eth0:0 inet6 static
address 2a01:7e00:0000:0000:0000:0000:0017:5000
netmask 64
gateway fe80:0000:0000:0000:0000:0000:0000:0001
iface eth0:1 inet6 static
address 2a01:7e00:0000:0000:0000:0000:0017:5001
netmask 64
ip -6 addr show
1: lo:
inet6 ::1/128 scope host
validlft forever preferredlft forever
2: eth0:
inet6 2a01:7e00::17:5000/64 scope global
validlft forever preferredlft forever
inet6 2a01:7e00::f03c:91ff:fe96:59f7/64 scope global
validlft forever preferredlft forever
inet6 fe80::f03c:91ff:fe96:59f7/64 scope link
validlft forever preferredlft forever
Thanks!
Laurensup>up>
4 Replies
auto eth0
iface eth0 inet static
address 67.18.187.111
gateway 67.18.187.1
netmask 255.255.255.0
up ip addr add 192.168.130.4/17 dev eth0
down ip addr del 192.168.130.4/17 dev eth0
up ip addr add 2600:3c00::2:b001/64 dev eth0
down ip addr del 2600:3c00::2:b001/64 dev eth0
up ip addr add 2600:3c00::2:b401/64 dev eth0 preferred_lft 0
down ip addr del 2600:3c00::2:b401/64 dev eth0
(I let the autoconfigured address, well, autoconfigure, and don't explicitly list it in /etc/network/interfaces.)
I got them running that way..
@mnordhoff:
Personally, my /etc/network/interfaces mostly uses 'up ip' and 'down ip' to manage IPs:
…
(I let the autoconfigured address, well, autoconfigure, and don't explicitly list it in /etc/network/interfaces.)
Many thanks for sharing that - sorted me out just fine!