HCIP——OSPF综合实验

news2024/11/25 15:28:43

OSPF实验

  • 一、实验拓扑
  • 二、实验要求
  • 三、实验思路
  • 四、实验步骤
    • 1、配置接口IP地址以及环回
    • 2、配置缺省路由
    • 3、配置MGRE环境
    • 4、配置OSPF
    • 5、修改网络类型
    • 6、重发布
    • 7、配置汇总空接口防环
    • 8、配置特殊区域:
    • 9、配置NAT环境
    • 10、加快收敛
    • 11、配置接口认证
    • 12、测试

一、实验拓扑

在这里插入图片描述

二、实验要求

  • 1、R4为ISP,其上只能配置IP地址,R4与其他所有直连设备间均使用公有IP
  • 2、R3-R5/6/7为MGRE环境,R3为中心站点;
  • 3、整个0SPF环境IP基于172.16.0.0/16划分;
  • 4、所有设备均可访问R4的环回;
  • 5、减少LSA的更新量,加快收敛,保障更新安全;
  • 6、全网可达

三、实验思路

首先我们来规划网段

172.16.0.0/16,这里我们首先规划需要配置多少个网段
由拓扑图可知:
共有四个区域以及一个单独使用RIP协议
所以,我们首先划分四个网段给各个区域 --- 所以说这里我们向后借3位
172.16.0.0/19 --- area 0
172.16.32.0/19 --- area 1
172.16.64.0/19 --- area 2
172.16.96.0/19 --- area 3
172.16.128.0/19 --- area 4
172.16.160.0/19 --- rip
172.16.192.0/19 --- 保留地址
172.16.224.0/19

接下来我们在不同区域内再次进行划分

172.16.0.0/19 --- area 0
	172.16.0.0/24 --- p2p骨干
		172.16.0.0/30
		172.16.0.4/30
		172.16.0.8/30
		···
	172.16.1.0/24 --- MA骨干
		172.16.1.0/29
		172.16.1.8/29
		172.16.1.16/29
		···
	172.16.2.0/24
	172.16.3.0/24
	172.16.4.0/24
172.16.32.0/19 --- area 1
	172.16.32.0/24 --- p2p骨干
		172.16.32.0/30
		172.16.32.4/30
		172.16.32.8/30
		···
	172.16.33.0/24 --- MA骨干
		172.16.33.0/29
		172.16.33.8/29
		172.16.33.16/29
		···
	172.16.34/0/24
	172.16.35.0/24
	172.16.36.0/24
172.16.64.0/19 --- area 2
	172.16.64.0/24 --- p2p骨干
		172.16.64.0/30
		172.16.64.4/30
		172.16.64.8/30
		···
	172.16.65.0/24 --- MA骨干
		172.16.65.0/29
		172.16.65.8/29
		172.16.65.16/29
		···
	172.16.66.0/24
	172.16.67.0/24
	172.16.68.0/24
172.16.96.0/19 --- area 3
	172.16.96.0/2 --- p2p骨干
		172.16.96.0/30
		172.16.96.4/30
		172.16.96.8/30
		···
	172.16.97.0/24 --- MA骨干
		172.16.97.0/29
		172.16.97.8/29
		172.16.97.16/29
		···
	172.16.98.0/24
	172.16.99.0/24
	172.16.100.0/24
	···
172.16.128.0/19 --- area4
	172.16.128.0/24 --- p2p骨干
		172.16.128.0/30
		172.16.128.4/30
		172.16.128.8/30
		···
	172.16.129.0/24 ---MA骨干
		172.16.129.0/29
		172.16.129.8/29
		172.16.129.16/29
		···
	172.16.130.0/24
	172.16.131.0/24
	172.16.132.0/24
	···
172.16.160.0/19 --- rip
	172.16.160.0/20
	172.16.176.0/20
172.16.192.0/19
172.16.224.0/19

在这里插入图片描述

四、实验步骤

1、配置接口IP地址以及环回

R1:

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys R1
[R1]user-interface console 0
[R1-ui-console0]idle-timeout 0 0
[R1-ui-console0]quit
[R1]int l0
[R1-LoopBack0]ip add 172.16.34.1 24
[R1-LoopBack0]int g0/0/0
[R1-GigabitEthernet0/0/0]ip add 172.16.33.1 24
[R1-GigabitEthernet0/0/0]quit
[R1]

R2:

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys R2
[R2]user-interface console 0
[R2-ui-console0]idle-timeout 0 0
[R2-ui-console0]quit
[R2]int l0
[R2-LoopBack0]ip add 172.16.35.1 24
[R2-LoopBack0]int g0/0/0
[R2-GigabitEthernet0/0/0]ip add 172.16.33.2 24
[R2-GigabitEthernet0/0/0]quit
[R2]

R3:

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys R3
[R3]user-interface console 0
[R3-ui-console0]idle-timeout 0 0
[R3-ui-console0]quit
[R3]
[R3]int g0/0/0
[R3-GigabitEthernet0/0/0]ip address 172.16.33.3 24
[R3-GigabitEthernet0/0/0]int l0
[R3-LoopBack0]ip address 172.16.36.1 24
[R3-LoopBack0]int s4/0/0
[R3-Serial4/0/0]ip address 12.1.1.1 24
[R3-Serial4/0/0]quit
[R3]

R4:

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys R4
[R4]user-interface console 0
[R4-ui-console0]idle-timeout 0 0
[R4-ui-console0]quit
[R4]int s4/0/0
[R4-Serial4/0/0]ip address 12.1.1.2 24
[R4-Serial4/0/0]int g0/0/0
[R4-GigabitEthernet0/0/0]ip address 45.1.1.2 24
[R4-GigabitEthernet0/0/0]int s4/0/1
[R4-Serial4/0/1]ip address 23.1.1.2 24
[R4-Serial4/0/1]int s3/0/0
[R4-Serial3/0/0]ip address 34.1.1.2 24
[R4-Serial3/0/0]int l0
[R4-LoopBack0]ip address 4.4.4.4 24
[R4-LoopBack0]quit
[R4]

R5:

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys r5
[r5]sys R5
[R5]user-interface console 0
[R5-ui-console0]idle-timeout 0 0
[R5-ui-console0]quit
[R5]int l0
[R5-LoopBack0]ip address 172.16.2.1 24
[R5-LoopBack0]int s4/0/0
[R5-Serial4/0/0]ip address 23.1.1.1 24
[R5-Serial4/0/0]quit
[R5]

R6:

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys R6
[R6]user-interface console 0
[R6-ui-console0]idle-timeout 0 0
[R6-ui-console0]quit
[R6]
[R6]int s4/0/0
[R6-Serial4/0/0]ip address 34.1.1.1 24
[R6-Serial4/0/0]int l0
[R6-LoopBack0]ip address 172.16.3.1 24
[R6-LoopBack0]int g0/0/0
[R6-GigabitEthernet0/0/0]ip address 172.16.65.1 29
[R6-GigabitEthernet0/0/0]quit
[R6]

R7:

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys R7
[R7]user-interface console 0
[R7-ui-console0]idle-timeout 0 0
[R7-ui-console0]quit
[R7]int g0/0/0
[R7-GigabitEthernet0/0/0]ip address 45.1.1.1 24
[R7-GigabitEthernet0/0/0]int l0
[R7-LoopBack0]ip address 172.16.4.1 24
[R7-LoopBack0]int g0/0/1
[R7-GigabitEthernet0/0/1]ip address 172.16.97.1 29
[R7]

R8:

<Huawei>SYS
Enter system view, return user view with Ctrl+Z.
[Huawei]SYS R8
[R8]user-interface console 0
[R8-ui-console0]idle-timeout 0 0
[R8-ui-console0]quit
[R8-GigabitEthernet0/0/0]int g0/0/1
[R8-GigabitEthernet0/0/1]ip address 172.16.97.9 29
[R8-GigabitEthernet0/0/1]int g0/0/0
[R8-GigabitEthernet0/0/0]ip address 172.16.97.2 29
[R8]int l0
[R8-LoopBack0]ip address 172.16.98.1 24
[R8-LoopBack0]quit
[R8]

R9:

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys R9
[R9]user-interface console 0
[R9-ui-console0]idle-timeout 0 0
[R9-ui-console0]quit
[R9]int g0/0/0
[R9-GigabitEthernet0/0/0]ip address 172.16.97.10 29
[R9-GigabitEthernet0/0/0]int l0
[R9-LoopBack0]ip address 172.16.130.1 24
[R9-LoopBack0]int g0/0/1
[R9-GigabitEthernet0/0/1]ip address 172.16.129.1 29
[R9-GigabitEthernet0/0/1]quit
[R9]

R10:

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys R10
[R10]user-interface console 0
[R10-ui-console0]idle-timeout 0 0
[R10-ui-console0]quit
[R10]int g0/0/0
[R10-GigabitEthernet0/0/0]ip address 172.16.129.2 29
[R10-GigabitEthernet0/0/0]int l0
[R10-LoopBack0]ip address 172.16.131.1 24
[R10-LoopBack0]quit
[R10]

R11:

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys R11
[R11]user-interface console 0
[R11-ui-console0]idle-timeout 0 0
[R11-ui-console0]quit
[R11]int g0/0/0
[R11-GigabitEthernet0/0/0]ip address 172.16.65.2 29
[R11-GigabitEthernet0/0/0]int l0
[R11-LoopBack0]ip address 172.16.66.1 24
[R11-LoopBack0]int g0/0/1
[R11-GigabitEthernet0/0/1]ip address 172.16.65.9 29
[R11-GigabitEthernet0/0/1]quit
[R11]

R12:

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys R12
[R12]user-interface console 0
[R12-ui-console0]idle-timeout 0 0
[R12-ui-console0]quit
[R12]int g0/0/0
[R12-GigabitEthernet0/0/0]ip address 172.16.65.10 29
[R12-GigabitEthernet0/0/0]int l0
[R12-LoopBack0]ip address 172.16.160.1 20
[R12-LoopBack0]int l1
[R12-LoopBack1]ip address 172.16.176.1 20
[R12-LoopBack1]quit
[R12]

查看接口配置以及其状态:
R1:

[R1]display ip interface brief 
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 3
The number of interface that is DOWN in Physical is 2
The number of interface that is UP in Protocol is 3
The number of interface that is DOWN in Protocol is 2

Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              172.16.33.1/24       up         up        
GigabitEthernet0/0/1              unassigned           down       down      
GigabitEthernet0/0/2              unassigned           down       down      
LoopBack0                         172.16.34.1/24       up         up(s)     
NULL0                             unassigned           up         up(s)     
[R1]

R2:

[R2]display ip interface brief 
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 3
The number of interface that is DOWN in Physical is 2
The number of interface that is UP in Protocol is 3
The number of interface that is DOWN in Protocol is 2

Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              172.16.33.2/24       up         up        
GigabitEthernet0/0/1              unassigned           down       down      
GigabitEthernet0/0/2              unassigned           down       down      
LoopBack0                         172.16.35.1/24       up         up(s)     
NULL0                             unassigned           up         up(s)     
[R2]

R3:

[R3]display ip interface brief 
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 4
The number of interface that is DOWN in Physical is 3
The number of interface that is UP in Protocol is 4
The number of interface that is DOWN in Protocol is 3

Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              172.16.33.3/24       up         up        
GigabitEthernet0/0/1              unassigned           down       down      
GigabitEthernet0/0/2              unassigned           down       down      
LoopBack0                         172.16.36.1/24       up         up(s)     
NULL0                             unassigned           up         up(s)     
Serial4/0/0                       12.1.1.1/24          up         up        
Serial4/0/1                       unassigned           down       down      
[R3]

R4:

[R4]display ip interface brief 
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 6
The number of interface that is DOWN in Physical is 3
The number of interface that is UP in Protocol is 6
The number of interface that is DOWN in Protocol is 3

Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              45.1.1.2/24          up         up        
GigabitEthernet0/0/1              unassigned           down       down      
GigabitEthernet0/0/2              unassigned           down       down      
LoopBack0                         4.4.4.4/24           up         up(s)     
NULL0                             unassigned           up         up(s)     
Serial3/0/0                       34.1.1.2/24          up         up        
Serial3/0/1                       unassigned           down       down      
Serial4/0/0                       12.1.1.2/24          up         up        
Serial4/0/1                       23.1.1.2/24          up         up        
[R4]

R5:

[R5]display ip interface brief 
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 3
The number of interface that is DOWN in Physical is 4
The number of interface that is UP in Protocol is 3
The number of interface that is DOWN in Protocol is 4

Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              unassigned           down       down      
GigabitEthernet0/0/1              unassigned           down       down      
GigabitEthernet0/0/2              unassigned           down       down      
LoopBack0                         172.16.2.1/24        up         up(s)     
NULL0                             unassigned           up         up(s)     
Serial4/0/0                       23.1.1.1/24          up         up        
Serial4/0/1                       unassigned           down       down      
[R5]

R6:

[R6]display ip interface brief 
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 4
The number of interface that is DOWN in Physical is 3
The number of interface that is UP in Protocol is 4
The number of interface that is DOWN in Protocol is 3

Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              172.16.65.1/29       up         up        
GigabitEthernet0/0/1              unassigned           down       down      
GigabitEthernet0/0/2              unassigned           down       down      
LoopBack0                         172.16.3.1/24        up         up(s)     
NULL0                             unassigned           up         up(s)     
Serial4/0/0                       34.1.1.1/24          up         up        
Serial4/0/1                       unassigned           down       down      
[R6]

R7:

[R7]display ip interface brief 
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 4
The number of interface that is DOWN in Physical is 1
The number of interface that is UP in Protocol is 4
The number of interface that is DOWN in Protocol is 1

Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              45.1.1.1/24          up         up        
GigabitEthernet0/0/1              172.16.97.1/29       up         up        
GigabitEthernet0/0/2              unassigned           down       down      
LoopBack0                         172.16.4.1/24        up         up(s)     
NULL0                             unassigned           up         up(s)     
[R7]

R8:

[R8]display ip interface brief 
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 4
The number of interface that is DOWN in Physical is 1
The number of interface that is UP in Protocol is 4
The number of interface that is DOWN in Protocol is 1

Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              172.16.97.2/29       up         up        
GigabitEthernet0/0/1              172.16.97.9/29       up         up        
GigabitEthernet0/0/2              unassigned           down       down      
LoopBack0                         172.16.98.1/24       up         up(s)     
NULL0                             unassigned           up         up(s)     
[R8]

R9:

[R9]display ip interface brief 
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 4
The number of interface that is DOWN in Physical is 1
The number of interface that is UP in Protocol is 4
The number of interface that is DOWN in Protocol is 1

Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              172.16.97.10/29      up         up        
GigabitEthernet0/0/1              172.16.129.1/29      up         up        
GigabitEthernet0/0/2              unassigned           down       down      
LoopBack0                         172.16.130.1/24      up         up(s)     
NULL0                             unassigned           up         up(s)     
[R9]

R10:

[R10]display ip interface brief 
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 3
The number of interface that is DOWN in Physical is 2
The number of interface that is UP in Protocol is 3
The number of interface that is DOWN in Protocol is 2

Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              172.16.129.2/29      up         up        
GigabitEthernet0/0/1              unassigned           down       down      
GigabitEthernet0/0/2              unassigned           down       down      
LoopBack0                         172.16.131.1/24      up         up(s)     
NULL0                             unassigned           up         up(s)     
[R10]

R11:

[R11]display ip interface brief 
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 4
The number of interface that is DOWN in Physical is 1
The number of interface that is UP in Protocol is 4
The number of interface that is DOWN in Protocol is 1

Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              172.16.65.2/29       up         up        
GigabitEthernet0/0/1              172.16.65.9/29       up         up        
GigabitEthernet0/0/2              unassigned           down       down      
LoopBack0                         172.16.66.1/24       up         up(s)     
NULL0                             unassigned           up         up(s)     
[R11]

R12:

[R12]display ip interface brief 
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 4
The number of interface that is DOWN in Physical is 2
The number of interface that is UP in Protocol is 4
The number of interface that is DOWN in Protocol is 2

Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              172.16.65.10/29      up         up        
GigabitEthernet0/0/1              unassigned           down       down      
GigabitEthernet0/0/2              unassigned           down       down      
LoopBack0                         172.16.160.1/20      up         up(s)     
LoopBack1                         172.16.176.1/20      up         up(s)     
NULL0                             unassigned           up         up(s)     
[R12]

2、配置缺省路由

R3:

[R3]ip route-static 0.0.0.0 0 12.1.1.2

R5:

[R5]ip route-static 0.0.0.0 0 23.1.1.2

R6:

[R6]ip route-static 0.0.0.0 0 34.1.1.2

R7:

[R7]ip route-static 0.0.0.0 0 45.1.1.2

3、配置MGRE环境

R3:

[R3]int t0/0/0
[R3-Tunnel0/0/0]ip address 172.16.1.1 29
[R3-Tunnel0/0/0]tunnel-protocol gre p2mp 
[R3-Tunnel0/0/0]source 12.1.1.1	
[R3-Tunnel0/0/0]nhrp network-id 100
[R3-Tunnel0/0/0]nhrp entry multicast dynamic 
[R3-Tunnel0/0/0]quit
[R3]

R5:

[R5]int t0/0/0
[R5-Tunnel0/0/0]ip address 172.16.1.2 29	
[R5-Tunnel0/0/0]tunnel-protocol gre p2mp 
[R5-Tunnel0/0/0]source 23.1.1.1
[R5-Tunnel0/0/0]nhrp network-id 100
[R5-Tunnel0/0/0]nhrp entry 172.16.1.1 12.1.1.1 register 
[R5-Tunnel0/0/0]quit
[R5]

R6:

[R6]int t0/0/0
[R6-Tunnel0/0/0]ip address 172.16.1.3 29	
[R6-Tunnel0/0/0]tunnel-protocol gre p2mp 
[R6-Tunnel0/0/0]source 34.1.1.1	
[R6-Tunnel0/0/0]nhrp network-id 100
[R6-Tunnel0/0/0]nhrp entry 172.16.1.1 12.1.1.1 register 
[R6-Tunnel0/0/0]quit
[R6]

R7:

[R7]int t0/0/0
[R7-Tunnel0/0/0]ip address 172.16.1.4 29
[R7-Tunnel0/0/0]tunnel-protocol gre p2mp 
[R7-Tunnel0/0/0]source 45.1.1.1
[R7-Tunnel0/0/0]nhrp network-id 100	
[R7-Tunnel0/0/0]nhrp entry 172.16.1.1 12.1.1.1 register 
[R7-Tunnel0/0/0]quit
[R7]

查看注册信息:

[R3]display nhrp peer all 
------------------------------------------------------------------------------- 
Protocol-addr   Mask  NBMA-addr       NextHop-addr    Type         Flag         
------------------------------------------------------------------------------- 
172.16.1.2      32    23.1.1.1        172.16.1.2      dynamic      route tunnel 
------------------------------------------------------------------------------- 
Tunnel interface: Tunnel0/0/0
Created time    : 00:07:00
Expire time     : 01:53:00
------------------------------------------------------------------------------- 
Protocol-addr   Mask  NBMA-addr       NextHop-addr    Type         Flag         
------------------------------------------------------------------------------- 
172.16.1.3      32    34.1.1.1        172.16.1.3      dynamic      route tunnel 
------------------------------------------------------------------------------- 
Tunnel interface: Tunnel0/0/0
Created time    : 00:05:18
Expire time     : 01:54:42
------------------------------------------------------------------------------- 
Protocol-addr   Mask  NBMA-addr       NextHop-addr    Type         Flag         
------------------------------------------------------------------------------- 
172.16.1.4      32    45.1.1.1        172.16.1.4      dynamic      route tunnel 
------------------------------------------------------------------------------- 
Tunnel interface: Tunnel0/0/0
Created time    : 00:04:01
Expire time     : 01:55:59

Number of nhrp peers: 3
[R3]

4、配置OSPF

R1:

[R1]ospf 1 router-id 1.1.1.1
[R1-ospf-1]area 1
[R1-ospf-1-area-0.0.0.1]network 172.16.0.0 0.0.255.255

R2:

[R2]ospf 1 router-id 2.2.2.2
[R2-ospf-1]area 1
[R2-ospf-1-area-0.0.0.1]network 172.16.0.0 0.0.255.255

R3:

[R3]ospf 1 router-id 3.3.3.3 
[R3-ospf-1]area 1
[R3-ospf-1-area-0.0.0.1]network 172.16.32.0 0.0.7.255
[R3-ospf-1-area-0.0.0.1]q
[R3-ospf-1]area 0
[R3-ospf-1-area-0.0.0.0]network 172.16.1.1 0.0.0.0

R5:

[R5]ospf 1 router-id 5.5.5.5
[R5-ospf-1]area 0
[R5-ospf-1-area-0.0.0.0]network 172.16.0.0 0.0.255.255

R6:

[R6]ospf 1 router-id 6.6.6.6
[R6-ospf-1]area 0
[R6-ospf-1-area-0.0.0.0]network 172.16.0.0 0.0.3.255
[R6-ospf-1-area-0.0.0.0]q
[R6-ospf-1]area 2
[R6-ospf-1-area-0.0.0.2]network 172.16.65.1 0.0.0.0

R7:

[R7]ospf 1 router-id 7.7.7.7
[R7-ospf-1]area 0
[R7-ospf-1-area-0.0.0.0]network 172.16.0.0 0.0.7.255
[R7-ospf-1-area-0.0.0.0]q
[R7-ospf-1]area 3
[R7-ospf-1-area-0.0.0.3]network 172.16.97.1 0.0.0.0

R8:

[R8]ospf 1 router-id 8.8.8.8 
[R8-ospf-1]area 3
[R8-ospf-1-area-0.0.0.3]network 172.16.0.0 0.0.255.255

R9:

[R9]ospf 1 router-id 9.9.9.9
[R9-ospf-1]area 3
[R9-ospf-1-area-0.0.0.3]network 172.16.97.10 0.0.0.0
[R9-ospf-1-area-0.0.0.3]q
[R9-ospf-1]q
[R9]ospf 2 router-id 9.9.9.9
[R9-ospf-2]area 4
[R9-ospf-2-area-0.0.0.4]network 172.16.128.0 0.0.3.255

R10:

[R10]ospf 1 router-id 10.10.10.10
[R10-ospf-1]area 4
[R10-ospf-1-area-0.0.0.4]network 172.16.0.0 0.0.255.255

R11:

[R11]ospf 1 router-id 11.11.11.11
[R11-ospf-1]area 2
[R11-ospf-1-area-0.0.0.2]network 172.16.0.0 0.0.255.255

R12:

[R12]ospf 1 router-id 12.12.12.12
[R12-ospf-1]area 2
[R12-ospf-1-area-0.0.0.2]network 172.16.65.10 0.0.0.0
[R12]rip 1
[R12-rip-1]version 2
[R12-rip-1]network 172.16.0.0 

查看此时的各区域邻居信息:
R1:

[R1]display ospf peer brief 

	 OSPF Process 1 with Router ID 1.1.1.1
		  Peer Statistic Information
 ----------------------------------------------------------------------------
 Area Id          Interface                        Neighbor id      State    
 0.0.0.1          GigabitEthernet0/0/0             2.2.2.2          Full        
 0.0.0.1          GigabitEthernet0/0/0             3.3.3.3          Full        
 ----------------------------------------------------------------------------
[R1]

R2:

[R2]display ospf peer brief 

	 OSPF Process 1 with Router ID 2.2.2.2
		  Peer Statistic Information
 ----------------------------------------------------------------------------
 Area Id          Interface                        Neighbor id      State    
 0.0.0.1          GigabitEthernet0/0/0             1.1.1.1          Full        
 0.0.0.1          GigabitEthernet0/0/0             3.3.3.3          Full        
 ----------------------------------------------------------------------------
[R2]

R3:

[R3]display ospf peer brief 

	 OSPF Process 1 with Router ID 3.3.3.3
		  Peer Statistic Information
 ----------------------------------------------------------------------------
 Area Id          Interface                        Neighbor id      State    
 0.0.0.0          Tunnel0/0/0                      5.5.5.5          Full        
 0.0.0.1          GigabitEthernet0/0/0             1.1.1.1          Full        
 0.0.0.1          GigabitEthernet0/0/0             2.2.2.2          Full        
 ----------------------------------------------------------------------------
[R3]

R5:

[R5]display ospf peer brief 

	 OSPF Process 1 with Router ID 5.5.5.5
		  Peer Statistic Information
 ----------------------------------------------------------------------------
 Area Id          Interface                        Neighbor id      State    
 0.0.0.0          Tunnel0/0/0                      3.3.3.3          Full        
 ----------------------------------------------------------------------------
[R5]

R6:

[R6]display ospf peer brief 

	 OSPF Process 1 with Router ID 6.6.6.6
		  Peer Statistic Information
 ----------------------------------------------------------------------------
 Area Id          Interface                        Neighbor id      State    
 0.0.0.0          Tunnel0/0/0                      3.3.3.3          Init        
 0.0.0.2          GigabitEthernet0/0/0             11.11.11.11      Full        
 ----------------------------------------------------------------------------
[R6]

R7:

[R7]display ospf peer brief 

	 OSPF Process 1 with Router ID 7.7.7.7
		  Peer Statistic Information
 ----------------------------------------------------------------------------
 Area Id          Interface                        Neighbor id      State    
 0.0.0.0          Tunnel0/0/0                      3.3.3.3          Init        
 0.0.0.3          GigabitEthernet0/0/1             8.8.8.8          Full        
 ----------------------------------------------------------------------------
[R7]

R8:

[R8]display ospf peer brief 

	 OSPF Process 1 with Router ID 8.8.8.8
		  Peer Statistic Information
 ----------------------------------------------------------------------------
 Area Id          Interface                        Neighbor id      State    
 0.0.0.3          GigabitEthernet0/0/1             9.9.9.9          Full        
 0.0.0.3          GigabitEthernet0/0/0             7.7.7.7          Full        
 ----------------------------------------------------------------------------
[R8]

R9:

[R9]display ospf peer brief 

	 OSPF Process 1 with Router ID 9.9.9.9
		  Peer Statistic Information
 ----------------------------------------------------------------------------
 Area Id          Interface                        Neighbor id      State    
 0.0.0.3          GigabitEthernet0/0/0             8.8.8.8          Full        
 ----------------------------------------------------------------------------

	 OSPF Process 2 with Router ID 9.9.9.9
		  Peer Statistic Information
 ----------------------------------------------------------------------------
 Area Id          Interface                        Neighbor id      State    
 0.0.0.4          GigabitEthernet0/0/1             10.10.10.10      Full        
 ----------------------------------------------------------------------------
[R9]

R10:

[R10]display ospf peer brief 

	 OSPF Process 1 with Router ID 10.10.10.10
		  Peer Statistic Information
 ----------------------------------------------------------------------------
 Area Id          Interface                        Neighbor id      State    
 0.0.0.4          GigabitEthernet0/0/0             9.9.9.9          Full        
 ----------------------------------------------------------------------------
[R10]

R11:

[R11]display ospf peer brief 

	 OSPF Process 1 with Router ID 11.11.11.11
		  Peer Statistic Information
 ----------------------------------------------------------------------------
 Area Id          Interface                        Neighbor id      State    
 0.0.0.2          GigabitEthernet0/0/0             6.6.6.6          Full        
 0.0.0.2          GigabitEthernet0/0/1             12.12.12.12      Full        
 ----------------------------------------------------------------------------
[R11]

R12:

[R12]display ospf peer brief 

	 OSPF Process 1 with Router ID 12.12.12.12
		  Peer Statistic Information
 ----------------------------------------------------------------------------
 Area Id          Interface                        Neighbor id      State    
 0.0.0.2          GigabitEthernet0/0/0             11.11.11.11      Full        
 ----------------------------------------------------------------------------
[R12]

5、修改网络类型

由于创建的MGRE环境是一个P2P类型,所以无法和其他路由器建立邻居关系,我们需要修改它的网络类型
R3:

[R3]int Tunnel 0/0/0
[R3-Tunnel0/0/0]ospf network-type p2mp

R5:

[R5]int Tunnel 0/0/0
[R5-Tunnel0/0/0]ospf network-type p2mp

R6:

[R6]int Tunnel 0/0/0
[R6-Tunnel0/0/0]ospf network-type p2mp

R7:

[R7]int Tunnel 0/0/0
[R7-Tunnel0/0/0]ospf network-type p2mp

查看此时R3的邻居信息:

[R3]display ospf peer brief 

	 OSPF Process 1 with Router ID 3.3.3.3
		  Peer Statistic Information
 ----------------------------------------------------------------------------
 Area Id          Interface                        Neighbor id      State    
 0.0.0.0          Tunnel0/0/0                      5.5.5.5          Full        
 0.0.0.0          Tunnel0/0/0                      6.6.6.6          Full        
 0.0.0.0          Tunnel0/0/0                      7.7.7.7          Full        
 0.0.0.1          GigabitEthernet0/0/0             1.1.1.1          Full        
 0.0.0.1          GigabitEthernet0/0/0             2.2.2.2          Full        
 ----------------------------------------------------------------------------
[R3]

此时的路由表信息:
R1:

[R1]display ip routing-table protocol ospf 
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Public routing table : OSPF
         Destinations : 15       Routes : 15       

OSPF routing table status : <Active>
         Destinations : 15       Routes : 15

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

     172.16.1.1/32  OSPF    10   1           D   172.16.33.3     GigabitEthernet0/0/0
     172.16.1.2/32  OSPF    10   1563        D   172.16.33.3     GigabitEthernet0/0/0
     172.16.1.3/32  OSPF    10   1563        D   172.16.33.3     GigabitEthernet0/0/0
     172.16.1.4/32  OSPF    10   1563        D   172.16.33.3     GigabitEthernet0/0/0
     172.16.2.1/32  OSPF    10   1563        D   172.16.33.3     GigabitEthernet0/0/0
     172.16.3.1/32  OSPF    10   1563        D   172.16.33.3     GigabitEthernet0/0/0
     172.16.4.1/32  OSPF    10   1563        D   172.16.33.3     GigabitEthernet0/0/0
    172.16.35.1/32  OSPF    10   1           D   172.16.33.2     GigabitEthernet0/0/0
    172.16.36.1/32  OSPF    10   1           D   172.16.33.3     GigabitEthernet0/0/0
    172.16.65.0/29  OSPF    10   1564        D   172.16.33.3     GigabitEthernet0/0/0
    172.16.65.8/29  OSPF    10   1565        D   172.16.33.3     GigabitEthernet0/0/0
    172.16.66.1/32  OSPF    10   1564        D   172.16.33.3     GigabitEthernet0/0/0
    172.16.97.0/29  OSPF    10   1564        D   172.16.33.3     GigabitEthernet0/0/0
    172.16.97.8/29  OSPF    10   1565        D   172.16.33.3     GigabitEthernet0/0/0
    172.16.98.1/32  OSPF    10   1564        D   172.16.33.3     GigabitEthernet0/0/0

OSPF routing table status : <Inactive>
         Destinations : 0        Routes : 0

[R1]

R2:

[R2]display ip routing-table protocol ospf 
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Public routing table : OSPF
         Destinations : 15       Routes : 15       

OSPF routing table status : <Active>
         Destinations : 15       Routes : 15

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

     172.16.1.1/32  OSPF    10   1           D   172.16.33.3     GigabitEthernet
0/0/0
     172.16.1.2/32  OSPF    10   1563        D   172.16.33.3     GigabitEthernet0/0/0
     172.16.1.3/32  OSPF    10   1563        D   172.16.33.3     GigabitEthernet0/0/0
     172.16.1.4/32  OSPF    10   1563        D   172.16.33.3     GigabitEthernet0/0/0
     172.16.2.1/32  OSPF    10   1563        D   172.16.33.3     GigabitEthernet0/0/0
     172.16.3.1/32  OSPF    10   1563        D   172.16.33.3     GigabitEthernet0/0/0
     172.16.4.1/32  OSPF    10   1563        D   172.16.33.3     GigabitEthernet0/0/0
    172.16.34.1/32  OSPF    10   1           D   172.16.33.1     GigabitEthernet0/0/0
    172.16.36.1/32  OSPF    10   1           D   172.16.33.3     GigabitEthernet0/0/0
    172.16.65.0/29  OSPF    10   1564        D   172.16.33.3     GigabitEthernet0/0/0
    172.16.65.8/29  OSPF    10   1565        D   172.16.33.3     GigabitEthernet0/0/0
    172.16.66.1/32  OSPF    10   1564        D   172.16.33.3     GigabitEthernet0/0/0
    172.16.97.0/29  OSPF    10   1564        D   172.16.33.3     GigabitEthernet0/0/0
    172.16.97.8/29  OSPF    10   1565        D   172.16.33.3     GigabitEthernet0/0/0
    172.16.98.1/32  OSPF    10   1564        D   172.16.33.3     GigabitEthernet0/0/0

OSPF routing table status : <Inactive>
         Destinations : 0        Routes : 0

[R2]

R3:

[R3]display ip routing-table protocol ospf 
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Public routing table : OSPF
         Destinations : 14       Routes : 14       

OSPF routing table status : <Active>
         Destinations : 14       Routes : 14

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

     172.16.1.2/32  OSPF    10   1562        D   172.16.1.2      Tunnel0/0/0
     172.16.1.3/32  OSPF    10   1562        D   172.16.1.3      Tunnel0/0/0
     172.16.1.4/32  OSPF    10   1562        D   172.16.1.4      Tunnel0/0/0
     172.16.2.1/32  OSPF    10   1562        D   172.16.1.2      Tunnel0/0/0
     172.16.3.1/32  OSPF    10   1562        D   172.16.1.3      Tunnel0/0/0
     172.16.4.1/32  OSPF    10   1562        D   172.16.1.4      Tunnel0/0/0
    172.16.34.1/32  OSPF    10   1           D   172.16.33.1     GigabitEthernet0/0/0
    172.16.35.1/32  OSPF    10   1           D   172.16.33.2     GigabitEthernet0/0/0
    172.16.65.0/29  OSPF    10   1563        D   172.16.1.3      Tunnel0/0/0
    172.16.65.8/29  OSPF    10   1564        D   172.16.1.3      Tunnel0/0/0
    172.16.66.1/32  OSPF    10   1563        D   172.16.1.3      Tunnel0/0/0
    172.16.97.0/29  OSPF    10   1563        D   172.16.1.4      Tunnel0/0/0
    172.16.97.8/29  OSPF    10   1564        D   172.16.1.4      Tunnel0/0/0
    172.16.98.1/32  OSPF    10   1563        D   172.16.1.4      Tunnel0/0/0

OSPF routing table status : <Inactive>
         Destinations : 0        Routes : 0

[R3]

R5:

[R5]display ip routing-table protocol ospf 
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Public routing table : OSPF
         Destinations : 15       Routes : 15       

OSPF routing table status : <Active>
         Destinations : 15       Routes : 15

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

     172.16.1.1/32  OSPF    10   1562        D   172.16.1.1      Tunnel0/0/0
     172.16.1.3/32  OSPF    10   3124        D   172.16.1.1      Tunnel0/0/0
     172.16.1.4/32  OSPF    10   3124        D   172.16.1.1      Tunnel0/0/0
     172.16.3.1/32  OSPF    10   3124        D   172.16.1.1      Tunnel0/0/0
     172.16.4.1/32  OSPF    10   3124        D   172.16.1.1      Tunnel0/0/0
    172.16.33.0/24  OSPF    10   1563        D   172.16.1.1      Tunnel0/0/0
    172.16.34.1/32  OSPF    10   1563        D   172.16.1.1      Tunnel0/0/0
    172.16.35.1/32  OSPF    10   1563        D   172.16.1.1      Tunnel0/0/0
    172.16.36.1/32  OSPF    10   1562        D   172.16.1.1      Tunnel0/0/0
    172.16.65.0/29  OSPF    10   3125        D   172.16.1.1      Tunnel0/0/0
    172.16.65.8/29  OSPF    10   3126        D   172.16.1.1      Tunnel0/0/0
    172.16.66.1/32  OSPF    10   3125        D   172.16.1.1      Tunnel0/0/0
    172.16.97.0/29  OSPF    10   3125        D   172.16.1.1      Tunnel0/0/0
    172.16.97.8/29  OSPF    10   3126        D   172.16.1.1      Tunnel0/0/0
    172.16.98.1/32  OSPF    10   3125        D   172.16.1.1      Tunnel0/0/0

OSPF routing table status : <Inactive>
         Destinations : 0        Routes : 0

[R5]

R6:

[R6]display ip routing-table protocol ospf 
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Public routing table : OSPF
         Destinations : 14       Routes : 14       

OSPF routing table status : <Active>
         Destinations : 14       Routes : 14

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

     172.16.1.1/32  OSPF    10   1562        D   172.16.1.1      Tunnel0/0/0
     172.16.1.2/32  OSPF    10   3124        D   172.16.1.1      Tunnel0/0/0
     172.16.1.4/32  OSPF    10   3124        D   172.16.1.1      Tunnel0/0/0
     172.16.2.1/32  OSPF    10   3124        D   172.16.1.1      Tunnel0/0/0
     172.16.4.1/32  OSPF    10   3124        D   172.16.1.1      Tunnel0/0/0
    172.16.33.0/24  OSPF    10   1563        D   172.16.1.1      Tunnel0/0/0
    172.16.34.1/32  OSPF    10   1563        D   172.16.1.1      Tunnel0/0/0
    172.16.35.1/32  OSPF    10   1563        D   172.16.1.1      Tunnel0/0/0
    172.16.36.1/32  OSPF    10   1562        D   172.16.1.1      Tunnel0/0/0
    172.16.65.8/29  OSPF    10   2           D   172.16.65.2     GigabitEthernet0/0/0
    172.16.66.1/32  OSPF    10   1           D   172.16.65.2     GigabitEthernet0/0/0
    172.16.97.0/29  OSPF    10   3125        D   172.16.1.1      Tunnel0/0/0
    172.16.97.8/29  OSPF    10   3126        D   172.16.1.1      Tunnel0/0/0
    172.16.98.1/32  OSPF    10   3125        D   172.16.1.1      Tunnel0/0/0

OSPF routing table status : <Inactive>
         Destinations : 0        Routes : 0

[R6]

R7:

[R7]display ip routing-table protocol ospf 
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Public routing table : OSPF
         Destinations : 14       Routes : 14       

OSPF routing table status : <Active>
         Destinations : 14       Routes : 14

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

     172.16.1.1/32  OSPF    10   1562        D   172.16.1.1      Tunnel0/0/0
     172.16.1.2/32  OSPF    10   3124        D   172.16.1.1      Tunnel0/0/0
     172.16.1.3/32  OSPF    10   3124        D   172.16.1.1      Tunnel0/0/0
     172.16.2.1/32  OSPF    10   3124        D   172.16.1.1      Tunnel0/0/0
     172.16.3.1/32  OSPF    10   3124        D   172.16.1.1      Tunnel0/0/0
    172.16.33.0/24  OSPF    10   1563        D   172.16.1.1      Tunnel0/0/0
    172.16.34.1/32  OSPF    10   1563        D   172.16.1.1      Tunnel0/0/0
    172.16.35.1/32  OSPF    10   1563        D   172.16.1.1      Tunnel0/0/0
    172.16.36.1/32  OSPF    10   1562        D   172.16.1.1      Tunnel0/0/0
    172.16.65.0/29  OSPF    10   3125        D   172.16.1.1      Tunnel0/0/0
    172.16.65.8/29  OSPF    10   3126        D   172.16.1.1      Tunnel0/0/0
    172.16.66.1/32  OSPF    10   3125        D   172.16.1.1      Tunnel0/0/0
    172.16.97.8/29  OSPF    10   2           D   172.16.97.2     GigabitEthernet0/0/1
    172.16.98.1/32  OSPF    10   1           D   172.16.97.2     GigabitEthernet0/0/1

OSPF routing table status : <Inactive>
         Destinations : 0        Routes : 0

[R7]

R8:

[R8]display ip routing-table protocol ospf 
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Public routing table : OSPF
         Destinations : 14       Routes : 14       

OSPF routing table status : <Active>
         Destinations : 14       Routes : 14

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

     172.16.1.1/32  OSPF    10   1563        D   172.16.97.1     GigabitEthernet0/0/0
     172.16.1.2/32  OSPF    10   3125        D   172.16.97.1     GigabitEthernet0/0/0
     172.16.1.3/32  OSPF    10   3125        D   172.16.97.1     GigabitEthernet0/0/0
     172.16.1.4/32  OSPF    10   1           D   172.16.97.1     GigabitEthernet0/0/0
     172.16.2.1/32  OSPF    10   3125        D   172.16.97.1     GigabitEthernet0/0/0
     172.16.3.1/32  OSPF    10   3125        D   172.16.97.1     GigabitEthernet0/0/0
     172.16.4.1/32  OSPF    10   1           D   172.16.97.1     GigabitEthernet0/0/0
    172.16.33.0/24  OSPF    10   1564        D   172.16.97.1     GigabitEthernet0/0/0
    172.16.34.1/32  OSPF    10   1564        D   172.16.97.1     GigabitEthernet0/0/0
    172.16.35.1/32  OSPF    10   1564        D   172.16.97.1     GigabitEthernet0/0/0
    172.16.36.1/32  OSPF    10   1563        D   172.16.97.1     GigabitEthernet0/0/0
    172.16.65.0/29  OSPF    10   3126        D   172.16.97.1     GigabitEthernet0/0/0
    172.16.65.8/29  OSPF    10   3127        D   172.16.97.1     GigabitEthernet0/0/0
    172.16.66.1/32  OSPF    10   3126        D   172.16.97.1     GigabitEthernet0/0/0

OSPF routing table status : <Inactive>
         Destinations : 0        Routes : 0

[R8]

R9:

[R9]display ip routing-table protocol ospf 
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Public routing table : OSPF
         Destinations : 17       Routes : 17       

OSPF routing table status : <Active>
         Destinations : 17       Routes : 17

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

     172.16.1.1/32  OSPF    10   1564        D   172.16.97.9     GigabitEthernet0/0/0
     172.16.1.2/32  OSPF    10   3126        D   172.16.97.9     GigabitEthernet0/0/0
     172.16.1.3/32  OSPF    10   3126        D   172.16.97.9     GigabitEthernet0/0/0
     172.16.1.4/32  OSPF    10   2           D   172.16.97.9     GigabitEthernet0/0/0
     172.16.2.1/32  OSPF    10   3126        D   172.16.97.9     GigabitEthernet0/0/0
     172.16.3.1/32  OSPF    10   3126        D   172.16.97.9     GigabitEthernet0/0/0
     172.16.4.1/32  OSPF    10   2           D   172.16.97.9     GigabitEthernet0/0/0
    172.16.33.0/24  OSPF    10   1565        D   172.16.97.9     GigabitEthernet0/0/0
    172.16.34.1/32  OSPF    10   1565        D   172.16.97.9     GigabitEthernet0/0/0
    172.16.35.1/32  OSPF    10   1565        D   172.16.97.9     GigabitEthernet0/0/0
    172.16.36.1/32  OSPF    10   1564        D   172.16.97.9     GigabitEthernet0/0/0
    172.16.65.0/29  OSPF    10   3127        D   172.16.97.9     GigabitEthernet0/0/0
    172.16.65.8/29  OSPF    10   3128        D   172.16.97.9     GigabitEthernet0/0/0
    172.16.66.1/32  OSPF    10   3127        D   172.16.97.9     GigabitEthernet0/0/0
    172.16.97.0/29  OSPF    10   2           D   172.16.97.9     GigabitEthernet0/0/0
    172.16.98.1/32  OSPF    10   1           D   172.16.97.9     GigabitEthernet0/0/0
   172.16.131.1/32  OSPF    10   1           D   172.16.129.2    GigabitEthernet0/0/1

OSPF routing table status : <Inactive>
         Destinations : 0        Routes : 0

[R9]

R10:

[R10]display ip routing-table protocol ospf 
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Public routing table : OSPF
         Destinations : 1        Routes : 1        

OSPF routing table status : <Active>
         Destinations : 1        Routes : 1

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

   172.16.130.1/32  OSPF    10   1           D   172.16.129.1    GigabitEthernet0/0/0

OSPF routing table status : <Inactive>
         Destinations : 0        Routes : 0

[R10]

R11:

[R11]display ip routing-table protocol ospf 
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Public routing table : OSPF
         Destinations : 14       Routes : 14       

OSPF routing table status : <Active>
         Destinations : 14       Routes : 14

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

     172.16.1.1/32  OSPF    10   1563        D   172.16.65.1     GigabitEthernet0/0/0
     172.16.1.2/32  OSPF    10   3125        D   172.16.65.1     GigabitEthernet0/0/0
     172.16.1.3/32  OSPF    10   1           D   172.16.65.1     GigabitEthernet0/0/0
     172.16.1.4/32  OSPF    10   3125        D   172.16.65.1     GigabitEthernet0/0/0
     172.16.2.1/32  OSPF    10   3125        D   172.16.65.1     GigabitEthernet0/0/0
     172.16.3.1/32  OSPF    10   1           D   172.16.65.1     GigabitEthernet0/0/0
     172.16.4.1/32  OSPF    10   3125        D   172.16.65.1     GigabitEthernet0/0/0
    172.16.33.0/24  OSPF    10   1564        D   172.16.65.1     GigabitEthernet0/0/0
    172.16.34.1/32  OSPF    10   1564        D   172.16.65.1     GigabitEthernet0/0/0
    172.16.35.1/32  OSPF    10   1564        D   172.16.65.1     GigabitEthernet0/0/0
    172.16.36.1/32  OSPF    10   1563        D   172.16.65.1     GigabitEthernet0/0/0
    172.16.97.0/29  OSPF    10   3126        D   172.16.65.1     GigabitEthernet0/0/0
    172.16.97.8/29  OSPF    10   3127        D   172.16.65.1     GigabitEthernet0/0/0
    172.16.98.1/32  OSPF    10   3126        D   172.16.65.1     GigabitEthernet0/0/0

OSPF routing table status : <Inactive>
         Destinations : 0        Routes : 0

[R11]

R12:

[R12]display ip routing-table protocol ospf 
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Public routing table : OSPF
         Destinations : 16       Routes : 16       

OSPF routing table status : <Active>
         Destinations : 16       Routes : 16

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

     172.16.1.1/32  OSPF    10   1564        D   172.16.65.9     GigabitEthernet0/0/0
     172.16.1.2/32  OSPF    10   3126        D   172.16.65.9     GigabitEthernet0/0/0
     172.16.1.3/32  OSPF    10   2           D   172.16.65.9     GigabitEthernet0/0/0
     172.16.1.4/32  OSPF    10   3126        D   172.16.65.9     GigabitEthernet0/0/0
     172.16.2.1/32  OSPF    10   3126        D   172.16.65.9     GigabitEthernet0/0/0
     172.16.3.1/32  OSPF    10   2           D   172.16.65.9     GigabitEthernet0/0/0
     172.16.4.1/32  OSPF    10   3126        D   172.16.65.9     GigabitEthernet0/0/0
    172.16.33.0/24  OSPF    10   1565        D   172.16.65.9     GigabitEthernet0/0/0
    172.16.34.1/32  OSPF    10   1565        D   172.16.65.9     GigabitEthernet0/0/0
    172.16.35.1/32  OSPF    10   1565        D   172.16.65.9     GigabitEthernet0/0/0
    172.16.36.1/32  OSPF    10   1564        D   172.16.65.9     GigabitEthernet0/0/0
    172.16.65.0/29  OSPF    10   2           D   172.16.65.9     GigabitEthernet0/0/0
    172.16.66.1/32  OSPF    10   1           D   172.16.65.9     GigabitEthernet0/0/0
    172.16.97.0/29  OSPF    10   3127        D   172.16.65.9     GigabitEthernet0/0/0
    172.16.97.8/29  OSPF    10   3128        D   172.16.65.9     GigabitEthernet0/0/0
    172.16.98.1/32  OSPF    10   3127        D   172.16.65.9     GigabitEthernet0/0/0

OSPF routing table status : <Inactive>
         Destinations : 0        Routes : 0

[R12]

6、重发布

R12:

[R12]ospf 1
[R12-ospf-1]import-route rip 1

R9:

[R9]ospf 1
[R9-ospf-1]import-route ospf 2

查看路由表:
R12:

[R12]display ip routing-table protocol ospf 
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Public routing table : OSPF
         Destinations : 19       Routes : 19       

OSPF routing table status : <Active>
         Destinations : 19       Routes : 19

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

     172.16.1.1/32  OSPF    10   1564        D   172.16.65.9     GigabitEthernet0/0/0
     172.16.1.2/32  OSPF    10   3126        D   172.16.65.9     GigabitEthernet0/0/0
     172.16.1.3/32  OSPF    10   2           D   172.16.65.9     GigabitEthernet0/0/0
     172.16.1.4/32  OSPF    10   3126        D   172.16.65.9     GigabitEthernet0/0/0
     172.16.2.1/32  OSPF    10   3126        D   172.16.65.9     GigabitEthernet0/0/0
     172.16.3.1/32  OSPF    10   2           D   172.16.65.9     GigabitEthernet0/0/0
     172.16.4.1/32  OSPF    10   3126        D   172.16.65.9     GigabitEthernet0/0/0
    172.16.33.0/24  OSPF    10   1565        D   172.16.65.9     GigabitEthernet0/0/0
    172.16.34.1/32  OSPF    10   1565        D   172.16.65.9     GigabitEthernet0/0/0
    172.16.35.1/32  OSPF    10   1565        D   172.16.65.9     GigabitEthernet0/0/0
    172.16.36.1/32  OSPF    10   1564        D   172.16.65.9     GigabitEthernet0/0/0
    172.16.65.0/29  OSPF    10   2           D   172.16.65.9     GigabitEthernet0/0/0
    172.16.66.1/32  OSPF    10   1           D   172.16.65.9     GigabitEthernet0/0/0
    172.16.97.0/29  OSPF    10   3127        D   172.16.65.9     GigabitEthernet0/0/0
    172.16.97.8/29  OSPF    10   3128        D   172.16.65.9     GigabitEthernet0/0/0
    172.16.98.1/32  OSPF    10   3127        D   172.16.65.9     GigabitEthernet0/0/0
   172.16.129.0/29  O_ASE   150  1           D   172.16.65.9     GigabitEthernet0/0/0
   172.16.130.0/24  O_ASE   150  1           D   172.16.65.9     GigabitEthernet0/0/0
   172.16.131.1/32  O_ASE   150  1           D   172.16.65.9     GigabitEthernet0/0/0

OSPF routing table status : <Inactive>
         Destinations : 0        Routes : 0

[R12]

R9:

[R9]display ip routing-table protocol ospf 
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Public routing table : OSPF
         Destinations : 19       Routes : 19       

OSPF routing table status : <Active>
         Destinations : 19       Routes : 19

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

     172.16.1.1/32  OSPF    10   1564        D   172.16.97.9     GigabitEthernet0/0/0
     172.16.1.2/32  OSPF    10   3126        D   172.16.97.9     GigabitEthernet0/0/0
     172.16.1.3/32  OSPF    10   3126        D   172.16.97.9     GigabitEthernet0/0/0
     172.16.1.4/32  OSPF    10   2           D   172.16.97.9     GigabitEthernet0/0/0
     172.16.2.1/32  OSPF    10   3126        D   172.16.97.9     GigabitEthernet0/0/0
     172.16.3.1/32  OSPF    10   3126        D   172.16.97.9     GigabitEthernet0/0/0
     172.16.4.1/32  OSPF    10   2           D   172.16.97.9     GigabitEthernet0/0/0
    172.16.33.0/24  OSPF    10   1565        D   172.16.97.9     GigabitEthernet0/0/0
    172.16.34.1/32  OSPF    10   1565        D   172.16.97.9     GigabitEthernet0/0/0
    172.16.35.1/32  OSPF    10   1565        D   172.16.97.9     GigabitEthernet0/0/0
    172.16.36.1/32  OSPF    10   1564        D   172.16.97.9     GigabitEthernet0/0/0
    172.16.65.0/29  OSPF    10   3127        D   172.16.97.9     GigabitEthernet0/0/0
    172.16.65.8/29  OSPF    10   3128        D   172.16.97.9     GigabitEthernet0/0/0
    172.16.66.1/32  OSPF    10   3127        D   172.16.97.9     GigabitEthernet0/0/0
    172.16.97.0/29  OSPF    10   2           D   172.16.97.9     GigabitEthernet0/0/0
    172.16.98.1/32  OSPF    10   1           D   172.16.97.9     GigabitEthernet0/0/0
   172.16.131.1/32  OSPF    10   1           D   172.16.129.2    GigabitEthernet0/0/1
   172.16.160.0/20  O_ASE   150  1           D   172.16.97.9     GigabitEthernet0/0/0
   172.16.176.0/20  O_ASE   150  1           D   172.16.97.9     GigabitEthernet0/0/0

OSPF routing table status : <Inactive>
         Destinations : 0        Routes : 0

[R9]

7、配置汇总空接口防环

R3:

[R3]ospf 1
[R3-ospf-1]area 1
[R3-ospf-1-area-0.0.0.1]abr-summary 172.16.32.0 255.255.224.0
[R3]ip route-static 172.16.32.0 19 NULL 0

R6:

[R6]ospf 1
[R6-ospf-1]area 2
[R6-ospf-1-area-0.0.0.2]abr-summary 172.16.64.0 255.255.224.0
[R6]ip route-static 172.16.64.0 19 NULL 0

R7:

[R7]ospf 1
[R7-ospf-1]area 3
[R7-ospf-1-area-0.0.0.3]abr-summary 172.16.96.0 255.255.224.0
[R7]ip route-static 172.16.96.0 19 NULL 0

R9:

[R9]ospf 1
[R9-ospf-1]asbr-summary 172.16.128.0 255.255.224.0
[R9]ip route-static 172.16.128.0 19 NULL 0

R12:

[R12]ospf 1
[R12-ospf-1]asbr-summary 172.16.160.0 255.255.224.0
[R12]ip route-static 172.16.160.0 19 NULL 0

8、配置特殊区域:

R1:

[R1]ospf 1
[R1-ospf-1]area 1
[R1-ospf-1-area-0.0.0.1]stub 

R2:

[R2]ospf 1
[R2-ospf-1]area 1
[R2-ospf-1-area-0.0.0.1]stub 

R3:

[R3]ospf 1
[R3-ospf-1]area 1
[R3-ospf-1-area-0.0.0.1]stub no-summary 

R7:

[R7]ospf 1
[R7-ospf-1]area 3
[R7-ospf-1-area-0.0.0.3]nssa no-summary

R8:

[R8]ospf 1
[R8-ospf-1]area 3
[R8-ospf-1-area-0.0.0.3]nssa 

R9:

[R9]ospf 1
[R9-ospf-1]area 3
[R9-ospf-1-area-0.0.0.3]nssa

R6:

[R6]ospf 1
[R6-ospf-1]area 2
[R6-ospf-1-area-0.0.0.2]nssa no-summary

R11:

[R11]ospf 1
[R11-ospf-1]area 2
[R11-ospf-1-area-0.0.0.2]nssa 

R12:

[R12]ospf 1
[R12-ospf-1]area 2
[R12-ospf-1-area-0.0.0.2]nssa 

9、配置NAT环境

R3:

[R3]acl 2000
[R3-acl-basic-2000]rule permit source 172.16.0.0 0.0.255.255
[R3-acl-basic-2000]q
[R3]int Serial 4/0/0
[R3-Serial4/0/0]nat outbound 2000

R5:

[R5]acl 2000
[R5-acl-basic-2000]rule permit source 172.16.0.0 0.0.255.255
[R5-acl-basic-2000]q
[R5]int Serial 4/0/0
[R5-Serial4/0/0]nat outbound 2000

R7:

[R7]acl 2000
[R7-acl-basic-2000]rule permit source 172.16.0.0 0.0.255.255
[R7-acl-basic-2000]q
[R7]int g 0/0/0
[R7-GigabitEthernet0/0/0]nat outbound 2000

R6:

[R6]acl 2000
[R6-acl-basic-2000]rule permit source 172.16.0.0 0.0.255.255
[R6-acl-basic-2000]q
[R6]int s 4/0/0
[R6-Serial4/0/0]nat outbound 2000

10、加快收敛

减少计时器时间
R3:

[R3]int t 0/0/0
[R3-Tunnel0/0/0]ospf timer hello 5

R5:

[R5]int t 0/0/0
[R5-Tunnel0/0/0]ospf timer hello 5

R6:

[R6]int t 0/0/0
[R6-Tunnel0/0/0]ospf timer hello 5

R7:

[R7]int t 0/0/0
[R7-Tunnel0/0/0]ospf timer hello 5

11、配置接口认证

R1:

[R1]ospf 1
[R1-ospf-1]area 1
[R1-ospf-1-area-0.0.0.1]authentication-mode md5 1 cipher 123456

R2:

[R2]ospf 1
[R2-ospf-1]area 1
[R2-ospf-1-area-0.0.0.1]authentication-mode md5 1 cipher 123456

R3:

[R3]ospf 1
[R3-ospf-1]area 1
[R3-ospf-1-area-0.0.0.1]authentication-mode md5 1 cipher 123456

12、测试

在这里插入图片描述
在这里插入图片描述

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/785195.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

ModHeader插件

ModHeader浏览器插件下载装载地址&#xff1a;&#xff08;microsoftedge&#xff09;ModHeader - Modify HTTP headers - Microsoft Edge Addonshttps://microsoftedge.microsoft.com/addons/detail/modheader-modify-http-h/opgbiafapkbbnbnjcdomjaghbckfkglc?refidbingshor…

MySQL 主从复制的认识 2023.07.23

一、理解MySQL主从复制原理 1、概念&#xff1a;主从复制是用来建立一个和 主数据库完全一样的数据库环境称为从数据库&#xff1b;主数据库一般是准实时的业务数据库。 2、作用&#xff1a;灾备、数据分布、负载平衡、读写分离、提高并发能力 3、原理图 4、具体步骤 (1) M…

微服务远程调用openFeign简单回顾

目录 一. OpenFeign简介 二. OpenFeign原理 演示使用 provider模块 消费者模块 配置全局feign日志 示例源代码: 一. OpenFeign简介 OpenFeign是SpringCloud服务调用中间件&#xff0c;可以帮助代理服务API接口。并且可以解析SpringMVC的RequestMapping注解下的接口&#x…

生物信息学_玉泉路_课堂笔记_04 第四章 高通量测序技术与 数据分析

&#x1f345; 课程&#xff1a;生物信息学_玉泉路_课堂笔记 中科院_2022秋季课 第一学期 &#x1f345; 个人笔记使用 &#x1f345; 2023/7/19 测序技术 鸟枪法测序 全球测试仪的使用情况 边合成边测序 深颜色是加的接头 adapter 浅颜色的是要测的片段 insert ① 重叠的情…

【iOS】动态链接器dyld

参考&#xff1a;认识 dyld &#xff1a;动态链接器 dyld简介 dyld&#xff08;Dynamic Linker&#xff09;是 macOS 和 iOS 系统中的动态链接器&#xff0c;它是负责在运行时加载和链接动态共享库&#xff08;dylib&#xff09;或可执行文件的组件。在 macOS 系统中&#xf…

Docker 安装 和 GPU 支持

一、Docker安装过程&#xff08;ubuntu18.04环境&#xff09; 清华镜像 docker 安装&#xff1a;docker-ce | 镜像站使用帮助 | 清华大学开源软件镜像站 | Tsinghua Open Source Mirror 1、由于apt官方库里的docker版本可能比较旧&#xff0c;所以先卸载可能存在的旧版本&…

Java 设计模式——原型模式

目录 1.概述2.结构3.实现3.1.浅拷贝3.2.深拷贝3.2.1.通过对象序列化实现深拷贝&#xff08;推荐&#xff09;3.2.2.重写 clone() 方法来实现深拷贝 4.优缺点5.使用场景 1.概述 &#xff08;1&#xff09;原型模式 (Prototype Pattern) 是一种创建型设计模式&#xff0c;是通过…

【2023裸辞失业后之初学RocketMQ】

目录 RocketMQ概述MQ概述常见的MQ产品常见的协议 Rocket的安装和启动基本概念系统架构安装RocketMQ和控制台 RocketMQ概述 MQ概述 Message Queue&#xff1a;是提供消息队列服务的中间件&#xff0c;提供消息生产&#xff0c;存储&#xff0c;消费的全过程。 作用&#xff1a…

刘铁猛C#语言教程——表达式详解1

表达式的定义 对以上文档的翻译&#xff1a; 对以上文档的代码解释&#xff1a;表达式是为了实现具体的算法逻辑并得到一个具体的值&#xff0c;而表达式的返回值可以是一个单值&#xff0c;也可以是实例&#xff0c;方法&#xff0c;或者命名空间&#xff1b;例如&#xff1a;…

微服务入门---SpringCloud(一)

微服务入门---SpringCloud&#xff08;一&#xff09; 1.认识微服务1.0.学习目标1.1.单体架构1.2.分布式架构1.3.微服务1.4.SpringCloud1.5.总结 2.服务拆分和远程调用2.1.服务拆分原则2.2.服务拆分示例2.2.1.导入Sql语句2.2.2.导入demo工程 2.3.实现远程调用案例2.3.1.案例需求…

当今网络的基本情况

1 网络表示方法和网络拓扑 1.1 网络表示方法 网络架构师和管理员必须能够展示他们的网络将是什么样子。他们需要能够轻松地看到哪些组件连接到其他组件&#xff0c;它们将位于何处&#xff0c;以及它们将如何连接。网络图通常使用图标&#xff08;如图中所示&#xff09;来表…

基于Citespace、vosviewer、R语言的文献计量学可视化分析技术及全流程文献可视化SCI论文高效写作方法

文献计量学是指用数学和统计学的方法&#xff0c;定量地分析一切知识载体的交叉科学。它是集数学、统计学、文献学为一体&#xff0c;注重量化的综合性知识体系。特别是&#xff0c;信息可视化技术手段和方法的运用&#xff0c;可直观的展示主题的研究发展历程、研究现状、研究…

数据结构与算法-排序算法

数据结构与算法之排序算法 1 使用递归的方式求最大值2 时间复杂度3 选择排序和冒泡排序的时间复杂度分析4 插入排序时间复杂度分析 (O(N^2))5 二分法的详解与扩展6 对数器7 归并排序8 归并排序的应用9 逆序对问题10 归并排序非递归方式11 快速排序12 堆排序13 桶排序 1 使用递归…

并行计算-OPENMP(windows)

并行计算&#xff08;Parallel Computing&#xff09;是指同时使用多种计算资源解决计算问题的过程&#xff0c;是提高计算机系统计算速度和处理能力的一种有效手段。它的基本思想是用多个处理器来协同求解同一问题&#xff0c;即将被求解的问题分解成若干个部分&#xff0c;各…

深度学习(一)

目录 一、特征工程的作用 二、深度学习的应用 三、得分函数 四、损失函数 五、前向传播 六、反向传播 一、特征工程的作用 数据特征决定了模型的上限预处理和特征提取是最核心的算法与参数选择决定了如何逼近这个上限 二、深度学习的应用 无人驾驶人脸识别分辨率重构 深…

国产龙芯2k1000开发板运行SylixOS嵌入式实时系统--迅为电子

龙芯生态体系越来越完善&#xff0c;继RK3568开发板成功搭载SylixOS国产实时操作系统后&#xff0c;迅为的国产龙芯2K1000开发平台也可以流畅运行SylixOS国产实时操作系统了。 SylixOS 采用抢占式、多任务、硬实时的方式来设计整个操作系统。已广泛适用于电力、工业自动化、轨道…

为什么要配置环境变量(深析)

为什么要配置环境变量&#xff08;深析&#xff09; 前言&#xff1a;大家学习java首先听到的就是jdk&#xff0c;配置环境变量&#xff0c;当时我听到这个也一脸雾水&#xff0c;这是个什么东西&#xff0c;当时就稀里糊涂跟着老师一步步下载安装&#xff0c;弄好了也不知道是…

安全基础 --- html基础标签 + DNS工作原理

html基础标签 &#xff08;1&#xff09;id id属性是元素在网页内的唯一标识符。 比如&#xff0c;网页可能包含多个<p>标签&#xff0c;id属性可以指定每个<p>标签的唯一标识符。 <p id"p1"></p> <p id"p2"></p>…

UE4/5C++多线程插件制作(十四、MTPAbandonable)

MTPAbandonable 在头文件中创建新的文件夹,MTPAbandonable,里面是MTPAbandonable.h,cpp也一样如此: h实现 构造函数接受一个FSimpleDelegate类型的参数InThreadDelegate,用于指定任务在后台线程中执行时要执行的操作。 DoWork()函数定义了任务的具体执行逻辑,需要根据…

NLog同时输出到文件、控制台、RichTextBox

效果 项目 VS2010.net4.0NLogNLog.Windows.Forms 代码 using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using NLog;namespac…