IP相关问题5 --- OSPF综合实验

实验要求

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

1.ip地址规划

根据题目题目要求分析得出:

由于该实验划分了6个区域,因此首先需要划分六个网段,需要借三位

172.16.0.0/16

172.16.000 00000.0/19 172.16.0.0/19 a0

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.31.0/24

172.16.001 00000.0/19 172.16.32.0/19 a1

172.16.010 00000.0/19 172.16.64.0/19 a2

172.16.011 00000.0/19 172.16.96.0/19 a3

172.16.100 00000.0/19 172.16.128.0/19 a4

172.16.101 00000.0/19 172.16.160.0/19 a5

172.16.110 00000.0/19 172.16.192.0/19

172.16.111 00000.0/19 172.16.224.0/19

2.配置公网ip

1.R3配置公网ip

<Huawei>system-view 
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname r3
[r3]int g0/0/1
[r3-GigabitEthernet0/0/1]ip add 34.0.0.1 24

2.R4配置公网ip

<Huawei>system-view 
Enter system view, return user view with Ctrl+Z.
[r4]sysname isp

[isp]int g0/0/0
[isp-GigabitEthernet0/0/0]ip add 34.0.0.2 24
Aug  7 2023 20:40:51-08:00 isp %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
 on the interface GigabitEthernet0/0/0 has entered the UP state. 

[isp-GigabitEthernet0/0/0]int g0/0/1
[isp-GigabitEthernet0/0/1]ip add 45.0.0.2 24
Aug  7 2023 20:41:50-08:00 isp %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
 on the interface GigabitEthernet0/0/1 has entered the UP state. 

[isp-GigabitEthernet0/0/1]int g0/0/2
[isp-GigabitEthernet0/0/2]ip add 46.0.0.2 24
Aug  7 2023 20:42:12-08:00 isp %%01IFNET/4/LINK_STATE(l)[2]:The line protocol IP
 on the interface GigabitEthernet0/0/2 has entered the UP state. 

[isp-GigabitEthernet0/0/2]int g1/0/0
[isp-GigabitEthernet1/0/0]ip add 47.0.0.2 24
Aug  7 2023 20:42:40-08:00 isp %%01IFNET/4/LINK_STATE(l)[3]:The line protocol IP
 on the interface GigabitEthernet1/0/0 has entered the UP state. 

3.R5配置公网ip

<Huawei>system-view 
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname r5
[r5]int g0/0/0
[r5-GigabitEthernet0/0/0]ip add 45.0.0.1 24

4.R6配置公网ip

<Huawei>system-view 
Enter system view, return user view with Ctrl+Z.	
[Huawei]sysname r6
[r6]int g0/0/0
[r6-GigabitEthernet0/0/0]ip add 46.0.0.1 24

5.R7配置公网ip

<Huawei>system-view 
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname r7
[r7]int g0/0/0
[r7-GigabitEthernet0/0/0]ip add 47.0.0.1 24

3.联通公网

1.R3联通公网ip

<r3>system-view 
Enter system view, return user view with Ctrl+Z.
[r3]ip route-static 0.0.0.0 0 34.0.0.2

2.R5联通公网ip

<r5>system-view 
Enter system view, return user view with Ctrl+Z.
[r5]ip route-static 0.0.0.0 0 45.0.0.2

3.R6联通公网ip

<r6>system-view 
Enter system view, return user view with Ctrl+Z.
[r6]ip route-static 0.0.0.0 0 46.0.0.2

4.R7联通公网ip

<r7>system-view 
Enter system view, return user view with Ctrl+Z.
[r7]ip route-static 0.0.0.0 0 47.0.0.2

5.检测公网是否联通

[r3]ping 47.0.0.1
  PING 47.0.0.1: 56  data bytes, press CTRL_C to break
    Request time out
    Reply from 47.0.0.1: bytes=56 Sequence=2 ttl=254 time=60 ms
    Reply from 47.0.0.1: bytes=56 Sequence=3 ttl=254 time=30 ms
    Reply from 47.0.0.1: bytes=56 Sequence=4 ttl=254 time=30 ms
    Reply from 47.0.0.1: bytes=56 Sequence=5 ttl=254 time=30 ms

  --- 47.0.0.1 ping statistics ---
    5 packet(s) transmitted
    4 packet(s) received
    20.00% packet loss
    round-trip min/avg/max = 30/37/60 ms

[r3]ping 46.0.0.1
  PING 46.0.0.1: 56  data bytes, press CTRL_C to break
    Request time out
    Reply from 46.0.0.1: bytes=56 Sequence=2 ttl=254 time=70 ms
    Reply from 46.0.0.1: bytes=56 Sequence=3 ttl=254 time=30 ms
    Reply from 46.0.0.1: bytes=56 Sequence=4 ttl=254 time=30 ms
    Reply from 46.0.0.1: bytes=56 Sequence=5 ttl=254 time=30 ms

  --- 46.0.0.1 ping statistics ---
    5 packet(s) transmitted
    4 packet(s) received
    20.00% packet loss
    round-trip min/avg/max = 30/40/70 ms

[r3]ping 45.0.0.1
  PING 45.0.0.1: 56  data bytes, press CTRL_C to break
    Request time out
    Reply from 45.0.0.1: bytes=56 Sequence=2 ttl=254 time=50 ms
    Reply from 45.0.0.1: bytes=56 Sequence=3 ttl=254 time=30 ms
    Reply from 45.0.0.1: bytes=56 Sequence=4 ttl=254 time=30 ms
    Reply from 45.0.0.1: bytes=56 Sequence=5 ttl=254 time=30 ms

  --- 45.0.0.1 ping statistics ---
    5 packet(s) transmitted
    4 packet(s) received
    20.00% packet loss
    round-trip min/avg/max = 30/35/50 ms

6.配置R4上的环回

[isp]int lo0
[isp-LoopBack0]ip add 4.4.4.4 24

4.配置私网ip

1.area0的私网ip

1.配置R3的私网

[r3]int t0/0/0
[r3-Tunnel0/0/0]ip add 172.16.1.1 29
[r3-Tunnel0/0/0]tunnel-protocol gre p2mp 	
[r3-Tunnel0/0/0]source 34.0.0.1
Aug  7 2023 20:50:27-08:00 r3 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface Tunnel0/0/0 has entered the UP state. 
[r3-Tunnel0/0/0]nhrp network-id 100	
[r3-Tunnel0/0/0]nhrp entry multicast dynamic 

2.配置R5的私网及其环回

<r5>system-view 
Enter system view, return user view with Ctrl+Z.
[r5]int t0/0/0
[r5-Tunnel0/0/0]ip add 172.16.1.2 29
[r5-Tunnel0/0/0]tunnel-protocol gre p2mp 
[r5-Tunnel0/0/0]source g0/0/0
Aug  7 2023 20:52:56-08:00 r5 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface Tunnel0/0/0 has entered the UP state. 	
[r5-Tunnel0/0/0]nhrp  network-id 100	
[r5-Tunnel0/0/0]nhrp entry 172.16.1.1 34.0.0.1 register 
[r5]int lo0
[r5-LoopBack0]ip add 172.16.2.1 24

3. 配置R6的私网及其换回

<r6>system-view 
Enter system view, return user view with Ctrl+Z.
[r6-Tunnel0/0/0]ip add 172.16.1.3 29
[r6-Tunnel0/0/0]tunnel-protocol gre p2mp 
[r6-Tunnel0/0/0]source g0/0/0
Aug  7 2023 23:10:56-08:00 r6 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface Tunnel0/0/0 has entered the UP state. 	
[r6-Tunnel0/0/0]nhrp network-id  100
[r6-Tunnel0/0/0]nhrp entry 172.16.1.1 34.0.0.1 register 
[r6-Tunnel0/0/0]int lo0
[r6-LoopBack0]ip add 172.16.3.1 24

4.配置R7的私网及其环回

<r7>system-view 
Enter system view, return user view with Ctrl+Z.
[r7]int t0/0/0
[r7-Tunnel0/0/0]ip add 172.16.1.4 29
[r7-Tunnel0/0/0]tunnel-protocol gre p2mp 
[r7-Tunnel0/0/0]source g0/0/0
Aug  7 2023 23:24:15-08:00 r7 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface Tunnel0/0/0 has entered the UP state. 
[r7-Tunnel0/0/0]nhrp network-id 100
[r7-Tunnel0/0/0]nhrp entry 172.16.1.1 34.0.0.1 register 
[r7-Tunnel0/0/0]int lo0
[r7-LoopBack0]ip add 172.16.4.1 24

5.在R3上检查配置是否成功

[r3]display nhrp peer dynamic 
------------------------------------------------------------------------------- 
Protocol-addr   Mask  NBMA-addr       NextHop-addr    Type         Flag         
------------------------------------------------------------------------------- 
172.16.1.2      32    45.0.0.1        172.16.1.2      dynamic      route tunnel 
------------------------------------------------------------------------------- 
Tunnel interface: Tunnel0/0/0
Created time    : 02:54:03
Expire time     : 01:35:58
------------------------------------------------------------------------------- 
Protocol-addr   Mask  NBMA-addr       NextHop-addr    Type         Flag         
------------------------------------------------------------------------------- 
172.16.1.3      32    46.0.0.1        172.16.1.3      dynamic      route tunnel 
------------------------------------------------------------------------------- 
Tunnel interface: Tunnel0/0/0
Created time    : 00:33:26
Expire time     : 01:56:34
------------------------------------------------------------------------------- 
Protocol-addr   Mask  NBMA-addr       NextHop-addr    Type         Flag         
------------------------------------------------------------------------------- 
172.16.1.4      32    47.0.0.1        172.16.1.4      dynamic      route tunnel 
------------------------------------------------------------------------------- 
Tunnel interface: Tunnel0/0/0
Created time    : 00:22:46
Expire time     : 01:37:14
  ---- More ----

2.area1的私网ip

1.配置R1的私网及其环回

[r1]int g0/0/0
[r1-GigabitEthernet0/0/0]ip add 172.16.33.1 29
Aug  7 2023 23:55:51-08:00 r1 %%01IFNET/4/LINK_STATE(l)[2]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 
[r1-GigabitEthernet0/0/0]int lo0
[r1-LoopBack0]ip add 172.16.34.1 24

2.配置R2的私网及其环回

<r2>system-view 
Enter system view, return user view with Ctrl+Z.
[r2]int g0/0/0
[r2-GigabitEthernet0/0/0]ip add 172.16.33.2 29
Aug  7 2023 23:58:59-08:00 r2 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 
[r2-GigabitEthernet0/0/0]int lo0
[r2-LoopBack0]ip add 172.16.35.1 24

3.配置R3的私网及其环回

<r3>system-view 
Enter system view, return user view with Ctrl+Z.
[r3]int g0/0/0
[r3-GigabitEthernet0/0/0]ip add 172.16.33.3 29
Aug  8 2023 00:06:30-08:00 r3 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 
[r3-GigabitEthernet0/0/0]int lo0
[r3-LoopBack0]ip add 172.16.36.1 24

3.area2的私网ip

1.配置R6的ip

<r6>system-view 
Enter system view, return user view with Ctrl+Z.
[r6]int g0/0/1
[r6-GigabitEthernet0/0/1]ip add 172.16.65.1 29
Aug  8 2023 00:15:43-08:00 r6 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/1 has entered the UP state. 

2.配置R11的ip及其环回

[r11]int g0/0/0
[r11-GigabitEthernet0/0/0]ip add 172.16.65.2 29
Aug  8 2023 00:18:28-08:00 r11 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
 on the interface GigabitEthernet0/0/0 has entered the UP state. 
[r11-GigabitEthernet0/0/0]int lo0
[r11-LoopBack0]ip add 172.16.66.1 24
[r11-LoopBack0]int g0/0/1
[r11-GigabitEthernet0/0/1]ip add 172.16.65.9 29
Aug  8 2023 00:22:55-08:00 r11 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
 on the interface GigabitEthernet0/0/1 has entered the UP state. 

3.配置R12的ip及其上的环回

[r12]int g0/0/0
[r12-GigabitEthernet0/0/0]ip add 172.16.65.10 29
Aug  8 2023 00:24:37-08:00 r12 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
 on the interface GigabitEthernet0/0/0 has entered the UP state. 
[r12-GigabitEthernet0/0/0]int lo0
[r12-LoopBack0]ip add 172.16.160.1 20
[r12-LoopBack0]int lo1
[r12-LoopBack1]ip add 172.16.176.1 20

4.area3的私网ip

1.配置R7上的ip

<r7>system-view 
Enter system view, return user view with Ctrl+Z.
[r7]int g0/0/1
[r7-GigabitEthernet0/0/1]ip add 172.16.97.1 29
Aug  8 2023 00:32:57-08:00 r7 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/1 has entered the UP state. 

2.配置R8上的ip

[r8]int g0/0/0
[r8-GigabitEthernet0/0/0]ip add 172.16.97.2 29
Aug  8 2023 00:34:33-08:00 r8 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 
[r8-LoopBack0]int g0/0/1
[r8-GigabitEthernet0/0/1]ip add 172.16.97.9 29
Aug  8 2023 00:35:55-08:00 r8 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP 
on the interface GigabitEthernet0/0/1 has entered the UP state. 
[r8-GigabitEthernet0/0/1]int lo0
[r8-LoopBack0]ip add 172.16.98.1 24

3.配置R9上的ip

[r9]int g0/0/0
[r9-GigabitEthernet0/0/0]ip add 172.16.97.10 29
Aug  8 2023 00:38:20-08:00 r9 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 

5.area4的私网ip

1.配置R9上的ip

[r9]int g0/0/1
[r9-GigabitEthernet0/0/1]ip add 172.16.129.1 29
Aug  8 2023 00:41:13-08:00 r9 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP 
on the interface GigabitEthernet0/0/1 has entered the UP state. 
[r9-GigabitEthernet0/0/1]int lo0
[r9-LoopBack0]ip add 172.16.130.1 24

2.配置R10上的ip

[r10]int g0/0/0
[r10-GigabitEthernet0/0/0]ip add 172.16.129.2 29
[r10-GigabitEthernet0/0/0]
Aug  8 2023 00:43:42-08:00 r10 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
 on the interface GigabitEthernet0/0/0 has entered the UP state. 
[r10-GigabitEthernet0/0/0]int lo0
[r10-LoopBack0]ip add 172.16.131.1 24

6.检查配置是否成功

Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              172.16.33.1/29       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]    

Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              172.16.33.2/29       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]

Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              172.16.33.3/29       up         up        
GigabitEthernet0/0/1              34.0.0.1/24          up         up        
GigabitEthernet0/0/2              unassigned           down       down      
LoopBack0                         172.16.36.1/24       up         up(s)     
NULL0                             unassigned           up         up(s)     
Tunnel0/0/0                       172.16.1.1/29        up         up        
[r3]

Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              34.0.0.2/24          up         up        
GigabitEthernet0/0/1              45.0.0.2/24          up         up        
GigabitEthernet0/0/2              46.0.0.2/24          up         up        
GigabitEthernet1/0/0              47.0.0.2/24          up         up        
LoopBack0                         4.4.4.4/24           up         up(s)     
NULL0                             unassigned           up         up(s)     
[isp]

Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              45.0.0.1/24          up         up        
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)     
Tunnel0/0/0                       172.16.1.2/29        up         up        
[r5]

Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              46.0.0.1/24          up         up        
GigabitEthernet0/0/1              172.16.65.1/29       up         up        
GigabitEthernet0/0/2              unassigned           down       down      
LoopBack0                         172.16.3.1/24        up         up(s)     
NULL0                             unassigned           up         up(s)     
Tunnel0/0/0                       172.16.1.3/29        up         up        
[r6]

Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              47.0.0.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)     
Tunnel0/0/0                       172.16.1.4/29        up         up        
[r7]

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]

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]

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]

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]

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]

5.配置路由 

1.R1配置路由

[r1]ospf 1 router-id 1.1.1.1
Info: The configuration succeeded. You need to restart the OSPF process to valid
ate the new router ID.
[r1-ospf-1]area 1
[r1-ospf-1-area-0.0.0.1]network 172.16.0.0 0.0.255.255

2.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

3.R3配置路由

[r3]ospf 1 router-id 3.3.3.3	
[r3-ospf-1]area 1
[r3-ospf-1-area-0.0.0.1]ospf 1 router-id 3.3.3.3
[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]qu
[r3-ospf-1]a 0
[r3-ospf-1-area-0.0.0.0]network 172.16.1.1 0.0.0.0

4.R5配置路由

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

5.R6配置路由 

[r6]ospf 1 router-id 6.6.6.6
[r6-ospf-1]a 0
[r6-ospf-1-area-0.0.0.0]network 172.16.0.0 0.0.3.255
Aug  8 2023 01:27:26-08:00 r6 %%01OSPF/4/NBR_CHANGE_E(l)[0]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=1.1.16.172, Neighbo
rEvent=HelloReceived, NeighborPreviousState=Down, NeighborCurrentState=Init) 
[r6-ospf-1-area-0.0.0.0]a 2
[r6-ospf-1-area-0.0.0.2]net	
[r6-ospf-1-area-0.0.0.2]network 172.16.65.1 0.0.0.0

6.R7配置路由

[r7]ospf 1 router-id 7.7.7.7
[r7-ospf-1]a 0
[r7-ospf-1-area-0.0.0.0]network 172.16.0.0 0.0.7.255
Aug  8 2023 01:34:37-08:00 r7 %%01OSPF/4/NBR_CHANGE_E(l)[0]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=1.1.16.172, Neighbo
rEvent=HelloReceived, NeighborPreviousState=Down, NeighborCurrentState=Init) 
[r7-ospf-1-area-0.0.0.0]a 3
[r7-ospf-1-area-0.0.0.3]network 172.16.97.1 0.0.0.0

7.R8配置路由

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

8.R9配置路由

[r9]ospf 1 router-id 9.9.9.9
[r9-ospf-1]a 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]a 4
[r9-ospf-1-area-0.0.0.4]network 172.16.128.0 0.0.3.255

9.R10配置路由

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

10.R11配置路由

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

11.R12配置路由

[r12]ospf 1 router-id 12.12.12.12
[r12-ospf-1]a 2
[r12-ospf-1-area-0.0.0.2]net	
[r12-ospf-1-area-0.0.0.2]network 172.16.65.10 0.0.0.0

[r12-ospf-1-area-0.0.0.2]rip
[r12-rip-1]v 2
[r12-rip-1]network 172.16.0.0

 6.修改Tunnual接口类型

1.R3修改Tunnual类型为p2p

[r3]int t0/0/0
[r3-Tunnel0/0/0]ospf ne	
[r3-Tunnel0/0/0]ospf network-type p2	
[r3-Tunnel0/0/0]ospf network-type p2mp

2.R5修改Tunnual类型为p2p

[r5]int t0/0/0
[r5-Tunnel0/0/0]ospf n		
[r5-Tunnel0/0/0]ospf network-type p2mp

3.R6修改Tunnual类型为p2p

[r6]int t0/0/0
[r6-Tunnel0/0/0]ospf n		
[r6-Tunnel0/0/0]ospf network-type p2mp

4.R7修改Tunnual类型为p2p

[r7]int t0/0/0
[r7-Tunnel0/0/0]ospf n		
[r7-Tunnel0/0/0]ospf network-type p2mp

5.查看邻居关系是否建立成功

[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             172.16.33.1      Full        
 0.0.0.1          GigabitEthernet0/0/0             2.2.2.2          Full        
 ----------------------------------------------------------------------------

7.重发布导入rip路由和area4的路由

1.将rip导入

[r12]ospf
[r12-ospf-1]im	
[r12-ospf-1]import-route rip 1

2.将area4导入

[r9]ospf 1
[r9-ospf-1]a 4
[r9-ospf-1-area-0.0.0.4]undo network 172.16.128.0 0.0.3.255
[r9-ospf-1-area-0.0.0.4]q
[r9-ospf-1]undo a 4
[r9]ospf 2 router-id 9.9.9.9
[r9-ospf-2]a 4
[r9-ospf-2-area-0.0.0.4]network 172.16.128.0 0.0.3.255
[r9-ospf-2-area-0.0.0.4]q
[r9-ospf-2]q
[r9]ospf 1
[r9-ospf-1]import-route  ospf 2


[r10]ip route-static 0.0.0.0 0 172.16.129.1

8.测试是否联通

[r10]ping 172.16.1.1
  PING 172.16.1.1: 56  data bytes, press CTRL_C to break
    Reply from 172.16.1.1: bytes=56 Sequence=1 ttl=252 time=110 ms
    Reply from 172.16.1.1: bytes=56 Sequence=2 ttl=252 time=50 ms
    Reply from 172.16.1.1: bytes=56 Sequence=3 ttl=252 time=60 ms
    Reply from 172.16.1.1: bytes=56 Sequence=4 ttl=252 time=40 ms
    Reply from 172.16.1.1: bytes=56 Sequence=5 ttl=252 time=110 ms

  --- 172.16.1.1 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 40/74/110 ms

[r10]ping 172.16.33.1
  PING 172.16.33.1: 56  data bytes, press CTRL_C to break
    Reply from 172.16.33.1: bytes=56 Sequence=1 ttl=251 time=290 ms
    Reply from 172.16.33.1: bytes=56 Sequence=2 ttl=251 time=70 ms
    Reply from 172.16.33.1: bytes=56 Sequence=3 ttl=251 time=310 ms
    Reply from 172.16.33.1: bytes=56 Sequence=4 ttl=251 time=110 ms
    Reply from 172.16.33.1: bytes=56 Sequence=5 ttl=251 time=300 ms

  --- 172.16.33.1 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 70/216/310 ms

 9.配置域间汇总和域外汇总

[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 null0

[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 null0

[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]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 null0

[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

11.做特殊区域

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


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


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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值