例图:
?要求:
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.全网可达。
分析:
1.配IP和环回地址。
2.R1-R2-R3---MGRE网络,搭建隧道并配缺省使其物理链路通信。
3.部署OSPF,使学习到路由。
4.area 1区域中使用nssa。
5.修改cost值、
6.汇总R1、R5、R7路由。
7.实现全网可达。
配置:
R1:
[r1]int g0/0/0
[r1-GigabitEthernet0/0/0]ip address 18.1.1.1 24
[r1-GigabitEthernet0/0/0]q
[r1]int l 0
[r1-LoopBack0]ip address 1.1.1.1 24
[r1-LoopBack0]int l 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 //配接口ip和环回
[r1]int t0/0/0
[r1-Tunnel0/0/0]ip address 10.1.1.1 24
[r1-Tunnel0/0/0]tunnel-protocol gre p2mp
[r1-Tunnel0/0/0]source 18.1.1.1
[r1-Tunnel0/0/0]nhrp network-id 100
[r1-Tunnel0/0/0]nhrp entry multicast dynamic
[r1-Tunnel0/0/0]q //配置mgre
[r1]ip route-static 0.0.0.0 0.0.0.0 18.1.1.2 //配缺省使物理链路通信
[r1]ospf 1 router-id 1.1.1.1
[r1-ospf-1]area 0
[r1-ospf-1-area-0.0.0.0]network 201.1.1.1 0.0.0.0
[r1-ospf-1-area-0.0.0.0]network 201.1.2.1 0.0.0.0
[r1-ospf-1-area-0.0.0.0]network 201.1.3.1 0.0.0.0
[r1-ospf-1-area-0.0.0.0]network 1.1.1.1 0.0.0.0
[r1-ospf-1-area-0.0.0.0]network 10.1.1.1 0.0.0.0
[r1-ospf-1-area-0.0.0.0]q
[r1-ospf-1]q
[r1]int t 0/0/0
[r1-Tunnel0/0/0]ospf dr-priority 100
[r1-Tunnel0/0/0]ospf network-type broadcast //启用ospf并宣告
R2:
[r2]int g0/0/0
[r2-GigabitEthernet0/0/0]ip address 28.1.1.2 24
[r2-GigabitEthernet0/0/0]int s4/0/0
[r2-Serial4/0/0]ip address 24.1.1.1 24
[r2-Serial4/0/0]int l 0
[r2-LoopBack0]ip address 2.2.2.2 24 //配接口ip和环回
[r2]int t0/0/0
[r2-Tunnel0/0/0]ip address 10.1.1.2 24
[r2-Tunnel0/0/0]tunnel-protocol gre p2mp
[r2-Tunnel0/0/0]source 28.1.1.2
[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]q //配置mgre
[r2]ip route-static 0.0.0.0 0.0.0.0 28.1.1.1 //配缺省使物理链路通信
[r2]int t0/0/1
[r2-Tunnel0/0/1]ip address 24.1.2.1 24
[r2-Tunnel0/0/1]tunnel-protocol gre
[r2-Tunnel0/0/1]source 24.1.1.1
[r2-Tunnel0/0/1]destination 24.1.1.2 //将R2和R4搭建gre
[r2]ospf 1 router-id 2.2.2.2
[r2-ospf-1]area 0
[r2-ospf-1-area-0.0.0.0]network 2.2.2.2 0.0.0.0
[r2-ospf-1-area-0.0.0.0]network 10.1.1.2 0.0.0.0
[r2-ospf-1-area-0.0.0.0]network 24.1.2.1 0.0.0.0
[r2-ospf-1-area-0.0.0.0]area 1
[r2-ospf-1-area-0.0.0.1]network 24.1.1.1 0.0.0.0
[r2-ospf-1-area-0.0.0.1]q
[r2-ospf-1]q
[r2]int t0/0/1
[r2-Tunnel0/0/0]ospf dr-priority 0
[r2-Tunnel0/0/0]ospf network-type broadcast //启用ospf并宣告
R3:
[r3]int g0/0/0
[r3-GigabitEthernet0/0/0]ip address 38.1.1.2 24
[r3-GigabitEthernet0/0/0]int s4/0/0
[r3-Serial4/0/0]ip address 34.1.1.1 24
[r3-Serial4/0/0]int l 0
[r3-LoopBack0]ip address 3.3.3.3 24 //配接口ip和环回
[r3]int t0/0/0
[r3-Tunnel0/0/0]ip address 10.1.1.3 24
[r3-Tunnel0/0/0]tunnel-protocol gre p2mp
[r3-Tunnel0/0/0]source 38.1.1.2
[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]q //配置mgre
[r3]ip route-static 0.0.0.0 0.0.0.0 38.1.1.1 //配缺省使物理链路通信
[r3]int t0/0/1
[r3-Tunnel0/0/1]ip address 34.1.2.1 24
[r3-Tunnel0/0/1]tunnel-protocol gre
[r3-Tunnel0/0/1]source 34.1.1.1
[r3-Tunnel0/0/1]destination 34.1.1.2 //将R3和R4搭建gre
[r3]ospf 1 router-id 3.3.3.3
[r3-ospf-1]area 0
[r3-ospf-1-area-0.0.0.0]network 3.3.3.3 0.0.0.0
[r3-ospf-1-area-0.0.0.0]network 10.1.1.3 0.0.0.0
[r3-ospf-1-area-0.0.0.0]network 34.1.2.1 0.0.0.0
[r3-ospf-1-area-0.0.0.0]area 1
[r3-ospf-1-area-0.0.0.1]network 34.1.1.1 0.0.0.0
[r3-ospf-1-area-0.0.0.1]q
[r3-ospf-1]q
[r3]int t 0/0/0
[r3-Tunnel0/0/0]ospf dr-priority 0
[r3-Tunnel0/0/0]ospf network-type broadcast //启用ospf并宣告
R4:
[r4]int s4/0/0
[r4-Serial4/0/0]ip address 24.1.1.2 24
[r4-Serial4/0/0]int s4/0/1
[r4-Serial4/0/1]ip address 34.1.1.2 24
[r4-Serial4/0/1]int g0/0/0
[r4-GigabitEthernet0/0/0]ip address 45.1.1.1 24
[r4-GigabitEthernet0/0/0]int g0/0/1
[r4-GigabitEthernet0/0/1]ip address 46.1.1.1 24
[r4-GigabitEthernet0/0/1]int l 0
[r4-LoopBack0]ip address 4.4.4.4 24 //配接口ip和环回
[r4]int t 0/0/1
[r4-Tunnel0/0/1]ip address 24.1.2.2 24
[r4-Tunnel0/0/1]tunnel-protocol gre
[r4-Tunnel0/0/1]source 24.1.1.2
[r4-Tunnel0/0/1]destination 24.1.1.1
[r4-Tunnel0/0/1]int t0/0/2
[r4-Tunnel0/0/2]ip address 34.1.2.2 24
[r4-Tunnel0/0/2]tunnel-protocol gre
[r4-Tunnel0/0/2]source 34.1.1.2
[r4-Tunnel0/0/2]destination 34.1.1.1
[r4-Tunnel0/0/2]q //将R2与R3用gre与R4搭建通道
[r4]ospf 1 router-id 4.4.4.4
[r4-ospf-1]area 0
[r4-ospf-1-area-0.0.0.0]network 24.1.2.2 0.0.0.0
[r4-ospf-1-area-0.0.0.0]network 34.1.2.2 0.0.0.0
[r4-ospf-1-area-0.0.0.0]area 1
[r4-ospf-1-area-0.0.0.1]network 4.4.4.4 0.0.0.0
[r4-ospf-1-area-0.0.0.1]network 24.1.1.2 0.0.0.0
[r4-ospf-1-area-0.0.0.1]network 34.1.1.2 0.0.0.0
[r4-ospf-1-area-0.0.0.1]area 2
[r4-ospf-1-area-0.0.0.2]network 46.1.1.1 0.0.0.0
[r4-ospf-1-area-0.0.0.2]q
[r4-ospf-1]import-route rip 200
[r4-ospf-1]rip 200
[r4-rip-200]import-route ospf 1 //启用ospf并宣告
R5:
[r5]int g0/0/0
[r5-GigabitEthernet0/0/0]ip address 45.1.1.2 24
[r5-GigabitEthernet0/0/0]int l 0
[r5-LoopBack0]ip address 5.5.5.5 24
[r5]int l 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 //配接口ip和环回
[r5]rip 200
[r5-rip-200]version 2
[r5-rip-200]network 5.0.0.0
[r5-rip-200]network 45.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 //启用rip并宣告
R6:
[r6]int g0/0/0
[r6-GigabitEthernet0/0/0]ip address 46.1.1.2 24
[r6-GigabitEthernet0/0/0]int g0/0/1
[r6-GigabitEthernet0/0/1]ip address 67.1.1.1 24
[r6-GigabitEthernet0/0/1]int l 0
[r6-LoopBack0]ip address 6.6.6.6 24 //配接口ip和环回
[r6]ospf 1 router-id 6.6.6.6
[r6-ospf-1]area 2
[r6-ospf-1-area-0.0.0.2]network 6.6.6.6 0.0.0.0
[r6-ospf-1-area-0.0.0.2]network 46.1.1.2 0.0.0.0
[r6-ospf-1]rip 100
[r6-rip-100]version 2
[r6-rip-100]network 67.0.0.0
[r6-rip-100]import-route ospf 1
[r6-ospf-1]import-route rip 100 //启用ospf并宣告
R7:
[r7]int g0/0/0
[r7-GigabitEthernet0/0/0]ip address 67.1.1.2 24
[r7-GigabitEthernet0/0/0]int l 0
[r7-LoopBack0]ip address 7.7.7.7 24
[r7]int l 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 //配接口ip和环回
[r7]rip 100
[r7-rip-100]version 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
[r7-rip-100]q
R8:
[r8]int g0/0/0
[r8-GigabitEthernet0/0/0]ip address 18.1.1.2 24
[r8-GigabitEthernet0/0/0]int g0/0/1
[r8-GigabitEthernet0/0/1]ip address 28.1.1.1 24
[r8-GigabitEthernet0/0/1]int g0/0/2
[r8-GigabitEthernet0/0/2]ip address 38.1.1.1 24
[r8-GigabitEthernet0/0/2]int l 0
[r8-LoopBack0]ip address 8.8.8.8 24 //配接口ip和环回
未完
|