Documente Academic
Documente Profesional
Documente Cultură
com
Layer 2 Technologies
www.INE.com
Copyright © www.INE.com
1
www.INE.com
VLANs
• Virtual Local Area Network
– Used to separate ports into different broadcast domains
– Hosts in the same VLAN share the same broadcast domain
– Switches create a separate CAM table per VLAN
– Traffic inside the VLAN is layer 2 switched
– Traffic to outside or between VLANs must be layer 3 routed
• Can span multiple physical switches
– “VLAN Trunks” or simply “Trunks” carry traffic for multiple
VLANs between switches on uplinks
Copyright © www.INE.com
VLAN Numbering
• VLAN membership defined by number
• 12-bit field (0-4095)
– 0 & 4095 reserved per 802.1Q standard
• Normal VLANs 1-1005
– 1 – Default Ethernet VLAN
– 1002/1004 – Default FDDI VLANs
– 1003/1005 – Default Token Ring VLANs
• Extended VLANs 1006-4094
Copyright © www.INE.com
2
www.INE.com
VLAN Trunks
• Trunk links are used to transport traffic for multiple
VLANs between devices
• Traffic sent over a trunk link receives special
trunking encapsulation
– Normal Ethernet header does not have a field for VLAN
number
– ISL or 802.1Q headers are added to include this
information
Copyright © www.INE.com
Trunking Encapsulations
• Both ISL and 802.1Q accomplish the same goal of encoding VLAN
number in frame header to separate traffic
• The key differences are…
– ISL
• Cisco proprietary
• 30-byte encapsulation for all frames
– 26-byte header
– 4-byte trailer (FCS)
• Does not modify original frame
– 802.1Q
• IEEE standard
• 4-byte tag except for “native” VLAN
• Modifies original frame
– See Inter-Switch Link and IEEE 802.1Q Frame Format for more info
Copyright © www.INE.com
3
www.INE.com
Copyright © www.INE.com
Dynamic Switchports
• Dynamic switchports automatically choose whether to
run in access or trunking mode
• Runs Dynamic Trunking Protocol (DTP) to negotiate, in
order…
– ISL trunk
– 802.1Q trunk
– Access port
• Configured as switchport mode dynamic
[auto|desirable]
• Disabled with switchport nonegotiate or
switchport mode access
Copyright © www.INE.com
4
www.INE.com
VLAN Administration
• In order for devices to be in the same
broadcast domain, VLAN numbers must be
consistent and inter-switch links must run
trunking
• As layer 2 network size grows, managing
VLAN numbers and trunk allowed lists
involves large administrative overhead
• VTP solves this administration problem
Copyright © www.INE.com
VTP Overview
• VLAN Trunk Protocol
• Cisco proprietary
• Used to dynamically…
– Advertise addition, removal, modification of VLAN properties
• Number, name, etc.
– Negotiate trunking allowed lists
• “VTP Pruning”
• Does not affect actual VLAN assignments
– Still manually needed with switchport access vlan
[vlan]
Copyright © www.INE.com
5
www.INE.com
Copyright © www.INE.com
VTP Domains
• VTP domain name controls which devices can
exchange VTP advertisements
• VTP domain does not define broadcast domain
– Switches in different VTP domains that share same VLAN
numbers hosts’ are still in the same broadcast domain
• Configured as vtp domain [name]
• Defaults to null value
– Switch inherits VTP domain name of first advertisement it
hears
Copyright © www.INE.com
6
www.INE.com
Copyright © www.INE.com
Copyright © www.INE.com
7
www.INE.com
VTP Security
• VTP susceptible to attacks or
misconfiguration where VLANs are deleted
– Access ports in a VLAN that does not exist cannot
forward traffic
• MD5 authentication prevents against attack
– vtp password [password]
• Does not prevent against misconfiguration
– VTP transparent mode recommendation
Copyright © www.INE.com
8
www.INE.com
VTP Pruning
• Broadcasts and unknown unicast/multicast frame
are flooded everywhere in the broadcast domain
– Includes trunk links
• Editing allowed list limits this flooding, but large
administrative overhead
• VTP pruning automates this procedure
– Switches advertise what VLANs they need
– All other VLANs are pruned (removed) off the trunk link
• Does not work for transparent mode
Copyright © www.INE.com
Spanning-Tree Protocol
• Used to build a loop free layer 2 network
– E.g. prevents broadcast storms
• STP Variations
– 802.1D
• Common Spanning Tree (CST)
– PVST/PVST+
• Cisco’s Per-VLAN Spanning-Tree
– 802.1w
• Rapid Spanning-Tree Protocol (RSTP)
– 802.1s
• Multiple Spanning-Tree Protocol (MST/MSTP)
Copyright © www.INE.com
9
www.INE.com
Copyright © www.INE.com
Copyright © www.INE.com
10
www.INE.com
11
www.INE.com
802.1D Convergence
• CST convergence based on timers set on root bridge
– Hello
– Forward Delay
– Max Age
• TCN BPDUs used to notify root bridge of changes
– Flows up the tree to root, root replies with ACK
– CAM aging time set to Forward Delay to flush MAC
addresses
Copyright © www.INE.com
PVST/PVST+
• Per VLAN STP
– One instance of Legacy STP per VLAN
– Cisco ISL support
• PVST+
– One instance of Legacy STP per VLAN
– Cisco ISL and 802.1Q support
– Provides interoperability between CST and PVST
– Default mode on most Catalyst platforms
– Allows root bridge/port placement per VLAN
Copyright © www.INE.com
12
www.INE.com
Copyright © www.INE.com
13
www.INE.com
802.1w STP
• Rapid Spanning-Tree Protocol
– Rapid convergence based on sync process
– Allows for faster initial convergence
• Simplifies port states
– Discarding, Learning, & Forwarding
• All bridges generate BPDUs
– Send out all every Hello interval
– If three Hellos are missed neighbor is declared down and CAM
is immediately flushed
– Allows for faster reconvergence
• Runs backwards compatibility with 802.1D
Copyright © www.INE.com
802.1s STP
• Multiple Spanning-Tree Protocol
– User defined instances are separate from VLANs
– PVST+ uses one instance per VLAN
• Uses 802.1w for rapid convergence
• Highly scalable
– Switches with same instances, configuration revision
number, and name form a “region”
– Different regions see each other as virtual bridges
Copyright © www.INE.com
14
www.INE.com
EtherChannel
• Used to aggregate bandwidth of physical links
– Same logic as PPP Multilink
• Consists of two parts
– Port-Channel interface
• Logical interface representing the link bundle
– Members interfaces
• Physical links part of a link bundle
• Channel can be any type of interface
– i.e. layer 2 access, trunk, tunnel, or layer 3 routed
Copyright © www.INE.com
EtherChannel Negotiation
• channel-group [number] mode [mode]
• Mode determines how negotiation occurs
– On
• No negotiation
– Desirable & Auto
• Initiate or listen for PAgP
– Active & Passive
• Initiate or listen for LACP
• PAgP vs. LACP
– Like ISL vs. 802.1q
Copyright © www.INE.com
15
www.INE.com
Copyright © www.INE.com
Copyright © www.INE.com
16
www.INE.com
Copyright © www.INE.com
Copyright © www.INE.com
17
www.INE.com
Full Mesh
• Topology where all devices have a direct
layer 2 circuit to each other
• More closely emulates a LAN
• More expensive to provision
Copyright © www.INE.com
18
www.INE.com
Copyright © www.INE.com
19