ospf

################
配置为常规区域##
################

R1

conf ter
int s 0/0
ip add 192.168.12.1 255.255.255.0
no shut

int lo0
ip add 1.1.1.1 255.255.255.0
no shut
exit

router os 1
network 192.168.12.1 0.0.0.0 a 1
network 1.1.1.1 0.0.0.0 a 1
exit

#######################################

R2

conf ter
int s 0/0
ip add 192.168.12.2 255.255.255.0
no shut

int s 0/1
ip add 192.168.23.2 255.255.255.0
no shut

int lo0
ip add 2.2.2.2 255.255.255.0
no shut
exit

router os 1
network 192.168.12.2 0.0.0.0 a 1
network 192.168.23.2 0.0.0.0 a 0
 
exit

######################################

R3

conf ter
int s 0/0
ip add 192.168.23.3 255.255.255.0
no shut

int s 0/1
ip add 192.168.34.3 255.255.255.0
no shut

int lo0
ip add 3.3.3.3 255.255.255.0
no shut
exit

router os 1
network 192.168.23.3 0.0.0.0 a 0
network 192.168.34.3 0.0.0.0 a 2

exit

####################################

R4

conf ter
int s 0/0
ip add 192.168.34.4 255.255.255.0
no shut

int lo0
ip add 4.4.4.4 255.255.255.0
no shut
exit

router os 1
network 192.168.34.4 0.0.0.0 a 2
exit


#################
R4注入外部路由 ##
#################
R4

config ter
router os 1
redistribute connected subnets


######################
配置特殊区域精简路由##
######################

 

###############################
1 area1(R1R2)配置为stub区域##
引入默认路由                 ##
不允许有loopback外部接口     ##
###############################
R1

config ter
router os 1
area 1 stub
exit

##########################################
R2
config ter
router os 1
area 1 stub
exit

###############################
1 area1配置totally stub area ##
在abr(R2)上操作            ##
不允许有loopback外部接口     ##
###############################
R2

config ter
router os 1
area 1 stub no-summary

#################################
3 恢复area1(R1 R2)为常规区域 ##
R1的loopback0改为重复布注入    ##
area2设置为nssa区域            ##
#################################
R1

config ter
router os 1
no area 1 stub
exit

router os 1
no network 1.1.1.1 0.0.0.0 a 1
exit

config ter
router os 1
redistribute connected subnets

##################################
R4

config ter
router os 1
Area 2 nssa
exit

#################################
R3

config ter
router os 1
Area 2 nssa
Area 2 nssa default-information-originate
exit


#################################
4 设置为totally-nssa区域       ##
去掉R2的默认路由               ##
由ABR自动产生路由              ##
#################################
R3

config ter
router os 1
no Area 2 nssa default-information-originate
Area 2 nssa no-summary
exit


 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值