jul 272011
 

Jag behövde flera IPv6-adresser på ett interface på en Ubuntu linux. För IPv4 är det vanligt att man skapar subinterface t.ex. eth0:0, men det var ingen bra idé för IPv6.

Att göra så här i /etc/network/interfaces fungerade inte heller:

iface eth0 inet6 static
 address 2001:2040:2000:7::21
 address 2001:2040:2000:7::22
 netmask 64
 gateway 2001:2040:2000:7::1

Felmeddelandet blev:

# /etc/init.d/networking restart
* Reconfiguring network interfaces...
/etc/network/interfaces:20: duplicate option
ifdown: couldn't read interfaces file "/etc/network/interfaces"
/etc/network/interfaces:20: duplicate option
ifup: couldn't read interfaces file "/etc/network/interfaces"

I stället fick det bli så här:

iface eth0 inet6 static
 address 2001:2040:2000:7::21
 netmask 64
 gateway 2001:2040:2000:7::1
 post-up ip -f inet6 addr add 2001:2040:2000:7::22 dev eth0
 pre-down ip -f inet6 addr del 2001:2040:2000:7::22  dev eth0
 Posted by at 15:23

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)