Manual:CRS1xx/2xx series switches examples

From MikroTik Wiki
Revision as of 10:58, 24 October 2013 by Becs (talk | contribs) (Basic CRS configuration examples)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Version.png

Applies to RouterOS: v6.5 +


Summary

Basic switch-chip configuration examples for Cloud Router Switch.

Icon-note.png

Note: More examples are about to be added.



Port Based VLAN

Alt text
Port Based VLAN
  • Create a group of switched ports.
/interface ethernet
set ether6 master-port=ether2
set ether7 master-port=ether2
set ether8 master-port=ether2
  • Tag ingress traffic coming from each of the access ports by assigning new VLAN ids for untagged (VLAN id 0) frames.
/interface ethernet switch ingress-vlan-translation
add switch=switch1 port=ether6 customer-vid=0 new-customer-vid=200
add switch=switch1 port=ether7 customer-vid=0 new-customer-vid=300
add switch=switch1 port=ether8 customer-vid=0 new-customer-vid=400
  • Untag ingress traffic coming from trunk port by replacing current VLAN ids with VLAN id 0.
/interface ethernet switch ingress-vlan-translation
add switch=switch1 port=ether2 customer-vid=200 new-customer-vid=0
add switch=switch1 port=ether2 customer-vid=300 new-customer-vid=0
add switch=switch1 port=ether2 customer-vid=400 new-customer-vid=0

Protocol Based VLAN

Alt text
Protocol Based VLAN
  • Create a group of switched ports.
/interface ethernet
set ether6 master-port=ether2
set ether7 master-port=ether2
set ether8 master-port=ether2
  • Set VLAN for IP and ARP protocols
/interface ethernet switch protocol-based-vlan
add switch=switch1 port=ether2 protocol=arp set-customer-vid-for=all new-customer-vid=0
add switch=switch1 port=ether6 protocol=arp set-customer-vid-for=all new-customer-vid=200
add switch=switch1 port=ether2 protocol=ip set-customer-vid-for=all new-customer-vid=0
add switch=switch1 port=ether6 protocol=ip set-customer-vid-for=all new-customer-vid=200
  • Set VLAN for IPX protocol
/interface ethernet switch protocol-based-vlan
add switch=switch1 port=ether2 protocol=ipx set-customer-vid-for=all new-customer-vid=0
add switch=switch1 port=ether7 protocol=ipx set-customer-vid-for=all new-customer-vid=300
  • Set VLAN for AppleTalk AARP and AppleTalk DDP protocols
/interface ethernet switch protocol-based-vlan
add switch=switch1 port=ether2 protocol=0x80F3 set-customer-vid-for=all new-customer-vid=0
add switch=switch1 port=ether8 protocol=0x80F3 set-customer-vid-for=all new-customer-vid=400
add switch=switch1 port=ether2 protocol=0x809B set-customer-vid-for=all new-customer-vid=0
add switch=switch1 port=ether8 protocol=0x809B set-customer-vid-for=all new-customer-vid=400

MAC Based VLAN

Alt text
MAC Based VLAN
  • Create a group of switched ports.
/interface ethernet
set ether7 master-port=ether2
  • Enable MAC based VLAN translation on access port.
/interface ethernet switch port
set ether7 mac-based-vlan-translate=yes mac-based-customer-vlan=all-frames
  • Add MAC-to-VLAN mapping entries in MAC based VLAN table.
/interface ethernet switch mac-based-vlan
add switch=switch1 src-mac=A4:12:6D:77:94:43 new-customer-vid=200
add switch=switch1 src-mac=84:37:62:DF:04:20 new-customer-vid=300
add switch=switch1 src-mac=E7:16:34:A1:CD:18 new-customer-vid=400
  • Set VLAN id untagging for tagged frames coming from the trunk port.
/interface ethernet switch ingress-vlan-translation
add switch=switch1 port=ether2 customer-vlan-lookup-for=tagged new-customer-vid=0

Management IP Configuration

  • Add VLAN 99 interface and assign IP address to it. Since the master-port receives all the traffic coming from switch-cpu port, VLAN has to be configured on master-port, in this case "ether2" port.
/interface vlan
add name=vlan99 vlan-id=99 interface=ether2
/ip address
add address=192.168.88.1/24 interface=vlan99 network=192.168.88.0