实验topo信息
要求:
1.R4为ISP,其上只能配置IP地址,R4与其他所有直连设备间均使用公有IP
2.R3.R5.R6.R7为MGRE环境,R3为中心站点
3.整个OSPF环境基于172.16.0.0/16进行划分 子网划分
4.所有设备均可访问R4环回 NAT转换
5.减少LSA更新量,加快收敛,保障更新安全 做特殊区域
6.全网可达
IP分配
以下依次为R1到R12
MGRE环境
在中心站点R3上
ip address 172.16.1.1 255.255.255.248
tunnel-protocol gre p2mp
source 34.0.0.1
ospf network-type p2mp
nhrp entry multicast dynamic
R5
ip address 172.16.1.2 255.255.255.248
tunnel-protocol gre p2mp
source Serial4/0/0
ospf network-type p2mp
nhrp entry 172.16.1.1 34.0.0.1 register
R6
interface Tunnel0/0/0
ip address 172.16.1.3 255.255.255.248
tunnel-protocol gre p2mp
source Serial4/0/0
ospf network-type p2mp
nhrp entry 172.16.1.1 34.0.0.1 register
R7
ip address 172.16.1.4 255.255.255.248
tunnel-protocol gre p2mp
source GigabitEthernet0/0/0
ospf network-type p2mp
nhrp entry 172.16.1.1 34.0.0.1 register
查看nhrp表
创建OSPF区域
1.在这个时候,宣告网段时,所有接口均在一个区域内的路由器可以进行范围宣告
2.如果一个路由器的多个接口不在一个区域内时。要使用精确宣告
NAT转换
R3
[r3]acl 2000
[r3-acl-basic-2000]rule permit source 172.16.0.0 0.0.255.255
[r3]in s4/0/0
[r3-Serial4/0/0]nat outbound 2000
R6
[r6]acl 2000
[r6-acl-basic-2000]rule permit source 172.16.0.0 0.0.255.255
[r6]in s4/0/0
[r6-Serial4/0/0]nat outbound 2000
R7
[r7]acl 2000
[r7-acl-basic-2000]rule permit source 172.16.0.0 0.0.255.255
[r7-acl-basic-2000]in g0/0/0
[r7-GigabitEthernet0/0/0]nat outbound 2000
特殊区域
R1/2
[r1]ospf 1—进入ospf进程
[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
area 0.0.0.1
abr-summary 172.16.32.0 255.255.224.0
stub no-summary
R6
ospf 1 router-id 6.6.6.6
area 0.0.0.0
network 172.16.0.0 0.0.3.255
area 0.0.0.2
abr-summary 172.16.64.0 255.255.224.0
network 172.16.65.1 0.0.0.0
nssa no-summary
R7
ospf 1 router-id 7.7.7.7
area 0.0.0.0
network 172.16.0.0 0.0.7.255
area 0.0.0.3
abr-summary 172.16.96.0 255.255.224.0
network 172.16.97.1 0.0.0.0
nssa no-summary