HCNA多区域OSPF配置

1、拓扑图

2、各路由器配置角本

 

ospf 多区域配置
#R5配置

sys
sysname AR5
interface s2/0/0
ip add 10.0.35.5 255.255.255.0
interface lo0
ip add 10.0.5.5 255.255.255.0
interface lo1
ip add 10.1.0.1 255.255.255.0
interface lo2
ip add 10.1.1.1 255.255.255.0
quit

ospf 1 router-id 10.0.5.5
bandwidth-reference 10000
area 1
network 10.0.5.5 0.0.0.0
network 10.1.0.1 0.0.0.0
network 10.1.1.1 0.0.0.0
area 0
network 10.0.35.0 0.0.0.255
authentication-mode md5 1 cipher huawei
quit

##########
R3配置:
##########
system-view
sysname AR3
interface lo0
ip add 10.0.3.3 255.255.255.0
interface s2/0/0
ip add 10.0.23.3 255.255.255.0
interface s2/0/1
ip add 10.0.35.3 255.255.255.0
quit
ospf 1 router-id 10.0.3.3
bandwidth-reference 10000
area 0
network 10.0.3.0 0.0.0.255
network 10.0.23.0 0.0.0.255
network 10.0.35.0 0.0.0.255
authentication-mode md5 1 cipher huawei
quit

###########
R2配置
###########

system-view
sysname AR2
interface s2/0/0
ip add 10.0.23.2 255.255.255.0
interface g0/0/0
ip add 10.0.124.2 255.255.255.0
interface lo0
ip add 10.0.2.2 255.255.255.0
quit
ospf 1 router-id 10.0.2.2
bandwidth-reference 10000
area 0
network 10.0.23.0 0.0.0.255
authentication-mode md5 1 cipher huawei
area 2
network 10.0.124.0 0.0.0.255
quit
dis ip int br
dis ospf br

#####
R4
#####
sys
sysname AR4
interface lo0
ip add 10.0.4.4 255.255.255.0
interface g0/0/0
ip add 10.0.124.4 255.255.255.0
quit
ospf 1 router-id 10.0.4.4
bandwidth-reference 1000
area 2
network 10.0.4.0 0.0.0.255
network 10.0.124.0 0.0.0.255
quit

##########
R1
#######

system-view
sysname AR1
int g0/0/0
ip add 10.0.124.1 255.255.255.0
int lo0
ip add 10.0.1.1 255.255.255.0
int lo1
ip add 10.2.0.1 255.255.255.0
int lo2
ip add 10.2.1.1 255.255.255.0
quit
ospf 1 router-id 10.0.1.1
bandwidth-reference 1000
area 2
network 10.0.124.0 0.0.0.255
network 10.0.1.0 0.0.0.255
network 10.2.0.0 0.0.0.255
network 10.2.1.0 0.0.0.255
quit

 

posted @ 2017-12-29 10:31  JUSTZHI  阅读(751)  评论(0编辑  收藏  举报