Difference between revisions of "Manual:Interface/Bridge"

From MikroTik Wiki
Jump to: navigation, search
Line 71: Line 71:
 
     <td></td>
 
     <td></td>
 
</tr>
 
</tr>
 +
</table>
 +
 +
<h3>Example</h3>
 +
 +
<p>To add and enable a bridge interface that will forward all the protocols:</p>
 +
 +
<pre>
 +
[admin@MikroTik] /interface bridge> add
 +
[admin@MikroTik] /interface bridge> print
 +
Flags: X - disabled, R - running
 +
0  R name="bridge1" mtu=1500 l2mtu=65535 arp=enabled
 +
      mac-address=00:00:00:00:00:00 protocol-mode=none priority=0x8000
 +
      auto-mac=yes admin-mac=00:00:00:00:00:00 max-message-age=20s
 +
      forward-delay=15s transmit-hold-count=6 ageing-time=5m
 +
[admin@MikroTik] /interface bridge>
 +
</pre>
 +
 +
<h2>Bridge Settings</h2>
 +
<p><b>Sub-menu:</b> <code>/interface bridge settings</code></p>
 +
 +
<table class="styled_table">
 +
<tr>
 +
  <th width="40%">Property</th>
 +
  <th >Description</th>
 +
</tr>
 +
<tr>
 +
    <td><var><b>use-ip-firewall</b></var> (<em>yes | no</em>; Default:<b> no</b>)</td>
 +
    <td></td>
 +
</tr>
 +
<tr>
 +
    <td><var><b>use-ip-firewall-for-pppoe</b></var> (<em>yes | no</em>; Default:<b> no</b>)</td>
 +
    <td></td>
 +
</tr>
 +
<tr>
 +
    <td><var><b>use-ip-firewall-for-vlan</b></var> (<em>yes | no</em>; Default:<b> no</b>)</td>
 +
    <td></td>
 +
</tr>
 +
</table>
 +
 +
<h2>Port Settings</h2>
 +
<p><b>Sub-menu:</b> <code>/interface bridge port</code></p>
 +
 +
<p>Port submenu is used to enslave interfaces in a particular bridge interface.</p>
 +
 +
<table class="styled_table">
 +
<tr>
 +
  <th width="40%">Property</th>
 +
  <th >Description</th>
 +
</tr>
 +
<tr>
 +
    <td><var><b>bridge</b></var> (<em>name</em>; Default:<b> none</b>)</td>
 +
    <td> The bridge interface the respective interface is grouped in</td>
 +
</tr>
 +
<tr>
 +
    <td><var><b>edge</b></var> (<em>auto | no | no-discover | yes | yes-discover</em>; Default:<b> auto</b>)</td>
 +
    <td></td>
 +
</tr>
 +
<tr>
 +
    <td><var><b>external-fdb</b></var> (<em>auto | no | yes</em>; Default:<b> auto</b>)</td>
 +
    <td></td>
 +
</tr>
 +
<tr>
 +
    <td><var><b>horizon</b></var> (<em>none | integer 0..429496729</em>; Default:<b> none</b>)</td>
 +
    <td></td>
 +
</tr>
 +
<tr>
 +
    <td><var><b>interface</b></var> (<em>name</em>; Default:<b> none</b>)</td>
 +
    <td>Name of the interface</td>
 +
</tr>
 +
<tr>
 +
    <td><var><b>path-cost</b></var> (<em>integer: 0..65535</em>; Default:<b> 10</b>)</td>
 +
    <td>Path cost to the interface, used by STP to determine the "best" path</td>
 +
</tr>
 +
<tr>
 +
    <td><var><b>point-to-point</b></var> (<em>auto | no | yes</em>; Default:<b> auto</b>)</td>
 +
    <td></td>
 +
</tr>
 +
<tr>
 +
    <td><var><b>priority</b></var> (<em>integer: 0..255</em>; Default:<b> 128</b>)</td>
 +
    <td>The priority of the interface in comparison with other going to the same subnet</td>
 +
</tr>
 +
</table>

Revision as of 15:01, 27 January 2010

Summary

Sub-menu: /interface bridge

Standards: IEEE801.1D


Ethernet-like networks (Ethernet, Ethernet over IP, IEEE802.11 in ap-bridge or bridge mode, WDS, VLAN) can be connected together using MAC bridges. The bridge feature allows the interconnection of hosts connected to separate LANs (using EoIP, geographically distributed networks can be bridged as well if any kind of IP network interconnection exists between them) as if they were attached to a single LAN. As bridges are transparent, they do not appear in traceroute list, and no utility can make a distinction between a host working in one LAN and a host working in another LAN if these LANs are bridged (depending on the way the LANs are interconnected, latency and data rate between hosts may vary).

Network loops may emerge (intentionally or not) in complex topologies. Without any special treatment, loops would prevent network from functioning normally, as they would lead to avalanche-like packet multiplication. Each bridge runs an algorithm which calculates how the loop can be prevented. STP and RSTP allows bridges to communicate with each other, so they can negotiate a loop free topology. All other alternative connections that would otherwise form loops, are put to standby, so that should the main connection fail, another connection could take its place. This algorithm exchange configuration messages (BPDU - Bridge Protocol Data Unit) periodically, so that all bridges would be updated with the newest information about changes in network topology. STP selects root bridge which is responosible for network reconfiguration, such as blocking and opening ports of the other bridges. The root bridge is the bridge with lowest bridge ID.

Bridge Interface Setup

Sub-menu: /interface bridge

To combine a number of networks into one bridge, a bridge interface should be created (later, all the desired interfaces should be set up as its ports). One MAC address will be assigned to all the bridged interfaces (the smallest MAC address will be chosen automatically).

Properties

Property Description
admin-mac (MAC address; Default: )
ageing-time (time; Default: 00:05:00) How long a host information will be kept in the bridge database
arp (disabled | enabled | proxy-arp | reply-only; Default: enabled) Address Resolution Protocol setting
auto-mac (yes | no; Default: yes)
forward-delay (time; Default: 00:00:15) Time which is spent during the initialization phase of the bridge interface (i.e., after router startup or enabling the interface) in listening/learning state before the bridge will start functioning normally
l2mtu (integer; read-only) Layer2 Maximum transmission unit. Read more>>
max-message-age (time; Default: 00:00:20) How long to remember Hello messages received from other bridges
mtu (integer; Default: 1500) Maximum Transmission Unit
name (text; Default: bridgeN) Name of the bridge interface
priority (integer: 0..65535; Default: 32768) Bridge interface priority. The priority argument is used by Spanning Tree Protocol to determine, which port remains enabled if at least two ports form a loop
protocol-mode (none | rstp | stp; Default: none)
transmit-hold-count (integer: 1..10; Default: 6)

Example

To add and enable a bridge interface that will forward all the protocols:

[admin@MikroTik] /interface bridge> add 
[admin@MikroTik] /interface bridge> print 
Flags: X - disabled, R - running 
 0  R name="bridge1" mtu=1500 l2mtu=65535 arp=enabled 
      mac-address=00:00:00:00:00:00 protocol-mode=none priority=0x8000 
      auto-mac=yes admin-mac=00:00:00:00:00:00 max-message-age=20s 
      forward-delay=15s transmit-hold-count=6 ageing-time=5m 
[admin@MikroTik] /interface bridge>

Bridge Settings

Sub-menu: /interface bridge settings

Property Description
use-ip-firewall (yes | no; Default: no)
use-ip-firewall-for-pppoe (yes | no; Default: no)
use-ip-firewall-for-vlan (yes | no; Default: no)

Port Settings

Sub-menu: /interface bridge port

Port submenu is used to enslave interfaces in a particular bridge interface.

Property Description
bridge (name; Default: none) The bridge interface the respective interface is grouped in
edge (auto | no | no-discover | yes | yes-discover; Default: auto)
external-fdb (auto | no | yes; Default: auto)
horizon (none | integer 0..429496729; Default: none)
interface (name; Default: none) Name of the interface
path-cost (integer: 0..65535; Default: 10) Path cost to the interface, used by STP to determine the "best" path
point-to-point (auto | no | yes; Default: auto)
priority (integer: 0..255; Default: 128) The priority of the interface in comparison with other going to the same subnet