Manual:Bonding Examples: Difference between revisions

From MikroTik Wiki
Jump to navigation Jump to search
→‎Bonding two VPLS interfaces: moved to separate article
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
== ARP Link Monitoring HowTo ==
== Bonding EoIP tunnels over two wireless links ==
 
===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.
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===
===Network Diagram===
Line 28: Line 22:


The second step is to add bonding interface and specify EoIP interfaces as slaves:
The second step is to add bonding interface and specify EoIP interfaces as slaves:
* on router R1:
* R1:
<pre>[admin@MikroTik] > / interface bonding add slaves=eoip-tunnel1,eoip-tunnel2 mode=balance-rr  
<pre>[admin@MikroTik] > / interface bonding add slaves=eoip-tunnel1,eoip-tunnel2 mode=balance-rr  
</pre>
</pre>
Refer to the [[MUM 2006 USA/Bonding |following page]] regarding bonding mode selection.
* R2
* and on router R2
<pre>[admin@MikroTik] > / interface bonding add slaves=eoip-tunnel1,eoip-tunnel2 mode=balance-rr  
<pre>[admin@MikroTik] > / interface bonding add slaves=eoip-tunnel1,eoip-tunnel2 mode=balance-rr  
</pre>
</pre>
Line 38: Line 31:
The last step is to add IP addresses to the bonding interfaces:
The last step is to add IP addresses to the bonding interfaces:


* on router R1:
* R1:
<pre>[admin@MikroTik] > / ip address add address 192.168.0.1/24 interface=bonding1
<pre>[admin@MikroTik] > / ip address add address 192.168.0.1/24 interface=bonding1
</pre>
</pre>
Tip: Refer to the [[MUM 2006 USA/Bonding |following page]] regarding bonding mode selection.
* R2
* and on router R2
<pre>[admin@MikroTik] > / ip address add address 192.168.0.2/24 interface=bonding1  
<pre>[admin@MikroTik] > / ip address add address 192.168.0.2/24 interface=bonding1  
</pre>
</pre>
Line 49: Line 41:


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:
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:
* on router R1:
* R1:
<pre>[admin@MikroTik] > /interface monitor-traffic eoip-tunnel1,eoip-tunnel2
<pre>[admin@MikroTik] > /interface monitor-traffic eoip-tunnel1,eoip-tunnel2
</pre>
</pre>
* and on router R2
* R2
<pre>[admin@MikroTik] > /tool bandwidth-test 192.168.0.1 direction=transmit
<pre>[admin@MikroTik] > /tool bandwidth-test 192.168.0.1 direction=transmit
</pre>
</pre>
Line 85: Line 77:
===Link Monitoring===
===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:
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, do the following:


* on router R1:
* R1:
<pre>[admin@MikroTik] > / interface bonding set bonding1 link-monitoring=arp arp-ip-targets=192.168.0.2
<pre>[admin@MikroTik] > / interface bonding set bonding1 link-monitoring=arp arp-ip-targets=192.168.0.2
</pre>
</pre>
Refer to the [[MUM 2006 USA/Bonding |following page]] regarding bonding mode selection.
 
* and on router R2
* R2
<pre>[admin@MikroTik] > / interface bonding set bonding1 link-monitoring=arp arp-ip-targets=192.168.0.1
<pre>[admin@MikroTik] > / interface bonding set bonding1 link-monitoring=arp arp-ip-targets=192.168.0.1
</pre>
</pre>
Tip: Refer to the [[MUM 2006 USA/Bonding |following page]] for information about different link monitoring types.


=== See also ===


*[[Bonding]]
== See also ==
 
* [[M:Interface/Bonding | Bonding]]


[[Category:Interface]]
[[Category:Interface]]
[[Category:Manual]]
[[Category:Manual]]
[[Category:Examples]]
[[Category:Examples]]

Latest revision as of 12:22, 14 August 2017

Bonding EoIP tunnels over two wireless links

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.

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:

  • on router R1:
[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
  • and on router R2
[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:

  • R1:
[admin@MikroTik] > / interface bonding add slaves=eoip-tunnel1,eoip-tunnel2 mode=balance-rr 
  • R2
[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:

  • R1:
[admin@MikroTik] > / ip address add address 192.168.0.1/24 interface=bonding1
  • R2
[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:

  • R1:
[admin@MikroTik] > /interface monitor-traffic eoip-tunnel1,eoip-tunnel2
  • R2
[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, do the following:

  • R1:
[admin@MikroTik] > / interface bonding set bonding1 link-monitoring=arp arp-ip-targets=192.168.0.2
  • R2
[admin@MikroTik] > / interface bonding set bonding1 link-monitoring=arp arp-ip-targets=192.168.0.1


See also