Professional Documents
Culture Documents
Preamble SFD Dest. MAC Source MAC Type Data and Pad FCS
7 1 6 6 2 46 - 1500 4
Layer 2 vs. Multilayer switches
MAC Address Structure
Organizationally
Assigned by Vendor
Unique Identifier (OUI)
SWITCH
PORT MAC ADDRESS
Gig 1/0 AAAA.AAAA.AAAA
Gig 1/1 BBBB.BBBB.BBBB
One Collision
Ethernet Domain
Hub
Collision Domains
Four Collision
Ethernet Domains
Switch
Broadcast Domains
One Broadcast
Ethernet Domain
Hub
Broadcast Domains
One Broadcast
Ethernet Domain
Switch
Broadcast Domains
Trunk
VLAN 100
VLAN 200
VLAN 300
Local VLANs
TRU TRUN
TRU NK K
NK
VLAN 400
VLAN 500
VLAN 600
TRU TRUN
TRU NK K
NK
VLAN 100
VLAN 200
VLAN 300
TRUNK
End-to-End VLANs
TRU TRUN
TRU NK K
NK
VLAN 100
VLAN 200
VLAN 300
VLAN Demo
Trunks
Trunks
IEEE 802.1Q Frame Format
Dynamic Trunk Protocol
Mode Description
SW1 access Forces a port to operate as an access port.
trunk Forces a port to operate as a trunk port.
dynamic desirable Initiates the negotiation of a trunk.
dynamic auto Passively waits for the remote switch to initiate the negotiation of a trunk.
nk
802.1Q Tru
Switch B
Radia Perlman
Switch C - Working at DEC
- Develops Spanning Tree Protocol (STP)
R1 R2
Issues without STP
No TTL
Switch A Switch B
MAC Address Table Corruption
Switch A’s MAC Address Table
Port MAC Address
PC A
Gig 1/0/1
Gig 1/0/2
MAC: AAAA.AAAA.AAAA
Switch A Switch B
Gig 1/0/2 Gig 1/0/2
Switch A Switch B
Gig 1/0/2 Gig 1/0/2
PC B
STP Port States
Priority: 32768
MAC Address: 1111.1111.1111
/ 1
SW1 Gig
0/2
ig 0
G
Gig
0 / 1 0/1
Gig
Gig 0/2 Gig 0/2
SW2 SW3
Priority: 32768 Priority: 32768
MAC Address: 2222.2222.2222 MAC Address: 3333.3333.3333
The Four Questions
• Who is the Root Bridge?
• What are the Root Ports?
Switch A Gi
g /7 Switch B
1/ /0
1
Gig 1/0/4
0/
3
Gig 1/0/5
10 ig
0/
G
Gig 1/
1
Gig 1/0/10
Gig 1/0/2
0/
Gi
/
/2
1
/0 g
1/
g
1 0/
g
Gi
Gi 1
Switch C Switch D
MAC Address: 0018.c894.1a04 MAC Address: 000d.4cf1.570c
Priority: 32768 Priority: 32768
STP Convergence Times
STP Convergence Times
Network Segment 1 (FastEthernet (100 Mbps): Cost = 19)
Forwarding
Learning (15 sec)
Listening (15 sec)
Total: 50 seconds
Blocking (20 sec)
PVST
PVST+
MAC Address: fcfb.fb97.a980
VLAN 1 Priority: 24576
VLAN 2 Priority: 28672
SW1
Fa
1/
Fa 1/0/13
0/
14
• Per-VLAN Spanning
Tree (PVST)
• Each VLAN runs its
own instance of STP
• The “+” indicates the
switches are
Fa 0/3
interconnected via Fa
802.1Q trunks 0/
3
Fa 0/1 Fa 0/1
Fa 0/2 Fa 0/2
SW2 SW3
MAC Address: 0011.bbda.ea00 MAC Address: 0014.69ac.2000
VLAN 1 Priority: 28672 VLAN 1 Priority: 32768
VLAN 2 Priority: 24576 VLAN 2 Priority: 32768
PVST+ Configuration
MSTP Theory
MSTP
Switch A Switch B
• Multiple Spanning
Trees Protocol (MSTP)
• Also written as Switch C
“Multiple Spanning Tree
Protocol (MST)”
• IEEE 802.1s Instance VLANs Root
1 1, 2, 3, 4 Switch A
2 5, 6, 7, 8 Switch B
Rapid PVST+ Theory
Rapid PVST+ Port Roles
Root Bridge
SW1
De
sig
Designated (FWD)
na
te
d(
FW
D) Hub
Designated (FWD)
Backup (BLK)
Root (FWD)
Ro
o t (F
W
D)
Learning The switch is learning MAC addresses available off of the port. (Seen when a port is transitioning to Forwarding.)
Forwarding Data is being forwarded on the port. (Seen on Root and Designated ports.)
Link Types
SW1
Hub
SW2 SW3
Rapid STP Synchronization
SW1
SW2
SW3
Rapid PVST+
Configuration
PortFast
PortFast Root Bridge
Core
Layer SW1
• Configured on ports
connecting to network
endpoints
• Can be enabled globally or Distribution SW2 SW3
on a port-by-port basis
(for non-trunking ports) Layer
PC1
• src-mac
D 1101
PAgP Port Negotiation
Switch A Switch B
On
Auto
Desirable
LACP Port Negotiation
Switch A Switch B
On
Passive
Active
EtherChannel Demo
Module 5
IP Routing
Review of the Routing
Process
Source IP: 192.168.1.2
Destination IP: 192.168.2.2
Routing Packets
DG: 192.168.1.1
Server
.2 .2 BBBB.BBBB.BBBB
Switch 1 Switch 3
Laptop
AAAA.AAAA.AAAA
192.168.2.0 /24
192.168.1.0 /24
192.168.1.1 1111.1111.1111
Gig 1
Gig 1
10.1.1.0 /24
.1 4444.4444.4444 .1
192.0.2.0 /30
.1 .2 .1 Internet
Gig 2 Switch 2 Gig 2
R1 R2 Gig 3
2222.2222.2222 3333.3333.3333 5555.5555.5555
Source IP: 192.168.1.2
Destination IP: 192.168.2.2
Routing Packets
DG: 192.168.1.1
Server
.2 .2 BBBB.BBBB.BBBB
Switch 1 Switch 3
OutgoingLaptop
Interface or Next
Network
AAAA.AAAA.AAAA
Hop
192.168.2.0 /24
192.168.1.0 /24
10.1.1.0 /24
.1 4444.4444.4444 .1
192.0.2.0 /30
.1 .2 .1 Internet
Gig 2 Switch 2 Gig 2
R1 R2 Gig 3
2222.2222.2222 3333.3333.3333 5555.5555.5555
Source IP: 192.168.1.2
Destination IP: 192.168.2.2
Routing Packets
DG: 192.168.1.1
Server
.2 .2 BBBB.BBBB.BBBB
Switch 1 Switch 3
Laptop
AAAA.AAAA.AAAA Outgoing Interface or
192.168.2.0 /24
192.168.1.0 /24
Network
Next Hop
192.168.1.0 /24 10.1.1.1
10.1.1.0 /24 Gig 2 (Directly Connected)
1111.1111.1111
10.1.1.0 /24
.1 4444.4444.4444 .1 0.0.0.0 /0 Gig 3 (Directly Connected)
192.0.2.0 /30
.1 .2 .1 Internet
Gig 2 Switch 2 Gig 2
R1 R2 Gig 3
2222.2222.2222 3333.3333.3333 5555.5555.5555
Administrative Distance
Administrative Distance
This way to Here’s how to
10.1.1.0 /24 reach 10.1.1.0 /24
R1 R2
R5
RIP
OSPF
EIGRP
BGP
Static Routes
Static Default Route
•Link State Advertisement (LSA): Information a router sends and receives about network
reachability (used to construct a router’s Link State Database)
•Link State Request (LSR): Used by a router to request specific LSA information from a
neighbor
• Have exchanged Link State Updates (LSUs) and Database Description (DD) packets
R1 R2
R3 R4
R5 R6
DR R1 R2 BDR
R3 R4
R5 R6
• 224.0.0.5 - All OSPF routers
• 224.0.0.6 - All designated routers
DR and BDR Election
Highest Router Priority Wins
• Carried in Hello packet
• Configured in interface configuration mode:
- Router(config-if)# ip ospf priority number
- A priority of 0 prevents a router from participating in the election.
R4
TIE BREAKER: Highest Router ID Wins
• Configured in router configuration mode:
- Router(config-router)# router-id id
• If there’s no configured Router ID, the highest IP address on a Loopback interface wins.
• If there’s no Loopback interface, the highest IP address on an interface that’s up wins.
OSPF Cost
OSPF Cost
Cost = Reference BW / Interface BW
The default reference bandwidth is 100,000,000 bits per second (100 Mbps).
R2 Cost for R1-R2-R3 = 1 + 1 + 1 = 3
Cost = 100 Mbps / 100 Mbps = 1 Cost for R1-R3 = 10 + 1 = 11
Cost = 1
R1 Cost = 100 Mbps / 10 Mbps = 10 R3
Cost = 10 10 Mbps
100 Mbps 100 Mbps Cost = 1
SW1 SW2
PC1 10.1.1.100 /24 192.168.1.100 /24
PC2
OSPF Network Types
Broadcast Network Type
R1
R2 SW1 R3
• Broadcast is the default OSPF network type for any Ethernet interface.
• DR and BDR routers are elected.
• All routers have interfaces that share a subnet.
Point-to-Point Network Type
R1 SW1 R2
• Point-to-Point DR is the default OSPF network type on a non-Frame Relay serial interface.
• DR and BDR routers are not elected.
• Both routers have interfaces that share a subnet.
OSPF Areas
OSPF Areas
R1 R3 R7 R9
Area 1 Area 2 ]
R5
R4 R6
Area 0
LSA Types
LSA Types
R1R1 R2
R2 R3
Type 3 LSAs
Area 0 Area 1
• Type 1 LSA: A Router LSA is created by each router and contains information about that router’s directly attached networks.
• Type 2 LSA: A Network LSA is created for each transit network within an area on which a DR is elected.
• Type 3 LSA: A Summary LSA is sent from one area to another and is used to advertise a network in the source area.
Wildcard Mask
255.255.255.255 255.255.255.255
- Subnet Mask - 255.255.255.0
255.255.255.255 255.255.255.255
- Subnet Mask - 255.255.255.252
Wildcard Mask 0. 0. 0. 3
OSPFv2 Configuration
OSPF Topology
AREA 0 AREA 1
Packet Tracer Labs
• VLANs: Create, Delete, and Assign a Port to a VLAN
Homework • Trunking: Creating Trunks with DTP
• Spanning Tree Protocol (STP)
• Static Route Video: https://bit.ly/static-route
• EtherChannel
• OSPF
Q&A