赞
踩
目录
实验要求图:
实验拓扑图:
实验要求:
1、R4为ISP,其上只能配置IP地址: R4与其他所有直连设备间使用公有
2、R3---R5/6/7为MGRE环境,R3为中心站点
3、整个OSPF环境IP地址为172.16.0.0/16
4、所有设备均可访问R4的环回
5、减少LSA的更新量,加快收敛,保障更新安全
6、全网可达
实验思路:
先完成地址规划,并配通公共网;接下来搭建MGRE环境,配置完成后,用ospf将私网跑通;再尽可能去完成减少LSA的更新量,加快收敛,保障更新安全;最后通过nat完成所有设备均可访问R4的环回
先确定有多少个区域:(此处将rip也当做ospf的一个区域来划分)因此需划分6个网段,因此借三位;然后再在每个区域内部进行划分(用户网段直接用24)
172.16.0.0/16
172.16.0.0/19 ------area0
172.16.32.0/19 ------area1
172.16.96.0/19 ------area3
172.16.128.0/19 ------area4
172.16.160.0/19 ------rip
172.16.192.0/19
172.16.224.0/19
area0区域:172.16.0.0/19
172.16.0.0/24 -------P2P骨干
172.16.0.0/30
172.16.0.4/30
172.16.0.8/30
172.16.1.0/24 -------MA骨干
172.16.1.0/29
172.16.1.8/29
172.16.1.16/29
172.16.2.0/24 — 用户网段
172.16.3.0/24 — 用户网段
172.16.4.0/24 — 用户网段
area1区域:172.16.32.0/19
172.16.32.0/24 -------P2P骨干
172.16.32.0/30
172.16.32.4/30
172.16.32.8/30
172.16.33.0/24 -------MA骨干
172.16.33.0/29
172.16.33.8/29
172.16.33.16/29
172.16.34.0/24 —r1环回
172.16.35.0/24 —r2环回
172.16.36.0/24 —r3环回
area2:区域172.16.64.0/19
172.16.64.0/24 -------P2P骨干
172.16.64.0/30
172.16.64.4/30
172.16.64.8/30
172.16.65.0/24 -------MA骨干
172.16.65.0/29
172.16.65.8/29
172.16.65.16/29
172.16.66.0/24 —r11环回
172.16.67.0/24
172.16.68.0/24
area3区域:172.16.96.0/19
172.16.96.0/24 -------P2P骨干
172.16.96.0/30
172.16.96.4/30
172.16.96.8/30
172.16.97.0/24 -------MA骨干
172.16.97.0/29
172.16.97.8/29
172.16.97.16/29
172.16.98.0/24 —r8环回
172.16.99.0/24
172.16.100.0/24
area4区域:172.16.128.0/19
172.16.128.0/24 -------P2P骨干
172.16.128.0/30
172.16.128.4/30
172.16.128.8/30
172.16.129.0/24 -------MA骨干
172.16.129.0/29
172.16.129.8/29
172.16.129.16/29
172.16.130.0/24 —r9环回
172.16.131.0/24 —r10环回
172.16.132.0/24
rip区域:172.16.160.0/19
172.16.160.0/20 —r12环回
172.16.176.0/20 —r12环回
172.16.192.0/19
172.16.224.0/19
Area0
r3
[r3-GigabitEthernet0/0/1]ip add 34.1.1.1 24
r4
[r4-GigabitEthernet0/0/0]ip add 34.1.1.2 24
[r4-GigabitEthernet0/0/1]ip add 54.1.1.2 24
[r4-GigabitEthernet0/0/2]ip add 64.1.1.2 24
[r4-GigabitEthernet3/0/0]ip add 74.1.1.2 24
[r4-LoopBack0]ip add 4.4.4.4 24
r5
[r5-GigabitEthernet0/0/0]ip add 54.1.1.1 24
[r5-LoopBack0]ip add 172.16.2.1 24
r6
[r6-GigabitEthernet0/0/0]ip add 64.1.1.1 24
[r6-LoopBack1]ip add 172.16.3.1 24
r7
[r7-GigabitEthernet0/0/0]ip add 74.1.1.1 24
[r7-LoopBack0]ip add 172.16.4.1 24
Area1
r1
[r1-GigabitEthernet0/0/1]ip add 172.16.33.1 29
[r1-LoopBack0]ip add 172.16.34.1 24
r2
[r2-GigabitEthernet0/0/2]ip add 172.16.33.2 29
[r2-LoopBack0]ip add 172.16.35.1 24
r3
[r3-GigabitEthernet0/0/0]ip add 172.16.33.3 29
[r3-LoopBack0]ip add 172.16.36.1 24
Area2
r6
[r6-GigabitEthernet0/0/1]ip add 172.16.65.1 29
r11
[r11-GigabitEthernet0/0/0]ip add 172.16.65.2 29
[r11-LoopBack0]ip add 172.16.66.1 24
[r11-GigabitEthernet0/0/1]ip add 172.16.65.9 29
r12
[r12-GigabitEthernet0/0/0]ip add 172.16.65.10 29
Area3
R7
[r7-GigabitEthernet0/0/1]ip add 172.16.97.1 29
R8
[r8-GigabitEthernet0/0/0]ip add 172.16.97.2 29
[r8-LoopBack0]ip add 172.16.98.1 24
[r8-GigabitEthernet0/0/1]ip add 172.16.97.9 29
R9
[r9-GigabitEthernet0/0/0]ip add 172.16.97.10 29
Area4
r9
[r9-GigabitEthernet0/0/1]ip add 172.168.129.1 29
[r9-LoopBack0]ip add 172.168.130.1 24
R10
[r10-GigabitEthernet0/0/0]ip add 172.16.129.2 29
[r10-LoopBack0]ip add 172.16.131.1 24
Rip
[r12-LoopBack0]ip add 172.16.160.1 20
[r12-LoopBack1]ip add 172.16.176.1 20
[r3]ip route-static 0.0.0.0 0 34.1.1.2
[r5]ip route-static 0.0.0.0 0 54.1.1.2
[r6]ip route-static 0.0.0.0 0 64.1.1.2
[r7]ip route-static 0.0.0.0 0 74.1.1.2
R3---R5/6/7为MGRE环境,R3为中心站点
所有接口工作方式均修改为broadcast
除了r3外,均取消br选举
此处r5、r6、r7操作类似
r3
[r3-Tunnel0/0/0]ip add 172.16.1.1 29
[r3-Tunnel0/0/0]tunnel-protocol gre p2mp
[r3-Tunnel0/0/0]source 34.1.1.1
[r3-Tunnel0/0/0]nhrp entry multicast dynamic
[r3-Tunnel0/0/0]nhrp network-id 100
[r3-Tunnel0/0/0]ospf network-type broadcast
r5
[r5-Tunnel0/0/0]ip add 172.16.1.2 29
[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.1.1 34.1.1.1 register
[r5-Tunnel0/0/0]ospf network-type broadcast
[r5-Tunnel0/0/0]ospf dr-priority 0
r6
[r6-Tunnel0/0/0]ip add 172.16.1.3 29
[r6-Tunnel0/0/0]tunnel-protocol gre p2mp
[r6-Tunnel0/0/0]source g0/0/0
[r6-Tunnel0/0/0]nhrp entry 172.16.1.1 34.1.1.1 register
[r6-Tunnel0/0/0]nhrp network-id 100
[r6-Tunnel0/0/0]ospf network-type broadcast
[r6-Tunnel0/0/0]ospf dr-priority 0
r7
[r7-Tunnel0/0/0]ip add 172.16.1.4 29
[r7-Tunnel0/0/0]tunnel-protocol gre p2mp
[r7-Tunnel0/0/0]source g0/0/0
[r7-Tunnel0/0/0]nhrp entry 172.16.1.1 34.1.1.1 register
[r7-Tunnel0/0/0]nhrp network-id 100
[r7-Tunnel0/0/0]ospf network-type broadcast
[r7-Tunnel0/0/0]ospf dr-priority 0
r1
[r1]ospf 1 router-id 1.1.1.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-area-0.0.0.1]network 172.16.0.0 0.0.255.255
r3
注意:此处是将172.16.33.3 29和172.16.36.1 24进行了汇总:
[r3]ospf 1 router-id 3.3.3.3
[r3-ospf-1]area 1
[r3-ospf-1-area-0.0.0.1]network 172.16.32.0 0.0.7.255
[r3-ospf-1]area 0
[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-area-0.0.0.0]network 172.16.0.0 0.0.255.255
r6
注意:此处是将172.16.65.1 29和172.16.1.3 29进行了汇总:
[r6]ospf 1 router-id 6.6.6.6
[r6-ospf-1-area-0.0.0.0]network 172.16.0.0 0.0.3.255
[r6-ospf-1-area-0.0.0.2]network 172.16.65.1 0.0.0.0
r7
注意:此处是将172.16.4.1 24和172.16.1.4 29进行了汇总:
[r7]ospf 1 router-id 7.7.7.7
[r7-ospf-1-area-0.0.0.0]network 172.16.0.0 0.0.7.255
[r7-ospf-1-area-0.0.0.3]network 172.16.97.1 0.0.0.0
r8
[r8]ospf 1 router-id 8.8.8.8
[r8-ospf-1-area-0.0.0.3]network 172.16.0.0 0.0.255.255
r9
解决不规则区域:--多进程双向重发布
[r9-ospf-1-area-0.0.0.3] network 172.16.97.10 0.0.0.0
[r9]ospf 2 router-id 9.9.9.9
注意:此处是将172.16.168.130 24和172.16.129.1 29进行了汇总:
[r9-ospf-2-area-0.0.0.4] network 172.16.128.0 0.0.3.255
重发布:
[r9-ospf-1]import-route ospf 2
[r9-ospf-2]import-route ospf 1 ---为了优化可以不写,用缺省代替
r9给r10自动下发缺省
[r9-ospf-2]default-route-advertise
r10
[r10]ospf 1 router-id 10.10.10.10
[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-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-area-0.0.0.2]network 172.16.65.10 0.0.0.0
RIP:
[r12-rip-1]network 172.16.0.0
重发布:
[r12-ospf-1]import-route rip 1
[r12-rip-1]import-route ospf 1
1.汇总
区域间汇总
注意防环--空接口(每个汇总的地方都得写r3、r6、r7、r9、r12)
[r3]ip route-static 172.16.32.0 19 NULL 0
[r3-ospf-1-area-0.0.0.1]abr-summary 172.16.32.0 255.255.224.0
[r6-ospf-1-area-0.0.0.2]abr-summary 172.16.64.0 255.255.224.0
[r7-ospf-1-area-0.0.0.3]abr-summary 172.16.96.0 255.255.224.0
域外汇总:
[r12-ospf-1]asbr-summary 172.16.160.0 255.255.224.0
[r9-ospf-1]asbr-summary 172.16.128.0 255.255.224.0
测试:
2.特殊区域
完全末梢区域:
[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
[r3-ospf-1-area-0.0.0.1]stub no-summary
测试:
完全NSSA:
(1)
[r6-ospf-1-area-0.0.0.2]nssa
[r11-ospf-1-area-0.0.0.2]nssa
[r12-ospf-1-area-0.0.0.2]nssa
[r6-ospf-1-area-0.0.0.2]nssa no-summary
测试
(2)
[r7-ospf-1-area-0.0.0.3]nssa
[r8-ospf-1-area-0.0.0.3]nssa
[r9-ospf-1-area-0.0.0.3]nssa
[r7-ospf-1-area-0.0.0.3]nssa no-summary
测试:
R3、r5、r6、r7操作类似(正常上网缺省加nat,由于先优化,因此简化了步骤)
[r3]acl 2000
[r3-acl-basic-2000]rule permit source 172.16.0.0 0.0.255.255
[r3-GigabitEthernet0/0/1]nat outbound 2000
测试:
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。