155. Mikrotik How to Configure VRRP Load Sharing


You can contact me: plus.google.com/+PhallaCCMT; youtube.com/phallaccmt; facebook.com/Phalla.CCMT; twitter.com/PhallaCCMT and Phalla.CCMT@gmail.com

Router-01

/interface vrrp
add interface=ether2-LAN name=vrrp1-Master priority=200
add interface=ether2-LAN name=vrrp2-Backup vrid=2

/ip address
add address=192.168.120.135/24 interface=ether1-WAN network=192.168.120.0
add address=192.168.1.1/24 interface=ether2-LAN network=192.168.1.0
add address=192.168.1.254/32 interface=vrrp1-Master network=192.168.1.254
add address=192.168.1.253/32 interface=vrrp2-Backup network=192.168.1.253

/ip pool
add name=dhcp_pool1 ranges=192.168.1.100-192.168.1.200
/ip dhcp-server
add address-pool=dhcp_pool1 disabled=no interface=ether2-LAN name=dhcp1
/ip dhcp-server network
add address=192.168.1.0/24 gateway=192.168.1.254

/ip dns
set servers=8.8.8.8

/ip firewall nat
add action=masquerade chain=srcnat out-interface=ether1-WAN src-address= 192.168.1.0/24

/ip route
add distance=1 gateway=192.168.120.2

/system identity
set name=MK-01



Router-02

/interface vrrp
add interface=ether2-LAN name=vrrp1-Backup
add interface=ether2-LAN name=vrrp2-Master priority=200 vrid=2

/ip address
add address=192.168.120.145/24 interface=ether1-WAN network=192.168.120.0
add address=192.168.1.2/24 interface=ether2-LAN network=192.168.1.0
add address=192.168.1.253/32 interface=vrrp2-Master network=192.168.1.253
add address=192.168.1.254/32 interface=vrrp1-Backup network=192.168.1.254

/ip pool
add name=dhcp_pool1 ranges=192.168.1.100-192.168.1.200
/ip dhcp-server
add address-pool=dhcp_pool1 disabled=no interface=ether2-LAN name=dhcp1
/ip dhcp-server network
add address=192.168.1.0/24 gateway=192.168.1.254

/ip dns
set servers=8.8.8.8

/ip firewall nat
add action=masquerade chain=srcnat out-interface=ether1-WAN src-address=192.168.1.0/24

/ip route
add distance=1 gateway=192.168.120.2
/system identity
set name=MK-02



Note: - VRID must be the same for a pair of VRRP config on both routers.


Ref: https://wiki.mikrotik.com/wiki/Manual:Interface/VRRP
        https://wiki.mikrotik.com/wiki/Manual:VRRP-examples
Previous
Next Post »