User Tools

Site Tools


networking:router:mikrotik_switch

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
networking:router:mikrotik_switch [2014/03/03 14:25]
gcooper
networking:router:mikrotik_switch [2014/03/27 11:18] (current)
gcooper
Line 1: Line 1:
 ====== Mikrotik Switches ====== ====== Mikrotik Switches ======
 +
 +FIXME
  
 http://wiki.mikrotik.com/wiki/Manual:Switch_Chip_Features http://wiki.mikrotik.com/wiki/Manual:Switch_Chip_Features
Line 8: Line 10:
  
 http://wiki.mikrotik.com/wiki/Manual:Interface/VLAN http://wiki.mikrotik.com/wiki/Manual:Interface/VLAN
 +
 +Interesting: http://forum.mikrotik.com/viewtopic.php?f=13&t=82386
  
 ===== Port Switching ===== ===== Port Switching =====
Line 20: Line 24:
  
 <file> <file>
 +/interface ethernet print
 /interface ethernet switch print /interface ethernet switch print
- +/interface ethernet switch port print
-/interface ethernet print+
 </file> </file>
  
-===== Configure Switch Group =====+===== Configure Switch Groups =====
  
-:!: Here we divide the switch into two 12-port switch groups.+:!: Here we divide the switch into two switch groups of 17 and 6 ports each.
  
-:!: We are routing via the SFP port.+:!: We reserve the SFP and ''ether1'' ports for routing and upstream connectivity.
  
-Remove default slave configuration, define two master ports and assign the slave ports:+:!: We erase all configuration before starting. 
 + 
 +Reset the router to no configuration:
  
 <file> <file>
 +/system reset-configuration no-defaults=yes
 +</file>
  
 +First, we rename all of the interfaces to match our plan:
 +
 +:!: ''ether1'' and ''sfp1'' are WAN interfaces.
 +
 +:!: ''ether2'' and ''ether19'' are switch master ports.
 +
 +<file>
 +/interface
 +  set ether1 name=ether1-wan
 +  set ether2 name=ether2-master
 +  set ether3 name=ether3-slave
 +  set ether4 name=ether4-slave
 +  set ether5 name=ether5-slave
 +  set ether6 name=ether6-slave
 +  set ether7 name=ether7-slave
 +  set ether8 name=ether8-slave
 +  set ether9 name=ether9-slave
 +  set ether10 name=ether10-slave
 +  set ether11 name=ether11-slave
 +  set ether12 name=ether12-slave
 +  set ether13 name=ether13-slave
 +  set ether14 name=ether14-slave
 +  set ether15 name=ether15-slave
 +  set ether16 name=ether16-slave
 +  set ether17 name=ether17-slave
 +  set ether18 name=ether18-slave
 +  set ether19 name=ether19-master
 +  set ether20 name=ether20-slave
 +  set ether21 name=ether21-slave
 +  set ether22 name=ether22-slave
 +  set ether23 name=ether23-slave
 +  set ether24 name=ether24-slave
 +  set sfp1 name=sfp1-wan
 +  
 +print
 +</file>
 +
 +Then we modify the switch configuration:
 +
 +<file>
 /interface ethernet /interface ethernet
 +  set ether3-slave master-port=ether2-master
 +  set ether4-slave master-port=ether2-master
 +  set ether5-slave master-port=ether2-master
 +  set ether6-slave master-port=ether2-master
 +  set ether7-slave master-port=ether2-master
 +  set ether8-slave master-port=ether2-master
 +  set ether9-slave master-port=ether2-master
 +  set ether10-slave master-port=ether2-master
 +  set ether11-slave master-port=ether2-master
 +  set ether12-slave master-port=ether2-master
 +  set ether13-slave master-port=ether2-master
 +  set ether14-slave master-port=ether2-master
 +  set ether15-slave master-port=ether2-master
 +  set ether16-slave master-port=ether2-master
 +  set ether17-slave master-port=ether2-master
 +  set ether18-slave master-port=ether2-master
 +  set ether20-slave master-port=ether19-master
 +  set ether21-slave master-port=ether19-master
 +  set ether22-slave master-port=ether19-master
 +  set ether23-slave master-port=ether19-master
 +  set ether24-slave master-port=ether19-master
  
-set [find master-port=ether2-slave-local] master-port=none+print 
 +</file>
  
-set 0 name=ether1-master-local +===== Build Bridges =====
-set 12 name=ether13-master-local+
  
-set 1,2,3,4,5,6,7,8,9,10,11 master-port=ether1-master-local +:!: Use the master ports for bridging and routing. 
-set 13,14,15,16,17,18,19,20,21,22,23 master-port=ether13-master-local+ 
 +:!: We don't actually use these bridges here. 
 + 
 +<file> 
 +/interface bridge 
 +  add name=bridge1 comment="Bridge for Port Group 1" disabled=no 
 +  add name=bridge2 comment="Bridge for Port Group 2" disabled=no
  
 print print
Line 50: Line 125:
 ===== Add IP Addresses to Master Switch Ports ===== ===== Add IP Addresses to Master Switch Ports =====
  
-:!: The SFP port is the gateway.+:!: To use the SFP port as the gateway, just substitute the name of the interface (''sfp1-wan'' instead of ''ether1-wan'').
  
-Here we add IP addresses and routing for the two master switch ports:+:!: Adjust the IP addressing to your needs. 
 + 
 +Here we add IP addresses for the upstream link and the two master switch ports:
  
 <file> <file>
 /ip address /ip address
- +  add address=172.16.1.2/30 interface=ether1-wan comment="Gateway to Upstream Router" 
-add address=172.16.1.2/30 interface=sfp1-gateway +  add address=10.10.4.1/24 interface=ether2-master comment="Gateway for Private Subnet" 
-add address=198.167.189.17/28 interface=ether1-master-local +  add address=xxx.xxx.xxx.xxx/xx interface=ether19-master comment="Gateway for Public Subnet"
-add address=10.10.4.1/24 interface=ether13-master-local+
  
 print print
 +</file>
  
-/ip route add comment="Default Route" distance=1 gateway=172.16.1.1 +===== Configure Basic Networking =====
-</file>+
  
-Then we remove the default management IP address (192.168.88.1)if it exists:+Here we set the host nameDNS servers and the default route:
  
 <file> <file>
-remove numbers=0+/system identity set name=CRS125 
 +/ip dns set servers=8.8.8.8,8.8.4.4 
 +/ip route add dst-address=0.0.0.0/0 gateway=172.16.1.1 distance=1 comment="Default Route"
 </file> </file>
  
Line 79: Line 157:
  
 <file> <file>
-/ip neighbor discovery set ether1-master-local,ether13-master-local discover=no+/ip neighbor discovery set ether2-master,ether19-master discover=no
 </file> </file>
  
networking/router/mikrotik_switch.1393881921.txt.gz · Last modified: 2014/03/03 14:25 by gcooper