Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Debian 7 IPv6 configuration
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Debian 7 IPv6 configuration

trexostrexos Member
edited April 2014 in General

hi folks,

I just did my first steps with IPv6, I tried to add my /64 subnet to one of my KVM VPS. I did it with this network interface config:





iface eth0 inet static

address XXX.XX.XX.XXX

netmask 255.255.255.0

gateway XXX.XX.XX.XXX

iface eth0 inet6 static

address 2a01:4f8:61:20e1::2

netmask 64

gateway 2a01:4f8:61:20e1::1






I got this from my provider:

IPv6 /64 prefix: 2a01:4f8:61:20e1::/64

IPv6 gateway: 2a01:4f8:61:20e1::1

I can connect to IPv6 adresses, but is this correct so it uses my whole /64?

Thanks :)

Comments

  • nobody?

  • InfinityInfinity Member, Host Rep
    edited April 2014

    With their setup you cannot use the full /64, a bit of an overstatement, you can't use :1 of it. Your /64 contains 2a01:4f8:61:20e1::1 all the way up to 2a01:4f8:61:20e1:ffff:ffff:ffff:ffff which is some 18 million addresses, if you were to add them all it would be quite slow.

    So with your providers setup they use :1 which is the first address of your /64 as your gateway, there are other setups that providers can use too that don't use it but it's not a massive issue, you still have 18 million and something left.

    You can add other addresses as you go for when you need it for other services.

    TL;DR: There's not really many reasons you would need to assign the full /64 to your VM, just assign as you go. With your setup you can use 2a01:4f8:61:20e1::2 in whatever services you want, but you still have the ability to add more for each service you want from your block.

  • SpiritSpirit Member
    edited April 2014

    What Infinity is saying is that something like this should be correct setup:

    iface eth0 inet6 static
    address 2a01:4f8:61:20e1::2
    netmask 64
    gateway 2a01:4f8:61:20e1::1
       #add additional IPs from your /64 subnet:
       up /sbin/ifconfig eth0 inet6 add 2a01:4f8:61:20e1::3/64
       up /sbin/ifconfig eth0 inet6 add 2a01:4f8:61:20e1::4/64
       up /sbin/ifconfig eth0 inet6 add 2a01:4f8:61:20e1::5/64
       up /sbin/ifconfig eth0 inet6 add 2a01:4f8:61:20e1::ffff/64
       up /sbin/ifconfig eth0 inet6 add 2a01:4f8:61:20e1::1234:ffff/64
       up /sbin/ifconfig eth0 inet6 add 2a01:4f8:61:20e1:1:2:3:4/64
       up /sbin/ifconfig eth0 inet6 add 2a01:4f8:61:20e1... and so on...
    
    Thanked by 1Infinity
  • InfinityInfinity Member, Host Rep

    @Spirit said:
    What Infinity is saying is that something like this should be correct setup:

    Ja, basically. Although if you need to bind to an interface for a certain program you'd probably have to go eth0:0, eth0:1 etc. Binding to an IP should be fine.

  • rm_rm_ IPv6 Advocate, Veteran

    Infinity said: some 18 million addresses

    Not million, quite a bit more.

    Infinity said: have to go eth0:0

    Those are deprecated since like ten years ago, man.

  • I want to try to use my own IPv6 tunnel with OpenVPN, for that I need to have an /64. So I have to do it the way which @Spirit posted? Up to which number do I have to add:

    up /sbin/ifconfig eth0 inet6 add 2a01:4f8:61:20e1::5/64

  • up to...... 18 million?

  • trexos said: Up to which number do I have to add...

    @trexos I don't think OpenVPN IPv6 setup have anything to do with individually added IPs from /64 example above.

  • tomletomle Member, LIR

    A /64 is actually 18,446,744,073,709,551,616 addresses. That's a lot more than 18 million. It's even a lot more than 18 million times 18 million...
    https://ipv6.he.net/certification/primer.php

Sign In or Register to comment.