1.R4为Isp,其上只能配置IP地址;R4与其他所有直连设备间使用公有IP;
2.R3-----R5/6/7为MGRE环境,R3为中心站点
3.整个OSPF环境地址为172.16.0.0/16
4.所有设备均可访问R4的环回
5.减少LSA的更新量,加快收敛,保障更新安全
6.全网可达
区域0:
172.16.64.0/21
172.16.72.0/21
172.16.80.0/21
172.16.88.0/21
区域1:
172.16.32.0/21
172.16.40.0/21
172.16.48.0/21
172.16.56.0/21
区域2:
172.16.96.0/21
172.16.104.0/21
172.16.112.0/21
区域3:
172.16.128.0/21
172.16.136.0/21
172.16.144.0/21
区域4:
172.16.160.0/21
172.16.168.0/21
172.16.176.0/21
R4:
R3:
[r3-GigabitEthernet0/0/1]ip address 34.1.1.1 24
R5:
[r5-GigabitEthernet0/0/0]ip address 45.1.1.1 24
R6:
[r6-GigabitEthernet0/0/0]ip address 46.1.1.1 24
R7:
[r7-GigabitEthernet0/0/0]ip address 47.1.1.1 24
测试一下R4是否能ping通:
[r4]ping 45.1.1.1 PING 45.1.1.1: 56 data bytes, press CTRL_C to break Reply from 45.1.1.1: bytes=56 Sequence=1 ttl=255 time=160 ms Reply from 45.1.1.1: bytes=56 Sequence=2 ttl=255 time=90 ms Reply from 45.1.1.1: bytes=56 Sequence=3 ttl=255 time=40 ms Reply from 45.1.1.1: bytes=56 Sequence=4 ttl=255 time=60 ms Reply from 45.1.1.1: bytes=56 Sequence=5 ttl=255 time=30 ms [r4]ping 46.1.1.1 PING 46.1.1.1: 56 data bytes, press CTRL_C to break Reply from 46.1.1.1: bytes=56 Sequence=1 ttl=255 time=130 ms Reply from 46.1.1.1: bytes=56 Sequence=2 ttl=255 time=80 ms Reply from 46.1.1.1: bytes=56 Sequence=3 ttl=255 time=30 ms Reply from 46.1.1.1: bytes=56 Sequence=4 ttl=255 time=1 ms Reply from 46.1.1.1: bytes=56 Sequence=5 ttl=255 time=60 ms [r4]ping 47.1.1.1 PING 47.1.1.1: 56 data bytes, press CTRL_C to break Reply from 47.1.1.1: bytes=56 Sequence=1 ttl=255 time=70 ms Reply from 47.1.1.1: bytes=56 Sequence=2 ttl=255 time=50 ms Reply from 47.1.1.1: bytes=56 Sequence=3 ttl=255 time=30 ms Reply from 47.1.1.1: bytes=56 Sequence=4 ttl=255 time=30 ms Reply from 47.1.1.1: bytes=56 Sequence=5 ttl=255 time=30 ms2.接着给R3/5/6/7写缺省:
R3:
[r3]ip route-static 0.0.0.0 0 34.1.1.2
R5:
[r5]ip route-static 0.0.0.0 0 45.1.1.2
R6:
[r6]ip route-static 0.0.0.0 0 46.1.1.2
R7:
[r7]ip route-static 0.0.0.0 0 47.1.1.2
测试一下:
[r3]ping 45.1.1.1 PING 45.1.1.1: 56 data bytes, press CTRL_C to break Reply from 45.1.1.1: bytes=56 Sequence=1 ttl=254 time=80 ms Reply from 45.1.1.1: bytes=56 Sequence=2 ttl=254 time=30 ms Reply from 45.1.1.1: bytes=56 Sequence=3 ttl=254 time=80 ms Reply from 45.1.1.1: bytes=56 Sequence=4 ttl=254 time=50 ms Reply from 45.1.1.1: bytes=56 Sequence=5 ttl=254 time=60 ms [r3]ping 46.1.1.1 PING 46.1.1.1: 56 data bytes, press CTRL_C to break Reply from 46.1.1.1: bytes=56 Sequence=1 ttl=254 time=110 ms Reply from 46.1.1.1: bytes=56 Sequence=2 ttl=254 time=130 ms Reply from 46.1.1.1: bytes=56 Sequence=3 ttl=254 time=90 ms Reply from 46.1.1.1: bytes=56 Sequence=4 ttl=254 time=120 ms Reply from 46.1.1.1: bytes=56 Sequence=5 ttl=254 time=60 ms [r3]ping 47.1.1.1 PING 47.1.1.1: 56 data bytes, press CTRL_C to break Reply from 47.1.1.1: bytes=56 Sequence=1 ttl=254 time=70 ms Reply from 47.1.1.1: bytes=56 Sequence=2 ttl=254 time=110 ms Reply from 47.1.1.1: bytes=56 Sequence=3 ttl=254 time=80 ms Reply from 47.1.1.1: bytes=56 Sequence=4 ttl=254 time=70 ms Reply from 47.1.1.1: bytes=56 Sequence=5 ttl=254 time=130 ms3.开始配置MGRE环境:
R3:
[r3]interface Tunnel 0/0/0 [r3-Tunnel0/0/0]ip address 172.16.0.1 255.255.252.0 [r3-Tunnel0/0/0]tunnel-protocol gre p2mp [r3-Tunnel0/0/0]source 34.1.1.1 [r3-Tunnel0/0/0]ospf network-type p2mp [r3-Tunnel0/0/0]nhrp entry multicast dynamic [r3-Tunnel0/0/0]nhrp network-id 100
R5:
[r5]interface Tunnel 0/0/0 [r5-Tunnel0/0/0]ip address 172.16.0.2 255.255.252.0 [r5-Tunnel0/0/0]tunnel-protocol gre p2mp [r5-Tunnel0/0/0]source 45.1.1.1 [r5-Tunnel0/0/0]nhrp network-type p2mp [r5-Tunnel0/0/0]nhrp network-id 100 [r5-Tunnel0/0/0]nhrp entry 172.16.0.1 34.1.1.1 register
R6:
[r6]interface Tunnel 0/0/0 [r6-Tunnel0/0/0]ip address 172.16.0.3 255.255.252.0 [r6-Tunnel0/0/0]tunnel-protocol gre p2mp [r6-Tunnel0/0/0]source 46.1.1.1 [r6-Tunnel0/0/0]nhrp network-type p2mp [r6-Tunnel0/0/0]nhrp network-id 100 [r6-Tunnel0/0/0]nhrp entry 172.16.0.1 34.1.1.1 register
R7:
[r7]interface Tunnel 0/0/0 [r7-Tunnel0/0/0]ip address 172.16.0.4 255.255.252.0 [r7-Tunnel0/0/0]tunnel-protocol gre p2mp [r7-Tunnel0/0/0]source 47.1.1.1 [r7-Tunnel0/0/0]nhrp network-type p2mp [r7-Tunnel0/0/0]nhrp network-id 100 [r7-Tunnel0/0/0]nhrp entry 172.16.0.1 34.1.1.1 register
测试一下能否ping通:
[r3]ping -a 172.16.0.1 172.13.0.2 PING 172.16.0.2: 56 data bytes, press CTRL_C to break Reply from 172.16.0.2: bytes=56 Sequence=1 ttl=254 time=70 ms Reply from 172.16.0.2: bytes=56 Sequence=2 ttl=254 time=80 ms Reply from 172.16.0.2: bytes=56 Sequence=3 ttl=254 time=40 ms Reply from 172.16.0.2: bytes=56 Sequence=4 ttl=254 time=60 ms Reply from 172.16.0.2: bytes=56 Sequence=5 ttl=254 time=60 ms4.开始进行OSPF配置
将R9上的172.16.104.2宣告进OSPF1中:
[r9]ospf 1 router-id 9.9.9.9 [r9-ospf-1]import-route ospf 2 [r9-ospf-1]area 0.0.0.3 [r9-ospf-1-area-0.0.0.3]network 172.16.104.2 0.0.0.0
将a4的其他接口宣告进ospf2中:
[r9]ospf 2 router-id 9.9.9.9 [r9-ospf-2]import-route ospf 1 [r9-ospf-2]area 0.0.0.4 [r9-ospf-2-area-0.0.0.4]network 172.16.128.1 0.0.0.0 [r9-ospf-2-area-0.0.0.4]network 172.16.136.1 0.0.0.0 [R10]ospf 2 router-id 10.10.10.10 [R10-ospf-2]area 0.0.0.4 [R10-ospf-2-area-0.0.0.4]network 172.16.128.2 0.0.0.0 [R10-ospf-2-area-0.0.0.4]network 172.16.144.1 0.0.0.0
在非法的ABR上进行多进程重发布:
[R9-ospf-1]import-route ospf 2 [R9-ospf-1]import-route ospf 1
将R12的RIP路由重发布进ospf区域内
[r12]rip 1 [r12-rip-1]ver 2 [r12-rip-1]network 172.16.0.0第四步:优化网络,尽量减少LSA更新量:
1.先汇总R3,R6,R7上的三类LSA:
R3:
[r3]ospf 1 [r3-ospf-1]area 1 [r3-ospf-1-area-0.0.0.1]abr-summary 172.16.32.0 255.255.224.0
R6:
[r6]ospf 1 [r6-ospf-1]area 2 [r6-ospf-1-area-0.0.0.1]abr-summary 172.16.96.0 255.255.224.0
R7:
[r7]ospf 1 [r7-ospf-1]area 3 明细路由所在区域 [r7-ospf-1-area-0.0.0.1]abr-summary 172.16.128.0 255.255.224.0
2.将5类和7类LSA进行汇总:
R9:
[r9]ospf 1 [r9-ospf-1]asbr-summary 172.16.160.0 255.255.224.0
R12:
[r12]ospf 1 [r12-ospf-1]asbr-summary 172.16.192.0 255.255.224.0
3.将区域1设置末梢区域
R1:
[r1]ospf 1 [r1-ospf-1]area 1 [r1-ospf-1-area-0.0.0.1]stub
R2:
[r2]ospf 1 [r2-ospf-1]area 1 [r2-ospf-1-area-0.0.0.1]stub
R3:
[r3ospf 1 [r3-ospf-1]area 1 [r3-ospf-1-area-0.0.0.1]stub [r3-ospf-1-area-0.0.0.1]stub no-summary
4.将区域2和区域3设置NSSA
区域二:
R6:
r6]ospf 1 [r6-ospf-1]area 2 [r6-ospf-1-area-0.0.0.1]nssa [r6-ospf-1-area-0.0.0.1]nssa no-summary
R11:
[r11]ospf 1 [r11-ospf-1]area 2 [r11-ospf-1-area-0.0.0.1]nssa
R16:
[r12]ospf 1 [r12-ospf-1]area 2 [r12-ospf-1-area-0.0.0.1]nssa
区域三:
R7:
[r7]ospf 1 [r7-ospf-1]area 3 [r7-ospf-1-area-0.0.0.1]nssa [r7-ospf-1-area-0.0.0.1]nssa no-summary
R8:
[r8]ospf 1 [r8-ospf-1]area 3 [r8-ospf-1-area-0.0.0.1]nssa
R9:
[r9]ospf 1 [r9-ospf-1]area 3 [r9-ospf-1-area-0.0.0.1]nssa最后一步,环回
[r3]ip route-static 172.16.32.0 22 NULL 0 [r6]ip route-static 172.16.96.0 22 NULL 0 [r7]ip route-static 172.16.128.0 22 NULL 0 [r9]ip route-static 172.16.160.0 22 NULL 0 [r12]ip route-static 172.16.192.0 22 NULL 0完成!
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)