cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements

Community Helping Community

1613
Views
15
Helpful
3
Replies
Beginner

switchport modes query

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
VIP Advocate

Re: switchport modes query

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 make help you!

View solution in original post

3 REPLIES 3
Engager

Re: switchport modes query

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

VIP Expert

Re: switchport modes query

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.
VIP Advocate

Re: switchport modes query

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 make help you!

View solution in original post

CreatePlease to create content
Content for Community-Ad