Sun Mar 17, 2024 2:03 am
Good question.
Trying to think conceptually.
Assuming you have one common cable over which to do this work, I would probably use two different VLANS.
At each Router, one of the vlans would be an incoming WAN connection from the other Router. Via a private subnet. on ETHERPORT XY.
At each Router the other vlan would be a LAN subnet providing DHCP service to the other router.
Something like, simplisitic, probably much more elegant ways. Create two private networks running over the common cable, and their only function is to act as a static private WANIP for the other router.
R1
/interface bridge
name=BR-WAN-LAN
/interface vlan
add name=vlan11 interface=BR-WAN-LAN vlanid=11
add name=vlan22 interface=BR-WAN-LAN vlanid=22 comment="backup wan"
/interface bridge port
add bridge=BR-WAN-LAN interface=port XY
/interface bridge vlan
add bridge=BR-WAN-LAN tagged=BR-WAN-LAN,etheportXY vlan-ids=11,22 Edit: corrected I had a type of 12 (instead of 22)
/ip address
add address=192.168.11.1/24 interface=vlan11 comment='local private subnet"
add address=192.168.22.2/24 interface=vlan22 comment="static wanip"
/ip dhcp-server
add address-pool=static-only interface=vlan11 name=dhcp11
/ip dhcp server-network
add 192.168.11.0/24 dns-server=192.168.11.1 gateway=192.168.11.1
/ip firewall nat
add chain=srcnat action=masquerade out-interface=vlan22
/ip interface list members
add interface=vlan22 list=WAN
/ip route
add distance=2 dst-address=0.0.0.0/0 gateway=192.168.22.1 routing-table=main
R2
/interface bridge
name=BR-WL
/interface vlan
add name=vlan11 interface=BR-WL vlanid=11 comment="backup wan"
add name=vlan22 interface=BR-WL vlanid=22
/interface bridge port
add bridge=BR-WL interface=port XY
/interface bridge vlan
add bridge=BR-WL tagged=BR-WL,etheportXY vlan-ids=11,12
/ip address
add address=192.168.11.2/24 interface=vlan11 comment="static WANIP"
add address=192.168.22.1/24 interface=vlan22 comment="local private subnet"
/ip dhcp-server
add address-pool=static-only interface=vlan22 name=dhcp22
/ip dhcp server-network
add 192.168.22.0/24 dns-server=192.168.22.1 gateway=192.168.22.1
/ip firewall nat
add chain=srcnat action=masquerade out-interface=vlan11
/ip interface list members
add interface=vlan11 list=WAN
/ip route
add distance=2 dst-address=0.0.0.0/0 gateway=192.168.11.1 routing-table=main
Last edited by
anav on Sat Mar 23, 2024 3:46 am, edited 1 time in total.