|
|
Line 1: |
Line 1: |
| ==Bonding two VPLS interfaces==
| |
|
| |
| This example extends [[Transparently_Bridge_two_Networks_using_MPLS | Transparent Bridge using MPLS example]]. Mentioned example is using LDP signaled VPLS tunnel which is not suitable for two VPLS tunnels to the same device.
| |
| Before continuing with the setup, basic knowledge of [[M:Routing/BGP | BGP]] and [[M:BGP_based_VPLS | BGP signaled VPLS]] is needed.
| |
|
| |
| ===Network Diagram===
| |
|
| |
| [[File:vpls-bonding.png]]
| |
|
| |
| There are two wireless links on router and LAN segment is connected to the ethernet side of each router.
| |
|
| |
| ===Configuration===
| |
|
| |
| Lets consider that wireless interfaces are already configured and links are established so that we can start with IP and MPLS configuration.
| |
|
| |
| ====IP addressing and MPLS====
| |
|
| |
| '''R1'''
| |
| <pre>
| |
| /interface bridge
| |
| add name=lo
| |
| /ip address
| |
| add address=192.168.222.1/24 interface=wlan1
| |
| add address=192.168.223.1/24 interface=wlan2
| |
| add address=222.222.222.1/32 interface=lo
| |
|
| |
| /ip route
| |
| add dst-address=222.222.222.2/32 gateway=192.168.222.2
| |
|
| |
| /mpls ldp
| |
| set enabled=yes lsr-id=222.222.222.1 transport-address=222.222.222.1
| |
| /mpls ldp interface
| |
| add interface=wlan1
| |
| add interface=wlan2
| |
| </pre>
| |
|
| |
| '''R2'''
| |
| <pre>
| |
| /interface bridge
| |
| add name=lo
| |
| /ip address
| |
| add address=192.168.222.2/24 interface=wlan1
| |
| add address=192.168.223.2/24 interface=wlan2
| |
| add address=222.222.222.2/32 interface=lo
| |
|
| |
| /ip route
| |
| add dst-address=222.222.222.1/32 gateway=192.168.222.1
| |
|
| |
| /mpls ldp
| |
| set enabled=yes lsr-id=222.222.222.2 transport-address=222.222.222.2
| |
| /mpls ldp interface
| |
| add interface=wlan1
| |
| add interface=wlan2
| |
| </pre>
| |
|
| |
| At this point ensure that LDP is running:
| |
|
| |
| <pre>
| |
| [admin@R1] /mpls ldp neighbor> print
| |
| Flags: X - disabled, D - dynamic, O - operational, T - sending-targeted-hello,
| |
| V - vpls
| |
| # TRANSPORT LOCAL-TRANSPORT PEER SEN
| |
| 0 DO 222.222.222.2 222.222.222.1 192.168.222.2:0 no
| |
| </pre>
| |
|
| |
| ===BGP signaled VPLS===
| |
|
| |
| '''R1'''
| |
| <pre>
| |
|
| |
| /routing bgp peer
| |
| add name=peer1 remote-address-192.168.222.2 remote-as=65530 address-families=l2vpn
| |
| add name=peer2 remote-address-192.168.223.2 remote-as=65530 address-families=l2vpn
| |
| </pre>
| |
|
| |
|
| |
| '''R2'''
| |
| <pre>
| |
|
| |
| /routing bgp peer
| |
| add name=peer1 remote-address-192.168.222.1 remote-as=65530 address-families=l2vpn
| |
| add name=peer2 remote-address-192.168.223.1 remote-as=65530 address-families=l2vpn
| |
| </pre>
| |
|
| |
| BGP should be running and we can start VPLS configuration. Each of VPLS tunnels will have unique route distinguisher and route target:
| |
|
| |
| '''R1'''
| |
| <pre>
| |
| /interface vpls bgp-vpls
| |
| add export-route-targets=222:222 import-route-targets=222:222 name=bgp-vpls1 \
| |
| route-distinguisher=222:222 site-id=1
| |
| add export-route-targets=223:223 import-route-targets=223:223 name=bgp-vpls2 \
| |
| route-distinguisher=223:223 site-id=1
| |
| </pre>
| |
|
| |
| '''R2'''
| |
| <pre>
| |
| /interface vpls bgp-vpls
| |
| add export-route-targets=222:222 import-route-targets=222:222 name=bgp-vpls1 \
| |
| route-distinguisher=222:222 site-id=2
| |
| add export-route-targets=223:223 import-route-targets=223:223 name=bgp-vpls2 \
| |
| route-distinguisher=223:223 site-id=2
| |
| </pre>
| |
|
| |
| At this point VPLS tunnels are signaled to both BGP peers. It means that VPLS tunnels are established over the same link (which update gets first).
| |
|
| |
| To force other VPLS tunnel over another link we will use routign filters to filter out unnecessary updates:
| |
|
| |
| '''R1''' and '''R2''
| |
| <pre>
| |
| /routing bgp peer
| |
| set peer1 out-filter=bgp-out1
| |
| set peer2 out-filter=bgp-out2
| |
|
| |
| /routing filter
| |
| add action=discard chain=bgp-out1 route-targets=223:223
| |
| add action=discard chain=bgp-out2 route-targets=222:222
| |
|
| |
| </pre>
| |
|
| |
| '''Result'''
| |
| <pre>
| |
| [admin@R1] /interface vpls> print
| |
| Flags: X - disabled, R - running, D - dynamic,
| |
| B - bgp-signaled, C - cisco-bgp-signaled
| |
|
| |
| 0 RDB name="vpls1" mtu=1500 l2mtu=1500 mac-address=02:A1:29:95:20:3B arp=enabled
| |
| disable-running-check=no remote-peer=192.168.223.2 cisco-style=no
| |
| cisco-style-id=0 advertised-l2mtu=1500 pw-type=raw-ethernet
| |
| vpls=bgp-vpls2
| |
|
| |
| 1 RDB name="vpls2" mtu=1500 l2mtu=1500 mac-address=02:A4:61:69:82:F1 arp=enabled
| |
| disable-running-check=no remote-peer=192.168.222.2 cisco-style=no
| |
| cisco-style-id=0 advertised-l2mtu=1500 pw-type=raw-ethernet
| |
| vpls=bgp-vpls1
| |
| </pre>
| |
|
| |
| ===Bonding===
| |
| Bonding itself is quite simple
| |
| <pre>
| |
| /interface bonding add name=bonding1 slaves=vpls1,vpls2
| |
|
| |
| /interface bridge
| |
| add name=vpn protocol-mode=rstp
| |
| /interface bridge ports
| |
| add bridge=vpn interface=ether1
| |
| add bridge=vpn interface=bonding1
| |
| </pre>
| |
|
| |
| <pre>
| |
| [admin@R1] /interface bonding> print
| |
| Flags: X - disabled, R - running
| |
| 0 R name="bonding1" mtu=1500 mac-address=02:A1:29:95:20:3B arp=enabled
| |
| slaves=vpls1,vpls2 mode=balance-rr primary=none link-monitoring=none
| |
| arp-interval=100ms mii-interval=100ms down-delay=0ms up-delay=0ms
| |
| lacp-rate=30secs transmit-hash-policy=layer-2
| |
| </pre>
| |
|
| |
| {{Note| As in this example VPLS tunnels are dynamically created, it means that if for some reason one VPLS goes down, bonding slave will become invalid. In this case some script is required which checks VPLS interface updates}}
| |
|
| |
|
| |
| == ARP Link Monitoring HowTo == | | == ARP Link Monitoring HowTo == |
|
| |
|
ARP Link Monitoring HowTo
About
This is an example of aggregating multiple network interfaces into a single pipe. In particular, it is shown how to aggregate multiple virtual (EoIP) interfaces to get maximum throughput (MT) with emphasis on availability.
Objective
You will learn how to connect remote locations via multiple physical links. The combined pipe will deliver higher throughput and availability then the individual links.
Network Diagram
Two routers R1 and R2 are interconnected via multihop wireless links. Wireless interfaces on both sides have assigned IP addresses.
File:Bonding ARP Monitoring Exam.jpg
Getting started
Bonding could be used only on OSI layer 2 (Ethernet level) connections. Thus we need to create EoIP interfaces on each of the wireless links. This is done as follows:
[admin@MikroTik] > /interface eoip add remote-address=10.0.1.1/24 tunnel-id=1
[admin@MikroTik] > /interface eoip add remote-address=10.0.2.1/24 tunnel-id=2
[admin@MikroTik] > /interface eoip add remote-address=10.1.1.1/24 tunnel-id=1
[admin@MikroTik] > /interface eoip add remote-address=10.2.2.1/24 tunnel-id=2
The second step is to add bonding interface and specify EoIP interfaces as slaves:
[admin@MikroTik] > / interface bonding add slaves=eoip-tunnel1,eoip-tunnel2 mode=balance-rr
Refer to the following page regarding bonding mode selection.
[admin@MikroTik] > / interface bonding add slaves=eoip-tunnel1,eoip-tunnel2 mode=balance-rr
The last step is to add IP addresses to the bonding interfaces:
[admin@MikroTik] > / ip address add address 192.168.0.1/24 interface=bonding1
Tip: Refer to the following page regarding bonding mode selection.
[admin@MikroTik] > / ip address add address 192.168.0.2/24 interface=bonding1
Test the configuration
Now two routers are able to reach each other using addresses from the 192.168.0.0/24 network. To verify bonding interface functionality, do the following:
[admin@MikroTik] > /interface monitor-traffic eoip-tunnel1,eoip-tunnel2
[admin@MikroTik] > /tool bandwidth-test 192.168.0.1 direction=transmit
You should see that traffic is distributed equally across both EoIP interfaces:
[admin@MikroTik] > /int monitor-traffic eoip-tunnel1,eoip-tunnel2
received-packets-per-second: 685 685
received-bits-per-second: 8.0Mbps 8.0Mbps
sent-packets-per-second: 21 20
sent-bits-per-second: 11.9kbps 11.0kbps
received-packets-per-second: 898 899
received-bits-per-second: 10.6Mbps 10.6Mbps
sent-packets-per-second: 20 21
sent-bits-per-second: 11.0kbps 11.9kbps
received-packets-per-second: 975 975
received-bits-per-second: 11.5Mbps 11.5Mbps
sent-packets-per-second: 22 22
sent-bits-per-second: 12.4kbps 12.3kbps
received-packets-per-second: 980 980
received-bits-per-second: 11.6Mbps 11.6Mbps
sent-packets-per-second: 21 21
sent-bits-per-second: 11.9kbps 11.8kbps
received-packets-per-second: 977 977
received-bits-per-second: 11.6Mbps 11.5Mbps
sent-packets-per-second: 21 21
sent-bits-per-second: 11.9kbps 11.8kbps
-- [Q quit|D dump|C-z pause]
[admin@MikroTik] >
Link Monitoring
It is easy to notice that with the configuration above as soon as any of individual link fails, the bonding interface throughput collapses. That's because no link monitoring is performed, consequently, the bonding driver is unaware of problems with the underlying links. Enabling link monitoring is a must in most bonding configurations. To enable ARP link monitoring (recommended), do the following:
[admin@MikroTik] > / interface bonding set bonding1 link-monitoring=arp arp-ip-targets=192.168.0.2
Refer to the following page regarding bonding mode selection.
[admin@MikroTik] > / interface bonding set bonding1 link-monitoring=arp arp-ip-targets=192.168.0.1
Tip: Refer to the following page for information about different link monitoring types.
See also