2015年1月20日 星期二

路由器RIPv2動態路由設定2



練習檔案下載:https://drive.google.com/file/d/0B-z-UZB41PNbMmdZdXBQdmV5V3M/view?usp=sharing


第一部分: 建立網路環境:
1. 在Tiit-Router擴充槽上安裝一片WIC-2T模組產生Serial 0/3/0 介面及Serial 0/3/1 介面。
2. 將Nanya-Router的 Serial 0/0/0 介面連接 ISP 路由器的 Serial 0/0/0 介面及Serial 0/0/1 介面連接 Tiit-Router的 Serial 0/3/0 介面,其中Nanya-Router的Serial 0/0/0及Serial 0/0/1都為DTE端。
3. Nanya-Router路由器之 FastEthernet 0/0 介面連接Nanya-Switch 交換器之 FastEthernet 0/1 介面,路由器之 FastEthernet 0/1 介面連接WirelessTiit無線AP 之 Internet 介面。

4. Nanya-Switch 交換器使用FastEthernet 0/2 連接 PC-PT D。



第二部分: 網路組態設定:
1 在Tiit-Router路由器:
1.1 路由器名稱設定為Tiit-Router

Router>enable 
Router#conf terminal 
Router(config)#hostname Tiit-Router

1.2 加密之特權模式密碼為 ccna

Tiit-Router(config)#enable secret ccna
Tiit-Router(config)#exit

1.3 主控台使用者模式之密碼為 cisco

Tiit-Router#conf terminal 
Tiit-Router(config)#line console 0
Tiit-Router(config-line)#password cisco
Tiit-Router(config-line)#login
Tiit-Router(config-line)#exit

1.4 虛擬終端機使用者模式之密碼為 tiitcsie

Tiit-Router(config)#line vty 0 5
Tiit-Router(config-line)#password tiitcsie
Tiit-Router(config-line)#login
Tiit-Router(config-line)#exit

1.5 FastEthernet 0/0 介面之IP為與IP 172.16.200.200/22相同網路的最後一個可使用IP

Tiit-Router(config)#interface fastEthernet 0/0
Tiit-Router(config-if)#ip address 172.16.203.254 255.255.252.0
Tiit-Router(config-if)#no shutdown 
Tiit-Router(config-if)#exit

1.6 FastEthernet 0/1 介面之 IP請查看 PC-PT B之IP相關設定資訊進行設定

Tiit-Router(config)#interface fastEthernet 0/1
Tiit-Router(config-if)#ip address 192.168.200.139 255.255.255.192
Tiit-Router(config-if)#no shutdown 
Tiit-Router(config-if)#exit

1.7 Serial 0/3/0介面之IP為192.168.200.5/30,提供兩部路由器之間的電路為64000bps

Tiit-Router(config)#interface serial 0/3/0
Tiit-Router(config-if)#ip address 192.168.200.5 255.255.255.252
Tiit-Router(config-if)#clock rate 64000
Tiit-Router(config-if)#no shutdown
Tiit-Router(config-if)#exit 

1.8 設定使用動態路由RIP路由協定

Tiit-Router(config)#router rip 
Tiit-Router(config-router)#version 2
Tiit-Router(config-router)#network 172.16.200.0 
Tiit-Router(config-router)#network 192.168.200.128
Tiit-Router(config-router)#network 192.168.200.4
Tiit-Router(config-router)#no auto-summary 
Tiit-Router(config-router)#exit

1.9 路由器所有密碼均設定加密保護

Tiit-Router(config)#service password-encryption 
Tiit-Router(config)#exit
Tiit-Router#copy running-config startup-config 

2 在Nanya-Router路由器:
2.1 路由器名稱設定為Nanya-Router

Router>enable 
Router#conf terminal 
Router(config)#hostname Nanya-Router

2.2 FastEthernet 0/0 介面之IP請查看 PC-PT D之IP相關設定資訊進行設定

Nanya-Router(config)#interface fastEthernet 0/0
Nanya-Router(config-if)#ip address 192.168.50.100 255.255.255.128
Nanya-Router(config-if)#no shutdown 
Nanya-Router(config-if)#exit

2.3 FastEthernet 0/1 介面之 IP 為192.168.50.254/25

Nanya-Router(config)#interface fastEthernet 0/1
Nanya-Router(config-if)#ip address 192.168.50.254 255.255.255.128
Nanya-Router(config-if)#no shutdown 
Nanya-Router(config-if)#exit

2.4 Serial 0/0/0介面之IP為172.16.1.2/30

Nanya-Router(config)#interface serial 0/0/0
Nanya-Router(config-if)#ip address 172.16.1.2 255.255.255.252
Nanya-Router(config-if)#no shutdown 
Nanya-Router(config-if)#exit

2.5 Serial 0/0/1介面之IP為192.168.200.6/30

Nanya-Router(config)#interface serial 0/0/1
Nanya-Router(config-if)#ip address 192.168.200.6 255.255.255.252
Nanya-Router(config-if)#no shutdown 
Nanya-Router(config-if)#exit

2.6 設定使用動態路由RIP路由協定

Nanya-Router(config)#router rip 
Nanya-Router(config-router)#version 2
Nanya-Router(config-router)#network 192.168.200.4
Nanya-Router(config-router)#network 172.16.1.0
Nanya-Router(config-router)#network 192.168.50.128
Nanya-Router(config-router)#network 192.168.50.0
Nanya-Router(config-router)#no auto-summary 
Nanya-Router(config-router)#exit
Nanya-Router(config)#exit
Nanya-Router#copy running-config startup-config 

3 Linksys WRT-300N WirelessTiit無線網路AP:

3.1 對外之網路介面使用固定IP,IP位址為 192.168.50.129/25
3.2 對內使用預設的私有IP位址,並啟用DHCP服務
3.3 更改AP的SSID為 Tiit-AP,讓其下的 Laptop-PT NB可以連接上網

















4 個人電腦PC-PT A:
4.1 IP位址設定為 172.16.200.200/22

IP address            172.16.200.200
Subnet Mask         255.255.252.0
Default Gateway   172.16.203.254

5 個人電腦PC-PT C:
5.1 IP位址設定為 PC-PT B所屬網路第一個可使用IP

IP address            192.168.200.129
Subnet Mask         255.255.255.192
Default Gateway   192.168.200.139

6 筆記型電腦Laptop-PT NB:
6.1 裝上無線網卡,並且透過無線網卡連接Tiit-AP無線網路AP








2015年1月18日 星期日

Distance Vector Routing Protocols(距離向量路由定)

特性:
1.Periodic Updates(週期更新):每隔一段時間就會送出路由表。
2.Neighbors(鄰居關係):使用相同的路由協定,並分享鏈路的路由器。
3.Broadcast Updates(廣播更新):所有Neighbors的路由器都會收到廣播並進行處理。有些會使用multicast來取代broadcast。

優點:
1.容易維護和學習
2.資源消耗低,但規模大的網路頻寬會消耗較高

缺點:
1.收斂較慢
2.會產生迴圈
3.擴充性受限制

收斂流程






2015年1月17日 星期六

動態路由協定

動態路由的好處就是當拓樸改變時不用手動設定它會自動學習並更改並且選擇最佳路徑,但是所需付出的代價就是需要使用較多的資源(CPU、記憶體、頻寬)。


動態與靜態比較列表

Metric(指標):每個路由協定的衡量方式都不一樣,其中常見的指標包含
                     1.Hop count(跳躍數):封包要到達目的所需經過的路由器數量
                     2.Bandwidth(頻寬):鏈路最大的資料流通量。
                     3.Delay(延遲):封包經過路徑所需的時間
                     4.Load(負載):目前鏈路的使用率
                     5.Cost(成本):由IOS或使用者自行設定路徑的數值
                     6.Reliability(可靠性):根據以往錯誤發生的記錄,選出一條失敗率最低機率的路徑


Administrative Distance(管理性距離):在路由器中是可以設定兩種以上的路由協定,但是兩種的指標都不一樣,無法拿來比較,這時就需要AD(Administrative Distance)。在AD的範圍0~255中數值越小越好,255則是不會使用路由協定,當然數值是可以自由變更的。
接下來介紹Classful Routing Protocols(有分類路由協定)和Classless Routing Protocols(無分類路由協定)

Classful Routing Protocols:在傳送訊息時,並不回送出遮罩的訊息,而是靠A、B、C類來決定遮罩。

Classless Routing Protocols:可以使用不連續的網路,也就是會傳遞遮罩的訊息。




Distance Vector Routing Protocols(距離向量路由協定)簡寫為DV
LinkStats Routing Protocols(鏈路狀態路由協定)簡寫為LS

Autonomous System(自治系統)簡稱AS    

IGP(Interior Gateway Protocols):用於自治系統內
EGP(Exterior Gateway Protocols):用於自治系統之間          





2015年1月12日 星期一

Tracert



將不同TTL 值的 ICMP 發送到目標,來確認到達目標使用了多少個路由器。

要在轉發封包之前,TTL 會減 1,所以TTL可以用來量測路由器的數量,封包上的 TTL 到達 0 時,路由器應該將“ICMP 逾時”的消息發送回源系統。

Tracert 先發送 TTL 為 1 的封包,並在隨後的每次發送過程將 TTL 遞增 1,直到目標回應或 TTL 達到最大值,從而確定路由。

Tracert 是通過路由器回傳的“ICMP 逾時”的消息來確定路由。不過,有些路由器會直接丟掉封包不回傳,所以 tracert 看不到。預設最多為30個節點(hops)

2015年1月4日 星期日

CSMA / CD (Carrier Sense Multiple Access with Collision Detection)

乙太網路使用的是CSMA/CD技術,電腦在傳送資料前會先監聽是否有其他電腦在使用,傳送資料後若是發生碰撞時,則會回到碰撞前的狀態等一段時間繼續傳輸,若是次數大於15次則放棄傳輸

2015年1月3日 星期六

2015年1月2日 星期五

第五層 會議層(Session Layer)


會議層負責會議的建立、維護、終止,用來確認用戶得資料是否同步,常用的方式有下列三種。

一、單工(Simplex)
資料只能單一方向傳送,像是收音機。

二、半雙工(Half-Duplex)
資料雖然可以雙向傳輸,但無法同時完成像是對講機。

三、全雙工(Full-Duplex)
資料可以同一時間雙向溝同,像是電話。

在會議層上常使用的協定
RPC(Remote Procedure Call)
SQL(Structure Quesry Language)
NFS(Network File System)