cisco技術(shù)大集合——路由重新分配技術(shù)
本文詳細(xì)的講述了路由重分配技術(shù)的基本配置,同時講述了OSPF和RIP技術(shù)的應(yīng)用,在下面的文章中給出了詳細(xì)的介紹。
在實(shí)際工作中,我們會遇到使用多個IP路由協(xié)議的網(wǎng)絡(luò)。為了使整個網(wǎng)絡(luò)正常地工作,必須在多個路由協(xié)議之間進(jìn)行成功的路由再分配。
以下列舉了OSPF與RIP之間重新分配路由的設(shè)置范例:
Router1的Serial 0端口和Router2的Serial 0端口運(yùn)行OSPF,在Router1的Ethernet 0端口運(yùn)行RIP 2,Router3運(yùn)行RIP2,Router2有指向Router4的192.168.2.0/24網(wǎng)的靜態(tài)路由,Router4使用默認(rèn)靜態(tài)路由。需要在Router1和Router3之間重新分配OSPF和RIP路由,在Router2上重新分配靜態(tài)路由和直連的路由。
范例所涉及的命令
任務(wù) 命令
重新分配直連的路由 redistribute connected
重新分配靜態(tài)路由 redistribute static
重新分配ospf路由 redistribute ospf process-id metric metric-value
重新分配rip路由 redistribute rip metric metric-value
Router1:
interface ethernet 0
ip address 192.168.1.1 255.255.255.0
!
interface serial 0
ip address 192.200.10.5 255.255.255.252
!
router ospf 100
redistribute rip metric 10
network 192.200.10.4 0.0.0.3 area 0
!
router rip
version 2
redistribute ospf 100 metric 1
network 192.168.1.0
!
Router2:
interface loopback 1
ip address 192.168.3.2 255.255.255.0
!
interface ethernet 0
ip address 192.168.0.2 255.255.255.0
!
interface serial 0
ip address 192.200.10.6 255.255.255.252
!
router ospf 200
redistribute connected subnet
redistribute static subnet
network 192.200.10.4 0.0.0.3 area 0
!
ip route 192.168.2.0 255.255.255.0 192.168.0.1
!
Router3:
interface ethernet 0
ip address 192.168.1.2 255.255.255.0
!
router rip
version 2
network 192.168.1.0
!
Router4:
interface ethernet 0
ip address 192.168.0.1 255.255.255.0
!
interface ethernet 1
ip address 192.168.2.1 255.255.255.0
!
ip route 0.0.0.0 0.0.0.0 192.168.0.2
!
【編輯推薦】