Hurricane Electric's IPv6 Tunnel Broker Forums

General IPv6 Topics => IPv6 on Linux & BSD & Mac => Topic started by: xdaxdb on January 17, 2010, 07:05:27 AM

Title: Virtual Interfaces
Post by: xdaxdb on January 17, 2010, 07:05:27 AM
I am leasing a VPS (virtual private server) which I use mainly for hosting a couple web sites. I want to add reachability ipv6 to my existing websites.

I already have the server set up with an ipv6 tunnel with a routed /48 (thank you Hurrucane Electric). The problem I am facing now is how to set up the ipv6 host addresses on the server.

The first idea that comes to mind is to set up sub-interfaces (eth0:0, eth0:1, etc.) with the ipv6 host addresses, but that bothers me. The reason it bothers me is because normaly when you create a sub-interface it is to allow connectivity to a network through that interface. But in this case I don't want to transmit or receive any data at all out of that sub-interface (it will send/receive data from the kernel).

I think a more apropriate solution would be to add more loopback interfaces to the server, but I don't know how to do that or if that is appropriate either.

Anybody out there ever donr something like this. Any input would be helpful.

Thanks
Title: Re: Virtual Interfaces
Post by: kriteknetworks on January 17, 2010, 08:06:31 AM
Unlike ipv4, you don't use aliases to add ipv6 IPs to an interface.

ip addr add 2001:470:xxxx::1/64 dev eth0

as an example.
Title: Re: Virtual Interfaces
Post by: FirefighterBlu3 on March 03, 2010, 02:17:10 AM
for the record, ethX:Y is an ancient and deprecated form.  years ago the the distinction was made between "eth0" as the hardware interface, and "1.2.3.4/24" as the network interface.  you can add as many ipv4 or ipv6 addresses as pleases you to a hardware interface.  management of the hardware and networking are properly separated.

ip a a 10.0.0.1/24 dev eth0
ip a a 192.168.0.8/24 dev eth0
ip a a 10.99.99.99/32 dev eth0

ip a ls eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 100
    link/ether 00:04:23:cd:93:d2 brd ff:ff:ff:ff:ff:ff
    inet 10.0.0.1/24 brd 10.0.0.255 scope global eth0
    inet 192.168.0.8/32 scope global eth0
    inet 10.99.99.99/16 brd 10.99.255.255 scope global eth0
    inet6 fe80::20e:cff:fe67:a168/64 scope link
       valid_lft forever preferred_lft forever