Chapter 8 Layer 2 Switching and Spanning Tree Protocol (STP) - PowerPoint PPT Presentation

1 / 36
About This Presentation
Title:

Chapter 8 Layer 2 Switching and Spanning Tree Protocol (STP)

Description:

Chapter 8 Layer 2 Switching and Spanning Tree Protocol (STP) Switching Service Layer 2 switches provides the following: Hardware- based bridging (ASIC) Switch uses ... – PowerPoint PPT presentation

Number of Views:176
Avg rating:3.0/5.0
Slides: 37
Provided by: Hak123
Category:

less

Transcript and Presenter's Notes

Title: Chapter 8 Layer 2 Switching and Spanning Tree Protocol (STP)


1
Chapter 8Layer 2 Switching and Spanning Tree
Protocol (STP)
2
Before Switching
3
Network with Switching
4
Switching Service
  • Layer 2 switches provides the following
  • Hardware- based bridging (ASIC)
  • Switch uses ASIC in building and maintaining
    their Forward/Filter table.
  • Wire speed
  • Switch create a private dedicated Collision
    Domain (for each port) and provide independent
    bandwidth on each port so increase the bandwidth
    for each user (unlike Hub).
  • Low latency
  • Switches and bridges are faster than Routers
    because they do not look at network layer header
    information.
  • Low cost

5
Bridges vs. Switches
  • Bridges are software base , while switches are
    hardware base because they use (ASIC).
  • A switch can be viewed as multi port bridge.
  • Switches have higher number of ports than
    bridges.
  • Bridge can have only one spanning tree , while
    switches can have many.
  • Both Bridges and Switches
  • Forward layer 2 broadcast.
  • Learn MAC address by examining the source
    address of each frame received.
  • Make forward decision based on layer 2 address.
  • Break up collision domain but still have a
    single broadcast domain (Switches have 1
    broadcast domain BY DEFAULT).

6
Three switch functions at layer 2
  1. Address Learning
  2. Forward / Filter decision
  3. Loop avoidance

7
Address Learning.
Notice that a switch or a bridge never learns a
BROADCAST or MULTICAST address because broadcast
or multicast never appear as the source address
of the frame.
8
Address Learning.
  • Switchsh mac address-table
  • Vlan Mac Address Type Ports
  • ---- ----------- -------- -----
  • 1 0005.dccb.d74b DYNAMIC Fa0/1
  • 1 000a.f467.9e80 DYNAMIC Fa0/3
  • 1 000a.f467.9e8b DYNAMIC Fa0/4
  • 1 000a.f467.9e8c DYNAMIC Fa0/3
  • 1 0010.7b7f.c2b0 DYNAMIC Fa0/3
  • 1 0030.80dc.460b DYNAMIC Fa0/3
  • 1 0030.9492.a5dd DYNAMIC Fa0/1
  • 00d0.58ad.05f4 DYNAMIC Fa0/1
  • Total Mac Addresses for this criterion 8
  • Switch(config)mac-address-table static
    aaaa.bbbb.cccc vlan 1 int fa0/5

9
Redundant link between Switches Problems
1.Broadcast Storm
10
  • 2. Multiple frame copies

11
  • 3. Instable MAC Table
  • Host_1 sends a unicast frame to Router C
  • The MAC address of Router C has not been learned
    by either switch.
  • Switches A and B learn the MAC address of Host_1
    on port 0.
  • The frame to Router C is flooded.
  • Switches A and B incorrectly learn the MAC
    address of Host_1on port 1.

12
Switching Modes
  • Store and Forward.
  • Cut through (Fast forward ,Real time, Wire
    speed).
  • Fragment free (Modified Cut through)

13
CISCO 1900 Switch Configuration
gtenable config t (config)enable password level
1 cisco (config)enable password level 15
cisco1 (config)enable secret cisco (config)hostn
ame 1900A 1900A(config)ip address 192.168.10.51
255.255.255.0 1900A(config)ip default-gateway
192.168.10.1 1900A(config)banner motd _at_ This is
1900A Switch _at_ 1900A(config)int
fa0/12 1900A(config)description
Connection_to_HR 1900A(config)Z 1900Ash
ip 1900Adelete nvram
14
CISCO 2950 Switch Configuration
Switchgten Switchconfig t Enter configuration
commands, one per line. End with
CNTL/Z. Switch(config)hostname
2950B 2950B(config)enable secret
cisco 2950B(config)line console
0 2950B(config-line)password cisco 2950B(config-l
ine)login 2950B(config)line vty 0
15 2950B(config-line)password telnet 2950B(config
-line)banner motd _at_ Enter the text followed by
the '_at_' to finish This is 2950B
Switch _at_ 2950B(config)int f0/4 2950B(config-if)d
esc connection to 2950C 2950B(config-if)int
f0/5 2950B(config-if)desc 2nd connection to
2950C 2950B(config-if)int vlan
1 2950B(config-if)ip address 192.168.20.51
255.255.255.0 2950B(config-if)no
shut 2950B(config-if)exit 2950B(config)ip
default-gateway 192.168.20.1 2950B(config)exit 29
50Bcopy run start Destination filename
startup-config? (enter) Building
configuration... OK
15
CISCO 2950 Switch Configuration
2950Berase startup 2950Bdelete
flashnvram 2950Breload 2950Bping
192.168.30.17 Type escape sequence to
abort. Sending 5, 100-byte ICMP Echos to
192.168.30.17, timeout is 2 seconds .!!!! Success
rate is 80 percent (4/5), round-trip min/avg/max
1/1/1 ms
16
Port Security
Switchconfig t Switch(config)int
f0/1 Switch(config-if)switchport port-security
? aging Port-security aging commands mac-addre
ss Secure mac address maximum Max secure
addresses violation Security violation
mode ltcrgt Switch(config-if)switchport
port-security maximum 1 Switch(config-if)
switchport port-security violation ? protect
Security violation protect mode restrict
Security violation restrict mode shutdown
Security violation shutdown mode Switch(config-if
)switchport port-security violation shutdown
17
Port Security
Switch(config-if)switchport port-security
mac-address sticky Switch(config-if)switchport
port-security maximum 2 Switch(config-if)switchpo
rt port-security violation shutdown
18
Spanning Tree Protocol
19
Bridge Protocol Data Unit (BPDU)
Port Cost BID
  • BID Priority, MAC Address.
  • Cost
  • B.W Cost
  • 10Gbps 2
  • 1Gbps 4
  • 100Mbps 19
  • 10Mbps 100
  • Port Priority, Port no.
  • Cost
  • BID
  • Port Priority
  • Port No.

20
STP Example 1
21
STP Example 2
22
STP Example 3
23
STP Example 4
24
STP Example 5
25
STP Example 6
26
STP Example 7
27
Switchsh spanning-tree VLAN0001 Spanning
tree enabled protocol ieee Root ID Priority
32769 Address 0012.8061.0cc0
Cost 8 Port
25 (GigabitEthernet0/1) Hello Time
2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32769 (priority 32768
sys-id-ext 1) Address
0012.806b.6880 Hello Time 2 sec
Max Age 20 sec Forward Delay 15 sec
Aging Time 300 Interface Role Sts Cost
Prio.Nbr Type ---------------- ---- ---
--------- -------- -------------------------------
- Fa0/16 Altn BLK 19 128.16
P2p Gi0/1 Root FWD 4 128.25
P2p Switchshow spanning-tree vlan 2
28
(No Transcript)
29
Configuring Catalyst Switches
  • Administrative functions (General settings)
  • Configuring the IP address and subnet mask
  • Setting the IP default gateway
  • Setting port security
  • Setting PortFast
  • Enabling BPDUGuard and BPDUFilter
  • Enabling UplinkFast
  • Enabling BackboneFast
  • Enabling RSTP (802.1w)
  • Enabling EtherChannel
  • Configuring an STP root switch
  • Using the CNA to configure a switch

30
Spanning Tree PortFast
Switch(config-if)spanning-tree portfast
? disable Disable portfast for this
interface trunk Enable portfast on the
interface even in trunk mode ltcrgt Switch(config-
if)exit Switch(config)int range fastEthernet
0/1 - 12 Switch(config-if-range)spanning-tree
portfast
31
BPDUGuard
Switch(config-if-range)spanning-tree bpduguard
? disable Disable BPDU guard for this
interface enable Enable BPDU guard for this
interface Switch(config-if-range)spanning-tree
bpduguard enable
BPDUFilter
Switch(config-if-range)spanning-tree bpdufilter
? disable Disable BPDU filtering for this
interface enable Enable BPDU filtering for
this interface Switch(config-if-range)spanning-tr
ee bpdufilter enable
32
UPLinkFast
Switch(config)spanning-tree uplinkfast Switch(con
fig)do show spanning-tree uplinkfast UplinkFast
is enabled Station update rate set to 150
packets/sec. UplinkFast statistics --------------
--------- Number of transitions via uplinkFast
(all VLANs) 1 Number of proxy multicast
addresses transmitted (all VLANs) 8 Name
Interface List --------------------
------------------------------------ VLAN0001
Fa0/1(fwd), Fa0/2 Use it on switches that have
blocked port
33
BackboneFast
Switch(config)spanning-tree backbonefast Switch(c
onfig)do show spanning-tree backbonefast Backbone
Fast is enabled BackboneFast statistics ---------
-------------- Number of transition via
backboneFast (all VLANs) 0 Number of inferior
BPDUs received (all VLANs) 2 Number of RLQ
request PDUs received (all VLANs) 0 Number of
RLQ response PDUs received (all VLANs)
1 Number of RLQ request PDUs sent (all VLANs)
1 Number of RLQ response PDUs sent (all VLANs)
0 Use it on all switches
34
STP (802.1d) x RapidSTP (802.1w)
Switch(config)spanning-tree mode ? mst
Multiple spanning tree mode pvst Per-Vlan
spanning tree mode rapid-pvst Per-Vlan rapid
spanning tree mode Switch(config)spanning-tree
mode rapid-pvst
35
EtherChannel
Switch(config)int port-channel
1 Switch(config-if)int range f0/1-2 Switch(config
-if-range)switchport mode trunk 1d03h
SPANTREE_FAST-7-PORT_FWD_UPLINK VLAN0001
FastEthernet0/2 moved to Forwarding
(UplinkFast). Switch(config-if-range)switchport
nonegotiate Switch(config-if-range)channel-group
1 mode desirable Switch(config-if-range)do sh
int fa0/1 etherchannel Port state Up
Sngl-port-Bndl Mstr Not-in-Bndl Channel group
1 Mode Desirable-Sl Gcchange
0 Port-channel null GC 0x00010001 Pseudo
port-channel Po1 Port index 0 Load 0x00
Protocol PAgP output cut
36
Selecting Root Bridge
Switch(config)spanning-tree vlan 1 priority
? lt0-61440gt bridge priority in increments of
4096 Switch(config)spanning-tree vlan 1 root
? primary Configure this switch as primary
root for this spanning tree secondary Configure
switch as secondary root Switch(config)spanning-t
ree vlan 1 root primary
Write a Comment
User Comments (0)
About PowerShow.com