Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Mon Mar 05, 2012 8:02 am 
Offline
Senior Member
User avatar

Joined: Sat Jul 01, 2006 7:36 am
Posts: 50
Location: Ghent, Belgium
Hi

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: <LOOPBACK,UP,LOWER_UP> mtu 16436
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qlen 1000
inet6 2a01:7e00::17:5000/64 scope global
valid_lft forever preferred_lft forever
inet6 2a01:7e00::f03c:91ff:fe96:59f7/64 scope global
valid_lft forever preferred_lft forever
inet6 fe80::f03c:91ff:fe96:59f7/64 scope link
valid_lft forever preferred_lft forever



Thanks!
Laurens


Top
   
 Post subject:
PostPosted: Mon Mar 05, 2012 8:44 am 
Offline
Senior Member

Joined: Sat May 03, 2008 4:01 pm
Posts: 567
Website: http://www.mattnordhoff.com/
Personally, my /etc/network/interfaces mostly uses 'up ip' and 'down ip' to manage IPs:

Code:
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.)

_________________
Matt Nordhoff (aka Peng on IRC)


Top
   
 Post subject:
PostPosted: Tue Mar 06, 2012 2:59 pm 
Offline
Senior Member
User avatar

Joined: Sat Jul 01, 2006 7:36 am
Posts: 50
Location: Ghent, Belgium
Thank you :).
I got them running that way..


Top
   
 Post subject:
PostPosted: Wed Mar 07, 2012 5:57 am 
Offline
Senior Member

Joined: Sat May 03, 2008 4:01 pm
Posts: 567
Website: http://www.mattnordhoff.com/
I should have added, the "preferred_lft 0" part is a hack to stop it from being used as the source IP for outgoing connections. If you don't care about that, you can remove it.

_________________
Matt Nordhoff (aka Peng on IRC)


Top
   
 Post subject:
PostPosted: Wed Apr 25, 2012 3:07 am 
Offline
Senior Member
User avatar

Joined: Wed Jan 24, 2007 12:04 am
Posts: 90
Website: http://www.smiffysplace.com
Location: Rural South Australia
mnordhoff wrote:
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!


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group