Community discussions

MikroTik App
 
baotuan
just joined
Topic Author
Posts: 4
Joined: Fri May 08, 2020 4:26 pm

How to config 2 dhcp clients WAN to 2 LAN

Fri May 15, 2020 4:53 pm

I have hap ac2. I'd like to config wan1 on ether1 to LAN1 on ether3 and WAN2 on ether2 to LAN2 on ether4. WAN 1 and WAN2 are dhcp clients with same gateway 192.168.1.1. LAN1 is dhcp server 192.168.2.1 and LAN2 is dhcp server 192.168.3.1
 
sindy
Forum Guru
Forum Guru
Posts: 10206
Joined: Mon Dec 04, 2017 9:19 pm

Re: How to config 2 dhcp clients WAN to 2 LAN

Fri May 15, 2020 10:33 pm

If you really want the two (WAN+LAN) groups to be totally separate, the simplest way is to use VRF (Virtual Routing and Forwarding) to use separate routing spaces.

/ip route vrf
add interfaces=ether2,ether4 routing-mark=vrf-e2-e4


This way, even though the two gateways assigned via DHCP will have the same IP address, packets coming in via ether4 will be routed out via ether2 and packets coming in via ether3 will be routed out via ether1.
 
baotuan
just joined
Topic Author
Posts: 4
Joined: Fri May 08, 2020 4:26 pm

Re: How to config 2 dhcp clients WAN to 2 LAN

Sat May 16, 2020 7:31 pm

Thank you very much

Who is online

Users browsing this forum: gigabyte091, GoogleOther [Bot], hazem and 204 guests