如果您喜歡這裡的內容,記得分享到您的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>

2008年12月31日 星期三

Fw: CCNA證書申請流程

寫得還蠻清楚的, 大家可以參考! (希望大家看得懂簡體字, 不然用 Google Translate也可)
http://www.ncsxy.com/Index/Index/info.jsp?id=000788&bankid=null

希望大家都能順利取得 CCNA 證照!

2008年12月30日 星期二

哪幾個 subnet 可以用

如果是 "分等級" (Classful) 的世界, IP位址就有這個現制: subnet 的網段位址位元全為"0" 的這個 subnet 不能用. 這是因為分等級的世界的路由資訊,  並不包含 "subnet mask", 路由器會分不清楚, 到底該資訊是主網段, 還是子網段.

但是反過來說, 如果是 "不分等級" (Classless) 的世界, 那這個網段就可以用了! 因為 '不分等級"的世界, 路由器交換的資訊, 都多包含 subnet mask.

例如, 分等級的世界 Class A 10.0.0.0/8 網段中, 假設 subnet mask 長度是 16, 那麼以下網段可用.

10.1.0.0/1610.2.0.0/16, 10.3.0.0/16, ... 10.255.0.0/16, 共 254個.

然而  10.0.0.0/16 不能用. 因為, 路由器只能看到 10.0.0.0 這個數字 (請用32個位元的二進位數字來想), 但是看不到像是 255.0.0.0 或是 255.255.0.0 這些 subnet mask, 所以會分不清楚到底是 10.0.0.0/8, 還是 10.0.0.0/16.

同樣的例子, 在 "不分等級" 的世界就沒問題, 因為所有的路由資訊都會多有 255.0.0.0 或是 255.255.0.0 的 subnet mask. 所以 10.0.0.0/8 和  10.0.0.0/16 是分得出來的不同路由資訊.

2008年12月23日 星期二

透過自動路由協定, 來散播"預設路由", 設定觀察, (CNA-02-004)

CCNA Exploration 4.0 第二學期上課檔案 (CNA-02-004), 自動路由設定, 散播 "預設路由", 設定觀察, 使用 RIP v1.




這個例子要讓大家觀察, 如何透過自動路由協定(本例子是 RIPv1), 來散播 "預設路由" 資訊.

R2 的設定關鍵, 在於:
  1. R2 本身的路由表, 包含 "預設路由"
  2. R2 路由交換協定的設定內, 包含 "default-information originate" 宣告.

所以 R2 的設定關鍵如下:

ip route 0.0.0.0 0.0.0.0 172.30.2.1 
router rip
 network 172.30.0.0
 network 192.168.4.0
 default-information originate

R3 上就可以看到以下結果:


R3>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 192.168.4.2 to network 0.0.0.0

R    172.30.0.0/16 [120/1] via 192.168.4.2, 00:00:19, Serial0/0/0
C    192.168.4.0/24 is directly connected, Serial0/0/0
C    192.168.5.0/24 is directly connected, FastEthernet0/0
R*   0.0.0.0/0 [120/1] via 192.168.4.2, 00:00:19, Serial0/0/0
R3>

經典熱門文章