Mikrotik Crs Switches Vlan Trunking
Mikrotik Crs Switches Vlan Trunking
Mikrotik Crs Switches Vlan Trunking
UK MUM 2018
Oct 2018 © Jono Thompson
BirchenallHowden Ltd
Jono Thompson
• Networking background started as a
Cisco Engineer
• Started using ROS June 2010
• MikroTik Consultant Since Dec 2014
• MikroTik Trainer since March 2017
– MTCNA
– MTCRE
– MTCWE
– MTCTCE
– MTCINE
2
BirchenallHowden Ltd
• Established in 2006
• 29 staff
• Based in Sheffield, UK and working throughout the UK and
Europe
• Currently providing IT support for over 75 companies and
2800 users
• Currently have 2 MikroTik consultants
3
BirchenallHowden Ltd
• Services Provided
– Wired and wireless network design and installation,
– Desktop and server installation, support and maintenance
– ISP Services, leased lines, connectivity
– Telephony
– Wireless installs
– MikroTik Consultancy
– MikroTik Training
• Visit www.birchenallhowden.co.uk
4
Presentation Objectives
• Since 6.41 there has been some major changes to the Bridge
• Look at some of new features on the CRS3xx Series
5
Switch vs Router - which is most powerful?
CCR1072-1G-8S+ CRS317-1G-16S+RM
7
New Bridge Configuration
8
Bridge
• If you have started using stable versions and are not just using
long-term versions you will have seen……
• Since 6.41 there has been some changes to the bridge and
switch configuration
9
Interfaces Pre 6.41
10
Interfaces 6.41 Onwards
11
Bridge hardware offloading
• Adding ports to the bridge will now automatically (if
supported and enabled) use switch
12
Bridge – VLAN Filtering
• Since 6.41 bridge VLAN filtering has been supported
• This simplifies the VLAN setup on ROS
• This makes bridge operation more like a traditional Ethernet
switch
• CRS326 makes an ideal LAN switch
• TIP:
13
Bridge – HW offloading
• Since ROS 6.41 Bridges handle all Layer2 forwarding and the
use of the switch chip
• HW offloading is turned on if appropriate conditions are met
16
Bridge – VLAN Setup
• For this configuration as we are unable to alter the phone
configs we will need a mixture of
17
VLAN Configuration
• Create a bridge
18
VLAN Configuration
• Add all Switch Ports to the Bridge
• Default is hardware offloaded
19
VLAN Configuration
• Configure VLANs on bridge and assign ports to them
• VLAN 11 – Data
• VLAN 101 – Phones
• VLAN 201 – Public
20
VLAN Configuration
• Create VLANs and add ether1 and ether2 as tagged
21
VLAN Configuration
• TIP – Add extra columns to WinBox! This will make it easier to
see the config
22
VLAN Configuration
• Now you can see both the configured and current settings
• Current column populated when devices connected up
23
Untagged Ports
• Next we will configure ports 3-6
24
MAC based VLAN
• We can use switch rules to create a MAC based VLAN. We will
use this for our phones.
• We can use a MAC address mask to catch all phones with the
same OUI based MAC
25
MAC based VLAN
• Create a Switch ACL rule to change VID based on MAC address
26
Untagged Ports
• We will now create some Untagged ports for our PCs and
phones
27
Untagged Ports
• Set the Ports to Add PVID to untagged traffic to put PC in data
VLAN. Phones will be tagged in phone VLAN using the switch
rule
28
Untagged Ports
• Next we will configure Port 7 as a Data VLAN port and set the
PVID on port 7
29
Untagged Ports
• And Port8 untagged in VLAN201 and PVID on port 8
30
Management Interface
• We need an IP Address on the switch so we can manage it
• For this example we will manage the switch from the Data
VLAN (VLAN 11)
31
Management Interface
• Create a VLAN interface on the bridge interface
32
Management Interface
• Add bridge as a Tagged Port on the VLAN11 – IMPORTANT
• Add an IP Address to the VLAN interface
33
Enable VLAN filtering
• Now we have finished the VLAN setup we can Enable VLAN
Filtering
• We can also enable Ingress Filtering. This will only allow
VLANs we have configured into the bridge
34
Ingress Filtering
• Checks Ingress Port and VLAN ID in bridge VLAN table.
35
Layer 2 Misconfigurations
38
Layer 2 Misconfigurations
• Here are a few common incorrect Layer 2 configurations and
then the correct way to do it.
39
Layer 2 Misconfigurations
Multiple Bridges
Scenario:-
• You are using a CRS3xx series switch
• You need to isolate certain ports from each other.
• You decide to create 2 bridges.
• As each bridge is a separate Layer 2 domain you have isolated
the ports from each other
Symptoms
• You start to use your switch and notice that one set of ports
work at wire speed and give full throughput. However the
other set of ports do not.
40
Layer 2 Misconfigurations
Multiple Bridges
What has happened?
• You test further and notice that the CPU is very high when
traffic flows slowly though one of the bridges.
41
Layer 2 Misconfigurations
Multiple Bridges
• Only some devices support more than 1 hardware offloaded
bridge
42
Layer 2 Misconfigurations
VLAN – on slave interface
Scenario
• You want a DHCP server to give out IP addresses only to a
certain tagged port
44
Layer 2 Misconfigurations
VLAN – on slave interface
Problem
• VLAN interface will never capture any traffic at all since it is
immediately forwarded to the master interface before any
packet processing is done.
Symptoms
• DHCP Client / Server
not working properly
• Device unreachable
45
Layer 2 Misconfigurations
VLAN – on slave interface
Solution
• Change the VLAN to the bridge
46
Layer 2 Misconfigurations
VLAN in a Bridge with Physical Interface
Scenario
• You want to send tagged traffic out of a physical port
47
Layer 2 Misconfigurations
VLAN in a Bridge with Physical Interface
Problem
• This will work in most cases
• It will cause problems if also using STP/RSTP with other
vendor’s switches because BPDUs are tagged
• Not all switches can understand tagged BPDUs
Symptoms
• Port blocking by RSTP
• Port flapping
• Network loops
48
Layer 2 Misconfigurations
VLAN in a Bridge with Physical Interface
Solution
• Use VLAN filtering as we have just looked at
49
Layer 2 Misconfigurations
Bridged VLANs
Scenario
• You are using VLANs to isolate Layer 2 domains connected to
your switch
• You create VLAN interfaces on each physical interface
50
Layer 2 Misconfigurations
Bridged VLANs
Scenario (cont..)
• Put VLAN interface into a separate bridge for each VLAN
51
Layer 2 Misconfigurations
Bridged VLANs
Problem
• You notice parts of the network are unreachable
• You notice links keep flapping.
Symptoms
• Port blocking by (R)STP
• Port flapping
• Network inaccessible
52
Layer 2 Misconfigurations
VLAN in a bridge with Physical interface
Solution
53
New Features in 6.43
55
DHCP Snooping
• Since 6.43rc56, bridge supports DHCP Snooping
• This limits the ports on which DHCP Offer packets are received
56
Rogue DHCP Server
• Rogue DHCP Server could provide legitimate clients with
bogus TCP/IP Information
• This could prevent them communicating on the network as
their address is incorrect
• This could change their gateway address to a rogue gateway
• They could obtain rogue DNS server settings
57
DHCP Server Spoofing
192.168.0.1
DISCOVER DISCOVER
DHCP Server
DNS Server
192.168.0.10
58
DHCP Server Spoofing
192.168.0.1
DISCOVER DISCOVER
OFFER OFFER
59
DHCP Server Spoofing
192.168.0.1
DISCOVER DISCOVER
OFFER OFFER
DISCOVER
IP = 10.0.0.100 DHCP Server
OFFER
GW = 10.0.0.1 DNS Server
DNS = 10.0.0.1 192.168.0.10
60
DHCP Server Spoofing
192.168.0.1
5.6.7.8
1.2.3.4
DISCOVER DISCOVER
OFFER OFFER
DISCOVER
IP 192.168.0.100 DHCP Server
OFFER
GW 192.168.0.1 DNS Server
DNS 192.168.0.200 192.168.0.10
HSBC.COM = 1.2.3.4
DNS Server
192.168.0.200
HSBC.COM = 5.6.7.8
https://wiki.mikrotik.com/wiki/Manual:Switch_Chip_Features#Bridge_Hardware_Offloading 62
Bridge DHCP Snooping
• Create Trusted Port for port(s) which you want to allow DHCP
ACK messages on
• This is normally ports with DHCP server connected and ports
with other switches on. In this setup its Ether1 and Ether2
64
Bridge DHCP Snooping
• Once ports are configured
• Turn on DHCP Snooping on the bridge
65
Thank you for
Listening
66
References
• Visio Templates – Mikrotik Forum user FernandoSuperGG
https://forum.mikrotik.com/viewtopic.php?f=2&t=120957
• MikroTik Manual
https://wiki.mikrotik.com/wiki/Manual:CRS_Router#CRS3xx_series_switches
https://wiki.mikrotik.com/wiki/Manual:CRS3xx_series_switches
https://wiki.mikrotik.com/wiki/Manual:Layer2_misconfiguration
https://wiki.mikrotik.com/wiki/Manual:Interface/Bridge
https://wiki.mikrotik.com/wiki/Manual:Switch_Chip_Features#Bridge_Hardware_Offloading
67