Features include:
Note that you may only assign IP addresses to the bridge interface (the one is created in this submenu level), not the bridged interfaces (the ones which will be grouped in the bridge).
[admin@MikroTik] interface bridge> add [admin@MikroTik] interface bridge> print Flags: X - disabled, R - running 1 X name="bridge2" mtu=1500 arp=enabled mac-address=00:00:00:00:00:00 forward-protocols=ip,arp,appletalk,ipx,ipv6,other priority=1 [admin@MikroTik] interface bridge> enable 0
[admin@MikroTik] interface bridge port> set ether1,prism1 bridge=bridge1 [admin@MikroTik] interface bridge port> print Flags: X - disabled # INTERFACE BRIDGE 0 ether1 bridge1 1 ether2 none 2 prism1 bridge1 [admin@MikroTik] interface bridge port>
[admin@MikroTik] interface bridge host> print Flags: L - local BRIDGE MAC-ADDRESS ON-INTERFACE AGE bridge1 00:00:B4:5B:A6:58 ether1 4m48s bridge1 00:30:4F:18:58:17 ether1 4m50s L bridge1 00:50:08:00:00:F5 ether1 0s L bridge1 00:50:08:00:00:F6 ether2 0s bridge1 00:60:52:0B:B4:81 ether1 4m50s bridge1 00:C0:DF:07:5E:E6 ether1 4m46s bridge1 00:E0:C5:6E:23:25 prism1 4m48s bridge1 00:E0:F7:7F:0A:B8 ether1 1s [admin@MikroTik] interface bridge host>
Note that packets between bridged interfaces are also passed through the 'generic' /ip firewall rules, so they even can be NATted. These rules can be used with real, physical receiving/transmitting interfaces, as well as with bridge interface that simply groups bridged interfaces.
To make bridge drop IP, ARP ad RARP packets:
[admin@MikroTik] interface bridge firewall> add mac-protocol=2048 action=drop [admin@MikroTik] interface bridge firewall> add mac-protocol=2054 action=drop [admin@MikroTik] interface bridge firewall> add mac-protocol=32821 action=drop [admin@MikroTik] interface bridge firewall> print Flags: X - disabled, I - invalid 0 mac-src-address=00:00:00:00:00:00 in-interface=all mac-dst-address=00:00:00:00:00:00 out-interface=all mac-protocol=2048 src-address=0.0.0.0/0 dst-address=0.0.0.0/0 protocol=all action=drop 1 mac-src-address=00:00:00:00:00:00 in-interface=all mac-dst-address=00:00:00:00:00:00 out-interface=all mac-protocol=2054 src-address=0.0.0.0/0 dst-address=0.0.0.0/0 protocol=all action=drop 2 mac-src-address=00:00:00:00:00:00 in-interface=all mac-dst-address=00:00:00:00:00:00 out-interface=all mac-protocol=32821 src-address=0.0.0.0/0 dst-address=0.0.0.0/0 protocol=all action=drop [admin@MikroTik] interface bridge firewall>
Assume we want to enable bridging between two Ethernet LAN segments and have the MikroTik router be the default gateway for them:
When configuring the MikroTik router for bridging you should do the following:
Note that there should be no IP addresses on the bridged interfaces. Moreover, IP address on the bridge interface itself is not required for the bridging to work.
When configuring the bridge settings, each protocol that should be forwarded should be added to the forward-protocols list. The other protocol includes all protocols not listed before (as VLAN).
[admin@MikroTik] interface bridge> add forward-protocols=ip,arp,other [admin@MikroTik] interface bridge> print Flags: X - disabled, R - running 0 X name="bridge1" mtu=1500 arp=enabled mac-address=00:00:00:00:00:00 forward-protocols=ip,arp,other priority=1 [admin@MikroTik] interface bridge>The priority argument is used by the Spanning Tree Protocol to determine, which port remains enabled if two ports form a loop.
Next, each interface that should be included in the bridging port table:
[admin@MikroTik] interface bridge port> print Flags: X - disabled # INTERFACE BRIDGE 0 ether1 none 1 ether2 none 2 ether3 none 3 prism1 none [admin@MikroTik] interface bridge port> set "0,1" bridge=bridge1 [admin@MikroTik] interface bridge port> print Flags: X - disabled # INTERFACE BRIDGE 0 ether1 bridge1 1 ether2 bridge1 2 ether3 none 3 prism1 none [admin@MikroTik] interface bridge port>
After setting some interface for bridging, the bridge interface should be enabled in order to start using it:
[admin@MikroTik] interface bridge> print Flags: X - disabled, R - running 0 X name="bridge1" mtu=1500 arp=enabled mac-address=00:50:08:00:00:F5 forward-protocols=ip,arp,other priority=1 [admin@MikroTik] interface bridge> enable 0 [admin@MikroTik] interface bridge> print Flags: X - disabled, R - running 0 R name="bridge1" mtu=1500 arp=enabled mac-address=00:50:08:00:00:F5 forward-protocols=ip,arp,other priority=1 [admin@MikroTik] interface bridge>
If you want to access the router through unnumbered bridged interfaces, it is required to add an IP address to the bridge interface:
[admin@MikroTik] ip address> add address=192.168.0.254/24 interface=bridge1 [admin@MikroTik] ip address> add address=10.1.1.12/24 interface=prism1 [admin@MikroTik] ip address> print Flags: X - disabled, I - invalid, D - dynamic # ADDRESS NETWORK BROADCAST INTERFACE 0 192.168.0.254/24 192.168.0.0 192.168.0.255 bridge1 1 10.1.1.12/24 10.1.1.0 10.1.1.255 prism1 [admin@MikroTik] ip address>
Note!Assigning an IP address to bridged interfaces ether1 or ether2 has no sense. Thus, when you assign an interface to a bridge, you should move its IP address to the bridge interface at the same time!
Hosts on LAN segments #1 and #2 should use IP addresses from the same network 192.168.0.0/24 and have the default gateway set to 192.168.0.254 (MikroTik router).
http://users.pandora.be/bart.de.schuymer/ebtables/br_fw_ia/br_fw_ia.html