cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
6440
Views
15
Helpful
5
Replies

switchport access and switchport trunk

roger perkin
Level 2
Level 2

Can someone confirm my thoughts on this switchport configuration

interface FastEthernet0/5

description Mail-Server1

switchport access vlan 710

switchport trunk encapsulation dot1q

switchport mode trunk

It is my understanding that as this switchport is configured as a trunk the switchport access vlan 710 is a redundant line?

On the other end of the port is a router configured like this

interface GigabitEthernet0/1.1

encapsulation dot1Q 1 native

If someone can clear up my understanding on this before I remove the switchport access vlan 710 command as I dont' think it is doing anything

Roger

1 Accepted Solution

Accepted Solutions

Jan Hrnko
Level 4
Level 4

Hi Roger,

the switchport can be either access or trunk.

You can write it in a manner as you did but as you enter the switchport mode trunk command the

switchport access vlan 710 is simply ignored till the time that you enter switchport mode access(which will rewrite switchport mode trunk command).

So

switchport access vlan 710

switchport trunk encapsulation dot1q

switchport mode trunk

results in TRUNK (switchport access vlan 710 ignored).

What do you mean by redundant line? That if port is not negotiated it will work in access mode in vlan 710?

Best regards,

Jan

View solution in original post

5 Replies 5

Jan Hrnko
Level 4
Level 4

Hi Roger,

the switchport can be either access or trunk.

You can write it in a manner as you did but as you enter the switchport mode trunk command the

switchport access vlan 710 is simply ignored till the time that you enter switchport mode access(which will rewrite switchport mode trunk command).

So

switchport access vlan 710

switchport trunk encapsulation dot1q

switchport mode trunk

results in TRUNK (switchport access vlan 710 ignored).

What do you mean by redundant line? That if port is not negotiated it will work in access mode in vlan 710?

Best regards,

Jan

That is what I thought, thank you for clarifying

I am tidying up a config on a 3560 and there is a lot of this!

Roger

Hi Roger,

yes It can be a little bit confusing because both commands will show up in running config. But it works as I said. You can verify this by issuing command

show interface XXX switchport

and check for Operational mode. It should be trunk.

Best regards,

Jan

How do Use no switchport cmd for c3640-ik9o3s-mz.124-25b.image
I will be very glad if you give me the solution

bellaichef
Level 1
Level 1

Hi,

there is an easy way to make your port support both vlan710 in access mode and trunk mode:

Interface FastEthernet0/5

description Mail-Server1

switchport trunk encapsulation dot1q

switchport mode trunk

switchport trunk native vlan 710

This mean that all tagged frame will go through the trunk and all none tagged frame will go through vlan 710.

Bye

FB