OSPF下的MGRE实验

一、配置IP地址

R1

[r1-GigabitEthernet0/0/0]ip address 12.0.0.1 24
 [r1-GigabitEthernet0/0/1]ip address 22.0.0.1 24

回环地址:[r1-LoopBack0]ip address 192.168.1.1 24

缺省:[r1]ip route-static 0.0.0.0 0 12.0.0.2
[r1]ip route-static 0.0.0.0 0 22.0.0.2
R3

[r3-GigabitEthernet0/0/0]ip address 32.0.0.1 24

回环地址:[r3-LoopBack0]ip address 192.168.2.1 24

缺省:[r3]ip route-static 0.0.0.0 0 32.0.0.2、

R4

[r4-GigabitEthernet0/0/0]ip address 42.0.0.1 24
回环地址:[r4-LoopBack0]ip address 192.168.3.1 24

缺省:[r4]ip route-static 0.0.0.0 0 42.0.0.2

R5

[r5-GigabitEthernet0/0/0]ip address 52.0.0.1 24

回环地址:[r5-LoopBack0]ip address 192.168.4.1 24

缺省:[r5]ip route-static 0.0.0.0 0 52.0.0.2

R6

[r6-GigabitEthernet0/0/0]ip address 65.0.0.1 25
回环地址:[r6-LoopBack0]ip address 192.168.5.1 24
缺省:[r6]ip route-static 0.0.0.0 0 62.0.0.2

ISP

[isp-GigabitEthernet0/0/0]ip address 12.0.0.2 24
[isp-GigabitEthernet0/0/1]ip address 22.0.0.2 24
[isp-GigabitEthernet0/0/2]ip address 32.0.0.2 24
[isp-GigabitEthernet4/0/0]ip address 42.0.0.2 24

[isp-GigabitEthernet4/0/1]ip address 52.0.0.2 24

[isp-GigabitEthernet4/0/2]ip address 62.0.0.2 24

回环地址:[isp-LoopBack0]ip address 100.0.0.1 24

二、R1-R5-R6建立hub-spoke的MGRE环境,其中R1为中心

R1

 [r1-Tunnel0/0/0]ip address 192.168.6.1 24
 [r1-Tunnel0/0/0]tunnel-protocol gre p2mp 
 [r1-Tunnel0/0/0]source 12.0.0.1
 [r1-Tunnel0/0/0]nhrp network-id 100

R5
[r5-Tunnel0/0/0]ip address 192.168.6.2 24
[r5-Tunnel0/0/0]tunnel-protocol gre p2mp 
[r5-Tunnel0/0/0]source GigabitEthernet 0/0/0
[r5-Tunnel0/0/0]nhrp network-id 100 
[r5-Tunnel0/0/0]nhrp entry 192.168.6.1 12.0.0.1 register 

R6

[r6-Tunnel0/0/0]ip address 192.168.6.3 24  
[r6-Tunnel0/0/0]tunnel-protocol gre p2mp   
[r6-Tunnel0/0/0]source GigabitEthernet 0/0/0 
[r6-Tunnel0/0/0]nhrp network-id 100  
[r6-Tunnel0/0/0]nhrp entry 192.168.6.1 12.0.0.1 register 

三、建立全连的MGRE环境

R1

[r1-Tunnel0/0/1]ip address 192.168.7.1 24
[r1-Tunnel0/0/1]tunnel-protocol gre p2mp 
[r1-Tunnel0/0/1]source 22.0.0.1   
[r1-Tunnel0/0/1]nhrp network-id 200 

[r1-Tunnel0/0/1]nhrp entry 192.168.7.2 32.0.0.1 register    
[r1-Tunnel0/0/1]nhrp entry 192.168.7.3 42.0.0.1 register 

R3

[r3-Tunnel0/0/1]ip address 192.168.7.2 24  
[r3-Tunnel0/0/1]tunnel-protocol gre p2mp    
[r3-Tunnel0/0/1]source g0/0/0
[r3-Tunnel0/0/1]nhrp network-id 200  
[r3-Tunnel0/0/1]nhrp entry 192.168.7.3 42.0.0.1 register   
[r3-Tunnel0/0/1]nhrp entry 192.168.7.1 22.0.0.1 register 
R4

[r4-Tunnel0/0/1]ip address 192.168.7.3 24 
[r4-Tunnel0/0/1]tunnel-protocol gre p2mp 
[r4-Tunnel0/0/1]source g0/0/0
[r4-Tunnel0/0/1]nhrp network-id 200
[r4-Tunnel0/0/1]nhrp entry 192.168.7.1 22.0.0.1 register 
[r4-Tunnel0/0/1]nhrp entry 192.168.7.2 32.0.0.1 register

四、验证

 

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值