题目:
- ? ? ? ??R4为ISP,其上只能配置IP地址;R4与其他所有直连设备间使用公有IP
- ??? ? ? R3---R5/6/7为MGRE环境,R3为中心点
- ????????整个OSPF环境IP地址为172.16.0.0/16
- ????????所有设备均可访问R4的环回
- ????????减少LSA的更新量,加快收敛,保障更新安全
- ????????全网可通
????????????????
一:配置环回接口和IP
????????????????
二:配置缺省路由,使公网可通
R5:
ip route-static 0.0.0.0 0 45.1.1.2
R3:
ip route-static 0.0.0.0 0 34.1.1.2
R6:
ip route-static 0.0.0.0 0 46.1.1.2
R7
ip route-static 0.0.0.0 0 47.1.1.2
三:配置MGRE:
? ? ?? ??R3---R5/6/7为MGRE环境,R3为中心点
??? ? ? 对R3的配置
int tunnel 0/0/0
ip add 172.16.0.129 29??
tunnel-protocol gre p2mp
souce? 34.1.1.1[此处可以写接口的IP,也可以写接口]\
nhrp entry multicast dynamic
nhrp network-id 100
? ? ? ? 对R5的配置
int tunnel 0/0/0
ip add 172.16.0.130 29
tunnel-protocol ger p2mp
souce 45.1.1.1
nhrp entry 172.16.0.129 34.1.1.1 register
nhrp network-id 100?????????
? ? ? ? 对R6的配置:
?nt tunnel 0/0/0
ip add 172.16.0.131?29
tunnel-protocol ger p2mp
souce 46.1.1.1
nhrp entry 172.16.0.129 34.1.1.1 register
nhrp network-id 100????
? ? ? ? 对R7的配置
int tunnel 0/0/0
ip add 172.16.0.132?29
tunnel-protocol ger p2mp
souce 47.1.1.1
nhrp entry 172.16.0.129 34.1.1.1 register
nhrp network-id 100????
四:起OSPF
?????????
R1:
ospf 1 router-id 1.1.1.1
area 1
network 172.16.0.0 0.0.255.255
R2
ospf 1 router-id 2.2.2.2
area 1
network 172.16.0.0 0.0.255.255
R3
ospf 1 router-id 3.3.3.3
area 0
network 172.16.0.129 0.0.0.0
area 1
network 172.16.32.0 0.0.3.255
R5
ospf 1 router-id 5.5.5.5
area 0
network 172.16.0.0 0.0.255.255
R6
ospf 1 router-id 6.6.6.6
area 0
network 172.16.0.0 0.0.255.255
R7
ospf 1 router-id 7.7.7.7
area 0
network 172.16.0.0 0.0.3.255
area 3
network 172.16.96.1 0.0.0.0
R8
ospf 1 router-id 8.8.8.8
area 3
network 172.16.0.0 0.0.255.255
R9
ospf 1 router-id 7.7.7.7
area 3
network 172.16.96.6 0.0.0.0
area 4
network 172.16.128.0 0.0.1.255
R10
ospf 1 router-id 10.10.10.10
area 4
network 172.16.0.0 0.0.255.255
R11
ospf 1 router-id 10.10.10.10
area 2
network 172.16.0.0 0.0.255.255
R12
ospf 1 router-id 12.12.12.12
area 2
network 172.16.64.6 0.0.0.0
rip 1
ver 2
network 172.16.0.0
五:修改area0 的接口网络类型并选举出DR
对R3:
int tunnel 0/0/0
ospf network-type broadcast
?对R5,R6,R7
int tunnel 0/0/0
ospf network-type broadcast
ospf dr-priority 0
六: 对R12,R9配置,进行重发布
? ? ? ? 对R12
ospf 1
import-route rip 1
对R9:在OSPF 1 中将区域4 的连接给删除,在建立一个新的OSPF 2,在OSPF2中将r9 与R10连接在一起,然后将OSPF2到上去且OSPF1不会倒下来。
?删除OSPF 1中的area 4
ospf 1
area 4
undo?network 172.16.128.0 0.0.1.255
退出
ospf 2
area 4
network 172.16.128.0 0.0.1.255
ospf 1
import-route ospf 2
七:将各个区域汇总成一条传给区域0
?对于整个拓扑图中的区域,分为域间汇总和域外汇总,域间汇总是由R3,R6,R7传递的,而刚刚将area4 和R12连接的rip设为了重发布,算作域外的。
域间的:
R3;
ospf 1
area 1
abr-summary 172.16.32.0 255.255.224.0
R6;
ospf 1
area 1
abr-summary 172.16.64.0 255.255.224.0
R7;
ospf 1
area 1
abr-summary 172.16.96.0 255.255.224.0
域外的
R9:
ospf 1
asb-summary 172.16.128.0 255.255.224.0
R12:
ospf 1
asb-summary 172.16.160.0 255.255.224.0
八:配置末梢区域
R1,R2:
R3:配置完全末梢
?
?R11,R12:
?R6,R7:配置完全NSSA
????????
?R8,R9:
?九:在R3/R6/R7上配置动态nat,使他全网可达
acl 2000
rule permit source 172.16.0.0 0.0.255.255
int s4/0/0
nat outbond 2000
十:对R3/R6/R7/R9/R12设置空接口,防环
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.128.0 19 NULL 0
十一:实验结果:
?
|