Summary
The CRS3xx and CRS5xx series switches, as well as the CCR2116 and CCR2216 routers, feature highly integrated switches with high-performance CPUs and feature-rich packet processors. These devices can be used for various Ethernet applications, including unmanaged switches, Layer 2 managed switches, carrier switches, inter-VLAN routers, and wired unified packet processors.
This article applies to CRS3xx, CRS5xx series switches, and CCR2116, CCR2216 routers, and not to CRS1xx/CRS2xx series switches.
Features
Features | Description |
---|---|
Forwarding |
|
Routing |
|
Spanning Tree Protocol |
|
Mirroring |
|
VLAN |
|
Bonding |
|
Traffic Shaping |
|
Port isolation |
|
Access Control List |
|
Models
This table clarifies the main differences between Cloud Router Switch models and CCR routers.
Model | Switch Chip | CPU | Cores | 10G SFP+ | 2.5G Ethernet | 10G Ethernet | 25G SFP28 | 40G QSFP+ | 100G QSFP28 | ACL rules | Unicast FDB entries | Jumbo Frame (Bytes) |
netPower 15FR (CRS318-1Fi-15Fr-2S) | Marvell-98DX224S | 800MHz | 1 | - | - | - | - | - | - | 128 | 16,000 | 10218 |
netPower 16P (CRS318-16P-2S+) | Marvell-98DX226S | 800MHz | 1 | 2 | - | - | - | - | - | 128 | 16,000 | 10218 |
CRS310-1G-5S-4S+ (netFiber 9/IN) | Marvell-98DX226S | 800MHz | 1 | 4 | - | - | - | - | - | 128 | 16,000 | 10218 |
CRS310-8G+2S+ | Marvell-98DX226S | 800MHz | 2 | 2 | 8 | - | - | - | - | 128 | 16,000 | 10218 |
CRS326-24G-2S+ (RM/IN) | Marvell-98DX3236 | 800MHz | 1 | 2 | - | - | - | - | - | 128 | 16,000 | 10218 |
CRS328-24P-4S+ | Marvell-98DX3236 | 800MHz | 1 | 4 | - | - | - | - | - | 128 | 16,000 | 10218 |
CRS328-4C-20S-4S+ | Marvell-98DX3236 | 800MHz | 1 | 4 | - | - | - | - | - | 128 | 16,000 | 10218 |
CRS305-1G-4S+ | Marvell-98DX3236 | 800MHz | 1 | 4 | - | - | - | - | - | 128 | 16,000 | 10218 |
CRS309-1G-8S+ | Marvell-98DX8208 | 800MHz | 2 | 8 | - | - | - | - | - | 1024 | 32,000 | 10218 |
CRS317-1G-16S+ | Marvell-98DX8216 | 800MHz | 2 | 16 | - | - | - | - | - | 1024 | 128,000 | 10218 |
CRS312-4C+8XG | Marvell-98DX8212 | 650MHz | 1 | 4 (combo ports) | - | 8 + 4 (combo ports) | - | - | - | 512 | 32,000 | 10218 |
CRS326-24S+2Q+ | Marvell-98DX8332 | 650MHz | 1 | 24 | - | - | - | 2 | - | 256 | 32,000 | 10218 |
CRS354-48G-4S+2Q+ | Marvell-98DX3257 | 650MHz | 1 | 4 | - | - | - | 2 | - | 170 | 32,000 | 10218 |
CRS354-48P-4S+2Q+ | Marvell-98DX3257 | 650MHz | 1 | 4 | - | - | - | 2 | - | 170 | 32,000 | 10218 |
CRS504-4XQ (IN/OUT) | Marvell-98DX4310 | 650MHz | 1 | - | - | - | - | - | 4 | 1024 | 128,000 | 10218 |
CRS510-8XS-2XQ-IN | Marvell-98DX4310 | 650MHz | 1 | - | - | - | 8 | - | 2 | 1024 | 128,000 | 10218 |
CRS518-16XS-2XQ | Marvell-98DX8525 | 650MHz | 1 | - | - | - | 16 | - | 2 | 1024 | 128,000 | 10218 |
CCR2116-12G-4S+ | Marvell-98DX3255 | 2000MHz | 16 | 4 | - | - | - | - | - | 512 | 32,000 | 9570 |
CCR2216-1G-12XS-2XQ | Marvell-98DX8525 | 2000MHz | 16 | - | - | - | 12 | - | 2 | 1024 | 128,000 | 9570 |
For L3 hardware offloading feature support and hardware limits, please refer to Feature Support and Device Support user manuals.
Abbreviations
- FDB - Forwarding Database
- MDB - Multicast Database
- SVL - Shared VLAN Learning
- IVL - Independent VLAN Learning
- PVID - Port VLAN ID
- ACL - Access Control List
- CVID - Customer VLAN ID
- SVID - Service VLAN ID
Port switching
To set up a port switching, check the Bridge Hardware Offloading page.
Currently, it is possible to create only one bridge with hardware offloading. Use the hw=yes/no
parameter to select which bridge will use hardware offloading.
Bridge STP/RSTP/MSTP, IGMP Snooping, and VLAN filtering settings don't affect hardware offloading, Bonding interfaces are also hardware offloaded.
VLAN
The bridge provides VLAN-aware Layer 2 forwarding and VLAN tag modifications. This set of features makes bridge operation more akin to a traditional Ethernet switch, allowing it to overcome Spanning Tree compatibility issues compared to configurations where tunnel-like VLAN interfaces are bridged. Configuring Bridge VLAN Filtering is highly recommended to comply with STP (802.1D) and RSTP (802.1w) standards, and enabling MSTP (802.1s) support in RouterOS is mandatory.
VLAN Filtering
VLAN filtering is described in the Bridge VLAN Filtering section.
VLAN setup examples
Some of the most common ways how to utilize VLAN forwarding:
Port-Based VLAN
The configuration is described in the Bridge VLAN Filtering section.
MAC Based VLAN
- The Switch Rule table is used for MAC Based VLAN functionality, see this table on how many rules each device supports.
- MAC-based VLANs will only work properly between switch ports and not between switch ports and CPU. When a packet is being forwarded to the CPU, the
pvid
property of the bridge port will be always used instead ofnew-vlan-id
from ACL rules. - MAC-based VLANs will not work for DHCP packets when DHCP snooping is enabled.
Enable switching on ports by creating a bridge with enabled hw-offloading:
/interface bridge add name=bridge1 vlan-filtering=yes /interface bridge port add bridge=bridge1 interface=ether2 hw=yes add bridge=bridge1 interface=ether7 hw=yes
Add VLANs in the Bridge VLAN table and specify ports:
/interface bridge vlan add bridge=bridge1 tagged=ether2 untagged=ether7 vlan-ids=200,300,400
Add Switch rules that assign VLAN ID based on MAC address:
/interface ethernet switch rule add switch=switch1 ports=ether7 src-mac-address=A4:12:6D:77:94:43/FF:FF:FF:FF:FF:FF new-vlan-id=200 add switch=switch1 ports=ether7 src-mac-address=84:37:62:DF:04:20/FF:FF:FF:FF:FF:FF new-vlan-id=300 add switch=switch1 ports=ether7 src-mac-address=E7:16:34:A1:CD:18/FF:FF:FF:FF:FF:FF new-vlan-id=400
Protocol Based VLAN
- The Switch Rule table is utilized for Protocol-based VLAN functionality. Refer to this table to determine the number of rules each device supports.
- Protocol-based VLANs will only function correctly between switch ports and not between switch ports and the CPU. When a packet is forwarded to the CPU, the
pvid
property of the bridge port will always be used instead of thenew-vlan-id
from ACL rules. - Protocol-based VLANs will not function for DHCP packets when DHCP snooping is enabled.
Enable switching on ports by creating a bridge with enabled hw-offloading:
/interface bridge add name=bridge1 vlan-filtering=yes /interface bridge port add bridge=bridge1 interface=ether2 hw=yes add bridge=bridge1 interface=ether6 hw=yes add bridge=bridge1 interface=ether7 hw=yes add bridge=bridge1 interface=ether8 hw=yes
Add VLANs in the Bridge VLAN table and specify ports:
/interface bridge vlan add bridge=bridge1 tagged=ether2 untagged=ether6 vlan-ids=200 add bridge=bridge1 tagged=ether2 untagged=ether7 vlan-ids=300 add bridge=bridge1 tagged=ether2 untagged=ether8 vlan-ids=400
Add Switch rules that assign VLAN ID based on MAC protocol:
/interface ethernet switch rule add mac-protocol=ip new-vlan-id=200 ports=ether6 switch=switch1 add mac-protocol=ipx new-vlan-id=300 ports=ether7 switch=switch1 add mac-protocol=0x80F3 new-vlan-id=400 ports=ether8 switch=switch1
VLAN Tunneling (Q-in-Q)
It is possible to use a provider bridge (IEEE 802.1ad) Tag Stacking VLAN filtering, and hardware offloading simultaneously. The configuration for this is outlined in the Bridge VLAN Tunneling (Q-in-Q) section.
Devices equipped with switch chip Marvell-98DX3257 (e.g. CRS354 series) do not support VLAN filtering on 1Gbps Ethernet interfaces for other VLAN types (0x88a8
and 0x9100
).
Ingress VLAN translation
It is possible to translate a certain VLAN ID to a different VLAN ID using ACL rules on an ingress port. In this example, we create two ACL rules, allowing bidirectional communication. This can be done by following these steps:
1) Create a new bridge and add ports to it with hardware offloading:
/interface bridge add name=bridge1 vlan-filtering=no /interface bridge port add interface=ether1 bridge=bridge1 hw=yes add interface=ether2 bridge=bridge1 hw=yes
2) Add ACL rules to translate a VLAN ID in each direction:
/interface ethernet switch rule add new-dst-ports=ether2 new-vlan-id=20 ports=ether1 switch=switch1 vlan-id=10 add new-dst-ports=ether1 new-vlan-id=10 ports=ether2 switch=switch1 vlan-id=20
3) Add both VLAN IDs to the bridge VLAN table:
/interface bridge vlan add bridge=bridge1 tagged=ether1 vlan-ids=10 add bridge=bridge1 tagged=ether2 vlan-ids=20
4) Enable bridge VLAN filtering:
/interface bridge set bridge1 vlan-filtering=yes
Bidirectional communication is limited only between two switch ports. Translating VLAN ID between more ports can cause traffic flooding or incorrect forwarding between the same VLAN ports.
By enabling vlan-filtering
you will be filtering out traffic destined to the CPU, before enabling VLAN filtering you should make sure that you set up a Management port.
(R/M)STP
CRS3xx, CRS5xx series switches, CCR2116, and CCR2216 routers are capable of running STP, RSTP, and MSTP on a hardware level. For more detailed information you should check out the Spanning Tree Protocol manual page.
Bonding
CRS3xx, CRS5xx series switches, and CCR2116, CCR2216 routers support hardware offloading with bonding interfaces. Only 802.3ad
and balance-xor
bonding modes are hardware offloaded, other bonding modes will use the CPU's resources. You can find more information about the bonding interfaces in the Bonding Interface section. If 802.3ad
mode is used, then LACP (Link Aggregation Control Protocol) is supported.
To create a hardware offloaded bonding interface, you must create a bonding interface with a supported bonding mode:
/interface bonding add mode=802.3ad name=bond1 slaves=ether1,ether2
This interface can be added to a bridge alongside other interfaces:
/interface bridge add name=bridge /interface bridge port add bridge=bridge interface=bond1 hw=yes add bridge=bridge interface=ether3 hw=yes add bridge=bridge interface=ether4 hw=yes
Do not add interfaces to a bridge that are already in a bond, RouterOS will not allow you to add an interface to a bridge that is already a slave port for bonding.
Make sure that the bonding interface is hardware offloaded by checking the "H" flag:
/interface bridge port print Flags: X - disabled, I - inactive, D - dynamic, H - hw-offload # INTERFACE BRIDGE HW 0 H bond1 bridge yes 1 H ether3 bridge yes 2 H ether4 bridge yes
With HW-offloaded bonding interfaces, the built-in switch chip will always use Layer2+Layer3+Layer4 for a transmit hash policy, changing the transmit hash policy manually will have no effect.
Multi-chassis Link Aggregation Group
MLAG (Multi-chassis Link Aggregation Group) implementation in RouterOS allows configuring LACP bonds on two separate devices, while the client device believes to be connected to the same machine. This provides a physical redundancy in case of switch failure. All CRS3xx, CRS5xx series, and CCR2116, CCR2216 devices can be configured with MLAG. Read here for more information.
L3 Hardware Offloading
Layer3 hardware offloading, also known as IP switching or HW routing, enables the offloading of certain router features onto the switch chip. This capability allows for achieving wire speeds when routing packets, a feat that would not be possible with just the CPU alone.
The offloaded feature set depends on the used chipset. For more information, please refer to the documentation provided here.
Port isolation
It is possible to create a Private VLAN setup, an example can be found in the Switch chip port isolation manual page. Hardware offloaded bonding interfaces are not included in the switch port-isolation menu, but it is still possible to configure port-isolation individually on each secondary interface of the bonding.
Port isolation can be used with a VLAN-filtering bridge and it is possible to isolate ports that are members of the same VLAN. The isolation works per port, it is not possible to isolate ports per VLAN.
IGMP/MLD Snooping
CRS3xx, CRS5xx series switches and CCR2116, CCR2216 routers can use IGMP/MLD Snooping on a hardware level. For more detailed information, you should check out the IGMP/MLD snooping manual page.
DHCP Snooping and DHCP Option 82
CRS3xx, CRS5xx series switches and CCR2116, CCR2216 routers can use DHCP Snooping with Option 82 on a hardware level. The switch will create a dynamic ACL rule to capture the DHCP packets and redirect them to the main CPU for further processing. To see more detailed information, please visit the DHCP Snooping and DHCP Option 82 manual page.
DHCP snooping will not work when hardware offloading bonding interfaces are created.
Controller Bridge and Port Extender
Controller Bridge (CB) and Port Extender (PE) is an IEEE 802.1BR standard implementation in RouterOS. It allows virtually extending the CB ports with a PE device and managing these extended interfaces from a single controlling device. Such configuration provides a simplified network topology, flexibility, increased port density, and ease of manageability. See more details on the Controller Bridge and Port Extender manual.
Mirroring
Mirroring allows the switch to intercept all traffic passing through the switch chip and send a copy of those packets to another designated port (mirror-target). This feature facilitates the creation of a tap device, enabling network traffic inspection on a traffic analyzer device. You can configure simple port-based mirroring or more complex mirroring based on various parameters. Note that the mirror-target port must belong to the same switch (you can identify which port belongs to which switch in the /interface ethernet menu). Additionally, the mirror-target port can be set to a special value 'cpu', indicating that sniffed packets will be forwarded to the switch chip's CPU port. There are several methods to mirror specific traffic, and below are some of the most common mirroring examples:
Port Based Mirroring:
/interface ethernet switch set switch1 mirror-source=ether2 mirror-target=ether3
Property mirror-source
will send an ingress and egress packet copies to the mirror-target
port. Both mirror-source
and mirror-target
are limited to a single interface.
/interface ethernet switch set switch1 mirror-source=none mirror-target=ether3 /interface ethernet switch rule add mirror=yes ports=ether1,ether2 switch=switch1
Using ACL rules, it is possible to mirror packets from multiple ports
interfaces. Only ingress packets are mirrored to mirror-target
interface.
VLAN Based Mirroring:
/interface bridge set bridge1 vlan-filtering=yes /interface ethernet switch set switch1 mirror-target=ether3 mirror-source=none /interface ethernet switch rule add mirror=yes ports=ether1 switch=switch1 vlan-id=11
By enabling vlan-filtering
you will be filtering out traffic destined for the CPU, before enabling VLAN filtering you should make sure that you set up a Management port.
MAC Based Mirroring:
/interface ethernet switch set switch1 mirror-target=ether3 mirror-source=none /interface ethernet switch rule add mirror=yes ports=ether1 switch=switch1 dst-mac-address=64:D1:54:D9:27:E6/FF:FF:FF:FF:FF:FF add mirror=yes ports=ether1 switch=switch1 src-mac-address=64:D1:54:D9:27:E6/FF:FF:FF:FF:FF:FF
Protocol Based Mirroring:
/interface ethernet switch set switch1 mirror-target=ether3 mirror-source=none /interface ethernet switch rule add mirror=yes ports=ether1 switch=switch1 mac-protocol=ipx
IP Based Mirroring:
/interface ethernet switch set switch1 mirror-target=ether3 mirror-source=none /interface ethernet switch rule add mirror=yes ports=ether1 switch=switch1 src-address=192.168.88.0/24 add mirror=yes ports=ether1 switch=switch1 dst-address=192.168.88.0/24
There are other options as well, check the ACL section to find out all possible parameters that can be used to match packets.
Traffic Shaping
It is possible to limit ingress traffic that matches certain parameters with ACL rules and it is possible to limit ingress/egress traffic per port basis. The policer is used for ingress traffic, the shaper is used for egress traffic. The ingress policer controls the received traffic with packet drops. Everything that exceeds the defined limit will get dropped. This can affect the TCP congestion control mechanism on end hosts and the achieved bandwidth can be actually less than defined. The egress shaper tries to queue packets that exceed the limit instead of dropping them. Eventually, it will also drop packets when the output queue gets full, however, it should allow for better utilization of the defined throughput.
Port-based traffic police and shaper:
/interface ethernet switch port set ether1 ingress-rate=10M egress-rate=5M
MAC-based traffic policer:
/interface ethernet switch rule add ports=ether1 switch=switch1 src-mac-address=64:D1:54:D9:27:E6/FF:FF:FF:FF:FF:FF rate=10M
VLAN-based traffic policer:
/interface bridge set bridge1 vlan-filtering=yes /interface ethernet switch rule add ports=ether1 switch=switch1 vlan-id=11 rate=10M
By enabling vlan-filtering
you will be filtering out traffic destined to the CPU, before enabling VLAN filtering you should make sure that you set up a Management port.
Protocol-based traffic policer:
/interface ethernet switch rule add ports=ether1 switch=switch1 mac-protocol=ipx rate=10M
There are other options as well, check the ACL section to find out all possible parameters that can be used to match packets.
The Switch Rule table is used for QoS functionality, see this table for how many rules each device supports.
Traffic Storm Control
A traffic storm can emerge when certain frames are continuously flooded on the network. For example, if a network loop has been created and no loop avoidance mechanisms are used (e.g. Spanning Tree Protocol), broadcast or multicast frames can quickly overwhelm the network, causing degraded network performance or even complete network breakdown. With CRS3xx, CRS5xx series switches and CCR2116, CCR2216 routers it is possible to limit broadcast, unknown multicast, and unknown unicast traffic. Unknown unicast traffic is considered when a switch does not contain a host entry for the destined MAC address. Unknown multicast traffic is considered when a switch does not contain a multicast group entry in the /interface bridge mdb
menu. Storm control settings should be applied to ingress ports, the egress traffic will be limited.
The storm control parameter is specified in percentage (%) of the link speed. If your link speed is 1Gbps, then specifying storm-rate
as 10
will allow only 100Mbps of broadcast, unknown multicast, and/or unknown unicast traffic to be forwarded.
Sub-menu: /interface ethernet switch port
Property | Description |
---|---|
limit-broadcasts (yes | no; Default: yes) | Limit broadcast traffic on a switch port. |
limit-unknown-multicasts (yes | no; Default: no) | Limit unknown multicast traffic on a switch port. |
limit-unknown-unicasts (yes | no; Default: no) | Limit unknown unicast traffic on a switch port. |
storm-rate (integer 0..100; Default: 100) | The amount of broadcast, unknown multicast, and/or unknown unicast traffic is limited to a percentage of the link speed. |
Devices with Marvell-98DX3236 switch chip cannot distinguish unknown multicast traffic from all multicast traffic. For example, CRS326-24G-2S+ will limit all multicast traffic when limit-unknown-multicasts
and storm-rate
is used. For other devices, for example, CRS317-1G-16S+ the limit-unknown-multicasts
parameter will limit only unknown multicast traffic (addresses that are not present in /interface bridge mdb).
For example, to limit 1% (10Mbps) of broadcast and unknown unicast traffic on ether1 (1Gbps), use the following commands:
/interface ethernet switch port set ether1 storm-rate=1 limit-broadcasts=yes limit-unknown-unicasts=yes
MPLS hardware offloading
It is possible to offload certain MPLS functions to the switch chip, the switch must be a (P)rovider router in a PE-P-PE setup in order to achieve hardware offloading. A setup example can be found in the Basic MPLS setup example manual page. The hardware offloading will only take place when LDP interfaces are configured as physical switch interfaces (e.g. Ethernet, SFP, SFP+).
Currently only CRS317-1G-16S+
and CRS309-1G-8S+
using RouterOS v6.41 and newer are capable of hardware offloading certain MPLS functions. CRS317-1G-16S+
and CRS309-1G-8S+
built-in switch chip is not capable of popping MPLS labels from packets, in a PE-P-PE setup you either have to use explicit null or disable TTL propagation in the MPLS network to achieve hardware offloading.
The MPLS hardware offloading has been removed since RouterOS v7.
Switch Rules (ACL)
Access Control List contains an ingress policy engine. See this table on how many rules each device supports. It is an advanced tool for wire-speed packet filtering, forwarding, and modifying based on Layer2, Layer3, and Layer4 protocol header field conditions.
ACL rules are checked for each received packet until a match has been found. If multiple rules can match, then only the first rule will be triggered. A rule without any action parameters is a rule to accept the packet.
It is not required to set mac-protocol
to certain IP version when using L3 or L4 matchers, however, it is recommended to set the mac-protocol=ip
or mac-protocol=ipv6
when filtering any IP packets.
When switch ACL rules are modified (e.g. added, removed, disabled, enabled, or moved), the existing switch rules will be inactive for a short time. This can cause some packet leakage during the ACL rule modifications.
Sub-menu: /interface ethernet switch rule
Property | Description |
---|---|
copy-to-cpu (no | yes; Default: no) | Clones the matching packet and sends it to the CPU. |
disabled (yes | no; Default: no) | Enables or disables ACL entry. |
dscp (0..63) | Matching the DSCP field of the packet (only applies to IPv4 packets). |
dst-address (IP address/Mask) | Matching destination IPv4 address and mask, also matches the destination IP in ARP packets. |
dst-address6 (IPv6 address/Mask) | Matching destination IPv6 address and mask. |
dst-mac-address (MAC address/Mask) | Matching destination MAC address and mask. |
dst-port (0..65535) | Matching destination protocol port number (applies to IPv4 and IPv6 packets if mac-protocol is not specified). |
flow-label (0..1048575) | Matching IPv6 flow label. |
mac-protocol (802.2 | arp | homeplug-av | ip | ipv6 | ipx | lldp | loop-protect | mpls-multicast | mpls-unicast | packing-compr | packing-simple | pppoe | pppoe-discovery | rarp | service-vlan | vlan | or 0..65535 | or 0x0000-0xffff) | Matching particular MAC protocol specified by protocol name or number |
mirror (no | yes) | Clones the matching packet and sends it to the mirror-target port. |
new-dst-ports (ports) | Changes the destination port as specified. An empty setting will drop the packet. A specified port will redirect the packet to it. When the parameter is not used, the packet will be accepted. Multiple "new-dst-ports" are not supported. |
new-vlan-id (0..4095) | Changes the VLAN ID to the specified value. Requires vlan-filtering=yes . |
new-vlan-priority (0..7) | Changes the VLAN priority (priority code point). Requires vlan-filtering=yes . |
ports (ports) | Matching ports on which will the rule apply on received traffic. |
protocol (dccp | ddp | egp | encap | etherip | ggp | gre | hmp | icmp | icmpv6 | idpr-cmtp | igmp | ipencap | ipip | ipsec-ah | ipsec-esp | ipv6 | ipv6-frag | ipv6-nonxt | ipv6-opts | ipv6-route | iso-tp4 | l2tp | ospf | pim | pup | rdp | rspf | rsvp | sctp | st | tcp | udp | udp-lite | vmtp | vrrp | xns-idp | xtp | or 0..255) | Matching particular IP protocol specified by protocol name or number. This only applies to IPv4 packets if mac-protocol is not specified. To match certain IPv6 protocols, use the mac-protocol=ipv6 setting. |
rate (0..4294967295) | Sets ingress traffic limitation (bits per second) for matched traffic. |
redirect-to-cpu (no | yes) | Changes the destination port of a matching packet to the CPU. |
src-address (IP address/Mask) | Matching source IPv4 address and mask, also matches the source IP in ARP packets. |
src-address6 (IPv6 address/Mask) | Matching source IPv6 address and mask. |
src-mac-address (MAC address/Mask) | Matching source MAC address and mask. |
src-port (0..65535) | Matching source protocol port number (applies to IPv4 and IPv6 packets if mac-protocol is not specified). |
switch (switch group) | Matching switch group on which will the rule apply. |
traffic-class (0..255) | Matching IPv6 traffic class. |
vlan-id (0..4095) | Matching VLAN ID. Requires vlan-filtering=yes . |
vlan-header (not-present | present) | Matching VLAN header, whether the VLAN header is present or not. Requires vlan-filtering=yes . |
vlan-priority (0..7) | Matching VLAN priority (priority code point). |
Action parameters:
- copy-to-cpu
- redirect-to-cpu
- mirror
- new-dst-ports (can be used to drop packets)
- new-vlan-id
- new-vlan-priority
- rate
Layer2 condition parameters:
- dst-mac-address
- mac-protocol
- src-mac-address
- vlan-id
- vlan-header
- vlan-priority
Layer3 condition parameters:
- dscp
- protocol
- IPv4 conditions:
- dst-address
- src-address
- IPv6 conditions:
- dst-address6
- flow-label
- src-address6
- traffic-class
Layer4 condition parameters:
- dst-port
- src-port
For VLAN related matchers or VLAN related action parameters to work, you need to enable vlan-filtering
on the bridge interface and make sure that hardware offloading is enabled on those ports, otherwise, these parameters will not have any effect.
When bridge interface ether-type
is set to 0x8100
, then VLAN related ACL rules are relevant to frames tagged using regular/customer VLAN (TPID 0x8100), this includes vlan-id
and new-vlan-id
. When bridge interface ether-type
is set to 0x88a8
, then ACL rules are relevant to frames tagged with 802.1ad service tag (TPID 0x88a8).
Port Security
It is possible to limit allowed MAC addresses on a single switch port. For example, to allow 64:D1:54:81:EF:8E MAC address on a switch port, start by switching multiple ports together, in this example 64:D1:54:81:EF:8E is going to be located behind ether1.
Create an ACL rule to allow the given MAC address and drop all other traffic on ether1 (for ingress traffic):
/interface ethernet switch rule add ports=ether1 src-mac-address=64:D1:54:81:EF:8E/FF:FF:FF:FF:FF:FF switch=switch1 add new-dst-ports="" ports=ether1 switch=switch1
Switch all required ports together, disable MAC learning, and disable unknown unicast flooding on ether1:
/interface bridge add name=bridge1 /interface bridge port add bridge=bridge1 interface=ether1 hw=yes learn=no unknown-unicast-flood=no add bridge=bridge1 interface=ether2 hw=yes
Add a static hosts entry for 64:D1:54:81:EF:8E (for egress traffic):
/interface bridge host add bridge=bridge1 interface=ether1 mac-address=64:D1:54:81:EF:8E
Broadcast traffic will still be sent out from ether1. To limit broadcast traffic flood on a bridge port, you can use the broadcast-flood
parameter to toggle it. Note that some protocols, such as streaming protocols and DHCP, depend on broadcast traffic.
Dual Boot
The “dual boot” feature allows you to choose which operating system you prefer to use on CRS3xx series switches, RouterOS, or SwOS. Device operating system can be changed using:
- Command-line (
/system routerboard settings set boot-os=swos
) - WinBox
- WebFig
- Serial Console
More details about SwOS are described here: SwOS manual
Configuring SwOS using RouterOS
It is possible to load, save, and reset SwOS configuration, as well as upgrade SwOS and set an IP address for the CRS3xx series switches by using RouterOS.
- Save configuration with
/system swos save-config
The configuration will be saved on the same device with "swos.config"
as the filename. Please ensure you downloaded the file from your device, as the configuration file will be removed after a reboot.
- Load configuration with
/system swos load-config
- Change password with
/system swos password
- Reset configuration with
/system swos reset-config
- Upgrade SwOS from RouterOS using
/system swos upgrade
The upgrade command will automatically install the latest available SwOS primary backup version. Ensure that your device has access to the Internet for the upgrade process to work properly. When the device is booted into SwOS, the version number will include the letter "p", indicating a primary backup version. You can then install the latest available SwOS secondary main version from the SwOS "Upgrade" menu.
Property | Description |
---|---|
address-acquisition-mode (dhcp-only | dhcp-with-fallback | static; Default: dhcp-with-fallback) | Changes address acquisition method:
|
allow-from (IP/Mask; Default: 0.0.0.0/0) | IP address or a network from which the switch is accessible. By default, the switch is accessible by any IP address. |
allow-from-ports (name; Default: ) | List of switch ports from which the device is accessible. By default, all ports are allowed to access the switch |
allow-from-vlan (integer: 0..4094; Default: 0) | VLAN ID from which the device is accessible. By default, all VLANs are allowed |
identity (name; Default: Mikrotik) | Name of the switch (used for Mikrotik Neighbor Discovery protocol) |
static-ip-address (IP; Default: 192.168.88.1) | The IP address of the switch in case address-acquisition-mode is either set to dhcp-with-fallback or static . By setting a static IP address, the address acquisition process does not change, which is DHCP with fallback by default. This means that the configured static IP address will become active only when there are no DHCP servers in the same broadcast domain |