基于MGRE的OSPF实验

实验题目要求如下:

 1.搭建拓扑图

2.对R1-R6进行IP地址配置

(1).R1:
[r1]int g 0/0/1
[r1-GigabitEthernet0/0/1]ip add 16.0.0.1 24
[r1-GigabitEthernet0/0/1]int g 0/0/0 
[r1-GigabitEthernet0/0/0]ip add 116.0.0.1 24
[r1-GigabitEthernet0/0/1]int l0
[r1-LoopBack0]ip add 192.168.1.1 24

(2).R2
[r2]int g 0/0/0
[r2-GigabitEthernet0/0/0]ip add 26.0.0.1 24
[r2-GigabitEthernet0/0/0]int LookBack 0
[r2-LoopBack0]ip add 192.168.2.1 24 

(3).R3

[r3]int g 0/0/0
[r3-GigabitEthernet0/0/0]ip add 36.0.0.1 24
[r3-GigabitEthernet0/0/0]int l0 
[r3-LoopBack0]ip add 192.168.3.1 24

(4).R4

[r4]int g 0/0/0
[r4-GigabitEthernet0/0/0]ip add 46.0.0.1 24
[r4-GigabitEthernet0/0/0]int l0
[r4-LoopBack0]ip add 192.168.4.1 24

(5).R5

[r5]int g 0/0/0
[r5-GigabitEthernet0/0/0]ip add 56.0.0.1 24
[r5-GigabitEthernet0/0/0]int l0
[r5-LoopBack0]ip add 192.168.5.1 24

(6).R6
[ISP]int g0/0/1
[ISP-GigabitEthernet0/0/1]ip add 16.0.0.2 24
Aug  4 2023 19:36:52-08:00 ISP %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
 on the interface GigabitEthernet0/0/1 has entered the UP state. 
[ISP-GigabitEthernet0/0/1]int g0/0/0
[ISP-GigabitEthernet0/0/0]ip add 116.0.0.2 24
Aug  4 2023 19:37:19-08:00 ISP %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
 on the interface GigabitEthernet0/0/0 has entered the UP state. 
[ISP-GigabitEthernet0/0/0]int g2/0/0
[ISP-GigabitEthernet2/0/0]ip add 26.0.0.2 24
Aug  4 2023 19:38:17-08:00 ISP %%01IFNET/4/LINK_STATE(l)[2]:The line protocol IP
 on the interface GigabitEthernet2/0/0 has entered the UP state. 
[ISP-GigabitEthernet2/0/0]int g3/0/0
[ISP-GigabitEthernet3/0/0]ip add 36.0.0.2 24
Aug  4 2023 19:38:37-08:00 ISP %%01IFNET/4/LINK_STATE(l)[3]:The line protocol IP
 on the interface GigabitEthernet3/0/0 has entered the UP state. 
[ISP-GigabitEthernet3/0/0]int g4/0/0
[ISP-GigabitEthernet4/0/0]ip add 46.0.0.2 24
Aug  4 2023 19:38:53-08:00 ISP %%01IFNET/4/LINK_STATE(l)[4]:The line protocol IP
 on the interface GigabitEthernet4/0/0 has entered the UP state. 
[ISP-GigabitEthernet4/0/0]int g0/0/2
[ISP-GigabitEthernet0/0/2]ip add 56.0.0.2 24
Aug  4 2023 19:39:11-08:00 ISP %%01IFNET/4/LINK_STATE(l)[5]:The line protocol IP
 on the interface GigabitEthernet0/0/2 has entered the UP state. 

3.给每个路由配置缺省,实现内网通

(6).R1

[r1]ip route-static 0.0.0.0 0 16.0.0.2
[r1]ip route-static 0.0.0.0 0 116.0.0.2 

(2).R2

[r2]ip route-static 0.0.0.0 0 26.0.0.2

(3).R3

[r3]ip route-static 0.0.0.0 0 36.0.0.2

(4).R4

[r4]ip route-static 0.0.0.0 0 46.0.0.2

(5).R5

[r5]ip route-static 0.0.0.0 0 56.0.0.2

4.搭建星型拓扑结构

(1).R1
[r1]int Tunnel 0/0/1
[r1-Tunnel0/0/1]ip add 7.7.7.1 24
[r1-Tunnel0/0/1]tunnel-protocol gre p2mp 
[r1-Tunnel0/0/1]source 16.0.0.1
Aug  4 2023 20:09:05-08:00 r1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface Tunnel0/0/1 has entered the UP state. 
[r1-Tunnel0/0/1]nhrp network-id 100
[r1-Tunnel0/0/1]nhrp entry multicast dynamic 

(2).R2   
[r2]int Tunnel 0/0/1
[r2-Tunnel0/0/1]ip add 7.7.7.2 24
[r2-Tunnel0/0/1]tunnel-protocol gre p2mp 
[r2-Tunnel0/0/1]source g0/0/0
Aug  4 2023 20:10:59-08:00 r2 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface Tunnel0/0/1 has entered the UP state. 
[r2-Tunnel0/0/1]nhrp network-id 100   
[r2-Tunnel0/0/1]nhrp entry 7.7.7.1 16.0.0.1 register 

(3).R3

[r3]int Tunnel 0/0/1
[r3-Tunnel0/0/1]ip add 7.7.7.3 24 
[r3-Tunnel0/0/1]tunnel-protocol gre p2mp 
[r3-Tunnel0/0/1]source g0/0/0
Aug  4 2023 20:12:44-08:00 r3 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface Tunnel0/0/1 has entered the UP state. 
[r3-Tunnel0/0/1]nhrp network-id 100 
[r3-Tunnel0/0/1]nhrp entry 7.7.7.1 16.0.0.1 register 

 5.搭建MGRE结构

(1).R1

[r1]int Tunnel 0/0/0
[r1-Tunnel0/0/0]ip add 6.6.6.1 24 
[r1-Tunnel0/0/0]tunnel-protocol gre p2mp   
[r1-Tunnel0/0/0]source 116.0.0.1  
[r1-Tunnel0/0/0]nhrp network-id 110 
[r1-Tunnel0/0/0]nhrp entry multicast dynamic   
[r1-Tunnel0/0/0]nhrp entry 6.6.6.2 46.0.0.1 register  
[r1-Tunnel0/0/0]nhrp entry 6.6.6.3 56.0.0.1 register  

(2).R4

[r4]int Tunnel 0/0/0
[r4-Tunnel0/0/0]ip add 6.6.6.2 24 
[r4-Tunnel0/0/0]tunnel-protocol gre p2mp 
[r4-Tunnel0/0/0]source 46.0.0.1
Aug  4 2023 20:02:55-08:00 r4 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface Tunnel0/0/0 has entered the UP state.  
[r4-Tunnel0/0/0]nhrp network-id 110  
[r4-Tunnel0/0/0]nhrp entry multicast  dynamic     
[r4-Tunnel0/0/0]nhrp entry 6.6.6.1 116.0.0.1 register 
Info: This peer protocol address conflicts with hub register peer protocol addre
ss. 
[r4-Tunnel0/0/0]nhrp entry 6.6.6.3 56.0.0.1 register 

(3). R5
[r5]int Tunnel 0/0/0
[r5-Tunnel0/0/0]ip add 6.6.6.3 24
[r5-Tunnel0/0/0]tunnel-protocol gre p2mp 
[r5-Tunnel0/0/0]source 56.0.0.1
Aug  4 2023 20:06:00-08:00 r5 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface Tunnel0/0/0 has entered the UP state. 
[r5-Tunnel0/0/0]nhrp network-id 110
[r5-Tunnel0/0/0]nhrp entry multicast dynamic   
[r5-Tunnel0/0/0]nhrp entry 6.6.6.1 116.0.0.1 register 
Info: This peer protocol address conflicts with hub register peer protocol addre
ss.   
[r5-Tunnel0/0/0]nhrp entry 6.6.6.2 46.0.0.1 register 

6.使用OSPF实现全网可达

并修改网络类型 

(1).R1:
[r1]ospf 1 router-id 1.1.1.11  
[r1-ospf-1]area 0    
[r1-ospf-1-area-0.0.0.0]network 7.7.7.0 0.0.0.255  
[r1-ospf-1-area-0.0.0.0]network 6.6.6.0 0.0.0.255 
[r1-ospf-1-area-0.0.0.0]network 192.168.1.0 0.0.0.255 
[r1]int Tunnel 0/0/1  
[r1-Tunnel0/0/1]ospf network-type p2mp  
[r1]int Tunnel 0/0/0
[r1-Tunnel0/0/0]ospf network-type broadcast  


(2).R2:
[r2]ospf 1 router-id 2.2.2.22    
[r2-ospf-1]area 0    
[r2-ospf-1-area-0.0.0.0]network 192.168.2.0 0.0.0.255   
[r2-ospf-1-area-0.0.0.0]network 7.7.7.0 0.0.0.255
[r2]int Tunnel 0/0/1
[r2-Tunnel0/0/1]ospf network-type p2mp  

(3).R3:
[r3]ospf 1 router-id 3.3.3.33
[r3-ospf-1]area 0
[r3-ospf-1-area-0.0.0.0]network 192.168.3.0 0.0.0.255
[r3-ospf-1-area-0.0.0.0]network 7.7.7.0 0.0.0.255
[r3]int Tunnel 0/0/1
[r3-Tunnel0/0/1]ospf network-type p2mp

(4).R4:
[r4]ospf 1 router-id 4.4.4.44
[r4-ospf-1]area 0
[r4-ospf-1-area-0.0.0.0]net 192.168.4.0 0.0.0.255
[r4-ospf-1-area-0.0.0.0]network 6.6.6.0 0.0.0.255
[r4]int Tunnel 0/0/0
[r4-Tunnel0/0/0]ospf network-type broadcast 

(5).R5:
[r5]ospf 1 router-id 5.5.5.55
[r5-ospf-1]area 0
[r5-ospf-1-area-0.0.0.0]network 192.168.5.0 0.0.0.255
[r5-ospf-1-area-0.0.0.0]network 6.6.6.0 0.0.0.255
[r5]int Tunnel 0/0/0
[r5-Tunnel0/0/0]ospf network-type broadcast 


7.测试

(1).R1

 (2).R2

 (3).R3

 

 

 

 

 


 

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值