Assign prefix ID

Started by nerd, July 27, 2025, 11:14:53 PM

Previous topic - Next topic
July 27, 2025, 11:14:53 PM Last Edit: July 28, 2025, 12:37:47 PM by nerd Reason: fix error reported by bimbar
Can someone explain the details regarding getting/offering the correct/a specific prefix from an ISP?

Say I should get the following range:
eg. 2001:db8:ffff:ff00:0000:0000:0000:0000/56   
The prefix in this would be    2001:db8:ffff:ff00::0/56

Now, say i want 2001:db8:ffff:ff01::0/64 for one vlan 1  and 2001:db8:ffff:ff02::0/64 for vlan 2 and 2001:db8:ffff:ff79::0/64 for vlan 79.
How do I go about configuring OPNsense prefix IDs to enable that?

Should the prefix ID for vlan 1: 01, vlan 2: 02 and vlan 79: 79?

Or am I completely wrong here? Or is my ISP not giving me the correct range?





July 27, 2025, 11:32:43 PM #1 Last Edit: July 27, 2025, 11:34:35 PM by meyergru
You are correct, the assigned prefix ID is exactly the remaining 128-64-56 = 8 bits, because an IPv6 has 128 bits, of which the subnet has 64 and you got 56 bits prefix, to which you add 8 bits per VLAN.
Intel N100, 4* I226-V, 2* 82559, 16 GByte, 500 GByte NVME, ZTE F6005

1100 down / 800 up, Bufferbloat A+

Pretty much, but I would like to add the following:

2001:db8:ffff:ff00:0000:0000:0000:0000/56 != 2001:db8:ffff:ff::0/56
2001:db8:ffff:ff00:0000:0000:0000:0000/56 == 2001:db8:ffff:ff00::0/56

uch, you are correct off course. corrected my previous post.

Follow-up Q:
The Optional interface ID is then simply the last 64 bits (60 really) to select the actual interface IP address?

Interface ID 0000000000000001 for 2001:db8:ffff:ff79:0000:0000:0000:0001 interface IP or
Interface ID 0000000000000254 for 2001:db8:ffff:ff79:0000:0000:0000:0254 interface IP or (at most)
Interface ID 7fffffffffffffff for 2001:db8:ffff:ff79:7fff:ffff:ffff:ffff interface IP?  (so actually the last 60 bits)


Yes. You can override the EUI-64 that would be used otherwise.
Intel N100, 4* I226-V, 2* 82559, 16 GByte, 500 GByte NVME, ZTE F6005

1100 down / 800 up, Bufferbloat A+

cool, much appreciated for the answers (and corrections).