Community discussions

MikroTik App
 
electravis
Member Candidate
Member Candidate
Topic Author
Posts: 274
Joined: Tue Jan 26, 2010 12:06 am

Send DHCP request over VPN

Thu Oct 31, 2013 5:11 pm

I am trying to figure out how to setup and send DHCP requests over a VPN connection and what VPN connection to use. All i want to do is have my remote office mikrotik router vpn to my main office and then any computers that plug into my remote office router pull an IP address from my main office router.
 
abyss
Frequent Visitor
Frequent Visitor
Posts: 82
Joined: Wed Sep 21, 2005 10:51 am

Re: Send DHCP request over VPN

Thu Oct 31, 2013 5:26 pm

Hi, you need to use proxy-arp on your LAN interface. Create a pool of addresses in the range of your server network but out of your DHCP scope and give thoses addresses with the ppp profile. In the profile, the local address will be your LAN VPN router adress...

Best Regards,
Julien
 
i4jordan
Frequent Visitor
Frequent Visitor
Posts: 77
Joined: Mon Sep 02, 2013 1:42 am

Re: Send DHCP request over VPN

Thu Oct 31, 2013 9:46 pm

If you have a DHCP server on the 'other' side. You can simple use DHCP relay for relaying DHCP request from your side of the to the IP of the DHCP server.

Please note that you need to have 2 IP pools on that DHCP server!
one pool for the 'other' side and one for your side of the VPN. This because you need to have different subnets on both sides of the VPN.

For example:
Side A is where the DHCP server is.
Side A subnet 192.168.100.0/24
Side A DHCP server is on 192.168.100.10 (just an example)
Set two netwerks/IP pools on this DHCP server! 192.168.100.0/24 for local requests, and 192.168.200.0/24 for side B remote requests

Side B is where you want to have relayed DHCP requests.
Side B subnet 192.168.200.0/24

After establishing a VPN tunnel between side A and B you need to ad a DHCP relay on side B on the LAN interface.
In this relay server config you simple put IP 192.168.100.10 in the DHCP server option.

I hope this helps you with your configuration.
Please feel free to ask any additional questions on this subject.
 
electravis
Member Candidate
Member Candidate
Topic Author
Posts: 274
Joined: Tue Jan 26, 2010 12:06 am

Re: Send DHCP request over VPN

Wed Nov 06, 2013 11:33 pm

Thanks for the info this will be very helpful but what if I want to have the remote side B pull dhcp from side A and see computers on side A IP range 100.0?

Can I set up two pools 192.168.100.0 - 126 and 192.168.100.127-255?


Also under the relay what would I put for the interface the tunnel?

Thanks
Elec
 
i4jordan
Frequent Visitor
Frequent Visitor
Posts: 77
Joined: Mon Sep 02, 2013 1:42 am

Re: Send DHCP request over VPN

Tue Nov 12, 2013 5:01 pm

'Seeing' computers on side A from side B has nothing to do with your split subnet.
But everything with DNS setup and of course if the subnets are defined well on the VPN tunnel.

In DHCP Relay option you put the interface which needs to be monitored for DHCP requests, mostly this is the interface which is connected to your LAN.
And you fill in the IP of server/device which will fullfill and replay on those DHCP requests.
The IP of the DHCP server does not need to be connected to any of the interface. If it is reachable through IP routing it is OK.
 
Feklar
Forum Guru
Forum Guru
Posts: 1724
Joined: Tue Dec 01, 2009 11:46 pm

Re: Send DHCP request over VPN

Tue Nov 12, 2013 6:02 pm

DHCP can be sent over a VPN tunnel over an Ethernet Like interface. What this means is that you can build whatever kind of VPN tunnel that you desire, but you will then need to build an EoIP tunnel on top of that. You then bridge that EoIP tunnel into the rest of the LAN.
 
i4jordan
Frequent Visitor
Frequent Visitor
Posts: 77
Joined: Mon Sep 02, 2013 1:42 am

Re: Send DHCP request over VPN

Tue Nov 12, 2013 11:54 pm

@feklar

Yes indeed with an EoIP tunnel you would actually get a Layer2 connected tunnel.
And then also DHCP request would broadcast through this L@ tunnel and get a reply from the DHCP server.

Who is online

Users browsing this forum: Bing [Bot], voytecky and 107 guests