HCIP实验(7)

 

网络搭建好了,第一步是用172.16.0.0/16的网段进行区域划分。OSPF的区域会进行汇总,所以把每个区域的路由当作一个网段,加上Rip一共有6个。

AR3:
sys
sys r3
int s 4/0/0
ip ad 34.0.0.1 24
ip route-static 0.0.0.0 0 34.0.0.2

AR4:
sys
sys isp
int s 4/0/0
ip ad 34.0.0.2 24
int s 4/0/1
ip ad 45.0.0.2 24
int s 3/0/0
ip ad 46.0.0.2 24
int g 0/0/00
ip ad 47.0.0.2 24
int lo0
ip ad 4.4.4.4 24

AR5:
sys
sys r5
int s 4/0/0 
ip ad 45.0.0.1 24
ip route-static 0.0.0.0 0 45.0.0.2

AR6:
sys
sys r6
int s 4/0/0
ip ad 46.0.0.1 24
ip route-static 0.0.0.0 0 46.0.0.2

AR7:
sys
sys r7
int g 0/0/0
ip ad 47.0.0.1 24
ip route-static 0.0.0.0 0 47.0.0.2

第二步进行mgre的配置

AR3:
int t 0/0/0
ip ad 172.16.1.1 29
tunnel-protocol gre p2mp
source  34.0.0.1
nhrp network-id 100
nhrp entry multicast dynamic

AR5:
int t 0/0/0
ip ad 172.16.1.2 29
tunnel-protocol gre p2mp
source  serial 4/0/0
nhrp network-id 100
nhrp entry 172.16.1.1 34.0.0.1 register
int lo0
ip ad 172.16.2.1 24

AR6:
int t 0/0/0
ip ad 172.16.1.3 29
tunnel-protocol gre p2mp
source  serial 4/0/0
nhrp network-id 100
nhrp entry 172.16.1.1 34.0.0.1 register
int lo0
ip ad 172.16.3.1 24

AR7:
int t 0/0/0
ip ad 172.16.1.4 29
tunnel-protocol gre p2mp
source  g 0/0/0
nhrp network-id 100
nhrp entry 172.16.1.1 34.0.0.1 register

 进行area1区域的配置

AR1:
sys
sys r1
int g 0/0/0
ip ad 172.16.33.1 29
int lo0
ip ad 172.16.34.1 24

AR2:
sys
sys r2
int g 0/0/0
ip ad  172.16.33.2 29
int lo0
ip ad 172.16.35.1 24

AR3:
int g 0/0/0
ip ad  172.16.33.3 29
int lo0
ip ad 172.16.36.1 24

 进行area2区域的配置

AR6:
sys
int g 0/0/0
ip ad 172.16.65.1 29

AR11:
sys 
sys r11
int g 0/0/0
ip ad 172.16.65.2 29
int lo0
ip ad 172.16.66.1 24
int g 0/0/1
ip ad 172.16.65.9 29

AR12:
sys 
sys r12
int g 0/0/0
ip ad 172.16.65.10 29
int lo0
ip ad 172.16.160.1 20
int lo1
ip ad 172.16.176.1 20

进行area3的配置

AR7:
sys
int g 0/0/1
ip ad 172.16.97.1 29

AR8:
sys
sys r8
int g 0/0/0
ip ad 172.16.97.2 29
int lo0
ip ad 172.16.98.1 24
int g 0/0/1
ip ad 172.16.97.9 29

AR9:
sys
sys r9
int g 0/0/0
ip ad 172.16.97.10 29

进行area4区域的配置

AR9:
sys
int g 0/0/1
ip ad 172.16.129.1 29
int lo0
ip ad 172.16.130.1 24

AR10:
sys
sys r10
int g 0/0/0
ip ad 172.16.129.2 29
int lo0
ip ad 172.16.131.1 24

ospf配置:
AR1:
ospf 1 router-id 1.1.1.1
area 1
network 172.16.0.0 0.0.255.255

AR2:
ospf 1 router-id 2.2.2.2
area 1
network 172.16.0.0 0.0.255.255

AR3:
ospf 1 router-id 3.3.3.3
area 1
network 172.16.32.0 0.0.7.255
area 0
network 172.16.1.1 0.0.0.0

AR5:
sys
ospf 1 router-id 5.5.5.5
area 0
network 172.16.0.0 0.0.255.255

AR6:
ospf 1 router-id 6.6.6.6
area 0
network 172.16.0.0 0.0.3.255
area 2
network 172.16.65.1 0.0.0.0  

AR11:
ospf 1 router-id 11.11.11.11
area 2
network 172.16.0.0 0.0.255.255

AR12:
ospf 1 router-id 12.12.12.12
area 2
network 172.16.65.10 0.0.0.0
q
rip
v 2
network 172.16.0.0

AR7:
ospf 1 router-id 7.7.7.7
area 0
network 172.16.0.0 0.0.7.255
area 3
network 172.16.97.1 0.0.0.0

AR8:
ospf 1 router-id 8.8.8.8
area 3 
network 172.16.0.0 0.0.255.255

AR9:
ospf 1 router-id 9.9.9.9
area 3
network 172.16.97.10 0.0.0.0

AR3:
int t 0/0/0
ospf network-type p2mp

AR5:
int t 0/0/0
ospf network-type p2mp

AR6:
int t 0/0/0
ospf network-type p2mp

AR7:
int t 0/0/0
ospf network-type p2mp


进行area4区域的配置
AR9:
undo a 4
ospf 2 router-id 9.9.9.9
a 4
network 172.16.128.0 0.0.3.255
q
ospf 1
import-route ospf 2

开始优化路由器


AR3:
ospf
a 1
abr-summary 172.16.32.0
将AR3发给area0的路由汇总成一条

AR6:
ospf
a 2
abr-summary 172.16.64.0 255.255.224.0

AR7:
ospf 1
a 3
abr-summary 172.16.96.0 255.255.224.0

AR12:
ospf
asbr-summary 172.16.160.0 255.255.224.0

AR9:
ospf 1
asbr-summary 172.16.128.0 225.225.224.0

将area1变成末梢区域
AR1:
ospf
a 1
stub

AR2:
ospf 
a 1
stub

AR3:
ospf 1 
a 1
stub no-summary
将area1变成完全末梢区域

配置area2
AR6:
ospf 
a 2
nssa no-summary

AR11:
ospf 1
a 2
nssa

AR12:
ospf 1
a 2
nssa
区域2配置成完全末梢区域
 

在边界设备上实现NAT
AR3:
acl 2000
rule permit source 172.16.0.0 0.0.255.255
q
int s 4/0/0
nat outbound 2000

AR7:
acl 2000
rule permit source 172.16.0.0 0.0.255.255
int g 0/0/0
nat outbound 2000

实验完成.

 

 

 

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值