The set protocols dhcp server pool vrf command assigns a DHCP address pool to a VRF.
set protocols dhcp server pool <pool-name> vrf <vrf-name>
Specifies an address pool name. The value is a string of case-sensitive characters, spaces are not supported.
Specifies a VRF name. The value is a string of case-sensitive characters, spaces are not supported.
In most cases, one address pool allocates IP addresses to clients in only one network segment to prevent IP address conflicts. However, in VRF scenario, different VRFs can use IP addresses on the same network segment. This command can be used to assign different DHCP address pools to different VRFs.
To enable the IP address allocation on the same network segment in two different VRFs, first you have to configure two different pools with the same network segment, and then assign the DHCP address pools to different VRFs separately.
- If a pool is not associated with any specific VRF, by default, it is assigned to the default VRF.
- Each pool can only be assigned to one VRF, but each VRF can be associated to multiple pools.
- DHCP server supports VRF by binding the address pool and the VLAN interface (which is connected to the DHCP client) to the same VRF.
- Assign a DHCP address pool to a VRF.
admin@Xorplus# set protocols dhcp server pool pool2 vrf vrf1 admin@Xorplus# commit