查看完整版本: 给路由器重新分配路由

BONO 2007-11-13 12:48

给路由器重新分配路由

 在实际工作中,我们会遇到使用多个IP路由[url=http://tech.haoxz.com/sort/1400/index.html]协议[/url]的网络。为了使整个网络正常地工作,必须在多个[url=http://tech.haoxz.com/sort/1035/index.html]路由协议[/url]之间进行成功的路由再分配。  以下列举了[url=http://tech.haoxz.com/sort/1037/index.html]OSPF[/url]与[url=http://tech.haoxz.com/sort/1280/index.html]RIP[/url]之间重新分配路由的设置范例:
[url=http://tech.haoxz.com/ArtImage/20070830/wj1838_1.gif][img=399,239]http://tech.haoxz.com/ArtImage/20070830/wj1838_1.gif[/img][/url]
   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上重新分配静态路由和直连的路由。 
  范例所涉及的命令   
[url=http://tech.haoxz.com/ArtImage/20070830/wj1838_2.jpg][img=481,113]http://tech.haoxz.com/ArtImage/20070830/wj1838_2.jpg[/img][/url]
  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
页: [1]
查看完整版本: 给路由器重新分配路由