Привет. Сейчас все наши площадки подключаются к одному роутеру Mikrotik для терминaции VPLS. Я пытаюсь настроить автоматическое переключение на резервный вариант на случай аппаратных сбоев. Провёл быстрый лабораторный тест, и, похоже, это реально, просто хотел узнать, как делают другие и может есть более правильный метод.
Я использую LDP, а не BGP для сигнализации. В общем идея такая: VPLS1 принимает туннели, у него более высокий приоритет интерфейса OSPF (и он DR) по отношению к VPLS2, Cust1 и Cust2. У VPLS1 и VPLS2 одинаковые lsr-id и transport-id, так что если VPLS1 сломается, через некоторое время маршрут к 1.1.1.1 перейдет на VPLS2 и туннели восстановятся.
Это правильный подход?
VPLS1
/interface vpls
add disabled=no l2mtu=1500 mac-address=02:B7:93:34:5B:24 name=vpls-cust1 remote-peer=1.0.0.100 vpls-id=1:1
add disabled=no l2mtu=1500 mac-address=02:34:D8:F1:08:8B name=vpls-cust2 remote-peer=1.0.0.101 vpls-id=1:2
/ip address
add address=10.100.0.1/24 interface=ether1 network=10.100.0.0
add address=1.0.0.1 interface=lo1 network=1.0.0.1
add address=1.1.1.1 interface=lo2_ha network=1.1.1.1
/mpls interface
set [ find default=yes ] mpls-mtu=1526
/mpls ldp
set enabled=yes lsr-id=1.1.1.1 transport-address=1.1.1.1
/mpls ldp interface
add interface=ether1
add interface=lo2_ha
/routing ospf instance
set [ find default=yes ] disabled=yes router-id=1.0.0.1
/routing ospf interface
add interface=ether1 priority=100
/routing ospf network
add area=backbone network=1.0.0.1/32
add area=backbone network=10.100.0.0/24
add area=backbone network=1.1.1.1/32
VPLS2
/interface vpls
add disabled=no l2mtu=1500 mac-address=02:F5:36:CC:01:C8 name=vpls-cust1 remote-peer=1.0.0.100 vpls-id=1:1
add disabled=no l2mtu=1500 mac-address=02:D7:5A:E2:9F:FD name=vpls-cust2 remote-peer=1.0.0.101 vpls-id=1:2
/routing ospf instance
set [ find default=yes ] router-id=1.0.0.2
/routing ospf interface
add interface=ether1 priority=90
add cost=20 interface=lo2_HA
/routing ospf network
add area=backbone network=1.0.0.2/32
add area=backbone network=10.100.0.0/24
add area=backbone network=1.1.1.1/32
/ip address
add address=10.100.0.2/24 interface=ether1 network=10.100.0.0
add address=1.0.0.2 interface=lo1 network=1.0.0.2
add address=1.1.1.1 interface=lo2_HA network=1.1.1.1
/mpls interface
set [ find default=yes ] mpls-mtu=1526
/mpls ldp
set enabled=yes lsr-id=1.1.1.1 transport-address=1.1.1.1
/mpls ldp interface
add interface=ether1
Cust1
/interface vpls
add disabled=no l2mtu=1500 mac-address=02:80:0A:FF:BF:40 name=vpls-core remote-peer=1.1.1.1 vpls-id=1:1
/mpls interface
set [ find default=yes ] mpls-mtu=1526
/mpls ldp
set enabled=yes lsr-id=1.0.0.100 transport-address=1.0.0.100
/mpls ldp interface
add interface=ether1
/routing ospf instance
set [ find default=yes ] router-id=1.0.0.100
/routing ospf interface
add interface=ether1 priority=0
/routing ospf network
add area=backbone network=1.0.0.100/32
add area=backbone network=10.100.0.0/24
Cust2
/interface vpls
add disabled=no l2mtu=1500 mac-address=02:28:8B:ED:29:6B name=vpls-core remote-peer=1.1.1.1 vpls-id=1:2
/ip address
add address=10.100.0.101/24 interface=ether1 network=10.100.0.0
add address=1.0.0.101 interface=lo1 network=1.0.0.101
add address=192.168.1.101/24 interface=vpls-core network=192.168.1.0
/mpls interface
set [ find default=yes ] mpls-mtu=1526
/mpls ldp
set enabled=yes lsr-id=1.0.0.101 transport-address=1.0.0.101
/mpls ldp interface
add interface=ether1
/routing ospf instance
set [ find default=yes ] router-id=1.0.0.101
/routing ospf interface
add interface=ether1 priority=0
/routing ospf network
add area=backbone network=1.0.0.101/32
add area=backbone network=10.100.0.0/24
EDIT: никак не могу правильно оформить форматирование…
Я использую LDP, а не BGP для сигнализации. В общем идея такая: VPLS1 принимает туннели, у него более высокий приоритет интерфейса OSPF (и он DR) по отношению к VPLS2, Cust1 и Cust2. У VPLS1 и VPLS2 одинаковые lsr-id и transport-id, так что если VPLS1 сломается, через некоторое время маршрут к 1.1.1.1 перейдет на VPLS2 и туннели восстановятся.
Это правильный подход?
VPLS1
/interface vpls
add disabled=no l2mtu=1500 mac-address=02:B7:93:34:5B:24 name=vpls-cust1 remote-peer=1.0.0.100 vpls-id=1:1
add disabled=no l2mtu=1500 mac-address=02:34:D8:F1:08:8B name=vpls-cust2 remote-peer=1.0.0.101 vpls-id=1:2
/ip address
add address=10.100.0.1/24 interface=ether1 network=10.100.0.0
add address=1.0.0.1 interface=lo1 network=1.0.0.1
add address=1.1.1.1 interface=lo2_ha network=1.1.1.1
/mpls interface
set [ find default=yes ] mpls-mtu=1526
/mpls ldp
set enabled=yes lsr-id=1.1.1.1 transport-address=1.1.1.1
/mpls ldp interface
add interface=ether1
add interface=lo2_ha
/routing ospf instance
set [ find default=yes ] disabled=yes router-id=1.0.0.1
/routing ospf interface
add interface=ether1 priority=100
/routing ospf network
add area=backbone network=1.0.0.1/32
add area=backbone network=10.100.0.0/24
add area=backbone network=1.1.1.1/32
VPLS2
/interface vpls
add disabled=no l2mtu=1500 mac-address=02:F5:36:CC:01:C8 name=vpls-cust1 remote-peer=1.0.0.100 vpls-id=1:1
add disabled=no l2mtu=1500 mac-address=02:D7:5A:E2:9F:FD name=vpls-cust2 remote-peer=1.0.0.101 vpls-id=1:2
/routing ospf instance
set [ find default=yes ] router-id=1.0.0.2
/routing ospf interface
add interface=ether1 priority=90
add cost=20 interface=lo2_HA
/routing ospf network
add area=backbone network=1.0.0.2/32
add area=backbone network=10.100.0.0/24
add area=backbone network=1.1.1.1/32
/ip address
add address=10.100.0.2/24 interface=ether1 network=10.100.0.0
add address=1.0.0.2 interface=lo1 network=1.0.0.2
add address=1.1.1.1 interface=lo2_HA network=1.1.1.1
/mpls interface
set [ find default=yes ] mpls-mtu=1526
/mpls ldp
set enabled=yes lsr-id=1.1.1.1 transport-address=1.1.1.1
/mpls ldp interface
add interface=ether1
Cust1
/interface vpls
add disabled=no l2mtu=1500 mac-address=02:80:0A:FF:BF:40 name=vpls-core remote-peer=1.1.1.1 vpls-id=1:1
/mpls interface
set [ find default=yes ] mpls-mtu=1526
/mpls ldp
set enabled=yes lsr-id=1.0.0.100 transport-address=1.0.0.100
/mpls ldp interface
add interface=ether1
/routing ospf instance
set [ find default=yes ] router-id=1.0.0.100
/routing ospf interface
add interface=ether1 priority=0
/routing ospf network
add area=backbone network=1.0.0.100/32
add area=backbone network=10.100.0.0/24
Cust2
/interface vpls
add disabled=no l2mtu=1500 mac-address=02:28:8B:ED:29:6B name=vpls-core remote-peer=1.1.1.1 vpls-id=1:2
/ip address
add address=10.100.0.101/24 interface=ether1 network=10.100.0.0
add address=1.0.0.101 interface=lo1 network=1.0.0.101
add address=192.168.1.101/24 interface=vpls-core network=192.168.1.0
/mpls interface
set [ find default=yes ] mpls-mtu=1526
/mpls ldp
set enabled=yes lsr-id=1.0.0.101 transport-address=1.0.0.101
/mpls ldp interface
add interface=ether1
/routing ospf instance
set [ find default=yes ] router-id=1.0.0.101
/routing ospf interface
add interface=ether1 priority=0
/routing ospf network
add area=backbone network=1.0.0.101/32
add area=backbone network=10.100.0.0/24
EDIT: никак не могу правильно оформить форматирование…
