SW0配置:
Switch#sh run
Building configuration...Current configuration : 2500 bytes
! version 12.2 no service timestamps log datetime msec no service timestamps debug datetime msec no service password-encryption ! hostname Switch ! ! ! ! ! ip routing ! ! ! ! ! ! ! ! ! ! ! ! ! ! interface FastEthernet0/1 switchport access vlan 10 ! interface FastEthernet0/2 switchport access vlan 10 ! interface FastEthernet0/3 switchport access vlan 10 ! interface FastEthernet0/4 switchport access vlan 10 ! interface FastEthernet0/5 no switchport ip address 10.1.5.1 255.255.255.0 duplex auto speed auto ! interface FastEthernet0/6 no switchport ip address 10.1.6.1 255.255.255.0 duplex auto speed auto ! interface FastEthernet0/7 no switchport ip address 10.1.7.1 255.255.255.0 duplex auto speed auto ! interface FastEthernet0/8 no switchport ip address 10.1.8.1 255.255.255.0 duplex auto speed auto ! interface FastEthernet0/9 no switchport ip address 192.168.9.1 255.255.255.0 duplex auto speed auto ! interface FastEthernet0/10 no switchport ip address 192.168.10.1 255.255.255.0 duplex auto speed auto ! interface FastEthernet0/11 no switchport ip address 192.168.11.1 255.255.255.0 duplex auto speed auto ! interface FastEthernet0/12 no switchport ip address 192.168.12.1 255.255.255.0 duplex auto speed auto ! interface FastEthernet0/13 no switchport ip address 192.168.13.1 255.255.255.0 duplex auto speed auto ! interface FastEthernet0/14 no switchport ip address 192.168.14.1 255.255.255.0 duplex auto speed auto ! interface FastEthernet0/15 no switchport ip address 192.168.15.1 255.255.255.0 duplex auto speed auto ! interface FastEthernet0/16 no switchport ip address 192.168.16.1 255.255.255.0 duplex auto speed auto ! interface FastEthernet0/17 no switchport ip address 192.168.17.1 255.255.255.0 duplex auto speed auto ! interface FastEthernet0/18 ! interface FastEthernet0/19 ! interface FastEthernet0/20 ! interface FastEthernet0/21 ! interface FastEthernet0/22 ! interface FastEthernet0/23 no switchport ip address 172.16.18.3 255.255.255.0 duplex auto speed auto ! interface FastEthernet0/24 no switchport ip address 10.1.80.1 255.255.255.0 duplex full speed 100 ! interface GigabitEthernet0/1 ! interface GigabitEthernet0/2 ! interface Vlan1 no ip address shutdown ! interface Vlan10 ip address 10.1.1.1 255.255.255.0 ! router eigrp 100 network 172.16.0.0 network 10.1.0.0 0.0.255.255 network 192.168.0.0 0.0.255.255 no auto-summary ! ip classless ! ! ! ! ! ! ! line con 0 line vty 0 4 login ! ! ! end
SW2配置:
Switch#sh run
Building configuration...Current configuration : 2507 bytes
! version 12.2 no service timestamps log datetime msec no service timestamps debug datetime msec no service password-encryption ! hostname Switch ! ! ! ! ! ip routing ! ! ! ! ! ! ! ! ! ! ! ! ! ! interface FastEthernet0/1 no switchport ip address 172.16.1.1 255.255.255.0 duplex auto speed auto ! interface FastEthernet0/2 no switchport ip address 172.16.2.1 255.255.255.0 duplex auto speed auto ! interface FastEthernet0/3 no switchport ip address 172.16.3.1 255.255.255.0 duplex auto speed auto ! interface FastEthernet0/4 no switchport ip address 172.16.4.1 255.255.255.0 duplex auto speed auto ! interface FastEthernet0/5 no switchport ip address 172.16.5.1 255.255.255.0 duplex auto speed auto ! interface FastEthernet0/6 no switchport ip address 172.16.6.1 255.255.255.0 duplex auto speed auto ! interface FastEthernet0/7 no switchport ip address 172.16.7.1 255.255.255.0 duplex auto speed auto ! interface FastEthernet0/8 no switchport ip address 172.16.8.1 255.255.255.0 duplex auto speed auto ! interface FastEthernet0/9 no switchport ip address 172.16.9.1 255.255.255.0 duplex auto speed auto ! interface FastEthernet0/10 no switchport ip address 172.16.10.1 255.255.255.0 duplex auto speed auto ! interface FastEthernet0/11 no switchport ip address 172.16.11.1 255.255.255.0 duplex auto speed auto ! interface FastEthernet0/12 no switchport ip address 172.16.12.1 255.255.255.0 duplex auto speed auto ! interface FastEthernet0/13 no switchport ip address 172.16.13.1 255.255.255.0 duplex auto speed auto ! interface FastEthernet0/14 no switchport ip address 172.16.14.1 255.255.255.0 duplex auto speed auto ! interface FastEthernet0/15 no switchport ip address 172.16.15.1 255.255.255.0 duplex auto speed auto ! interface FastEthernet0/16 no switchport ip address 172.16.16.1 255.255.255.0 duplex auto speed auto ! interface FastEthernet0/17 no switchport ip address 172.16.17.1 255.255.255.0 duplex auto speed auto ! interface FastEthernet0/18 ! interface FastEthernet0/19 ! interface FastEthernet0/20 ! interface FastEthernet0/21 ! interface FastEthernet0/22 ! interface FastEthernet0/23 ! interface FastEthernet0/24 no switchport ip address 172.16.18.2 255.255.255.0 duplex auto speed auto ! interface GigabitEthernet0/1 ! interface GigabitEthernet0/2 ! interface Vlan1 no ip address shutdown ! router eigrp 100 network 172.16.0.0 no auto-summary ! ip classless ! ! ! ! ! ! ! line con 0 line vty 0 4 login ! ! ! end
SW1路由表:
Switch#sh ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area * - candidate default, U - per-user static route, o - ODR P - periodic downloaded static routeGateway of last resort is not set
10.0.0.0/24 is subnetted, 6 subnets
C 10.1.1.0 is directly connected, Vlan10 C 10.1.5.0 is directly connected, FastEthernet0/5 C 10.1.6.0 is directly connected, FastEthernet0/6 C 10.1.7.0 is directly connected, FastEthernet0/7 C 10.1.8.0 is directly connected, FastEthernet0/8 C 10.1.80.0 is directly connected, FastEthernet0/24 172.16.0.0/24 is subnetted, 18 subnets D 172.16.1.0 [90/30720] via 172.16.18.2, 00:14:47, FastEthernet0/23 D 172.16.2.0 [90/30720] via 172.16.18.2, 00:14:47, FastEthernet0/23 D 172.16.3.0 [90/30720] via 172.16.18.2, 00:14:47, FastEthernet0/23 D 172.16.4.0 [90/30720] via 172.16.18.2, 00:14:47, FastEthernet0/23 D 172.16.5.0 [90/30720] via 172.16.18.2, 00:14:47, FastEthernet0/23 D 172.16.6.0 [90/30720] via 172.16.18.2, 00:14:47, FastEthernet0/23 D 172.16.7.0 [90/30720] via 172.16.18.2, 00:14:47, FastEthernet0/23 D 172.16.8.0 [90/30720] via 172.16.18.2, 00:14:47, FastEthernet0/23 D 172.16.9.0 [90/30720] via 172.16.18.2, 00:14:47, FastEthernet0/23 D 172.16.10.0 [90/30720] via 172.16.18.2, 00:14:47, FastEthernet0/23 D 172.16.11.0 [90/30720] via 172.16.18.2, 00:14:47, FastEthernet0/23 D 172.16.12.0 [90/30720] via 172.16.18.2, 00:14:47, FastEthernet0/23 D 172.16.13.0 [90/30720] via 172.16.18.2, 00:14:47, FastEthernet0/23 D 172.16.14.0 [90/30720] via 172.16.18.2, 00:14:47, FastEthernet0/23 D 172.16.15.0 [90/30720] via 172.16.18.2, 00:14:47, FastEthernet0/23 D 172.16.16.0 [90/30720] via 172.16.18.2, 00:14:47, FastEthernet0/23 D 172.16.17.0 [90/30720] via 172.16.18.2, 00:14:47, FastEthernet0/23 C 172.16.18.0 is directly connected, FastEthernet0/23 C 192.168.9.0/24 is directly connected, FastEthernet0/9 C 192.168.10.0/24 is directly connected, FastEthernet0/10 C 192.168.11.0/24 is directly connected, FastEthernet0/11 C 192.168.12.0/24 is directly connected, FastEthernet0/12 C 192.168.13.0/24 is directly connected, FastEthernet0/13 C 192.168.14.0/24 is directly connected, FastEthernet0/14 C 192.168.15.0/24 is directly connected, FastEthernet0/15 C 192.168.16.0/24 is directly connected, FastEthernet0/16 C 192.168.17.0/24 is directly connected, FastEthernet0/17
SW2路由表:
Switch# sh ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area * - candidate default, U - per-user static route, o - ODR P - periodic downloaded static routeGateway of last resort is not set
10.0.0.0/24 is subnetted, 6 subnets
D 10.1.1.0 [90/25628160] via 172.16.18.3, 00:14:16, FastEthernet0/24 D 10.1.5.0 [90/30720] via 172.16.18.3, 00:14:16, FastEthernet0/24 D 10.1.6.0 [90/30720] via 172.16.18.3, 00:14:16, FastEthernet0/24 D 10.1.7.0 [90/30720] via 172.16.18.3, 00:14:16, FastEthernet0/24 D 10.1.8.0 [90/30720] via 172.16.18.3, 00:14:16, FastEthernet0/24 D 10.1.80.0 [90/30720] via 172.16.18.3, 00:14:16, FastEthernet0/24 172.16.0.0/24 is subnetted, 18 subnets C 172.16.1.0 is directly connected, FastEthernet0/1 C 172.16.2.0 is directly connected, FastEthernet0/2 C 172.16.3.0 is directly connected, FastEthernet0/3 C 172.16.4.0 is directly connected, FastEthernet0/4 C 172.16.5.0 is directly connected, FastEthernet0/5 C 172.16.6.0 is directly connected, FastEthernet0/6 C 172.16.7.0 is directly connected, FastEthernet0/7 C 172.16.8.0 is directly connected, FastEthernet0/8 C 172.16.9.0 is directly connected, FastEthernet0/9 C 172.16.10.0 is directly connected, FastEthernet0/10 C 172.16.11.0 is directly connected, FastEthernet0/11 C 172.16.12.0 is directly connected, FastEthernet0/12 C 172.16.13.0 is directly connected, FastEthernet0/13 C 172.16.14.0 is directly connected, FastEthernet0/14 C 172.16.15.0 is directly connected, FastEthernet0/15 C 172.16.16.0 is directly connected, FastEthernet0/16 C 172.16.17.0 is directly connected, FastEthernet0/17 C 172.16.18.0 is directly connected, FastEthernet0/24 D 192.168.9.0/24 [90/30720] via 172.16.18.3, 00:13:50, FastEthernet0/24 D 192.168.10.0/24 [90/30720] via 172.16.18.3, 00:13:50, FastEthernet0/24 D 192.168.11.0/24 [90/30720] via 172.16.18.3, 00:13:50, FastEthernet0/24 D 192.168.12.0/24 [90/30720] via 172.16.18.3, 00:13:50, FastEthernet0/24 D 192.168.13.0/24 [90/30720] via 172.16.18.3, 00:13:50, FastEthernet0/24 D 192.168.14.0/24 [90/30720] via 172.16.18.3, 00:13:50, FastEthernet0/24 D 192.168.15.0/24 [90/30720] via 172.16.18.3, 00:13:50, FastEthernet0/24 D 192.168.16.0/24 [90/30720] via 172.16.18.3, 00:13:50, FastEthernet0/24 D 192.168.17.0/24 [90/30720] via 172.16.18.3, 00:13:50, FastEthernet0/24