A few quick things about Portfast.
Portfast is a very important configuration.
We need to make sure we put on all of our edge ports,
whether we're running traditional spanning tree,
I'm not sure why we would in production,
but even with rapid spanning tree,
we do have to explicitly state
which ports are in portfast mode.
Portfast is telling us that we're connecting
to not a switch basically.
So it can connect to other network devices,
it can connect to routers or firewalls and access points.
These are network devices that are not switches WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
These are network devices that are not switches
and can't produce a loop.
And so as long as we have no switch on the other side,
we can enable portfast.
Now as a protection mechanism,
Cisco ignores portfast configuration
if we configure something for a trunk,
but some of those devices require trunks.
So I can also explicitly configure a portfast trunk
and we'll take a look at that here.
That's something that we can deploy if required.
For example, if connecting to a flex connect access point
that requires trunking,
I would want to configure it as a portfast trunk. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
I would want to configure it as a portfast trunk.
Now lastly, even though portfast is an explicit configuration,
we can enable it to be deployed
onto all access ports by default.
And so we're gonna take a look at really all three things,
configuring portfast, making it the default setting,
as well as configuring a trunk portfast,
and we'll wanna take a look and confirm
that the TCN thing is actually what we said it is,
that it's not going to produce topology change notifications.
So as part of all of this,
we're gonna go ahead and look at switch five, WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
we're gonna go ahead and look at switch five,
and we're going to pretend like gig three slash two here
is connecting to some kind of edge device.
Maybe it's a laptop or a PC or for that matter,
an access point, but either way,
gig three slash two is going to be our port of choice.
So normal portfast operation is to do a config T,
get onto the interface,
and then I can say spanning tree portfast. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
and then I can say spanning tree portfast.
And that's it.
I've just enabled portfast.
Once again, it is going to warn us
that this can produce temporary bridging loops.
I do like that they used temporary,
'cause we know as soon as we get a BPDE,
we will fall back to normal spanning tree operation.
But until we receive a BPDE on the other side,
it could produce some bridging loops.
So we have to proceed with caution,
but we understand that this is the intended behavior
in this situation.
So now, if I do a show spanning tree VLAN one, WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
So now, if I do a show spanning tree VLAN one,
we should see that gig three slash one,
or sleeves three slash two rather,
says that it's an edge port.
So that's a rapid spanning tree word
that's just telling us that it's in portfast operation.
And it's already in forwarding mode.
Now, if I go config T interface three slash two,
and I say shutdown,
and then no shot.
Now, it's going to come back online. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
Now, it's going to come back online.
We'll do a show spanning tree VLAN one,
and three slash two should already be
in the forwarding statement, indeed it is.
So we did not have to go through listening and learning.
And that's usually the behavior
that we're really looking for out of portfast.
Now, really quickly,
I could configure portfast another way.
So let's go ahead and say, no, spanning tree portfast.
But let's say that, again, this is an edge port.
So I'm going to place this into switch port mode access WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
So I'm going to place this into switch port mode access
and place that into VLAN one.
So now this port is an access port.
So if I do show interface gig three slash two switch port,
another great command,
we can see that the administrative mode here
is in access operation.
So what we can do now is do a global configuration
to make all access ports into portfast,
because usually we sync up portfast
and access mode operation. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
and access mode operation.
So this makes a lot of sense.
So I can get on here,
and I can say spanning tree portfast default.
Now, again, it's only going to push it to access switches
or access switch ports rather.
So won't go on to trunks.
If I do a show run on interface gig three slash two,
like this,
will not see the portfast configuration,
but I can confirm if I do a show spanning tree interface,
gig three slash two and add this keyword detail, WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
gig three slash two and add this keyword detail,
I see a lot of information,
including that it's in portfast edge mode
and it adds on this by default,
which would not be there
if I wasn't using the default option.
Now let's go ahead and take a look at the trunk situation.
So if I were to get onto interface gig three slash two
and say, hey, we're going to configure use this trunk.
So I'm going to put this into dot one queue operation
and then switch mode trunk.
And now it's running as a trunk. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
And now it's running as a trunk.
So is it running in portfast?
It's not notice the portfast was removed
because it's no longer an access port.
What I can do is get onto gig three slash two
and say spanning tree portfast
and we'll see that I've got the ability
to add an edge and then trunk.
There it is.
(laughs)
iOS, the virtual iOS can be a little different at times.
So you might see this edge here and you might not. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
So you might see this edge here and you might not.
Some iOS XCE platforms have it, some do not,
but either way, I just enabled this portfast
for trunk operation.
So now I can do the same show command,
show spanning tree interface with detail
and it does say that it's in portfast,
I can get it, there we go.
Portfast edge trunk mode.
So we can run portfast in trunk mode,
but we do have to explicitly configure it.
If I were to say remove portfast edge trunk
and just say spanning tree portfast, WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
and just say spanning tree portfast,
again, this is still a trunk.
So if I look at the spanning tree interface details,
we'll find that it's not running in portfast.
Even though when I look at the interface,
it's going to appear like it is
because it's got that portfast.
Well, again, edge sometimes shows up,
especially on iOS V, the virtual iOS instances,
but spanning tree portfast command is there,
but it's not running in portfast because it is a trunk. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
but it's not running in portfast because it is a trunk.
So last thing we want to demonstrate
is the topology change concept.
So if I do a show spanning tree, VLAN one,
we will call that this aging time gets reduced
if the port changes.
And so I'm going to go ahead and demonstrate
that it will not change.
So we're going to go back into switch port mode access on 3, 2,
and I'm going to enable portfast, so spanning tree portfast.
And so if I look at the interface,
so spanning tree interface detail, WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
so spanning tree interface detail,
we see we are running in portfast operation.
So if I shut this port down and then do a no shut,
and do a show spanning tree for VLAN one,
we will see that again, the thing that we typically look at
is the fact that it went straight into forwarding mode.
And then we can scroll up just a little bit
and we can see that the aging time is 300 seconds.
And so portfast is very important for spinning things up WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
And so portfast is very important for spinning things up
quickly.
We can apply it to access and trunk ports,
but it's also super important because topology change
notifications are suppressed, which is good.
We're going to see a lot of topology changes out there
if we don't configure portfast.
So it's why it's a mission critical configuration.
We should probably enable it by default on switches,
which will push it automatically to access ports.