how to configure a trunk on cat6500 with there is default vlan

Answered Question
May 4th, 2008
User Badges:

Just ask a simple question, but, it is hard for me.


I have been asked to configure a port which is trunked with few vlans, but there is a speciafid default vlan.


I thought it is simple like below:

switchport access vlan 123

switchport trunk allowed vlan 123,456

switchport mode dynamic desirable


but, it is not working. Could anyone advice me how can I configure trunking with a default vlan?


Any comments will be apprecited


Thanks in advance



Correct Answer by ankbhasi about 9 years 3 weeks ago

Hi Friend,


Your configuration says "switchport mode dynamic desirabke" which means it will try to negotiate the switch mode which can be either access or trunk.


If you want this port to be configured as trunk you can manually configure the switchport mode as trunk using following command


switchport mode trunk

switchport trunk allowed vlan 123,456


You do not need to configure switchport mode access with some vlan number. If you want vlan 123 traffic to pass the trunk without any tag then you can configure one more command


switchport trunk native vlan 123


Please come back if you have any doubts.


HTH


Ankur


*Pls rate all helpfull post

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 4.7 (3 ratings)
Loading.
lamav Sun, 05/04/2008 - 17:08
User Badges:
  • Blue, 1500 points or more
julxu Sun, 05/04/2008 - 18:49
User Badges:

my cat6500 do not have encapsulation command 802.1q only.


I think the problem is I do not understand what means for default vlan?


another thought is it maybe the default vlan is a native vlan?


Could any one advice me, what behalf different if I change native vlan to the default vlan?



jackthumar Sun, 05/04/2008 - 21:28
User Badges:

Hi,


NATIVE VLAN:- Frames belonging to the native VLAN are not modified when sent over the trunk. Conversely, if an untagged frame is received on a trunk port, the frame is placed into the VLAN that is native to this port.


DEFAULT VLAN:- is the one which is pre-configured in the switch that is VLAN 1.


If you make default vlan as native vlan then there should not be much problem accept all the untagged frames will be received by VLAN1.


Just saw your original post , as far as my understanding, the commands should be


switchport mode trunk

switchport trunk vlan


If you have any problem there after then i would like to know if the switch runs IOS or CATOS.


***pls rate if it helps***


Rgs,

Jack


Amit Singh Sun, 05/04/2008 - 21:36
User Badges:
  • Cisco Employee,

I agree with Jack's post. The configuration should look like this:


Interface gig x/y

switchport mode trunk

switchport trunk allowed vlan 123,456

switchport mode dynamic desirable --> This will allow the trunk to be auto-negotiated and depends on the neigbhor switchport config.


You can also hardcore the trunk encapsulation using the command


switchport trunk encapsulation dot1q


If you want to define the native vlan then use the following command:


switchport trunk native vlan 123


The default vlan on the switch is Vlan1. You cannot change it but can define the native vlan using the command above. Please use the config above and should work fine.


regards,

-amit singh

Correct Answer
ankbhasi Sun, 05/04/2008 - 21:39
User Badges:
  • Cisco Employee,

Hi Friend,


Your configuration says "switchport mode dynamic desirabke" which means it will try to negotiate the switch mode which can be either access or trunk.


If you want this port to be configured as trunk you can manually configure the switchport mode as trunk using following command


switchport mode trunk

switchport trunk allowed vlan 123,456


You do not need to configure switchport mode access with some vlan number. If you want vlan 123 traffic to pass the trunk without any tag then you can configure one more command


switchport trunk native vlan 123


Please come back if you have any doubts.


HTH


Ankur


*Pls rate all helpfull post

kadekmahruta Sun, 05/04/2008 - 22:12
User Badges:

yes it's a very simple command, but why you keep in mind that a trunk should have default vlan. To set a port become a trunk there's only 3 command:

# switchport

# switchport trunk encapsulation ....

# switchport mode trunk

optionally you can add the allowed vlan like yours.

hope it solve your problem.

Actions

This Discussion