In this packet tracer lab we're going to discuss spanning tree PortFast . What is a spanning tree
PortFast and why is it important?
Why do we use spanning tree PortFast in switched networks? Now on Cisco's website they discuss
various options that you can configure with spanning tree including PortFast and they say that Port
Fast causes a switch or trunk port to enter the spanning tree forwarding state immediately bypassing
the listening and learning states.
You can configure spanning tree PortFast on switch or trunk ports that are connected to a single workstation
switch or server to allow those devices to connect to the network immediately instead of waiting for
the port to transition from the listening to learning to the forwarding state.
But you need to be careful with spanning-tree port fast if you enable spanning-tree PortFast on a Port
that's connected to another layer to device such as a switch you may create network loops.
So let's see the problem practically in this network.
I'm gonna power cycle the devices in the topology and then on PC1 I'm gonna open up a command
prompt and use the command IP config.
Notice these ports are orange on the switch.
So if I use the command IP config slash renew the PC is not going to get an IP address because these
ports are currently blocked by spanning tree on the switch show spanning tree.
Notice the ports are currently in the learning state spanning tree is just going green
but notice in the output of my switch I see that they are currently in the learning state. So this command
shows us the state of ports do that again.
we can see that the ports are now forwarding but while the switch was transitioning from blocking to
listening to learning to forwarding the PC wasn't able to get an IP address so would end up using
an address in this range. Later on thePC would get an IP address if it continues to send DHCP request
messages.
but you can have problems with applications on your PC if it takes 30 seconds for a PC to receive
an IP address.
So here again the PC has got an IP address
but if I power cycle these devices while the switch is booting up and while the ports are transitioning
through the spanning tree states like they are now.
So again back on the switch, the switch has no configuration show spanning tree.
Port is currently in the listening state and then should go to the learning state as you can see there
and then we'll eventually go to the forwarding state.
But during that time PCs will not be able to receive IP addresses or forward traffic. Windows PC
as an example won't be able to log on to the domain it's using one of these IP addresses instead of
the IP address allocated by the DHCP server now 169.254. dot something dot something is a IP version
4 link-local address.
In other words, an IP address in this range 169.254/16 is an IP version 4 link-local address.
This is similar in concept to fe80::/10 in IP version 6.
The idea is that if a PC doesn't get an IP address from a DHCP server it will use an IP address in
this range so that two PCs can still communicate with one another if they for instance connected
to a hub or a switch and there's no DHCP server on the network. So in other words that's what this PC
has done.
It used an IP address in this range but that means that it won't be able to communicate with other servers
on the network unless it continues to send a DHCP requests and then gets an IP address in the correct
range as it did here.
The PC won't be able to communicate with other devices such as domain controllers, DNS servers or even
connect to the Internet.
This is a non routable IP address.
So how do we fix this.
The answer is to use PortFast, so can you configure this network so that the PCs receive IP addresses
from the DHCP survey immediately.
The server here is configured as a DHCP server so the PCs should receive IP addresses from the DHCP
server as soon as they boot up.
So can you complete this lab yourself.
Download the packet tracer file and see if you can complete the lab.
Otherwise continue watching as I complete to the lab.