0

I have a subnet like 2001:face:feed:beef::/64. I want to assign all of them to my server, without manually assign every address like 2001:face:feed:beef::[123456789abcdef]...

In ipv4, we may use DNAT to do this, but it doesn't have NAT concept in ipv6, so I want to know if this is workable and does it have some workarounds.

3
  • Am I understanding this correctly: You want your server to have 2^64 adresses? Why would you want that? Jun 30, 2012 at 3:04
  • Yup, that's it. I don't want to manually specify many ip addresses.
    – Tydus
    Jun 30, 2012 at 3:14
  • Still there is th question. Why?? Why does one host need 18,446,744,073,709,551,616 IP-addresses? Jul 5, 2012 at 12:23

2 Answers 2

7

You can't (with a run-of-the-mill IP stack). IP addressing isn't intended to work like that. You almost certainly won't even be able to assign anywhere near that many addresses to an interface (using a script or similar); there'll be hard-coded limits in the data structures somewhere to stop that sort of thing from happening.

0

Answered in 209203 and 236626.

In short, you need three things:

  1. A static route to your machine (it won't answer NDP)
  2. An internal route so the machine knows it should handle the traffic
  3. If you want to be able to listen on any of these addresses, you must also set sysctl net.ipv6.ip_nonlocal_bind=1 (Linux kernel >= 4.3)

Not the answer you're looking for? Browse other questions tagged .