实验要求
1、R4为ISP,其上只配置IP地址;R4与其他所直连设备间均使用公有IP;
2、R3-R5、R6、R7为MGRE环境,R3为中心站点;
3、整个OSPF环境IP基于172.16.0.0/16划分;除了R12有两个环回,其他路由器均有一个环回IP
4、所有设备均可访问R4的环回;
5、减少LSA的更新量,减少路由表的路由条目,加快收敛,保障更新安全;
6、全网可达;
实验思路
1.按照图示配置各设备IP地址
2.在内外网出口设备上配置静态缺省路由,实现公网互通
3.R3-R5、R6、R7为MGRE环境,R3为中心站点
4.配置私网路由
6.加快收敛
配置步骤
- 按照图示配置各设备IP地址
[r1]int g 0/0/0
[r1-GigabitEthernet0/0/0]ip add 172.16.33.1 24
[r1]int l0
[r1-LoopBack0]ip add 172.16.34.1 24
[r2]int g0/0/0
[r2-GigabitEthernet0/0/0]ip add 172.16.33.2 24
[r2]int l0
[r2-LoopBack0]ip add 172.16.35.2 24
[r3]int g0/0/0
[r3-GigabitEthernet0/0/0]ip add 172.16.33.3 24
[r3]int l0
[r3-LoopBack0]ip add 172.16.36.3 24
[r3]int g0/0/1
[r3-GigabitEthernet0/0/1]ip add 34.0.0.3 24
[r4]int g0/0/0
[r4-GigabitEthernet0/0/0]ip add 34.0.0.4 24[r4-GigabitEthernet0/0/0]int g0/0/1
[r4-GigabitEthernet0/0/1]ip add 45.0.0.4 24
[r4-GigabitEthernet0/0/1]int g1/0/0
[r4-GigabitEthernet1/0/0]ip add 46.0.0.4 24
[r4-GigabitEthernet1/0/0]int g0/0/2
[r4-GigabitEthernet0/0/2]ip add 47.0.0.4 24
[r4-GigabitEthernet0/0/2]int l0
[r4-LoopBack0]ip add 172.16.2.4 24
[r5]int g0/0/0
[r5-GigabitEthernet0/0/0]ip add 45.0.0.5 24
[r5-GigabitEthernet0/0/0]int l0
[r5-LoopBack0]ip add 172.16.3.5 24
[r6]int g0/0/0
[r6-GigabitEthernet0/0/0]ip add 46.0.0.6 24
[r6-GigabitEthernet0/0/0]int l0
[r6-LoopBack0]ip add 172.16.4.6 24
[r6]int g0/0/1
[r6-GigabitEthernet0/0/1]ip add 172.16.65.1 30
[r7]int g0/0/0
[r7-GigabitEthernet0/0/0]ip add 47.0.0.7 24
[r7-GigabitEthernet0/0/0]int l0
[r7-LoopBack0]ip add 172.16.6.7 24
[r7]int g 0/0/1
[r7-GigabitEthernet0/0/1]ip add 172.16.97.1 30
[r8]int g0/0/0
[r8-GigabitEthernet0/0/0]ip add 172.16.97.2 30
[r8-GigabitEthernet0/0/0]int g0/0/1
[r8-GigabitEthernet0/0/1]ip add 172.16.97.5 30
[r8-GigabitEthernet0/0/1]int l0
[r8-LoopBack0]ip add 172.16.98.8 24
[r9]int g0/0/0
[r9-GigabitEthernet0/0/0]ip add 172.16.97.6 30
[r9-GigabitEthernet0/0/0]int g 0/0/1
[r9-GigabitEthernet0/0/1]ip add 172.16.129.1 30
[r9-GigabitEthernet0/0/1]int l0
[r9-LoopBack0]ip add 172.16.130.9 24
[r10]int g0/0/0
[r10-GigabitEthernet0/0/0]ip add 172.16.129.2 30
[r10-GigabitEthernet0/0/0]int l0
[r10-LoopBack0]ip add 172.16.131.10 24
[r11]int g0/0/0
[r11-GigabitEthernet0/0/0]ip add 172.16.65.2 30
[r11-GigabitEthernet0/0/0]int g0/0/1
[r11-GigabitEthernet0/0/1]ip add 172.16.65.5 30
[r11-GigabitEthernet0/0/1]int l0
[r11-LoopBack0]ip add 172.16.66.11 24
[r12]int g 0/0/0
[r12-GigabitEthernet0/0/0]ip add 172.16.65.6 30
[r12]int l0
[r12-LoopBack0]ip add 172.16.160.12 24
[r12-LoopBack0]int l1
[r12-LoopBack1]ip add 172.16.161.12 24
2.在内外网出口设备上配置静态缺省路由,实现公网互通
[r3]ip route-static 0.0.0.0 0 34.0.0.4
[r5]ip route-static 0.0.0.0 0 45.0.0.4
[r6]ip route-static 0.0.0.0 0 46.0.0.4
[r7]ip route-static 0.0.0.0 0 47.0.0.4
3.R3-R5、R6、R7为MGRE环境,R3为中心站点
[r3]int t 0/0/0
[r3-Tunnel0/0/0]tunnel-protocol gre p2mp
[r3-Tunnel0/0/0]ip add 172.16.6.3 24
[r3-Tunnel0/0/0]source 34.0.0.3
[r3-Tunnel0/0/0]nhrp network-id 100
[r3]dis nhrp peer all
-------------------------------------------------------------------------------
Protocol-addr Mask NBMA-addr NextHop-addr Type Flag
-------------------------------------------------------------------------------
172.16.6.5 32 45.0.0.5 172.16.6.5 dynamic route tunnel
-------------------------------------------------------------------------------
Tunnel interface: Tunnel0/0/0
Created time : 00:06:42
Expire time : 01:59:42
-------------------------------------------------------------------------------
Protocol-addr Mask NBMA-addr NextHop-addr Type Flag
-------------------------------------------------------------------------------
172.16.6.6 32 46.0.0.6 172.16.6.6 dynamic route tunnel
-------------------------------------------------------------------------------
Tunnel interface: Tunnel0/0/0
Created time : 00:05:42
Expire time : 01:59:14
Number of nhrp peers: 2
[r5]int t0/0/0
[r5-Tunnel0/0/0]ip add 172.16.6.5 24
[r5-Tunnel0/0/0]tunnel-protocol gre p2mp
[r5-Tunnel0/0/0]source g0/0/0
[r5-Tunnel0/0/0]nhrp network-id 100
[r5-Tunnel0/0/0]nhrp entry 172.16.6.3 34.0.0.3 register
[r5]dis nhrp peer all
-------------------------------------------------------------------------------
Protocol-addr Mask NBMA-addr NextHop-addr Type Flag
-------------------------------------------------------------------------------
172.16.6.3 32 34.0.0.3 172.16.6.3 static hub
-------------------------------------------------------------------------------
Tunnel interface: Tunnel0/0/0
Created time : 00:08:15
Expire time : --
Number of nhrp peers: 1
[r6]int t0/0/0
[r6-Tunnel0/0/0]ip add 172.16.6.6 24
[r6-Tunnel0/0/0]tunnel-protocol gre p2mp
[r6-Tunnel0/0/0]source g0/0/0
[r6-Tunnel0/0/0]nhrp network-id 100
[r6-Tunnel0/0/0]nhrp entry 172.16.6.3 34.0.0.3 register
[r6]dis nhrp peer all
-------------------------------------------------------------------------------
Protocol-addr Mask NBMA-addr NextHop-addr Type Flag
-------------------------------------------------------------------------------
172.16.6.3 32 34.0.0.3 172.16.6.3 static hub
-------------------------------------------------------------------------------
Tunnel interface: Tunnel0/0/0
Created time : 00:06:39
Expire time : --
Number of nhrp peers: 1
4.配置私网路由
[r3]ospf 1
[r3-ospf-1]area 1
[r3-ospf-1-area-0.0.0.1]ne
[r3-ospf-1-area-0.0.0.1]network 172.16.33.3 0.0.0.255
[r3-ospf-1-area-0.0.0.1]ne
[r3-ospf-1-area-0.0.0.1]network 172.16.36.3 0.0.0.255
[r3-ospf-1]area 0
[r3-ospf-1-area-0.0.0.0]network 172.16.6.0 0.0.0.255
[r5]ospf 1
[r5-ospf-1]area 0
[r5-ospf-1-area-0.0.0.0]network 172.16.6.0 0.0.0.255
[r5-ospf-1-area-0.0.0.0]network 172.16.3.0 0.0.0.255
[r6]ospf 1
[r6-ospf-1]area 0
[r6-ospf-1-area-0.0.0.0]network 172.16.6.0 0.0.0.255
[r6-ospf-1-area-0.0.0.0]network 172.16.4.0 0.0.0.255
[r6-ospf-1]area 2
[r6-ospf-1-area-0.0.0.2]network 172.16.65.1 0.0.0.0
[r7]ospf 1
[r7-ospf-1]area 0
[r7-ospf-1-area-0.0.0.0]network 172.16.5.0 0.0.0.255
[r7-ospf-1-area-0.0.0.0]network 172.16.6.0 0.0.0.255
[r7-ospf-1]area 3
[r7-ospf-1-area-0.0.0.3]network 172.16.97.1 0.0.0.0
[r5-Tunnel0/0/0]ospf network-type broadcast
[r6-Tunnel0/0/0]ospf network-type broadcast
[r7-Tunnel0/0/0]ospf network-type broadcast
[r5-Tunnel0/0/0]ospf dr-priority 0
[r6-Tunnel0/0/0]ospf dr-priority 0
[r7-Tunnel0/0/0]ospf dr-priority 0
6.加快收敛
[r3]int g 0/0/1
[r3-GigabitEthernet0/0/1]ospf timer hello 15
[r5]int g 0/0/0
[r5-GigabitEthernet0/0/0]ospf timer hello 15
[r6]int g 0/0/0
[r6-GigabitEthernet0/0/0]ospf timer hello 15
[r7]int g 0/0/0
[r7-GigabitEthernet0/0/0]ospf timer hello 15