拓扑图及实验要求
一、子网划分,如下图
二、实验配置
(一)、路由器重命名及IP地址配置,以R1为例
- [Huawei]sys r1
- [r1]int g 0/0/0
- [r1-GigabitEthernet0/0/0]ip ad 172.16.0.1 20
- [r1]int LoopBack 0
- [r1-LoopBack0]ip ad 172.16.16.1 20
(二)、搭建r3/r5/r6的MGRE环境
1.中心站点的搭建(R3)
- [r3]int t0/0/0
- [r3-Tunnel0/0/0]ip address 192.168.1.1 24
- [r3-Tunnel0/0/0]tunnel-protocol gre p2mp
- [r3-Tunnel0/0/0]source 15.0.0.1
- Jan 14 2022 21:33:36-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 multicast dynamic
2.分支的配置,R5为例
- [r5]int t0/0/0
- [r5-Tunnel0/0/0]ip address 192.168.1.2 24
- [r5-Tunnel0/0/0]tunnel-protocol gre p2mp
- [r5-Tunnel0/0/0]source Serial 4/0/0
- Jan 14 2022 21:36:25-08:00 r5 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
- on the interface Tunnel0/0/0 has entered the UP state. t
- [r5-Tunnel0/0/0]nhrp network-id 100
- [r5-Tunnel0/0/0]nhrp entry 192.168.1.1 15.0.0.1 register
3.配置R3、R5、R6、R7的缺省指向R4
- [r3]ip route-static 0.0.0.0 0 15.0.0.2
- [r5]ip route-static 0.0.0.0 0 25.0.0.1
- [r6]ip route-static 0.0.0.0 0 35.0.0.1
- [r7]ip route-static 0.0.0.0 0 45.0.0.1
(三)、整个OSPF环境IP基于172.16.0.0/16划分
1.启动OSPF,R1为例
- [r1]ospf 1 router-id 1.1.1.1
- [r1-ospf-1]area 1
- [r1-ospf-1-area-0.0.0.1]network 172.16.0.0 0.0.255.255
- [r1-ospf-1-area-0.0.0.1]network 172.16.16.0 0.0.0.255
2.在R3、R6、R7上做nat设置,以r3为例
- [r3-acl-basic-2000]rule permit source 172.16.0.0 0.0.255.255
- [r3]interface Serial 4/0/0
- [r3-Serial4/0/0]nat outbound 2000
3.设置area1为末梢区域
- [r1-ospf-1-area-0.0.0.1]stub
- [r2-ospf-1-area-0.0.0.1]stub
- [r3-ospf-1-area-0.0.0.1]stub
4.设置area3为NASS
- [r9-ospf-1]area 3
- [r9-ospf-1-area-0.0.0.1]nssa
- [r7-ospf-1]area 3
- [r7-ospf-1-area-0.0.0.1]nssa no-summary