User Tools

Site Tools


networking:router:mikrotik_sw_vs_bridge

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
networking:router:mikrotik_sw_vs_bridge [2016/11/09 07:41]
gcooper created
networking:router:mikrotik_sw_vs_bridge [2016/11/09 08:22] (current)
gcooper
Line 1: Line 1:
 ====== Mikrotik Switch Ports vs. Bridge ====== ====== Mikrotik Switch Ports vs. Bridge ======
  
-I'd suggest to remove ports from bridge if it is possible to add them to switch group. When your ports are bridged - all packets going through these interface are processed using CPU while, if they would have been in the same switch group, special switch chip would process those packets, decreasing load on CPU.+FIXME need test
  
-So, in your case, you can make ether1 to be a master port for ether2-5. Don't forget that before assigning master port you have to remove them from bridge (bridge-local)Then, do the same for the second switch group (ports 6-10), so ether6 will be a master port for ether7-10.+===== Faster Packet Processing ===== 
 + 
 +You may get significantly faster packet processing and lower CPU utilization by removing ports from a bridge, where possible, to add them to a switch group. 
 + 
 +**When router ports are bridged, all packets going through these interface are processed using the router's CPU**.  However, **if the ports are in the same switch group, the special switch chip processes those packets, decreasing load on CPU**. 
 + 
 +===== Example ===== 
 + 
 +So, in the case of an RB2011 with two switches and ten Ethernet ports, you could: 
 + 
 +  * make ''ether1-gateway'' the Internet (WAN) gateway 
 +  * make ''ether2-master'' to be a 'masterport for ''ether3'' through ''ether5'' 
 +  * make ''ether6-master'' the master for ''ether7'' through ''ether10'' 
 + 
 +:!: Don't forget that before assigning master port you must remove them from any bridge. 
 + 
 +<file> 
 +/interface 
 +  set ether1 name=ether1-gateway 
 +  set ether2 name=ether2-master 
 +  set ether3 name=ether3-slave 
 +  set ether4 name=ether4-slave 
 +  set ether5 name=ether5-slave 
 +  set ether6 name=ether6-master 
 +  set ether7 name=ether7-slave 
 +  set ether8 name=ether8-slave 
 +  set ether9 name=ether9-slave 
 +  set ether10 name=ether10-slave
  
 /interface ethernet /interface ethernet
   set ether1 master-port=none   set ether1 master-port=none
-  set ether2 master-port=ether1 +  set ether2 master-port=none 
-  set ether3 master-port=ether1 +  set ether3 master-port=ether2 
-  set ether4 master-port=ether1 +  set ether4 master-port=ether2 
-  set ether5 master-port=ether1+  set ether5 master-port=ether2
   set ether6 master-port=none   set ether6 master-port=none
   set ether7 master-port=ether6   set ether7 master-port=ether6
Line 16: Line 43:
   set ether9 master-port=ether6   set ether9 master-port=ether6
   set ether10 master-port=ether6   set ether10 master-port=ether6
 +</file>
  
-After doing that you'll get two separate and independent switch groups, however, as you mentioned it in your post, you want them to be connected. In such case, there are two options:+After doing that you'll have a WAN (gateway) port plus two separate and independent switch groups.  Assuming you want them to be connected (LAN bridge), there are two options:
  
-    to use software bridge; +  - Use a software bridge 
-    connect them using cable.+    * Perhaps ''sfp1'' + ''ether2-master'' + ''ether6-master'' 
 +  - Connect them using cable 
 +    * Wastes physical ports
  
 ===== Software (CPU) bridging ===== ===== Software (CPU) bridging =====
  
-In this case, switch groups and will be switched using CPU, so any packet going from any interface in group 1 to group 2, or vice versa, will be processed using CPU.+In this case, traffic between switch groups ''switch1'' and ''switch2'' will be processed using the CPU, so any packet going from any interface in group 1 to group 2, or vice versa, will be processed using CPU.
  
 +<file>
 /interface bridge /interface bridge
   add name=bridge-local   add name=bridge-local
-  port add interface=eth1 bridge=bridge-local +  port add interface=ether2 bridge=bridge-local 
-  port add interface=eth6 bridge=bridge-local+  port add interface=ether6 bridge=bridge-local 
 +  port add interface=sfp1 bridge=bridge-local 
 +</file>
  
-NOTE: don't forget to assign an IP address to the bridge and, if you're using DHCP server on Mikrotik, change its interface to bridge-local as well.+<note>Don't forget to assign an IP address to the bridge and, if you're using DHCP server on Mikrotik, change its interface to ''bridge-local'' as well.</note>
  
 +<file>
 /ip address add interface=bridge-local address=192.168.1.1/24 /ip address add interface=bridge-local address=192.168.1.1/24
-/ip dhcp-server add interface=bridge-local address-poll=[name of your address pool]+/ip dhcp-server add interface=bridge-local address-pool=[name of your address pool] 
 +</file>
  
 ===== Patch Cord ===== ===== Patch Cord =====
  
-Just connect any port from group 1 (ether1-5) to any port in group 2 (ether6-10). Yesit takes 2 port and only applicable if you have ones. If all ports in one of the switch groups are already in use, I'suggest using first option (bridging).+While rarely done, you //can// just connect any port from group 1 (ether2-5) to any port in group 2 (ether6-10). 
 + 
 +Generallywe suggest using the first option (bridging).
networking/router/mikrotik_sw_vs_bridge.1478702479.txt.gz · Last modified: 2016/11/09 07:41 by gcooper