配置目标:
通过配置基于IPSec ×××的GRE Tunel,并在GRE Tunel上运行OSPF,实现两地的动态路由。
拓扑结构:
R3-R6模拟两地广域WAN连接;
R2-R7-R4模拟两地通过Internet的连接
配置思路:
1、基础配置(IP地址、静态路由);
2、R2-R4 IPSec ×××配置;
3、R2-R4 GRE Tunel配置;
4、全网OSPF配置;
配置步骤:
最终配置:
---------------------------------------------------------------------------------------------------
R1#
R1#sh run
Building configuration...
Current configuration : 724 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R1
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
ip cef
!
!
!
!
!
multilink bundle-name authenticated
!
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
ip address 12.1.1.1 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
ip address 13.1.1.1 255.255.255.0
duplex auto
speed auto
!
router ospf 1
log-adjacency-changes
network 12.1.1.1 0.0.0.0 area 0
network 13.1.1.1 0.0.0.0 area 0
!
ip route 0.0.0.0 0.0.0.0 12.1.1.2
!
!
ip http server
no ip http secure-server
!
!
!
!
!
!
control-plane
!
!
!
line con 0
line aux 0
line vty 0 4
!
!
end
R1#
R1#sh ip os nei
Neighbor ID Pri State Dead Time Address Interface
100.1.1.2 1 FULL/DR 00:00:35 12.1.1.2 FastEthernet0/0
R1#
R1#sh ip ro
Codes: C - connected, S - static, 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
i - IS-IS, su - IS-IS summary, 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 route
Gateway of last resort is 12.1.1.2 to network 0.0.0.0
100.0.0.0/24 is subnetted, 1 subnets
O IA 100.1.1.0 [110/11121] via 12.1.1.2, 00:00:26, FastEthernet0/0
65.0.0.0/24 is subnetted, 1 subnets
O IA 65.1.1.0 [110/84] via 13.1.1.3, 00:00:26, FastEthernet0/1
36.0.0.0/24 is subnetted, 1 subnets
O IA 36.1.1.0 [110/74] via 13.1.1.3, 00:00:26, FastEthernet0/1
12.0.0.0/24 is subnetted, 1 subnets
C 12.1.1.0 is directly connected, FastEthernet0/0
13.0.0.0/24 is subnetted, 1 subnets
C 13.1.1.0 is directly connected, FastEthernet0/1
45.0.0.0/24 is subnetted, 1 subnets
O IA 45.1.1.0 [110/94] via 13.1.1.3, 00:00:26, FastEthernet0/1
S* 0.0.0.0/0 [1/0] via 12.1.1.2
---------------------------------------------------------------------------------------------------
R2#
R2#
R2#sh run
Building configuration...
Current configuration : 1366 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R2
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
ip cef
!
!
!
!
!
multilink bundle-name authenticated
!
!
!
!
!
!
!
!
crypto isakmp policy 10
encr 3des
hash md5
authentication pre-share
group 2
crypto isakmp key cisco address 74.1.1.4
!
!
crypto ipsec transform-set set esp-des esp-md5-hmac
!
crypto map *** 11 ipsec-isakmp
set peer 74.1.1.4
set transform-set set
match address 100
!
!
!
!
interface Tunnel0
ip address 100.1.1.2 255.255.255.0
tunnel source Serial0/0
tunnel destination 74.1.1.4
!
interface FastEthernet0/0
ip address 12.1.1.2 255.255.255.0
duplex auto
speed auto
!
interface Serial0/0
ip address 27.1.1.2 255.255.255.0
clock rate 2000000
crypto map ***
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
interface Serial0/1
no ip address
shutdown
clock rate 2000000
!
router ospf 1
log-adjacency-changes
network 12.1.1.2 0.0.0.0 area 0
network 100.1.1.2 0.0.0.0 area 1
!
ip route 0.0.0.0 0.0.0.0 27.1.1.7
ip route 74.1.1.0 255.255.255.0 27.1.1.7
!
!
ip http server
no ip http secure-server
!
access-list 100 permit ip 12.1.1.0 0.0.0.255 45.1.1.0 0.0.0.255
!
!
!
!
!
control-plane
!
!
!
line con 0
line aux 0
line vty 0 4
!
!
end
R2#
R2#sh ip int b
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 12.1.1.2 YES manual up up
Serial0/0 27.1.1.2 YES manual up up
FastEthernet0/1 unassigned YES unset administratively down down
Serial0/1 unassigned YES unset administratively down down
Tunnel0 100.1.1.2 YES manual up up
R2#
R2#sh cry isa sa
IPv4 Crypto ISAKMP SA
dst src state conn-id slot status
74.1.1.4 27.1.1.2 QM_IDLE 1002 0 ACTIVE
IPv6 Crypto ISAKMP SA
R2#sh ip os nei
Neighbor ID Pri State Dead Time Address Interface
13.1.1.1 1 FULL/BDR 00:00:29 12.1.1.1 FastEthernet0/0
100.1.1.4 0 FULL/ - 00:00:36 100.1.1.4 Tunnel0
R2#
R2#sh ip ro
Codes: C - connected, S - static, 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
i - IS-IS, su - IS-IS summary, 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 route
Gateway of last resort is 27.1.1.7 to network 0.0.0.0
100.0.0.0/24 is subnetted, 1 subnets
C 100.1.1.0 is directly connected, Tunnel0
65.0.0.0/24 is subnetted, 1 subnets
O 65.1.1.0 [110/11131] via 100.1.1.4, 00:01:00, Tunnel0
36.0.0.0/24 is subnetted, 1 subnets
O 36.1.1.0 [110/11195] via 100.1.1.4, 00:01:00, Tunnel0
27.0.0.0/24 is subnetted, 1 subnets
C 27.1.1.0 is directly connected, Serial0/0
12.0.0.0/24 is subnetted, 1 subnets
C 12.1.1.0 is directly connected, FastEthernet0/0
13.0.0.0/24 is subnetted, 1 subnets
O 13.1.1.0 [110/20] via 12.1.1.1, 00:00:50, FastEthernet0/0
74.0.0.0/24 is subnetted, 1 subnets
S 74.1.1.0 [1/0] via 27.1.1.7
45.0.0.0/24 is subnetted, 1 subnets
O 45.1.1.0 [110/11121] via 100.1.1.4, 00:01:04, Tunnel0
S* 0.0.0.0/0 [1/0] via 27.1.1.7
R2#
---------------------------------------------------------------------------------------------------
R3#
R3#sh run
Building configuration...
Current configuration : 824 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R3
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
ip cef
!
!
!
!
!
multilink bundle-name authenticated
!
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
ip address 13.1.1.3 255.255.255.0
duplex auto
speed auto
!
interface Serial0/0
ip address 36.1.1.3 255.255.255.0
clock rate 2000000
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
interface Serial0/1
no ip address
shutdown
clock rate 2000000
!
router ospf 1
log-adjacency-changes
network 13.1.1.3 0.0.0.0 area 0
network 36.1.1.3 0.0.0.0 area 1
!
!
!
ip http server
no ip http secure-server
!
!
!
!
!
!
control-plane
!
!
!
line con 0
line aux 0
line vty 0 4
!
!
end
R3#
R3#sh ip int b
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 13.1.1.3 YES manual up up
Serial0/0 36.1.1.3 YES manual up up
FastEthernet0/1 unassigned YES unset administratively down down
Serial0/1 unassigned YES unset administratively down down
R3#
R3#sh ip os nei
Neighbor ID Pri State Dead Time Address Interface
13.1.1.1 1 FULL/DR 00:00:37 13.1.1.1 FastEthernet0/0
65.1.1.6 0 FULL/ - 00:00:33 36.1.1.6 Serial0/0
R3#
R3#sh ip ro
Codes: C - connected, S - static, 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
i - IS-IS, su - IS-IS summary, 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 route
Gateway of last resort is not set
100.0.0.0/24 is subnetted, 1 subnets
O 100.1.1.0 [110/11195] via 36.1.1.6, 00:03:44, Serial0/0
65.0.0.0/24 is subnetted, 1 subnets
O 65.1.1.0 [110/74] via 36.1.1.6, 00:03:44, Serial0/0
36.0.0.0/24 is subnetted, 1 subnets
C 36.1.1.0 is directly connected, Serial0/0
12.0.0.0/24 is subnetted, 1 subnets
O 12.1.1.0 [110/20] via 13.1.1.1, 00:03:34, FastEthernet0/0
13.0.0.0/24 is subnetted, 1 subnets
C 13.1.1.0 is directly connected, FastEthernet0/0
45.0.0.0/24 is subnetted, 1 subnets
O 45.1.1.0 [110/84] via 36.1.1.6, 00:03:44, Serial0/0
R3#
---------------------------------------------------------------------------------------------------
R4#
R4#sh run
Building configuration...
Current configuration : 1366 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R4
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
ip cef
!
!
!
!
!
multilink bundle-name authenticated
!
!
!
!
!
!
!
!
crypto isakmp policy 10
encr 3des
hash md5
authentication pre-share
group 2
crypto isakmp key cisco address 27.1.1.2
!
!
crypto ipsec transform-set set esp-des esp-md5-hmac
!
crypto map *** 11 ipsec-isakmp
set peer 27.1.1.2
set transform-set set
match address 100
!
!
!
!
interface Tunnel0
ip address 100.1.1.4 255.255.255.0
tunnel source Serial0/0
tunnel destination 27.1.1.2
!
interface FastEthernet0/0
ip address 45.1.1.4 255.255.255.0
duplex auto
speed auto
!
interface Serial0/0
ip address 74.1.1.4 255.255.255.0
clock rate 2000000
crypto map ***
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
interface Serial0/1
no ip address
shutdown
clock rate 2000000
!
router ospf 1
log-adjacency-changes
network 45.1.1.4 0.0.0.0 area 1
network 100.1.1.4 0.0.0.0 area 1
!
ip route 0.0.0.0 0.0.0.0 74.1.1.7
ip route 27.1.1.0 255.255.255.0 74.1.1.7
!
!
ip http server
no ip http secure-server
!
access-list 100 permit ip 45.1.1.0 0.0.0.255 12.1.1.0 0.0.0.255
!
!
!
!
!
control-plane
!
!
!
line con 0
line aux 0
line vty 0 4
!
!
end
R4#
R4#sh ip int b
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 45.1.1.4 YES manual up up
Serial0/0 74.1.1.4 YES manual up up
FastEthernet0/1 unassigned YES unset administratively down down
Serial0/1 unassigned YES unset administratively down down
Tunnel0 100.1.1.4 YES manual up up
R4#
R4#sh cry isa sa
IPv4 Crypto ISAKMP SA
dst src state conn-id slot status
74.1.1.4 27.1.1.2 QM_IDLE 1002 0 ACTIVE
IPv6 Crypto ISAKMP SA
R4#
R4#sh ip os nei
Neighbor ID Pri State Dead Time Address Interface
100.1.1.2 0 FULL/ - 00:00:38 100.1.1.2 Tunnel0
65.1.1.5 1 FULL/BDR 00:00:36 45.1.1.5 FastEthernet0/0
R4#
R4#sh ip ro
Codes: C - connected, S - static, 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
i - IS-IS, su - IS-IS summary, 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 route
Gateway of last resort is 74.1.1.7 to network 0.0.0.0
100.0.0.0/24 is subnetted, 1 subnets
C 100.1.1.0 is directly connected, Tunnel0
65.0.0.0/24 is subnetted, 1 subnets
O 65.1.1.0 [110/20] via 45.1.1.5, 00:02:48, FastEthernet0/0
36.0.0.0/24 is subnetted, 1 subnets
O 36.1.1.0 [110/84] via 45.1.1.5, 00:02:48, FastEthernet0/0
27.0.0.0/24 is subnetted, 1 subnets
S 27.1.1.0 [1/0] via 74.1.1.7
12.0.0.0/24 is subnetted, 1 subnets
O IA 12.1.1.0 [110/104] via 45.1.1.5, 00:02:40, FastEthernet0/0
13.0.0.0/24 is subnetted, 1 subnets
O IA 13.1.1.0 [110/94] via 45.1.1.5, 00:02:38, FastEthernet0/0
74.0.0.0/24 is subnetted, 1 subnets
C 74.1.1.0 is directly connected, Serial0/0
45.0.0.0/24 is subnetted, 1 subnets
C 45.1.1.0 is directly connected, FastEthernet0/0
S* 0.0.0.0/0 [1/0] via 74.1.1.7
R4#
---------------------------------------------------------------------------------------------------
R5#
R5#sh run
Building configuration...
Current configuration : 724 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R5
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
ip cef
!
!
!
!
!
multilink bundle-name authenticated
!
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
ip address 45.1.1.5 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
ip address 65.1.1.5 255.255.255.0
duplex auto
speed auto
!
router ospf 1
log-adjacency-changes
network 45.1.1.5 0.0.0.0 area 1
network 65.1.1.5 0.0.0.0 area 1
!
ip route 0.0.0.0 0.0.0.0 45.1.1.4
!
!
ip http server
no ip http secure-server
!
!
!
!
!
!
control-plane
!
!
!
line con 0
line aux 0
line vty 0 4
!
!
end
R5#
R5#
R5#sh ip int b
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 45.1.1.5 YES manual up up
FastEthernet0/1 65.1.1.5 YES manual up up
R5#
R5#sh ip os nei
Neighbor ID Pri State Dead Time Address Interface
65.1.1.6 1 FULL/DR 00:00:38 65.1.1.6 FastEthernet0/1
100.1.1.4 1 FULL/DR 00:00:36 45.1.1.4 FastEthernet0/0
R5#
R5#sh ip ro
Codes: C - connected, S - static, 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
i - IS-IS, su - IS-IS summary, 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 route
Gateway of last resort is 45.1.1.4 to network 0.0.0.0
100.0.0.0/24 is subnetted, 1 subnets
O 100.1.1.0 [110/11121] via 45.1.1.4, 00:04:26, FastEthernet0/0
65.0.0.0/24 is subnetted, 1 subnets
C 65.1.1.0 is directly connected, FastEthernet0/1
36.0.0.0/24 is subnetted, 1 subnets
O 36.1.1.0 [110/74] via 65.1.1.6, 00:04:26, FastEthernet0/1
12.0.0.0/24 is subnetted, 1 subnets
O IA 12.1.1.0 [110/94] via 65.1.1.6, 00:04:18, FastEthernet0/1
13.0.0.0/24 is subnetted, 1 subnets
O IA 13.1.1.0 [110/84] via 65.1.1.6, 00:04:15, FastEthernet0/1
45.0.0.0/24 is subnetted, 1 subnets
C 45.1.1.0 is directly connected, FastEthernet0/0
S* 0.0.0.0/0 [1/0] via 45.1.1.4
R5#
---------------------------------------------------------------------------------------------------
R6#
R6#sh run
Building configuration...
Current configuration : 824 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R6
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
ip cef
!
!
!
!
!
multilink bundle-name authenticated
!
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
ip address 65.1.1.6 255.255.255.0
duplex auto
speed auto
!
interface Serial0/0
ip address 36.1.1.6 255.255.255.0
clock rate 2000000
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
interface Serial0/1
no ip address
shutdown
clock rate 2000000
!
router ospf 1
log-adjacency-changes
network 36.1.1.6 0.0.0.0 area 1
network 65.1.1.6 0.0.0.0 area 1
!
!
!
ip http server
no ip http secure-server
!
!
!
!
!
!
control-plane
!
!
!
line con 0
line aux 0
line vty 0 4
!
!
end
R6#
R6#sh ip int b
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 65.1.1.6 YES manual up up
Serial0/0 36.1.1.6 YES manual up up
FastEthernet0/1 unassigned YES unset administratively down down
Serial0/1 unassigned YES unset administratively down down
R6#
R6#sh ip os nei
Neighbor ID Pri State Dead Time Address Interface
36.1.1.3 0 FULL/ - 00:00:33 36.1.1.3 Serial0/0
65.1.1.5 1 FULL/BDR 00:00:32 65.1.1.5 FastEthernet0/0
R6#
R6#
R6#sh ip ro
Codes: C - connected, S - static, 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
i - IS-IS, su - IS-IS summary, 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 route
Gateway of last resort is not set
100.0.0.0/24 is subnetted, 1 subnets
O 100.1.1.0 [110/11131] via 65.1.1.5, 00:05:13, FastEthernet0/0
65.0.0.0/24 is subnetted, 1 subnets
C 65.1.1.0 is directly connected, FastEthernet0/0
36.0.0.0/24 is subnetted, 1 subnets
C 36.1.1.0 is directly connected, Serial0/0
12.0.0.0/24 is subnetted, 1 subnets
O IA 12.1.1.0 [110/84] via 36.1.1.3, 00:05:04, Serial0/0
13.0.0.0/24 is subnetted, 1 subnets
O IA 13.1.1.0 [110/74] via 36.1.1.3, 00:05:01, Serial0/0
45.0.0.0/24 is subnetted, 1 subnets
O 45.1.1.0 [110/20] via 65.1.1.5, 00:05:13, FastEthernet0/0
R6#
---------------------------------------------------------------------------------------------------
R7#
R7#
R7#sh run
Building configuration...
Current configuration : 612 bytes
!
version 12.2
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname R7
!
!
memory-size iomem 15
ip subnet-zero
!
!
!
!
!
!
interface FastEthernet0/0
no ip address
shutdown
duplex auto
speed auto
!
interface Serial0/0
ip address 27.1.1.7 255.255.255.0
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
interface Serial0/1
ip address 74.1.1.7 255.255.255.0
!
interface Serial0/2
no ip address
shutdown
!
interface Serial0/3
no ip address
shutdown
!
ip classless
ip http server
!
!
line con 0
line aux 0
line vty 0 4
!
end
R7#
R7#sh ip int b
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 unassigned YES unset administratively down down
Serial0/0 27.1.1.7 YES manual up up
FastEthernet0/1 unassigned YES unset administratively down down
Serial0/1 74.1.1.7 YES manual up up
Serial0/2 unassigned YES unset administratively down down
Serial0/3 unassigned YES unset administratively down down
R7#
---------------------------------------------------------------------------------------------------
配置验证:
R1#
R1#sh ip os nei
Neighbor ID Pri State Dead Time Address Interface
36.1.1.3 1 FULL/BDR 00:00:34 13.1.1.3 FastEthernet0/1
100.1.1.2 1 FULL/DR 00:00:38 12.1.1.2 FastEthernet0/0
R1#sh ip os da
OSPF Router with ID (13.1.1.1) (Process ID 1)
Router Link States (Area 0)
Link ID ADV Router Age Seq# Checksum Link count
13.1.1.1 13.1.1.1 101 0x80000006 0x007834 2
36.1.1.3 36.1.1.3 101 0x80000006 0x005F50 1
100.1.1.2 100.1.1.2 600 0x80000003 0x00D95C 1
Net Link States (Area 0)
Link ID ADV Router Age Seq# Checksum
12.1.1.2 100.1.1.2 645 0x80000001 0x00CF79
13.1.1.1 13.1.1.1 96 0x80000003 0x008D51
Summary Net Link States (Area 0)
Link ID ADV Router Age Seq# Checksum
36.1.1.0 36.1.1.3 542 0x80000001 0x00B8F4
36.1.1.0 100.1.1.2 396 0x80000001 0x00D3F3
45.1.1.0 36.1.1.3 397 0x80000001 0x000C84
45.1.1.0 100.1.1.2 495 0x80000001 0x007791
65.1.1.0 36.1.1.3 419 0x80000001 0x00A2E3
65.1.1.0 100.1.1.2 436 0x80000001 0x00D614
100.1.1.0 36.1.1.3 398 0x80000001 0x00CCF9
100.1.1.0 100.1.1.2 597 0x80000001 0x004596
R1#
R1#sh ip ro
Codes: C - connected, S - static, 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
i - IS-IS, su - IS-IS summary, 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 route
Gateway of last resort is 12.1.1.2 to network 0.0.0.0
100.0.0.0/24 is subnetted, 1 subnets
O IA 100.1.1.0 [110/11121] via 12.1.1.2, 00:01:49, FastEthernet0/0
65.0.0.0/24 is subnetted, 1 subnets
O IA 65.1.1.0 [110/84] via 13.1.1.3, 00:01:49, FastEthernet0/1
36.0.0.0/24 is subnetted, 1 subnets
O IA 36.1.1.0 [110/74] via 13.1.1.3, 00:01:50, FastEthernet0/1
12.0.0.0/24 is subnetted, 1 subnets
C 12.1.1.0 is directly connected, FastEthernet0/0
13.0.0.0/24 is subnetted, 1 subnets
C 13.1.1.0 is directly connected, FastEthernet0/1
45.0.0.0/24 is subnetted, 1 subnets
O IA 45.1.1.0 [110/94] via 13.1.1.3, 00:01:50, FastEthernet0/1
S* 0.0.0.0/0 [1/0] via 12.1.1.2
R1#
R1#ping 45.1.1.5 re 1000
Type escape sequence to abort.
Sending 1000, 100-byte ICMP Echos to 45.1.1.5, timeout is 2 seconds:
!!!!!!!!!!!!!!!!!..................
*Mar 1 01:44:13.967: %OSPF-5-ADJCHG: Process 1, Nbr 36.1.1.3 on FastEthernet0/1 from FULL to DOWN, Neighbor Down: Dead timer expired...!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!
*Mar 1 01:44:59.915: %OSPF-5-ADJCHG: Process 1, Nbr 36.1.1.3 on FastEthernet0/1 from LOADING to FULL, Loading Done!!!!!!!!!!!!.
Success rate is 75 percent (68/90), round-trip min/avg/max = 408/1055/1620 ms
R1#
R1#
R1#
R1#sh ip ro
Codes: C - connected, S - static, 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
i - IS-IS, su - IS-IS summary, 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 route
Gateway of last resort is 12.1.1.2 to network 0.0.0.0
100.0.0.0/24 is subnetted, 1 subnets
O IA 100.1.1.0 [110/11121] via 12.1.1.2, 00:00:23, FastEthernet0/0
65.0.0.0/24 is subnetted, 1 subnets
O IA 65.1.1.0 [110/84] via 13.1.1.3, 00:00:23, FastEthernet0/1
36.0.0.0/24 is subnetted, 1 subnets
O IA 36.1.1.0 [110/74] via 13.1.1.3, 00:00:23, FastEthernet0/1
12.0.0.0/24 is subnetted, 1 subnets
C 12.1.1.0 is directly connected, FastEthernet0/0
13.0.0.0/24 is subnetted, 1 subnets
C 13.1.1.0 is directly connected, FastEthernet0/1
45.0.0.0/24 is subnetted, 1 subnets
O IA 45.1.1.0 [110/94] via 13.1.1.3, 00:00:23, FastEthernet0/1
S* 0.0.0.0/0 [1/0] via 12.1.1.2
R1#
R1#sh ip ro 45.1.1.5
Routing entry for 45.1.1.0/24
Known via "ospf 1", distance 110, metric 94, type inter area
Last update from 13.1.1.3 on FastEthernet0/1, 00:00:35 ago
Routing Descriptor Blocks:
* 13.1.1.3, from 36.1.1.3, 00:00:35 ago, via FastEthernet0/1
Route metric is 94, traffic share count is 1
R1#
R1#sh ip ro 45.1.1.5
Routing entry for 45.1.1.0/24
Known via "ospf 1", distance 110, metric 94, type inter area
Last update from 13.1.1.3 on FastEthernet0/1, 00:00:57 ago
Routing Descriptor Blocks:
* 13.1.1.3, from 36.1.1.3, 00:00:57 ago, via FastEthernet0/1
Route metric is 94, traffic share count is 1
R1#
*Mar 1 01:46:23.459: %OSPF-5-ADJCHG: Process 1, Nbr 36.1.1.3 on FastEthernet0/1 from FULL to DOWN, Neighbor Down: Dead timer expired
R1#sh ip ro 45.1.1.5
Routing entry for 45.1.1.0/24
Known via "ospf 1", distance 110, metric 11131, type inter area
Last update from 12.1.1.2 on FastEthernet0/0, 00:00:00 ago
Routing Descriptor Blocks:
* 12.1.1.2, from 100.1.1.2, 00:00:00 ago, via FastEthernet0/0
Route metric is 11131, traffic share count is 1
R1#
R3(config)#int f0/0
R3(config-if)#
R3(config-if)#shut
R3(config-if)#
*Mar 1 01:43:36.719: %OSPF-5-ADJCHG: Process 1, Nbr 13.1.1.1 on FastEthernet0/0 from FULL to DOWN, Neighbor Down: Interface down or detached
*Mar 1 01:43:38.707: %LINK-5-CHANGED: Interface FastEthernet0/0, changed state to administratively down
*Mar 1 01:43:39.707: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to down
R3(config-if)#
R3(config-if)#
R3(config-if)#
R3(config-if)#no shut
R3(config-if)#
*Mar 1 01:44:54.159: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
*Mar 1 01:44:55.159: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
*Mar 1 01:44:58.679: %OSPF-5-ADJCHG: Process 1, Nbr 13.1.1.1 on FastEthernet0/0 from LOADING to FULL, Loading Done
R3(config-if)#
R3(config-if)#
R3(config-if)#shut
R3(config-if)#
*Mar 1 01:45:49.375: %OSPF-5-ADJCHG: Process 1, Nbr 13.1.1.1 on FastEthernet0/0 from FULL to DOWN, Neighbor Down: Interface down or detached
*Mar 1 01:45:51.359: %LINK-5-CHANGED: Interface FastEthernet0/0, changed state to administratively down
*Mar 1 01:45:52.359: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to down
R3(config-if)#
R3(config-if)#
转载于:https://blog.51cto.com/netyourlife/593609