OSPF网络类型实验

实验要求:


整体思路:

  •  配置IP地址
  • MGRE的的相关知识点
  • OSPF的简单规划

实验拓扑:

一: IP地址的配置,缺省路由的配置

R1: 

​
R1:<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys r1
[r1]int g0/0/0
[r1-GigabitEthernet0/0/0]ip add 10.1.16.1 24 
[r1-GigabitEthernet0/0/0]int g0/0/1
[r1-GigabitEthernet0/0/1]ip add 10.1.61.1 24
[r1-LoopBack1]ip add 192.168.1.1 24
[r1-LoopBack1]q
[r1]ip route-static 0.0.0.0 0 10.1.16.6
[r1]ip route-static 0.0.0.0 0 10.1.61.6


R2:

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys r2
[r2]int g0/0/1
[r2-GigabitEthernet0/0/1]ip add 10.1.26.2 24
[r2-LoopBack2]ip add 192.168.2.1 24
[r2-LoopBack2]q
[r2]ip route-static 0.0.0.0 0 10.1.26.6

R3:

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys r3
[r3]int g0/0/1
[r3-GigabitEthernet0/0/1]int lo3
[r3-LoopBack3]ip add 192.168.3.1 24
[r3-LoopBack3]q
[r3]ip route-static 0.0.0.0 0 10.1.36.6

R4: 

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys r4
[r4]int g0/0/1
[r4-GigabitEthernet0/0/1]ip add 10.1.46.4 24
[r4-GigabitEthernet0/0/1]int lo4
[r4-LoopBack4]ip add 192.168.4.1 24
[r4-LoopBack4]q 
[r4]ip route-static 0.0.0.0 0 10.1.46.6

R5:

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys t5
[t5]sys r5
[r5]int g0/0/1
[r5-GigabitEthernet0/0/1]ip add 10.1.56.5 24
[r5-GigabitEthernet0/0/1]int lo5
[r5-LoopBack5]ip add 192.168.5.1 24
[r5-LoopBack5]q
[r5]ip route-static 0.0.0.0 0 10.1.56.6

R6:

<Huawei>sys 
Enter system view, return user view with Ctrl+Z.
[Huawei]sys 6
[6]sys r6
[r6]int g3/0/0
[r6-GigabitEthernet3/0/0]ip add 10.1.16.6 24
[r6-GigabitEthernet3/0/0]int g0/0/0
[r6-GigabitEthernet0/0/0]ip add 10.1.61.6 24
[r6-GigabitEthernet0/0/0]int g0/0/1
[r6-GigabitEthernet0/0/1]ip add 10.1.26.6 24
[r6-GigabitEthernet0/0/1]int g0/0/2
[r6-GigabitEthernet0/0/2]ip add 10.1.36.6 24
[r6-GigabitEthernet0/0/2]int g1/0/0
[r6-GigabitEthernet1/0/0]ip add 10.1.46.6 24
[r6-GigabitEthernet1/0/0]int g2/0/0
[r6-GigabitEthernet2/0/0]ip add 10.1.56.6 24
[r6-LoopBack6]ip add 6.6.6.6 24

二:MGRE的配置

其中R1,R2,R3为星型拓扑,R1,R4,R5为全MGRE拓扑

逻辑图如下: 

[r1]interface 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 10.1.16.1        
[r1-Tunnel0/0/0]nhrp entry multicast dynamic 
[r1-Tunnel0/0/0]nhrp ne	
[r1-Tunnel0/0/0]nhrp network-id 100
[r1-Tunnel0/0/0]q



[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 10.1.26.2	
[r2-Tunnel0/0/0]nhrp entry 10.1.1.1 10.1.16.1 register 
[r2-Tunnel0/0/0]nhrp network-id 100



[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 10.1.36.3
[r3-Tunnel0/0/0]nhrp entry 10.1.1.1 10.1.16.1 register    
[r3-Tunnel0/0/0]nhrp network-id 100
[r3-Tunnel0/0/0]q



[r4]int t0/0/1
[r4-Tunnel0/0/1]ip add 10.1.2.2 24
[r4-Tunnel0/0/1]tunnel-protocol gre p2mp 
[r4-Tunnel0/0/1]source 10.1.46.4       
[r4-Tunnel0/0/1]nhrp entry 10.1.2.1 10.1.61.1 register 
[r4-Tunnel0/0/1]nhrp entry 10.1.2.3 10.1.56.5 register 
[r4-Tunnel0/0/1]nhrp network-id 100




[r5]int t0/0/1
[r5-Tunnel0/0/1]ip add 10.1.2.3 24
[r5-Tunnel0/0/1]tunnel-protocol gre p2mp 
[r5-Tunnel0/0/1]source 10.1.56.5	
[r5-Tunnel0/0/1]nhrp entry 10.1.2.1 10.1.61.1 register 
[r5-Tunnel0/0/1]nhrp network-id 100
[r5-Tunnel0/0/1]nhrp entry multicast dynamic 
[r5-Tunnel0/0/1]q

三.配置OSPF

[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.1 0.0.0.0
[r1-ospf-1-area-0.0.0.0]network 10.1.1.1 0.0.0.0
[r1-ospf-1-area-0.0.0.0]network 10.1.2.1 0.0.0.0




[r2]ospf 2 router-id 2.2.2.2
[r2-ospf-2]area 0
[r2-ospf-2-area-0.0.0.0]network 192.168.2.1 0.0.0.0
[r2-ospf-2-area-0.0.0.0]network 10.1.1.2 0.0.0.0




[r3]ospf 3 router-id 3.3.3.3	
[r3-ospf-3]area 0
[r3-ospf-3-area-0.0.0.0]network 192.168.3.1 0.0.0.0	
[r3-ospf-3-area-0.0.0.0]network 10.1.1.3 0.0.0.0



	
[r4]ospf 4 router-id 4.4.4.4	
[r4-ospf-4]area 0
[r4-ospf-4-area-0.0.0.0]network 192.168.4.1 0.0.0.0
[r4-ospf-4-area-0.0.0.0]network 10.1.2.2 0.0.0.0




[r5]ospf 5 router-id 5.5.5.5    
[r5-ospf-5]area 0  
[r5-ospf-5-area-0.0.0.0]network 192.168.5.1 0.0.0.0
[r5-ospf-5-area-0.0.0.0]network 10.1.2.3 0.0.0.0

四、由于OSPF在MGRE中默认连接方式为P2P,故在左边连接时,只能和其中一个邻居相连,所以只能和一个邻居处于FULL状态,此时,应该修改OSPF的连接方式,再修改完成后,由于DR和BDR之间的选取会混乱,之后再修改优先级。

[r1-Tunnel0/0/0]ospf network-type broadcast 

[r2-Tunnel0/0/0]ospf network-type broadcast

[r3-Tunnel0/0/0]ospf network-type broadcast


修改完成后,将出现以下情况,DR和BDR选取混乱。 


此时需要修改优先级

[r2-Tunnel0/0/0]ospf dr-priority 0
[r3-Tunnel0/0/0]ospf dr-priority 0

五、进行ping换回,发现每个路由的换回都可ping通六的换回 

 

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值