步骤:
1.合理划分地址
2.根据所划分的地址给路由器配置IP地址和环回
3.R3—R5/R6/R7为MGRE环境,R3为中心站点,给边界路由器写缺省
R3为中心站点
[R3]int Tunnel 0/0/0
[R3-Tunnel0/0/0]ip address 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 entry multicast dynamic
[R3-Tunnel0/0/0]nhrp network-id 100
[R3]ip route-static 0.0.0.0 0 34.1.1.2
R5:
[R5]int Tunnel 0/0/0
[R5-Tunnel0/0/0]ip address 10.1.1.2 24
[R5-Tunnel0/0/0]tunnel-protocol gre p2mp
[R5-Tunnel0/0/0]source s4/0/1
[R5-Tunnel0/0/0]nhrp network-id 100
[R5-Tunnel0/0/0]nhrp entry 10.1.1.1 34.1.1.1 register
[R5]ip route-static 0.0.0.0 0 45.1.1.1
R6:
[R6]int Tunnel 0/0/0
[R6-Tunnel0/0/0]ip address 10.1.1.3 24
[R6-Tunnel0/0/0]tunnel-protocol gre p2mp
[R6-Tunnel0/0/0]source s4/0/1
[R6-Tunnel0/0/0]nhrp network-id 100
[R6-Tunnel0/0/0]nhrp entry 10.1.1.1 34.1.1.1 register
[R6]ip route-static 0.0.0.0 0 46.1.1.1
R7:
[R7]int Tunnel 0/0/0
[R7-Tunnel0/0/0]ip address 10.1.1.4 24
[R7-Tunnel0/0/0]tunnel-protocol gre p2mp
[R7-Tunnel0/0/0]source s4/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
[R7]ip route-static 0.0.0.0 0 47.1.1.1
4.启用ospf协议,area4为不规则区域,通过多进程双向重发布解决不规则区域问题
多进程双向重发布解决不规则区域问题
[R9]ospf 1 router-id 9.9.9.9
[R9-ospf-1]area 3
[R9-ospf-1-area-0.0.0.3]network 172.16.96.2 0.0.0.0
[R9]ospf 2 router-id 9.9.9.9
[R9-ospf-2]area 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.120.1 0.0.0.0
[R9]ospf 1
[R9-ospf-1]import-route ospf 2
[R9-ospf-1]q
[R9]ospf 2
[R9-ospf-2]import-route ospf 1
[R12]ospf 1 router-id 12.12.12.12
[R12-ospf-1]area 2
[R12-ospf-1-area-0.0.0.2]network 172.16.192.2 0.0.0.0
5.R12的两个环回通告进RIP中,并通过重发布引入ospf中
[R12]rip 1
[R12-rip-1]version 2
[R12-rip-1]undo summary
[R12-rip-1]network 172.16.0.0
[R12-rip-1]ospf 1
[R12-ospf-1]import-route rip
6.修改R3,R5,R6,R7上tunnel的工作模式,改为broadcast
[R5-ospf-1]int t 0/0/0
[R5-Tunnel0/0/0]ospf network-type broadcast
7.修改R3,R5,R6,R7的优先级,使R3成为DR
[R3-Tunnel0/0/0]ospf dr-priority 200
[R6-Tunnel0/0/0]ospf dr-priority 0
[R5-Tunnel0/0/0]ospf dr-priority 0
8.在R3,R6,R7边界路由器上做nat,进行地址转换,使所有设备均可访问R4的环回
[R1]ip route-static 0.0.0.0 0 172.16.0.2
[R2]ip route-static 0.0.0.0 0 172.16.32.2
[R8]ip route-static 0.0.0.0 0 172.16.64.1
[R9]ip route-static 0.0.0.0 0 172.16.96.1
[R10]ip route-static 0.0.0.0 0 172.16.128.1
[R11]ip route-static 0.0.0.0 0 172.16.160.1
[R12]ip route-static 0.0.0.0 0 172.16.192.1
[R3]acl 2000
[R3-acl-basic-2000]rule permit source 172.16.0.0 0.0.0.255
[R3-acl-basic-2000]rule permit source 172.16.32.0 0.0.0.255
[R3-acl-basic-2000]q
[R3]int s4/0/0
[R3-Serial4/0/0]nat outbound 2000
[R6]acl 2000
[R6-acl-basic-2000]rule permit source 172.160.0.0 0.0.0.255
[R6-acl-basic-2000]rule permit source 172.16.192.0 0.0.0.255
[R6-acl-basic-2000]q
[R6]int s4/0/1
[R6-Serial4/0/1]nat outbound 2000
[R7]acl 2000
[R7-acl-basic-2000]rule permit source 172.16.64.0 0.0.0.255
[R7-acl-basic-2000]rule permit source 172.16.96.0 0.0.0.255
[R7-acl-basic-2000]rule permit source 172.16.128.0 0.0.0.255
[R7-acl-basic-2000]q
[R7]int s4/0/0
[R7-Serial4/0/0]nat outbound 2000
9.在area1 区域上做完全末梢区域,减少非骨干区域的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
[R3-ospf-1-area-0.0.0.1]stub no-summary
10.在area2 区域上做完全NSSA,减少非骨干区域LSA的数量。在R12上做域外路由汇总,减少骨干区域LSA的数量
[R6]ospf 1
[R6-ospf-1]area 2
[R6-ospf-1-area-0.0.0.2]nssa
[R6-ospf-1-area-0.0.0.2]nssa no-summary
[R12-ospf-1]asbr-summary 172.16.176.0 255.255.240.0
11.为保证更新安全,在area1区域上做区域认证,在R9,R10上做接口认证
[R1]ospf 1
[R1-ospf-1]area 1
[R1-ospf-1-area-0.0.0.1]authentication-mode md5 1 cipher cisco
[R2-ospf-1]area 1
[R2-ospf-1-area-0.0.0.1]authentication-mode md5 1 cipher cisco
[R3-ospf-1]ospf 1
[R3-ospf-1]area 1
[R3-ospf-1-area-0.0.0.1]authentication-mode md5 1 cipher cisco
[R10]int s4/0/1
[R10-Serial4/0/1]ospf authentication-mode md5 1 cipher cisco
[R9]int s4/0/1
[R9-Serial4/0/1]ospf authentication-mode md5 1 cipher cisco
12.加快收敛速度
[R1]int g0/0/0
[R1-GigabitEthernet0/0/0]ospf timer hello 10
[R2]int g0/0/1
[R2-GigabitEthernet0/0/1]ospf timer hello 10
13.全网可达