路由重发布

###########################
单点单项、单点多项重发布 ##
###########################

 

#####################
R1与R2之间运行RIPv2##
R2与R3之间运行ospf ##
重发布使其互通     ##
#####################
R1

int s 0/0
address 192.168.12.1 255.255.255.0
no shutdown
int lo0
ip address 1.1.1.1 255.255.255.0
no shutdown
exit
router rip
version 2
network 192.168.12.1
network 1.1.1.1

###################################################
R2

int s 0/0
ip address 192.168.12.2 255.255.255.0
no shutdown
int lo0
ip address 2.2.2.2 255.255.255.0
no shutdown
exit
router rip
version 2
network 192.168.12.2

int s0/1
ip address 192.168.23.1 255.255.255.0
no shutdown
exit
router ospf 1
network 192.168.23.1 0.0.0.0 a 0
exit

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

conf ter
int s 0/0
ip address 192.168.23.3 255.255.255.0
no shutdown
int lo0
ip address 3.3.3.3 255.255.255.0
no shutdown
exit

router ospf 1
network 192.168.23.3 0.0.0.0 a 0
network 3.3.3.3 0.0.0.0 a 0
exit

int lo0
ip ospf network point-to-point
exit
 
#######################
注入路由从RIPv2到osfp##
注入路由从osfp到RIPv2##
#######################
R2

conf ter
router ospf 1
redistribute rip subnets

conf ter
router rip
version 2
redistribute ospf 1 metric 2

注意:如果R2上有静态路由会抢占rip路由
ip router 1.0.0.0 255.0.0.0 null 0

####################
重发布多个直连接口##
物理上是up        ##
协议上是up        ##
####################
R3

config ter
router ospf 1
no network 3.3.3.3 0.0.0.0 a 0
exit

router ospf 1
redistribute connected  subnets  metric 10  metric-type 1

#######################
静态路由             ##
R1、R2的RIPv2协议干掉##
#######################
R1

conf ter
no router rip

 

##############################################################
R2

conf ter
no router rip

ip route 1.1.1.0 255.255.255.0 192.168.12.1
exit
router ospf 1
edistribute static subnets

 

###################
多点多项重发布   ##
###################

 


 

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值