Week 2 LAN Switching Technologies
Week 2 LAN Switching Technologies
1
Ethernet Basics
Standards Organizations
2
Broadcast & Collision Domains
o Broadcast domains
• Everyone sees all frames
• All ports on a hub or a switch are by default in the same broadcast domain
• All ports on a router are in the different broadcast domains
• routers don’t forward broadcasts from one broadcast domain to another
3
o Collision domains
• Collection of devices that all access a shared medium
• A collision domain is the part of a network where packet collisions can occur
• collision occurs when two devices send a packet at the same time on the
shared network segment
• Each port on a bridge, a switch or a router is in a separate collision domain
4
o CSMA/CD
• Carrier Sense
• Multiple Access
• Collision Detect
5
Distance, Cables, & Duplex
1. Maximum Speed?
• Originally 2.94Mbps (millions-of-bits-per-second)
6
Ethernet Frame Structure
LAB-1:
8
o MAC
• 48-bit addressing system
• Example: aaaa.aaaa.aaaa
9
Ethernet Cabling Details
10
Layer-2 Switching
o Switching History -1
11
o Switching History -2
12
o Switching History -3
13
o Switching History -4
14
Switch
o Switch is a multiport bridge
• More ports than a bridge
• Mixture of port speeds & types
15
o Switch MAC Learning
o Switching forwarding
16
Cisco IOS
17
Introduction to IOS
18
Startup Sequence Of Device
o Cisco routers and switches generally perform the same steps upon initial startup
• Discover device hardware
• Find and load IOS image
• Find and load configuration file.
o Memory Types
• Flash
• NVRAM
• RAM
• ROM
19
Device Access
o Requirements
• Console cable
• Terminal emulator
Hyper Terminal
Putty
Secure CRT
20
Accessing Device via CLI
o Connect console cable into the “console” port of a Cisco device
Copyright © Netmetric-solutions.com
IOS Command Structure
o IOS has a command hierarchy
• Configuration modes
Router(config)# - Global Configuration Mode
Router(config-if)# - Interface Configuration Mode
Router(config-router)# - Router Configuration Mode
22
Initial Configuration Commands
o Prevent syslog and event messages from interrupting CLI input
• Router(config)# no ip domain-lookup
• Router(config-if)# no shutdown
24
Monitoring Memory and Images
o Display current IOS version running
• Router# show version
25
Saving and Deleting Configurations
28
Tasks
o Perform initial configuration on Switch
• Hostname
• Enable password
• Console Password
• Banner
• “Convenience” commands
No ip domain-lookup
Logging synchronous
o Configuration commands
• Switch(config)# interface vlan 1
• Switch(config-if)# ip address <address> <subnet mask>
• Switch(config-if)# no shutdown
• Switch(config-if)# exit
• Switch(config)# ip default-gateway <default-gateway>
30
Verification
o Verification commands
o Configuration on Sw1
• Switch> enable
• Switch(config)# hostname Sw1
• Sw1(config)# interface GigabitEthernet1/0
• Sw1(config-if)# description **Connection to Javed Laptop**
• Sw1(config-if)# switchport mode access
• Sw1(config-if)# no shutdown
32
Configuration Example (Switch-to-Switch)
o Configuration on Sw1
• Switch> enable
• Switch# configure terminal
• Switch(config)# hostname Sw1
• Sw1(config)# interface GigabitEthernet1/0
• Sw1(config-if)# description **Connection to Sw2**
• Sw1(config-if)# switchport mode dynamic desirable
• Sw1(config-if)# no shutdown
33
Configuration Example (Switch-to-Switch)
o Configuration on Sw2
• Switch> enable
• Switch# configure terminal
• Switch(config)# hostname Sw2
• Sw2(config)# interface GigabitEthernet1/0
• Sw2(config-if)# description **Connection to Sw1**
• Sw2(config-if)# switchport mode dynamic desirable
• Sw2(config-if)# no shutdown
34
Basic Troubleshooting
o Check for correct cable type
o Ensure no shutdown command in the interface (disabled
by default)
o For interconnected Access Ports, check for same VLAN
o For interconnected Trunk, verify DTP compatibility
modes
35
Cisco Discovery Protocol (CDP)
CDP
o Cisco proprietary
37
Configuration
oEnabling CDP
• Router(config)# cdp run
• Router(config)# cdp timer <seconds>
oDisabling CDP
• Router(config)# no cdp run
• Router(config-if)#no cdp enable
38
Verifying CDP
o Verification commands
Copyright © Netmetric-solutions.com
39
Netmetric Infosolutions Pvt Ltd #1192, 5th Main, 20th Cross, 7th Sector, HSR Layout, Bangalore - 560102
Link Layer Discovery Protocol (LLDP)
40
LLDP Configuration
41
Verifying LLDP
42
Virtual LANs (VLANs)
Without VLANs…
SALES HR
44
With VLANs…
VLAN 10 VLAN 20
SALES HR
45
VLAN Features
46
VLAN Types
o Data VLAN
o Default VLAN
o Native VLAN
o Management VLAN
o Voice VLANs
Voice VLANs
48
Configuring VLAN
49
Inter-VLAN Routing
50
Inter-VLAN Routing Configuration
o Trunk interface configuration that is
connected to the router
• Switch(config-if)# switchport mode trunk
51
Inter-VLAN Routing Configuration (SVIs)
52
Configuration Example
53
o Verification commands
• Switch# show mac address-table
54
Types of Switch Ports
o Access Ports
• belong to and carry the traffic of only one VLAN
o Trunk Ports
• Carry the traffic of multiple VLANs and by default is a member of all
VLANs in the VLAN database
55
Configuring Access Ports
o Access Port = Switchport config single broadcast domain (VLAN)
o Verification commands
• Sw1# show vlan <brief>
• Sw1# show interface <type><number> switchport
56
VLAN Trunks
57
Trunk Port
o Can have two or more VLANs configured
o Can carry multiple VLAN information
o By default, all the VLAN traffic is allowed
from a trunk port
58
Trunking Encapsulation
o 802.1Q
• Open standard
• Switch(config-if)#end
61
Verifying Trunk
62
Dynamic Trunking Protocol (DTP)
63
Dynamic Trunking Protocol
o Cisco proprietary feature that allows Cisco switches to
negotiate trunk dynamically
o Three modes:
• Auto
• On
• Desirable
o Disabling DTP
• Switch(config-if)# switchport nonegotiate
o Verification command
• Switch# show interface trunk
• Switch# show interface <interface> switchport
VTP (VLAN Trunking Protocol)
66
VTP
o CISCO proprietary protocol
67
Requirements
There are some requirements for VTP to communicate
VLAN information between switches. These are:
68
VTP Modes
o Server
• Default Mode
• Creates, Modifies and Deletes VLANs
• Synchronizes VLAN configurations
• Saves configurations in NVRAM
o Client
• Cannot Add, Modify and Delete VLANs
• Does not saves VLAN information permanently instead learns it from the Server every time it boots up
• Forwards advertisements
• Synchronize VLAN configurations
o Transparent
• Can Add, Modify and Delete VLAN configurations
• Does not synchronize VLAN configurations
• Forward advertisements
• Saves in NVRAM
69
VTP Configuration
1. Configure TRUNK
SW1(config-if)#switchport trunk encapsulation dot1q
SW1(config-if)#switchport mode trunk
70
Configuration revision number
o VTP Switches use an index called the VTP Configuration
Number to keep track of the most recent information.
o The VTP advertisement process always starts with
configuration revision number 0 (zero)
o When subsequent changes are made on a VTP server, the
revision number is incremented before the advertisements
are sent
71
o Before adding a switch to an existing VTP domain, ensure a
new switch has VTP Configuration Revision number is 0
72
VTP Message Types
o Summary Advertisements
• In 5 minute intervals, a VTP server will send a Summary Advertisement
to it’s adjacent switches. Included in this VTP Summary Advertisement is
the VTP domain name and configuration revision number
o Subset Advertisements
• Changes made to VLANs will increment the configuration revision
number and issue a Summary Advertisement followed by one or more
subset advertisements. The Subset Advertisement is what holds the
VLAN information
o Advertisement Requests
• When a switch needs VTP information it sends an Advertisement
Request. This request is sent if the switch has been reset, VTP domain
name has changed, or it received a VTP Summary Advertisement with a
higher configuration revision.
73
VTP Pruning
• THE BROADCAST AND UNICAST PROBLEM IN VLAN NETWORKS
• How these broadcasts can actually create problems by flooding the
VLAN network with unnecessary traffic, and depending on your
network setup, this can prove to be a huge problem. The reason for
this is because the trunk links interconnecting your network switches
will carry these broadcasts to every switch in the network, regardless
of which VLAN the broadcast is intended for.
VTP Pruning
VTP Pruning
• VTP Pruning eliminates the need to statically remove VLANs from the
allowed trunking list of a port by having the switches automatically
communicate to each other which VLANs they have locally assigned or are in
the transit path for.
• VTP Pruning as you might have already guessed solves the above problem
by reducing the unnecessary flooded traffic described previously. This is
done by forwarding broadcasts and unknown unicast frames on a VLAN over
trunk links only if the receiving end of the trunk has ports in that VLAN.
• Note that transparent switches cannot participate in pruning because they
do not read the payload of the VTP updates they are receiving from their
adjacent neighbors.
VTP Pruning
SUPPORT FOR VTP PRUNING
• The VTP Pruning service is supported by both VTP 1 and VTP 2 versions of the VTP
protocol. With VTP 1, VTP pruning is possible with the use of additional VTP message
types.
• When a Cisco Catalyst switch has ports associated with a VLAN, it will send an
advertisement to its neighboring switches informing them about the ports it has
active on that VLAN. This information is then stored by the neighbors and used to
decide if flooded traffic from a VLAN should be forwarded to the switch via the trunk
port or not.
• By default, VLANs 2–1000 are eligible for pruning. VLAN 1 has a special meaning
because it is normally used as a management VLAN and is never eligible for pruning,
while VLANs 1001–1005 are also never eligible for pruning. If the VLANs are
configured as pruning-ineligible, the flooding continues as illustrated in our examples.
Spanning Tree Protocol (STP)
79
Bridging Loops
E0/2 E0/4
PC1 PC2
80
Bridging Loops
E0/2 E0/4
PC1
81
IEEE 802.1d
82
IEEE 802.1d Timers
oHello (2 seconds)
oForwarding Delay
83
STP Port States
o Disabled
• Port that is in the down state, usually not part of STP topology
o Blocking
• Port that is only allowed to receive the BPDU
• Cannot send or receive data or add MAC addresses on its port
o Listening
• Port that is allowed to send and receive BPDU
• Can actively participate in the STP
• Cannot send or receive data
84
o Learning
• Allowed to send and receive BPDU
• Can learn MAC addresses to add its address table
• Cannot send or receive data
o Forwarding
• Port that transitions to the forwarding state when the
forwarding delay expires
• Can send and receive BPDU
• Can send and receive user data
85
STP operation steps
o Root Bridge
• Elects root bridge based on
the lowest BID, where BID
consists of priority and MAC
o Bridge priority
• By default, STP bridge has priority of 32768
• Can be configured in increments of 4096
o Designated Ports
• Every Collision Domain requires one Designated Port
• This port is responsible for transmitting BPDUs into the Collision Domain
• DP = Port that has the least-cost path back to the Root Bridge
• All ports on the Root Bridge are designated Ports.
• Designated Ports are always in the FORWARDING “state”.
86
o Once Root Bridge is elected, all other bridges/switches stop generating
BPDUs
o After Root Bridge is elected…every other bridge elects its own, local Root
Port
87
oRoot Port is a Spanning-Tree “Port Role”
• Port on local switch with shortest,
cumulative path-cost upstream to Root
Bridge.
• Receives BPDUs from upstream neighbors
• Always in the Forwarding state.
88
Port Costs
o Every interface assigned an STP Cost value
89
STP Calculation
90
Spanning Tree Configurations
o Per-VLAN Spanning Tree
• PVST = Cisco Default
• Number of STP instances depends on number of VLANs
• Effective where load sharing is required
• BPDU is sent for each VLAN
91
o Verification commands
92
oConfiguring priority per VLAN
93
BPDU Protection
o Portfast
94
Portfast Operation & Restrictions
95
Portfast Configuration
o Configuration
• (config-if)#spanning-tree portfast
• OR
• (config)#spanning-tree portfast default
o Verification
• Switch#show spanning-tree interface <type/number>
portfast
96
BPDU Guard
o Configuration
• (config-if)#spanning-tree bpduguard enable
• (config)#spanning-tree portfast bpduguard default
97
BPDU Filter
98
Verifying BPDU Guard/Filter
o Switch# show spanning-tree interface <interface> detail
100
What is RSTP
o 802.1w
• Was first incorporated into 802.1D-2004
• Cisco’s mode of RSTP
• RPVST/RPVST+
101
RSTP Port States
oDiscarding
• Combines the 802.1d disabled, blocking, and listening states
• No MAC addresses are learned and incoming frames are
dropped
oLearning
• Cannot send or receive data
• MAC addresses are learned
oForwarding
• Can send and receive data
102
Configuring & Verifying RSTP
oVerifying RSTP
• Sw1# show spanning-tree summary
103
EtherChannel
104
Features
105
PAgP
o Cisco proprietary
o Modes
• On
No negotiation/forces the channel
• Desirable
Sends PAgP initiation messages
• Auto
Passively listens to the PAgP messages
106
107
LACP
o IEEE 802.3ad standard
o Modes
• On
No negotiation/forces the channel
• Active
Sends LACP initiation message
• Passive
Passively listens to the LACP
request
108
109
EtherChannel Modes
110
EtherChannel Configuration & Verification
o Configuration commands
Switch(config-if)# channel-group <group
number> mode <mode>
o Verification commands
Switch# show etherchannel summary
111