HCIP(OSPF综合实验)--6

实验要求:

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

实现过程:

(一)配置IP地址,换回接口和缺省路由:

AR1:

[AR1]int g0/0/0
[AR1-GigabitEthernet0/0/0]ip add 172.16.33.1 24
Apr 18 2024 18:12:44-08:00 AR1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
 on the interface GigabitEthernet0/0/0 has entered the UP state. 
[AR1-GigabitEthernet0/0/0]int l0
[AR1-LoopBack0]ip add 172.16.34.1 24
 

AR2:

[AR2]int g 0/0/0
[AR2-GigabitEthernet0/0/0]ip add 172.16.33.2 24
[AR2-GigabitEthernet0/0/0]int l0
[AR2-LoopBack0]ip add 172.16.35.2 24
 

AR3:

[AR3]int g0/0/0
[AR3-GigabitEthernet0/0/0]ip add 172.16.33.3 24
[AR3-LoopBack0]ip add 172.16.36.3 24
[AR3-LoopBack0]q
[AR3]int s    
[AR3]int Serial 4/0/0
[AR3-Serial4/0/0]ip add 34.0.0.3 24
[AR3]ip route-static 0.0.0.0 0 34.0.0.4


[AR3]ospf 1
[AR3-ospf-1]a 0
[AR3-ospf-1-area-0.0.0.0]ne 172.16.6.0 0.0.0.255
[AR3-ospf-1-area-0.0.0.0]

AR4:

[AR4]int s4/0/0
[AR4-Serial4/0/0]ip add 34.0.0.4 24
[AR4-Serial4/0/0]
Apr 18 2024 18:20:54-08:00 AR4 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol PP
P IPCP on the interface Serial4/0/0 has entered the UP state. 
[AR4-Serial4/0/0]int s4/0/1
[AR4-Serial4/0/1]ip add 45.0.0.4 24
[AR4-Serial4/0/1]int s3/0/0
[AR4-Serial3/0/0]ip add 46.0.0.4 24
[AR4-Serial3/0/0]int g0/0/0
[AR4-GigabitEthernet0/0/0]ip add 47.0.0.4 24
Apr 18 2024 18:22:20-08:00 AR4 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
 on the interface GigabitEthernet0/0/0 has entered the UP state. 
[AR4-GigabitEthernet0/0/0]int l0
[AR4-LoopBack0]ip add 172.16.2.4 24
 

AR5:

[AR5]int s4/0/0
[AR5-Serial4/0/0]ip add 45.0.0.5 24
[AR5-Serial4/0/0]
Apr 18 2024 18:24:26-08:00 AR5 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol PP
P IPCP on the interface Serial4/0/0 has entered the UP state. 
[AR5-Serial4/0/0]int l0
[AR5-LoopBack0]ip add 172.16.3.5 24
[AR5-LoopBack0]q
[AR5]ip route-static 0.0.0.0 0 45.0.0.4

[AR5]ospf 1
[AR5-ospf-1]a 0
[AR5-ospf-1-area-0.0.0.0]ne 172.16.6.0 0.0.0.255
[AR5-ospf-1-area-0.0.0.0]
 

AR6:

[AR6]int s4/0/0
[AR6-Serial4/0/0]ip add 46.0.0.6 24
[AR6-Serial4/0/0]
Apr 18 2024 18:26:28-08:00 AR6 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol PP
P IPCP on the interface Serial4/0/0 has entered the UP state. 
[AR6-Serial4/0/0]int g0/0/0
[AR6-GigabitEthernet0/0/0]ip add 172.16.65.1 30
Apr 18 2024 18:27:47-08:00 AR6 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
 on the interface GigabitEthernet0/0/0 has entered the UP state. 
[AR6-GigabitEthernet0/0/0]int l0
[AR6-LoopBack0]ip add 172.16.4.6 24
[AR6-LoopBack0]q
[AR6]ip route-static 0.0.0.0 0 46.0.0.4

[AR6]ospf 1
[AR6-ospf-1]a 0 
[AR6-ospf-1-area-0.0.0.0]ne 172.16.6.0 0.0.0.255
[AR6-ospf-1-area-0.0.0.0]
 

AR7:

[AR7]int g0/0/0
[AR7-GigabitEthernet0/0/0]ip add 47.0.0.7 24
Apr 18 2024 18:29:37-08:00 AR7 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
 on the interface GigabitEthernet0/0/0 has entered the UP state. 
[AR7-GigabitEthernet0/0/0]int g0/0/1
[AR7-GigabitEthernet0/0/1]ip add 172.16.97.1 30
Apr 18 2024 18:31:13-08:00 AR7 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
 on the interface GigabitEthernet0/0/1 has entered the UP state. 
[AR7-GigabitEthernet0/0/1]int l0
[AR7-LoopBack0]ip add 172.16.5.7 24
[AR7]ip route-static 0.0.0.0 0 47.0.0.4
 

[AR7]ospf 1
[AR7-ospf-1]a 0
[AR7-ospf-1-area-0.0.0.0]ne 172.16.6.0 0.0.0.255
[AR7-ospf-1-area-0.0.0.0]
 

AR8:

[AR8]int g0/0/0
[AR8-GigabitEthernet0/0/0]ip add 172.16.97.2 30
Apr 18 2024 18:33:01-08:00 AR8 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
 on the interface GigabitEthernet0/0/0 has entered the UP state. 
[AR8-GigabitEthernet0/0/0]int g 0/0/1
[AR8-GigabitEthernet0/0/1]ip add 172.16.97.5 30
Apr 18 2024 18:33:28-08:00 AR8 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
 on the interface GigabitEthernet0/0/1 has entered the UP state. 
[AR8-GigabitEthernet0/0/1]int l0
[AR8-LoopBack0]ip add 172.16.98.8 24
[AR8-LoopBack0]q
 

AR9:

[AR9]int g0/0/0
[AR9-GigabitEthernet0/0/0]ip add 172.16.97.6 30
Apr 18 2024 18:35:21-08:00 AR9 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
 on the interface GigabitEthernet0/0/0 has entered the UP state. 
[AR9-GigabitEthernet0/0/0]int g0/0/1
[AR9-GigabitEthernet0/0/1]ip add 172.16.129.1 30
Apr 18 2024 18:35:52-08:00 AR9 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
 on the interface GigabitEthernet0/0/1 has entered the UP state. 
[AR9-GigabitEthernet0/0/1]int l0
[AR9-LoopBack0]ip add 172.16.130.9 24
 

AR10:

[AR10]int g0/0/0
[AR10-GigabitEthernet0/0/0]ip add 172.16.129.2 30
Apr 18 2024 18:37:35-08:00 AR10 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol I
P on the interface GigabitEthernet0/0/0 has entered the UP state. 
[AR10-GigabitEthernet0/0/0]int l0
[AR10-LoopBack0]ip add 172.16.131.10 24
[AR10-LoopBack0]q
 

AR11;

[AR11]int g0/0/0
[AR11-GigabitEthernet0/0/0]ip add 172.16.65.2 30
Apr 18 2024 18:38:58-08:00 AR11 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol I
P on the interface GigabitEthernet0/0/0 has entered the UP state. 
[AR11-GigabitEthernet0/0/0]int g0/0/1
[AR11-GigabitEthernet0/0/1]ip add 172.16.65.5 30
[AR11-GigabitEthernet0/0/1]
Apr 18 2024 18:39:25-08:00 AR11 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol I
P on the interface GigabitEthernet0/0/1 has entered the UP state. 
[AR11-GigabitEthernet0/0/1]int l0
[AR11-LoopBack0]ip add 172.16.66.11 24
[AR11-LoopBack0]q
 

AR12:

[AR12]int g0/0/0
[AR12-GigabitEthernet0/0/0]ip add 172.16.65.6 30
Apr 18 2024 18:41:03-08:00 AR12 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol I
P on the interface GigabitEthernet0/0/0 has entered the UP state. 
[AR12-GigabitEthernet0/0/0]int l0
[AR12-LoopBack0]ip add 172.16.160.12 24
[AR12-LoopBack0]int l1
[AR12-LoopBack1]ip add 172.16.161.12 24
 

(二)配置OSPF与RIP协议:

AR1:

[AR1]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.
[AR1-ospf-1]
[AR1-ospf-1]
[AR1-ospf-1]
[AR1-ospf-1]a 1
[AR1-ospf-1-area-0.0.0.1]ne 172.16.33.0 0.0.0.255
[AR1-ospf-1-area-0.0.0.1]

AR2:

[AR2]ospf 1 ro    
[AR2]ospf 1 router-id 2.2.2.2
[AR2-ospf-1]a 1
[AR2-ospf-1-area-0.0.0.1]ne 172.16.33.0 0.0.0.255
[AR2-ospf-1-area-0.0.0.1]
 

AR3:

[AR3]ospf 1 router-id 3.3.3.3
Info: The configuration succeeded. You need to restart the OSPF process to valid
ate the new router ID.
[AR3-ospf-1]a 1
[AR3-ospf-1-area-0.0.0.1]ne 172.16.33.0 0.0.0.255
[AR3-ospf-1-area-0.0.0.1]
[AR3-ospf-1-area-0.0.0.1]ne 172.16.36.0 0.0.0.255
[AR3-ospf-1-area-0.0.0.1]q

AR5:

[AR5]ospf 1 router-id 5.5.5.5
[AR5-ospf-1]a 0
[AR5-ospf-1-area-0.0.0.0]ne 172.16.3.0 0.0.0.255
[AR5-ospf-1-area-0.0.0.0]q
 

AR6:

[AR6]ospf 1 router-id 6.6.6.6
[AR6-ospf-1]
[AR6-ospf-1]a 0
[AR6-ospf-1-area-0.0.0.0]ne 172.16.4.0 0.0.0.255
[AR6-ospf-1-area-0.0.0.0]q
[AR6-ospf-1]a 2
[AR6-ospf-1-area-0.0.0.2]ne 172.16.65.1 0.0.0.0
[AR6-ospf-1-area-0.0.0.2]q
 

AR7:

[AR7]ospf 1 rou    
[AR7]ospf 1 router-id 7.7.7.7
[AR7-ospf-1]a 0
[AR7-ospf-1-area-0.0.0.0]ne 172.16.5.0 0.0.0.255
[AR7-ospf-1-area-0.0.0.0]q
[AR7-ospf-1]a 3
[AR7-ospf-1-area-0.0.0.3]ne 172.16.97.1 0.0.0.0
[AR7-ospf-1-area-0.0.0.3]

AR8:

[AR8]ospf 1 rou    
[AR8]ospf 1 router-id 8.8.8.8
[AR8-ospf-1]a 3
[AR8-ospf-1-area-0.0.0.3]ne 172.16.97.2 0.0.0.0
[AR8-ospf-1-area-0.0.0.3]
[AR8-ospf-1-area-0.0.0.3]ne 172.16.97.5 0.0.0.0
[AR8-ospf-1-area-0.0.0.3]ne 172.16.98.0 0.0.0.255
 

AR9:

[AR9]ospf 1 router-id 9.9.9.9
[AR9-ospf-1]a 3
[AR9-ospf-1-area-0.0.0.3]ne 172.16.97.6 0.0.0.0
[AR9-ospf-1]a 4
[AR9-ospf-1-area-0.0.0.4]ne 172.16.129.1 0.0.0.0
[AR9-ospf-1-area-0.0.0.4]ne 172.16.130.0 0.0.0.255
 

AR10:

[AR10]ospf 1 router-id 10.10.10.10
[AR10-ospf-1]a 4
[AR10-ospf-1-area-0.0.0.4]ne 172.16.131.0 0.0.0.255
[AR10-ospf-1-area-0.0.0.4]ne 172.16.129.2 0.0.0.0
[AR10-ospf-1-area-0.0.0.4]
 

AR11:

[AR11]ospf 1 router-id 11.11.11.11
[AR11-ospf-1]a 2
[AR11-ospf-1-area-0.0.0.2]ne 172.16.65.2 0.0.0.0
[AR11-ospf-1-area-0.0.0.2]ne 172.16.65.5 0.0.0.0

AR12:

[AR12]ospf 1 router-id 12.12.12.12
[AR12-ospf-1]a 2
[AR12-ospf-1-area-0.0.0.2]ne 172.16.65.6 0.0.0.0
[AR12-ospf-1-area-0.0.0.2]
[AR12-rip-1]v 2
[AR12-rip-1]undo su    
[AR12-rip-1]undo summary 
[AR12-rip-1]net    
[AR12-rip-1]network 172.16.0.0
[AR12]ospf 1
[AR12-ospf-1]im    
[AR12-ospf-1]import-route rip
 

(三)

[AR9]ospf 2
[AR9-ospf-2]de    
[AR9-ospf-2]default
[AR9-ospf-2]default-route-advertise
[AR9-ospf-2]
 

(四)配置VPN隧道:

AR3:

[AR3]int t0/0/0
[AR3-Tunnel0/0/0]ip add 172.16.6.3 24
[AR3-Tunnel0/0/0]tu    
[AR3-Tunnel0/0/0]tunnel-protocol gre p2mp
[AR3-Tunnel0/0/0]so    
[AR3-Tunnel0/0/0]source s4/0/0
Apr 18 2024 19:34:04-08:00 AR3 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
 on the interface Tunnel0/0/0 has entered the UP state. 
[AR3-Tunnel0/0/0]
[AR3-Tunnel0/0/0]nhrp net    
[AR3-Tunnel0/0/0]nhrp network-id 100
[AR3-Tunnel0/0/0]nhrp en    
[AR3-Tunnel0/0/0]nhrp entry mu    
[AR3-Tunnel0/0/0]nhrp entry multicast dy    
[AR3-Tunnel0/0/0]nhrp entry multicast dynamic 
[AR3-Tunnel0/0/0]
[AR3-Tunnel0/0/0]
[AR3-Tunnel0/0/0]ospf network-type broadcast 
 

AR5:

[AR5]int t0/0/0
[AR5-Tunnel0/0/0]ip add 172.16.6.5 24
[AR5-Tunnel0/0/0]tunnel-protocol gre p2mp
[AR5-Tunnel0/0/0]
[AR5-Tunnel0/0/0]sour    
[AR5-Tunnel0/0/0]source s4/0/0
Apr 18 2024 19:36:57-08:00 AR5 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
 on the interface Tunnel0/0/0 has entered the UP state. 
[AR5-Tunnel0/0/0]nhrp ne    
[AR5-Tunnel0/0/0]nhrp network-id 100
[AR5-Tunnel0/0/0]nhrp en    
[AR5-Tunnel0/0/0]nhrp entry 172.16.6.3 34.0.0.3 re    
[AR5-Tunnel0/0/0]nhrp entry 172.16.6.3 34.0.0.3 register 
[AR5-Tunnel0/0/0]

[AR5]int t0/0/0
[AR5-Tunnel0/0/0]ospf network-type broadcast 
[AR5-Tunnel0/0/0]ospf dr-priority 0
 

AR6:

[AR6]int t0/0/0
[AR6-Tunnel0/0/0]ip add 172.16.6.6 24
[AR6-Tunnel0/0/0]tunnel-protocol gre p2mp
[AR6-Tunnel0/0/0]
[AR6-Tunnel0/0/0]sour    
[AR6-Tunnel0/0/0]source s4/0/0
Apr 18 2024 19:39:36-08:00 AR6 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
 on the interface Tunnel0/0/0 has entered the UP state. 
[AR6-Tunnel0/0/0]net    
[AR6-Tunnel0/0/0]nhrp ne    
[AR6-Tunnel0/0/0]nhrp network-id 100
[AR6-Tunnel0/0/0]nhrp entry 172.16.6.3 34.0.0.3 re    
[AR6-Tunnel0/0/0]nhrp entry 172.16.6.3 34.0.0.3 register 
[AR6-Tunnel0/0/0]q
[AR6]int t0/0/0
[AR6-Tunnel0/0/0]ospf network-type broadcast 
ospf dr-priority 0
 

AR7:

[AR7]int t0/0/0
[AR7-Tunnel0/0/0]ip add 172.16.6.7 24
[AR7-Tunnel0/0/0]tu    
[AR7-Tunnel0/0/0]tunnel-protocol gre p    
[AR7-Tunnel0/0/0]tunnel-protocol gre p2mp 
[AR7-Tunnel0/0/0]sor    
[AR7-Tunnel0/0/0]so    
[AR7-Tunnel0/0/0]source g0/0/0
Apr 18 2024 19:42:04-08:00 AR7 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
 on the interface Tunnel0/0/0 has entered the UP state. 
[AR7-Tunnel0/0/0]nhrp n    
[AR7-Tunnel0/0/0]nhrp network-id 100
[AR7-Tunnel0/0/0]nhrp en    
[AR7-Tunnel0/0/0]nhrp entry 172.16.6.3 34.0.0.3 re    
[AR7-Tunnel0/0/0]nhrp entry 172.16.6.3 34.0.0.3 register 

[AR7]int t0/0/0
[AR7-Tunnel0/0/0]ospf network-type broadcast 
ospf dr-priority 0
 

(五)配置NAT(EASY IP):

AR3:

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

AR5:

[AR5]acl 2000
[AR5-acl-basic-2000]rule permit source 172.16.0.0 0.0.255.255
[AR5-acl-basic-2000]q
[AR5]int s4/0/0
[AR5-Serial4/0/0]nat o    
[AR5-Serial4/0/0]nat outbound 2000
[AR5-Serial4/0/0]

AR6:

[AR6]acl 2000
[AR6-acl-basic-2000]rule permit source 172.16.0.0 0.0.255.255
[AR6-acl-basic-2000]q
[AR6]int s4/0/0
[AR6-Serial4/0/0]nat out b    
[AR6-Serial4/0/0]nat out    
[AR6-Serial4/0/0]nat outbound 2000


AR7:

[AR7]acl 2000
[AR7-acl-basic-2000]rule permit source 172.16.0.0 0.0.255.255
[AR7-acl-basic-2000]q
[AR7]int g0/0/0
[AR7-GigabitEthernet0/0/0]nat ou    
[AR7-GigabitEthernet0/0/0]nat outbound 2000
[AR7-GigabitEthernet0/0/0]

(六)在AR3设备下发缺省路由:

[AR3]ospf 1
[AR3-ospf-1]de    
[AR3-ospf-1]default
[AR3-ospf-1]default-route-advertise al    
[AR3-ospf-1]default-route-advertise always 
[AR3-ospf-1]

(七)路由聚合:

AR3:

[AR3-ospf-1]a 1
[AR3-ospf-1-area-0.0.0.1]ab    
[AR3-ospf-1-area-0.0.0.1]abr-summary 172.16.32.0 255.255.254.0
[AR3-ospf-1-area-0.0.0.1]

AR6:

[AR6]ospf 1
[AR6-ospf-1]a 2
[AR6-ospf-1-area-0.0.0.2]abr    
[AR6-ospf-1-area-0.0.0.2]abr-summary 172.16.64.0 255.255.254.0
[AR6-ospf-1-area-0.0.0.2]

AR7:

[AR7]ospf 1
[AR7-ospf-1]a 3
[AR7-ospf-1-area-0.0.0.3]
[AR7-ospf-1-area-0.0.0.3]
[AR7-ospf-1-area-0.0.0.3]abr    
[AR7-ospf-1-area-0.0.0.3]abr-summary 172.16.96.0 255.255.254.0
[AR7-ospf-1-area-0.0.0.3]

AR9:

[AR7]ospf 1
[AR7-ospf-1]asbr    
[AR7-ospf-1]asbr-summary 172.16.168.0 255.255.254.0
[AR7-ospf-1]q
 

AR12:

[AR12]ospf 1
[AR12-ospf-1]as    
[AR12-ospf-1]asbr-summary 172.16.160.0 255.255.254.0
[AR12-ospf-1]q
[AR12]

(九)更改hello时间:

AR1:

[AR1]int g0/0/0
[AR1-GigabitEthernet0/0/0]ospf timer hello 5
[AR1-GigabitEthernet0/0/0]
 

AR2:

[AR2]int g0/0/0
[AR2-GigabitEthernet0/0/0]ospf timer hello 5
[AR2-GigabitEthernet0/0/0]
 

AR3:

[AR3]int g0/0/0
[AR3-GigabitEthernet0/0/0]ospf timer hello 5
[AR3-GigabitEthernet0/0/0]q
 

(十)区域认证:

AR6:

[AR6-ospf-1-area-0.0.0.2]authentication-mode md5 1 cipher 12345
 

AR11:

[AR11-ospf-1]a 2
[AR11-ospf-1-area-0.0.0.2]authentication-mode md5 1 cipher 12345
 

AR12:

[AR12]ospf 1
[AR12-ospf-1]a 2
[AR12-ospf-1-area-0.0.0.2]authentication-mode md5 1 cipher 12345
 

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值