1.配置area0公网环境,先让公网通
[r4]int Serial 1/0/0
[r4-Serial1/0/0]ip address 34.1.1.2 24
[r4-Serial1/0/0]int s1/0/1
[r4-Serial1/0/1]ip address 45.1.1.1 24
[r4-Serial1/0/1]int s2/0/0
[r4-Serial2/0/0]ip address 46.1.1.1 24
[r4-Serial2/0/0]int s2/0/1
[r4-Serial2/0/1]ip address 47.1.1.1 24
[r4-Serial2/0/1]int lo0
[r4-LoopBack0]ip address 4.4.4.4 24
[r3]int Serial 2/0/0
[r3-Serial2/0/0]ip address 34.1.1.1 24
[r3]int lo0
[r3-LoopBack0]ip address 3.3.3.3 24
[r5]int Serial 2/0/0
[r5-Serial2/0/0]ip address 45.1.1.2 24
[r5-Serial2/0/0]int lo0
[r5-LoopBack0]ip address 5.5.5.5 24
[r6]int Serial 2/0/0
[r6-Serial2/0/0]ip address 46.1.1.2 24
[r6-Serial2/0/0]int lo0
[r6-LoopBack0]ip address 6.6.6.6 24
[r7]int Serial 2/0/0
[r7-Serial2/0/0]ip address 47.1.1.2 24
[r7-Serial2/0/0]int lo0
[r7-LoopBack0]ip address 7.7.7.7 24
2.底层公网需要通(R3/5/6/7可以相互访问) —— 缺省指向R4
所有设备的ip配置完成后进入下一步,配置路由的缺省路由指向isp
[r3]ip route-static 0.0.0.0 0 34.1.1.2
[r5]ip route-static 0.0.0.0 0 45.1.1.1
[r6]ip route-static 0.0.0.0 0 46.1.1.1
[r7]ip route-static 0.0.0.0 0 47.1.1.1
3.搭建MGRE环境
利用NHRP协议完成MGRE多点
[R3]:tunnel-protocol gre p2mp
[R3]:source g 0/0/1
[R3]:nhrp netork-id 1
[R3]:nhrp entry multicast dynamic
[R3]:nhrp authentication cipher 123
[R3]:gre key 123
[R5]:tunnel-protocol gre p2mp
[R5]:source g 0/0/0
[R5]:nhrp netork-id 1
[R5]:nhrp entry multicast dynamic
[R5]:nhrp authentication cipher 123
[R5]:gre key 123
[R5]:nhrp entry 10.0.30.3 200.1.34.1 register
[R6]:tunnel-protocol gre p2mp
[R6]:source g 0/0/0
[R6]:nhrp netork-id 1
[R6]:nhrp entry multicast dynamic
[R6]:nhrp authentication cipher 123
[R6]:gre key 123
[R6]:nhrp entry 10.0.30.3 200.1.34.1 register
对其余区域的OSPF区域1、2的宣告就略过
4.对ofsp的区域进行配置协议
[r5]ospf 1 router-id 5.5.5.5
[r5-ospf-1]area0
[r5-ospf-1-area-0.0.0.0]network 45.1.1.0 0.0.0.255
[r5-ospf-1-area-0.0.0.0]network 5.5.5.0 0.0.0.255
改工作方式为broadcast,需要将R3/5/6/7都要改成一样。
干预DR/BDR选举,中心到站点结构要把DR控制在中心,所以要求R3为DR,并要求R5/6/7放弃选举。
查邻居关系是不是能正常建立起来:
[R3]int t0/0/0
[R3-Tunnel0/0/0]ospf network-type broadcast
[R5]int t0/0/0
[R5-Tunnel0/0/0]ospf network-type broadcast
[R5-Tunnel0/0/0]ospf dr-priority 0
[R6]int t0/0/0
[R6-Tunnel0/0/0]ospf network-type broadcast
[R6-Tunnel0/0/0]ospf dr-priority 0
[R7]int t0/0/0
[R7-Tunnel0/0/0]ospf network-type broadcast
[R7-Tunnel0/0/0]ospf dr-priority 0
5.解决不规则区域的路由
A4区域和RIP的路由在不规则区域,导致骨干区域学不到他们的路由,故需要使用多进程双向重发布来解决
解决方法:
1.先把RIP导入
[r12]ospf 1 router-id 12.12.12.12
[r12-ospf-1]import-route rip
[r12-ospf-1]rip 1
[r12-rip-1]version 2
[r12-rip-1]undo summary
[r12-rip-1]import-route ospf 1
2.再将R9的进程拆分成两个进程,再进行重发布
[r9]ospf 1 router-id 9.9.9.9
[r9-ospf-1]import-route ospf 2
[r9-ospf-1]import-route ospf 1
6.减少LSA的更新量 保证安全
[R1]ospf 1
[R1-ospf-1]area 1
[R1-ospf-1-area-0.0.0.1]stub
[R2]ospf 1
[R2-ospf-1]area 1
[R2-ospf-1-area-0.0.0.1]stub
[R3]ospf 1
[R3-ospf-1]area 1
[R3-ospf-1-area-0.0.0.1]stub no-summary
[R6]ospf 1
[R6-ospf-1]area 2
[R6-ospf-1-area-0.0.0.2]nssa no-summary
[R11]ospf 1
[R11-ospf-1]area 2
[R11-ospf-1-area-0.0.0.2]nssa
[R12]ospf 1
[R12-ospf-1]area 2
[R12-ospf-1-area-0.0.0.2]nssa
[R9]ospf 2
[R9-ospf-2]default-route-advertise
8.配置空接口防止环路,R3/6/7做nat
[r3]ip route-static 172.16.32.0 19 NULL 0
[r6]ip route-static 172.16.64.0 19 NULL 0
[r7]ip route-static 172.16.96.0 19 NULL 0
[r9]ip route-static 172.16.128.0 19 NULL 0
[r12]ip route-static 172.16.160.0 19 NULL 0
[R6]acl 2000
[R6-acl-basic-2000]rule permit source 172.16.0.0 0.0.255.255
[R6]int s2/0/0
[r6-Serial2/0/0]nat outbound 2000