HCIP ospf接口网络类型实验报告

实验题目:

 实验分析

使用ospf协议时需要将所有隧道接口的工作方式改为broadcast
星型结构可能在DR选举上出现问题,所以将R2和R3接口的选举优先级改为0
使用NAT技术完成私有网络对公有网络的访问

拓扑图

 

配置内容:

R1:

[Huawei]sysname r1
[r1]int g0/0/0
[r1-GigabitEthernet0/0/0]ip add 41.1.1.1 24
[r1-GigabitEthernet0/0/0]int g0/0/01
[r1-GigabitEthernet0/0/1]ip add 14.1.1.1 24
[r1-GigabitEthernet0/0/1]int g0/0/2 
[r1-GigabitEthernet0/0/2]ip add 192.168.1.1 24
[r1-GigabitEthernet0/0/2]q     
[r1]ip route-static 0.0.0.0 0 14.1.1.4
[r1]ip route-static 0.0.0.0 0 41.1.1.4
[r1]int t0/0/0
[r1-Tunnel0/0/0]ip add 10.1.1.1 24
[r1-Tunnel0/0/0]tunnel-protocol gre p2mp
[r1-Tunnel0/0/0]source 14.1.1.1
[r1-Tunnel0/0/0]nhrp entry multicast dynamic 
[r1-Tunnel0/0/0]nhrp network-id 100
[r1-Tunnel0/0/0]q    
[r1]int Tunnel 0/0/1
[r1-Tunnel0/0/1]ip add 11.1.1.1 24
[r1-Tunnel0/0/1]tunnel-protocol gre p2mp
[r1-Tunnel0/0/1]source g0/0/0
[r1-Tunnel0/0/1]nhrp entry multicast dynamic 
[r1-Tunnel0/0/1]nhrp network-id 200
[r1-Tunnel0/0/1]nhrp entry 11.1.1.2 54.1.1.5 register 
[r1-Tunnel0/0/1]nhrp entry 11.1.1.2 64.1.1.6 register
[r1-Tunnel0/0/1]q
[r1]ospf 1 router-id 1.1.1.1
[r1-ospf-1]area 0
[r1-ospf-1-area-0.0.0.0]network 192.168.1.0 0.0.0.255
[r1-ospf-1-area-0.0.0.0]network  10.1.1.0 0.0.0.255
[r1-ospf-1-area-0.0.0.0]q    
[r1-ospf-1]q    
[r1]int Tunnel  0/0/0
[r1-Tunnel0/0/0]ospf network-type broadcast 
[r1-Tunnel0/0/0]q         
[r1]ospf 1 router-id 1.1.1.1
[r1-ospf-1]area 1
[r1-ospf-1-area-0.0.0.1]network 11.1.1.0 0.0.0.255
[r1-ospf-1-area-0.0.0.1]q
[r1-ospf-1]q    
[r1]int Tunnel 0/0/1
[r1-Tunnel0/0/1]ospf network-type broadcast 
[r1-Tunnel0/0/1]q
[r1]acl 2000
[r1-acl-basic-2000]rule permit source any
[r1-acl-basic-2000]q
[r1]int g0/0/0[r1-GigabitEthernet0/0/0]nat outbound  2000 
[r1-GigabitEthernet0/0/0]int g0/0/1
[r1-GigabitEthernet0/0/1]nat outbound 2000

R2:

[Huawei]sysname r2
[r2]int g0/0/0
[r2-GigabitEthernet0/0/0]ip add 24.1.1.2 24
[r2-GigabitEthernet0/0/0]int g 0/0/01
[r2-GigabitEthernet0/0/1]ip add 192.168.2.1 24
[r2-GigabitEthernet0/0/1]q     
[r2]ip route-static 0.0.0.0 0 24.1.1.4
[r2]int t0/0/0
[r2-Tunnel0/0/0]ip add 10.1.1.2 24
[r2-Tunnel0/0/0]tunnel-protocol gre p2mp
[r2-Tunnel0/0/0]source g0/0/0
[r2-Tunnel0/0/0]nhrp entry 10.1.1.1 14.1.1.1 re
[r2-Tunnel0/0/0]nhrp entry 10.1.1.1 14.1.1.1 register 
[r2-Tunnel0/0/0]nhrp network-id 100
[r2-Tunnel0/0/0]q
[r2]ospf 1 router-id 2.2.2.2
[r2-ospf-1]area 0
[r2-ospf-1-area-0.0.0.0]network  10.1.1.0 0.0.0.255
[r2-ospf-1-area-0.0.0.0]network 192.168.2.0 0.0.0.255
[r2-ospf-1-area-0.0.0.0]q
[r2-ospf-1]int t0/0/0
[r2-Tunnel0/0/0]ospf network-type broadcast 
[r2-Tunnel0/0/0]ospf dr-priority 0
[r2-Tunnel0/0/0]q
[r2]acl 2000
[r2-acl-basic-2000]rule permit source any
[r2-acl-basic-2000]q
[r2]int g00/0/0
[r2-GigabitEthernet0/0/0]nat outbound  2000

R3:

[Huawei]sysname r3
[r3]int g0/0/0
[r3-GigabitEthernet0/0/0]ip add 34.1.1.3 24
[r3-GigabitEthernet0/0/0]int g0/0/1
[r3-GigabitEthernet0/0/1]ip add 192.168.3.1 24
[r3-GigabitEthernet0/0/1]q
[r3]ip route-static 0.0.0.0 0 34.1.1.4
[r3]int t0/0/0
[r3-Tunnel0/0/0]ip add 10.1.1.3 24
[r3-Tunnel0/0/0]tunnel-protocol gre p2mp
[r3-Tunnel0/0/0]source g0/0/0
[r3-Tunnel0/0/0]nhrp entry 10.1.1.1 14.1.1.1 register 
[r3-Tunnel0/0/0]nhrp network-id 100
[r3-Tunnel0/0/0]q
[r3]ospf 1 router-id 3.3.3.3
[r3-ospf-1]area 0
[r3-ospf-1-area-0.0.0.0]network 10.1.1.0 0.0.0.255
[r3-ospf-1-area-0.0.0.0]network  192.168.3.0 0.0.0.255
[r3-ospf-1-area-0.0.0.0]q
[r3-ospf-1]int t0/0/0
[r3-Tunnel0/0/0]ospf network-type broadcast 
[r3-Tunnel0/0/0]ospf dr-priority 0
[r3-Tunnel0/0/0]q
[r3]acl 2000
[r3-acl-basic-2000]rule permit source any
[r3-acl-basic-2000]q
[r3]int g0/0/0
[r3-GigabitEthernet0/0/0]nat outbound 2000

R4(ISP):

[Huawei]sysname isp
[isp]int g0/0/0
[isp-GigabitEthernet0/0/0]ip add 41.1.1.4 24
[isp-GigabitEthernet0/0/0]int g0/0/1
[isp-GigabitEthernet0/0/1]ip add 24.1.1.4 24
[isp-GigabitEthernet0/0/1]int g0/0/2
[isp-GigabitEthernet0/0/2]ip add 34.1.1.4 24
[isp-GigabitEthernet0/0/2]int g4/0/2
[isp-GigabitEthernet4/0/2]ip add 14.1.1.4 24
[isp-GigabitEthernet4/0/2]int g4/0/0
[isp-GigabitEthernet4/0/0]ip add 64.1.1.4 24
[isp-GigabitEthernet4/0/0]int g4/0/1
[isp-GigabitEthernet4/0/1]ip add 54.1.1.4 24
[isp-GigabitEthernet4/0/1]q
[isp]int l0
[isp-LoopBack0]ip add 2.2.2.2 24

R5

[Huawei]sysname r5
[r5]int g0/0/0
[r5-GigabitEthernet0/0/0]ip add 54.1.1.5 24
[r5-GigabitEthernet0/0/0]int g0/0/1 
[r5-GigabitEthernet0/0/1]ip add 192.168.4.1 24
[r5-GigabitEthernet0/0/1]q
[r5]ip route-static 0.0.0.0 0 54.1.1.4
[r5]int t0/0/0
[r5-Tunnel0/0/0]ip add 11.1.1.2 24
[r5-Tunnel0/0/0]tunnel-protocol gre p2mp
[r5-Tunnel0/0/0]source g0/0/0
[r5-Tunnel0/0/0]nhrp entry multicast dynamic 
[r5-Tunnel0/0/0]nhrp network-id 200
[r5-Tunnel0/0/0]nhrp entry 11.1.1.1 41.1.1.1 register 
[r5-Tunnel0/0/0]nhrp entry 11.1.1.3 64.1.1.6 register
[r5-Tunnel0/0/0]q
[r5]ospf 1 router-id 5.5.5.5
[r5-ospf-1]area 1
[r5-ospf-1-area-0.0.0.1]network  192.168.4.0 0.0.0.255
[r5-ospf-1-area-0.0.0.1]network 11.1.1.0 0.0.0.255
[r5-ospf-1-area-0.0.0.1]q
[r5-ospf-1]q
[r5]int t0/0/0
[r5-Tunnel0/0/0]ospf network-type broadcast 
[r5-Tunnel0/0/0]q  
[r5]acl 2000
[r5-acl-basic-2000]rule permit source any
[r5-acl-basic-2000]q
[r5]int g0/0/0
[r5-GigabitEthernet0/0/0]nat outbound 2000

R6:

[Huawei]sysname r6
[r6]int g0/0/0
[r6-GigabitEthernet0/0/0]ip add 64.1.1.6 24
[r6-GigabitEthernet0/0/0]int g0/0/1 
[r6-GigabitEthernet0/0/1]ip add 192.168.5.1 24
[r6-GigabitEthernet0/0/1]q
[r6]ip route-static 0.0.0.0 0 64.1.1.4
[r6]int t00/0/0
[r6-Tunnel0/0/0]ip add 11.1.1.3 24
[r6-Tunnel0/0/0]tunnel-protocol gre p2mp
[r6-Tunnel0/0/0]source g0/0/0
[r6-Tunnel0/0/0]nhrp entry multicast dynamic 
[r6-Tunnel0/0/0]nhrp network-id 200
[r6-Tunnel0/0/0]nhrp entry 11.1.1.1 41.1.1.1 register 
[r6-Tunnel0/0/0]nhrp entry 11.1.1.2 41.1.1.5 register
[r6-Tunnel0/0/0]q
[r6]ospf 1 router-id 6.6.6.6
[r6-ospf-1]area 1
[r6-ospf-1-area-0.0.0.1]network 11.1.1.0 0.0.0.255
[r6-ospf-1-area-0.0.0.1]network 192.168.5.0 0.0.0.255
[r6-ospf-1-area-0.0.0.1]q
[r6-ospf-1]q
[r6]int t0/0/0
[r6-Tunnel0/0/0]ospf network-type broadcast 
[r6-Tunnel0/0/0]q
[r6]acl 2000
[r6-acl-basic-2000]rule permit source any
[r6-acl-basic-2000]q
[r6]int g0/0/0
[r6-GigabitEthernet0/0/0]nat outbound 2000

实验验证

display nhrp peer all:

pc1、pc2、pc3、pc4、pc5的IP配置:

ping ISP的环回

全网可达

 

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

土尔奇酱

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值