27
Switched Ethernet Virtual LANs Computer Networks Lecture 4

Switched Ethernet Virtual LANs - vsb.czwiki.cs.vsb.cz/pos/images/d/d5/Switching_VLAN.pdf · Parameters of LAN Switches Number of MAC addresses per port Allows to connect just one

  • Upload
    others

  • View
    4

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Switched Ethernet Virtual LANs - vsb.czwiki.cs.vsb.cz/pos/images/d/d5/Switching_VLAN.pdf · Parameters of LAN Switches Number of MAC addresses per port Allows to connect just one

Switched EthernetVirtual LANs

Computer NetworksLecture 4

Page 2: Switched Ethernet Virtual LANs - vsb.czwiki.cs.vsb.cz/pos/images/d/d5/Switching_VLAN.pdf · Parameters of LAN Switches Number of MAC addresses per port Allows to connect just one

2

Switched Ethernet

Page 3: Switched Ethernet Virtual LANs - vsb.czwiki.cs.vsb.cz/pos/images/d/d5/Switching_VLAN.pdf · Parameters of LAN Switches Number of MAC addresses per port Allows to connect just one

3

LAN Switches

Behave as bridges (operates in the logical tree topology)

Switching is implemented by hardware (CAM table)Low latencySwitch frames between multiple segments simultaneously

Page 4: Switched Ethernet Virtual LANs - vsb.czwiki.cs.vsb.cz/pos/images/d/d5/Switching_VLAN.pdf · Parameters of LAN Switches Number of MAC addresses per port Allows to connect just one

4

Switching Advantages

collision-free => higher overall transfer rateNo data loss due to collisionsDifferent pairs of network segments may communicate at the same time

switch may potentially enforce more deterministic network behaviour

Such as frame priorities, flow control etc.better security – only frames destined for a node are passed to its NIC (after a CAM table is learned)

Makes eavesdropping more difficultEasiest network maintenance

Isolation of faulty segmentbroadcast-storm controlintruder detection (using source MAC addresses)

Page 5: Switched Ethernet Virtual LANs - vsb.czwiki.cs.vsb.cz/pos/images/d/d5/Switching_VLAN.pdf · Parameters of LAN Switches Number of MAC addresses per port Allows to connect just one

Switching MethodsStore-and-forward – the whole frame is read into memory, CRC is checked then and after that the frame is forwarded to the destination port

Inevitable in case of asymmetric switching, i.e. switching between segments with various port bandwidths

Cut-through – The frame is being transmitted just after the destination MAC address is readFragment Free (sometimes called differently)

Combines advantages of the two previous methodsOperates as Cut-through, but the beginning of the transmission is delayed until there may not happen a collision on the source port (provided that the physical network cabling is desiged properly)Useful in network designs that combine switches and hubs (group switching)

Page 6: Switched Ethernet Virtual LANs - vsb.czwiki.cs.vsb.cz/pos/images/d/d5/Switching_VLAN.pdf · Parameters of LAN Switches Number of MAC addresses per port Allows to connect just one

6

Parameters of LAN SwitchesNumber of MAC addresses per port

Allows to connect just one station or a hub (group switching)

Total number of MAC addresses (number of rows in the CAM table)Methods of address-to-port assignment

Dynamic (self-learning, flooding of frames with unknown addresses) Static (supports an intruder detection)

Administration method and port monitoring capabilities – Telnet, SNMP, WWW SPAN ports (Switched Port Analyser)Additional functions

Multicast processingTraffic filtering, VLAN support, …

Page 7: Switched Ethernet Virtual LANs - vsb.czwiki.cs.vsb.cz/pos/images/d/d5/Switching_VLAN.pdf · Parameters of LAN Switches Number of MAC addresses per port Allows to connect just one

7

Half-duplex and Full-duplexmode in switched networks

Full duplexcollision-free, longer reach (no timing requirements for CSMA/CD)

Half duplexthe switch port and station's NIC contend for the medium (collisions may occur)

Every switch port may operate in different mode

Half duplex is still supported because of the old NICs and backward compatibility

Page 8: Switched Ethernet Virtual LANs - vsb.czwiki.cs.vsb.cz/pos/images/d/d5/Switching_VLAN.pdf · Parameters of LAN Switches Number of MAC addresses per port Allows to connect just one

8

Virtual LANs (VLAN)

Page 9: Switched Ethernet Virtual LANs - vsb.czwiki.cs.vsb.cz/pos/images/d/d5/Switching_VLAN.pdf · Parameters of LAN Switches Number of MAC addresses per port Allows to connect just one

9

Principle of VLANs (single switch)

Page 10: Switched Ethernet Virtual LANs - vsb.czwiki.cs.vsb.cz/pos/images/d/d5/Switching_VLAN.pdf · Parameters of LAN Switches Number of MAC addresses per port Allows to connect just one

10

Principle of VLANs (multiple switches)

Trunk links

Frame tag

B

A

A B

Page 11: Switched Ethernet Virtual LANs - vsb.czwiki.cs.vsb.cz/pos/images/d/d5/Switching_VLAN.pdf · Parameters of LAN Switches Number of MAC addresses per port Allows to connect just one

11

Trunk links

Carry traffic of multiple VLANs We may specify VLANs that are allowed on particular trunk line

Normal (non-trunk, access) ports belongs just to a single VLAN

The assignment is most often configured permanently

Frames are appended with IEEE 802.1q header on trunk links to differentiate traffic of different VLANs

Page 12: Switched Ethernet Virtual LANs - vsb.czwiki.cs.vsb.cz/pos/images/d/d5/Switching_VLAN.pdf · Parameters of LAN Switches Number of MAC addresses per port Allows to connect just one

802.1q Header

VLAN ID is placed at the beginning of frame data fieldtogether with specification of the frame priority (802.1p)

The presence of 802.1q header is indicated by a dedicated EtherType value

The original EtherType value is moved into the frame data part behind the 802.1q header

Page 13: Switched Ethernet Virtual LANs - vsb.czwiki.cs.vsb.cz/pos/images/d/d5/Switching_VLAN.pdf · Parameters of LAN Switches Number of MAC addresses per port Allows to connect just one

13

Usage of VLANs

Allows to create a logical topology different of the physical network topology

Just by software configuration of LAN switches, no cabling changes needed

Allows to separate various user and traffic types (priorities) on the same physical infrastructure

Page 14: Switched Ethernet Virtual LANs - vsb.czwiki.cs.vsb.cz/pos/images/d/d5/Switching_VLAN.pdf · Parameters of LAN Switches Number of MAC addresses per port Allows to connect just one

14

Advantages of Network Segmentation (most often implemented using VLANs)

Network segmentationLimits the processing of broadcasts by stations not involved in the communication

Increased securitySeparation of different traffic types regardless of the physical topology

Changes made easily just by configuration of switches

Telnet, WWW, SNMP

Page 15: Switched Ethernet Virtual LANs - vsb.czwiki.cs.vsb.cz/pos/images/d/d5/Switching_VLAN.pdf · Parameters of LAN Switches Number of MAC addresses per port Allows to connect just one

15

An Equivalent Layer 3 Topology Corresponding to a Network with VLANs

VLAN A

VLAN BSW 1

SW 1 A

SW 1 B

How the topology would look like if we replaced logical topology with VLANs with physical topology featuring individual switchesThe view from network layer of ISO-OSI model

But we still include the L1 and L2 devices to make the network model easier to understand

Page 16: Switched Ethernet Virtual LANs - vsb.czwiki.cs.vsb.cz/pos/images/d/d5/Switching_VLAN.pdf · Parameters of LAN Switches Number of MAC addresses per port Allows to connect just one

16

Behaviour of direct interconnection between ports at different VLANs

VLAN A VLAN B

SW 1 SW 2

No VLAN tagging on standard ports with stations→ frame leaving VLAN A on SW1 will be placed to VLAN B on SW2Some managed switches may contain manufacturer specific protocol to exchange information about VLANs on given port → VLAN mismatch warning messages

Page 17: Switched Ethernet Virtual LANs - vsb.czwiki.cs.vsb.cz/pos/images/d/d5/Switching_VLAN.pdf · Parameters of LAN Switches Number of MAC addresses per port Allows to connect just one

17

Optimizations of VLAN Operation

Page 18: Switched Ethernet Virtual LANs - vsb.czwiki.cs.vsb.cz/pos/images/d/d5/Switching_VLAN.pdf · Parameters of LAN Switches Number of MAC addresses per port Allows to connect just one

18

Flooding of broadcasts and Frames with Unknown Destination Address

Trunk links

Page 19: Switched Ethernet Virtual LANs - vsb.czwiki.cs.vsb.cz/pos/images/d/d5/Switching_VLAN.pdf · Parameters of LAN Switches Number of MAC addresses per port Allows to connect just one

19

VLAN Filtering on Trunk Links

Only frames of the greenand blue VLAN

may pass the line

Page 20: Switched Ethernet Virtual LANs - vsb.czwiki.cs.vsb.cz/pos/images/d/d5/Switching_VLAN.pdf · Parameters of LAN Switches Number of MAC addresses per port Allows to connect just one

20

Automatic Pruning

No (active) switch port belongs to red VLAN,do not sent red VLAN frames to me(prune the red VLAN tree)

Page 21: Switched Ethernet Virtual LANs - vsb.czwiki.cs.vsb.cz/pos/images/d/d5/Switching_VLAN.pdf · Parameters of LAN Switches Number of MAC addresses per port Allows to connect just one

21

Other VLAN Applications

Page 22: Switched Ethernet Virtual LANs - vsb.czwiki.cs.vsb.cz/pos/images/d/d5/Switching_VLAN.pdf · Parameters of LAN Switches Number of MAC addresses per port Allows to connect just one

22

„Router-on-the-stick“(routing between VLANs)

Page 23: Switched Ethernet Virtual LANs - vsb.czwiki.cs.vsb.cz/pos/images/d/d5/Switching_VLAN.pdf · Parameters of LAN Switches Number of MAC addresses per port Allows to connect just one

23

Trunk Link to Server with a VLAN-capable NIC

Page 24: Switched Ethernet Virtual LANs - vsb.czwiki.cs.vsb.cz/pos/images/d/d5/Switching_VLAN.pdf · Parameters of LAN Switches Number of MAC addresses per port Allows to connect just one

24

Where One Can See the 802.1q Headers ?

On trunk links between switchesSwitch port has to be explicitly configured as trunk

On trunk link between switch and routerUsed for inter-VLAN routing

On trunk link between switch and VLAN-capable server NIC

Whenever a frame is forwarded to a non-trunk port assigned to a single VLAN, 802.1q header is removed

Page 25: Switched Ethernet Virtual LANs - vsb.czwiki.cs.vsb.cz/pos/images/d/d5/Switching_VLAN.pdf · Parameters of LAN Switches Number of MAC addresses per port Allows to connect just one

25

VLAN Membership

Page 26: Switched Ethernet Virtual LANs - vsb.czwiki.cs.vsb.cz/pos/images/d/d5/Switching_VLAN.pdf · Parameters of LAN Switches Number of MAC addresses per port Allows to connect just one

26

Assignment of User Stations into VLANs

static (port-based) – most common

dynamic – according to a station MAC adress, L3 protocol, ...

switches ask the VLAN Membership Server (VMPS) for station-to-VLAN membership whenever they see a new MAC address on a port with dynamic VLAN membership configuredonly some proprietary solutions are available today for this task

Page 27: Switched Ethernet Virtual LANs - vsb.czwiki.cs.vsb.cz/pos/images/d/d5/Switching_VLAN.pdf · Parameters of LAN Switches Number of MAC addresses per port Allows to connect just one

27

Dynamic VLAN Assignment(Cisco proprietary solution)

User device with a given MAC address(sends e.g. DHCP request after booting)

VMPS server

VMPS client

Database of MAC address to VLAN

assignments(+ specification of Default

VLAN)

VLAN Query Protocol (VQP)