cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
279
Views
8
Helpful
2
Replies

Is this correct?

tianlu008
Level 1
Level 1

I am looking at a running-config of a C2950-SX-48-SI switch and noticed the configuration of the up-link port is like this:

interface GigabitEthernet0/1

switchport access vlan 102

switchport mode trunk

spanning-tree portfast

In these four lines, are line 2 and line 4 necessary?

Thanks

2 Replies 2

CSCO10892433
Level 4
Level 4

Hi,tinalu

If you want this link to be a trunk, you'd better remove the "spanning-tree portfast" command. It might incur spanning-tree issue. Leave alone the "switch access vlan 102". It has no effect as long as the switch port mode is trunk.

HTH

SSLIN

farkascsgy
Level 4
Level 4

Hello,

At the same time one switch port can in trunk or access mode. In your config the port is in trunk mode and in this cas the switch will skip your "switchport access vlan 102" line and also in case of trunk port "spanning-tree portfast" is not a good idea. If you want to use use access mode port you can set the port with next command to access mode: "switchport mode access" and in case "spanning-tree portfast" is useful.

What you can set in trunk port is the native vlan and allowed vlan, these two features can be useful also.

switchport trunk allowed vlan "vlan numbers"

switchport trunk native vlan "native vlan"

Native vlan is not tagged...

Also in case of trunk port in some cases you should set trunk encapsulation: ISL or dot1q

switchport trunk encapsulation "dot1q or ISL"

bye

FCS

Please rate me if I helped.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Innovations in Cisco Full Stack Observability - A new webinar from Cisco