Howdy, Stranger!

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


A Little IPv6 Help - Ubuntu
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.

A Little IPv6 Help - Ubuntu

rooterrooter Member
edited January 2017 in Help

I recently decided to start the process of making my sites IPv6 compatible. I got my provider to assign me a /64 but I am having trouble with my /etc/network/interfaces file on ubuntu 14.04.5 and I was hoping someone could help me out?

The info I got from my provider was (edited the first 4 for security)

XXXX:f7a0:2:1::/64 has been assigned for your IPv6 block

XXXX:f7a0:2:1::1 is configured as the gateway

So I edited the interfaces file and added:

iface p1p1 inet6 static address XXXX:f7a0:2:1:: netmask 64 gateway XXXX:f7a0:2:1::1

I restarted the interface with ifup p1p1 && ifdown p1p1 and I can ping6 XXXX:f7a0:2:1::1 but no other addresses (such as XXXX:f7a0:2:1::2, XXXX:f7a0:2:1::3, etc).

Any suggestions you can provide would be most helpful as I feel like I must be missing something obvious?!

Thanks!

Comments

  • You assigned the address ending with 0 (probably the subnet name). You need to assign specific IP addresses. You can't just assign an entire subnet (same as ipv4!)

    Thanked by 1WSS
  • Ah okay, thanks for that.

    So what is the most efficient way to assign an entire /64? I can't imagine doing a separate entry for each!

  • @rooter said:
    Ah okay, thanks for that.

    So what is the most efficient way to assign an entire /64? I can't imagine doing a separate entry for each!

    You do know how many ips a /64 is right ?

    Thanked by 1WSS
  • @piohost said:

    @rooter said:
    Ah okay, thanks for that.

    So what is the most efficient way to assign an entire /64? I can't imagine doing a separate entry for each!

    You do know how many ips a /64 is right ?

    That's why I was asking :-)

    So I am taking it that is a no then on adding them as a range and I have to do them individually?

  • WSSWSS Member

    @rooter said:

    @piohost said:

    @rooter said:
    Ah okay, thanks for that.

    So what is the most efficient way to assign an entire /64? I can't imagine doing a separate entry for each!

    You do know how many ips a /64 is right ?

    That's why I was asking :-)

    So I am taking it that is a no then on adding them as a range and I have to do them individually?

    Why would you even attempt to assign a full / 64 to a single NIC?

  • @WSS said:

    @rooter said:

    @piohost said:

    @rooter said:
    Ah okay, thanks for that.

    So what is the most efficient way to assign an entire /64? I can't imagine doing a separate entry for each!

    You do know how many ips a /64 is right ?

    That's why I was asking :-)

    So I am taking it that is a no then on adding them as a range and I have to do them individually?

    Why would you even attempt to assign a full / 64 to a single NIC?

    Its not so much that I wanted to use all the addresses (obviously) but that I was hoping for an easier shortcut to assigning multiple ones.

    Thanks for the help :-)

  • WSSWSS Member
    edited January 2017

    bc, eval, printf

  • TsuyoTsuyo Member
    edited January 2017

    @rooter said:
    I recently decided to start the process of making my sites IPv6 compatible. I got my provider to assign me a /64 but I am having trouble with my /etc/network/interfaces file on ubuntu 14.04.5 and I was hoping someone could help me out?

    The info I got from my provider was (edited the first 4 for security)

    XXXX:f7a0:2:1::/64 has been assigned for your IPv6 block

    XXXX:f7a0:2:1::1 is configured as the gateway

    So I edited the interfaces file and added:

    iface p1p1 inet6 static address XXXX:f7a0:2:1:: netmask 64 gateway XXXX:f7a0:2:1::1

    I restarted the interface with ifup p1p1 && ifdown p1p1 and I can ping6 XXXX:f7a0:2:1::1 but no other addresses (such as XXXX:f7a0:2:1::2, XXXX:f7a0:2:1::3, etc).

    Any suggestions you can provide would be most helpful as I feel like I must be missing something obvious?!

    Thanks!

    A lot of providers I've used do tend to assign these kind of /64 subnets where you don't need to take any further action apart from setting it up in exactly the same was as you've already done. And I can vouch for that since I've got a native dual stack connection at home that I used to test it. Then you'd end up with the IPv6 address XXXX:f7a0:2:1:: (which is the shortened version of XXXX:f7a0:0002:0001:0000:0000:0000:0000) being reachable from the big bad internet. In this case you should only be able to ping XXXX:f7a0:2:1:: and the gateway at XXXX:f7a0:2:1::1. I personally don't have any use cases for which I'd be using the rest of the /64 subnet, which by @piohost's standards would be considered a waste of ((2^64) -2) IPv6 addresses. The fact remains that a /64 is the smallest IPv6 subnet possible, with the other 64 bits being filled when people have implemented SLAAC/DHCPv6 on a subnet (for example people who are using a VPS for IPv6 tunneling with OpenVPN or Tinc).

    Under normal circumstances you wouldn't have the need to add any other IPv6 addresses (in the same way that you'd only need one IPv4 address). But hey, if you want to assign more IPv6 addresses from within your /64 subnet, you can manually add them this way in /etc/network/interfaces (below your "gateway" line):

    up /sbin/ifconfig p1p1 inet6 add XXXX:f7a0:2:1::2/64 up /sbin/ifconfig p1p1 inet6 add XXXX:f7a0:2:1::3/64 up /sbin/ifconfig p1p1 inet6 add XXXX:f7a0:2:1:dead:beef:dead:beef/64

    Or whatever tickles your fancy.

  • rm_rm_ IPv6 Advocate, Veteran

    It's a bad practice to use the zero IP in a subnet. Some software may have issues with it. It is also the "subnet address" and generally all routers for that subnet will reply if you want to ping it.

    $ ping6 fd39::
    PING fd39::(fd39::) 56 data bytes
    64 bytes from fd39::101: icmp_seq=1 ttl=64 time=0.335 ms
    64 bytes from fd39::101: icmp_seq=2 ttl=64 time=0.393 ms
    64 bytes from fd39::101: icmp_seq=3 ttl=64 time=0.389 ms
    64 bytes from fd39::101: icmp_seq=4 ttl=64 time=0.367 ms
    ^C
    --- fd39:: ping statistics ---
    4 packets transmitted, 4 received, 0% packet loss, time 2997ms
    rtt min/avg/max/mdev = 0.335/0.371/0.393/0.023 ms

    So if your gateway ends with ...:1, set your own IPs to start from ...:2 and so on.

Sign In or Register to comment.