Command:

set trunk

Mode:

Switch> (enable)


Syntax:

set trunk mod_num/port_num [on | off | desirable | auto | nonegotiate] [vlan_range] [isl | dot1q dot10 | lane | negotiate]


Syntax Description:

mod_num

Variable that specifies the number of the module.

port_num

Variable that specifies the number of the port on the module.

on

(Optional) Keyword that forces the port to become a trunk port and persuade the neighboring port to become a trunk port. The port becomes a trunk port even if the neighbor port does not agree to become a trunk. The only possible mode for ATM ports is on.

off

(Optional) Keyword that forces a port to become a nontrunk port and persuades the neighboring port to become a nontrunk port. The port becomes a nontrunk port even if the neighbor port does not agree to become a nontrunk port. This is the default mode for FDDI trunks. This option is not allowed for ATM ports.

desirable

(Optional) Keyword that causes a port to negotiate actively with the neighbor port to become a trunk link. This mode is not allowed on FDDI and ATM ports.

auto

(Optional) Keyword that causes the port to become a trunk port if the neighboring port tries to negotiate a trunk link. This mode is not allowed on FDDI and ATM ports. This is the default mode for Fast Ethernet and Gigabit Ethernet ports.

nonegotiate

(Optional) Keyword that forces the port to become a trunk port but prevents it from sending DTP frames to its neighbor. This mode is allowed only on ISL and IEEE 802.1Q trunks.

vlan_range

(Optional) VLANs to add to the list of allowed VLANs on the trunk; valid values are from 1 to 1005.

isl

(Optional) Keyword that specifies an ISL trunk on an Ethernet port.

dot1q

(Optional) Keyword that specifies an IEEE 802.1Q trunk on an Ethernet port. IEEE 802.1Q trunks are supported in Catalyst 5000 family and 2926G series software release 4.1(1) and later with 802.1Q-capable hardware. Automatic negotiation of 802.1Q trunks is supported in software release 4.2(1) and later. In software release 4.1, you must use the nonegotiate keyword with 802.1Q trunks.

dot10

(Optional) Keyword that specifies an IEEE 802.10 trunk on a FDDI or CDDI port.

lane

(Optional) Keyword that specifies an ATM LANE trunk on an ATM port.

negotiate

(Optional) Keyword that causes the port to become an ISL (preferred) or 802.1Q trunk, depending on the configuration and capabilities of the neighboring port.

 


Command Description:

Use the set trunk command to configure trunk ports and to add VLANs to the allowed VLAN list for existing trunks.

Trunking capabilities are hardware dependent. Refer to the Module Installation Guide for your switch to determine the trunking capabilities of your hardware, or enter the show port capabilities command.

The Catalyst 4000 family switches use the DTP (formerly known as DISL) to negotiate trunk links automatically on Fast Ethernet and Gigabit Ethernet ports. Whether a port will negotiate to become a trunk port depends on both the mode and the trunk type specified for that port. Refer to the Software Configuration Guide-Catalyst 4000 Family, 2948G, and 2980G Switches for detailed information on how trunk ports are negotiated.

DTP is a point-to-point protocol. However, some internetworking devices might improperly forward DTP frames. You can avoid this problem by ensuring that trunking is turned off on ports connected to non-Catalyst 4000 family devices if you do not intend to trunk across those links. When enabling trunking on a link to a Cisco router, enter the nonegotiate keyword to cause the port to become a trunk but not generate DTP frames. The nonegotiate keyword is available in Catalyst 4000 family software release 2.4(3) and later.

For trunking to be negotiated on Fast Ethernet and Gigabit Ethernet ports, the ports must be in the same VTP domain. However, you can use the on or nonegotiate keywords to force a port to become a trunk, even if it is in a different domain.

To remove VLANs from the allowed list for a trunk, enter the clear trunk mod_num/port_num vlan_range command. When you first configure a port as a trunk, the set trunk command always adds all VLANs to the allowed VLAN list for the trunk, even if you specify a VLAN range (the specified VLAN range is ignored).

To remove VLANs from the allowed list, enter the clear trunk mod_num/port_num vlan_range command. To later add VLANs that were removed, enter the set trunk mod_num/port_num vlan_range command.

If you do not enter a trunk-type keyword, the value is unchanged from the previous configuration.

The dot1q trunk type is the only trunk type supported by the Catalyst 4000 family switches.

To return a trunk to its default trunk type and mode, enter the clear trunk mod_num/port_num command.

If you enter the set trunk command on a Token Ring port, you receive a message indicating that the port is "not a trunk-capable port."

When you are running the set trunk command on an Access Gateway module, you have limited usage of the command.


Examples:

This example shows how to set port 2 on module 1 as a trunk port:

Console> (enable) set trunk 1/2 on

Port(s) 1/2 trunk mode set to on.
Console> (enable)
 

This example shows how to set port 2 on module 1 as a nontrunk port:

Console> (enable) set trunk 1/2 off

Port(s)  1/2 trunk mode set to off.
Console> (enable)
 

This example shows how to set port 2 on module 1 as a preferred trunk port:

Console> (enable) set trunk 1/2 desirable
Port(s)  1/2 trunk mode set to desirable.
Console> (enable) 2000 Jan 11 09:16:29 %DTP-5-TRUNKPORTON:Port 1/2 has become ik
 

This example shows how to add VLANs 5 through 50 to the allowed VLAN list for a trunk port (VLANs were previously removed from the allowed list with the clear trunk command):

Console> (enable) set trunk 1/1 5-50

Adding vlans 5-50 to allowed list.
Port(s) 1/1 allowed vlans modified to 1,5-50,101-1005.
Console> (enable)
 

This example shows how to set port 5 on module 4 as an 802.1Q trunk port in
desirable mode:

Console> (enable) set trunk 4/5 desirable dot1q

Port(s) 4/5 trunk mode set to desirable.
Port(s) 4/5 trunk type set to dot1q.
Console> (enable)
 

This example shows how to set port 1 on module 1 as an ISL trunk port:

Console> (enable) set trunk 1/1 isl 
Port(s)  1/1 trunk type set to isl.
Console> (enable) 

 


Misconceptions:
None

Related Commands:
clear trunk
show trunk

� Cisco Systems, Inc. 2001, 2002, 2003
World Wide Education

Converted from CHM to HTML with chm2web Pro 2.85 (unicode)