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.全网可达
地址规划
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的邻居信息
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.
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 1
[R4-ospf-100-area-0.0.0.1]au
[R4-ospf-100-area-0.0.0.1]authentication-mode md5 1 ci
[R4-ospf-100-area-0.0.0.1]authentication-mode md5 1 cipher huawei
[R4-ospf-100-area-0.0.0.1]authentication-mode simple huawei[R3-ospf-100]area 1
[R3-ospf-100-area-0.0.0.1]au
[R3-ospf-100-area-0.0.0.1]authentication-mode md5 1 ci
[R3-ospf-100-area-0.0.0.1]authentication-mode md5 1 cipher huawei
[R3-ospf-100-area-0.0.0.1]authentication-mode simple huawei[R2-ospf-100]area 1
[R2-ospf-100-area-0.0.0.1]au
[R2-ospf-100-area-0.0.0.1]authentication-mode md5 1 ci
[R2-ospf-100-area-0.0.0.1]authentication-mode md5 1 cipher huawei