Community discussions

MikroTik App
 
norpan
newbie
Topic Author
Posts: 37
Joined: Sat Dec 19, 2009 12:40 pm

DHCP-relay in MPLS VRF

Tue Dec 13, 2011 11:53 pm

Hi all!

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]

PE2 has dhcp-relay setup: (ether1=main, ether2=vrf1)
/ip dhcp-relay add delay-threshold=none dhcp-server=192.168.88.1 disabled=no interface=ether2 local-address=192.168.92.2 name=relay1

When I sniff at PE2 on ether1 I see DHCP unicast IP-packet and not a MPLS-encapsulated packet.

Anyone got an idea about this? Limitation?
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7041
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: DHCP-relay in MPLS VRF

Wed Dec 14, 2011 9:36 am

DHCP relay is not VRF aware, so it is not going to work.
 
norpan
newbie
Topic Author
Posts: 37
Joined: Sat Dec 19, 2009 12:40 pm

Re: DHCP-relay in MPLS VRF

Wed Dec 14, 2011 8:40 pm

Ok, thanks.
 
norpan
newbie
Topic Author
Posts: 37
Joined: Sat Dec 19, 2009 12:40 pm

Re: DHCP-relay in MPLS VRF

Mon Dec 19, 2011 12:56 pm

After some time considering this, any plans to implement?
Would be nice to have. :)
 
andersm
just joined
Posts: 10
Joined: Fri Sep 14, 2012 3:52 pm

Re: DHCP-relay in MPLS VRF

Fri Mar 07, 2014 2:19 am

Hey,

I have come across the same dilemma...

Trying to relay DHCP over a routed MPLS network, from a windows DHCP server, to clients on VRF's across a WAN.

Is there any fix to this? Seems to work fine on Cisco hardware, just stumped on the Mikrotiks.

Cheers,

Andy
 
norpan
newbie
Topic Author
Posts: 37
Joined: Sat Dec 19, 2009 12:40 pm

Re: DHCP-relay in MPLS VRF

Sat Mar 08, 2014 6:13 pm

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:
 
ip firewall nat add chain=srcnat dst-address=<dhcpserver> protocol=udp dst-port=67 routing-mark=<vrf> action=src-nat to-addresses=<relayip>


relayip is the address you have assigned on the interface facing the customers network.

Hope this helps.
 
andersm
just joined
Posts: 10
Joined: Fri Sep 14, 2012 3:52 pm

Re: DHCP-relay in MPLS VRF

Tue Mar 11, 2014 8:26 am

Thanks heaps norpan,
worked perfectly! Didn't need the nat rule it seemed.

Now I can get things rolling! :D

Who is online

Users browsing this forum: onnyloh and 17 guests