Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

Switch port - configure with or without trunk??

I also posted this question on learningnetwork.cisco.com, but there aren't any good answers on that forum. Hopefully, there will have someone here who can help.

The topology is basic and simple:

Switch - Phone - PC

------------------------------------------------------

1. For the first question:

I read in the book & also somewhere on the Internet, and it says for older models of switches, we have to configure trunk mode for the interface:

     # .........

     # switchport mode trunk

However, for newer switch, we don't need that command, the following are enough:

     # int f0/1

     # switchport mode access

     # spanning-tree portfast

     # switchport access vlan 50

     # switchport voice vlan 10

It means for new models, CDP will detect & configure the trunk automatically????

------------------------------------------------------

2. For the 2nd set of questions:

Let say we are using the older models of switches for this question, and the followings are the configuration on the switch (from a lab book):

     # int f0/1

     # switchport trunk encapsulation dot1q

     # switchport trunk native vlan 10     (data VLAN)

     # switchport mode trunk

     # swichport voice vlan 15

The 1st subquestion is:

I can see that there is no command "# switchport access vlan 10". However, it seems that everything is still working fine. When I asked my friend, he said that we don't need the command "# switchport access vlan 10" because we already configured the command "# switchport trunk native vlan 10". However, I couldn't see any connections between the 2 commands here because that port on the switch is still supposed to be an access port (for the PC). In other words, what I meant is that I will configure like this:

     # int f0/1

     # switchport trunk encapsulation dot1q

     # switchport trunk native vlan 10     (data VLAN)

    # switchport access vlan 10

     # switchport mode trunk

     # swichport voice vlan 15

And if I want to configure another vlan for the PC instead of vlan 10,  I will do:

     # int f0/1

     # switchport trunk encapsulation dot1q

     # switchport trunk native vlan 10 

     # switchport access vlan 20     (data VLAN)  -> now vlan 20 becomes data VLAN

     # switchport mode trunk

     # swichport voice vlan 15

------------------------

The 2nd subquestion is:

This subquestion is also based on the configuration above:

For the first configuration:

     # switchport trunk native vlan 10     (data VLAN)

    # switchport access vlan 10

     -> This means the data VLAN is also a native VLAN

For the 2nd configuration:

     # switchport trunk native vlan 10 

     # switchport access vlan 20     (data VLAN)

     -> this means the data VLAN is a normal VLAN

In brief, data VLAN can be either native or non-native VLAN.

Any helps would be appreciated. Thanks a lot

3 REPLIES
VIP Purple

Switch port - configure with or without trunk??

In general a switchport is an access-port *or* a trunk. If you configure "switchport mode access" (which is also the default), then all "switchport trunk ..." commands have no effect. But they stay in the config and get active the moment you change to a trunk. If you configure "switchport mode trunk" then all "switchport access ..." commands have no effect.

The exception is the situation you describe in your first scenario. There you have a mix of access and trunk. A mix because from configuration-standpoint you configure an access-port. But for the telephone you need dot1q/dot1p-ecapsulated frames and for that you need a trunk. With "switchport voice vlan" you enable the port to behave like a trunk for that one vlan that you specify, but it's not a full featured trunk like with "switchport mode trunk".

-- 
Don't stop after you've improved your network! Improve the world by lending money to the working poor:
http://www.kiva.org/invitedby/karsteni


--
Don't stop after you've improved your network! Improve the world by lending money to the working poor: http://www.kiva.org/invitedby/karsteni
New Member

Switch port - configure with or without trunk??

OK, thanks a lot. But sorry, u didn't directly answer my questions?

VIP Purple

Switch port - configure with or without trunk??

Well, I tried to answer the first question and show that the other questions are not relevant anymore when you realize which config is active if a port is an access-port or a trunk-port.

But you are right that a part on the first question is still missing. CDP doesn't play any role for the switchport. Also a device that doesn't talk CDP could use the auxilary vlan (that's the more or less "official name" of the voice vlan). And I forgot to mention that the command "switchport voice vlan" is only active on an access-port but not on a trunk.

-- 
Don't stop after you've improved your network! Improve the world by lending money to the working poor:
http://www.kiva.org/invitedby/karsteni


--
Don't stop after you've improved your network! Improve the world by lending money to the working poor: http://www.kiva.org/invitedby/karsteni
191
Views
0
Helpful
3
Replies
CreatePlease login to create content