#lab Redis1# OSPF和RIP互相重分布
实验拓扑:
配置:
R1-
interface Serial1/0
ip address 12.1.1.1 255.255.255.0
serial restart-delay 0
clock rate 1008000
!
interface Serial1/1
ip address 13.1.1.1 255.255.255.0
serial restart-delay 0
clock rate 1008000
!
router ospf 110
router-id 1.1.1.1
log-adjacency-changes
redistribute rip subnets //RIP重分布进OSPF,默认metric是20
network 13.1.1.0 0.0.0.255 area 0
!
router rip
version 2
redistribute ospf 110 metric 1 //OSPF重分布进RIP,默认metric无穷大,所以需要修改
network 12.0.0.0
no auto-summary
!
R2-
interface Loopback0
ip address 2.2.2.2 255.255.255.0
!
interface Serial1/0
ip address 12.1.1.2 255.255.255.0
serial restart-delay 0
!
router rip
version 2
network 2.0.0.0
network 12.0.0.0
no auto-summary
!
R3-
interface Loopback0
ip address 3.3.3.3 255.255.255.0
!
interface Serial1/0
ip address 13.1.1.3 255.255.255.0
serial restart-delay 0
!
router ospf 110
router-id 3.3.3.3
log-adjacency-changes
network 3.3.3.0 0.0.0.255 area 0
network 13.1.1.0 0.0.0.255 area 0
!
实验结果:
#lab Redis2# 静态路由重分布进RIP
实验拓扑:
配置:
R1-
interface FastEthernet0/0
ip address 200.1.1.1 255.255.255.0
duplex auto
speed auto
!
interface Serial1/0
ip address 12.1.1.1 255.255.255.0
serial restart-delay 0
clock rate 1008000
!
interface Serial1/1
ip address 13.1.1.1 255.255.255.0
serial restart-delay 0
clock rate 1008000
!
router ospf 110
router-id 1.1.1.1
log-adjacency-changes
redistribute rip subnets
network 13.1.1.0 0.0.0.255 area 0
!
router rip
version 2
redistribute static //重分布静态路由到RIP,默认metric是1
redistribute ospf 110 metric 1
network 12.0.0.0
no auto-summary
!
ip route 0.0.0.0 0.0.0.0 FastEthernet0/0 //静态路由
!
R2,R3配置同上
R4-
interface FastEthernet0/0
ip address 200.1.1.2 255.255.255.0
duplex auto
speed auto
!
ip route 0.0.0.0 0.0.0.0 FastEthernet0/0
实验结果:
#lab Redis3# 将直连路由重分布进RIP
实验拓扑:
配置:
interface Loopback0
ip address 1.1.1.1 255.255.255.0
!
interface FastEthernet0/0
ip address 200.1.1.1 255.255.255.0
duplex auto