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


7500(config-subif)#ip address 10.10.10.1 255.255.255.0
7500(config-subif)#exit
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: In order to make this setup work, and to successfully ping between Workstation 1 and Workstation 2, you need to make sure that the default gateways on the workstations are setup properly. For Workstation 1, the default gateway should be 10.10.10.1 and for Workstation 2, the default gateway should be 10.10.11.1.
7500#show running-config
Building configuration...
Current configuration : 1593 bytes
!
version 12.2
no service pad
service timestamps debug uptime
service timestamps log uptime
no service passWord-encryption
no service single-slot-reload-enable
!
hostname 7500
!
boot system disk1:rsp-jsv-mz.122-7b.bin
!
ip subnet-zero
!
ip cef
call rsvp-sync
!
!
!
interface Port-channel1
no ip address
full-duplex
hold-queue 300 in
!
interface Port-channel1.1
encapsulation isl 1
ip address 10.10.10.1 255.255.255.0
!
interface Port-channel1.2
encapsulation isl 2
ip address 10.10.11.1 255.255.255.0
! -- If 802.1q trunking is configured,
! -- you will see the following output instead:
interface Port-channel1.1
encapsulation dot1Q 1 native
ip address 10.10.10.1 255.255.255.0
!
interface Port-channel1.2
encapsulation dot1Q 2
ip address 10.10.11.1 255.255.255.0
!
interface FastEthernet5/1/0
no ip address
no ip mroute-cache
speed 100
full-duplex
channel-group 1
!
interface FastEthernet5/1/1
no ip address
no ip mroute-cache
speed 100
full-duplex
channel-group 1
!
!
ip classless
no ip http server
ip pim bidir-enable
!
!
!
!
line con 0
line aux 0
line vty 0 4
login
!
end

推荐阅读