ospf实验

 

1.合理规划IP地址,启用oSPF单区域。

2.R1-R2之间启用PPP的pap单向认证。

3.R2-R3之间启用PPP的chap双向认证。

4.R3-R5-R6之间使用MGRE,R3为hub端,R5 R6为spoke端;要求MGRE接口网络类型为BMA,spoke之间通信必须经过hub端。

5.全网可达。

1.合理规划 IP 地址,启用 OSPF 单区域 


R1

[r1]int s4/0/0
[r1-Serial4/0/0]ip add 12.1.1.1 24
[r1-Serial4/0/0]quit
r1]ospf 1  rou 1.1.1.1
[r1-ospf-1]are 0
[r1-ospf-1-area-0.0.0.0]network 12.1.1.1 0.0.0.0

R2

[r2]int s4/0/1
[r2-Serial4/0/1]ip add 12.1.1.2 24
[r2-Serial4/0/1]int s4/0/0
[r2-Serial4/0/0]ip add 23.1.1.1 24
[r2-Serial4/0/0]quit
[r2]ospf 1 rou 2.2.2.2
[r2-ospf-1]are 0 
[r2-ospf-1-area-0.0.0.0]network 12.1.1.2 0.0.0.0
[r2-ospf-1-area-0.0.0.0]network 23.1.1.1 0.0.0.0

R3

[r3]int s4/0/1
[r3-Serial4/0/1]ip add 23.1.1.2 24
[r3-Serial4/0/1]int l0
[r3-LoopBack0]ip add 3.3.3.3 24
[r3-LoopBack0]quit
[r3]ospf 1 rou 3.3.3.3
[r3-ospf-1]are 0
[r3-ospf-1-area-0.0.0.0]network 3.3.3.3 0.0.0.0  
[r3-ospf-1-area-0.0.0.0]network 23.1.1.2 0.0.0.0 
[r3-ospf-1-area-0.0.0.0]network 34.1.1.1 0.0.0.0

R4

[r4]int g0/0/0
[r4-GigabitEthernet0/0/0]ip add 34.1.1.2 24
[r4-GigabitEthernet0/0/0]int g0/0/1
[r4-GigabitEthernet0/0/1]ip add 45.1.1.2 24
[r4-GigabitEthernet0/0/1]int g0/0/2
[r4-GigabitEthernet0/0/2]ip add 46.1.1.2 24

R5

[r5]int g0/0/0
[r5-GigabitEthernet0/0/0]ip add 45.1.1.2 24
[r5-GigabitEthernet0/0/0]quit
[r5]ospf 1 router-id 5.5.5.5
[r5-ospf-1]are 0
[r5-ospf-1-area-0.0.0.0]network 5.5.5.5 0.0.0.0
[r5-ospf-1-area-0.0.0.0]network 10.1.1.2 0.0.0.0

R6

[r6]int g0/0/0
[r6-GigabitEthernet0/0/0]ip add 46.1.1.2 24
[r6-GigabitEthernet0/0/0]quit
[r6]ospf 1 router-id 6.6.6.6
[r6-ospf-1]are 0
[r6-ospf-1-area-0.0.0.0]net 6.6.6.6 0.0.0.0
[r6-ospf-1-area-0.0.0.0]network 10.1.1.3 0.0.0.0

2.R1-R2之间启用PPP的pap单向认证。

[r1]aaa
[r1-aaa]local-user aaa password cipher 123
[r1-aaa]local-user aaa service-type ppp
[r1-aaa]int s 4/0/0
[r1-Serial4/0/0]ppp authentication-mode pap
[r1-Serial4/0/0]quit
[r2]int s4/0/1
[r2-Serial4/0/1]ppp pap local-user aaa password cipher 123

3.R2-R3之间启用PPP的chap双向认证。

[r2]aaa
[r2-aaa]local-user bbb password cipher 321  
[r2-aaa]local-user bbb service-type ppp
[r2-aaa]int s 4/0/0    
[r2-Serial4/0/0]ppp authentication-mode chap
r3]int s4/0/1
[r3-Serial4/0/1]ppp chap user bbb
[r3-Serial4/0/1]ppp chap password cipher 321

4.R3-R5-R6之间使用MGRE,R3为hub端,R5 R6为spoke端;要求MGRE接口网络类型为BMA,spoke之间通信必须经过hub端。

[r3]int t0/0/0
[r3-Tunnel0/0/0]ip add 10.1.1.1 24 
[r3-Tunnel0/0/0]tunnel-protocol gre p2mp 
[r3-Tunnel0/0/0]source 34.1.1.1
[r3-Tunnel0/0/0]ospf network-type broadcast 
[r3-Tunnel0/0/0]ospf dr-priority 10
[r3-Tunnel0/0/0]nhrp network-id 1
[r3-Tunnel0/0/0]nhrp entry multicast dynamic 
[r3-Tunnel0/0/0]quit
[r3]ip route-static 0.0.0.0 0 34.1.1.2
[r5]int t0/0/0
[r5-Tunnel0/0/0]ip add 10.1.1.2 24 
[r5-Tunnel0/0/0]tunnel-protocol gre p2mp  
[r5-Tunnel0/0/0]source 45.1.1.1
[r5-Tunnel0/0/0]ospf network-type broadcast 
[r5-Tunnel0/0/0]ospf dr-priority 0
[r5-Tunnel0/0/0]nhrp network-id 1  
[r5-Tunnel0/0/0]nhrp entry 10.1.1.1 34.1.1.1 register 
[r5-Tunnel0/0/0]quit
[r5]ip route-static 0.0.0.0 0 45.1.1.2
[r6]int t0/0/0
[r6-Tunnel0/0/0]ip add 10.1.1.3 24
[r6-Tunnel0/0/0]tunnel-protocol gre p2mp 
[r6-Tunnel0/0/0]source 46.1.1.1
[r6-Tunnel0/0/0]ospf dr-priority 0
[r6-Tunnel0/0/0]ospf network-type broadcast 
[r6-Tunnel0/0/0]nhrp network-id 1
[r6-Tunnel0/0/0]nhrp entry 10.1.1.1 34.1.1.1 register 
[r6-Tunnel0/0/0]quit
[r6]ip route-static 0.0.0.0 0 46.1.1.2

 

 5.全网可达。

 

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值