要求:
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.如图运行路由协议
3.1 R1 -R2 -R3之间使用MGRE网络,为hub-spoke 网络结构,R1为hub端 ,
部署OSPF网络,MGRE修改为BMA网络类型
3.2 R2-R3之间启用PPP pap 单项认证 , R3-R4之间启用PPP的chap双向认证
4.area 1 区域不得出现4.5类LSA
5.其他区域优先通过R3访问R1 三个环回接口
6.尽量减少路由条目数量
7.area 1 区域增加安全性
8.全网可达
过程:
1.规划IP地址,创建环回
按照各路由器名之间规划IP地址,创建各自的环回,其中R1、R5、R7创建额外的环回。
R1
[R1]int g 0/0/0
[R1-GigabitEthernet0/0/0]ip add 18.1.1.1 24
Aug 13 2024 22:14:50-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]q
[R1]int l 0
[R1-LoopBack0]ip add 1.1.1.1 24
[R1-LoopBack0]int l 1
[R1-LoopBack1]ip add 201.1.1.1 24
[R1-LoopBack1]int l 2
[R1-LoopBack2]ip add 201.1.2.1 24
[R1-LoopBack2]int l 3
[R1-LoopBack3]ip add 201.1.3.1 24
[R1]display ip int brief
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 6
The number of interface that is DOWN in Physical is 2
The number of interface that is UP in Protocol is 6
The number of interface that is DOWN in Protocol is 2
Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 18.1.1.1/24 up up
GigabitEthernet0/0/1 unassigned down down
GigabitEthernet0/0/2 unassigned down down
LoopBack0 1.1.1.1/24 up up(s)
LoopBack1 201.1.1.1/24 up up(s)
LoopBack2 201.1.2.1/24 up up(s)
LoopBack3 201.1.3.1/24 up up(s)
NULL0 unassigned up up(s)
R2
[R2]int l 0
[R2-LoopBack0]ip add 2.2.2.2 24
[R2-LoopBack0]int g 0/0/0
[R2-GigabitEthernet0/0/0]ip add 28.1.1.1 24
[R2-GigabitEthernet0/0/0]int s 4/0/0
[R2-Serial4/0/0]ip add 24.1.1.1 24
[R2]display ip int brief
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 4
The number of interface that is DOWN in Physical is 3
The number of interface that is UP in Protocol is 4
The number of interface that is DOWN in Protocol is 3
Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 28.1.1.1/24 up up
GigabitEthernet0/0/1 unassigned down down
GigabitEthernet0/0/2 unassigned down down
LoopBack0 2.2.2.2/24 up up(s)
NULL0 unassigned up up(s)
Serial4/0/0 24.1.1.1/24 up up
Serial4/0/1 unassigned down down
R3
[R3]int l 0
[R3-LoopBack0]ip add 3.3.3.3 24
[R3-LoopBack0]int g 0/0/0
[R3-GigabitEthernet0/0/0]ip add 38.1.1.1 24
[R3-GigabitEthernet0/0/0]int s 4/0/1
[R3-Serial4/0/0]ip add 34.1.1.1 24
[R3]display ip int brief
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 4
The number of interface that is DOWN in Physical is 3
The number of interface that is UP in Protocol is 4
The number of interface that is DOWN in Protocol is 3
Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 38.1.1.1/24 up up
GigabitEthernet0/0/1 unassigned down down
GigabitEthernet0/0/2 unassigned down down
LoopBack0 3.3.3.3/24 up up(s)
NULL0 unassigned up up(s)
Serial4/0/0 34.1.1.1/24 up up
Serial4/0/1 unassigned down down
R4
[R4]int g 0/0/0
[R4-GigabitEthernet0/0/0]ip add 45.1.1.1 24
[R4-GigabitEthernet0/0/0]int g 0/0/1
[R4-GigabitEthernet0/0/1]ip add 46.1.1.1 24
[R4-GigabitEthernet0/0/1]int l 0
[R4-LoopBack0]ip add 4.4.4.4 24
[R4-LoopBack0]int s 4/0/0
[R4-Serial4/0/0]ip add 24.1.1.2 24
[R4-Serial4/0/0]int s 4/0/1
[R4-Serial4/0/1]ip add 34.1.1.2 24
[R4]display ip int brief
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 6
The number of interface that is DOWN in Physical is 1
The number of interface that is UP in Protocol is 6
The number of interface that is DOWN in Protocol is 1
Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 45.1.1.1/24 up up
GigabitEthernet0/0/1 46.1.1.1/24 up up
GigabitEthernet0/0/2 unassigned down down
LoopBack0 4.4.4.4/24 up up(s)
NULL0 unassigned up up(s)
Serial4/0/0 24.1.1.2/24 up up
Serial4/0/1 34.1.1.2/24 up up
R5
[R5]int l 0
[R5-LoopBack0]ip add 5.5.5.5 24
[R5-LoopBack0]int g 0/0/1
[R5-GigabitEthernet0/0/1]ip add 45.1.1.2 24
[R5]int l 1
[R5-LoopBack1]ip add 202.1.1.1 24
[R5-LoopBack1]int l 2
[R5-LoopBack2]ip add 202.1.2.1 24
[R5-LoopBack2]int l 3
[R5-LoopBack3]ip add 202.1.3.1 24
[R5]display ip int brief
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 6
The number of interface that is DOWN in Physical is 2
The number of interface that is UP in Protocol is 5
The number of interface that is DOWN in Protocol is 3
Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 unassigned up down
GigabitEthernet0/0/1 45.1.1.2/24 down down
GigabitEthernet0/0/2 unassigned down down
LoopBack0 5.5.5.5/24 up up(s)
LoopBack1 202.1.1.1/24 up up(s)
LoopBack2 202.1.2.1/24 up up(s)
LoopBack3 202.1.3.1/24 up up(s)
NULL0 unassigned up up(s)
R6
[R6]int l 0
[R6-LoopBack0]ip add 6.6.6.6 24
[R6-LoopBack0]int g 0/0/1
[R6-GigabitEthernet0/0/1]ip add 46.1.1.2 24
[R6-GigabitEthernet0/0/1]int g 0/0/0
[R6-GigabitEthernet0/0/0]ip add 67.1.1.2 24
R7
[R7]int g 0/0/0
[R7-GigabitEthernet0/0/0]ip add 67.1.1.2 24
[R7-LoopBack0]ip add 7.7.7.7 24
[R7-LoopBack0]int l 1
[R7-LoopBack1]ip add 203.1.1.1 24
[R7-LoopBack1]int l 2
[R7-LoopBack2]ip add 203.1.2.1 24
[R7-LoopBack2]int l 3
[R7-LoopBack3]ip add 203.1.3.1 24
[R7]display ip int brief
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 6
The number of interface that is DOWN in Physical is 2
The number of interface that is UP in Protocol is 6
The number of interface that is DOWN in Protocol is 2
Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 67.1.1.2/24 up up
GigabitEthernet0/0/1 unassigned down down
GigabitEthernet0/0/2 unassigned down down
LoopBack0 7.7.7.7/24 up up(s)
LoopBack1 203.1.1.1/24 up up(s)
LoopBack2 203.1.2.1/24 up up(s)
LoopBack3 203.1.3.1/24 up up(s)
NULL0 unassigned up up(s)
R8
[R8]int g 0/0/0
[R8-GigabitEthernet0/0/0]ip add 18.1.1.2 24
[R8-GigabitEthernet0/0/0]int g 0/0/1
[R8-GigabitEthernet0/0/1]ip add 28.1.1.2 24
[R8-GigabitEthernet0/0/1]int g 0/0/2
[R8-GigabitEthernet0/0/2]ip add 38.1.1.2 24
[R8-GigabitEthernet0/0/2]int l 0
[R8-LoopBack0]ip add 8.8.8.8 24
[R8]display ip int brief
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 5
The number of interface that is DOWN in Physical is 0
The number of interface that is UP in Protocol is 5
The number of interface that is DOWN in Protocol is 0
Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 18.1.1.2/24 up up
GigabitEthernet0/0/1 28.1.1.2/24 up up
GigabitEthernet0/0/2 38.1.1.2/24 up up
LoopBack0 8.8.8.8/24 up up(s)
NULL0 unassigned up up(s)
2.建立缺省路由
[R1]ip route-static 0.0.0.0 0 18.1.1.2
[R2]ip route-static 0.0.0.0 0 28.1.1.2
[R3]ip route-static 0.0.0.0 0 38.1.1.2
3.MGRE
R1、R2、R3之间做MGRE,R1为hub,R2、R3为spoke
1.R1(Hub)配置
[R1-Tunnel0/0/0]t g p2mp
[R1-Tunnel0/0/0]s 18.1.1.1
[R1-Tunnel0/0/0]n n 100
[R1-Tunnel0/0/0]nhrp entry m dynamic
[R1-Tunnel0/0/0]ip add 100.1.1.1 24
2.R2(Hub)配置
[R2-Tunnel0/0/0]tunnel-protocol gre p2mp
[R2-Tunnel0/0/0]source 28.1.1.1
[R2-Tunnel0/0/0]nhrp network-id 100
[R2-Tunnel0/0/0]nhrp entry 100.1.1.1 18.1.1.1 register
[R2-Tunnel0/0/0]ip add 100.1.1.2 24
[R2-GigabitEthernet0/0/0]ospf dr-priority 0
3.R3(Hub)配置
[R3]int t 0/0/0
[R3-Tunnel0/0/0]tunnel-protocol gre p2mp
[R3-Tunnel0/0/0]source 38.1.1.1
[R3-Tunnel0/0/0]nhrp network-id 100
[R3-Tunnel0/0/0]nhrp entry 100.1.1.1 18.1.1.1 register
[R3-Tunnel0/0/0]ip add 100.1.1.3 24
[R3-GigabitEthernet0/0/0]ospf dr-priority 0
4.NHRP的邻居信息
5.MGRE修改为BMA网络类型
[R1-Tunnel0/0/0]ospf network-type broadcast
4.ospf
R1
[R1]ospf 100 router-id 91.1.1.1
[R1-ospf-100]area 0.0.0.0
[R1-ospf-100-area-0.0.0.0]network 1.1.1.1 0.0.0.0
[R1-ospf-100-area-0.0.0.0]network 201.1.0.0 0.0.255.255
[R1-ospf-100]q
[R1]int l 0
[R1-LoopBack0]ospf network-type broadcast
[R1-LoopBack0]int l 1
[R1-LoopBack1]ospf network-type broadcast
[R1-LoopBack1]int l 2
[R1-LoopBack2]ospf network-type broadcast
[R1-LoopBack2]int l 3
[R1-LoopBack3]ospf network-type broadcast
R2
[R2]ospf 100 router-id 92.2.2.2
[R2-ospf-100]area 0.0.0.0
[R2-ospf-100-area-0.0.0.0]network 100.1.1.2 0.0.0.0
[R2-ospf-100]area 1
[R2-ospf-100-area-0.0.0.1]network 2.2.2.2 0.0.0.0
[R2-ospf-100-area-0.0.0.1]network 24.1.1.1 0.0.0.0
[R2]int l 0
[R2-LoopBack0]ospf network-type broadcast
R3
[R3]ospf 100 router-id 93.3.3.3
[R3-ospf-100]area 0.0.0.0
[R3-ospf-100-area-0.0.0.0]network 100.1.1.3 0.0.0.0
[R3-ospf-100-area-0.0.0.1]network 3.3.3.3 0.0.0.0
[R3-ospf-100-area-0.0.0.1]network 34.1.1.1 0.0.0.0
[R3]int l 0
[R3-LoopBack0]ospf network-type broadcast
R4
[R4]ospf 100 router-id 94.4.4.4
[R4-ospf-100]area 0.0.0.1
[R4-ospf-100-area-0.0.0.1]network 24.1.1.2 0.0.0.0
[R4-ospf-100-area-0.0.0.1]network 4.4.4.4 0.0.0.0
[R4-ospf-100-area-0.0.0.1]area 0.0.0.2
[R4-ospf-100-area-0.0.0.2]network 46.1.1.1 0.0.0.0
[R4]int l 0
[R4-LoopBack0]ospf network-type broadcast
[R4-LoopBack0]rip 200
[R4-rip-200]ver 2
[R4-rip-200]network 45.0.0.0
R5
[R5]rip 200
[R5-rip-200]ver 2
[R5-rip-200]network 202.1.1.0
[R5-rip-200]network 202.1.2.0
[R5-rip-200]network 202.1.3.0
[R5-rip-200]network 5.0.0.0
[R5-rip-200]network 45.0.0.0
R6
[R6]ospf 100 router-id 96.6.6.6
[R6-ospf-100]area 0.0.0.2
[R6-ospf-100-area-0.0.0.2]network 46.1.1.2 0.0.0.0
[R6-ospf-100-area-0.0.0.2]network 6.6.6.6 0.0.0.0
[R6]int l 0
[R6-LoopBack0]ospf network-type broadcast
[R6]rip 100
[R6-rip-100]ver 2
[R6-rip-100]network 67.0.0.0
R7
[R7]rip 100
[R7-rip-100]ver 2
[R7-rip-100]network 7.0.0.0
[R7-rip-100]network 67.0.0.0
[R7-rip-100]network 203.1.1.0
[R7-rip-100]network 203.1.2.0
[R7-rip-100]network 203.1.3.0
5.PPP pap
R2
[R2-Serial4/0/0]dis this
[V200R003C00]
#
interface Serial4/0/0
link-protocol ppp
ppp authentication-mode pap
ip address 24.1.1.1 255.255.255.0
#
return
[R2-Serial4/0/0]q
[R2]aaa
[R2-aaa]local-user huawei password cipher 1234
Info: Add a new user.
[R2-aaa]local-user huawei service-type ppp
[R2-aaa]local-user huawei privilege level ?
INTEGER<0-15> Level value
[R2-aaa]local-user huawei privilege level 15
R3
[R3]int s 4/0/0
[R3-Serial4/0/0]ppp pap local-use huawei password cipher 1234
[R3-Serial4/0/0]ppp authentication-mode chap
[R3-Serial4/0/0]ppp chap user admin
[R3-Serial4/0/0]q
[R3]aaa
[R3-aaa]local-user aaa password cipher 12345
[R3-aaa]local-user aaa service-type ppp
R4
[R4-Serial4/0/1]ppp chap user aaa
[R4]aaa
[R4-aaa]local-user aaa password cipher 12345
[R4-aaa]local-user aaa service ppp
6.area 1 区域不得出现4.5类LSA
[R2-ospf-100-area-0.0.0.1]nssa
[R3-ospf-100-area-0.0.0.1]nssa
[R4-ospf-100-area-0.0.0.1]nssa
7.其他区域优先通过R3访问R1 三个环回接口
R2
[R2-ospf-100-area-0.0.0.0]abr-summary 201.1.0.0 255.255.255.0 cost 100
[R2]int t 0/0/1
[R2-Tunnel0/0/1]ip add 42.1.1.1 24
[R2-Tunnel0/0/1]tunnel-protocol gre
[R2-Tunnel0/0/1]source 2.2.2.2
[R2-Tunnel0/0/1]destination 4.4.4.4
R4
[R4]int t 0/0/1
[R4-Tunnel0/0/1]ip add 42.1.1.2 24
[R4-Tunnel0/0/1]tunnel-protocol gre
[R4-Tunnel0/0/1]source 4.4.4.4
[R4-Tunnel0/0/1]destination 2.2.2.2
[R4-Tunnel0/0/1]int t 0/0/2
[R4-Tunnel0/0/2]ip add 43.1.1.2 24
[R4-Tunnel0/0/2]tunnel-protocol gre
[R4-Tunnel0/0/2]source 4.4.4.4
[R4-Tunnel0/0/2]destination 3.3.3.3
[R4]ospf 100
[R4-ospf-100]area 0
[R4-ospf-100-area-0.0.0.0]network 43.1.1.2 0.0.0.0
R3
[R3]int t 0/0/2
[R3-Tunnel0/0/2]tunnel-protocol gre
[R3-Tunnel0/0/2]ip add 43.1.1.1 24
[R3-Tunnel0/0/2]source 3.3.3.3
[R3-Tunnel0/0/2]destination 4.4.4.4
[R3]ospf 100
[R3-ospf-100]area 0
[R3-ospf-100-area-0.0.0.0]abr-summary 201.1.0.0 255.255.255.0 cost 50
8.area 1 区域增加安全性
[R4-ospf-100-area-0.0.0.1]authentication-mode simple huawei
[R3-ospf-100-area-0.0.0.1]authentication-mode simple huawei
[R2-ospf-100-area-0.0.0.1]authentication-mode simple huawei