3.1 KiB
id, aliases, tags
| id | aliases | tags | |
|---|---|---|---|
| 1779884291-BCDN |
|
PortFast (STP Toolkit)
ex: Switch <-> PC
Listening | 15sec Learning | 15sec Forwarding
When an end host connects to a switch port, the port becomes up/up but can't send/receive data yet.
- It is a Designated port but will take 30 seconds before it enters the Forwarding state:
- 15 seconds in Listening
- 15 seconds in Learning This lead to poor user experience
- the user probably doesn't even know STP exists.
- They just know "the internet doesn't work" for 30 seconds when they connect their computer.
- This wait is unnecessary, because there is no risk of a Layer 2 loop occuring between a switch/PC
The solution
When portFast is configured on a port, the port immediately enters the Forwardin state when connected to another device. It bypasses Listening/Learning and can send/receive data right away
You can configure PortFast in two ways
- Interface config mode
SW1(config-if)# spanning-tree portfast
This enables PortFast only on the individual interface.
Even if you configure spanning-tree porfast on a trunk port, it won't be active.
- Global config mode:
SW1(config)# spanning-tree portfast default
This enables PorFast on all access ports.
Connections between switches are almost always trunk links.
Connections to end hosts are almost always access links.
PortFast should NOT be configured on ports connected to switches or temporary Layer 2 loops can occur.
showing result
SW1(config)# show spanning-tree interface g0/1 detail
diabling portfast
SW1(config-if)# spanning-tree portfast disable
Configurating Portfast on trunk port
In some cases, you might want to enable PortFast on a trunk port:
- A port connected to a virtualization server with virtual machines (VMs) in different VLANs.
- A port connected to a router via router on a stick ROAS.
This can only be cofigured per-port in interface config mode:
SW1(config-if)# spanning tree portfast trunk
PortFast Edge
In modern Cisco switches, if you use the commands covered in this lecture, the device will automatically add the edge keyword to the configuration.
SW1(config-if)# spanning-tree portfast
running-config
spanning-tree portfast edge
SW1(config-if)# spanning tree portfast trunk
running-config
spanning-tree portfast edge trunk
SW1(config)# spanning-tree portfast default
running-config
spanning-tree portfast edge default
You can use either version of the commands when configuring PortFast.
The end result is the same: edge will always be added in the configuraion.
spanning-tree portfast disable doesn't use the edge keyword.
two kind of Portfast
There are two kinds of PortFast:
- edge
- edge is the kind we are covering in this video
- network
- network is used for a feature called Bridge Assurance (not a CCNA topic)
Review
PortFast:
Allows switchs ports connected to end hosts to immediately enter the STP Forwarding state. Bypassing Linstening and Learning