LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-31-2011, 01:11 PM   #1
steve51184
Member
 
Registered: Dec 2006
Posts: 381

Rep: Reputation: 30
how do i add IPv6 to my IPv4 server?


hi all i have a ubunru server with 4 IPv4 addresses and i have just been given an IPv6 address but i'm a little confused on how to add it

this is my current /etc/network/interfaces file:

(addreses are remote NOT local and have been changed)

Code:
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
        address my.ip.addy.1
        netmask 255.255.255.0
        gateway my.gate.way.ip

auto eth0:0
iface eth0:0 inet static
        address my.ip.addy.2
        netmask 255.255.255.0
        gateway my.gate.way.ip

auto eth0:1
iface eth0:1 inet static
        address my.ip.addy.3
        netmask 255.255.255.0
        gateway my.gate.way.ip

auto eth0:2
iface eth0:2 inet static
        address my.ip.addy.4
        netmask 255.255.255.0
        gateway my.gate.way.ip
now i know it needs to be added something like this:

Code:
iface eth0 inet6 static
pre-up modprobe ipv6
address 2607:f0d0:2001:000a:0000:0000:0000:0010
netmask 64
gateway 2607:f0d0:2001:000a:0000:0000:0000:0001
but do i use 'iface eth0' or do i bind it to something like 'iface eth0:3' like how i did the other 3 IPv4 addresses?

also do i add it to it's own 'auto eth0' section or simply under the first 'auto eth0' section?

/confused

thanks
 
Old 02-01-2011, 09:45 PM   #2
steve51184
Member
 
Registered: Dec 2006
Posts: 381

Original Poster
Rep: Reputation: 30
bump?
 
Old 02-04-2011, 04:21 PM   #3
steve51184
Member
 
Registered: Dec 2006
Posts: 381

Original Poster
Rep: Reputation: 30
please guys?
 
Old 02-04-2011, 06:15 PM   #4
postMeridian
LQ Newbie
 
Registered: Jan 2011
Location: basement
Distribution: debian,arch
Posts: 7

Rep: Reputation: 0
I would suggest a quick test via terminal:
add iface and route
Code:
ifconfig eth0 inet6 add 2607:f0d0:2001:000a::::0010/64
route -A inet6 add 2607:f0d0:2001:000a::::0010/64 gw 2607:f0d0:2001:000a::::0001
then test your connection with some evil services:
Code:
ping6 2620:0:1cfe:face:b00c::3
not working?
Code:
ifconfig eth0 inet6 del 2607:f0d0:2001:000a::::0010/64
route -A inet6 del 2607:f0d0:2001:000a::::0010/64 gw 2607:f0d0:2001:000a::::0001
Hope it works! Cheers

Last edited by postMeridian; 02-04-2011 at 06:27 PM.
 
Old 02-04-2011, 06:22 PM   #5
steve51184
Member
 
Registered: Dec 2006
Posts: 381

Original Poster
Rep: Reputation: 30
can't it just be done by adding it to '/etc/network/interfaces' ?
 
Old 02-04-2011, 06:32 PM   #6
postMeridian
LQ Newbie
 
Registered: Jan 2011
Location: basement
Distribution: debian,arch
Posts: 7

Rep: Reputation: 0
Well, I think we can.
We'll add a secondary interface to the existing eth0 dev (which will end up having both ipv4 and ipv6 addresses)
Code:
auto eth0
iface eth0 inet static
        address my.ip.addy.1
        netmask 255.255.255.0
        gateway my.gate.way.ip
        pre-up modprobe ipv6
        post-up /sbin/ifconfig eth0 inet6 add 2607:f0d0:2001:000a::::0010/64
	post-up /sbin/route -A inet6 add 2607:f0d0:2001:000a::::0010/64 gw 2607:f0d0:2001:000a::::0001
	pre-down /sbin/ifconfig eth0 inet6 del 2607:f0d0:2001:000a::::0010/64
	pre-down /sbin/route -A inet6 del 2607:f0d0:2001:000a::::0010/64 gw 2607:f0d0:2001:000a::::0001
Give it a try..
 
Old 02-04-2011, 06:40 PM   #7
steve51184
Member
 
Registered: Dec 2006
Posts: 381

Original Poster
Rep: Reputation: 30
thing is this is a remote server so i can't really be 'testing' without being 100% sure
 
Old 02-04-2011, 06:56 PM   #8
postMeridian
LQ Newbie
 
Registered: Jan 2011
Location: basement
Distribution: debian,arch
Posts: 7

Rep: Reputation: 0
Unfortunately without doing some messy testing the 100% certainty about something is hard to achieve..
I first posted terminal commands (that worked at least for me, not a 100% warranty anyway..) in order to avoid issues with config files or hazards by restarting network interfaces... the rest is up to you, I couldn't suggest any better ways.
Though, if you're not sure or working on a mission critical server, better wait for some more replies.
 
Old 02-17-2011, 04:08 PM   #9
Lekensteyn
LQ Newbie
 
Registered: Feb 2011
Distribution: Kubuntu
Posts: 4

Rep: Reputation: 0
Remember that you can you use condensed IPv6 addresses. The following configuration works (Debian 6, worked in Debian 5 too), append it to your /etc/network/interfaces file:
Code:
iface eth0 inet6 static
address 2607:f0d0:2001:a::10
netmask 64
gateway 2607:f0d0:2001:a::1
`auto eth0` should already be present in /etc/network/interfaces.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
IPv4 to IPv6 Winanjaya Linux - Networking 1 06-14-2010 07:45 AM
IPv6 over IPv4 lo-kəy Linux - Networking 1 05-04-2009 01:45 AM
ipv6 and ipv4 Ammad Linux - Networking 1 12-02-2006 03:44 PM
Need to get IPV4 instead of IPV6 on a SuSe Enterprise Server ikw38 Linux - Networking 1 04-30-2006 03:41 PM
ipv4 to ipv6 anant_wsu Linux - Networking 1 01-03-2006 04:28 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 05:47 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration