Specifications
2-343
Catalyst 4500 Se ries S wit ch C is co IO S C om mand R efer ence —Re lease I OS XE 3 .3.0 XO(1 5.1 (1)XO)
OL_28738 -01
Chapter 2 Cisco IOS Commands for the Catalyst 4500 Series Switches
macro apply cisco-router
macro apply c isco-router
To enable the Cisco-recommended features and settings that are suitable for connecting a switch port to
a router, use the macro apply cisco-router command.
macro apply cisco-router $NVID native_vlanid
Syntax Description
Defaults This command has no default settings.
Command Modes Interface configur ation mode
Usage Guidelines This command can only be viewed and appl ied; it cannot be modified.
Ensure that the existing configuration on the interface does not conflict with the intended macro
configuration. Before y ou apply the macro apply cisco-router command, clear t he configura tion on t he
interface with the default interface command.
Examples This example shows how to enable the Cisco-recommended features and settings on port fa2/1:
Switch(config)# interface FastEthernet2/1
Switch(config-if)# macro apply cisco-router $NVID 80
Switch(config-if)#
The contents of this macro are as follows:
# Access Uplink to Distribution
switchport trunk encapsulation dot1q
# Define unique Native VLAN on trunk ports
# Recommended value for native vlan (NVID) should not be 1
switchport trunk native vlan $NVID [native_vlan_id]
# Update the allowed VLAN range (VRANGE) such that it
# includes data, voice and native VLANs
# switchport trunk allowed vlan $VRANGE [vlan_range]
# Hardcode trunk and disable negotiation to
# speed up convergence
# Hardcode speed and duplex to router
switchport mode trunk
switchport nonegotiate
speed 100
duplex full
# Configure qos to trust this interface
auto qos voip trust
qos trust dscp
# Ensure fast access to the network when enabling the interface.
# Ensure that switch devices cannot become active on the interface.
spanning-tree portfast
spanning-tree bpduguard enable
$NVID native_vlanid Specifies a native VLAN ID.