各个机器的 配置如下:
R9:
Current configuration : 1282 bytes
!
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname Router
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
ip subnet-zero
!
!
no ip domain lookup
!
ip cef
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
no ip address
duplex half
!
interface FastEthernet0/0.1
encapsulation dot1Q 1 native
no cdp enable
!
interface FastEthernet0/0.2
encapsulation dot1Q 2
ip address 172.16.20.1 255.255.255.0
no cdp enable
!
interface FastEthernet0/0.3
encapsulation dot1Q 3
ip address 172.16.30.1 255.255.255.0
no cdp enable
!
interface Serial1/0
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/1
ip address 192.168.10.1 255.255.255.0
serial restart-delay 0
clock rate 64000
!
interface Serial1/2
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/3
no ip address
shutdown
serial restart-delay 0
!
interface FastEthernet2/0
no ip address
shutdown
duplex auto
speed auto
!
interface FastEthernet2/1
no ip address
shutdown
duplex auto
speed auto
!
ip classless
no ip http server
!
!
no cdp run
!
SW1:
Current configuration : 1524 bytes
!
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname Router
!
boot-start-marker
boot-end-marker
!
!
memory-size iomem 5
no aaa new-model
ip subnet-zero
!
!
ip cef
!
!
no ip domain lookup
no ftp-server write-enable
!
!
!
!
interface FastEthernet0/0
no ip address
shutdown
!
interface FastEthernet0/1
no ip address
shutdown
!
interface FastEthernet0/2
no ip address
shutdown
!
interface FastEthernet0/3
no ip address
shutdown
!
interface FastEthernet0/4
no ip address
shutdown
!
interface FastEthernet0/5
no ip address
shutdown
!
interface FastEthernet0/6
no ip address
shutdown
!
interface FastEthernet0/7
no ip address
shutdown
!
interface FastEthernet0/8
no ip address
shutdown
!
interface FastEthernet0/9
no ip address
shutdown
!
interface FastEthernet0/10
no ip address
shutdown
!
interface FastEthernet0/11
no ip address
shutdown
!
interface FastEthernet0/12
no ip address
shutdown
!
interface FastEthernet0/13
switchport mode trunk
no ip address
!
interface FastEthernet0/14
switchport mode trunk
no ip address
!
interface FastEthernet0/15
switchport mode trunk
no ip address
!
interface Vlan1
ip address 172.16.10.2 255.255.255.0
!
ip default-gateway 172.16.10.1
ip http server
ip classless
!
!
!
no cdp run
!
!
control-plane
!
!
line con 0
exec-timeout 0 0
logging synchronous
transport preferred all
transport output all
line aux 0
transport preferred all
transport output all
SW3:
Current configuration : 1530 bytes
!
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname Router
!
boot-start-marker
boot-end-marker
!
!
memory-size iomem 5
no aaa new-model
ip subnet-zero
!
!
ip cef
!
!
no ip domain lookup
no ftp-server write-enable
!
!
!
!
interface FastEthernet0/0
switchport access vlan 2
no ip address
!
interface FastEthernet0/1
switchport access vlan 3
no ip address
!
interface FastEthernet0/2
no ip address
shutdown
!
interface FastEthernet0/3
no ip address
shutdown
!
interface FastEthernet0/4
no ip address
shutdown
!
interface FastEthernet0/5
no ip address
shutdown
!
interface FastEthernet0/6
no ip address
shutdown
!
interface FastEthernet0/7
no ip address
shutdown
!
interface FastEthernet0/8
no ip address
shutdown
!
interface FastEthernet0/9
no ip address
shutdown
!
interface FastEthernet0/10
no ip address
shutdown
!
interface FastEthernet0/11
no ip address
shutdown
!
interface FastEthernet0/12
no ip address
shutdown
!
interface FastEthernet0/13
switchport mode trunk
no ip address
!
interface FastEthernet0/14
no ip address
shutdown
!
interface FastEthernet0/15
no ip address
shutdown
!
interface Vlan1
ip address 172.16.10.3 255.255.255.0
!
ip default-gateway 172.16.10.1
ip http server
ip classless
!
!
!
no cdp run
!
!
control-plane
!
!
line con 0
exec-timeout 0 0
logging synchronous
transport preferred all
transport output all
line aux 0
transport preferred all
transport output all
line vty 0 4
!
end
SW4:
Current configuration : 1530 bytes
!
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname Router
!
boot-start-marker
boot-end-marker
!
!
memory-size iomem 5
no aaa new-model
ip subnet-zero
!
!
ip cef
!
!
no ip domain lookup
no ftp-server write-enable
!
!
!
!
interface FastEthernet0/0
switchport access vlan 2
no ip address
!
interface FastEthernet0/1
switchport access vlan 3
no ip address
!
interface FastEthernet0/2
no ip address
shutdown
!
interface FastEthernet0/3
no ip address
shutdown
!
interface FastEthernet0/4
no ip address
shutdown
!
interface FastEthernet0/5
no ip address
shutdown
!
interface FastEthernet0/6
no ip address
shutdown
!
interface FastEthernet0/7
no ip address
shutdown
!
interface FastEthernet0/8
no ip address
shutdown
!
interface FastEthernet0/9
no ip address
shutdown
!
interface FastEthernet0/10
no ip address
shutdown
!
interface FastEthernet0/11
no ip address
shutdown
!
interface FastEthernet0/12
no ip address
shutdown
!
interface FastEthernet0/13
no ip address
shutdown
!
interface FastEthernet0/14
switchport mode trunk
no ip address
!
interface FastEthernet0/15
no ip address
shutdown
!
interface Vlan1
ip address 172.16.10.4 255.255.255.0
!
ip default-gateway 172.16.10.1
ip http server
ip classless
!
!
!
no cdp run
!
!
control-plane
!
!
line con 0
exec-timeout 0 0
logging synchronous
transport preferred all
transport output all
line aux 0
transport preferred all
transport output all
line vty 0 4
!
end
PC3;
!
interface FastEthernet0/0
ip address 172.16.20.2 255.255.255.0
no ip route-cache
duplex auto
speed auto
!
interface FastEthernet0/1
no ip address
no ip route-cache
shutdown
duplex auto
speed auto
!
ip default-gateway 172.16.20.1
ip http server
ip classless
!
PC4:
interface FastEthernet0/1
ip address 172.16.30.2 255.255.255.0
duplex auto
speed auto
!
ip default-gateway 172.16.30.1
ip http server
ip classless
!
PC5;
interface FastEthernet0/0
ip address 172.16.20.3 255.255.255.0
no ip route-cache
duplex auto
speed auto
!
interface FastEthernet0/1
no ip address
no ip route-cache
shutdown
duplex auto
speed auto
!
ip default-gateway 172.16.20.1
ip http server
ip classless
!
PC6:
interface FastEthernet0/1
ip address 172.16.30.3 255.255.255.0
duplex auto
speed auto
!
ip default-gateway 172.16.30.1
ip http server
ip classless
!