|
| 1 | +--- |
| 2 | +title: Prefix Delegation |
| 3 | +sidebar_label: Prefix Delegation |
| 4 | +--- |
| 5 | + |
| 6 | +In IPv4, clients are typically assigned private addresses on the LAN, and the router performs NAT when sending traffic out to the broader WAN network. |
| 7 | + |
| 8 | +In IPv6, clients use globally addressable addresses. The work of assigning addresses from a prefix is delegated to the router. For detailed information about how prefix delegation works, see [RFC3633](https://www.rfc-editor.org/rfc/rfc3633). At a high level; |
| 9 | + |
| 10 | +"A delegating router is provided IPv6 prefixes for delegation to requesting routers. A requesting router requests prefixes from the delegating router. The delegating router chooses prefixes, and sends them to the requesting router. The requesting router might assign a subnet from a delegated prefix to one of its interfaces, and begin sending router advertisements for the prefix on that link." |
| 11 | + |
| 12 | +Once the router has the prefix to use, different modes can be used to assign addresses to the clients. See https://www.rfc-editor.org/rfc/rfc8415 for details. |
| 13 | + |
| 14 | +### SSR Support for Prefix Delegation |
| 15 | + |
| 16 | +The SSR acts as a DHCPv6 client on the WAN-side. When the router advertisement is received, the SSR uses the `M` and `O` flags in the advertisement to determine the WAN-side address, as well as the operating mode of the interface; `SLAAC`, `stateful DHCPv6`, and `stateless DHCPv6`. Alternatively, a static address could be set. |
| 17 | + |
| 18 | +The corresponding LAN-side receives the delegated prefix and uses it in router-advertisements to the clients. DHCPv6 server is not supported for the LAN; only SLAAC mode is used. |
| 19 | + |
| 20 | +### WAN Configuration |
| 21 | + |
| 22 | +1. Set the WAN interface to use DHCPv6. Alternatively, a static address can be configured. |
| 23 | +2. Enable prefix-delegation mode: `prefix-delegation true`. |
| 24 | +3. Specify the group (`pd-group-1`) to associate this WAN with the corresponding LAN: `prefix-delegation-group pd-group-1` |
| 25 | + |
| 26 | +``` |
| 27 | +device-interface wan-device |
| 28 | + network-interface wan |
| 29 | + dhcp v6 |
| 30 | + prefix-delegation true |
| 31 | + prefix-delegation-group pd-group-1 |
| 32 | +``` |
| 33 | + |
| 34 | +Additional authorization configuration can be provided. |
| 35 | + |
| 36 | +### LAN Configuration |
| 37 | + |
| 38 | +Use the following information to set the LAN configuration. |
| 39 | + |
| 40 | +1. Set the interface to use `dhcp v6-pd`. |
| 41 | +2. Specify the group corresponding to the WAN: `prefix-delegation-group pd-group-1`. |
| 42 | +3. Set the subnet-id to send to the WAN router. This identifies the correct prefix to delegate: `prefix-delegation-subnet-id 1`. |
| 43 | +4. Enable router-advertisement: `router-advertisement true`. This sends the prefix to the clients on the LAN side. Multiple LAN interfaces can have the same group, but must have unique subnet-ids. Only 8 bit IDs are used - 56 bits of the prefix are used for delegation. |
| 44 | + |
| 45 | +``` |
| 46 | +device-interface lan-device |
| 47 | + network-interface lan |
| 48 | + dhcp v6-pd |
| 49 | + prefix-delegation-group pd-group-1 |
| 50 | + prefix-delegation-subnet-id 1 |
| 51 | + router-advertisement true |
| 52 | +``` |
| 53 | + |
| 54 | +#### Debugging Commands |
| 55 | + |
| 56 | +The following show commands can be used for debugging configuration issues. |
| 57 | + |
| 58 | +- `show network-interface`: Display network-interface data for network-interface. |
| 59 | + |
| 60 | +``` |
| 61 | +admin@test1.Fabric128# show network-interface |
| 62 | +Tue 2026-02-24 21:51:34 UTC |
| 63 | +✔ Retrieving network interfaces... |
| 64 | +
|
| 65 | +=========== ======= ========== =========== ============ ====== ============= ========== ========== ======================================== =================== ========== ======== ====== |
| 66 | + Router Node Device Name Forwarding VLAN Device Type Type DHCP Address Gateway Hostname Status GIID |
| 67 | +=========== ======= ========== =========== ============ ====== ============= ========== ========== ======================================== =================== ========== ======== ====== |
| 68 | + Fabric128 test1 wan-dev wan-intf true 0 ethernet external disabled 2001:db1:1:1::102/64 2001:db1:1:1::101 -- up 1 |
| 69 | + Fabric128 test1 lan-dev1 lan-intf1 true 0 ethernet external v6-pd 2001:db1:1:2002:f816:3eff:fed4:9fe2/64 -- -- up 2 |
| 70 | + Fabric128 test1 lan-dev2 lan-intf2 true 0 ethernet external v6-pd 2001:db1:1:2003:f816:3eff:fe25:53ea/64 -- -- up 3 |
| 71 | +``` |
| 72 | + |
| 73 | +- `show dhcp mappings`: Show each DHCP mapping from an interface to mapping/IP family/config types. |
| 74 | + |
| 75 | +``` |
| 76 | +admin@test1.Fabric128# show dhcp mappings |
| 77 | +Tue 2026-02-24 21:54:27 UTC |
| 78 | +
|
| 79 | +================= ================== ====== ============== ================ ========================== |
| 80 | + Src Device Port Dest Device Port VLAN Mapping Type IP Family Type Config Type |
| 81 | +================= ================== ====== ============== ================ ========================== |
| 82 | + 1 0 0 originating ipv6 client |
| 83 | + 2 0 0 originating ipv6 prefix_delegation_server |
| 84 | + 3 0 0 originating ipv6 prefix_delegation_server |
| 85 | +``` |
| 86 | + |
| 87 | +- `show dhcp prefix-delegation`: Show the prefix learned for prefix-delegation. |
| 88 | + |
| 89 | +``` |
| 90 | +admin@gouda.novigrad# show dhcp prefix-delegation |
| 91 | +Wed 2020-04-22 14:47:05 UTC |
| 92 | +
|
| 93 | +========== ============ ================ ========== ============== =============== |
| 94 | + Router Group Name Interface Name Status Prefix Prefix Length |
| 95 | +========== ============ ================ ========== ============== =============== |
| 96 | + novigrad pd-group-1 t128tuntap1 resolved 2001:db2:1:: 56 |
| 97 | +
|
| 98 | +Completed in 0.08 seconds |
| 99 | +``` |
| 100 | + |
| 101 | +- `show dhcp v6`: Display dhcp lease info for network-interfaces. |
| 102 | + |
| 103 | +``` |
| 104 | +admin@gouda.novigrad# show dhcp v6 |
| 105 | +Wed 2020-04-22 14:47:05 UTC |
| 106 | +
|
| 107 | +========== ======= ================== =================== ============ ================================= =============== ================================= |
| 108 | + Router Node Device Interface Network Interface Dhcp State Address Prefix Length Gateway |
| 109 | +========== ======= ================== =================== ============ ================================= =============== ================================= |
| 110 | + novigrad gouda wan wan-interface Resolved 2001:db8:85a3:0:0:8a2e:370:7334 96 2001:db8:85a3:0:0:8a2e:370:7330 |
| 111 | +
|
| 112 | +Completed in 0.20 seconds |
| 113 | +``` |
0 commit comments