cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1959
Views
15
Helpful
3
Replies

switchport modes query

jeetkulkarni
Level 1
Level 1

Currently have 3650s in our environment.

What is the basic difference in the configuration of below interfaces

 

Interface 1-

 

interface g1/1

switchport mode access

switchport access vlan 20

 

 

Interface 2-

interface g1/2

switchport mode trunk

switchport trunk allowed vlan 20

 

If only vlan 20 is allowed via trunk or access are the packet tagged differently? Please clarify.

 

Thanks

Jeet

1 Accepted Solution

Accepted Solutions

Deepak Kumar
VIP Alumni
VIP Alumni

Hi, 

In your case, Yes there will packet tagged differently. 

An Access port transports traffic to and from only the specified VLAN assigned to it(VLAN 20, in your configuration). Unlike a trunk port, it will not deliver exclusive identifying tags (either 802.1Q or ISL tags) because the VLAN intended for it is pre-assigned but Voice VLAN is treated differently. 

In the simple word let see the below diagram:

 

When Packet receiving from Host:

(No tag on data)                 (Switch Port Access)                  (Switching Process/Forwarding)

Laptop------>(Port Ge1/1, Access VLAN 20)----->Insert VLAN tag 20 --->Switching process 

 

When Packet Receiving from Switching Backbone:

 

Laptop<-------- (Port Ge1/1, Access VLAN 20)<----Removed VLAN tag 20<-------Switching process 

 

 

Trunk Port: Trunk will forward tagged the data with VLAN number with help of ISL or 802.1Q (Expect Native VLAN, default VLAN 1).

 

(Tag VLAN 20 on Data)                 (Switch1 Trunk port )                  (Switching Process/Forwarding)

Switch2 (Trunk Port)------>(Port Ge1/2, Allowed VLAN 20)----->Switching process 

 

Regards,

Deepak Kumar

 

Regards,
Deepak Kumar,
Don't forget to vote and accept the solution if this comment will help you!

View solution in original post

3 Replies 3

Rolf Fischer
Level 9
Level 9

Hi,

the port configured as trunk with allow-list will send vlan 20 traffic with a 802.1Q tag, the access port sends vlan 20 traffic untagged. When a trunk port receives untagged traffic, it assignes this traffic to the native vlan, which is vlan 1 by default (dropped in your case since not in the allowed vlan list). If you want to send and receive vlan 20 untagged on a trunk, you can use the switchport trunk native vlan <VLAN ID> command.

 

HTH

Rolf

Joseph W. Doherty
Hall of Fame
Hall of Fame
As Rolf already noted, the biggest difference in your two configs is your access port config will not tag the frames while the trunk port will. There are or can be other differences too.

For example depending on global spanning-tree settings, the access port might be in "portfast" mode while the trunk might not. This because the switch "knows" one port is an access port while the other is a trunk port. There might be other differences due to this distinction, such as perhaps the trunk port has DTP enabled and the other access port doesn't, or if VTP is enable, it should be sent out a trunk port but not an access port, etc.

Deepak Kumar
VIP Alumni
VIP Alumni

Hi, 

In your case, Yes there will packet tagged differently. 

An Access port transports traffic to and from only the specified VLAN assigned to it(VLAN 20, in your configuration). Unlike a trunk port, it will not deliver exclusive identifying tags (either 802.1Q or ISL tags) because the VLAN intended for it is pre-assigned but Voice VLAN is treated differently. 

In the simple word let see the below diagram:

 

When Packet receiving from Host:

(No tag on data)                 (Switch Port Access)                  (Switching Process/Forwarding)

Laptop------>(Port Ge1/1, Access VLAN 20)----->Insert VLAN tag 20 --->Switching process 

 

When Packet Receiving from Switching Backbone:

 

Laptop<-------- (Port Ge1/1, Access VLAN 20)<----Removed VLAN tag 20<-------Switching process 

 

 

Trunk Port: Trunk will forward tagged the data with VLAN number with help of ISL or 802.1Q (Expect Native VLAN, default VLAN 1).

 

(Tag VLAN 20 on Data)                 (Switch1 Trunk port )                  (Switching Process/Forwarding)

Switch2 (Trunk Port)------>(Port Ge1/2, Allowed VLAN 20)----->Switching process 

 

Regards,

Deepak Kumar

 

Regards,
Deepak Kumar,
Don't forget to vote and accept the solution if this comment will help you!
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:

Review Cisco Networking products for a $25 gift card