重新分配路由

王朝other·作者佚名  2008-05-31
窄屏简体版  字體: |||超大  

在实际工作中,我们会碰到使用多个 ip 路由协议的网络。为了使整个网络正常地工作,必须在多个路由协议之间进行成功的路由再分配。

以下列举了 OSPF与RIP之间重新分配路由的设置范例:

Router1的Serial 0端口和Router2的Serial 0端口运行OSPF,在Router1的Ethernet 0端口运行RIP 2,Router3运行RIP2,Router2有指向Router4的192.168.2.0/24网的静态路由,Router4使用默认静态路由。需要在Router1和Router3之间重新分配OSPF和RIP路由,在Router2上重新分配静态路由和直连的路由。

范例所涉及的命令

任务

命令

重新分配直连的路由

redistribute connected

重新分配静态路由

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

!

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
 
 
© 2005- 王朝網路 版權所有 導航