You are not logged in.

#1 2011-01-09 02:56:29

Wiz
Member
Registered: 2008-06-04
Posts: 12

Static IPv6

I've got a small server in a non dhcp or anything environment (datacenter by ovh).
Switching from debian to archlinux have been pretty easy, but I still need to configure it's ipv6 address.

I tried locally to set two eth0 entries in rc.conf, like that :
eth0="eth0 192.168.1.6 netmask 255.255.255.0 broadcast 192.168.1.1"
eth0="eth0 add 2a01:e35:2e4f:b440:221:5cff:fe5a:1337/64"
But when I restart the network service I get a fail and the message : "SIOCSIFADDR: File exists" so it's a non go.
What's the best way to configure both ipv4 and ipv6 as static addresses ?
Google tells me that creating another daemon which just adds / removes the ipv6 address would work, but I'm not sure if this solution is the best one.
Doesn't archlinux provides something less dirty ?

Offline

#2 2011-01-09 06:31:40

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: Static IPv6

just name the second variable eth0v6 or something, and add that to the interfaces line.

eth0v6="eth0 add 2a01:e35:2e4f:b440:221:5cff:fe5a:1337/64"
INTERFACES =( eth0 eth0v6 )

or something like that

EDIT: not sure your ipv6 address add syntax is ifconfig supported or not. I think arch uses ifconfig instead of iproute2 for its toolchain....buutt..not sure since I am not looking at an arch install right now.

Last edited by cactus (2011-01-09 06:34:55)


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#3 2011-01-11 20:46:35

ghen
Member
From: Belgium
Registered: 2010-08-31
Posts: 121

Re: Static IPv6

I have:

eth0_v6="eth0 inet6 add 2001:6f8:346::8/64"
INTERFACES=(eth0 eth0_v6)

Have a look at /etc/rc.d/network (ifup function).  It runs ifconfig for each item in INTERFACES.
When stopping the network it may warn that "eth0_v6" is not a valid interface (ifconfig <interface> down), but it's harmless.

For the gateway:

gateway6="default gw 2001:6f8:346::1"
ROUTES=(gateway gateway6)

Here it will parse the address and notice it's IPv6 (rtup function), and use "route -A inet add" appropriatly.

Offline

#4 2011-01-13 19:38:24

Wiz
Member
Registered: 2008-06-04
Posts: 12

Re: Static IPv6

That's clean enough to be fine, thank you very much !

Offline

Board footer

Powered by FluxBB