switchport trunk vs switchport mode access/trunk

Unanswered Question
Dec 20th, 2004

I am studying for the CCNA exam and was wondering if somebosy could please shed the light on the difference between the switchport trunk vs switchport mode access/trunk as far as trunking is concerned on the 2950 switch?

thanks.

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Average Rating: 0 (0 ratings)
ccie12933 Mon, 12/20/2004 - 13:43

By default, switch ports are in "dynamic desirable" mode, which means they're actively attempting to trunk.

If a port is going to belong to a specific vlan, you can use "switchport mode access" to make that port an unconditional access port. This port will be assigned to a single vlan.

If you set a port to "switchport mode trunk", the port is now unconditionally a trunk port.

If a port is by default in "dynamic desirable" mode, why bother making it a trunk port? One reason is to prevent the sending of Dynamic Trunking Protocol frames. These frames are sent by ports in dynamic desirable, but not in trunking mode. (Some devices don't handle DTP frames correctly.)

Chris Bryant

CCIE #12933

http://www.thebryantadvantage.com

axfalk Mon, 12/20/2004 - 17:27

Chris, thanks for your response. So, if I a port is going to be a trunk, can I define it using the "switchport trunk" command as opposed to the "swithport mode trunk" command? - what would be the difference?

Thanks again.

simon.hart@btin... Tue, 12/21/2004 - 07:03

Hi

I think your confusion lies in the fact that switchport mode trunk and switchport trunk are two different commands that are interelated.

As Chris highlighted earlier, on IOS based switches the default is that the port is by default in desirable mode - this means that the port will generate DTP frames and will attempt to negotiate a trunk if the other end is set to desirable, auto or on. (incidentally the default on CATos is Auto).

With the command switchport mode trunk you can define whether the trunk will be one of the following:

Auto

On

Nonegotiate

Desirable

Off

There are a number of combinations that work and a number that do not - check out CCO for the combinations.

The switchport trunk command is used to define the encapsulation type of the trunk. This command can also be used to define the VLAN's that are allowed across the trunk. Syntax for this command is:

switchport trunk encapsulation dot1q (for 802.1q encapsulation)

switchport trunk allowed vlan remove 2-1001 (clears all the vlans that are allowed across the trunk)

switchport trunk allowed vlan add 10-20 (only now allows vlan's 10 to 20 across the trunk)

Hope this helps

Simon

axfalk Tue, 12/21/2004 - 07:56

Simon, thanks - it has clarified it for me. Just a follow-up ? please, if you do not mind. If a port is defined as a trunk port via the "switchport mode trunk" command, would I be able to assign a VLAN to that port or I could only assign a VLAN to a port that's in access mode?

thanks again.

ccie12933 Tue, 12/21/2004 - 08:47

:: jumping back in :::

Once a link is a trunk port, you can't assign a VLAN to it.

Simon left some great links for you to read. The different combinations seem a little complicated at first, but they're not that bad.

Chris Bryant

CCIE #12933

www.thebryantadvantage.com

Actions

Login or Register to take actions

This Discussion

Posted December 20, 2004 at 12:49 PM
Stats:
Replies:5 Avg. Rating:
Views:5453 Votes:0
Shares:0
Tags: No tags.

Discussions Leaderboard