根据题目和要求完成下列任务:
要求:
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网络类型
R2-R3之间启用ppp的pap单向认证,R3-R4启用ppp的chap双向认证
4.area 1 区域不得出现4.5类LSA
5.其他区域优先通过R3访问R1 三个环回接口
6.尽量减少路由条目数量
7.area 1 区域增加安全性
8.全网可达
1.搭建实验拓扑图:
2.基础配置:
R1:
[R1]interface g0/0/0
[R1-GigabitEthernet0/0/0]ip address 18.1.1.1 24
[R1]interface LoopBack 0
[R1-LoopBack0]ip address 1.1.1.1 24
[R1]interface LoopBack 1
[R1-LoopBack1]ip address 201.1.1.1 24
[R1-LoopBack1]int l 2
[R1-LoopBack2]ip address 201.1.2.1 24
[R1-LoopBack2]int l 3
[R1-LoopBack3]ip address 201.1.3.1 24
R2:
[R2]interface g0/0/1
[R2-GigabitEthernet0/0/1]ip address 28.1.1.2 24
[R2-GigabitEthernet0/0/1]
[R2]interface s4/0/0
[R2-Serial4/0/0]ip address 24.1.1.1 24
[R2]interface LoopBack 0
[R2-LoopBack0]ip address 2.2.2.2 24
R3:
[R3]interface g0/0/0
[R3-GigabitEthernet0/0/0]ip address 38.1.1.2 24
[R3]interface s4/0/0
[R3-Serial4/0/0]ip address 34.1.1.1 24
[R3]interface LoopBack 0
[R3-LoopBack0]ip address 3.3.3.3 24
R4:
[R4]interface s3/0/0
[R4-Serial3/0/0]ip address 24.1.1.2 24
[R4]interface s3/0/1
[R4-Serial3/0/1]ip address 34.1.1.2 24
[R4]interface g0/0/0
[R4-GigabitEthernet0/0/0]ip address 45.1.1.1 24
[R4]interface g4/0/0
[R4-GigabitEthernet4/0/0]ip address 46.1.1.1 24
[R4]interface LoopBack 0
[R4-LoopBack0]ip address 4.4.4.4 24
R5:
[R5]interface g0/0/1
[R5-GigabitEthernet0/0/1]ip address 45.1.1.2 24
[R5]interface LoopBack 0
[R5-LoopBack0]ip address 5.5.5.5 24
[R5]interface LoopBack 1
[R5-LoopBack1]ip address 202.1.1.1 24
[R5-LoopBack1]int l 2
[R5-LoopBack2]ip address 202.1.2.1 24
[R5-LoopBack2]int l 3
[R5-LoopBack3]ip address 202.1.3.1 24
R6:
[R6]interface g0/0/0
[R6-GigabitEthernet0/0/0]ip address 46.1.1.2 24
[R6]interface LoopBack 0
[R6-LoopBack0]ip address 6.6.6.6 24
[R6]interface g0/0/1
[R6-GigabitEthernet0/0/1]ip address 67.1.1.1 24
R7:
[R7]interface g0/0/0
[R7-GigabitEthernet0/0/0]ip address 67.1.1.2 24
[R7]interface LoopBack 0
[R7-LoopBack0]ip address 7.7.7.7 24
[R7]interface LoopBack 1
[R7-LoopBack1]ip address 203.1.1.1 24
[R7-LoopBack1]int l 2
[R7-LoopBack2]ip address 203.1.2.1 24
[R7-LoopBack2]int l 3
[R7-LoopBack3]ip address 203.1.3.1 24
R8:
[R8]interface g0/0/1
[R8-GigabitEthernet0/0/1]ip address 18.1.1.2 24
[R8]interface g0/0/0
[R8-GigabitEthernet0/0/0]ip address 28.1.1.1 24
[R8]interface g0/0/2
[R8-GigabitEthernet0/0/2]ip address 38.1.1.1 24
[R8-GigabitEthernet0/0/2]
[R8]interface LoopBack 0
[R8-LoopBack0]ip address 8.8.8.8 24
2.R1 -R2 -R3之间使用MGRE网络,为hub-spoke 网络结构,R1为hub端
R1:
[R1]interface Tunnel 0/0/0
[R1-Tunnel0/0/0]ip address 10.1.1.1 24
[R1-Tunnel0/0/0]source 18.1.1.1
[R1-Tunnel0/0/0]tunnel-protocol gre p2mp
[R1-Tunnel0/0/0]nhrp network-id 100
[R1-Tunnel0/0/0]nhrp entry multicast dynamic
[R1-Tunnel0/0/0]ospf network-type broadcast
[R1]ip route-static 0.0.0.0 0 18.1.1.2
R2:
[R2]interface Tunnel 0/0/0
[R2-Tunnel0/0/0]ip address 10.1.1.2 24
[R2-Tunnel0/0/0]source 28.1.1.2
[R2-Tunnel0/0/0]tunnel-protocol gre p2mp
[R2-Tunnel0/0/0]nhrp network-id 100
[R2-Tunnel0/0/0]nhrp entry multicast dynamic
[R2-Tunnel0/0/0]ospf network-type broadcast
[R2]ip route-static 0.0.0.0 0 28.1.1.1
R3:
[R3]interface Tunnel 0/0/0
[R3-Tunnel0/0/0]ip address 10.1.1.3 24
[R3-Tunnel0/0/0]source 38.1.1.2
[R3-Tunnel0/0/0]tunnel-protocol gre p2mp
[R3-Tunnel0/0/0]nhrp entry multicast dynamic
[R3-Tunnel0/0/0]nhrp network-id 100
[R3-Tunnel0/0/0]ospf network-type broadcast
[R3]ip route-static 0.0.0.0 0 38.1.1.1
3.部署OSPF网络
R1:
[R1]ospf 100 router-id 91.1.1.1
[R1-ospf-100]area 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 18.1.1.1 0.0.0.0
[R1-ospf-100-area-0.0.0.0]network 201.1.1.1 0.0.0.0
[R1-ospf-100-area-0.0.0.0]network 201.1.2.1 0.0.0.0
[R1-ospf-100-area-0.0.0.0]network 201.1.3.1 0.0.0.0
R2:
[R2]ospf 100 router-id 92.2.2.2
[R2-ospf-100]area 0
[R2-ospf-100-area-0.0.0.0]network 28.1.1.2 0.0.0.0
[R2-ospf-100-area-0.0.0.0]network 2.2.2.2 0.0.0.0
[R2-ospf-100]area 1
[R2-ospf-100-area-0.0.0.1]network 24.1.1.1 0.0.0.0
R3:
[R3]ospf 100 router-id 93.3.3.3
[R3-ospf-100]area 0
[R3-ospf-100-area-0.0.0.0]network 38.1.1.2 0.0.0.0
[R3-ospf-100-area-0.0.0.0]network 3.3.3.3 0.0.0.0
[R3-ospf-100]area 1
[R3-ospf-100-area-0.0.0.1]network 34.1.1.1 0.0.0.0
R4:
[R4]ospf 100 router-id 94.4.4.4
[R4-ospf-100]area 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 34.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.2]network 46.1.1.1 0.0.0.0
[R4]rip 200
[R4-rip-200]version 2
[R4-rip-200]network 45.0.0.0
R5:
[R5]rip 200
[R5-rip-200]version 2
[R5-rip-200]network 45.0.0.0
[R5-rip-200]network 5.0.0.0
[R5-rip-200]network 202.1.1.0
[R5-rip-200]network 202.1.2.0
[R5-rip-200]network 202.1.3.0
R6:
[R6]ospf 100 router-id 96.6.6.6
[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]rip 100
[R6-rip-100]version 2
[R6-rip-100]network 67.0.0.0
R7:
[R7]rip 100
[R7-rip-100]version 2
[R7-rip-100]network 67.0.0.0
[R7-rip-100]network 7.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
R8:
[R8]ospf 100 router-id 98.1.1.1
[R8-ospf-100]area 0
[R8-ospf-100-area-0.0.0.0]network 18.1.1.2 0.0.0.0
[R8-ospf-100-area-0.0.0.0]network 8.8.8.8 0.0.0.0
[R8-ospf-100-area-0.0.0.0]network 28.1.1.1 0.0.0.0
[R8-ospf-100-area-0.0.0.0]network 38.1.1.1 0.0.0.0
4.R2-R3之间启用ppp的pap单向认证
5.R3-R4启用ppp的chap双向认证
[R3]aaa
[R3-aaa]local-user hcip password cipher 123
Info: Add a new user.
[R3-aaa]local-user hcip service-type ppp
[R3]interface s4/0/0
[R3-Serial4/0/0]link-protocol ppp
[R3-Serial4/0/0]ppp authentication-mode chap
[R3]interface s4/0/0
[R3-Serial4/0/0]link-protocol ppp
[R3-Serial4/0/0]ppp chap user hice
[R3-Serial4/0/0]ppp chap password cipher 123
[R4]interface s3/0/1
[R4-Serial3/0/1]link-protocol ppp
[R4-Serial3/0/1]ppp chap user hicp
[R4-Serial3/0/1]ppp chap password cipher 123
[R4]aaa
[R4-aaa]local-user hcie password cipher 123
Info: Add a new user.
[R4-aaa]local-user hcie service-type ppp
[R4]interface s3/0/1
[R4-Serial3/0/1]link-protocol ppp
[R4-Serial3/0/1ppp authentication-mode chap
6.其他区域优先通过R3访问R1 三个环回接口
[R2-ospf-100-area-0.0.0.0]abr-summary 201.1.0.0 255.255.252.0 cost 10
[R3-ospf-100-area-0.0.0.0]abr-summary 201.1.0.0 255.255.252.0 cost 5
7.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
不规则区域问题解决:
将进程号200的路由与进程号100的路由信息相互导入
[R4]ospf 100
[R4-ospf-100]area 2
[R4-ospf-100-area-0.0.0.2]undo network 46.1.1.1 0.0.0.0
[R4]ospf 200
[R4-ospf-200]area 2
[R4-ospf-200-area-0.0.0.2]network 46.1.1.1 0.0.0.0
[R4]ospf 100
[R4-ospf-100]import-route ospf 200
[R4]ospf 200
[R4-ospf-200]import-route ospf 100
进行rip和ospf的路由导入
[R4]ospf 100
[R4-ospf-100]import-route rip 200
[R4]rip 200
[R4-rip-200]import-route ospf 100
[R6]ospf 100
[R6-ospf-100]import-route rip 100
[R6]rip 100
[R6-rip-100]import-route ospf 100
R1学到了所有路由
R5学到了所有路由
R7学到了所有路由
全网可达:
标签:R4,24,R3,ospf,实验,0.0,100,OSPF,综合 From: https://blog.csdn.net/sgdhshshhs/article/details/141033406