国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學院 > 網絡通信 > 正文

專用Cisco路由器的替代品Zebra二

2019-11-05 01:21:42
字體:
來源:轉載
供稿:網友

  生成的 ripd.conf 配置文件如下所示:
  
  清單 7. 生成的 /etc/zebra/ripd.conf 文件
  
  !
  ! Zebra configuration saved from vty
  !  2003/08/19 13:50:30
  !
  hostname speedmetal-rip
  passWord zebra
  enable password zebra
  !
  interface lo
  !
  interface eth0
  !
  interface eth1
  !
  interface dummy0
  !
  router rip
   network 10.0.0.0/8
   network 192.168.0.0/16
  !
  line vty
  !
  
  在 Cisco 路由器上安裝配置 RIP 路由
  
  我們將兩個 Cisco 路由器稱為 "A" 和 "B",為了簡化這兩個路由器的配置,我們只配置了一些讓路由器能正常運行的基本設置,包括設置接口的 IP 地址、環回地址,以及用于串口通信的串口時鐘頻率。
  
  清單 8. 配置路由器 A
  
  Router#config terminal
  Router(config)#hostname RouterA
  RouterA(config)#int s0/0
  RouterA(config-if)#ip address 192.168.0.1 255.255.255.252
  RouterA(config-if)#no shut
  RouterA(config-if)# interface fastEthernet 0/0
  RouterA(config-if)#ip address 192.168.2.2 255.255.255.252
  RouterA(config-if)#no shut
  RouterA(config-if)#int loopback 0
  RouterA(config-if)#ip address 10.0.0.1 255.255.255.0
  RouterA(config-if)#end
  RouterA#write
  
  類似地,我們配置好路由器 "B"。
  
  清單 9. 配置路由器 B
  
  Router#configure terminal
  Router(config)#hostname RouterB
  RouterB(config)#int s0/0
  RouterB(config-if)#ip address 192.168.0.2 255.255.255.252
  RouterB(config-if)#no shut
  RouterB(config-if)#int fastEthernet0/0
  RouterB(config-if)#ip address 192.168.1.2 255.255.255.252
  RouterB(config-if)#no shut
  RouterB(config-if)#int loopback 0
  RouterB(config-if)#ip address 10.0.1.1 255.255.255.0
  RouterB(config-router)#end
  RouterB#write
  
  在 3620 路由器上配置 RIP 與 Zebra 中的命令極其類似。我們通過控制臺線纜訪問兩臺3620,執行如下命令:
  
  清單 10. 在路由器 A 上完成 RIP 所需的配置
  
  RouterA#conf t
  Enter configuration commands, one per line. End with CNTL/Z.
  RouterA(config)#router rip
  RouterA(config-router)#network 10.0.0.0
  RouterA(config-router)#network 192.168.0.0
  RouterA(config-router)#network 192.168.2.0
  RouterA(config-router)#version 2
  RouterA(config-router)#end
  RouterA#write
  
  然后是路由器 B:
  
  清單 11. 在路由器 B 上完成 RIP 所需的配置
  
  RouterB#conf t
  Enter configuration commands, one per line. End with CNTL/Z.
  RouterB(config)#router rip
  RouterB(config-router)#network 10.0.1.0
  RouterB(config-router)#network 192.168.0.0
  RouterB(config-router)#network 192.168.1.0
  RouterB(config-router)#version 2
  RouterB(config-router)#end
  RouterB#write
  
  router rip 命令啟動配置 RIP 的過程。network 命令告訴路由器哪些是 RIP 要傳播的網段。
  
  RIP 傳播路由
  
  現在 Cisco 路由器和 Zebra 都已經配置好,我們接下來檢驗傳播的路由。在 MRLG 中,我們選擇 "show ip route" 然后點擊 "Execute"。生成如下報告:
  
  清單 12. Zebra 反映的 RIP 路由
  
  Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF,
      B - BGP, > - selected route, * - FIB route
  
  R>* 10.0.0.0/24 [120/2] via 192.168.2.2, eth0, 00:11:05
  R>* 10.0.1.0/24 [120/2] via 192.168.1.2, eth1, 00:02:08
  C>* 10.0.2.0/24 is directly connected, dummy0
  K * 127.0.0.0/8 is directly connected, lo
  C>* 127.0.0.0/8 is directly connected, lo
  R>* 192.168.0.0/30 [120/2] via 192.168.2.2, eth0, 00:11:05
  C>* 192.168.1.0/30 is directly connected, eth1
  C>* 192.168.2.0/30 is directly connected, eth0
  
  通過 RIP 得到的路由用一個 R 來標記。
  
  要注重的是,通過路由器 A 和路由器 B 的廣播,Zebra 現在知道了 10.0.0.0/24 和 10.0.1.0/24 兩個網段。測試時,我們從 ThinkPad Zebra 路由器上 ping 10.0.0.1 和 10.0.1.1,并從兩個路由器上 ping 10.0.2.1(ThinkPad 的虛擬網絡接口)。
  
  為了測試路由的 failover,我們把連接網段 10.0.0.0/24 的路由器 A 上的網絡連接斷開。經過總計約兩分鐘的過期時間以后,Zebra 得到了另一個可達 10.0.0.0/24 的路由,這個新的路由是通過路由器 B 得到的。注重在下面的清單中,Zebra 通過 192.168.1.2 到達 10.0.0.0/24,而不是先前的路徑。
  
  清單 13. Zebra 反映的 RIP 路由
  
  Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF,
      B - BGP, > - selected route, * - FIB route
  
  R>* 10.0.0.0/24 [120/3] via 192.168.1.2, eth0, 00:00:26
  R>* 10.0.1.0/24 [120/2] via 192.168.1.2, eth1, 00:06:02
  C>* 10.0.2.0/24 is directly connected, dummy0
  K * 127.0.0.0/8 is directly connected, lo
  C>* 127.0.0.0/8 is directly connected, lo
  R>* 192.168.0.0/30 [120/2] via 192.168.1.2, eth1, 00:00:26
  C>* 192.168.1.0/30 is directly connected, eth1
  C>* 192.168.2.0/30 is directly connected, eth0
  
  為什么總的過期時間大于兩分鐘?RIP 默認的過期時間是 30 秒,但是 RIP 協議指定了在確認一個路由已經失效之前要進行 3 次重試(共 90 秒),并且還要有一段時間來清空無效的路由(還需要 240 秒)。眾所周知,RIP 協議對連接失敗反應遲鈍,這一點在這里得到了明確的論證。
  
  這里是在 failover 發生之前路由器 A 的路由表的輸出。
  
  清單 14. Failover 之前路由器 A 的路由表
  
  RouterA#show ip route
  Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
      D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
      N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
      E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
      i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
      * - candidate default, U - per-user static route, o - ODR
      P - periodic downloaded static route
  
  Gateway of last resort is not set
  
     10.0.0.0/24 is subnetted, 3 subnets
  R    10.0.2.0 [120/1] via 192.168.2.1, 00:00:11, FastEthernet0/0
  C    10.0.0.0 is directly connected, Loopback0
  R    10.0.1.0 [120/1] via 192.168.0.2, 00:00:18, Serial0/0
     192.168.0.0/30 is subnetted, 1 subnets
  C    192.168.0.0 is directly connected, Serial0/0
     192.168.1.0/30 is subnetted, 1 subnets
  R    192.168.1.0 [120/1] via 192.168.0.2, 00:00:18, Serial0/0
            [120/1] via 192.168.2.1, 00:00:11, FastEthernet0/0
     192.168.2.0/30 is subnetted, 1 subnets
  C    192.168.2.0 is directly connected, FastEthernet0/0
  
  failover 之后:
  
  清單 15. Failover 之后路由器 A 的路由表
  
  RouterA#show ip route
  Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
      D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
      N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
      E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
      i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
      * - candidate default, U - per-user static route, o - ODR
      P - periodic downloaded static route
  
  Gateway of last resort is not set
  
     10.0.0.0/24 is subnetted, 3 subnets
  R    10.0.2.0 [120/2] via 192.168.0.2, 00:00:09, Serial0/0
  C    10.0.0.0 is directly connected, Loopback0
  R    10.0.1.0 [120/1] via 192.168.0.2, 00:00:09, Serial0/0
     192.168.0.0/30 is subnetted, 1 subnets
  C    192.168.0.0 is directly connected, Serial0/0
     192.168.1.0/30 is subnetted, 1 subnets
  R    192.168.1.0 [120/1] via 192.168.0.2, 00:00:09, Serial0/0
     192.168.2.0/30 is subnetted, 1 subnets


發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 司法| 瑞安市| 锦屏县| 崇义县| 三明市| 大方县| 桐城市| 寿光市| 全州县| 繁昌县| 尤溪县| 哈巴河县| 北流市| 山东省| 文成县| 筠连县| 昆山市| 临潭县| 平潭县| 萨嘎县| 茌平县| 海口市| 文山县| 衡南县| 金坛市| 阿坝县| 高阳县| 兴和县| 辽源市| 土默特右旗| 贵德县| 咸阳市| 苏州市| 陇西县| 常宁市| 忻城县| 东阿县| 永和县| 万全县| 筠连县| 贵港市|