• Welcome to Hurricane Electric's IPv6 Tunnel Broker Forums.

IPv6 on Virtual Interface (eth0:1)

Started by phipac, June 26, 2010, 12:25:18 PM

Previous topic - Next topic

phipac

Is it possible to implement IPv6 on a virtual interface (eth0:1 interface) in CentOS?  It's all working fine on IPv4, but I need IPv6 on the virtual as well.  I tried everything that worked on the physical interface and I cannot get anything IPv6 to show for the eth0:1 interface.  Thanks for any help!

-Phil

patrickdk

You do realize virtual interfaces don't exist in linux anymore? they are only used to display it easy to the user.

One of the things about ipv6 was to do away with the whole one ip per interface thing. You can define as many as you want, and no alias needed.

Just use, ifconfig eth0 add xxxx, for as many ip's as you need.

Or since ifconfig is technically been removed, but kept around for compatability, use the ip command directly, ip addr add ....

phipac

Quote from: patrickdk on June 26, 2010, 01:41:05 PM
You do realize virtual interfaces don't exist in linux anymore? they are only used to display it easy to the user.

One of the things about ipv6 was to do away with the whole one ip per interface thing. You can define as many as you want, and no alias needed.

Just use, ifconfig eth0 add xxxx, for as many ip's as you need.

Or since ifconfig is technically been removed, but kept around for compatability, use the ip command directly, ip addr add ....


The only reason I was trying to add it to a virtual interface is because I have multiple IPv4 addresses on a physical interface (I have not found a way to add them without going virtual), and I need IPv6 subnets on each of the IPv4 "interfaces".  It's a complex routing issue, but right now it's what I have to work with.

Thanks for your help!

patrickdk

to add ipv4 addresses and ignore the whole virtual (ethx:x thing) you do:

ip addr add x.x.x.x/24 brd x.x.x.x.255 dev ethx

then if you wanted to make that an alias you would do this instead:

ip addr add x.x.x.x/24 brd x.x.x.x.255 dev ethx label ethx:x

So the end result is no different, it is just how ifconfig that shows it to you, making it look strange.


chcenter


You just use IPV6ADDR_SECONDARIES to add as many ip you need

---extras from ifcfg-eth0 file---
IPV6INIT=yes
IPV6ADDR_SECONDARIES=2001:xxxx:xxxx::11f/124
IPV6ADDR=2a06:xxxx:0:x::2/120
IPV6_DEFAULTGW=2a06:xxxx:0:x::1