I’m trying to setup a dhcp-relay which should relay requests through a L3 MPLS-VPN but can’t get it to work.
It seems like the relay request are sent via the main routing-table (default gw) and not the vrf.
I’ll try to illustrate:
[DHCP server (192.168.88.1)] --vrf1-- [PE1] —MPLS Cloud (main)— [PE2] --vrf1-- [DHCP Client]
I was able to do a workaround with one mangle and one nat rule to make this work.
Make you sure you have a route for the DHCP server in the main table, default route is enough (or else the router will drop the packet) and create a mangle rule kind of like this:
ip firewall mangle add chain=output dst-address=<dhcpserver> protocol=udp dst-port-67 action=mark-routing new-routing-mark=<vrf>
Possible you need a nat rule to make sure the source address is correct for the customers network: