OSPF综合实验--接口实验

要求1:

首先进行基础的IP配置
[r1]interface g0/0/0
[r1-GigabitEthernet0/0/0]ip address 61.0.0.2 24
Apr  5 2024 18:19:06-08:00 r1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP on the interfaceGigabitEthernet0/0/0 has entered the UP state. 
[r1]interface g0/0/1
[r1-GigabitEthernet0/0/1]ip address 16.0.0.2 24
Apr  5 2024 18:19:18-08:00 r1 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP on the interfaceGigabitEthernet0/0/1 has entered the UP state. 
[r1]interface l0
[r1-LoopBack0]ip address 1.1.1.1 24
 

 

 

 每个路由器写一条指向ISP的缺省路由,保证公网能通

[r1]ip route-static 0.0.0.0 0 16.0.0.1
[r1]ip route-static 0.0.0.0 0 61.0.0.1
 

 

测试公网保证能正常通讯

要求2:

R1/R4/R5为MGRE环境
R1为中心站点

R4,R5上分别做如下配置

[r4]interface t0/0/0
[r4-Tunnel0/0/0]ip address 192.168.1.2 24
[r4-Tunnel0/0/0]tunnel-protocol gre p2mp 
[r4-Tunnel0/0/0]source g0/0/0
Apr 10 2024 11:20:06-08:00 r4 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface Tunnel0/0/0 has entered the UP state.     
[r4-Tunnel0/0/0]nhrp entry 192.168.1.1 16.0.0.2 register 
 

[r5]interface t0/0/0
[r5-Tunnel0/0/0]ip address 192.168.1.3 24    
[r5-Tunnel0/0/0]tunnel-protocol gre p2mp 
[r5-Tunnel0/0/0]source g0/0/0
Apr 10 2024 11:21:00-08:00 r5 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface Tunnel0/0/0 has entered the UP state.     

 

在R1上查看NHRP表象

 

同时在三台路由器上修改接口网络类型为broadcast,即可实现全连

R1,R2,R3为星型拓扑,创建新的隧道并做如下配置

[r2]interface t0/0/1
[r2-Tunnel0/0/1]ip address 192.168.2.2 24
[r2-Tunnel0/0/1]tunnel-protocol gre p2mp
[r2-Tunnel0/0/1]source g0/0/0
Apr 10 2024 11:39:56-08:00 r2 %%01IFNET/4/LINK_STATE(l)[2]:The line protocol IP 
on the interface Tunnel0/0/1 has entered the UP state. 
[r2-Tunnel0/0/1]nh entry 192.168.2.1 61.0.0.2 register 
 

 查看R1上的NHRP表象,得到4个表象

要求3:

将R1-R5划分到一个OSPF区域,并宣告私网网段

测试,得到结果,全网可达 

 

 

 

  • 19
    点赞
  • 26
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值