Java教程

2021-07-31

本文主要是介绍2021-07-31,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

实验要求:
1.如图连接,合理规划IP地址,所有路由器各自创建一个loopback接口
2.R1再创建三个接口IP地址为201.1.1.1/24、201.1.2.1/24、201.1.3.1/24
R5再创建三个接口IP地址为202.1.1.1/24、202.1.2.1/24、202.1.3.1/24
R7再创建三个接口IP地址为203.1.1.1/24、203.1.2.1/24、203.1.3.1/24
3.如图运行路由协议
R1 -R2 -R3之间使用MGRE网络,为hub-spoke 网络结构,R1为hub端 ,
部署OSPF网络,MGRE修改为BMA网络类型
4.area 1 区域不得出现4.5类LSA
5.其他区域优先通过R3访问R1 三个环回接口
6.尽量减少路由条目数量
7.area 1 区域增加安全性
8.全网可达

一、拓扑如图: 

二、各个路由器进行接口配置:

R1:

<Huawei>
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys R1
[R1]int l0
[R1-LoopBack0]ip add 1.1.1.1 24
[R1-LoopBack0]int l1
[R1-LoopBack1]ip add 201.1.1.1 24
[R1-LoopBack1]int l2
[R1-LoopBack2]ip add 201.1.2.1 24
[R1-LoopBack2]int l3
[R1-LoopBack3]ip add 201.1.3.1 24
[R1-LoopBack3]int g0/0/0
[R1-GigabitEthernet0/0/0]ip add 18.1.1.1 24
Jul 31 2021 18:55:18-08:00 R1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 
[R1-GigabitEthernet0/0/0]

R2:

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys R2
[R2]int l0
[R2-LoopBack0]ip add 2.2.2.2 24
[R2-LoopBack0]int g0/0/1
[R2-GigabitEthernet0/0/1]ip add 28.1.1.1 24
Jul 31 2021 18:59:28-08:00 R2 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/1 has entered the UP state. 
[R2-GigabitEthernet0/0/1]int g0/0/0
[R2-GigabitEthernet0/0/0]ip add 24.1.1.1 24
Jul 31 2021 19:00:01-08:00 R2 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 
[R2-GigabitEthernet0/0/0]
R3:


<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys R3
[R3]int l0
[R3-LoopBack0]ip add 3.3.3.3 24
[R3-LoopBack0]int g0/0/2
[R3-GigabitEthernet0/0/2]ip add 38.1.1.1 24
Jul 31 2021 19:00:58-08:00 R3 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/2 has entered the UP state. 
[R3-GigabitEthernet0/0/2]int g0/0/0
[R3-GigabitEthernet0/0/0]ip add 34.1.1.1 24
Jul 31 2021 19:01:12-08:00 R3 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 
[R3-GigabitEthernet0/0/0]
R4:


<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys R4
[R4]int l0
[R4-LoopBack0]ip add 4.4.4.4 24
[R4-LoopBack0]int g0/0/1
[R4-GigabitEthernet0/0/1]ip add 24.1.1.2 24
Jul 31 2021 19:01:49-08:00 R4 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/1 has entered the UP state. 
[R4-GigabitEthernet0/0/1]int g0/0/2
[R4-GigabitEthernet0/0/2]ip add 34.1.1.2 24
Jul 31 2021 19:02:01-08:00 R4 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP 
on the interface GigabitEthernet0/0/2 has entered the UP state. 
[R4-GigabitEthernet0/0/2]int g0/0/0
[R4-GigabitEthernet0/0/0]ip add 45.1.1.1 24
[R4-GigabitEthernet0/0/0]
Jul 31 2021 19:02:20-08:00 R4 %%01IFNET/4/LINK_STATE(l)[2]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 
[R4-GigabitEthernet0/0/0]int g3/0/0
[R4-GigabitEthernet3/0/0]ip add 46.1.1.1 24
Jul 31 2021 19:02:34-08:00 R4 %%01IFNET/4/LINK_STATE(l)[3]:The line protocol IP 
on the interface GigabitEthernet3/0/0 has entered the UP state. 
[R4-GigabitEthernet3/0/0]
R5:


<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys R5
[R5]int l0
[R5-LoopBack0]ip add 5.5.5.5 24
[R5-LoopBack0]int l1
[R5-LoopBack1]ip add 202.1.1.1 24
[R5-LoopBack1]int l2
[R5-LoopBack2]ip add 202.1.2.1 24
[R5-LoopBack2]int l3
[R5-LoopBack3]ip add 202.1.3.1 24
[R5-LoopBack3]int g0/0/1
[R5-GigabitEthernet0/0/1]ip add 45.1.1.2 24
Jul 31 2021 19:03:44-08:00 R5 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/1 has entered the UP state. 
[R5-GigabitEthernet0/0/1]
R6:


<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys R6
[R6]int l0
[R6-LoopBack0]ip add 6.6.6.6 24
[R6-LoopBack0]int g0/0/1
[R6-GigabitEthernet0/0/1]ip add 46.1.1.2 24
Jul 31 2021 19:04:28-08:00 R6 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/1 has entered the UP state. 
[R6-GigabitEthernet0/0/1]int g0/0/0
[R6-GigabitEthernet0/0/0]ip add 67.1.1.1 24
Jul 31 2021 19:04:41-08:00 R6 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 
[R6-GigabitEthernet0/0/0]
R7:


<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys R7
[R7]int l0
[R7-LoopBack0]ip add 7.7.7.7 24
[R7-LoopBack0]int l1
[R7-LoopBack1]ip add 203.1.1.1 24
[R7-LoopBack1]int l1
[R7-LoopBack1]ip add 203.1.2.1 24
[R7-LoopBack1]int l2
[R7-LoopBack2]ip add 203.1.3.1 24
[R7-LoopBack2]int g0/0/1
[R7-GigabitEthernet0/0/1]ip add 67.1.1.2 24
Jul 31 2021 19:06:01-08:00 R7 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/1 has entered the UP state. 
[R7-GigabitEthernet0/0/1]
R8:


<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys ISP
[ISP]int g0/0/0
[ISP-GigabitEthernet0/0/0]ip add 18.1.1.2 24
Jul 31 2021 19:09:25-08:00 ISP %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
 on the interface GigabitEthernet0/0/0 has entered the UP state. 
[ISP-GigabitEthernet0/0/0]int g0/0/1
[ISP-GigabitEthernet0/0/1]ip add 28.1.1.2 24
Jul 31 2021 19:09:35-08:00 ISP %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
 on the interface GigabitEthernet0/0/1 has entered the UP state. 
[ISP-GigabitEthernet0/0/1]
[ISP-GigabitEthernet0/0/1]int g0/0/2
[ISP-GigabitEthernet0/0/2]ip add 38.1.1.2 24
[ISP-GigabitEthernet0/0/2]
Jul 31 2021 19:09:45-08:00 ISP %%01IFNET/4/LINK_STATE(l)[2]:The line protocol IP
 on the interface GigabitEthernet0/0/2 has entered the UP state. 
[ISP-GigabitEthernet0/0/2]

二、运行相关的路由协议

R1:


<R1>sys
Enter system view, return user view with Ctrl+Z.
[R1]ospf 100 ro 91.1.1.1
[R1-ospf-100]area 0
[R1-ospf-100-area-0.0.0.0]net 1.1.1.1 0.0.0.0
[R1-ospf-100-area-0.0.0.0]net 201.1.1.1 0.0.0.0
[R1-ospf-100-area-0.0.0.0]net 201.1.2.1 0.0.0.0
[R1-ospf-100-area-0.0.0.0]net 201.1.3.1 0.0.0.0
[R1-ospf-100-area-0.0.0.0]net 18.1.1.1 0.0.0.0
[R1-ospf-100-area-0.0.0.0]
R2:


<R2>sys
Enter system view, return user view with Ctrl+Z.
[R2]ospf 100 ro 92.2.2.2
[R2-ospf-100]area 0
[R2-ospf-100-area-0.0.0.0]net 2.2.2.2 0.0.0.0
[R2-ospf-100-area-0.0.0.0]net 28.1.1.1 0.0.0.0
[R2-ospf-100-area-0.0.0.0]area 1
[R2-ospf-100-area-0.0.0.1]net 24.1.1.1 0.0.0.0
[R2-ospf-100-area-0.0.0.1]
R3:


<R3>sys
Enter system view, return user view with Ctrl+Z.
[R3]ospf 100 ro 93.3.3.3
[R3-ospf-100]area 0
[R3-ospf-100-area-0.0.0.0]net 3.3.3.3 0.0.0.0
[R3-ospf-100-area-0.0.0.0]net 38.1.1.1 0.0.0.0
[R3-ospf-100-area-0.0.0.0]area 1
[R3-ospf-100-area-0.0.0.1]net 34.1.1.1 0.0.0.0
[R3-ospf-100-area-0.0.0.1]
R4:

<R4>sys
Enter system view, return user view with Ctrl+Z.
[R4]ospf 100 ro 94.4.4.4
[R4-ospf-100]area 1
[R4-ospf-100-area-0.0.0.1]net 24.1.1.2 0.0.0.0
[R4-ospf-100-area-0.0.0.1]net 34.1.1.2 0.0.0.0
[R4-ospf-100-area-0.0.0.1]net 4.4.4.4 0.0.0.0
[R4-ospf-100-area-0.0.0.1]area 2
[R4-ospf-100-area-0.0.0.2]net 46.1.1.1 0.0.0.0
[R4-ospf-100-area-0.0.0.2]rip 200
[R4-rip-200]ver 2
[R4-rip-200]net 45.0.0.0
[R4-rip-200]ospf 100
[R4-ospf-100]im	
[R4-ospf-100]import-route r	
[R4-ospf-100]import-route rip 200
[R4-ospf-100]rip 200
[R4-rip-200]im	
[R4-rip-200]import-route o	
[R4-rip-200]import-route ospf 100
[R4-rip-200]
R5:


<R5>sys
Enter system view, return user view with Ctrl+Z.
[R5]rip 200
[R5-rip-200]ver 2
[R5-rip-200]net 5.0.0.0
[R5-rip-200]undo net 202.1.1.0
[R5-rip-200]net 202.1.0.0
[R5-rip-200]net 45.0.0.0
[R5-rip-200]
R6:


<R6>sys
Enter system view, return user view with Ctrl+Z.
[R6]ospf 100 ro 96.6.6.6
[R6-ospf-100]area 2
[R6-ospf-100-area-0.0.0.2]net 46.1.1.2 0.0.0.0
[R6-ospf-100-area-0.0.0.2]net 6.6.6.6 0.0.0.0
[R6-ospf-100-area-0.0.0.2]rip 100
[R6-rip-100]ver 2
[R6-rip-100]net 67.0.0.0
[R6-rip-100]ospf 100
[R6-ospf-100]im	
[R6-ospf-100]import-route r	
[R6-ospf-100]import-route rip 100
[R6-ospf-100]rip 100
[R6-rip-100]im	
[R6-rip-100]import-route o	
[R6-rip-100]import-route ospf 100
[R6-rip-100]
R7:


<R7>sys
Enter system view, return user view with Ctrl+Z.
[R7]rip 100
[R7-rip-100]ver 2
[R7-rip-100]net 7.0.0.0 
[R7-rip-100]net 203.1.0.0
[R7-rip-100]net 67.0.0.0
[R7-rip-100]
R8:


<ISP>sys
Enter system view, return user view with Ctrl+Z.
[ISP]ospf 100 ro 98.8.8.8
[ISP-ospf-100]area 0 
[ISP-ospf-100-area-0.0.0.0]net 18.1.1.2 0.0.0.0
[ISP-ospf-100-area-0.0.0.0]net 28.1.1.2 0.0.0.0
[ISP-ospf-100-area-0.0.0.0]net 38.1.1.2 0.0.0.0
[ISP-ospf-100-area-0.0.0.0]

 三、R1 -R2 -R3之间使用MGRE网络,为hub-spoke 网络结构,R1为hub端 ,
部署OSPF网络,MGRE修改为BMA网络类型

R1:


<R1>sys
Enter system view, return user view with Ctrl+Z.
[R1]int t0/0/0
[R1-Tunnel0/0/0]ip add 10.1.1.1 24
[R1-Tunnel0/0/0]tunnel-protocol gre p	
[R1-Tunnel0/0/0]tunnel-protocol gre p2mp 	
[R1-Tunnel0/0/0]source 18.1.1.1
Jul 31 2021 19:39:19-08:00 R1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface Tunnel0/0/0 has entered the UP state. 
[R1-Tunnel0/0/0]nhrp entry multicast dynamic 
[R1-Tunnel0/0/0]nhrp  network-id 100
[R1-Tunnel0/0/0]
R2:


<R2>sys
Enter system view, return user view with Ctrl+Z.
[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 28.1.1.1
Jul 31 2021 19:41:03-08:00 R2 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface Tunnel0/0/0 has entered the UP state. 
[R2-Tunnel0/0/0]nhrp network-id 100
[R2-Tunnel0/0/0]nhrp entry 10.1.1.1 18.1.1.1 register 
[R2-Tunnel0/0/0]
R3:


<R3>sys
Enter system view, return user view with Ctrl+Z.
[R3]int t0/0/0	
[R3-Tunnel0/0/0]tunnel-protocol gre p2mp 
[R3-Tunnel0/0/0]ip add 10.1.1.3 24
[R3-Tunnel0/0/0]source 38.1.1.1
Jul 31 2021 19:42:44-08:00 R3 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface Tunnel0/0/0 has entered the UP state. 
[R3-Tunnel0/0/0]nhrp network-id 100
[R3-Tunnel0/0/0]nhrp entry 10.1.1.1 18.1.1.1 register 
[R3-Tunnel0/0/0]

如图:

 

 

 四、area 1 区域不得出现4.5类LSA

R4:


<R4>sys
Enter system view, return user view with Ctrl+Z.
[R4]ospf 100
[R4-ospf-100]area 1
[R4-ospf-100-area-0.0.0.1]st	
[R4-ospf-100-area-0.0.0.1]stub 





R3:



[R3]ospf 100
[R3-ospf-100]area 1
[R3-ospf-100-area-0.0.0.1]st	
[R3-ospf-100-area-0.0.0.1]stub 
[R3-ospf-100-area-0.0.0.1]
R2:


[R2]
[R2]ospf 100
[R2-ospf-100]area 1
[R2-ospf-100-area-0.0.0.1]stu
[R2-ospf-100-area-0.0.0.1]

这篇关于2021-07-31的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!