如果您喜歡這裡的內容,記得分享到您的Facebook和Twitter上面所有的朋友們吧!

2009年1月19日 星期一

觀察和解決 "分等級(Classful)定址" 的問題, 使用EIGRP (CNA-02-006)

CCNA Exploration 4.0 第二學期上課檔案 (CNA-02-006), 觀察和解決 "分等級(Classful)定址" 的問題, 使用 EIGRP.




這個例子的網路圖, 和前面的這個例子一模一樣, 但是改用 EIGRP 練習. 應該會有很多朋友認為, 只要放棄  RIP 改使用比較新的 EIGRP 協定, 就可以立刻解決本圖問題, 但是常常就是忘了, EIGRP 的預設行為, 還是 "Classful". 以致於網路就會像這個 (Backup Link)一樣, 還是有問題.

R2>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

D    10.0.0.0/8 [90/2172416] via 172.30.2.1, 00:00:10, Serial0/0/0
                [90/2172416] via 192.168.4.1, 00:00:10, Serial0/0/1
     172.30.0.0/16 is variably subnetted, 4 subnets, 2 masks
D       172.30.0.0/16 is a summary, 00:00:10, Null0
D       172.30.1.0/24 [90/2172416] via 172.30.2.1, 00:00:10, Serial0/0/0
C       172.30.2.0/24 is directly connected, Serial0/0/0
C       172.30.3.0/24 is directly connected, FastEthernet0/0
C    192.168.4.0/24 is directly connected, Serial0/0/1
D    192.168.5.0/24 [90/2172416] via 192.168.4.1, 00:00:10, Serial0/0/1
R2>

關鍵在於,  關掉 "Classful"  行為的 "no auto-summary" 命令!

router eigrp 1
 network 172.30.0.0
 network 192.168.4.0
 no auto-summary

所以正確的 (Backup Link)結果如下:

R2>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, 2 subnets
D       10.1.1.0 [90/2172416] via 172.30.2.1, 00:00:35, Serial0/0/0
D       10.2.2.0 [90/2172416] via 192.168.4.1, 00:00:34, Serial0/0/1
     172.30.0.0/24 is subnetted, 3 subnets
D       172.30.1.0 [90/2172416] via 172.30.2.1, 00:00:35, Serial0/0/0
C       172.30.2.0 is directly connected, Serial0/0/0
C       172.30.3.0 is directly connected, FastEthernet0/0
C    192.168.4.0/24 is directly connected, Serial0/0/1
D    192.168.5.0/24 [90/2172416] via 192.168.4.1, 00:00:34, Serial0/0/1
R2>


2009年1月15日 星期四

觀察和解決 "分等級(Classful)定址" 的問題, 使用RIP (CNA-02-005)

CCNA Exploration 4.0 第二學期上課檔案 (CNA-02-005), 觀察和解決 "分等級(Classful)定址" 的問題, 使用RIP.




這個例子, 是典型的 "不分等級(Classless)" 的新世界才存在的配置方式, 所以, 任何 "分等級(Classful)" 的路由資訊交換協定, 都沒辦法正確運作.

分等級協定失靈的關鍵, 在於 R2 的路由表, 將會出現兩筆 10.0.0.0/8 的路由資訊. 這是依照分等級世界的規定, 當告知路由資訊給非本主網段的路由器時, 必須自動將所有較細緻 (more-specific) 的路由資訊濃縮(summarize)成一筆, 也就是分等級世界的主網段本身(本例為10.0.0.0這個A等級網段).

所以, 任何經過 R2 往下方的 10.1.1.0/24 和 10.2.2.0/24 兩網段的封包, 都會有一半走錯路而遺失.

以下是錯誤的結果 (CNA-02-005-wrong-sol.pkt, Backup Link):


R2>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

R    10.0.0.0/8 [120/1] via 192.168.4.1, 00:00:17, Serial0/0/1
                [120/1] via 172.30.2.1, 00:00:14, Serial0/0/0
     172.30.0.0/24 is subnetted, 3 subnets
R       172.30.1.0 [120/1] via 172.30.2.1, 00:00:14, Serial0/0/0
C       172.30.2.0 is directly connected, Serial0/0/0
C       172.30.3.0 is directly connected, FastEthernet0/0
C    192.168.4.0/24 is directly connected, Serial0/0/1
R    192.168.5.0/24 [120/1] via 192.168.4.1, 00:00:17, Serial0/0/1
R2>


所以, 只能使用不分等級協定, 例如 RIPv2 (CNA-02-005-final-sol.pkt, Backup Link). 同時還要記得使用 "no auto-summary" 命令關掉 RIPv2 的 "分等級行為".

R2>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, 2 subnets
R       10.1.1.0 [120/1] via 172.30.2.1, 00:00:12, Serial0/0/0
R       10.2.2.0 [120/1] via 192.168.4.1, 00:00:12, Serial0/0/1
     172.30.0.0/24 is subnetted, 3 subnets
R       172.30.1.0 [120/1] via 172.30.2.1, 00:00:12, Serial0/0/0
C       172.30.2.0 is directly connected, Serial0/0/0
C       172.30.3.0 is directly connected, FastEthernet0/0
C    192.168.4.0/24 is directly connected, Serial0/0/1
R    192.168.5.0/24 [120/1] via 192.168.4.1, 00:00:12, Serial0/0/1
R2>

經典熱門文章