Hurricane Electric's IPv6 Tunnel Broker Forums

General IPv6 Topics => IPv6 on Linux & BSD & Mac => Topic started by: bombcar on August 30, 2011, 07:26:35 AM

Title: Centos - add additional IPv6 address?
Post by: bombcar on August 30, 2011, 07:26:35 AM
I have everything working fine, my Centos 5 box gets an advertised IPv6 prefix and route, and everything is fine.

However, I want additional addresses. I can add them manually via:

Code: [Select]
ip -6 addr add 2001:xxx:xxx:5::2/64 dev eth0
after boot, but I want it to do it automatically.

I tried following this (http://www.cyberciti.biz/faq/redhat-centos-rhel-fedora-linux-add-multiple-ip-samenic/) but it didn't work. I don't want to manually assign everything (I want the automatic configuration to still happen), but I do want to add the extra address. Is my only hope to stick the ip command into /etc/rc.local?
Title: Re: Centos - add additional IPv6 address?
Post by: cholzhauer on August 30, 2011, 07:28:12 AM
Quote
Is my only hope to stick the ip command into /etc/rc.local?

That's what I ended up doing on a BSD system (Yeah, I know you're on CentOS)  It's worked well for me and I haven't had any problems
Title: Re: Centos - add additional IPv6 address?
Post by: kriteknetworks on August 31, 2011, 08:18:48 AM

That's what I ended up doing on a BSD system (Yeah, I know you're on CentOS)  It's worked well for me and I haven't had any problems

You couldn't add them to rc.conf?
Title: Re: Centos - add additional IPv6 address?
Post by: cholzhauer on August 31, 2011, 08:24:49 AM
I probably could have, but I was already using rc.local for routing commands, so I just dumped them all in there
Title: Re: Centos - add additional IPv6 address?
Post by: cconn on August 31, 2011, 02:23:54 PM
you need to edit /etc/sysconfig/network-scripts/ifcfg-eth0 (or whatever your interface is)

and use the IPV6ADDR_SECONDARIES

I just tested mine and it works (Centos6 and Centos 5)
Title: Re: Centos - add additional IPv6 address?
Post by: bombcar on August 31, 2011, 02:24:48 PM
I did that and it didn't come up. I'll try again.