password 123456 login ! ! ! end
SW6:version 12.2
no service timestamps log datetime msec no service timestamps debug datetime msec no service password-encryption !
hostname sw6 ! ! ! ! ! ! ! ! ! ! ! ! ! !
spanning-tree vlan 2,4,6,8,10 priority 24576 ! ! ! !
interface FastEthernet0/1 !
interface FastEthernet0/2 !
interface FastEthernet0/3 !
interface FastEthernet0/4
switchport trunk encapsulation dot1q switchport mode trunk !
interface FastEthernet0/5 no switchport
ip address 192.168.7.1 255.255.255.0 duplex auto
21
speed auto !
interface FastEthernet0/6 no switchport
ip address 192.168.2.1 255.255.255.0 duplex auto speed auto !
interface FastEthernet0/7 no switchport
ip address 192.168.8.1 255.255.255.0 duplex auto speed auto !
interface FastEthernet0/8 !
interface FastEthernet0/9 !
interface FastEthernet0/10 !
interface FastEthernet0/11 channel-group 1 mode on !
interface FastEthernet0/12 channel-group 1 mode on !
interface FastEthernet0/13 !
interface FastEthernet0/14 !
interface FastEthernet0/15 !
interface FastEthernet0/16 !
interface FastEthernet0/17 !
interface FastEthernet0/18 !
interface FastEthernet0/19 !
interface FastEthernet0/20 !
interface FastEthernet0/21 !
interface FastEthernet0/22 !
22
interface FastEthernet0/23 !
interface FastEthernet0/24 !
interface GigabitEthernet0/1 !
interface GigabitEthernet0/2 !
interface Port-channel 1 !
interface Vlan1
ip address 192.168.4.2 255.255.255.0 !
router ospf 100 router-id 2.2.2.2
log-adjacency-changes
network 192.168.7.0 0.0.0.255 area 1 network 192.168.8.0 0.0.0.255 area 1 network 192.168.2.0 0.0.0.255 area 1 !
ip classless ! ! ! ! ! ! !
line con 0 line vty 0 4
password 123456 login ! ! ! end
2.4、路由器配置
路由器R1,基本配置如下:
23
hostname R1 ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !
interface FastEthernet0/0
ip address 192.168.11.2 255.255.255.0 duplex auto speed auto !
interface FastEthernet1/0 no ip address duplex auto speed auto shutdown !
interface Serial2/0 no ip address shutdown !
interface Serial3/0 no ip address
24
shutdown !
interface FastEthernet4/0 no ip address shutdown !
interface FastEthernet5/0 no ip address shutdown ! router rip version 2
network 192.168.11.0 no auto-summary !
ip classless ! ! ! ! ! ! ! line con 0 line vty 0 4 password 123456 login ! ! ! End
R1(config)#int f0/0
R1(config-if)#ip rip authentication key-chain cisco R1(config)#key chain cisco R1(config-keychain)#key 1
R1(config-keychain-key)#key-string a1b2c3
25