实验要求:
1.R4为ISP,其上只能配置IP地址;R4与其他所有直连设备间均使用公有IP
2.R3-R5/6/7为MGRE环境,R3为中心站点
3.整个OSPF环境IP基于172.16.0.0/16划分
4.所有设备均可访问R4的环回
5.减少LSA的更新量,加快收敛,保障更新安全
6.全网可达
实验过程
一、进行IP地址规划
使用网段:172.16.0.0/16
由图可知一共有6个区域---将地址分为8个子网(预留两个子网段):
172.16.0.0/19 ---area 0
172.16.32.0/19 ---area 1
172.16.64.0/19 ---area 2
172.16.96.0/19 ---area 3
172.16.128.0/19 ---area 4
172.16.160.0/19 ---RIP
172.16.192.0/19 ---预留网段
172.16.224.0/19 ---预留网段
基于一个区域进行地址划分:
area 0:172.16.0.0/19
172.16.0.0/24 ----用于p2p骨干链路划分
172.16.0.128/24 ----用于MA骨干链路划分
172.16.1.0/25 ----后面则为用户网段
172.16.1.128/25
area1:172.16.32.0/19
172.16.32.0/24 ----用于p2p骨干链路划分
172.16.33.0/24 ---- 用于MA骨干链路划分
area2:172.16.64.0/19
172.16.64.0/24 --- 用于p2p骨干链路划分
172.16.65.0/24 --- 用于MA骨干链路划分
area3:172.16.96.0/19
172.16.96.0/24 --- 用于p2p骨干链路划分
172.16.97.0/24 --- 用于MA骨干链路划分
area4:172.16.128.0/19
172.16.128.0/24 --- 用于p2p骨干链路划分
172.16.129.0/24 ---用于MA骨干链路划分
RIP:172.16.160.0/19
172.16.160.0/20
172.16.176.0/20
172.16.192.0/19
172.16.224.0/19
二、配置IP地址和环回
R1
R2
R3
R4
R5
R6
R7
R8
R9
R10
R11
R12
三、配置MGRE环境
R3
[R3]int t 0/0/0 [R3-Tunnel0/0/0]ip a 10.1.1.1 24 [R3-Tunnel0/0/0]tunnel-protocol gre p2mp [R3-Tunnel0/0/0]source 34.1.1.1 [R3-Tunnel0/0/0]nhrp network-id 100 [R3-Tunnel0/0/0]nhrp entry multicast dynamic
R5
[R5]int t0/0/0 [R5-Tunnel0/0/0]ip a 10.1.1.2 24 [R5-Tunnel0/0/0]tunnel-protocol gre p2mp [R5-Tunnel0/0/0]source Serial 4/0/0 [R5-Tunnel0/0/0]nhrp network-id 100 [R5-Tunnel0/0/0]nhrp entry 10.1.1.1 34.1.1.1 register
R6
[R6]int t0/0/0 [R6-Tunnel0/0/0]ip a 10.1.1.3 24 [R6-Tunnel0/0/0]tunnel-protocol gre p2mp [R6-Tunnel0/0/0]source Serial 4/0/0 [R6-Tunnel0/0/0]nhrp network-id 100 [R6-Tunnel0/0/0]nhrp entry 10.1.1.1 34.1.1.1 register
R7
[R7]int t0/0/0 [R7-Tunnel0/0/0]ip a 10.1.1.4 24 [R7-Tunnel0/0/0]tunnel-protocol gre p2mp [R7-Tunnel0/0/0]source GigabitEthernet 0/0/0 [R7-Tunnel0/0/0]nhrp network-id 100 [R7-Tunnel0/0/0]nhrp entry 10.1.1.1 34.1.1.1 register
四、建立OSPF环境
R1 [R1]ospf 1 router-id 1.1.1.1 [R1-ospf-1]a 1 [R1-ospf-1-area-0.0.0.1]network 172.16.0.0 0.0.255.255 R2 [R2]ospf 1 router-id 2.2.2.2 [R2-ospf-1]a 1 [R2-ospf-1-area-0.0.0.1]network 172.16.0.0 0.0.255.255 R3 [R3]ospf 1 router-id 3.3.3.3 [R3-ospf-1]a 1 [R3-ospf-1-area-0.0.0.1]network 172.16.32.0 0.0.7.255 [R3-ospf-1-area-0.0.0.1]a 0 [R3-ospf-1-area-0.0.0.0]net [R3-ospf-1-area-0.0.0.0]network 172.16.1.1 0.0.0.0 R5 [R5]ospf 1 router-id 5.5.5.5 [R5-ospf-1]a 0 [R5-ospf-1-area-0.0.0.0]network 172.16.0.0 0.0.255.255 R6 [R6]ospf 1 router-id 6.6.6.6 [R6-ospf-1]a 0 [R6-ospf-1-area-0.0.0.0]network 172.16.0.0 0.0.3.255 [R6-ospf-1-area-0.0.0.0]a 2 [R6-ospf-1-area-0.0.0.2]network 172.16.64.1 0.0.0.0 R7 [R7]ospf 1 router-id 7.7.7.7 [RR7-ospf-1]a 0 [R7-ospf-1-area-0.0.0.0]network 172.16.0.0 0.0.7.255 [R7-ospf-1-area-0.0.0.0]a 3 [R7-ospf-1-area-0.0.0.3]network 172.16.96.1 0.0.0.0 R8 [R8]ospf 1 router-id 8.8.8.8 [R8-ospf-1]a 3 [R8-ospf-1-area-0.0.0.3]network 172.16.0.0 0.0.255.255 R9 [R9]ospf 1 router-id 9.9.9.9 [R9-ospf-1]a 3 [R9-ospf-1-area-0.0.0.3]network 172.16.96.6 0.0.0.0 [R9-ospf-1-area-0.0.0.3]a 4 [R9-ospf-1-area-0.0.0.4]network 172.16.128.0 0.0.1.255 R10 [R10]ospf 1 router-id 10.10.10.10 [R10-ospf-1]a 4 [R10-ospf-1-area-0.0.0.4]network 172.16.0.0 0.0.255.255 R11 [R11]ospf 1 router-id 11.11.11.11 [R11-ospf-1]a 2 [R11-ospf-1-area-0.0.0.2]network 172.16.0.0 0.0.255.255 R12 [R12]ospf 1 router-id 12.12.12.12 [R12-ospf-1]a 2 [R12-ospf-1-area-0.0.0.2]network 172.16.65.10 0.0.0.0 [R12]rip 1 [R12-rip-1]v 2 [R12-rip-1]network 172.16.0.0
五、将R3/R5/R6/R7的工作方式修改为broadcast,同时使R5/R6/R7放弃选举
R3
[R3]int t0/0/0 [R3-Tunnel0/0/0]ospf network-type broadcast R5
[R5]int t0/0/0
[R5-Tunnel0/0/0]ospf network-type broadcast
[R5-Tunnel0/0/0]ospf dr-priority 0
R6
[R6]int t0/0/0
[R6-Tunnel0/0/0]ospf network-type broadcast
[R6-Tunnel0/0/0]ospf dr-priority 0
R7
[R7]int t0/0/0
[R7-Tunnel0/0/0]ospf network-type broadcast
[R7-Tunnel0/0/0]ospf dr-priority 0
六、重发布
[r12]ospf 1 [r12-ospf-1]import-route rip 1
七、减少LSA更新量
R1 [R1]ospf 1 [R1-ospf-1]a 1 [R1-ospf-1-area-0.0.0.1]stub R2 [R2]ospf 1 [R2-ospf-1]a 1 [R2-ospf-1-area-0.0.0.1]stub R3 [R3]ospf 1 [R3-ospf-1]a 1 [R3-ospf-1-area-0.0.0.1]stub no-summary R6 [R6]ospf 1 [R6-ospf-1]a 2 [R6-ospf-1-area-0.0.0.2]nssa no-summary R11 [R11]ospf 1 [R11-ospf-1]a 2 [R11-ospf-1-area-0.0.0.2]nssa no-summary R12 [R12]ospf 1 [R12-ospf-1]a 2 [R12-ospf-1-area-0.0.0.2]nssa
R7 [R7]ospf 1 [R7-ospf-1]a 3 [R7-ospf-1-area-0.0.0.3]nssa no-summary R8 [R8]ospf 1 [R8-ospf-1]a 3 [R8-ospf-1-area-0.0.0.3]nssa
八、要使所有设备均能访问R4,则在R3/R6/R7上设置ACL和NAT
R3 [R3]acl 2000 [R3-acl-basic-2000]rule permit source 172.16.0.0 0.0.255.255 [R3]int g 0/0/1 [R3-Serial4/0/0]nat outbound 2000 R6 [R6]acl 2000 [R6-acl-basic-2000]rule permit source 172.16.0.0 0.0.255.255 [R6]int g 0/0/2 [R6-Serial4/0/0]nat outbound 2000 R7 [R7]acl 2000 [R7-acl-basic-2000]rule permit source 172.16.0.0 0.0.255.255 [R7]int g0/0/2 [R7-GigabitEthernet0/0/0]nat outbound 2000
标签:0.0,R6,ospf,area,OSPF,R3,实验,172.16,HCIP From: https://www.cnblogs.com/wxy1787880204/p/17264945.html