Options

Confusion over edge ports and portfast

WhistlestopWhistlestop Member Posts: 20 ■□□□□□□□□□
Really need some clarification on this please as what i found when using my switches is different to what I have learned.

I was always taught that portfast does not run by default in STP. However if you enable switches for RSTP then portfast automatically will run by default so basically if you have access ports connected to PCs then they will automatically jump to FWD mode and be known as "edge ports".

Recently I believe this is incorrect. On real equipment, I ran a few scenarios using two switches trunked to each other with host PCs connected off them. I configured these ports as access ports.

SW1 fa0/21 FWD
fa0/21 Root port SW2
SW1 fa0/22 FWD
fa0/22 BLK SW2

Once I enabled RSTP on both switches, I ran show spanning-tree vlan 10 on SW2

VLAN0010
Spanning tree enabled protocol rstp
Root ID Priority 32778
Address 0009.4345.8c00
Cost 19
Port 21 (FastEthernet0/21)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32778 (priority 32768 sys-id-ext 10)
Address 0013.1939.a700
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300

Interface Role Sts Cost Prio.Nbr Type
---- ---


Fa0/1 Desg FWD 19 128.1 P2p
Fa0/21 Root FWD 19 128.21 P2p
Fa0/22 Altn BLK 19 128.22 P2p

Note that fa0/1 is not showing up as an "edge port" I always believed from stuff I read that portfast is enabled by default in RSTP and because of that fa0/1 should be known as "edge port" by default

To confirm further if fa0/1 was running portfast i ran the following command

SW2#show spanning-tree int fa0/1 portfast
VLAN0010 disabled

SW2#show spanning-tree int fa0/1 detail
Port 1 (FastEthernet0/1) of VLAN0010 is designated forwarding
Port path cost 19, Port priority 128, Port Identifier 128.1.
Designated root has priority 32778, address 0009.4345.8c00
Designated bridge has priority 32778, address 0013.1939.a700
Designated port id is 128.1, designated path cost 19
Timers: message age 0, forward delay 0, hold 0
Number of transitions to forwarding state: 1
Link type is point-to-point by default
BPDU: sent 55, received 0

clearly not running port fast. I did a shut and no shut on fa0/1 and this made the port go from BLK, LRN, FWD. It did not generate a TCN but did sent out a proposal on fa0/1 to i assume negotiate the state.

On SW2 i then enabled portfast and found this:

SW2(config)#int fa0/1
SW2(config-if)#spanning-tree portfast
SW2#show spanning-tree int fa0/1

Vlan Role Sts Cost Prio.Nbr Type
---- ---


VLAN0010 Desg FWD 19 128.1 P2p Edge

Only now after doing this is it an "edge port" and it transitioned to FWD immediately.

I'm rather confused about this because I was taught by chris bryant that portfast is enabled by default in RSTP. Judging by the above output it indicates to me that portfast is not enabled on access ports by default in RSTP and you will only see it as an "edge port" once you enable portfast. But then if you run STP you also get "edge ports" when running portfast. However Christ Bryant states that "edge port" status is "unique to RSTP". Below contradicts that

SW2#show spanning-tree vlan 10

VLAN0010
Spanning tree enabled protocol ieee
Root ID Priority 32778
Address 0009.4345.8c00
Cost 19
Port 21 (FastEthernet0/21)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32778 (priority 32768 sys-id-ext 10)
Address 0013.1939.a700
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300

Interface Role Sts Cost Prio.Nbr Type
---- ---


Fa0/1 Desg FWD 19 128.1 P2p Edge (EDGE PORT STATUS SHOWING UP IN STP)
Fa0/21 Root FWD 19 128.21 P2p
Fa0/22 Altn BLK 19 128.22 P2p


So edge port status Only shows up in the output if that port is portfast enabled (irrespective of whether you are running STP or RSTP). So how come I have heard that when you enable RSTP this automatically makes the port an edge port?

switches i was using are real ones.See below. I'm hoping in a way i have misunderstood as i'd hate to think what I have learnt is incorrect or not explained properly. thank you so much.

show version
Cisco IOS Software, C3550 Software (C3550-IPSERVICESK9-M), Version 12.2(46)SE, RELEASE SOFTWARE (fc2)
Copyright (c) 1986-2008 by Cisco Systems, Inc.

Comments

  • Options
    APAAPA Member Posts: 959
    - Edge ports are unique to RSTP.
    - Regardless of STP or RSTP you need to enable 'spanning-tree portfast' to enable the benefits of transitioning directly to Forwarding.
    - RSTP edge port merely defines a port that hasn't received BPDUs. RSTP makes an assumption that there is not a switch attached to this port. However the minute an edge port receives a BPDU the RSTP port loses 'edge' status and is considered a standard port (Discarding\Learning\Forwarding)
    - Portfast when enabled always keeps a port in the forwarding state, unless it goes physically down. This is why portfast can be dangerous if a switch somehow finds itself attached to that port.
    - For an access port to have Portfast enabled by default you need 'spanning-tree portfast default' to be configured at the global level. Only then will any access port automatically have portfast enabled.

    HTH

    CCNA | CCNA:Security | CCNP | CCIP
    JNCIA:JUNOS | JNCIA:EX | JNCIS:ENT | JNCIS:SEC
    JNCIS:SP | JNCIP:SP
  • Options
    Danielh22185Danielh22185 Member Posts: 1,195 ■■■■□□□□□□
    ^^ APA explained it very well. And to piggy back on that, here is the explaination from Cisco:

    "The edge port concept is already well known to Cisco spanning tree users, as it basically corresponds to the PortFast feature. All ports directly connected to end stations cannot create bridging loops in the network. Therefore, the edge port directly transitions to the forwarding state, and skips the listening and learning stages. Neither edge ports or PortFast enabled ports generate topology changes when the link toggles. An edge port that receives a BPDU immediately loses edge port status and becomes a normal spanning tree port. At this point, there is a user-configured value and an operational value for the edge port state. The Cisco implementation maintains that the PortFast keyword be used for edge port configuration. This makes the transition to RSTP simpler."

    Understanding Rapid Spanning Tree Protocol (802.1w) - Cisco

    Basically the main difference being if an edge port not configured for port-fast receives BPDUs it will transition into a spanning tree-state because the switch now knows that there is another switch on the other side of that link. Like APA explained it's to allow for fast convergences and the switch is basically for lack of better words is operating under an assumption before it gets BPDUS, etc for ports that are not explicitly known to be trunk ports yet.

    A Port-fast port should always be an edge port in RSTP / RPVST however an edge port does not specifically have to be port-fast enabled port. :)
    Currently Studying: IE Stuff...kinda...for now...
    My ultimate career goal: To climb to the top of the computer network industry food chain.
    "Winning means you're willing to go longer, work harder, and give more than anyone else." - Vince Lombardi
Sign In or Register to comment.