Howdy, Stranger!

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


How to Assign IPv6 to iwstack?
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.

How to Assign IPv6 to iwstack?

GunterGunter Member
edited June 2014 in Help

Admittedly, I have never used IPv6 on a non-OpenVZ container before, hence I don't have much experience on the matter.

I've been trying to assign an IPv6 address to my iwstack container (running Debian 7 Wheezy 32bit) for about an hour now.

I've been using multiple variations of:


iface eth1 inet6 static
netmask 64
gateway 2a00:dcc0:dead:a9fe::1
address 2a00:dcc0:dead:a9ea::2

No matter what, every time I restart the VPS, it is not loaded as an interface as it appears invalid to Debian.

What am I doing wrong?

Comments

  • rm_rm_ IPv6 Advocate, Veteran

    What is "eth1", does your VPS have multiple network interfaces?
    If not, you're supposed to put "eth0" there (and yes, have two "eth0" sections).

  • GunterGunter Member
    edited June 2014

    If not, you're supposed to put "eth0" there (and yes, have two "eth0" sections).

    I put in Eth1 because my first theory was that the two interfaces were conflicting.

    Either way, changing it back to eth0 didn't really change much.

  • rm_rm_ IPv6 Advocate, Veteran

    @darknyan There shouldn't be any eth1 at any point, and don't expect it to appear.
    Just when you have two sections for eth0 (inet and inet6), eth0 will also have IPv6 addresses on it. Did those not appear for you (after a reboot)?

  • GunterGunter Member

    @rm_ said:
    darknyan There shouldn't be any eth1 at any point, and don't expect it to appear.
    Just when you have two sections for eth0 (inet and inet6), eth0 will also have IPv6 addresses on it. Did those not appear for you (after a reboot)?

    I've attempted the process you described for eth0 twice, one time with a service networking restart and a full hardware reboot.

    I'm confuddled at this point.

  • @darknyan, also ensure that your /etc/sysctl.conf doesn't have ipv6 disabled (it shouldn't be by default, but just mentioning it anyway)

  • rm_rm_ IPv6 Advocate, Veteran
    edited June 2014

    @darknyan if you have a VNC-like console access, try

    ifdown eth0
    ifup -v eth0

    Should print if there's any error, why exactly it doesn't add the IPv6.

    upd: also I think I know, your gateway is not in the same /64 as your IP. Try with "netmask 56".

    Thanked by 1Maounique
  • MaouniqueMaounique Host Rep, Veteran

    Hello!

    1. IWStack can have as many eth interfaces as needed;
    2. However, they must be on the correct networks/vlans. This means that you cannot assign IPv6 to private vlans and expect it to work, they must be assigned to the external, public VLANs ("128", "67", if you have an account you know what I am talking about). IPv6 does not work behind the Virtual Router, this would create a lot of security problems since you would need to enable IPv6 firewall to isolate your network, and that is really complicated, however, people which know what they are doing, can pass IPv6 to VMs behind the virtual router.

    So, make sure your eth interface is the correct one. ipconfig will tell you which IPs are assigned where. If you see a public IP and not some 10.1.x.x, then that is the interface which should be given IPv6.
    Other than that, if you use our templates, they do not have ipv6 disabled and it should work as soon as you assign it, however, in the more recent versions (those with larger disks) i prioritized traffic over IPv4 in gai.conf because people were complaining of poor speeds.

  • GunterGunter Member

    @rm_ said:
    darknyan if you have a VNC-like console access, try

    ifdown eth0
    > ifup -v eth0

    Should print if there's any error, why exactly it doesn't add the IPv6.

    upd: also I think I know, your gateway is not in the same /64 as your IP. Try with "netmask 56".

    That's probably it. Prometeus provides it in netmasks of 56, but have /64 blocks to be assigned. I'll try it tomorrow. Its 6am and I need to up for work by 8am.

    I appreciate your help @rm_, you're an awesome guy!

    Thanks too @geekalot, I doubt it but it is worth looking into anyways.

  • GunterGunter Member

    @Maounique said:
    Hello!

    1. IWStack can have as many eth interfaces as needed;
    2. However, they must be on the correct networks/vlans. This means that you cannot assign IPv6 to private vlans and expect it to work, they must be assigned to the external, public VLANs ("128", "67", if you have an account you know what I am talking about). IPv6 does not work behind the Virtual Router, this would create a lot of security problems since you would need to enable IPv6 firewall to isolate your network, and that is really complicated, however, people which know what they are doing, can pass IPv6 to VMs behind the virtual router.

    So, make sure your eth interface is the correct one. ipconfig will tell you which IPs are assigned where. If you see a public IP and not some 10.1.x.x, then that is the interface which should be given IPv6.
    Other than that, if you use our templates, they do not have ipv6 disabled and it should work as soon as you assign it, however, in the more recent versions (those with larger disks) i prioritized traffic over IPv4 in gai.conf because people were complaining of poor speeds.

    I'm not using virtual router, but it may be that I'm using the wrong interface to begin with. I'll check with ifconfig tomorrow.

  • MaouniqueMaounique Host Rep, Veteran
    edited June 2014

    You can check the data about the IPv6 here:
    http://www.prometeus.net/returnipv6.php
    Just put in your IPv4.

  • Hi @darknyan, you can try my config /etc/network/interfaces

    # This file describes the network interfaces available on your system
    # and how to activate them. For more information, see interfaces(5).
    
    # The loopback network interface
    auto lo
    iface lo inet loopback
    
    # The primary network interface
    auto eth0
    iface eth0 inet dhcp
    
    # IPv6 configuration using the new /64 alocation
    iface eth0 inet6 static
        address 2a00:dcc0:dead:a89d::1
        netmask 56
        gateway 2a00:dcc0:dead:a8ff::1
    
        up ip -6 addr add 2a00:dcc0:dead:a89d::2/56 dev eth0
            # add your IPv6 as you want in here
    
    
    
    Thanked by 1Maounique
  • GunterGunter Member

    Thank you to all, @ErawanArifNugroho config worked perfectly, and it was indeed the netmask.

    You guys are awesome. :)

    Thanked by 1ErawanArifNugroho
Sign In or Register to comment.