HCIP ospf

一分别在r1、r5、r7上创建要求的环回接口

[r1]interface LoopBack 0
[r1-LoopBack0]ip address 1.1.1.1 32
[r1-LoopBack0]ip address 201.1.1.1 24
[r1-LoopBack0]ip address 201.1.2.1 24
[r1-LoopBack0]ip address 201.1.3.1 24

二、运行ospf并且r1 r2 r3 运行MGRE

在r1上如下配置

[r1]interface Tunnel 0/0/0
[r1-Tunnel0/0/0]ip address 100.1.1.1 255.255.255.0
[r1-Tunnel0/0/0]tunnel-protocol gre p2mp 
[r1-Tunnel0/0/0]source 18.1.1.1
Sep 16 2022 11:09:43-08:00 r1 %%01IFNET/4/LINK_STATE(l)[6]:The line protocol IP 
on the interface Tunnel0/0/0 has entered the UP state. 
[r1-Tunnel0/0/0]ospf network-type broadcast 
[r1-Tunnel0/0/0]ospf dr-priority 100
[r1-Tunnel0/0/0]nhrp entry multicast dynamic 
[r1-Tunnel0/0/0]nhrp network-id 100

在r2上如下配置,r3和r2配置基本相同

[r2]interface t0/0/0
[r2-Tunnel0/0/0]ip address 100.1.1.2 255.255.255.0
[r2-Tunnel0/0/0]tunnel-protocol gre p2mp 
[r2-Tunnel0/0/0]source 28.1.1.2 
Sep 16 2022 11:11:40-08:00 r2 %%01IFNET/4/LINK_STATE(l)[12]:The line protocol IP
 on the interface Tunnel0/0/0 has entered the UP state. 
[r2-Tunnel0/0/0]ospf network-type broadcast 
[r2-Tunnel0/0/0]ospf dr-priority 0
[r2-Tunnel0/0/0]nhrp network-id 100
[r2-Tunnel0/0/0]nhrp entry 100.1.1.1 18.1.1.1 register

三、area 1 区域不得出现4.5类LSA

在r2 r3 r4分别进行如下配置,成为nssa区域

[r2]ospf 100
[r2-ospf-100]arp-ping 
                      ^
Error:Incomplete command found at '^' position.
[r2-ospf-100]area 1
[r2-ospf-100-area-0.0.0.1]nssa

四、其他区域优先通过R3访问R1 三个环回接口

在R3和R4中使用tunnel将AREA 0区域扩大,防止R3路由器出现意外情况,在R2和R4中也要使用tunnle将AREA 0区域扩大。因为优先通过R3学习和访问 所以在R2与R4之间将cost的值修改变大

[r2-Tunnel0/0/2]ip address 150.1.1.1 255.255.255.0
[r2-Tunnel0/0/2]tunnel-protocol gre 
[r2-Tunnel0/0/2]source 24.1.1.1s
[r2-Tunnel0/0/2]destination 24.1.1.2
Sep 16 2022 13:51:53-08:00 r2 %%01IFNET/4/LINK_STATE(l)[20]:The line protocol IP
 on the interface Tunnel0/0/2 has entered the UP state. 
[r2-Tunnel0/0/2]ospf cost 3999

[r3]interface t0/0/1
[r3-Tunnel0/0/1]ip address 200.1.1.0 255.255.255.0
[r3-Tunnel0/0/1]tunnel-protocol gre 
[r3-Tunnel0/0/1]source 34.1.1.1
[r3-Tunnel0/0/1]destination 34.1.1.2

[r4]interface t0/0/1    

[r4-Tunnel0/0/1]ip address 200.1.1.2 255.255.255.0g    

[r4-Tunnel0/0/1]tunnel-protocol gre

[r4-Tunnel0/0/1]source 34.1.1.2  

  [r4-Tunnel0/0/1]destination 34.1.1.1 Sep 16 2022 13:54:13-08:00 r4 %%01IFNET/4/LINK_STATE(l)[34]:The line protocol IP  on the interface Tunnel0/0/1 has entered the UP state.

[r4]interface t0/0/2

[r4-Tunnel0/0/2]ip address 150.1.1.2 255.255.255.0    

[r4-Tunnel0/0/2]tunnel-protocol gre

[r4-Tunnel0/0/2]source 24.1.1.2    

[r4-Tunnel0/0/2]destination 24.1.1.1 Sep 16 2022 13:55:14-08:00 r4 %%01IFNET/4/LINK_STATE(l)[35]:The line protocol IP  on the interface Tunnel0/0/2 has entered the UP state.

[r4-Tunnel0/0/2]ospf cost 3999

五、area 1 区域增加安全性

在r2 r3 r4上面配置区域认证



 7:57:04
[r2]ospf 100
[r2-ospf-100-area-0.0.0.1]authentication-mode simple plain 1234

六、全网可达

在r2 r3 r4 r6下放缺省路由

[r3]ospf 100 router-id 3.3.3.3
[r3-ospf-100]default-route-advertise always

[r6]rip 100
[r6-rip-100]default-route originate

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值