You are on page 1of 100

Day 2 of 4

We will begin at the


top of the hour.
Welcome! We will begin at 10:00 AM Eastern Daylight Time.
Day 2 of 4
Ethernet Frame Format

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)

48-bit MAC Address


CAM and TCAM Where should the frame be
Layer 2 Forwarding
forwarded?
CAM Should the frame be
Security ACLs
forwarded?
Quality of Service ACLs With what QoS treatment
TCAM should the frame be
forwarded?
Forwarding Information Base (FIB)
Layer 3 Forwarding
FIB
Layer 2 Forwarding
CAM
Security ACLs
Quality of Service ACLs
TCAM
Populating the MAC Address Table
PC #1 PC #2
AAAA.AAAA.AAAA BBBB.BBBB.BBBB

Gig 1/0 Gig 1/1

SWITCH
PORT MAC ADDRESS
Gig 1/0 AAAA.AAAA.AAAA
Gig 1/1 BBBB.BBBB.BBBB

MAC Address Table


Collision Domains

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

Two Broadcast Domains


Ethernet Ethernet
Switch Switch
Router
CDP vs. LLDP
Cisco Discover Protocol (CDP)
• Cisco proprietary Layer 2
protocol
R1
• Provides information about
adjacent CDP-speaking
devices
• Sends to destination
multicast MAC address of
01-00-0c-cc-cc-cc
SW1 SW2

Cisco IP Phone Cisco Unified


Communications Manager Laptop
(CUCM) Server
Link Layer Discover Protocol (LLDP)
(IEEE 802.1AB)

• Industry standard Layer 2


protocol R1
• Provides information about
adjacent LLDP-speaking
devices
• Sends to destination
multicast MAC address with
an OUI of 01-80-c2 SW1 SW2

Cisco IP Phone Laptop


CDP vs. LLDP
DEMO
Introduction to VLANs
Virtual LANs (VLANs)

Trunk

VLAN 10 VLAN 20 Router


Sales Engineering
TRU TRUN
TRU NK K
NK

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

SW1 Mode SW2 Mode Trunk Formed


access ANY
Fa 0/2
trunk dynamic desirable
trunk dynamic auto
trunk trunk
dynamic desirable dynamic desirable
SW2 dynamic desirable dynamic auto
dynamic auto dynamic auto
Trunking Demo
Introduction to
Spanning Tree
Protocol (STP)
Introduction to STP
Switch A

Switch B

Radia Perlman
Switch C - Working at DEC
- Develops Spanning Tree Protocol (STP)

Institute of Electrical and Electronics Engineers


- 1990
- IEEE 802.1D
Issues without 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

Gig 1/0/1 Gig 1/0/1

Switch A Switch B
Gig 1/0/2 Gig 1/0/2

Switch B’s MAC Address Table


Port MAC Address
PC B Gig 1/0/1
Gig 1/0/2
Broadcast Storm
PC A

Gig 1/0/1 Gig 1/0/1

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?

• What are the Designated Ports?

• What are the Blocking (Non-Designated) Ports?


STP Practice Exercise
MAC Address: 000d.28e4.7c80 MAC Address: 0018.b9ad.2d00
Priority: 16384 Priority: 16384
Te 1/0/1 Te 1/0/1

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)

MAC Address: 0018.b9ad.2d00 Fa 1/0/1 Gig 0/9 MAC Address: 000d.28e4.7c80


Priority: 32768 Priority: 32768

Switch A Switch B Root Bridge


Fa 1/0/2 Gig 0/10

Network Segment 2 (Ethernet (10 Mbps): Cost = 100)

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)

Disabled Designated (FWD)


SW2 Alternate (BLK) SW3
Rapid PVST+ Port States

Port State Description


Discarding Data is not being forwarded on the port. (Seen on Alternate, Backup, and Disabled ports.)

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

New Root Port

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

• Allows a switch port to go


active almost immediately
when an end station is
attached to the port
Access SW4
Layer
Fa 1/0/1
PortFast Configuration

SW4(config)# interface fa 1/0/1


SW4(config-if)# spanning-tree portfast
SW4(config-if)# exit
SW4(config)# spanning-tree portfast default
SW4(config)# exit
SW4# show spanning-tree interface fa 1/0/1 portfast
VLAN0300 enabled
EtherChannel
EtherChannel Basics

• Allows higher bandwidth between switches


• Provides load-balancing
• PAgP: Port Aggregation Protocol
• LACP: Link Aggregation Control Protocol
• Creates redundant links
EtherChannel Load-Balancing
00
01
Switch A 10
11 Switch B

PC1

Load-Balancing Algorithms Last Hex Digit in MAC Address: 1 5 D


• dst-ip
• dst-mac Hex Binary
• src-dst-ip
1 0001
• src-dst-mac
5 0101
• src-ip

• src-mac
D 1101
PAgP Port Negotiation

Switch A Switch B

PAgP Channel Mode On Auto Desirable

On

Auto

Desirable
LACP Port Negotiation

Switch A Switch B

LACP Channel Mode On Passive Active

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

ARP: What’s the MAC address


of 192.168.1.1?
IP Address MAC Address
1111.1111.1111

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

192.168.1.0 /24 Gig 1 (Directly Connected)


10.1.1.0 /24 Gig 2 (Directly Connected)
192.168.2.0 /24 10.1.1.2 (Next Hop)
1111.1111.1111

192.0.2.0 /30 10.1.1.2 (Next Hop)


0.0.0.0 /0 10.1.1.2 (Next Hop) 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

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

192.168.2.0 /24 Gig 1 (Directly Connected)


Gig 1 192.0.2.0 /30 Gig 3 (Directly Connected)
Gig 1

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

R3 I’ll get you to Here’s your ticket R4


10.1.1.0 /24 to 10.1.1.0 /24

Routing Source Administrative Distance


Connected 0
Static 1 (by default)
EIGRP 90
OSPF 110
RIP 120
Comparing Routing
Protocols
Routing Protocol Comparison

Routing Protocol Distance-Vector Link-State Path-Vector

RIP

OSPF
EIGRP

BGP
Static Routes
Static Default Route

172.16.1.0 /24 10.0.0.0 /30


.1 .2 .1 Internet
SW1 Gig 0/1 BR1 Gig 0/2 Gig 0/1 HQ Gig 0/2
OSPF Terminology
OSPF’s Link State Database Compared to a Puzzle
Some OSPF Terminology
•Hello: A protocol used to discover OSPF neighbors and confirm reachability to those
neighbors (also used in the election of a Designated Router)

•Link State Advertisement (LSA): Information a router sends and receives about network
reachability (used to construct a router’s Link State Database)

• Link State Update (LSU): A packet that carries LSAs

•Link State Request (LSR): Used by a router to request specific LSA information from a
neighbor

• Link State Acknowledgement (LSAck): Used by a router to confirm it received an LSU


OSPF Neighbor
Formation
Neighborship vs. Adjacencies
Neighbors are routers that:
• Reside on the same network link

• Exchange Hello messages Router Switch Router


Hello (224.0.0.5)

Adjacencies are routers that: Hello (224.0.0.5)


• Are neighbors

• Have exchanged Link State Updates (LSUs) and Database Description (DD) packets

Router Switch Router


Hello
Hello
Database Description
Database Description
Link State Update
Link State Update
DR and BDR Election
The Need for Designated Routers

R1 R2

R3 R4

R5 R6

# of Adjacencies = [n * (n - 1)] / 2, where n is the number of routers.


The Need for Designated Routers
Adjacencies only need to be formed with the DR and BDR.

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

100 Mbps Cost = 1 100 Mbps

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

Area Border Routers


R2
(ABRs)
R8

R1 R3 R7 R9
Area 1 Area 2 ]
R5

R4 R6
Area 0
LSA Types
LSA Types

Type 1 LSA Type 1 LSA


Type 2 LSA ABR

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

Wildcard Mask 0. 0. 0.255


Wildcard Mask

255.255.255.255 255.255.255.255
- Subnet Mask - 255.255.255.252

Wildcard Mask 0. 0. 0. 3
OSPFv2 Configuration
OSPF Topology

10.1.1.0 /24 172.16.1.0 /30 192.168.1.0 /30 10.2.2.0 /24


.1 .1 .2 .1 .2 .1
SW1 Gig 0/1 R1 Gig 0/2 Gig 0/1 R2 Gig 0/2 Gig 0/1 R3 Gig 0/2 SW2

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

You might also like