Community discussions

MikroTik App
 
asgsat
just joined
Topic Author
Posts: 2
Joined: Thu Oct 01, 2020 6:05 am

Multiple WAN and LAN configuration.

Thu Oct 01, 2020 6:14 am

Dear All,
I am new to Mikrotik OS hence putting this silly question here. I tried searching on youtube and other search site but could not get proper answer. I have new CloudControl Router CCR1036-12G-4S and we have three WAN links from ISP. ISP does not provide static IP hence all are dynamic pppoe clients. I want to configure multiple WAN with corresponding LAN, can some one give me example of configuration or guide me the direction on how to achieve this?
 
sindy
Forum Guru
Forum Guru
Posts: 10206
Joined: Mon Dec 04, 2017 9:19 pm

Re: Multiple WAN and LAN configuration.

Fri Oct 02, 2020 12:10 am

Don't look at Youtube, and look for "policy routing" in Mikrotik manual and this forum. This topic has been discussed here tens, maybe hundreds, of times.

Also, do you want three strictly separated groups of LAN ports, each using its dedicated WAN exclusively, or do you want the traffic from all the LAN hosts to be distributed among all three WANs? The optimal setup for each variant is different.
 
asgsat
just joined
Topic Author
Posts: 2
Joined: Thu Oct 01, 2020 6:05 am

Re: Multiple WAN and LAN configuration.

Fri Oct 02, 2020 1:45 pm

Thanks for the response, i need each WAN to dedicated LAN.
 
sindy
Forum Guru
Forum Guru
Posts: 10206
Joined: Mon Dec 04, 2017 9:19 pm

Re: Multiple WAN and LAN configuration.

Fri Oct 02, 2020 2:40 pm

For the application scenario where you want to partition the physical router into several virtual ones, you use the /ip route vrf functionality.

Before starting - I only explain how to partition the router, but the very first thing to do is to set up the firewall, so that the router doesn't get cracked into five minutes after you connect it to internet. The best way is to dedicate one LAN interface only for management and prevent any access to the router itself from anywhere else.

To the topic:
  • add the three /interface pppoe-client, named pppoe-out1 to pppoe-out3 for the purpose of this guide, you can use other names of your preference, disable them
  • run
    /ip route vrf
    add routing-mark=group-1 interfaces=pppoe-out1,ether3,ether4
    add routing-mark=group-2 interfaces=pppoe-out2,ether5,ether6
    add routing-mark=group-3 interfaces=pppoe-out3,ether7,ether8

    - this will create the three partitions; packets which come in through any of the interfaces listed for each group get the routing-mark assigned
  • now enable the pppoe-client interfaces; this will create a default route in the individual routing table for each group of ports
  • as you assign IP addresses and subnets to the Ethernet interfaces, the connected routes to these subnets will be automatically added to the respective routing tables
  • depending on the intended application, you can create bridge interfaces and make the Ethernet interfaces member ports of these bridges; in that case, you put the bridges to the interfaces list on the /ip route vrf rows, instead of the names of the member Ethernet interfaces
What's important, the router itself keeps using routing table main unless you use rules in chain=output of mangle to assign a routing-mark (routing table name). So if there are no routes in routing table main, i.e. no routes without any routing-mark value assigned, the router cannot communicate.

Who is online

Users browsing this forum: jaclaz and 99 guests