cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2155
Views
0
Helpful
11
Replies

What is the effect of the command switchport trunk native vlan x

marwa.jeljli1
Level 1
Level 1

Hello all,

I have a SG500 switch. The port Gi0/19 is directly connected to a machine. When i show the running config file i find the following config in the interface gi0/19:

switchport trunk native vlan 70

 

I need to understand this command because i'm a bit confused that i know that only if we have a link between two switch that we put an interface in a trunk mode.

 

 

Please Help :)

1 Accepted Solution

Accepted Solutions

Trunks can carry all the traffic(vlan 70,80,........Including vlan1)

Access port can only be in one vlan (Say vlan 70)

 

So if you configured as trunk and connect the server,  and since native vlan is 70, when traffic is of vlan 70, it will not be tagged so your server can understand it.(Assuming that server do not have the capacity to understand the tagged frames). Traffic in other vlan will also be received by this interface (say vlan 80,....vlan1....) but will be dropped.

 

If you configure it as only access and in vlan 70, only untagged vlan 70 traffic will be received on the interface.

Thanks

 

 

View solution in original post

11 Replies 11

Ashok Kumar
Cisco Employee
Cisco Employee

Hi,

It says that, if you configure a trunk on this port this commnd will set the VLAN 70 as the native VLAN for this port

So that means that actually the port doesn't work as a trunk port ?

Traffic on vlan 70 that is leaving the switch will be  untagged. Any untagged traffic coming into the switch is assumed to be on vlan 70.

So it will be directed to the port Gi0/19 where the server is connected ?

Because as i know when a port is attached to a machine it will be configured as an access port so why this particular configuration??? on this port

 

 

I hope my question is clear because i get confused and i couldn't understand!!

 

 

 

Thank you all

Trunks will receive all the traffic. If any packet is for vlan 70, it will be untagged.

I believe your Server is in Vlan 70. 

A PC cannot understand tagged frames. So if a packet is tagged and PC receives it, it will just be dropped.

 

I believe you can just configure after telnet to the switch

 

#default interface gi0/19

#int gi0/19

#switchport mode access

#switchport access vlan xx

 

 

Ok so what i understood is:

The switchport trunk native vlan x is equivalent to the switchport access vlan x

 

that is it ?

 

Thanks very much

Trunks can carry all the traffic(vlan 70,80,........Including vlan1)

Access port can only be in one vlan (Say vlan 70)

 

So if you configured as trunk and connect the server,  and since native vlan is 70, when traffic is of vlan 70, it will not be tagged so your server can understand it.(Assuming that server do not have the capacity to understand the tagged frames). Traffic in other vlan will also be received by this interface (say vlan 80,....vlan1....) but will be dropped.

 

If you configure it as only access and in vlan 70, only untagged vlan 70 traffic will be received on the interface.

Thanks

 

 

 i have undertood very well the difference 

But my question now is: What is the aim behind the use of  the trunk native command  and not access mode command?

Maybe for security reasons, your management decided to change the native vlan from default Vlan 1 to other.

And say you are connecting to other switch, the port has to be trunk and you also want default vlan  to be different from the default vlan 1.

what is 

switchport trunk allowed vlan 333

switchport trunk native vlan 333