Hurricane Electric's IPv6 Tunnel Broker Forums
May 25, 2013, 12:35:53 pm *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Welcome to Hurricane Electric's Tunnelbroker.net forums!
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Help setting up Ubuntu with multiple virtual interfaces  (Read 3355 times)
glimberg
Newbie
*
Posts: 3


View Profile
« on: January 21, 2011, 12:30:40 pm »

Hi all.  Newb question here.  I hope you don't mind  Grin

I've recently delved into the world of ipv6 and have my tunnel working quite nicely on my VPS Ubuntu 10.04 server.  As with all accounts on here, I was assigned a routed /64.  The server serves up multiple domain names.  Ideally what I'd like to do is have each domain on a unique ipv6 address from my /64 block.  With ipv4, I'd create virtual interfaces such as eth0:0, eth0:1, eth0:2 each with their own IP address.  I'm lost as to how to configure this with ipv6 though.

Here are the contents of my current /etc/network/interfaces file:

Code:
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
        address xxx.xxx.xxx.xxx
        netmask 255.255.255.0
        gateway xxx.xxx.xxx.xxx

auto hetunnel
iface hetunnel inet6 v4tunnel
        address 2001:470:1f04:xxxx::2
        netmask 64
        ttl 64
        gateway 2001:470:1f04:xxxx::1
        endpoint 72.52.104.74


What do I need to do to it in order to achieve what I'm looking to do?

Thanks in advance.

Grant
Logged
cholzhauer
Hero Member
*****
Posts: 2082


View Profile
« Reply #1 on: January 21, 2011, 01:30:16 pm »

You just do the same here.

Are you wanting them on a different subnet or on the same subnet?
Logged
jimb
Hero Member
*****
Posts: 804


^^^ Warped picture


View Profile
« Reply #2 on: January 21, 2011, 03:50:52 pm »

Just slap as many IPv6 addresses on the eth0 interface as you need.  You can also use them on bridged guest OSes virtual nics if it's a VM host.

I think in the interfaces file you just use multiple address statements.

Manually, you'd use "ip addr add ..."
Logged

glimberg
Newbie
*
Posts: 3


View Profile
« Reply #3 on: January 21, 2011, 05:00:07 pm »

When adding the following to my /etc/network/interfaces:

Code:
auto eth0:0
iface eth0:0 inet6 static
        address 2001:470:1f05:xxxx::1
        netmask 64

I get the following error when attempting `sudo ifup eth0:0`:

Code:
SIOCSIFFLAGS: Cannot assign requested address
Failed to bring up eth0:0.

Not sure what's going on here.
Logged
jimb
Hero Member
*****
Posts: 804


^^^ Warped picture


View Profile
« Reply #4 on: January 21, 2011, 05:15:17 pm »

Don't use eth0:0.  Just use eth0.  The : subinterface thing is "obsolete".

I believe you can just put multiple address directives under each interface.
Logged

glimberg
Newbie
*
Posts: 3


View Profile
« Reply #5 on: January 21, 2011, 09:12:42 pm »

Apparently you cannot put multiple address directives under each interface.. What I had to do to get this working was the following:

Code:
auto eth0:0
iface eth0:0 inet static
address 192.168.5.22 # <-- fake IP address
netmask 255.255.255.0

iface eth0:0 inet6 static
        address 2001:470:1f05:xxxx::2/64
netmask 64

auto eth0:1
iface eth0:1 inet static
        address 192.168.44.2 # <- another fake IP address
netmask 255.255.255.0

iface eth0:1 inet6 static
        address 2001:470:1f05:xxxx::3/64
netmask 64

All of the ipv6 addresses show up under eth0 when running ifconfig now, even though they were assigned to the virtual interface in /etc/network/interfaces

A bit strange, but it works.
Logged
centove
Newbie
*
Posts: 1


View Profile
« Reply #6 on: January 27, 2011, 08:27:30 am »

I do the following:


Code:
auto eth0
iface eth0 inet static
    address <mumble>
    ....
    up /sbin/ip -6 addr add <mumble>/64 dev eth0
    <and so on>

auto eth0:1
iface eth0:1 inet static
    address <mumble>
    up /sbin/ip -6 addr add <mumble>/64 dev eth0:1

auto he-ipv6
iface he-ipv6 inet6 v4tunnel
    endpoint <mumble>
    local <mumble>
    address <mumble>
    netmask 64
    up /sbin/ip -6 route add default dev he-ipv6
    down /sbin/ip -6 route del default dev he-ipv6



Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!