Cisco交换机以太网经典配置( 四 )


7500#
802.1Q Configuration on the Cisco 7500 for Cisco IOS Versions Earlier than 12.1(3)T
In Cisco IOS versions earlier than 12.1(3)T, the encapsulation dot1Q 1 native command under the subinterface was not available. However, it is still necessary to match the native VLAN across the link as described previously.
To configure 802.1q trunking in software versions earlier than 12.1(3)T, the IP address for VLAN 1 is configured on the main port-channel 1 interface as oppossed to a port-channel subinterface.
! -- Configure a port-channel interface to enable FEC.
7500#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
7500(config)#int port-channel 1
01:34:10: %LINEPROTO-5-UPDOWN: Line protocol on Interface Port-channel1, changed
state to down
! -- Configure full-duplex to match the duplex setting on the Catalyst switch side.
7500(config-if)#full-duplex 7500(config-if)#exit
! -- Do not configure an interface port-channel 1.1
!-- Instead, create a port-channel 1 main interface and configure the IP address for VLAN 1 here.
7500(config)#int port-channel 1
7500(config-if)#full-duplex
7500(config-if)#ip address 10.10.10.1 255.255.255.0
7500(config-if)#exit
7500(config)#
! -- It is still necessary to create a subinterface for VLAN 2.
7500(config)#int port-channel 1.2
7500(config-subif)#encapsulation dot1Q 2
7500(config-subif)#ip address 10.10.11.1 255.255.255.0
7500(config-subif)#exit
! -- Configure the FastEthernet interfaces for speed 100 depending on the port adapter.
! -- Some FastEthernet port adapters can autonegotiate speed(10 or 100) and duplex(half or full).
! -- Others are only capable of 100 (half or full).
7500(config)#int fa5/1/0
7500(config-if)#speed 100
! -- Configure the FastEthernet interfaces to be members of port-channel 1 by issuing the channel-group command.
7500(config-if)#channel-group 1
%Interface MTU set to channel-group MTU 1500.
7500(config-if)#no shut
7500(config-if)#
%Interface MTU set to channel-group MTU 1500.
FastEthernet5/1/0 added as member-1 to port-channel1
01:46:09: %LINK-3-UPDOWN: Interface FastEthernet5/1/0, changed state to up
01:46:10: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet5/1/0,
changed state to up
01:46:12: %LINEPROTO-5-UPDOWN: Line protocol on Interface Port-channel1,
changed state to up
Router(config-if)#exit
Router(config)#int fa 5/1/1
Router(config-if)#speed 100
Router(config-if)#channel-group 1
%Interface MTU set to channel-group MTU 1500.
Router(config-if)#no shut
Router(config-if)#
%Interface MTU set to channel-group MTU 1500.
FastEthernet5/1/1 added as member-2 to port-channel1
01:54:52: %LINK-3-UPDOWN: Interface FastEthernet5/1/1, changed state to up
01:54:53: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet5/1/1,
changed state to up
Router(config-if)#exit
! -- Remember to save the configuration.
7500#write memory
Building configuration...
[OK]
7500#
Note: Remember also that in any version of software previous to 12.2 or 12.2T for the 7000/7500 series, you will have to issue the no ip cef command globally before configuring 802.1q trunking on a subinterface. Otherwise, you will see the following error message: 802.1q encapsulation not supported with CEF configured on the interface. Refer to the Hardware and Software Requirements section of this document for more information.
7500#show running-config
Building configuration...
Current configuration : 1593 bytes
!
version 12.1
no service pad
service timestamps debug uptime
service timestamps log uptime
no service password-encryption

推荐阅读