04-25-2020 07:31 PM
Dear experts,
Would you help me understand ( from the packet walk perspective ) how exactly DHCP address assignment would work in VXLAN Distributed IP Anycast Gateway scenario ?
Can host receive IP addresses assigned by DHCP ? How the reply from DHCP server would be routed ?
Thank you !
Solved! Go to Solution.
04-27-2020 01:37 AM
To use it with anycast gateway if the dhcp server is in the same vrf but not on the same SVI (the same VTEP) , you would have to create loopbacks in the vrf for every VTEP that needs to do dhcp relay and add them to the VRF so the DHCP server replies will get back to the relay.
First you need to set the sub option type so the packets can be tagged with the correct VRF so the switch knows which interface to reply to inside the VTEP in case there is duplicate ip addresses or the relay is in another VRF, etc.
Ex
ip dhcp relay
ip dhcp relay information option
ip dhcp relay sub-option type cisco
ip dhcp relay information option vpn
interface Loopback5
vrf member vxlan-1234
ip address 5.5.5.5/32
interface vlan 1234
vrf member vxlan-1234
ip address 1.1.1.1/24
fabric fowarding mode anycast-gateway
ip dhcp relay address 192.168.200.1
ip dhcp relay source—interface loopback5
(and of course the rest of your vxlan configuration)
If it's in another vrf you make loopback in another vrf and use the use-vrf option of the relay address.
Most of the information is contained here:
04-26-2020 07:13 PM
04-27-2020 01:37 AM
To use it with anycast gateway if the dhcp server is in the same vrf but not on the same SVI (the same VTEP) , you would have to create loopbacks in the vrf for every VTEP that needs to do dhcp relay and add them to the VRF so the DHCP server replies will get back to the relay.
First you need to set the sub option type so the packets can be tagged with the correct VRF so the switch knows which interface to reply to inside the VTEP in case there is duplicate ip addresses or the relay is in another VRF, etc.
Ex
ip dhcp relay
ip dhcp relay information option
ip dhcp relay sub-option type cisco
ip dhcp relay information option vpn
interface Loopback5
vrf member vxlan-1234
ip address 5.5.5.5/32
interface vlan 1234
vrf member vxlan-1234
ip address 1.1.1.1/24
fabric fowarding mode anycast-gateway
ip dhcp relay address 192.168.200.1
ip dhcp relay source—interface loopback5
(and of course the rest of your vxlan configuration)
If it's in another vrf you make loopback in another vrf and use the use-vrf option of the relay address.
Most of the information is contained here:
10-03-2024 04:49 PM
I just experience this, but one thing I'm not sure. The only way I was able to get the dhcp relay to work is : for every subnet that needed dhcp I had to allocate two unique ip address (because I have only two cisco ncs540) so if I have 6 subnets that need dhcp relay I would need 12 unique ip addresses configured on loopback interfaces. This looks like to many IPs just to get dhcp to work on frabric network with anycast gateway, but is there better way of doing this?
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide