ospf-mgre

该文详细描述了一个MGRE(MulticastGRE)网络的搭建过程,包括星型和全连接拓扑结构的实现。在配置中,中心站点R1与分支站点R2、R3进行了点到多点的MGRE连接,并通过NHRP进行动态注册。同时,为了优化OSPF邻接关系,修改了接口网络类型并干涉了DR选举,确保R1成为DR。此外,配置了IP地址和缺省路由,以及OSPF宣告,以实现网络间的通信。

目录

1、需求:

 2、分析:

3、IP地址配置:

部分 ip地址查看:

4、 缺省路由:

5、星型MGRE的搭建:

中心站点r1:

分枝站点r2、r3:

分支站点注册结果:  

6、全连MGRE搭建:

配置查看、以及分支站点注册结果: 

7、修改接口的网络类型,干涉选举:

8、ospf宣告:

9、查看关系:

 在星型1、2、3中只有dr:r1​编辑

网络测试:


1、需求:

 2、分析:

1、网络在基础的配置上添加了星型(点到多点)MGRE和网状的MGER。

2、因为ospf的邻接建立的原因,需要将默认的接口点到点网络类型改为以太网的类型broadcast。

3、因为R1、2、3为点到多点,需要统一DR,且r1为最佳,需要干涉选举,2、3弃选。

 

3、IP地址配置:

[r1]int l0
[r1-LoopBack0]ip add 1.1.1.1 24
[r1]int g0/0/0
[r1-GigabitEthernet0/0/0]ip add 60.1.1.1 24
[r1]int g0/0/1
[r1-GigabitEthernet0/0/0]ip add 61.1.1.1 24

[r2]int l0
[r2-LoopBack0]ip add 2.2.2.2 24
[r2]int g0/0/0
[r2-GigabitEthernet0/0/0]ip add 62.1.1.1 24

[r3]int l0
[r3-LoopBack0]ip add 3.3.3.3 24
[r3]int g0/0/0
[r3-GigabitEthernet0/0/0]ip add 63.1.1.1 24

[r4]int l0
[r4-LoopBack0]ip add 4.4.4.4 24
[r4]int g0/0/0
[r4-GigabitEthernet0/0/0]ip add 64.1.1.1 24

[r5]int l0
[r5-LoopBack0]ip add 5.5.5.5 24
[r5]int g0/0/0
[r5-GigabitEthernet0/0/0]ip add 65.1.1.1 24

部分 ip地址查看:

4、 缺省路由:

[r1]ip route-static 0.0.0.0 0 60.1.1.2
[r1]ip route-static 0.0.0.0 0 61.1.1.2
[r2]ip route-static 0.0.0.0 0 62.1.1.2
[r3]ip route-static 0.0.0.0 0 63.1.1.2
[r4]ip route-static 0.0.0.0 0 64.1.1.2
[r5]ip route-static 0.0.0.0 0 65.1.1.2

5、星型MGRE的搭建:

中心站点r1:

[r1]interface Tunnel 0/0/0
[r1-Tunnel0/0/0]ip add 1.2.3.1 24
[r1-Tunnel0/0/0]tunnel-protocol gre p2mp
[r1-Tunnel0/0/0]source 62.1.1.1
[r1-Tunnel0/0/0]nhrp network-id 520
[r1-Tunnel0/0/0]nhrp entry multicast  dynamic 

 

分枝站点r2、r3:

[r2]interface Tunnel 0/0/0
[r2-Tunnel0/0/0]ip address 1.2.3.2 24
[r2-Tunnel0/0/0]tunnel-protocol gre p2mp
[r2-Tunnel0/0/0]source 62.1.1.1
[r2-Tunnel0/0/0]nhrp network-id 520
[r2-Tunnel0/0/0]nhrp entry 1.2.3.1 61.1.1.1 register 

[r3]interface Tunnel 0/0/0
[r3-Tunnel0/0/0]ip address 1.2.3.3 24
[r3-Tunnel0/0/0]tunnel-protocol gre p2mp
[r3-Tunnel0/0/0]source 63.1.1.1
[r3-Tunnel0/0/0]nhrp network-id 520
[r3-Tunnel0/0/0]nhrp entry 1.2.3.1 61.1.1.1 register 

分支站点注册结果:  

6、全连MGRE搭建:

[r1]interface Tunnel 0/0/1
[r1-Tunnel0/0/1]ip add 1.4.5.1 24
[r1-Tunnel0/0/1]tunnel-protocol gre p2mp
[r1-Tunnel0/0/1]source 62.1.1.1
[r1-Tunnel0/0/1]nhrp network-id 521
[r1-Tunnel0/0/1]nhrp entry multicast  dynamic  


[r4]interface Tunnel 0/0/0
[r4-Tunnel0/0/0]ip address 1.4.5.4 24
[r4-Tunnel0/0/0]tunnel-protocol gre p2mp
[r4-Tunnel0/0/0]source 64.1.1.1
[r4-Tunnel0/0/0]nhrp network-id 521
[r4-Tunnel0/0/0]nhrp entry 1.4.5.1 61.1.1.1 register 
[r1-Tunnel0/0/1]nhrp entry multicast  dynamic  


[r5]interface Tunnel 0/0/0
[r5-Tunnel0/0/0]ip address 1.4.5.5 24
[r5-Tunnel0/0/0]tunnel-protocol gre p2mp
[r5-Tunnel0/0/0]source 65.1.1.1
[r5-Tunnel0/0/0]nhrp network-id 521
[r5-Tunnel0/0/0]nhrp entry 1.4.5.1 61.1.1.1 register 
[r5-Tunnel0/0/0]nhrp entry 1.4.5.4 64.1.1.1 register 

配置查看、以及分支站点注册结果: 

 

 

7、修改接口的网络类型,干涉选举:

[r1]int t0/0/0
[r1-Tunnel0/0/0]ospf network-type broadcast 
[r1]int t0/0/1
[r1-Tunnel0/0/1]ospf network-type broadcast

[r2]int t0/0/0
[r2-Tunnel0/0/0]ospf network-type broadcast 
[r2-Tunnel0/0/0]ospf dr-priority 0

[r3]int t0/0/0
[r3-Tunnel0/0/0]ospf network-type broadcast 
[r3-Tunnel0/0/0]ospf dr-priority 0

[r4]int t0/0/1
[r4-Tunnel0/0/0]ospf network-type broadcast 

[r5]int t0/0/1
[r5-Tunnel0/0/0]ospf network-type broadcast 

8、ospf宣告:

[r1]OSPF 1 router-id 1.1.1.1
[r1-ospf-1]area 0
[r1-ospf-1-area-0.0.0.0]network 1.1.1.1 0.0.0.0
[r1-ospf-1-area-0.0.0.0]network 1.2.3.1 0.0.0.0
[r1-ospf-1-area-0.0.0.0]network 1.4.5.1 0.0.0.0

[r2]OSPF 1 router-id 2.2.2.2
[r2-ospf-1]area 0
[r2-ospf-1-area-0.0.0.0]network 2.2.2.2 0.0.0.0
[r2-ospf-1-area-0.0.0.0]network 1.2.3.2 0.0.0.0

[r3]OSPF 1 router-id 3.3.3.3
[r3-ospf-1]area 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 1.2.3.3 0.0.0.0

[r4]OSPF 1 router-id 4.4.4.4
[r4-ospf-1]area 0
[r4-ospf-1-area-0.0.0.0]network 4.4.4.4 0.0.0.0
[r4-ospf-1-area-0.0.0.0]network 1.4.5.4 0.0.0.0

[r5]OSPF 1 router-id 5.5.5.5
[r5-ospf-1]area 0
[r5-ospf-1-area-0.0.0.0]network 1.1.1.1 0.0.0.0
[r5-ospf-1-area-0.0.0.0]network 1.4.5.5 0.0.0.0

9、查看关系:

 在星型1、2、3中只有dr:r1

网络测试:

2 - - - > 5

 1 - - - > 3

 

### OSPF Point-to-Multipoint Configuration with MGRE Tunneling Explanation and Setup Guide #### Understanding the Basics of OSPF Point-to-Multipoint Networks In a point-to-multipoint network type within OSPF, routers do not elect Designated Routers (DRs) or Backup Designated Routers (BDRs). Neighbors are established directly between endpoints. The default Hello interval is set to 30 seconds while the Dead interval stands at 120 seconds[^1]. This configuration simplifies neighbor establishment but requires careful planning when integrating advanced features like Multi-Point GRE tunnels. #### Introduction to Multi-Point GRE Tunnels Multi-Point GRE (mGRE) allows multiple remote sites to connect through a single virtual interface on an endpoint device without requiring individual physical interfaces for each connection. mGRE can significantly reduce complexity in hub-and-spoke topologies by enabling dynamic tunnel creation based on IPsec policies or other criteria. #### Combining OSPF Point-to-Multipoint Network Type with mGRE When combining these two technologies: - **Hub Router**: Configured as both ends of all spokes' mGRE sessions. - **Spoke Routers**: Each configured individually pointing back towards the central hub router's public address over which they will establish their respective mGRE session(s). The combination leverages OSPF’s ability to form adjacencies easily across non-broadcast multi-access networks such as those created via mGRE tunnels. It also benefits from OSPF's inherent support for point-to-multipoint configurations where DR/BDR elections aren't necessary due to direct adjacency formation among participating nodes. #### Example Configuration Steps for Hub Router Using Huawei CLI Syntax Below demonstrates how one might configure this scenario using commands similar to what would be found in a typical enterprise-grade environment provided by vendors like Huawei. ```shell # Enter system view mode system-view # Create loopback interface used for establishing mGRE connections interface LoopBack0 ip address 192.168.1.1 255.255.255.255 # Configure real Ethernet port that connects outside world interface GigabitEthernet0/0/1 ip address dhcp # Define mGRE template tunnel-template gre multipoint name mgre-tpl source-interface LoopBack0 destination any # Apply mGRE settings onto actual tunnel interface interface Tunnel0 undo ip address tunnel-protocol gre multipoint apply tunnel-template mgre-tpl ospf enable area 0 ``` For spoke routers, replace `source-interface` command under `tunnel-template` section accordingly depending upon local addressing scheme; ensure consistency throughout entire deployment regarding naming conventions applied here too. #### Verification Commands After Setup Completion Once completed successfully, verify operation status utilizing following instructions available inside most modern networking gear including models produced by companies mentioned earlier: ```shell display ospf peer brief # Check current state of OSPF peers display ip routing-table # Review learned routes after convergence has occurred ping -a <Source_IP> <Destination_IP> # Test reachability between different segments involved ``` --related questions-- 1. How does changing OSPF hello/dead timers affect stability in large-scale deployments? 2. What considerations should administrators take into account before implementing mGRE solutions? 3. Can you explain more about configuring OSPF route-id specifically for devices running OSPF protocol? 4. In what scenarios could deploying OSPF stub areas improve performance compared against standard ones?
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

.98℃

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

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

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

打赏作者

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

抵扣说明:

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

余额充值