云计算网络OSPF进阶拓扑

基于172.16.0.0/16划分OSPF网络

子网划分        【0.0/19,32.0/19,64.0,96.0,128.0】

[r1]【因为许多配置相似,所以前缀的试图模式不标记】

int g 0/0/0

0/0/0]ip ad 172.16.35.1 29

int l 0       【环回接口】

-LoopBack0]ip ad 172.16.32.1 24

-LoopBack0]ospf network-type broadcast          【修改接口类型】

[r2]int g 0/0/0

ip ad 172.16.35.2 29

int l 0

ip ad 172.16.33.1 24

ospf network-type broadcast

[r3]int g 0/0/0

ip ad 172.16.35.3 29

int g 0/0/1

ip ad 172.16.0.1 30

int l 0

ip ad 172.16.34.1 24

ospf network-type broadcast

[r4]int g 0/0/0

ip ad 172.16.0.9 30

int g 0/0/1

ip ad 172.16.0.2 30

int g 0/0/2

ip ad 172.16.0.5 30

int s 4/0/1

ip ad 45.0.0.1 30

外网配置

[r5]int s 4/0/0

ip ad 45.0.0.2 30

int l 0           【环回接口】

ip ad 100.1.1.1 24

[r6]int g 0/0/0

ip ad 172.16.66.1 30

int g 0/0/1

ip ad 172.16.0.6 30

int l 0

ip ad 172.16.64.1 24

ospf network-type broadcast

[r7]int g 0/0/0

ip ad 172.16.0.10 30

int g 0/0/1

ip ad 172.16.98.1 30

int l 0

ip ad 172.16.96.1 24

ospf network-type broadcast

[r8]int g 0/0/0

ip ad 172.16.98.2 30

int g 0/0/1

ip ad 172.16.98.65 30

int l 0

ip ad 172.16.97.1 24

ospf network-type broadcast

[r9]int g 0/0/0

ip ad 172.16.98.6 30

int g 0/0/1

ip ad 172.16.130.1 30

int l 0

ip ad 172.16.128.1 24

ospf network-type broadcast

[r10]int g 0/0/0

ip ad 172.16.130.2 30

int l 0

ip ad 172.16.129.1 24

ospf network-type broadcast

[r11]int g 0/0/0

ip ad 172.16.66.2 30

int g 0/0/1

ip ad 172.16.66.5 30

int l 0

ip ad 172.16.65.1 24

ospf network-type broadcast

[r12]int g 0/0/0

ip ad 172.16.66.6 30

int l 0

ip ad 10.1.1.1 24

int l 1

ip ad 10.1.2.1 24

ospf network-type broadcast

[r1 — r4,r6 — r9,r10 — r11]

ospf 1 router-id 1.1.1.1  启动OSPF并配置独立IP【1.1.1.1,2.2.2.2】

area 0宣告范围0【1-4】

network 172.16.32.1 0.0.0.0

network 172.16.35.1 0.0.0.0          【宣告所有的int g 配置的IP地址】

因为区域4远离骨干,所以r9配置完区域3后要使用ospf2多配置一下区域4

[r9]

ospf 2 router-id 9.9.9.9

a 4

net 172.16.128.1 0.0.0.0

net 172.16.130.1 0.0.0.0

[r12]因为要重传机制,配置要改变

ospf 2 router-id 12.12.12.12

a 2

net 172.16.66.6 0.0.0.0

[r12]rip 1

[r12-rip-1]ver 2

[r12-rip-1]net 10.0.0.0

r9配置结果[r9]dis ospf peer b

rip重发布操作配置

[r9-ospf-1]import-route ospf 2    ---将OSPF进程2的路由信息引入到OSPF进程1

[r12-ospf-1]import-route rip 1

[r4]ip route-static 0.0.0.0 0 45.0.0.2    【缺省路由】这里r4先不要下发缺省路由

R5作为ISP外网【已经配置了】,R4作为边界路由器

访问外网不能有私有路由,边界路由器用acl

[r4]acl 2000

[r4-acl-basic-2000]ru p s 172.16.0.0 0.0.255.255

4/0/1]nat o 2000

让其他路由器可以访问r5环回接口

[r3]ospf 1

area 1

abr-summary 172.16.32.0 255.255.224.0   汇总

[r6]ospf 1

area 2

abr-summary 172.16.64.0 255.255.224.0

[r7]ospf 1

area 3

abr-summary 172.16.96.0 255.255.224.0

[r12]ospf 1

asbr-summary 10.1.0.0 255.255.252.0

[r9]ospf 1

asbr-summary 172.16.128.0 255.255.224.0

r4汇总配置结果[r4]dis ip ro pro ospf

配置末梢区域---Stub区域,实现内网的全网可达

[r1-ospf-1-area-0.0.0.1]stub

[r2-ospf-1-area-0.0.0.1]stub

[r3-ospf-1-area-0.0.0.1]stub no-summary     —进一步拒绝三类LSA

[r6-ospf-1-area-0.0.0.2]nssa no-summary

[r11-ospf-1-area-0.0.0.2]nssa

[r12-ospf-1-area-0.0.0.2]nssa

[r7-ospf-1-area-0.0.0.3]nssa no-summary

[r8-ospf-1-area-0.0.0.3]nssa

[r9-ospf-1-area-0.0.0.3]nssa

[r9]ospf 2

default-route-advertise    —非强制下放缺省路由

[r4]ospf 1

default-route-advertise

减少LSA更新量,加快收敛

r3和r4改为p2p

[r3和r4]int g 0/0/1

ospf network-type p2p

        [r3-LoopBack0]ospf network-type p2p ---修改OSPF接口网络类型【broadcast,nbma,p2mp,p2p

area1的改为p2mp

[r1,r2,r3]int g 0/0/0

ospf network-type p2mp

ospf timer hello 10     —修改hello包时间

保障网络安全

[r3,r6,r7]ospf 1

a 0

authentication-mode md5 1 cipher 123456   —密码认证保证更新安全

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值