1. Home
  2. Tips and Tricks
  3. Binding Multiple IPv6 Addresses Automatically

Binding Multiple IPv6 Addresses Automatically

Most servers get a IPv6 range (/64) by default. That means that you have millions of IP addresses to use for whatever you feel like. However, assigning them manually to your interfaces can be a bit painful.

Assigning all /64 IPv6 addresses with 1 command

However, there is a trick with the ip route command that allows you to link your /64 to the local interface and cover all of them automatically:

ip route add local IPV6RANGE::/64 dev lo

You just have to substitute IPV6RANGE for the address you got. Let’s say you received a 2a0d:xxxx:yyyy:zzzz::/64, that’s how you would do it:

ip route add local 2a0d:xxxx:yyyy:zzzz::/64 dev lo

And than you are able to ping all addresses within that range

PING 2a0d:xxxx:yyyy:zzzz:ffff:ffff:ffff:ffff(2a0d:xxxx:yyyy:zzzz:ffff:ffff:ffff:ffff) 56 data bytes 64 bytes from 2a0d:xxxx:yyyy:zzzz:ffff:ffff:ffff:ffff: icmp_seq=1 ttl=64 time=0.076 ms ..

That saves you a lot of time and gives you millions of addresses to use.

Updated on December 8, 2023

Was this article helpful?

Related Articles

Need Support?
Can’t find the answer you’re looking for? Don’t worry we’re here to help!
Email: support@noc.org

Leave a Comment