Ospf LSA 類型

Ospf LSA 類型:

研究LSA 主要看LSA 的下面3 個方面:

1
傳播範圍

2
通告者

3
內容

Show ip ospf database 可以看見簡略的database 資訊,

Show ip ospf database 後接不通的命令可以看見不同類型LSA 的詳細資訊。

如下圖:

1 Router LSA


One router LSA (type 1) for every router in an area

–
Includes list of directly attached links

–
Each link identified by IP prefix assigned to link and link type


Identified by the router ID of the originating router


Floods within its area only; does not cross ABR

***傳播區域:只能在本區域,及不能通過ABR

***通告者:
每台路由器都可以產生1 LSA

***內容:含有拓撲信息和直連的路由

R1 # show ip ospf database 可以看見一下簡略資訊

Router Link States (Area 0)

Link ID ADV Router Age Seq# Checksum Link count

11.1.1.1 11.1.1.1 1546 0x80000007 0x00FF34 3

22.2.2.2 22.2.2.2 1530 0x80000008 0x00FF20 3

其中link ID ADV Router 都是此LSA router id

在相同區域內1 LSA 的內容相同。

R1 # show ip ospf database router 可以看見1 LSA 的詳細資訊

OSPF Router with ID (11.1.1.1) (Process ID 1)

Router Link States (Area 0)

LS age: 793

Options: (No TOS-capability, DC)

LS Type: Router Links

Link State ID: 11.1.1.1

Advertising Router: 11.1.1.1

LS Seq Number: 80000007

Checksum: 0xFF34

Length: 60

Number of Links: 3

Link connected to: a Stub Network

(Link ID) Network/subnet number: 1.1.1.1

(Link Data) Network Mask: 255.255.255.255

Number of TOS metrics: 0

TOS 0 Metrics: 1 (這塊為直連路由信息)

Link connected to: another Router (point-to-point)

(Link ID) Neighboring Router ID: 22.2.2.2

(Link Data) Router Interface address: 12.1.1.1

Number of TOS metrics: 0

TOS 0 Metrics: 64 (這塊為直連拓撲信息)

Link connected to: a Stub Network

(Link ID) Network/subnet number: 12.1.1.0

(Link Data) Network Mask: 255.255.255.0

Number of TOS metrics: 0

TOS 0 Metrics: 64 (這塊為直連路由信息)

詳細LSA 資訊過長省略部分。

2 Network LSA

One network (type 2) LSA for each transit broadcast or NBMA network

In an area

–Includes list of attached routers on the transit link

–Includes subnet mask of link

Advertised by the DR of the broadcast network

Floods within its area only; does not cross ABR

***傳播區域:只能在本區域,及不能通過ABR

***通告者:
DR 產生2 LSA

***內容:在這個MA 網路中附屬的路由器和遮罩。

R # show ip ospf database 可以看見一下簡略資訊

Net Link States (Area 0)

Link ID ADV Router Age Seq# Checksum

192.168.1.3 33.3.3.3 349 0x80000001 0x00D586

其中Link ID DR 的藉口位址ADVR DR
Router ID

R # show ip ospf database network 可以看見2 類的詳細資訊

OSPF Router with ID (22.2.2.2) (Process ID 1)

Net Link States (Area 0)

Routing Bit Set on this LSA

LS age: 879

Options: (No TOS-capability, DC)

LS Type: Network Links

Link State ID: 192.168.1.3 (address of Designated Router)

Advertising Router: 33.3.3.3 (DR’ router id)

LS Seq Number: 80000001

Checksum: 0xD586

Length: 32

Network Mask: /24

Attached Router: 33.3.3.3 (MA 網路中的路由器router id )

Attached Router: 22.2.2.2 (MA 網路中的路由器router id )

3 summary LSA


Type 3 LSAs are used to flood network information to areas outside the

originating area (interarea)

–
Describes network number and mask of link.


Advertised by the ABR of originating area.


Regenerated by subsequent ABRs to flood throughout the autonomous system.


By default, routes are not summarized, and type 3 LSA is advertised for every subnet.

***傳播區域:整個OSPF

***通告者:
ABR 產生3 LSA

***內容:傳播域間路由

R # show ip ospf database 信息

Summary Net Link States (Area 2)

Link ID ADV Router Age Seq# Checksum

1.1.1.1 33.3.3.3 1365 0x80000001 0x008844

2.2.2.2 33.3.3.3 1365 0x80000001 0x00D731

3.3.3.3 33.3.3.3 36 0x80000001 0x009F66

12.1.1.0 33.3.3.3 1365 0x80000001 0x00F8CA

192.168.1.0 33.3.3.3 1365 0x80000001 0x006D3A

其中link id 為區域的路由資訊,ADV Router ABRRouter

ID

Router # show ip ospf database summary 信息

Summary Net Link States (Area 1)

Routing Bit Set on this LSA

LS age: 1521

Options: (No TOS-capability, DC, Upward)

LS Type: Summary Links (Network)

Link State ID: 2.2.2.2 (summary Network Number)

Advertising Router: 22.2.2.2 ABR Router’ ID

LS Seq Number: 80000002

Checksum: 0x44D2

Length: 28

Network Mask: /32

TOS: 0 Metric: 1

Routing Bit Set on this LSA

LS age: 656

Options: (No TOS-capability, DC, Upward)

LS Type: Summary Links(Network)

Link State ID: 3.3.3.3 (summary Network Number)

Advertising Router: 22.2.2.2

LS Seq Number: 80000001

Checksum: 0x22F0

Length: 28

Network Mask: /32

TOS: 0 Metric: 2

5 External LSA


External (type 5) LSAs are used to advertise networks from other

autonomous systems.


Type 5 LSAs are advertised and owned by the originating ASBR.


Type 5 LSAs flood throughout the entire autonomous system.


The advertising router ID (ASBR) is unchanged throughout the autonomous system.


Type 4 LSA is needed to find the ASBR.


By default, routes are not summarized

***傳播區域:整個OSPF

***通告者:
ASBR

***內容:域外路由

其中5 類的ADV Router ASBR Router ID

Link ID 為:域外的路由

4 Summary LSA


Summary (type 4) LSAs are used to advertise an ASBR to all other areas in

the autonomous system.


They are generated by the ABR of the originating area.


They are regenerated by all subsequent ABRs to flood throughout the

autonomous system.


Type 4 LSAs contain the router ID of the ASBR.

***傳播區域:除過ASBR 在的區域的整個OSPF 域(因為1

LSA 已經告訴了ASBR 在那)

***通告者:
ABR 及在那個區域就是那個區域的ABR

***內容:找ASBR

其中Link ID ASBR Router ID

ADV Router 為路由器所在區域的ABR Router ID

總結:
其中1 3
5 LSA 為路由信息。

1 類為域內路由 (O) Derive from LSA 1,LSA2
2 類為跨域路由 (OIA) Derive from LSA 3
3 類為外部路由 (OEx) Derive from LSA 5
(If NSSA Area (ONx) derive from LSA7

ROUTE-LAB

ROUTE-LAB

LAB 1-1



目的:

  1. 確認必須提供的網路需求
  2. 確認必須的訊息
  3. 確認實行時需要的工作及建立實施計劃
  4. 驗證活動

實施政策

  1. 基礎結構採用 CISCO 的三層式架構:
  2. 必須滿足的基本要求
    1. Functionality 在時限內滿足並且支援應用程式及資料流量的需
    2. Performance 滿足企業對 響應速度,吞吐量,利用率
    3. Scalability 滿足企業對 人員,應用程式及資料流量未來的可擴展性
    4. Availability 提供企業網路及應用接近 99.999的可用性
    5. Cost-effectiveness: 在限定的預算

解決方案範例.

  1. 1-確認必須提供的網路需求& 2. 確認必須的訊息
    1.1 使用的應用程式及需要的資料流量
    1.2 存在的網路設備,及其作業系統/固件(OS /FirmWare)
    1.3 拓樸圖及連線資訊
    1.4 IP位址及部署分配
    1.5 使用的路由協定及路由器上的設定(注:通常應為所有的網路設備協定)
  2. 3-確認實行時需要的工作及建立實施計劃
    2.1 撰寫必要交件的資訊
    2.2 準備必須的工具及資源
    連接PC(Terminal)到設備
    選擇並且保留必要資源
    2.3 設定所有設備上的IP位址
    2.4 啟用所有參與運作的界面
    2.5 設定網路設備上的必要協定(例:路由協定 )
    2.6 設定特定網路設備上的必要特性(例:路由聚合,及封閉網路)
    2.7 驗證網路設備及連線是否依據設定正常的運作
    2.8 測量執行效率及記錄結果是否滿足
    2.9 建立設定備份

  3. 2.10建立實施計劃,網路維運基線,及提出必要建議
  4. 4-驗證活動
    3.1 驗證所有設備界面正常運作
    3.2 驗證網路設備上的設定是否正運作(例:路由協定)
    3.3 驗證網路設備上的路徑是否正確(例:路由表是否包含所有規劃的正確路徑)
    3.4 驗證特定網路設備上的必要特性(例:送出聚合路由的路由器是否自我生成指向null0界面的路)
    3.5 驗證網路設備上的路徑是否正確及是否要進行調整

LAB 2-1


目的:

  1. 在WAN 和 LAB 的界面上設定基本的EIGRP及驗證其運
  2. 使用必要的工具及指令進行設定
  3. 在某一路由器上使用LAN界面上的次要IP位址加入EIGRP路由協定
  4. 更改EIGRP路徑測量參數來影響路由的選擇
  5. 最佳化-1.避免EIGRP的界面送出不必要的HELLO封包訊息
  6. 最佳化-2.避免不必要的小路由被送出,在特定設備上執行路由聚合
  7. 列出實施行步驟
  8. 寫下驗證,測試的計劃檢查所有的設定如規劃方式進行運作
  9. 利用 SHOW 及 DEBUG的指令檢查設定及驗證運作

以上router的介面名稱可能與您正在使用的Lab有所不同, 請以實際介面名稱為準.

1 講師已為您準備好基本設定 (IP, Frame-Relay Map)

2 啟動EIGRP 於:

2.1 R1-BBR1 的p2p sub-interface 介面

2.2 R1-BBR2 的p2p sub-interface 介面

2.3 R3-R4 的 p2p sub-interface 介面, 含 LAN 的網段.

2.4 EIGRP 的設定應讓這個Lab所使用的其它子網路一但加入時, 會自動加到 EIGRP 的 Table 中.

3 確定 R1 的 Topology Table 與 Routing Table:

3.1 由 BBR1 學到 192.168.x.0/24

3.2 由 BBR2 學到 172.30.10.0/24

3.3 比對 Topology Table 與 Routing Table 中的Metric 值.

4 啟動 EIGRP 於:

4.1 R1 與 (R2, R3, R4) 間的 Multipoint Sub-interface.

4.2 所有Router 要能交換 Routes.

5 檢查 Neighbor 與 Routing Table:

5.1 R1-R2

5.2 R1-R3

5.3 R1-R4

5.4 Shutdown R3-R4, 檢查 R3此時學不到 172.30.24.0/24

6 調整 R1 的設定:

6.1 讓 R3 與 R4 仍能學到彼此的LAN subnet.

6.2 No shutdown R3-R4 間的介面.

7 檢查 R1-R2, R1-R3, R1-R4:

7.1 Neighbor Table

7.2 Topology Table

7.3 Routing Table

7.4 觀察 Topology Table 與 Routing Table 的 metric 變化.

7.5 再次 shutdown R3-R4 間的介面, 並確認 R2, R4 是從 R1 學到 172.30.13.0/24

8 正確調整參數, 影響路徑的選擇:

8.1 設定R3 與 R4之間介面的 Delay, 讓R2把學自R1的Route當作是Feasible Successor(Backup)

8.2 設定 R3, 讓R3到 172.30.24.0/24 的路徑可執行 Unequal Cost Load Balancing.

8.3 設定正確Route與參數, 讓 R3 到 172.30.24.0/24 的路徑是以 R4作為 Primary Route, 以 R1作為Backup Route.

9 最後, 確定要讓R3的 LAN 要能與 R2, R4 的 LAN 仍然可以建立連線.

Sol:

LAB2-2



以上router的介面名稱可能與您正在使用的Lab有所不同, 請以實際介面名稱為準.

1 講師已為您準備好基本設定 (IP, Frame-Relay Map)

2 啟動EIGRP 於:

2.1 R1-BBR1 的p2p sub-interface 介面

2.2 R1-BBR2 的p2p sub-interface 介面

2.3 R3-R4 的 p2p sub-interface 介面, 含 LAN 的網段.

2.4 EIGRP 的設定應讓這個Lab所使用的其它子網路一但加入時, 會自動加到 EIGRP 的 Table 中.

3 確定 R1 的 Topology Table 與 Routing Table:

3.1 由 BBR1 學到 192.168.x.0/24

3.2 由 BBR2 學到 172.30.10.0/24

3.3 比對 Topology Table 與 Routing Table 中的Metric 值.

4 啟動 EIGRP 於:

4.1 R1 與 (R2, R3, R4) 間的 Multipoint Sub-interface.

4.2 所有Router 要能交換 Routes.

5 檢查 Neighbor 與 Routing Table:

5.1 R1-R2

5.2 R1-R3

5.3 R1-R4

5.4 Shutdown R3-R4, 檢查 R3此時學不到 172.30.24.0/24

6 調整 R1 的設定:

Sol:

LAB 2-3


以上router的介面名稱可能與您正在使用的Lab有所不同, 請以實際介面名稱為準.

1 在LAN介面上設定EIGRP Authentication.

1.1 EIGRP Authentication 應使用 安全的機制.

1.2 EIGRP Authentication 的密碼永不過期.

1.3 在所有Router上應用正確的指令檢查 Key Chain 的設定正確無誤, 並且使用正確的key 在作Authentication, 確認 Key 的時間永不過期.

1.4 檢查 EIGRP Neighbor 正確的建立.

1.5 檢查 EIGRP Routing 都有正確學習到每一個Router上.

2 在WAN介面上設定 EIGRP Authentication.

2.1 EIGRP Authentication 應使用 安全的機制.

2.2 EIGRP Authentication 的密碼永不過期.

2.3 在所有Router上應用正確的指令檢查 Key Chain 的設定正確無誤, 並且使用正確的key 在作Authentication, 確認 Key 的時間永不過期.

2.4 檢查 EIGRP Neighbor 正確的建立.

2.5 檢查 EIGRP Routing 都有正確學習到每一個Router上.

6.1 讓 R3 與 R4 仍能學到彼此的LAN subnet.

6.2 No shutdown R3-R4 間的介面.

7 檢查 R1-R2, R1-R3, R1-R4:

7.1 Neighbor Table

7.2 Topology Table

7.3 Routing Table

7.4 觀察 Topology Table 與 Routing Table 的 metric 變化.

7.5 再次 shutdown R3-R4 間的介面, 並確認 R2, R4 是從 R1 學到 172.30.13.0/24

8 正確調整參數, 影響路徑的選擇:

8.1 設定R3 與 R4之間介面的 Delay, 讓R2把學自R1的Route當作是Feasible Successor(Backup)

8.2 設定 R3, 讓R3到 172.30.24.0/24 的路徑可執行 Unequal Cost Load Balancing.

8.3 設定正確Route與參數, 讓 R3 到 172.30.24.0/24 的路徑是以 R4作為 Primary Route, 以 R1作為Backup Route.

9 最後, 確定要讓R3的 LAN 要能與 R2, R4 的 LAN 仍然可以建立連線

Sol:

LAB2-4


Trouble Ticket A: EIGRP Adjacency Issues

1 您已離開公司一段時間, 在這段時間當中, 有位資淺的工程師替代了您的工作. 由於當時正好有需求要新增額外的 IP 網段於R2與R4之間, 於是那位工程師便設定了額外的 IP網段, 但卻導致在此網段之外的其它網路因而斷線. 你被要求要檢查並更正這個錯誤, 以便讓此新增的網段能夠被存取及使用.

2 另一個問題是有關與BBR1 Router間的 EIGRP Adjacency, 就在你不在的這段時間, 這位資淺的工程師被要求改善與BBR1之間的Routing的安全性, 但是卻導致與BBR1無法建立Adjacency. 你再次被要求更正這個現象.

3 這位工程師也被要求要對EIGRP進行最佳化. 他作了一些設定以便改善R4的Metric計算的數值, 但此舉卻造成與R4之間斷線. 此外, 他企圖在 Routers上用summarization 的設定將Routing進行最佳化, 但卻沒有得到預期的結果, 你也被要求對此進行處理.

4 你的助手向你報告, 連接在R2與R4之間的LAN, 在最近才部署上去的R3上面是看不到的. R3僅有有限的連線. 但在R1上卻可以看到並存取所有的網路. 你必需找出問題並且對其進行更正.

Instructions:

5 你與同伴必需建立 Troubleshooting 與 Verification Plan 並進行分工. Trouble Ticket A 與 B是可以同步進行的. 請將處理的過程記錄於書上的"Troubleshooting Log"以便你能夠據此與同伴進行討論, 並且review整個過程.

Sol:

———————————————————————————————————————-

LAB3-1


1 設定OSPF於介面上 (R1-R3的LAN, R2-R4的LAN):

1.1 設定OSPF LAN的網段能夠被存取的到.

1.2 所有的Router都在Backbone Area.

1.3 OSPF 的設定應該要精確, 以免當額外的子網段介面加入時自動的啟動了OSPF.

1.4 IP Routing Table 中的網段也應該與實際網路遮罩吻合.

2 確認R1-R3, R2-R4的LAN

2.1 OSPF Neighbor已建立:

2.2 並檢查Neighbor建立的時間有多久?

2.3 是否有任何問題影響Neighbor的溝通? 例如封包在Queue中無法送出?

2.4 在不看Routing Table 與 Topology Table的情況下, 請確定有送出所有LAN與Loopback正確的Route以及正確的 Subnet mask.

2.5 檢查R1的Topology 與 Routing Table進行比較, 你應該看到R3的 Loopback網段及其metric 值.

2.6 確定R1與R3的LAN上是由 R1擔任DR.

Verify By # show ip ospf neighbor

3 設定OSPF於WAN介面上(R3-R4)

3.1 R3-R4需交換LAN與Loopback網段.

已經於 1 中完成

3.2 OSPF的設定是在 Frame-Relay的Point-to-Point介面上.

3.3 Area 請設定在Backbone Area之內.

3.4 OSPF的設定應該要精確, 以便有額外的IP加入Router時不會自動的被加入OSPF送出.

Verify By #show ip ospf neighbor

4 確認R3-R4的WAN

4.1 OSPF Neighbor已建立:

4.2 並檢查Neighbor建立的時間有多久?

4.3 是否有任何問題影響Neighbor的溝通? 例如封包在Queue中無法送出?

4.4 在不看Routing Table 與 Topology Table的情況下, 請確定有送出所有LAN與Loopback正確的Route以及正確的 Subnet mask.

4.5 檢查R1的Topology 與 Routing Table進行比較, 你應該看到R3的 Loopback網段及其metric 值.

Verify by
1. sh ip protocols
2. Sh ip ospf database
3. Sh ip route

5 設定OSPF於WAN介面上(R1-R2, R1-R4)

5.1 OSPF的設定是在 Frame-Relay的Multi-point介面上.

5.2 Area 請設定在Backbone Area之內.

5.3 OSPF的設定應該要精確, 以便有額外的IP加入Router時不會自動的被加入OSPF送出.
Note: multi-point subinterface require Neighbor Command config on one of multipoint interface connected router

6 確認R1-R2, R1-R4的WAN

6.1 OSPF Neighbor已建立:

6.2 並檢查Neighbor建立的時間有多久?

6.3 是否有任何問題影響Neighbor的溝通? 例如封包在Queue中無法送出?

6.4 檢查所有的Router的Topology Table與Routing Table都有學習到所有的Routes及正確的Subnet Mask.

Sol:

R1

Config T

Router OSPF 1

Network 10.1.1.1 0.0.0.0 area 0

Network 172.30.13.0 0.0.0.255 area 0

Network 10.1.110.0 0.0.0.255 area 0

R2

Config T

Router OSPF 1

Network 10.2.2.2 0.0.0.0 area 0

Network 172.30.24.0 0.0.0.255 area 0

Network 10.1.110.0 0.0.0.255 area 0

R3

R4

Config T

Router OSPF 1

Network 10.4.4.4 0.0.0.0 area 0

Network 172.30.24.0 0.0.0.255 area 0

Network 10.1.110.0 0.0.0.255 area 0

Network 10.1.134.0 0.0.0.255 area0

——————————————————————————————————————————

LAB 3-2


1 設定R1-BBR2 WAN 界面上OSPF於(R1-BBR2):

BBR2已經預設為Area 0.

啟動 OSPF 於 R1與BBR2的 WAN介面, 同樣是 Area0.

R1應該由BBR2收到172.30.10.0/24 的網段.

R1

Conf t

Router os 1

Network 10.1.116.0 0.0.0.255 area 0

End

Sh ip os n

Sh ip osp da

Sh ip ro

2 確認OSPF的設定(R1-BBR2):

Neighbor 應該已經建立

比對 R1的LSDB與IP Routing Table, 應正確學到Routes.

確定R1的Route可以與172.30.10.0/24網段連線.

3 設定其它OSPF Area (R2, R3, R4):

設定R3的所有介面於 Area 3之中.

設定R2與R4 的所有介面於Area24之中.

檢查所有的Router都應該學習到所有網段的Routes.

4 確認OSPF的設定:

R1與R3應建立Adjacency於Area 3之中.

比對R3的LSDB, Routing Table. R3應正確學到Routes.

R1-R2, R1-R4應建立Adjacency於Area 24之中.

比對R2與R4的LSDB, Routing Table.

R2, R4應正確學到Routes, 包含來自BBR2的subnets.

確定可以正確連到BBR2的172.30.10.0/24 Subnet.

5 調整OSPF參數:

請在Area24中精確的調整Path Cost, 影響運算的結果. 目的是讓R1的172.30.24.0/24 Route是以R2為最佳路徑.

為了讓Area 0更穩定, 請手動指定R1的Router ID.

請在R3上設定讓LAN網段減少不必要的Traffic. 目的是簡省CPU的運算.

6 確認OSPF的設定:

確定所有的Router的OSPF Adjacency 都是 up並且運作正常.

R1應與BBR2在 Area0 中.

R1應與R3在Area3 中.

R1應與R2, R4 在Area24中.

R1應使用新定的Router ID.

R1應使用R2作為前往172.30.24.0/24 做為最佳路徑.

R3應只有與R1建立Adjacency

R3不應透過LAN與R1建立Adjacency.

SOL

2. 檢測OSPF的基本設定,運作及目前網路的結構

Rl#show ip ospf neighbor

Rl#show ip ospf database

3. Summarizing the OSPF intemal routes.

R1#

router ospf 1

area 0 range 172.30.0.0 255.255.0.0

4. 1. Use the following example to configure router R3 in this lab:

R3#

router ospf 1

summary-address 192.168.0.0 255.255.0.0

4.2. Verify the OSPF link-state databases and IP routing tables.

R1#show ip ospf database

——————————————————————————————————————————-

LAB3-3


檢查OSPF (R1-R4)目前的Routes:

R1-R4 都已設定將直接連接的網段以OSPF送出.

R3 已將OSPF External Routes送往你的OSPF網路當中.

檢查OSPF(R1-R4)既有狀態:

檢視R1-R4的設定, 包括涵蓋的network, 啟動的介面, Adjacencies, LSDB與OSPF的Area.

確定R1-R4都可以連到(Ping) 其所學到的每一個網段.

查看Routing Table, 寫下目前的各Router送出的Routes.

設定OSPF Internal Routes 的 Summarization:

根據前面收集的資訊, 進行Routes Summarization的設定.

你需要將來自BBR2的 172.30.x.0/24 Routes進行Summary.

確認OSPF Summarization的設定:

確定 R1-R4的Adjacency仍然正常.

檢查 172.30.x.0/24 經過 Summary 之後的Routes 資訊存在於R1-R4的LSDB 與Routing Table中.

確定各Router都能連線到(Ping)172.30.x.0/24 的IP.

進一步設定OSPF External Routes 的 Summarization:

R3目前已將192.168.x.0/24 的Routes 以 Redistribute的方式送入OSPF之中, 由於R3是這些網段的唯一來源, 因此沒有必要讓其它Router一一學習到每一筆192.168.x.0的Route. 但是, 未來還有可能會有192.168.x.0/24的網段會加入R3.

請設定將192.168.x.0/24 的Routes 進行 Summarization.

確認OSPF Summarization的設定:

確定 R1-R4的Adjacency仍然正常.

檢查 192.168.x.0/24 Summary 之後的Route 資訊存在於R1-R4的LSDB 與Routing Table中.

確定各Router都能連線到(Ping)192.168.x.0/24 的IP.

Solution

Summarizing the OSPF intemal routes.

1. Use the following example to configure router Rl in this lab:

R1

router ospf 1

area 0 range 172.30.0.0 255.255.0.0

  1. 驗證 OSPF link-state databases and IP routing tables.

Rl#show ip ospf database

Summarizing OSPF extemal routes.

1. Use the following example to configure router R3 in this lab:

R3#

router ospf 1

summary-address 192.168.0.0 255.255.0.0

2. Verify the OSPF link-state databases and IP routing tables.

R1#show ip ospf database

————————————————————————————————————————–

LAB 3-4


檢查OSPF (R1-R4)目前的Routes及 網路結構

R1-R4 都已設定將直接連接的網段以OSPF送出.

R3 同時也已將OSPF External Routes送往你的OSPF網路當中.

檢查OSPF(R1-R4)既有狀態:

檢視R1-R4的設定, 包括所涵蓋的OSPF範圍, 啟動的介面, Adjacencies, LSDB與OSPF的Area.

確定R1-R4都可連接到OSPF送出的每一個網段.

查看Routing Table, 記錄目前的各Router送出的Routes與IP定址.

設定OSPF Area 24 的 Area Type:

在R2與R4沒有足夠的CPU與Memory來處理來大量Routing Information. 因此必需設法降低R2與R4上的OSPF Link-State Database大小來節省資源的使用.

確認OSPF的設定:

確認R1與 R2, R3, R4, BBR2都有建立 Adjacency.

確認 R2 與 R4之間有建立 Adjacency.

檢查 R1 與 R3的LSDB, 確定它們都有每一筆OSPF internal 與 external 資訊, 且都有將正確的最佳路徑置入Routing Table.

檢查 R2 與 R4的LSDB有變得較小, 因它們不再擁有每一筆來自External 的網段的資訊, 也就是那些被Redistributed 進入 OSPF的Routes.

確定即使 R2 與 R4 沒有每一筆資訊的細節, 但仍然可以與External Routes的網段連線.

設定 OSPF Area 24 的 Area Type:

在前一個步驟中, 雖然已降低了Area 24 的LSDB的資訊數量以節省R2, R4的資源使用, 但你發現它們仍然無法處理所有OSPF的資訊. 因此, 需要進一步降低OSPF的資訊數量, 可是還是要維持讓R2 與 R4可以連線到每一個網段.

確認OSPF 的設定:

確認R1與 R2, R3, R4, BBR2都有建立 Adjacency.

確認 R2 與 R4之間有建立 Adjacency.

檢查 R1 與 R3的LSDB, 確定它們都有每一筆細節的OSPF internal 與 external 資訊, 且都有將正確的最佳路徑置入Routing Table.

檢查 R2 與 R4的LSDB有變得比較小, 因為它們不再擁有每一筆來自Area 24 以外的網段的資訊, 換言之就是那些被Redistribute 進入 OSPF的Routes以及其它Area的Routes.

確定即使 R2 與 R4 沒有每一筆資訊的細節, 但仍然可以與External Routes的網段

與其它的Area連線.

設定 OSPF Area 3 的 Area Type:

此步驟中將透過設定降低 Area 3 內的資訊數量.

你發現R3沒有足夠的記憶體來儲存所有的OSPF IP Routing 資訊, 換言之, 無法儲存任何動態學到的Routing 資訊.

確認OSPF 的設定:

確認R1與 R2, R3, R4, BBR2都有建立 Adjacency.

確認 R2 與 R4之間有建立 Adjacency.

檢查 R1的LSDB, 確定它們都有每一筆細節的OSPF internal 與 external 資訊, 且都有將正確的最佳路徑置入Routing Table.

確定 R1 可以連接所有學習到的網段.

檢查 R2 與 R4有來自Area 24 internal的Route, 但沒有Area24以外的網段的資訊. 即便如此, R2與R4 仍可連接每一個網段.

檢查 R3的Database並確認其Size變小了, Database 應該有Area3內部的資訊及Redistribute進入Area 3 的資訊, 但沒有任何來自其它Area的資訊或從其它Area 進來的 External Route.

確定 R3 可以連線到每一個網段.

Solution

1.SKIP

2.

Rl#
router ospf 1
area 24 stub

R2#
router ospf 1
area 24 stub

R4#

router ospf 1

area 24 stub

3.

4.

Use the following examplc to configure routcr R 1 in this lab:

R1#

router ospf 1

area 24 stub no-summary

5.

6.

5.1. Use the following example to configure router R1 in this lab:

R1#

router ospf 1

area 3 nssa no-summary

R3#

router ospf 1

area 3 nssa

7.

—————————————————————————————————————————–

LAB 3-5


檢視網路目前的設定:

1 檢查Routing的設定與動作是否正常.

2 R1, R2, R3, R4目前應已設定OSPF並將它們直連的網段送出.

3 部份Router同時還送出一些External OSPF network 到OSPF的routing domain中.

網路管理員必需在Router上進行設定來防止Traffic被駭客侵入並製造Routing的黑洞, 因此:

1 請以per-interface設定OSPF Authentication於Area 3 與 Area24 的Router上.

2 於 R3-R1間使用Simple OSPF Authentication 並查看其動作過程.

3 於 R2-R4間的LAN使用較安全的 OSPF Authentication 並查看其動作過程.

由於使用最小的指令在下列OSPF AREA的所有界面設定較安全的 OSPF驗證:

1 在Area 24上設定Secure的OSPF Authentication驗證.

2 請確定Authentication成功, LSDB, Routing Table 學習正確.

SOLUTION

  1. 在所有的路由器上用下列指令記錄目前的 OSPF設定
    Rx# show ip ospf
    RX#show ip ospf databae
    RX#show ip route [ospf ]
    RX#show ip ospf neighbor
  2. 在 R1,R3 的OSPF 路由器上 ,針對WAN連結不同OSPF路由器的界面配置簡單密碼驗證 ,密碼為CISCO
    在 R2,R4 的OSPF 路由器上 ,針對WAN連結不同OSPF路由器的界面配置較安全的md5驗證 ,ID及key為 1及CISCO
    R1#

interface SerialO/0/0.2 point-to-point

ip ospf authentication

ip ospf authentication-key CISCO

R2#

interface FastEthernetO/O

ip ospf authentication message-digest

ip ospf message-digest-key 1 md5 CISCO

R3#

interface SerialO/0/0.2 point-to-point

ip ospf authentication

ip ospf authentication-key CISCO

R4#

interface FastEthernetO/O

ip ospf authentication message-digest

ip ospf message-digest-key 1 md5 CISCO

  1. 驗證R1-R4在驗證後用

    Rx# show ip ospf
    RX#show ip ospf databae
    RX#show ip route [ospf ]
    RX#show ip ospf neighbor

令觀察的狀態和未驗證之前相同

LAB 4-1


基本設定

  1. 在R1與R3之間設定RIPv2路由協定,並且宣告R3的區域網路網段,RIPv2只在廣域網路上交換更新訊息 .
  2. 在R1, R2 與 R4之間設定 OSPF.路由協定,R1的OSPF路由執行程序只包含連結到 R2,R4的廣域網路界面,
    而R2,R4則除了連結R1的廣域網路亦包含了區域網路.
  3. 在R1 與 BBR2之設定EIGRP路由協定.

基本設定驗證檢查:

  1. 確認R1與R3之間的RIPv2已啟動, 且R1可以存取由RIPv2學到的網段.
  2. 確認R1與BBR2之間的EIGRP已啟動, 且R1收到由BBR2送出的EIGRP Routes, 並且可以存取這些網段.
  3. 確認R1, R2與R4之間的OSPF已啟動, Adjacency已建立, 而且R1可從LAN Segment上的R2與R4學到Routes.同時 R1也可以存取這些網段.

單向Redistribution(RIP-to-EIGRP) 設定:

  1. 在R3上僅將目前存的Loopback上的網路以重分配(redistribution)的方式加入RIPv2 路由協定,將網段送出.
    (限制:不可使用ACL及Route-Map 進行設定->Distribute with prefix-list)
  2. 在R1上設定RIP-to-EIGRP 的redistribution與filter, 目的是只讓其中一段Loopback(192.168.1.0/24)轉入EIGRP協定
    (不可使用Distribute-List.->Route-map with ACL )
  3. 由於RIP-to-EIGRP是單向將RIP的route轉換為EIGRP, 因此你必需在R3上設定一筆靜態預設路由(Static Default Route)
    以提供能夠連線到其它網路的能力.

單向Redistribution(RIP-to-EIGRP) 設定驗證檢查::

  1. 檢查R1與R3上的RIPv2 Database, 確定R3的Loopback網段在Redistribution後已出現.
  2. 在R3上再新增一個Loopback介面, 確定這個新增的介面不會自動被Redistribution進入RIPv2的Database中.
    R1也不應收到這個訊息.
  3. 確定 R3可以連線到BBR2的區域網路LAN.

在R1上設定OSPF vs EIGRP双向Redistribution(及 OSPF vs RIP):

  1. 在適當的Router上設定OSPF與RIP的双向Redistribution.
  2. RIP 僅接受原來由OSPF路由協定產生的路由進行重分配至RIP的路由協定中
  3. OSPF僅接受原來由RIP路由協定產生的路由進行重分配至OSPF的路由協定中

在R1上設定OSPF vs EIGRP双向Redistribution(及 OSPF vs RIP)驗證檢查

  1. 檢查R3上RIP的Routing Table, 應可以看到來自OSPF網域的網段.
  2. 檢查R1上EIGRP的Topology Table, 應可看到來自OSPF網域的網段.DEX的routes
  3. 檢查R2與R4的OSPF LSDB 與 Routing Table, 應可看到從RIP與EIGRP網域中Redistribution進來的Routes.
  4. 確定可以從R2的LAN連接到BBR2的LAN.
  5. 確定可以從R3的LAN 連接到R2 的LAN.

Solution

1.在R1&R3 啟動 RIP 路由協定

Rl#

router rip

version 2

network 10.0.0.0

no auto-summary

R3#

router rip

version 2

network 10.0.0.0

network 172.30.0.0

no auto-summary

2.驗證RIP路由協定確運作.

驗證 RIP的指令

RX# show ip rip database

RX# show ip route [RIP]

3.在R1&R2&R4 啟動 OSPF 路由協定

R1#

interface SerialO/0/0.1 multipoint

ip ospf network point-to-multipoint

ip ospf hello-interval 10

router ospf 1

log-adjacency-change

network 10.1.110.0 0.0.0.255 area 0

R2#

interface serialO/0/0.1 multipoint

ip ospf network point-to-multipoint

ip ospf hello-interval 10

router ospf 1

log-adjacency-changes

network 10.1.110.0 0.0.0.255 area 0

network 172.30.24.0 0.0.0.255 area 0

R4#

interface serialO/0/0.1 multipoint

ip ospf network point-to-multipoint

ip ospf hello-interval 10

router ospf 1

log-adjacency-changes

network 10.1.110.0 0.0.0.255 area 0

network 172.30.24.0 0.0.0.255 area 0

在R1&R2&R4 驗證 OSPF 路由協定

驗證OSPF的指令

RX#show ip ospf interface

RX#show ip ospf neighbor

RX#show ip ospf database

RX#show ip route

3.在R1啟動 eigrp 路由協定

R1#

router eigrp 1

network 10.l.l16.0 0.0.0.255

在R1驗證 EIGRP 路由協定

驗證 EIGRP的指令

RX#show ip eigrp interface

RX#show ip eigrp neighbor

RX#show ip eigrp toplogy

RX#show ip route

4.(Redistribute CONNECTED)重分配指定的直連界面到 RIP 路由協定

利用 Prefix-list限制重分配的直連界面的網路

ip prefix-list PL-R1P seq 5 permit 192.168.1.0/24

ip prefix-list PL-R1P seq 10 permit 192.168.2.0/24

ip prefix-list PL-R1P seq 15 permit 192.168.3.0/24

R3#

router rip

redistribute connected

distribute-list prefix PL-RIP out connected

R1#重分配指定的RIP路由到 eigrp 路由協定

router eigrp 1

redistribute rip route-map RM-RIP

default-metric 1500 100 255 1 1500

!設定轉入 EIGRP路由的 seed metrics

ip access-list standard ACL-R工P

permit 192.168.2.0 0.0.0.255

permit 192.168.3.0 0.0.0.255

!

route-map RM-RIP deny 10

match ip address ACL-RIP

route-map RM-R1P permit 99

7.在R3上設定預設路由

R3#

ip route 0.0.0.0 0.0.0.0 10.1.113.1

8. 在R1上設定OSPF vs EIGRP双向Redistribution

R1#

router eigrp 1

redistribute ospf 1

router ospf 1

redistribute eigrp 1 subnets

9.在R1上設定OSPF vs RIP 双向Redistribution

R1#

router ospf 1

redistribute rip subnets

router rip

redistribute ospf 1

________________________________________________________________________________________________________________________________________

LAB 5-1


在R1-R4上將所有的界面(LANs ,WANs 及 loopbacks)加入EIGRP 1 的路由協定並檢查其運作
測試由SW上送到 192.168.1.0 及 192.168.2.0的路徑,及是否可到達192.168.1.0 及 192.168.2.0

測試由R1上送到 192.168.3.0 的路徑,及是否可到達192.168.3.0
在R3上更改路徑決定政策,將由來源為 SW上的IP 位址(172.30.13;11)送往192.168.1.0及192.168.2.0時
使用 R1當作下一站位址 (path R3->R1->R2->R4)
驗證R3的決策性路由是否正確運作
在R1上更改路徑決定政策,將R1本身產生的資料流量送往192.168.3.0使用 R3當作下一站位址 (path R1->R3->R4)

STEP1

Rl#

router eigrp 1

network 10.0.0.0

network 172.30.0.0

no auto-sumrnary

R2#

router eigrp 1

network 10.0.0.0

network 172.30.0.0

no auto-summary

R3#

router eigrp 1

network 10.0.0.0

network 172.30.0.0

no auto-summary

R4#

router eigrp 1

network 10.0.0.0

network 172.30.0.0

network 192.168.0.0 0.0.255.255

no auto-summary

STEP2

show ip route & ping

STEP3
在R3上設定 POLICY-BASE ROUTING

Use the following example to configure PBR on router R3 in the lab.

R3#

interface FastEthernetO/O

ip policy route-map RM-PBR

ip access-listextended ACL-PBR

permit ip host 172.30.13.11 192.168.1.0 0.0.0.255

permit ip host 172.30.13.11 192.168.2.0 0.0.0.255

route-map RM-PBR permit 10

match ip address ACL-PBR

set ip next-hop 172.30.13.1

驗證the traffic flow from switch SWl and PBR on R3.

Examine the path of the IP packcts.

timeout is 2 seconds:

sw1#ping 192.168.1.1

Type escape sequence to abort.

Sending 5 , 100-byte ICMP Echos to 192.168.1.1 ,

!!!!!

Success rate is 100 percent (5/5) , round-trip min/avg/max = 58/58/59 ms

timeout is 2 seconds:

R3#debug ip policy

policy routing debugging is on

Note Enable debugging in order to see the policy macth following the ping commands on pod

sw1#ping 192.168.1.1

Type escape sequence to abort.

sending 5 , 100-byte 工CMP Echos to 192.168.1.1 , timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5) , round-trip min/avg/max = 51/58/67 ms

R3#

*May 24 14:14:49.025: IP: s=172.30.13.11 (FastEthernetO/O) , d=192.168.1.1 , len

100, FIB policy match

*May 24 14:14:49.025: IP: s=172.30.13.11 (FastEthernetO/O) , d=192.168.1.1 , len

100 , policy match

*May 24 14:14:49.025: IP: route map RM-PBR, item 10 , permit

*May 24 14:14:49.025: IP: s=172.30.13.11 (FastEthernetO/O) , d=192.168.1.1

(FastEthernetO/O) , len 100, policy routed

sw1#ping 192.168.3.1

Type escape sequence to abort.

Sending 5 , 100-byte 工CMP Echos to 192.168.3.1 , timeout is 2 seconds:

!!!!!.

8uccess rate is 100 percent (5/5) , round-trip min/avg/max = 50/57/59 ms

R3#

*May 24 14:15:16.645: IP: s=172.30.13.11 (FastEthernetO/O) , d=192.168.3.1 , len

100 , FIB policy rejected(no match) – normal forwarding

*May 24 14:15:16.645: IP: s=172.30.13.11 (FastEthernetO/O) , d=192.168.3.1

(FastEthernetO/O) , 1en 100 , po1icy rejected – norma1 forwarding

在R1上定義決策性路由影響本身產生流量的傳送路徑

ip local policy route-map RM-LOCAL-PBR
!

ip access-list extended ACL-LOCAL-PBR

permit ip any 192.168.3.0 0.0.0.255

!

route-map RM-LOCAL-PBR permit 10

match ip address ACL-LOCAL-PBR

set ip next-hop 172.30.13.3

. 驗證Verify the traffic flow and PBR on Rl.

R1#ping 192.168.3.1

Type escape sequence to abort.

Sending 5 , 100-byte ICMP Echos to 192.168.3.1 , timeout is 2 seconds:

!!!!!.

Success rate is 100 percent (5/5) , round 咀trip min/avg/max = 56/57/60 ms

R1#traceroute 192.168.3.1

Type escape sequence to abort.

Tracing the route to 192.168.3.1

1 172.30.13.3 0 msec 0 msec 0 msec

2 172.30.13. 工36 msec 32 msec 32 msec

3 10.1.112.2 28 msec 28 msec 28 msec

4 172.30.24.4 28 msec 28 msec *

R1#debug ip po1icy

Po1icy routing debugging is on

Note:Enable debugging in order to see the policy match following the ping commands on pod


router R1

R1#ping 192.168.3.1

Type escape sequence to abort.

Sending 5 , 100-byte ICMP Echos to 192.168.3.1 , timeout is 2 seconds:

!!!!!.

Success rate is 100 percent (5/5) , round-trip min/avg/max = 56/58/60 ms

!

R1#

*May 24 14:28:08.341: IP: s=10.1.112.1 (loca1) , d=192.168.3.1 , 1en 100 , po1icy

match

*May 24 14:28:08.341: IP: route map RM-LOCAL-PBR , item 10 , permit

*May 24 14:28:08.341: IP: s=10.1.112.1 (loca1) , d=192.168.3.1

(FastEthernetO/O) , 1en 100 , po1icy routed

*May 24 14:28:08.341: IP: local to FastEthernetO/O 172.30.13.3

*May 24 14:28:08.401: IP: s=10.1.112.1 (local) , d=192.168.3.1 , len 100 , policy

match

*May 24 14:28:08.401: IP: route map RM-LOCAL-PBR , item 10 , permit

*May 24 14:28:08.401: IP: s=10.1.112.1 (local) , d=192.168.3.1

(FastEthernetO/O) , len 100 , policy routed

*May 24 14:28:08.401: IP: 1ocal to FastEthernetO/O 172.30.13.3

*May 24 14:28:08.457: IP: s=10.1.112.1 (local) , d=192.168.3.1 , len 100 , policy

match

*May 24 14:28:08.457: IP: route map RM-LOCAL-PBR, item 10 , permit

*May 24 14:28:08.457: IP: s=10.1.112.1 (local) , d=192.168.3.1

(FastEthernetO/O) , len 100 , policy routed

*May 24 14:28:08.457: IP: local to FastEthernetO/O 172.30.13.3

*May 24 14:28:08.517: IP: s=10.1.112.1 (local) , d=192.168.3.1 ,len 100, policy

Match

R1#ping 192.168.1.1

Type escape sequence to abort.

Sending 5 , 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds:

! ! ! ! !

Success rate is 100 percent (5/5) ,言。und-trip min/avg/max = 56/56/60 ms

R1#

*May 24 14:28:18.977: IP: s=10.1.112.1

rejected — normal forwarding

*May 24 14:28:19.033: 工P: s=10 .1. 112.1

———————————————————————————————————

LAB 6-1 & 6-2 BGP


TASK1

  1. 在 R1-R4 上 設定及啟用 BGP 協定
  2. R3 加入 BGP AS 130  ,R1 加入 BGP AS 100 ,並且在 R3 & R1 之間建立 EBGP 的 PEER 關係
  3. R3 加入 BGP AS 130  ,R4 加入 BGP AS 400 ,並且在 R3 & R4 之間建立 EBGP 的 PEER 關係
  4. R2加入 BGP AS 200  並和,在AS 100 的R1 加入 之間建立 EBGP 的 PEER 關係
  5. 在 AS200 的R2 和 加入 BGP AS 400的 R4 之間 建立 EBGP 的 PEER 關係
  6. 在 AS 130 ,100,400之間的peer 需使用 MD5 進行驗證以達到最安全的交換訊息方式
  7. 驗證所有 PEER 正確建立鄰居,及接收BGP路由更新訊息

    SOL:

    STEP 1: 在 R1-R4 使用 show ip int brief | section up 找出所有使用中的界面及IP位址

    STEP 2 : 設定基本 BGP PEER關係

R1#

router bgp 100

no synchronization

bgp log-neighbor-changes

ne 工ghbor 10.1.112.2 remote-as 200

neighbor 10.1.113.3 remote-as 130

neighbor 10.1.113.3 password cisco

no auto-summary

R2#

router bgp 200

no synchronization

bgp log-neighbor-changes

neighbor 10.1.112.1 remote-as 100

neighbor 10.1.124.4 remote-as 400

no auto-summary

R3#

router bgp 130

no synchronization

bgp log-neighbor-changes

neighbor 10.1.113.1 remote-as 100

neighbor 10.1.113.1 password cisco

neighbor 10.1.134.4 remote-as 400

neighbor 10.1.134.4 password cisco

no auto-summary

R4#

router bgp 400

no synchronization

bgp log-neighbor-changes

neighbor 10.1.124.2 remote-as 200

neighbor 10.1.134.3 remote-as 130

neigrilior 10.1.134.3 password cisco

no auto-summary

STEP3:驗證

在 R1-R4 上 使用

Rx# Show ip bgp summary

Rx# Show ip bgp neighbor

的指令檢查是否鄰居正確建立

TASK2

  1. R3利用 NETWORK 指令 宣告直連的網路 172.30.13.0/24 給之前建立的EBGP 鄰居
  2. R3 利用 REDISTRIBUT 的方式宣告 本身的 loop Back界面給 10.3.3.3/32 給PEER AS 100, 及 400
  3. 設定 R2 宣告 192.168.x.0的 網路 給鄰居的 AS, 除了宣告各別的192.168.x.0 /24 之外只要有任合
    一筆 192.168.x.0/24存在就只送出 192.168.0.0/16 的聚合網路
  4. 檢查 R1,R2,R4 是否有 172.30.13.0/24 , 10.3.3.3/32 的路由存在 ,且 R1,R3,R4 上是否有192.168.0.0/16 的路由存在(Routing Table & BGP TABEL)


Step 4 宣告BGP的網路

R3# router bgp 130
network 172.30.13.0 mask 255.255.255.0
redistribute connected route-map RM-BGP
!
ip access-l工ststandard ACL-BGP permit 10.3.3.3
!
route-map RM-BGP permit 10 match ip address ACL-BGP

R2#

router bgp 200

network 192.168.1.0

network 192.168.2.0

network 192.168.3.0

aggregate-address 192.168.0.0 255.255.0.0 summary-only

STEP 5 路由表及 BGP table驗證


在 R1,R2,R4 使用 Rx# Show ip bgp 及 sh ip route 的指令進行驗證 172.30.13.0/24 及 10.3.3.3/32 存在與否
在 R1,R3,R4 使用 Rx#show ip bgp 及 s hip route 的指令進行驗證 192.168.0.0/16是否存在

  LAB 6-2 BGP


各設備加入的 AS號碼


AS130 和 AS 100 建立 BGP PEER (R3-R1)

AS200 和 AS 100 建立 BGP PEER(R2-R1)

AS400 和 AS 200 建立 BGP PEER(R4-R2)

R3宣告172.30.13.0 /24資訊給 PEER 的 AS

R2宣告192.168.1.0 /24,192.168.2.0/24 ,192.168.3.0/24 資訊給 PEER 的 AS

更改BGP的預設選擇路徑的方式,封包由AS103送往AS200時將使用經由 10.1.131.1的路徑將被當成主要路徑,
10.1.113.1的路徑為次要路徑

建立額外的BGP PEER

SW1加入AS130 和在AS 100的R1建立 E-BGP SESSION

在AS130 的R3 和在AS 400的 R4建立 E-BGP SESSION

在AS130 的 R3和 SW 建立 i-BGP SESSION

移除AS130 R3 和 AS100 R1之間的 E-BGP PEER

檢查 EBGP 的 PEER 關係 ,及路由表中存在需要的路由 ,以及AS130的主要傳送及接收路徑
影響來自AS200 進入 AS130的路徑將偏好使用R1

SOL:

STEP1:建立基本BGP peer

R1#

router bgp 100
no synchronization
bgp log-neighbor-changes
neighbor 10.1.112.2 remoteas200
! TO R2
neighbor 10.1.113.3 remote-as 130
! TO R3
neighbor 10.1.131.3 remote-as 130
! TO R3
no auto-summary

R2#
router bgp 200
no synchronization
bgp log neighbor-changes
neighbor 10.1.112.1 remote-as 100
! TO R1
neighbor 10.1.124.4 remote-as 400
! To R4

no auto-summary

R3#
router bgp 130
no synchronization
bgp log-neighbor-changes
neighbor 10.1.113.1remote-as 100
! To R1
neighbor 10.1.131.1 remote-as 100
! To R1
no auto-summary

R4#
router bgp 400
no synchronization
bgp log-neighbor-changes
neighbor 10.1.124.2 remote-as 200
! TO R2
no auto-summary

STEP2:

RX# show ip bgp summary

RX# show ip bgp

STEP 3 宣告網路

R2#

router bgp 200

network 192.168.1.0

network 192.168.2.0

network 192.168.3.0

R3#

router bgp 130

network 172.30.13.0 mask 255.255.255.0

STEP4

RX# show ip bgp

RX# show ip route

STEP 5修正路徑

R3#

router bgp 130

neighbor 10.1.113.1 route-map RM-MED out

!影響返回的路徑,用10.1.131,1當作較佳路徑

neighbor 10.1.131.1 route-map RM-WEIGHT in

!影響傳送路徑使用10.1.131.1當作主要傳送路徑

route-map RM-WEIGHT permit 10

set weight 1000 route-map RM-MED permit 10

route-map RM-MED permit 10

set metric 1000

天線(通信中的重要部件)的基礎知識

 

 
天 線 基 本 知 識 講 座
   
1天線

1.1     天線的作用與地位

       無線電發射機輸出的射頻信號功率(RF Power),通過饋線(電纜)輸送到天線,再由由天線以電磁波式輻射出去。

電磁波到達接收地點後,由天線接下來(僅僅接收很小很小一部分功率),並通過饋線送到無線
電接收機。可見,天線是發射和接收電磁波的一個重要的無線電設備,沒有天線也就沒有無線電通信。

       天線品種繁多,以供不同頻率、不同用途、不同場合、不同要求等不同情況下使用。
對於眾多品種的天線,進行適當的分類是必要的:

按用途分類,可分為通信天線、電視天線、雷達天線等;

按工作頻段分類,可分為短波天線、超短波天線、微波天線等;

按方向性分類,可分為全向天線、定向天線等;

按外形分類,可分為線狀天線、面狀天線等;等等分類。

*   電磁波的輻射 *

       導線上有交變電流流動時,就可以發生電磁波的輻射,輻射的能力與導線的長度和形狀有關。
如 圖1.1 a 所示,若兩導線的距離很近,電場被束縛在兩導線之間,因而輻射很微弱;將兩導線
張開,如 圖1.1 b 所示,電場就散播在周圍空間,因而輻射增強。 

        必須指出,當導線的長度 L 遠小於波長 λ 時,輻射很微弱;導線的長度 L 增大到可與波長
相比擬時,導線上的電流將大大增加,因而就能形成較強的輻射。


1.2   對稱振子 (dipole)

         對稱振子是一種典型的、迄今為止使用最廣泛的天線,單個半波對稱振子可簡單地單獨立地使用
或用作為抛物面天線的饋源,也可採用多個半波對稱振子組成天線矩陣。

         兩臂長度相等的振子叫做對稱振子。每臂長度為四分之一波長、全長為二分之一波長的振子,稱
半波對稱振子,  見 圖1.2 a  。

        另外,還有一種異型半波對稱振子,可看成是將全波對稱振子折合成一個窄長的矩形框,並把全
波對稱振子的兩個端點相疊,這個窄長的矩形框稱為折合振子,注意,折合振子的長度也是為二分之
一波長,故稱為半波折合振子,  見 圖1.2 b  。


1.3  天線方向性的討論

1.3.1    天線方向性

        發射天線的基本功能之一是把從饋線取得的能量向周圍空間輻射出去,基本功能之二是把大部
分能量朝所需的方向輻射。    垂直放置的半波對稱振子具有平放的  “甜甜圈" 形的立體方向圖
(圖1.3.1 a)。   立體方向圖雖然立體感強,但繪製困難,      圖1.3.1 b 與圖1.3.1 c 給出了它
的兩個主平面方向圖,平面方向圖描述天線在某指定平面上的方向性。從圖1.3.1 b 可以看出,在
振子的軸線方向上輻射為零,最大輻射方向在水平面上;而從圖1.3.1 c 可以看出,在水平面上各
個方向上的輻射一樣大。

1.3.2    天線方向性增強

        若干個對稱振子組陣,能夠控制輻射,產生"扁平的麵包圈" ,把信號進一步集中到在水平面
方向上。下圖是4個半波對稱振子沿垂線上下排列成一個垂直四元陣時的立體方向圖和垂直面方向圖。

也可以利用反射板可把輻射能控制到單側方向 ,      平面反射板放在陣列的一邊構成扇形區覆蓋天線。下面的水平面方向圖說明瞭反射面的作用–反射面把功率反射到單側方向,提高了增益。

天線的基本知識全向陣 (垂直陣列    不帶平面反射板)     拋物反射面的使用,更能使天線的輻射,像光學中的探照燈那樣,把能量集中到一個小立體角內,從而獲得很高的增益。不言而喻,抛物面天線的構成包括兩個基本要素:拋物反射面 和 放置在抛物面焦點上的輻射源。


1.3.3    增益    (Gain)


增益是指:在輸入功率相等的條件下,實際天線與理想的輻射單元在空間同一點處所產生的信號的功率密度之比。

它定量地描述一個天線把輸入功率集中輻射的程度。增益顯然與天線方向圖有密切的關係,方向圖主瓣越窄,副瓣越小,增益越高。
可以這樣來理解增益的物理含義——為在一定的距離上的某點處產生一定大小的信號

如果用理想的無指向性點源作為發射天線,需要100W的輸入功率,而用增益為 G = 13 dB = 20
的某定向天線作為發射天線時,輸入功率只需 100 / 20 = 5W .    換言之,某天線的增益,就其最
大輻射方向上的輻射效果來說,與無指向性的理想點源相比,把輸入功率放大的倍數。       

     半波對稱振子的增益為G = 2.15 dBi ;            4個半波對稱振子 沿垂線上下排列,構成一個垂直
四元陣,其增益約為G = 8.15 dBi  ( dBi這個單位表示比較物件是各向均勻輻射的理想點源) 。
如果以半波對稱振子作比較物件,則增益的單位是dBd .

半波對稱振子的增益為G = 0 dBd (因為是自己跟自己比,比值為1,取對數得零值。) ;
垂直四元陣,其增益約為G = 8.15 – 2.15 = 6 dBd .

1.3.4    波瓣寬度       

        方向圖通常都有兩個或多個瓣,其中輻射強度最大的瓣稱為主瓣,其餘的瓣稱為副瓣或旁瓣。
參見圖1.3.4 a , 在主瓣最大輻射方向兩側,輻射強度降低 3 dB(功率密度降低一半)的兩點間
的夾角定義為波瓣寬度(又稱 波束寬度 (beamwidth) 或 主瓣寬度 或 半功率角)。
波瓣寬度越窄,方向性越好,作用距離越遠,抗干擾能力越強。        

        還有一種波瓣寬度,即 10dB波瓣寬度,顧名思義它是方向圖中輻射強度降低 10dB (功率密
度降至十分之一) 的兩個點間的夾角,見圖1.3.4 b .


1.3.5    前後比         

         方向圖中,前後瓣最大值之比稱為前後比,記為 F / B 。前後比越大,天線的後向輻射
(或接收)越小。前後比F / B 的計算十分簡單——-

F / B = 10 Log {(前向功率密度)  /( 後向功率密度)}

對天線的前後比F / B 有要求時,其典型值為 (18 ~ 30)dB,特殊情況下則要求達
(35 ~ 40)dB .


1.3.6   天線增益的若干近似計算式         

1)             天線主瓣寬度越窄,增益越高。對於一般天線,可用下式估算其增益:  

G(  dBi  ) =   10 Log { 32000  / ( 2θ3dB,E ×2θ3dB,H )}

式中, 2θ3dB,E 與 2θ3dB,H  分別為天線在兩個主平面上的波瓣寬度;
32000 是統計出來的經驗資料。        

2)            對於抛物面天線,可用下式近似計算其增益:

       G(  dB i ) =   10 Log { 4.5 × ( D / λ0 )2}

式中,  D 為抛物面直徑;

             λ0 為中心工作波長; 

             4.5 是統計出來的經驗資料。

3)            對於直立全向天線,有近似計算式

        G( dBi ) =   10 Lg { 2 L / λ0 }

式中,  L 為天線長度;

             λ0 為中心工作波長;

1.3.7   上旁瓣抑制         

 對於基地站台天線,人們常常要求它的垂直面(即俯仰面)方向圖中,主瓣上方第一旁瓣
盡可能弱一些。這就是所謂的上旁瓣抑制 。基地站台的服務物件是地面上的移動電話用戶,指向天
空的輻射是毫無意義的。



 1.3.8     天線的下傾                  

為使主波瓣指向地面,安置時需要將天線適度下傾。

1.4  天線的極化               

天線向周圍空間輻射電磁波。電磁波由電場和磁場構成。人們規定:電場的方向就是
天線極化方向
。一般使用的天線為單極化的。下圖示出了兩種基本的單極化的情況:垂直極化—
是最常用的;水平極化—也是要被用到的。


1.4.1   雙極化天線        

下圖示出了另兩種單極化的情況:+45° 極化 與 -45° 極化,它們僅僅在特殊場合下使用。
這樣,共有四種單極化了,見下圖。 把垂直極化和水準極化兩種極化的天線組合在一起,或
者, 把 +45° 極化和 -45° 極化兩種極化的天線組合在一起,就構成了一種新的天線—雙極化
天線


下圖示出了兩個單極化天線安裝在一起組成一付雙極化天線,注意,雙極化天線有兩個接
頭. 雙極化天線輻射(或接收)兩個極化在空間相互正交(垂直)的波 .

 1.4.2    極化損失
垂直極化波要用具有垂直極化特性的天線來接收,水平極化波要用具有水平極化特性的天線
來接收。右旋圓極化波要用具有右旋圓極化特性的天線來接收,而左旋圓極化波要用具有左旋圓
極化特性的天線來接收。        

當來波的極化方向與接收天線的極化方向不一致時,接收到的信號都會變小,也就是說,發生
極化損失。例如:當用+ 45° 極化天線接收垂直極化或水準極化波時,或者,當用垂直極化天線接
收 +45° 極化或 -45°極化波時,等等情況下,都要產生極化損失。用圓極化天線接收任一線極化波
,或者,用線極化天線接收任一圓極化波,等等情況下,也必然發生極化損失——只能接收到來
波的一半能量。

    當接收天線的極化方向與來波的極化方向完全正交時,例如用水準極化的接收天線接收垂直極化
的來波,或用右旋圓極化的接收天線接收左旋圓極化的來波時,天線就完全接收不到來波的能量,
這種情況下極化損失為最大,稱極化完全隔離。

1.4.3   極化隔離      

  理想的極化完全隔離是沒有的。饋送到一種極化的天線中去的信號多少總會有那麼一點點在
另外一種極化的天線中出現。例如下圖所示的雙極化天線中,設輸入垂直極化天線的功率為10W,結
果在水平極化天線的輸出端測得的輸出功率為 10mW。

 

1.5  天線的輸入阻抗Zin

定義:天線輸入端信號電壓與信號電流之比,稱為天線的輸入阻抗。 輸入阻抗具有電
阻分量 Rin 和電抗分量 Xin ,即 Zin = Rin + j Xin 。電抗分量的存在會減少天線從饋線對信號
功率的提取,因此,必須使電抗分量盡可能為零,也就是應盡可能使天線的輸入阻抗為純電阻。事
實上,即使是設計、調試得很好的天線,其輸入阻抗中總還含有一個小的電抗分量值。
          輸入阻抗與天線的結構、尺寸以及工作波長有關,半波對稱振子是最重要的基本天線 ,其輸
入阻抗為 Zin = 73.1+j42.5 (歐) 。當把其長度縮短(3~5)%時,就可以消除其中的電抗
分量,使天線的輸入阻抗為純電阻,此時的輸入阻抗為 Zin = 73.1 (歐) ,(標稱 75 歐) 。
注意,嚴格的說,純電阻性的天線輸入阻抗只是對點頻而言的。   

順便指出,半波折合振子的輸入阻抗為半波對稱振子的四倍,即   

Zin = 280 (歐) ,(標稱300歐)。       

有趣的是,對於任一天線,人們總可通過天線阻抗調試,在要求的工作頻率範圍內,使輸入阻
抗的虛部很小且實部相當接近 50 歐,從而使得天線的輸入阻抗為Zin = Rin = 50 歐——這是
天線能與饋線處於良好的阻抗匹配所必須的。

1.6   天線的工作頻率範圍(頻帶寬度)  

無論是發射天線還是接收天線,它們總是在一定的頻率範圍(頻帶寬度)內工作的,天線的頻
帶寬度有兩種不同的定義——

一種是指:在駐波比SWR 1.5 條件下,天線的工作頻帶寬度; 

   一種是指:天線增益下降 3 分貝範圍內的頻帶寬度。      

     在移動通信系統中,通常是按前一種定義的,具體的說,天線的頻帶寬度就是天線的駐波比
SWR 不超過 1.5 時,天線的工作頻率範圍。        

一般說來,在工作頻帶寬度內的各個頻率點上, 天線性能是有差異的,但這種差異造成的性能
下降是可以接受的。

1.7    移動通信常用的基站天線、直放站天線與室內天線

1.7.1  板狀天線天線的基本知識    

   無論是GSM 還是CDMA, 板狀天線是用得最為普遍的一類極為重要的基站天線。這種天線的
優點是:增益高、扇形區方向圖好、後瓣小、垂直面方向圖俯角控制方便、密封性能 可靠以及使
用壽命長。      

  板狀天線也常常被用作為直放站的用戶天線,根據作用扇形區的範圍大小,應選擇相應的天
線型號。

1.7.1 a  基站板狀天線基本技術指標示例


1.7.1 b    板狀天線高增益的形成


B.  在直線陣的一側加一塊反射板    (以帶反射板的二半波振子垂直陣為例)


C.            為提高板狀天線的增益,還可以進一步採用八個半波振子排陣  

前面已指出,四個半波振子排成一個垂直放置的直線陣的增益約為 8 dB;一側加有一個反
射板的四元式直線陣,即常規板狀天線,其增益約為 14 ~ 17 dB 。    


一側加有一個反射板的八元式直線陣,即加長型板狀天線,其增益約為 16 ~ 19 dB .  不言而喻
,加長型板狀天線的長度,為常規板狀天線的一倍,達 2.4 m 左右。


1.7.2    高  2        高增益柵狀抛物面天線    

從性能價格比出發,人們常常選用柵狀抛物面天線作為直放站施主天線。由於抛物面具有良
好的聚焦作用,所以抛物面天線集射能力強,直徑為 1.5 m 的柵狀抛物面天線,在900兆頻段,其
增益即可達 G = 20 dB  . 它特別適用於點對點的通信,例如它常常被選用為直放站的施主天線。   

 抛物面採用柵狀結構,一是為了減輕天線的重量,二是為了減少風的阻力。  

            抛物面天線一般都能給出 不低於 30 dB 的前後比 ,這也正是直放站系統防自激而對接收
天線所提出的必須滿足的技術指標。


1.7.3     八木定向3             八木定向天線     

   八木定向天線,具有增益較高、結構輕巧、架設方便、價格便宜等優點。因此,它特別
適用於點對點的通信,例如它是室內分佈系統的室外接收天線的首選天線類型。

        八木定向天線的單元數越多,其增益越高,通常採用 6 ~ 12 單元的八木定向天線,其增益
可達 10~15 dB   。

        

1.7.4    室4     室內吸頂天線   

室內吸頂天線必須具有結構輕巧、外型美觀、安裝方便等優點。  

    現今市場上見到的室內吸頂天線,外形花色很多,但其內芯的購造幾乎都是一樣的。這種吸頂
天線的內部結構,雖然尺寸很小,但由於是在天線寬頻理論的基礎上,借助電腦的輔助設計,以
及使用網路分析儀進行調試,所以能很好地滿足在非常寬的工作頻帶內的駐波比要求,按照國家標
准,在很寬的頻帶內工作的天線其駐波比指標為VSWR
2 。當然,能達到VSWR 1.5 更好。順
便指出,室內吸頂天線屬於低增益天線, 一般為 G  = 2 dB 。


1.7.5    室內壁5             室內壁掛天線  

室內壁掛天線同樣必須具有結構輕巧、外型美觀、安裝方便等優點。  

      現今市場上見到的室內吸頂天線,外形花色很多,但其內芯的購造幾乎也都是一樣的。這種壁掛
天線的內部結構,屬於空氣介質型微帶天線。由於採用了展寬天線頻寬的輔助結構,借助電腦的
輔助設計,以及使用網路分析儀進行調試,所以能較好地滿足了工作寬頻帶的要求。順便指出,室
內壁掛天線具有一定的增益,約為G = 7 dB 。


2      電波傳播的幾個基本概念   

目前GSM和CDMA移動通信使用的頻段為:    

    GSM:890 ~ 960 MHz, 1710 ~1880 MHz      

    CDMA:  806 ~ 896 MHz  

   806 ~ 960 MHz 頻率範圍屬超短波範圍; 1710 ~1880 MHz 頻率範圍屬微波範圍。  

電波的頻率不同,或者說波長不同,其傳播特點也不完全相同,甚至很不相同。

2.1    自由空間通信距離方程     

   設發射功率為PT,發射天線增益為GT,工作頻率為f . 接收功率為PR,接收天線增益為GR,收、
發天線間距離為R,那麼電波在無環境干擾時,傳播途中的電波損耗 L0 有以下運算式:


  L0 (dB) = 10 Log( PT  /  PR )         

= 32.45 + 20 Log f ( MHz ) + 20 Lg R ( km ) – GT (dB) – GR (dB)

[舉例] 設:PT  = 10 W = 40dBmw ;GR = GT = 7 (dBi) ; f   = 1910MHz     

       問:R = 500 m 時, PR = ?

      解答: (1) L0 (dB) 的計算            

L0 (dB)  = 32.45 + 20 Lg 1910( MHz ) + 20 Lg 0.5 ( km ) – GR (dB) – GT (dB)

= 32.45 + 65.62 – 6 – 7 – 7 = 78.07 (dB)

(2) PR  的計算         

      PR = PT  / ( 10 7.807 ) = 10 ( W ) / ( 10 7.807 )  = 1 ( μW ) / ( 10 0.807 )                               

= 1 ( μW ) / 6.412  =  0.156 ( μW ) =  156 ( mμW ) #

  順便指出,1.9GHz電波在穿透一層磚牆時,大約損失 (10~15) dB

2.1   超短波和微波的傳播視距

2.2    極限直視距離     

    超短波特別是微波,頻率很高,波長很短,它的地表面波衰減很快,因此不能依靠地表面波作
較遠距離的傳播。超短波特別是微波,主要是由空間波來傳播的。簡單地說,空間波是在空間範圍
內沿直線方向傳播的波。顯然,由於地球的曲率使空間波傳播存在一個極限直視距離Rmax 。在最遠
直視距離之內的區域,習慣上稱為照明區;極限直視距離Rmax以外的區域,則稱為陰影區。不言而
語,利用超短波、微波進行通信時,接收點應落在發射天線極限直視距離Rmax內。   

     受地球曲率半徑的影響,極限直視距離Rmax 和發射天線與接收天線的高度HT 與 HR間的關係
為 :  Rmax = 3.57{ √HT (m) +√HR (m) }  (km)


考慮到大氣層對電波的折射作用,極限直視距離應修正為

Rmax = 4.12 { √HT (m) +√HR (m) }  (km)    

由於電磁波的頻率遠低於光波的頻率,電波傳播的有效直視距離 Re 約為 極限直視距離Rmax
的 70% ,即 Re = 0.7 Rmax .

例如,HT 與 HR 分別為 49 m 和 1.7 m,則有效直視距離為 Re = 24 km .

 2.3    電波在平面地上的傳播特徵

    由發射天線直接射到接收點的電波稱為直射波;發射天線發出的指向地面的電波,被地面反射而
到達接收點的電波稱為反射波。顯然,接收點的信號應該是直射波和反射波的合成。電波的合成不
會象 1 + 1 = 2 那樣簡單地代數相加,合成結果會隨著直射波和反射波間的波程差的不同而不同。
波程差為半個波長的奇數倍時,直射波和反射波信號相加,合成為最大;波程差為一個波長的倍數
時,直射波和反射波信號相減,合成為最小。可見,地面反射的存在,使得信號強度的空間分佈變
得相當複雜。  

     實際測量指出:在一定的距離 Ri之內,信號強度隨距離或天線高度的增加都會作起伏變化;
在一定的距離 Ri之外,隨距離的增加或天線高度的減少,信號強度將。單調下降。理論計算給出
了這個 Ri 和天線高度 HT與 HR 的關係式:

     Ri = (4 HT HR )/ l , l 是波長。

    不言而喻, Ri 必須小於極限直視距離Rmax  。

2.4   電波的多徑傳播

        在超短波、微波波段,電波在傳播過程中還會遇到障礙物(例如樓房、高大建築物或山丘等) 對
電波產生反射。因此,到達接收天線的還有多種反射波(廣意地說,地面反射波也應包括在內),
這種現象叫為多徑傳播。

        由於多徑傳輸,使得信號場強的空間分佈變得相當複雜,波動很大,有的地方信號場強增強,
有的地方信號場強減弱;也由於多徑傳輸的影響,還會使電波的極化方向發生變化。另外,不同的
障礙物對電波的反射能力也不同。例如:鋼筋水泥建築物對超短波、微波的反射能力比磚牆強。我
們應儘量克服多徑傳輸效應的負面影響,這也正是在通信品質要求較高的通信網中,人們常常採用
空間分集技術或極化分集技術的緣由。

2.5   電波的繞射傳播

         在傳播途徑中遇到大障礙物時,電波會繞過障礙物向前傳播,這種現象叫做電波的繞射。超短
波、微波的頻率較高,波長短,繞射能力弱,在高大建築物後面信號強度小,形成所謂的"陰影區"
。信號品質受到影響的程度,不僅和建築物的高度有關,和接收天線與建築物之間的距離有關,還
和頻率有關。例如有一個建築物,其高度為 10 米,在建築物後面距離200 米處,接收的信號品質
幾乎不受影響,但在 100 米處,接收信號場強比無建築物時明顯減弱。注意,誠如上面所說過的那
樣,減弱程度還與信號頻率有關,對於 216 ~ 223 兆赫的射頻信號,接收信號場強比無建築物時
低16 dB,對於 670 兆赫的射頻信號,接收信號場強比無建築物時低20dB .如果建築物高度增加到
50 米時,則在距建築物 1000 米以內,接收信號的場強都將受到影響而減弱。也就是說,頻率越高
、建築物越高、接收天線與建築物越近,信號強度與通信品質受影響程度越大;相反,頻率越低,
建築物越矮、接收天線與建築物越遠,影響越小。

        因此,選擇基站場地以及架設天線時,一定要考慮到繞射傳播可能產生的各種不利影響,注意到
對繞射傳播起影響的各種因素。

3   傳輸線的幾個基本概念

        連接天線和發射機輸出端(或接收機輸入端)的電纜稱為傳輸線或饋線。傳輸線的主要任務是
有效地傳輸信號能量,因此,它應能將發射機發出的信號功率以最小的損耗傳送到發射天線的輸入
端,或將天線接收到的信號以最小的損耗傳送到接收機輸入端,同時它本身不應拾取或產生雜散干
擾信號,這樣,就要求傳輸線必須遮罩。

       順便指出,當傳輸線的物理長度等於或大於所傳送信號的波長時,傳輸線又叫做長線。

3.1   傳輸線的種類

超短波段的傳輸線一般有兩種:平行雙線傳輸線和同軸電纜傳輸線;微波波段的傳輸線有
同軸電纜傳輸線、波導和微帶。平行雙線傳輸線由兩根平行的導線組成它是對稱式或平衡式的傳輸
線,這種饋線損耗大,不能用於UHF頻段。同軸電纜傳輸線的兩根導線分別為芯線和遮罩銅網,因銅
網接地,兩根導體對地不對稱,因此叫做不對稱式或不平衡式傳輸線。同軸電纜工作頻率範圍寬,
損耗小,對靜電耦合有一定的遮罩作用,但對磁場的干擾卻無能為力。使用時切忌與有強電流的線
路並行走向,也不能靠近低頻信號線路。

3.2   傳輸線的特性阻抗

      無限長傳輸線上各處的電壓與電流的比值定義為傳輸線的特性阻抗,用Z0 表示。

      同軸電纜的特性阻抗的計算公式為

                    Z。=〔60/√εr〕×Log ( D/d )    [ 歐]。

               式中,D 為同軸電纜外導體銅網內徑;     

                     d  為同軸電纜芯線外徑;

                     εr為導體間絕緣介質的相對介電常數。

通常Z0  = 50 歐  ,也有Z0  = 75 歐的。

       由上式不難看出,饋線特性阻抗只與導體直徑D和d以及導體間介質的介電常數εr有關,而與饋
線長短、工作頻率以及饋線終端所接負載阻抗無關。

3.3   饋線的衰減係數

        信號在饋線裏傳輸,除有導體的電阻性損耗外,還有絕緣材料的介質損耗。這兩種損耗隨饋線
長度的增加和工作頻率的提高而增加。因此,應合理佈局儘量縮短饋線長度。

        單位長度產生的損耗的大小用衰減係數 β 表示,其單位為 dB / m (分貝/米),電纜技術說
明書上的單位大都用 dB / 100 m(分貝/百米) .

  設輸入到饋線的功率為P1 ,從長度為 L(m ) 的饋線輸出的功率為P2 ,傳輸損耗TL可表示為:

                    TL = 10 ×Lg ( P1 /P2 )      ( dB )

          衰減係數 為

                     β  = TL   / L   ( dB / m )

    例如, NOKIA  7 / 8英寸低耗電纜, 900MHz 時衰減係數為 β  = 4.1  dB / 100 m ,也可寫成
β  = 3  dB / 73  m , 也就是說, 頻率為 900MHz 的信號功率,每經過 73 m 長的這種電纜時,功
率要少一半。      

     而普通的非低耗電纜,例如, SYV-9-50-1, 900MHz 時衰減係數為 β  = 20.1  dB / 100 m ,
也可寫成 β  = 3  dB / 15 m , 也就是說, 頻率為 900MHz 的信號功率,每經過15 m 長的這種
電纜時,功率就要少一半!

3.4    匹配概念

          什麼叫匹配?簡單地說,饋線終端所接負載阻抗ZL 等於饋線特性阻抗Z0 時,稱為饋線終
端是匹配連接的。匹配時,饋線上只存在傳向終端負載的入射波,而沒有由終端負載產生的反射
波,因此,當天線作為終端負載時,匹配能保證天線取得全部信號功率。如下圖所示,當天線阻
抗為 50  歐時,與50  歐的電纜是匹配的,而當天線阻抗為 80  歐時,與50  歐的電纜是不匹配的。

        如果天線振子直徑較粗,天線輸入阻抗隨頻率的變化較小,容易和饋線保持匹配,這時天線的
工作頻率範圍就較寬。反之,則較窄。

       在實際工作中,天線的輸入阻抗還會受到周圍物體的影響。為了使饋線與天線良好匹配,在架
設天線時還需要通過測量,適當地調整天線的局部結構,或加裝匹配裝置。


3.55  反射損耗     

 前面已指出,當饋線和天線匹配時,饋線上沒有反射波,只有入射波,即饋線上傳輸的只是
向天線方向行進的波。這時,饋線上各處的電壓幅度與電流幅度都相等,饋線上任意一點的阻抗都
等於它的特性阻抗。  

      而當天線和饋線不匹配時,也就是天線阻抗不等於饋線特性阻抗時,負載就只能吸收饋線上傳
輸的部分高頻能量,而不能全部吸收,未被吸收的那部分能量將反射回去形成反射波。

   例如,在右圖中,由於天線與饋線的阻抗不同,一個為75 ohms,一個為50 ohms ,阻抗不匹配
,其結果是


3.6    電壓駐波比

        在不匹配的情況下, 饋線上同時存在入射波和反射波。在入射波和反射波相位相同的地方,電
壓振幅相加為最大電壓振幅Vmax ,形成波腹;而在入射波和反射波相位相反的地方電壓振幅相減
為最小電壓振幅Vmin ,形成波節。其他各點的振幅值則介於波腹與波節之間。這種合成波稱為行
駐波。

          反射波電壓和入射波電壓幅度之比叫作反射係數,記為 R                    

                   反射波幅度            (ZL-Z0)                 

            R =  ─────        =  ───────

                  入射波幅度            (ZL+Z0 )

    波腹電壓與波節電壓幅度之比稱為駐波係數,也叫電壓駐波比,記為 VSWR                                    

            波腹電壓幅度Vmax            (1 + R)  

 VSWR = ───────────── =  ────

波節電壓輻度Vmin             (1 – R)

   終端負載阻抗ZL 和特性阻抗Z0 越接近,反射係數 R 越小,駐波比VSWR 越接近於1,匹
配也就越好。

3.7   平衡裝置

 信號源或負載或傳輸線,根據它們對地的關係,都可以分成平衡和不平衡兩類。   

     若信號源兩端與地之間的電壓大小相等、極性相反,就稱為平衡信號源,否則稱為不平衡信號
源;若負載兩端與地之間的電壓大小相等、極性相反,就稱為平衡負載,否則稱為不平衡負載;
若傳輸線兩導體與地之間阻抗相同,則稱為平衡傳輸線,否則為不平衡傳輸線。   

     在不平衡信號源與不平衡負載之間應當用同軸電纜連接,在平衡信號源與平衡負載之間應當用
平行雙線傳輸線連接,這樣才能有效地傳輸信號功率,否則它們的平衡性或不平衡性將遭到破壞
而不能正常工作。如果要用不平衡傳輸線與平衡負載相連接,通常的辦法是在糧者之間加裝"平
衡-不平衡"的轉換裝置,一般稱為平衡變換器 。

3.7.1   二分之一波長平衡變換器    

   又稱"U"形管平衡變換器,它用於不平衡饋線同軸電纜與平衡負載半波對稱振子之間的連接。
“U"形管平衡變換器還有 1:4 的阻抗變換作用。移動通信系統採用的同軸電纜特性阻抗通常為50
歐,所以在YAGI天線中,採用了折合半波振子,使其阻抗調整到200歐左右,實現最終與主饋線50歐
同軸電纜的阻抗匹配。


3.7.2    四分之一波長平衡-不平衡器    

利用四分之一波長短路傳輸線終端為高頻開路的性質實現天線平衡輸入埠與同軸饋線不平
衡輸出埠之間的平衡-不平衡變換。

 

 

 

 


WLAN之ISM與UNII頻帶釋疑(擷錄部分)

WLAN之ISM與UNII頻帶釋疑(擷錄部分)

ISM 頻帶的特色是「牛驥同皁」,也就是所有的設備都可使用(共有制);而UNII頻帶帶給WLAN族群的好處是純粹作通訊使用,故不會有微波爐等干擾情況出現。

Hedy Lamarr在二次大戰期間提出跳頻展頻(FHSS)的構想並申請專利,她自德國逃到美國而成為好萊塢紅星,可惜FHSS被軍方秘密採用,也沒付給Hedy任何權利金!

FHSS之後有了DSSS(直序展頻),後來又有了OFDM技術。這三種技術在軍中被廣泛採用,直到民間業者不斷爭取無需執照的商業運用,聯邦通訊委員會(FCC)才在1986年開放902~928MHz(簡稱900MHz頻段)2.400~2.4835GHz(簡稱2.4GHz頻段),以及5.725~5.875(簡稱5.8GHz頻段)等三段頻帶,稱為ISM(Industrial、Scientific與Medical)頻帶。

市面上出現許多的ISM設備,如Walkie Talkie、嬰兒監視器、無線話機、塑膠袋封口機、微波爐等,而由於902~928MHz可用的國家並不多,廠商多已朝2.4GHz開發這些設備,目前這設備更開始朝向5GHz發展,例如不少微波爐業者在開發5GHz磁控管,若成本允許,則5.8GHz微波爐很快將上市。

ISM Band的特色是「牛驥同皁」,也就是所有的設備都可使用,因此其使用效率遠高於其他頻段。論起此頻帶對國家的實用性,國防用途或行動通訊都得靠邊站,筆者預測美國的MMDS頻道(2.1、2.5與2.7GHz)應遲早會落到WLAN的地盤,雖然3G行動通訊業不停在遊說FCC希望取得這三個頻道,而且看來2.1GHz落袋已沒問題。

1996年各國政府都在推動國家資訊基礎建設(National Information Infrastructure;NII)計劃而增加不少光纖通訊設施,美國政府為弭平數位落差,而再開放了無需執照的UNII(Unlicensed NII)頻帶,期望新的通訊業者能藉由這個頻段,以低廉的價格提供消費者寬頻服務,使得全民都能有機會上網而不會造成Internet弱勢族群。

UNII頻帶帶給WLAN族群的好處是純粹作通訊使用,故不會有微波爐等干擾情況出現。但是UNII頻帶在5GHz中共有三段,分別是UNII-1的5.125~5.25GHz、UNII-2的5.25~5.35GHz,以及UNII-3的5.725~5.825GHz三段;而UNII-3竟然與ISM頻段中的5.8GHz重疊,故讓許多人產生了疑惑。

FCC功率規定與計算

UNII-3設備只能用於室外,其輸出功率規定與ISM相同;亦即若使用全向天線,則輸入天線的功率(Intentional Radiator;IR)為1W、天線的輸出功率(Effective IR Power;EIRP)為4W。假設一個6dBi的全向天線,若輸入功率是1W,亦即30dBm,則天線的輸出功率就是36dBm,亦即4W。

要了解IR及EIRP的計算,必須知道dB、dBm、dBw、dBi等觀念。

dB就是分貝(Decibel),假設有一個放大器能將輸入的功率放大10倍,若套到10×Log(x)公式,則為10×Log(10)=10×1=10,亦即提昇10個dB,我們說該放大器的增益為10dB。因為100.3=2,故10Log(2)=3,所以3dB表示2倍。

同理,4dB表示2.5倍、5dB表示3倍、6dB為4倍、13dB為20倍、60dB為100萬倍、90dB表示10億倍。

我們再定義一個1/1000W為一個dBm,m表示 Milliwatt。因為10×log(1)=0,故0dBm表示1mW,而10dBm為0dBm的10倍,亦即10mW,13dBm為20mW;若dB數為負值,則為縮小的倍數,如-90dBm為10的-12W,亦即0.000000000001W。dBw的w表示1W,故1dBw=30dBm、20dBw=50dBm、0dBw表示30dBm。

dBi的i表示Isotropic Antenna,這是一個理想天線,它能以球狀方式向外發送能量,而且天線本身不會產生損耗。這種天線實際上作不出來,太陽可算一個實例。但數學模型很容易建立,故任何天線都可與Isotropic天線比較且定義其增益值。故理想天線本身的增益值一定是0dBi,且它的立體放射圖形一定是球型。

若找到一支0dBi的天線,是否表示它是理想天線?需檢查其特性曲線圖形是否為球型,通常是全向或半方向天線。全向天線在水平方向為360度,但垂直方向有限,好比一個甜甜圈。故若某全向天線為0dBi,表示其水平方向(增益最大方向)等於Isotropic天線的能量,而其它方向的增益比Isotropic天線小,表示被天線本身衰減掉了;此時我們不必討論Isotropic天線的輸入功率,因為輸入功率等於完全被以球面平均放射而出。

考慮3dBi的全向天線,表示其水平方向之增益等於Isotropic天線的2倍,若本身無衰減,則垂直方向的角度為上下各45度,這相當於無損耗的理想天線,不可能做得出,故實際產品約在上下30度。

考慮一個16dBi的全向天線,為理想天線的40倍強,扣掉衰減,180度除以60為3度。想像機房若使用上下角度只有3度的天線,它只能對四周幾乎相同高度的大樓做傳輸,故全向天線不可能有人做超過16dBi的天線。

若水平角度也能壓縮,例如20dBi的盤式天線,假設水平與垂直角度各縮小10倍,亦即水平36度與垂直18度,取平均則各為27度,在扣掉衰減因素,則放射角度各為20度以內。衛星盤式天線的角度通常在2度以內。角度兩度的天線很貴,且安裝時需對得很準,大風都可能會影響其方向。WLAN所用的高方向天線通常不會超過30dBi。

假設你有一張SMC的2532W-B 23dBm,亦即200mW的PCMCIA WLAN網卡,而將其直接接上30dBi的天線,亦即IR是23dBm,則EIRP輸出是200W,亦即53dBm。家用微波爐內也只有750W,若你在30dBi天線前站5分鐘,身體某處會開始冒煙,肉會變黑!

前述的超高功率網卡是駭客最愛,因為他可以躲得很遠而以高方向天線進行偷聽或干擾動作。一般WLAN網卡只有13dBm,亦即20mW。

FCC對於ISM Band的功率規定,是依據天線而分為兩大類,若是全向天線則屬於PtMP(Point-to-MultiPoint)類,若為方向性天線則為PtP(Point-to-Point)類。PtMP的規定很好記,EIRP的最大值為4W,亦即36dBm,例如IR功率為30dBm,則天線最大增益為6dBi。

PtP則需死背一個起始值,也就是前例。當IR為30dBm,方向性天線的增益為6Bi,則EIRP為最大值36dBm。當天線的增益越高時,EIRP可適當提昇。FCC規定若dBi自6dBi每增加3個dBi,IR只需相對降低1個dB,故若搭配30dBi的高方向天線,IR需降低8dB。所以22dB的IR配合30dBi的天線,則輸出為52dBw。所以前述的SMC卡片搭配30dBi天線使用,已超過了FCC許可範圍,不過52dBm也約160瓦,同樣非常危險。故這些高功率天線的使用,務必聘請RF職業安裝人員來完成。

對2.4GHz與5.8GHz的ISM頻道功率規定有所了解,尤其是搭配外接天線時,心中需隨時有這些功率觀念,才會產生危險意識。

UNII頻帶

當UNII三段頻帶被推出時,WLAN業者自是鼓掌歡迎,因為他們的主要市場是在室內運用。但做室外橋接器的廠商則很不是滋味,因為UNII-3頻帶竟然含在5.8GHz之中,表示室外通訊設備還是得「牛驥同皁」,而無法得到清靜的傳輸頻道。

UNII-1為5.15~5.25GHz,只能做為通訊使用,不見得只有802.11a設備能存在,Bluetooth 2.0及HiperLAN 2都可用這一段頻帶。它的天線必須與設備一體成型,即使用者不能自行更換較高增益天線。若天線為4dBi,則最大IR為50mW,即EIRP為200mW,只能用於室內,而且Bluetooth 2.0與HiperLAN2看來產品不會出現,故UNII-1的802.11a設備目前能享受清爽而無干擾之頻道。

UNII-2為5.25~5.35GHz,亦只能做為通訊使用,其天線不見得必須與設備一體成型。若天線為4dBi,則最大IR為250mW,亦即EIRP為1W,可用於室內或室外;UNII-2的802.11a設備目前亦能享受清爽而無干擾的頻道。

因為只有這兩個頻帶可用於室內,主攻室內設備的WLAN廠商只對這兩個頻道有興趣,而且有不少廠商的設備同時支援UNII-1與UNII-2頻帶。FCC規定這些設備必須符合UNII-1的規定,只能用於室內,EIRP最大傳輸功率為200mW,且天線必須與主機連為一體。

UNII-3為2.725~2.825GHz,與5.8GHz的ISM頻道的前段有80%重疊。因為屬於ISM之一段,其功率規定與ISM幾乎一樣,但調變方式還是略有不同。UNII-3對於調變方式幾乎沒有任何限制,但ISM則原來只有FHSS與DSSS兩種,於2001年5月才在2.4GHz對WiLAN的OFDM設備開放特許,故造成802.11g大轉彎,而放棄PBCC改朝OFDM發展。

UNII-3設備若使用全向天線,最大功率規定為EIRP 4W,若搭配方向性天線,則幾乎沒有限制。

做2.4GHz與5.8GHz橋接器的廠商,一直在向FCC哭訴,想要一塊只有通訊設備存在的乾淨頻帶,這個願望不太容易實現。

新的UNII-2頻段

FCC於今(2003)年5月15日公佈NPRM(Notice of Proposed Rule Making)將開放5.470~5.725GHz頻段作為UNII-2使用,將使得UNII總頻寬由300MHz增加80%而達525MHz,這對傳統WLAN廠商又是一個大利。此NPRM由6月4日開始算120天內若無反對意見,將交由國會立法而生效。

由於此NPRM頻道有歐洲血統,故歐洲規定的DFS(Dynamic Frequency Selection)及TPC(Transmit Power Control)功能,也將包括於UNII規定之中;亦即不只這段新頻道,將來原有的UNII也需支援DFS及TPC功能。DFS能讓設備避開正被使用的頻道,TPC能依據彼此距離而自動降低彼此的傳送功率,這兩個是非常重要的節約頻道使用功能,筆者覺得2.4GHz不久亦將採用這個功能。

NPRM又再度打擊了橋接器廠商,因為其目的是增加UNII-2,而非UNII-3的頻帶。雖然UNII-2也可用於室外,但功率僅為UNII-3的四分之一,故室外橋接器的廠商均專注於5.8GHz系統的製造。雖然橋接器廠商不斷遊說FCC,但FCC認為以數量上而言,802.11a WLAN設備還是遠勝於室外橋接器的市場,故將NPRM的新頻道作為UNII-2使用,等於是採中庸之道,讓WLAN或橋接器廠商兩者都可使用。

橋接器廠商感覺不平的是,NPRM提出的頻道是為了與歐洲ETSI所開放之頻帶吻合,但ETSI在此頻帶的可用功率與UNII-3吻合,為何美國要將頻率降低而成為UNII-2?

目前已有橋接器廠商推出「雙環」橋接器產品,以UNII-2照顧半徑5公里以內的客戶,而以5.8GHz照顧半徑5公里外而達20公里的客戶,這是很有創意的雙頻設備。目前各UNII頻帶均有4個頻道,故室內或室外各有8個頻道可用,未來若NPRM將UNII-2增加10個頻道而達14個頻道,則UNII能提供室內或室外各18個頻道可用,而2.4GHz ISM卻只有3個頻道可用。

2003年6月ITU在日內瓦的WRC-03 (World Radio Conference)會議,各國承諾對UNII開放一致的頻段,所以FCC才會有NPRM的提出,以與ETSI一致,預計台灣很快會跟進美國的動作,故UNII在全球的通行比率會超過2.4GHz。在台灣只有UNII-2及UNII-3可用,UNII-1可能是軍方有特殊用途。在美國UNII-1只能用於室內且功率最小,顯然在室外有很重要的用途存在,例如巡弋飛彈的導航。大陸是全球唯一規定2.4GHz只能用在室內的國家,而5GHz需要使用執照的頻帶,只能用在室外。

FCC的調變規定

關於調變技術的規定,FCC原先有很嚴格的規定,現在則越來越寬鬆。例如802.11標準推出之時,FHSS系統在30秒內必須多次掃描完畢整個75個頻道,平均在每個頻道停留的時間(Dwell Time)不得超過0.4秒。例如一傳送者每個頻道使用100ms作為Dwell Time,則需7.5秒再多一點,可以掃描完75個頻道(每個頻道100mS)而回到最初頻道。會多一點時間的原因是額外的Hop Time。重複4次會使得每個頻道使用了400mS,而總時間剛好超過30秒一點點(>7.5秒×4),此點符合FCC的規定;另一例子,是FHSS的Dwell Time為200mS,則能在30秒內掃描2次。

由於2000年8月31日FCC採用WBFH(Wide Band Frequency Hopping)的NPRM,而改變了FHSS之相關規定,造成「8/31/2000之前」及「8/31/2000之後」的2種規定,且FCC讓廠商選擇使用何者,因此廠商若推出FHSS系統,可選擇其中任何一種規定。若選擇其中一種規定,則設備必須完全符合該規定。

在2000年8月31日修訂為一組跳躍只需跳躍15次,但也有它的需求。例如若每個頻道為5MHz寬,則最大功率為125mW。因為若頻道越寬,則傳送所需功率可以越低,這是展頻系統的基本特性。簡單地說,FCC要求跳躍次數乘以頻道寬度必須為75。例如若跳躍為25次,則頻寬為3MHz;若跳躍為15次,則頻寬為5MHz;若跳躍為20次,則頻寬為3.75MHz。

注意只能選擇「8/31/2000之前」及「8/31/2000之後」,而且不能混合這兩種規定。HomeRF 2.0為唯一採用WBFH的系統,可惜由於不敵WLAN,而於今年2月宣佈解散。

關於DSSS的限制,FCC有Processing Gain的需求。DSSS技術為了克服Multipath等現象所造成的信號損壞,而將資料信號以較高速度的Bit順序作傳送,稱為Chipping Code或Processing Gain。好比我們要將「1」送出,但實際上我們送出了10個「Chip」,表示Processing Gain為10。很高的Processing Gain能增加信號抵抗干擾的能力。FCC規定的Processing Gain至少需為10,而大部分的產品都採用小於20之值。IEEE 802.11的DSSS則將Processing Gain定為11。

例如802.11使用的Barker Code以11個Chip的「00110011011」表示1,另以「11001100100」表示0,假如接收到的信號是「00110010111」,則與「1」比有2個錯誤,而與「0」比則有9個錯誤,所以收到的信號一定是「1」。所收到的信號雖有部分錯誤,但不影響資料的傳輸。

若使用的Chip越多,即表示Processing Gain越高,也就是克服不良環境的能力越強。這些Chip是依照順序在22MHz寬的Channel中送出,故任一瞬間此22MHz的信號均相同,也因為這頻道很寬,所以展頻系統能克服窄頻干擾。

在2001年5月10日,FCC開放2.4GHz之OFDM產品的同時,另外對DSSS與FHSS的規定也更為放寬。關於DSSS,FCC取消了Processing Gain的限制;對於FHSS,FCC允許一次以1MHz跳躍15次即可,即它可Bypass許多頻道而不做跳躍,原來的規定是每次必須跳完整個75MHz才能重新開始。此舊規定讓藍芽會嚴重干擾DSSS系統的運作,故許多運用802.11b技術的場合,貼有「禁用藍芽」標誌。有了此規定,希望未來的藍芽系統,能聰明地跳過802.11b或802.11g系統所正在使用的頻帶。

FCC對於WLAN還有許多使命待完成。WLAN 橋接器廠商真正想要的是開放低於4GHz之頻帶,因為頻率越低,則NLOS(Non-Line-of Sight)的性能越強,即RF信號可用其天生較佳的反射、繞射與不易被牆壁吸收等特性,可以像手機信號一般地無所不在;且能讓傳送者與接收者之間沒有直接路徑,彼此還是能夠互通。

OSPF LSA Details

OSPF LSA Details

Several types of LSAs exist. This section discusses the nine types of LSAs documented in Table 8-2.

Table 8-2. Types of LSA
Type LSA Functionality
1 Router Defines the state and cost of the link to the neighbor and IP prefix associated with the point-to-point link.
2 Network Defines the number of routers attached to the segment. It gives information about the subnet mask on that segment.
3 Summary network Describes the destination outside an area but within the OSPF domain. The summary for one area is flooded into other areas, and vice versa.
4 Summary ASBR Describes the information about the ASBR. In a single area, there will be no summary Type 4 LSA.
5 External Defines routes to destination external to OSPF domain. Every subnet is represented by a single external LSA.
6[*]
Group membership  
7 NSSA Defines routes to an external destination, but in a separate LSA format known as Type 7.
8[*]
Unused  
9–11[*]
Opaque  

[*] Type 6 is used for group membership in Multicast OSPF (MOSPF), which is not implemented by Cisco. Type 8 is unused, and Types 9–11 are used for Opaque LSA, which is not used for route calculation but is used for MPLS traffic engineering, which is beyond of the scope of this chapter. More information about Opaque LSA can be found in RFC 2370.

Each LSA has a 20-byte common LSA header, the format for which is illustrated in Figure 8-7.

Figure 8-7. Common LSA Header Format


The list that follows describes the fields in the LSA header:

  • LS Age— Gives the time, in seconds, since the LSA originated. The maximum age of the LSA is 3600 seconds; the refresh time is 1800 seconds. If the LS age reaches 3600 seconds, the LSA must be removed from the database.
  • Options— Discussed earlier in the section “Hello Packets."
  • LS Type— Represents the types of LSA, several of which are documented in Table 8-2.
  • Link-State ID— Identifies the portion of the network that is being described by the LSA. This field changes according to the LS type.
  • Advertising Router— Represents the router ID of the router originating the LSA.
  • LS Sequence Number— Detects old or duplicate LSAs. Each successive instance is given a successive sequence number. The maximum sequence number is represented by 0x7FFFFFFF. The first sequence number is always 0x80000001. The sequence number 0x80000000 is reserved.
  • LS Checksum— Performs checksum on the LSA, not including LS age. An LSA can be corrupted during flooding or while kept in the memory, so this checksum is necessary. This field cannot have a value of 0 because 0 means that the checksum has not been performed. The checksum is performed at the time of LSA generation or when the LSA is received. It is also performed every CheckAge interval, which, by default, is 10 minutes.
  • Length— Includes the length of the LSA, including the 20-byte header.

Router LSA

Router LSAs are generated by each router for each area to which the router belongs. These packets describe the states of the router’s link to the area and are flooded only within a particular area. All the router’s links in an area must be described in a single LSA.

The router LSA floods throughout the particular area; however, the flooding of this LSA is limited within an area. The router LSA of a router cannot exist outside the area; otherwise, every single router in OSPF would have to carry huge amounts of detailed information. Those details remain within an area. The router indicates whether it’s an ABR, ASBR, or an endpoint of a virtual link.

Figure 8-8 shows the packet format for the router LSA.

Figure 8-8. Router LSA Packet Format


The list that follows describes the fields within the router LSA packet:

  • Bit V— This bit is used to determine whether it’s an endpoint of a virtual link.
  • Bit E— This bit is used to determine whether this router is an Autonomous System Boundary Router (ASBR).
  • Bit B— This bit is used to determine whether this router is an Area Border Router (ABR).
  • Number of Links— This includes the number of router links. Note that the router LSA includes all the router links in a single LSA for an area.
  • Link ID, Link Data, and Type— The Type field represents the four types of router links. The other two fields, Link ID and Link Data, represent the 4-byte IP address value, depending on the network type. One thing to note here is that there can be two types of point-to-point links, numbered and unnumbered. In case of numbered point-to-point links, the Link Data field contains the interface address that connects to the neighbor. In the case of unnumbered links, the Link Data field contains the MIBII Ifindex value, a unique value that is associated with every interface. It normally has values starting from 0, as in 0.0.0.17. Table 8-3 lists all possible values for the Link ID and Link Data fields.
  • ToS and ToS Metric— These fields represents the type of service and are normally set to 0.
  • Metric— This field contains the OSPF cost of a specific link. The formula to calculate OSPF cost is 108/Link bandwidth. For example, the metric of a Fast Ethernet interface would be 1. Metric is determined directly from the interface bandwidth, which is configurable. This formula for metric calculation can be overridden by two methods. The first method uses the ip ospf cost
    cost command under the interface. The second method uses the auto-cost reference-bandwidth
    reference-bandwidth command under router ospf configuration. The reference bandwidth actually changes the 108 value in metric calculation formula.
Table 8-4. Different Router Link Types
Type Description Link ID Link Data
1 Point-to-point numbered Neighbor’s router ID Interface IP address
1 Point-to-point unnumbered Neighbor’s router ID MIBII IfIndex value
2 Transit IP address of the DR Interface IP address
3 Stub IP network number Subnet mask
4 Virtual link Neighbor’s router ID Interface IP address

Router LSA Example

Example 8-1 shows the output of a router LSA from a Cisco router.

Example 8-1 Router LSA Output

RouterB#show ip ospf database router 141.108.1.21

LS age: 1362

Options: (No TOS-capability, DC)

LS Type: Router Links

Link State ID: 141.108.1.21

Advertising Router: 141.108.1.21

LS Seq Number: 80000085

 Checksum: 0xE914

Length: 60

Area Border Router

Number of Links: 3

Link connected to: another Router (point-to-point)

(Link ID) Neighboring Router ID: 141.108.1.3

(Link Data) Router Interface address: 141.108.1.2

Number of TOS metrics: 0

TOS 0 Metrics: 64

Link connected to: another Router (point-to-point)

(Link ID) Neighboring Router ID: 141.108.3.1

(Link Data) Router Interface address: 141.108.1.2

Number of TOS metrics: 0

TOS 0 Metrics: 64

Link connected to: a Stub Network

(Link ID) Network/subnet number: 141.108.1.2

(Link Data) Network Mask: 255.255.255.255

Number of TOS metrics: 0

TOS 0 Metrics: 0

The output in Example 8-1 shows three links. A few important things to note in this output (as highlighted) are as follows:

  • In normal situations, the LS Age field should be less than 1800.
  • In the case of a router LSA, the Link-State ID field and advertising router should have the same value as they do in Example 8-1.
  • This router is an ABR and has three router links.

With every point-to-point link, there is a stub link to provide the subnet mask of the link. In this example, two point-to-point links and one stub link are associated with these two point-to-point links because the network type is point-to-multipoint. So, if there are 300 point-to-point links, the router will generate 300 point-to-point links as well as 300 stub links to address the subnet associated with each point-to-point link. The point-to-multipoint network type is a better choice in this case, for two reasons:

  • Only one subnet is required per point-to-multipoint network.
  • The size of the router LSA is cut in half because there will be only one stub link to address the subnet on a point-to-multipoint network. This link is usually a host address.

If you drew a network topology out of this information, you would actually see a small part of OSPF network, as shown in Figure 8-9.

Figure 8-9. Network Topology Drawn from the Information Contained in the Router LSA


Network LSA

The DR generates the network LSA. If no DR exist (for example, in point-to-point or point-to-multipoint networks), there will be no network LSA. The network LSA describes all the routers attached to the network. This LSA is flooded in the area that contains the network, just like the router LSA. Figure 8-10 shows the packet format for the network LSA.

Figure 8-10. Network LSA Packet Format


The network LSA has two important components:

  • Network Mask— This field indicates the network mask associated with the transit link.
  • Attached Router— This field includes the router ID of each router associated with this transit link. The designated router also lists itself in attached routers.

Network LSA Example

Example 8-2 shows the output of a network LSA from a Cisco router.

Example 8-2 Network LSA Output

RouterA#show ip ospf database network 141.108.1.1

Routing Bit Set on this LSA

LS age: 1169

Options: (No TOS-capability, DC)

LS Type: Network Links

Link State ID: 141.108.1.1 (address of Designated Router)

Advertising Router: 141.108.3.1

LS Seq Number: 80000002

 Checksum: 0xC76E

Length: 36

Network Mask: /29

Attached Router: 141.108.3.1

Attached Router: 141.108.1.21

Attached Router: 141.108.1.3

The last three lines of output in Example 8-2 show that three routers are attached to this transit link. Also, the network mask on this transit link is /29. There are two important things to remember here:

  • The Link-State ID field always contains the IP address of the DR.
  • The advertising router field always contains the router ID of the DR.

You can similarly draw a network topology from the information contained in the network LSA showing the number of attached routers and the network mask on the link.

Figure 8-11 shows the network topology drawn from the information in the network LSA.

Figure 8-11. Network Topology Drawn from the Information Contained in the Router LSA


Summary LSA

The summary LSA describes the destination outside the area, but still within the AS. Summary LSAs are generated when there is more than one area provided and Area 0 is configured. The purpose of the summary LSA is to send the reduced topological information outside the area. Without an area hierarchy, it will be difficult to scale the huge topological information in a single area. This LSA does not carry any topological information; it carries only an IP prefix. This LSA is originated by the ABR, as follows:

  • From a nonbackbone to a backbone area, summary LSAs are generated for:

    – Connected routes

    – Intra-area routes

NOTE

Only intra-area routes are advertised into the backbone to avoid loops. If there are any inter-area routes coming from nonbackbone area it means that the backbone is discontiguous. A discontiguous backbone is not allowed in OSPF networks.

  • From a backbone to a nonbackbone area, summary LSAs are generated for the following:

    – Connected routes

    – Intra-area routes

    – Interarea routes

Two types of summary LSAs exist:

  • Type 3— Used for the information about the network
  • Type 4— Used for the information about the ASBR

Figure 8-12 shows the packet format for the summary LSA.

Figure 8-12. Summary LSA Packet Format


The list that follows describes the fields within the summary LSA packet:

  • Network Mask— For the Type 3 summary LSA, this field contains the network mask associated with the network. For the Type 4 summary LSA, this field must be 0.
  • Metric— This field represents the cost of the network.
  • ToS and ToS Metric— These fields are normally set to 0.

Both the Type 3 and Type 4 summary LSAs use the same packet format. The important things to remember about summary LSA Types 3 and 4 are as follows:

  • The network mask in Type 3 contains the subnet mask value of the network.
  • The network mask field must be 0.0.0.0 in Type 4 LSAs.
  • In Type 3 LSAs, the Link-State ID field should have the network number.
  • In Type 4 LSAs, the Link-State ID field should have the router ID of the ASBR.
  • The advertising router field must contain the router ID of the ABR generating the summary LSA. This is true for both Type 3 and 4 LSAs.

There is one special case of summary LSAs—in cases when a stub-area ABR generates a summary default route. In this case, the Link-State ID field as well as the network mask must be 0.0.0.0.

Summary LSA Example

Example 8-3 shows the output of a summary LSA from a Cisco router.

Example 8-3 Summary Network LSA Output

RouterB#show ip ospf database summary 9.9.9.0

LS age: 1261

Options: (No TOS-capability, DC)

LS Type: Summary Links(Network)

Link State ID: 9.9.9.0 (summary Network Number)

Advertising Router: 141.108.1.21

LS Seq Number: 80000001

 Checksum: 0xC542

Length: 28

Network Mask: /24

TOS: 0 Metric: 10

The Link-State ID field here is the network 9.9.9.0, and the network mask is /24. The Link-State ID field in summary LSAs Type 3 will always contain the network number that the summary LSA is generated for, along with the network mask. The summary LSA here is generated for 9.9.9.0/24, as shown in Figure 8-13.

Figure 8-13. Network Diagram Where ABR Router Generates the Summary LSA


Example 8-4 shows summary ASBR LSA output.

Example 8-4 Summary ASBR LSA Output

RouterB#show ip ospf database asbr-summary 141.108.1.21

LS age: 1183

Options: (No TOS-capability, No DC)

LS Type: Summary Links(AS Boundary Router)

Link State ID: 141.108.1.21 (AS Boundary Router address)

Advertising Router: 141.108.1.1

LS Seq Number: 80000001

 Checksum: 0x57E4

Length: 28

Network Mask: /0

TOS: 0 Metric: 14

The output from Example 8-4 shows that this is summary LSA Type 4. The network mask is 0, and the Link-State ID is the router ID of the ASBR. In case of Type 4, the Link-State ID is always the router ID of the ASBR. The Network Mask field must always be 0 because this is the information about a router (ASBR), not a network. Figure 8-14 shows the net-work diagram based on the output shown in Example 8-4.

Figure 8-14. Network Diagram Where ABRs Generates the Type 4 Summary LSA


Example 8-5 shows the default summary ASBR LSA output.

Example 8-5 Default Summary LSA Output

RouterB#show ip ospf database summary 0.0.0.0

LS age: 6

Options: (No TOS-capability, DC)

LS Type: Summary Links(Network)

Link State ID: 0.0.0.0 (summary Network Number)

Advertising Router: 141.108.1.21

LS Seq Number: 80000001

 Checksum: 0xCE5F

Length: 28

Network Mask: /0

TOS: 0 Metric: 1

The output in Example 8-5 shows that the Link-State ID and network mask are 0.0.0.0. Because this is the information about a default route, it must have 0.0.0.0 in the Link-State ID, and the network mask must be 0.0.0.0. These two pieces of information then represent the default route as 0.0.0.0/0. This summary default will be present in a stubby area situation, as shown in Figure 8-15.

Figure 8-15. Network Diagram Where ABR Generates a Summary Default LSA


External LSA

The external LSA defines routes to destinations external to the autonomous system. Domain-wide, the default route can also be injected as an external route. External LSAs are flooded throughout the OSPF domain, except to stubby areas. To install an external LSA in the routing table, two essential things must take place:

  • The calculating router must see the ASBR through the intra-area or interarea route. This means that it should have either a router LSA for the ASBR or a Type 4 LSA for the ASBR, in case of multiple areas.
  • The forwarding address must be known through an intra- or interarea route.

Figure 8-16 shows the packet format for the external LSA.

Figure 8-16. External LSA Packet Format


The list that follows describes the fields within the external LSA packet:

  • Network Mask— Specifies the network mask of the external network.
  • Bit E— Specifies the external type. If set, it is an external Type 2; otherwise, it is Type 1. The difference between type and type external is that the Type 1 metric is similar to the OSPF metric and the cost gets changed every hop; in Type 2, however, the external metric doesn’t change. The metric remains the same throughout the OSPF domain.
  • Forwarding Address— Indicates the address to which data traffic to the advertised network should be forwarded. If the value is set to 0.0.0.0, this means that the traffic should be forwarded to the ASBR. In some situations, the forwarding address will be nonzero, to avoid suboptimal routing. The following list describes events that will produce a nonzero forwarding address:

    – OSPF is enabled on the ASBR’s next-hop interface.

    – The ASBR’s next-hop interface is nonpassive to OSPF.

    – The ASBR’s next-hop interface network type is not point-to-point or point-to-multipoint.

    – The ASBR’s next-hop interface address falls into the OSPF network range.

  • External Route Tag— Not used by OSPF.

The ToS and ToS Metric fields normally are not used by any vendor.

External LSA Example

Example 8-6 shows the output of the external LSA from the Cisco router.

Example 8-6 External LSA Output

RouterE#show ip ospf database external 10.10.10.0

LS age: 954

Options: (No TOS-capability, DC)

LS Type: AS External Link

Link State ID: 10.10.10.0 (External Network Number)

Advertising Router: 141.108.1.21

LS Seq Number: 80000003

 Checksum: 0x97D8

Length: 36

Network Mask: /24

Metric Type: 2 (Larger than any link state path)

TOS: 0

Metric: 20

Forward Address: 0.0.0.0

External Route Tag: 0

The output in Example 8-6 shows an external LSA for network 10.10.10.0/24. This is a Type 2 external LSA. There are a few important things to remember here:

  • The Link-State ID field represents the external network number.
  • The advertising router field contains the router ID of the ASBR.
  • Metric Type: 2 means that the metric—20, in this case—remains the same throughout the OSPF domain.
  • A forwarding address of 0.0.0.0 means that the traffic should be forwarded directly to the ASBR.
  • The route to the nonzero forwarding address must be known through an intra-area or interarea route; otherwise, the external route will not get installed in the routing table.

Figure 8-17 shows a network in which a Type 5 LSA is originated by Router E (ASBR). RIP is getting redistributed into Router E, so Router E originates a Type 5 LSA for every RIP subnet. Those Type 5 LSAs are propagated throughout the OSPF domain.

Figure 8-17. Network Diagram Where ASBR Originates Type 5 LSAs for a RIP Learned Route


Route 1.0 LAB

Route 1.0 LAB

LAB 1-1 ACCESS SKILL FOR IMPLEMENTING Complex Networks


CLT2

目的:

  1. 確認必須提供的網路需求
  2. 確認必須的訊息
  3. 確認實行時需要的工作及建立實施計劃
  4. 驗證活動

實施政策

  1. 基礎結構採用 CISCO 的三層式架構:
  2. 必須滿足的基本要求
    1. Functionality 在時限內滿足並且支援應用程式及資料流量的需
    2. Performance 滿足企業對 響應速度,吞吐量,利用率
    3. Scalability 滿足企業對 人員,應用程式及資料流量未來的可擴展性
    4. Availability 提供企業網路及應用接近 99.999的可用性
    5. Cost-effectiveness: 在限定的預算

解決方案範例.

  1. 1-確認必須提供的網路需求& 2. 確認必須的訊息
    1.1 使用的應用程式及需要的資料流量
    1.2 存在的網路設備,及其作業系統/固件(OS /FirmWare)
    1.3 拓樸圖及連線資訊
    1.4 IP位址及部署分配
    1.5 使用的路由協定及路由器上的設定(注:通常應為所有的網路設備協定)
  2. 3-確認實行時需要的工作及建立實施計劃
    2.1 撰寫必要交件的資訊
    2.2 準備必須的工具及資源
    連接PC(Terminal)到設備
    選擇並且保留必要資源
    2.3 設定所有設備上的IP位址
    2.4 啟用所有參與運作的界面
    2.5 設定網路設備上的必要協定(例:路由協定 )
    2.6 設定特定網路設備上的必要特性(例:路由聚合,及封閉網路)
    2.7 驗證網路設備及連線是否依據設定正常的運作
    2.8 測量執行效率及記錄結果是否滿足
    2.9 建立設定備份
    2.10建立實施計劃,網路維運基線,及提出必要建議
  3. 4-驗證活動
    3.1 驗證所有設備界面正常運作
    3.2 驗證網路設備上的設定是否正運作(例:路由協定)
    3.3 驗證網路設備上的路徑是否正確(例:路由表是否包含所有規劃的正確路徑)
    3.4 驗證特定網路設備上的必要特性(例:送出聚合路由的路由器是否自我生成指向null0界面的路)
    3.5 驗證網路設備上的路徑是否正確及是否要進行調整

END LAB 1-1 ACCESS SKILL FOR IMPLEMENTING Complex Networks

——————————————————————————————————

LAB 2-1 Configure and verify Eigrp Operations



目的:

  1. 在WAN 和 LAB 的界面上設定基本的EIGRP及驗證其運
  2. 使用必要的工具及指令進行設定
  3. 在某一路由器上使用LAN界面上的次要IP位址加入EIGRP路由協定
  4. 更改EIGRP路徑測量參數來影響路由的選擇
  5. 最佳化-1.避免EIGRP的界面送出不必要的HELLO封包訊息
  6. 最佳化-2.避免不必要的小路由被送出,在特定設備上執行路由聚合
  7. 列出實施行步驟
  8. 寫下驗證,測試的計劃檢查所有的設定如規劃方式進行運作
  9. 利用 SHOW 及 DEBUG的指令檢查設定及驗證運作

Note: 以上router的介面名稱可能與您正在使用的Lab有所不同, 請以實際介面名稱為準.


實施政策

1 講師已為您準備好基本的設定 (IP, Frame-Relay Map)

2 進行EIGRP的基本設定:

2.1 設定R1至R4上的所有路由器, 讓所有網路上的Subnet的Route都能互相交換, 包括來自BBR1的Routes.

2.2 EIGRP的設定應該精確, 請確定當有其它網段的 IP被設定到路由器的介面上時, EIGRP不會自動地將此新增的網段(Route)送出.

2.3 網段都應該依照原有的網路與subnet mask長度送出, auto summarization 則應該被disable.

3 EIGRP 設定的確認:

3.1 檢查R1與 BBR1的 Neighbor有正確的建立.

3.2 檢查R1與 R2, R3, R4的 Neighbor有正確的建立.

3.3 檢查Router所送出的route及subnet mask長度正確, 請嘗試用不同的指令查看而不要直接查看topology及routing Table.

3.4 查看R1的topology 與routing table, 你應該學到所有的routes, 請注意每筆route在topology table中的FD值都正確的
反應在routing table Metric 欄位.

3.5 檢查R4的topology與routing table, 請注意, R4應該學到external routes, 並且這些routes都各有兩條不同的路徑.
例如,你將會看到 192.168.1.0/24的route來自兩個不同的neighbor, 而且metric 相同, 由於預設的Equal Cost Load Balancing 的原故, 這兩個路徑都被 install 到 routing table 中.

3 3.6 在R4啟動 EIGRP event debugging, 你應該看到EIGRP封包的交換, 其中包括10.1.112.0/24(介於R1與R2間的網段)這筆route,
在其它router的query R4時, R4的回應中將會含有infinite metric的值(4294967295)

解答範例:

1.檢查各路由器上所有界面的資訊
R1:

P5R1.LAB21#sh ip interface brief | section up

FastEthernet0/0 172.30.13.1 YES NVRAM up up

Serial0/0/0 unassigned YES NVRAM up up

Serial0/0/0.1 10.1.112.1 YES NVRAM up up

Serial0/0/0.4 10.1.115.1 YES TFTP up up

P5R1.LAB21#sh frame-relay pvc | section DLCI

DLCI = 512, DLCI USAGE = LOCAL, PVC STATUS = ACTIVE, INTERFACE = Serial0/0/0.1

DLCI = 513, DLCI USAGE = UNUSED, PVC STATUS = ACTIVE, INTERFACE = Serial0/0/0

DLCI = 514, DLCI USAGE = UNUSED, PVC STATUS = ACTIVE, INTERFACE = Serial0/0/0

DLCI = 515, DLCI USAGE = LOCAL, PVC STATUS = ACTIVE, INTERFACE = Serial0/0/0.4

DLCI = 516, DLCI USAGE = UNUSED, PVC STATUS = ACTIVE, INTERFACE = Serial0/0/0

P5R1.LAB21#sh ip protocols

R2
P5R2.LAB21#sh ip int brief | section up

FastEthernet0/0 172.30.24.2 YES NVRAM up up

Serial0/0/0 unassigned YES NVRAM up up

Serial0/0/0.1 10.1.112.2 YES NVRAM up up

P5R2.LAB21#sh frame-relay pvc | section DLCI

DLCI = 521, DLCI USAGE = LOCAL, PVC STATUS = ACTIVE, INTERFACE = Serial0/0/0.1

DLCI = 523, DLCI USAGE = UNUSED, PVC STATUS = ACTIVE, INTERFACE = Serial0/0/0

DLCI = 524, DLCI USAGE = UNUSED, PVC STATUS = ACTIVE, INTERFACE = Serial0/0/0

P5R2.LAB21#sh ip protocols

R3:

P5R3.LAB21#sh ip interface brief | section up

FastEthernet0/0 172.30.13.3 YES NVRAM up up

Serial0/0/0 unassigned YES NVRAM up up

Serial0/0/0.3 10.1.134.3 YES NVRAM up up

P5R3.LAB21#sh frame-relay pvc | section DLCI

DLCI = 531, DLCI USAGE = UNUSED, PVC STATUS = ACTIVE, INTERFACE = Serial0/0/0

DLCI = 532, DLCI USAGE = UNUSED, PVC STATUS = ACTIVE, INTERFACE = Serial0/0/0

DLCI = 534, DLCI USAGE = LOCAL, PVC STATUS = ACTIVE, INTERFACE = Serial0/0/0.3

P5R3.LAB21#sh ip protocols

R4:

P5R4.LAB21#sh ip interface brief | section up

FastEthernet0/0 172.30.24.4 YES NVRAM up up

Serial0/0/0 unassigned YES NVRAM up up

Serial0/0/0.3 10.1.134.4 YES NVRAM up up

P5R4.LAB21#sh frame-relay pvc | section DLCI

DLCI = 541, DLCI USAGE = UNUSED, PVC STATUS = ACTIVE, INTERFACE = Serial0/0/0

DLCI = 542, DLCI USAGE = UNUSED, PVC STATUS = ACTIVE, INTERFACE = Serial0/0/0

DLCI = 543, DLCI USAGE = LOCAL, PVC STATUS = ACTIVE, INTERFACE = Serial0/0/0.3

P5R4.LAB21#

P5R4.LAB21#sh ip protocols

S1:

P5S1.LAB21.to.LAB61# sh vlan brief

VLAN Name Status Ports

—- ——————————– ——— ——————————-

1 default active Fa0/2, Fa0/4, Fa0/5, Fa0/6

Fa0/7, Fa0/8, Fa0/9, Fa0/10

Fa0/11, Fa0/12, Fa0/13, Fa0/14

Fa0/15, Fa0/16, Fa0/17, Fa0/18

Fa0/19, Fa0/20, Fa0/21, Fa0/22

Fa0/23, Fa0/24, Gi0/1, Gi0/2

111 VLAN0111 active

113 VLAN0113 active Fa0/1, Fa0/3

1002 fddi-default act/unsup

1003 token-ring-default act/unsup

1004 fddinet-default act/unsup

1005 trnet-default act/unsup

P5S1.LAB21.to.LAB61# sh vlan sum

P5S1.LAB21.to.LAB61# sh vlan summary

Number of existing VLANs : 7

Number of existing VTP VLANs : 7

Number of existing extended VLANs : 0

LAB 2-1 Configure and verify Eigrp Operations



以上router的介面名稱可能與您正在使用的Lab有所不同, 請以實際介面名稱為準.

1 講師已為您準備好基本設定 (IP, Frame-Relay Map)

2 啟動EIGRP 於:

2.1 R1-BBR1 的p2p sub-interface 介面

2.2 R1-BBR2 的p2p sub-interface 介面

2.3 R3-R4 的 p2p sub-interface 介面, 含 LAN 的網段.

2.4 EIGRP 的設定應讓這個Lab所使用的其它子網路一但加入時, 會自動加到 EIGRP 的 Table 中.

3 確定 R1 的 Topology Table 與 Routing Table:

3.1 由 BBR1 學到 192.168.x.0/24

3.2 由 BBR2 學到 172.30.10.0/24

3.3 比對 Topology Table 與 Routing Table 中的Metric 值.

4 啟動 EIGRP 於:

4.1 R1 與 (R2, R3, R4) 間的 Multipoint Sub-interface.

4.2 所有Router 要能交換 Routes.

5 檢查 Neighbor 與 Routing Table:

5.1 R1-R2

5.2 R1-R3

5.3 R1-R4

5.4 Shutdown R3-R4, 檢查 R3此時學不到 172.30.24.0/24

6 調整 R1 的設定:

6.1 讓 R3 與 R4 仍能學到彼此的LAN subnet.

6.2 No shutdown R3-R4 間的介面.

7 檢查 R1-R2, R1-R3, R1-R4:

7.1 Neighbor Table

7.2 Topology Table

7.3 Routing Table

7.4 觀察 Topology Table 與 Routing Table 的 metric 變化.

7.5 再次 shutdown R3-R4 間的介面, 並確認 R2, R4 是從 R1 學到 172.30.13.0/24

8 正確調整參數, 影響路徑的選擇:

8.1 設定R3 與 R4之間介面的 Delay, 讓R2把學自R1的Route當作是Feasible Successor(Backup)

8.2 設定 R3, 讓R3到 172.30.24.0/24 的路徑可執行 Unequal Cost Load Balancing.

8.3 設定正確Route與參數, 讓 R3 到 172.30.24.0/24 的路徑是以 R4作為 Primary Route, 以 R1作為Backup Route.

9 最後, 確定要讓R3的 LAN 要能與 R2, R4 的 LAN 仍然可以建立連線.

TP Lab之設定內容已錄製成為"影音檔" 供學員參考, 請參訪以下任一連結:

(1) TP官方網站:

http://www.training-partners.com.tw , 點選 “技術開講-影音專區"

(2) TP Facebook: facebook.com/group.php?gid=50505115609點選"影片"

LAB 2-3



以上router的介面名稱可能與您正在使用的Lab有所不同, 請以實際介面名稱為準.

1 在LAN介面上設定EIGRP Authentication.

1.1 EIGRP Authentication 應使用 安全的機制.

1.2 EIGRP Authentication 的密碼永不過期.

1.3 在所有Router上應用正確的指令檢查 Key Chain 的設定正確無誤, 並且使用正確的key 在作Authentication, 確認 Key 的時間永不過期.

1.4 檢查 EIGRP Neighbor 正確的建立.

1.5 檢查 EIGRP Routing 都有正確學習到每一個Router上.

2 在WAN介面上設定 EIGRP Authentication.

2.1 EIGRP Authentication 應使用 安全的機制.

2.2 EIGRP Authentication 的密碼永不過期.

2.3 在所有Router上應用正確的指令檢查 Key Chain 的設定正確無誤, 並且使用正確的key 在作Authentication, 確認 Key 的時間永不過期.

2.4 檢查 EIGRP Neighbor 正確的建立.

2.5 檢查 EIGRP Routing 都有正確學習到每一個Router上.

LAB 2-4


Implement and Troubleshoot EIGRP Operations

Trouble Ticket A: EIGRP Adjacency Issues

1 您已離開公司一段時間, 在這段時間當中, 有位資淺的工程師替代了您的工作. 由於當時正好有需求要新增額外的 IP 網段於R2與R4之間, 於是那位工程師便設定了額外的 IP網段, 但卻導致在此網段之外的其它網路因而斷線. 你被要求要檢查並更正這個錯誤, 以便讓此新增的網段能夠被存取及使用.

2 另一個問題是有關與BBR1 Router間的 EIGRP Adjacency, 就在你不在的這段時間, 這位資淺的工程師被要求改善與BBR1之間的Routing的安全性, 但是卻導致與BBR1無法建立Adjacency. 你再次被要求更正這個現象.

3 這位工程師也被要求要對EIGRP進行最佳化. 他作了一些設定以便改善R4的Metric計算的數值, 但此舉卻造成與R4之間斷線. 此外, 他企圖在 Routers上用summarization 的設定將Routing進行最佳化, 但卻沒有得到預期的結果, 你也被要求對此進行處理.

4 你的助手向你報告, 連接在R2與R4之間的LAN, 在最近才部署上去的R3上面是看不到的. R3僅有有限的連線. 但在R1上卻可以看到並存取所有的網路. 你必需找出問題並且對其進行更正.

Instructions:

5 你與同伴必需建立 Troubleshooting 與 Verification Plan 並進行分工. Trouble Ticket A 與 B是可以同步進行的. 請將處理的過程記錄於書上的"Troubleshooting Log"以便你能夠據此與同伴進行討論, 並且review整個過程

Routing LAB Hints

ROUTE-LAB

LAB 1-1



目的:

  1. 確認必須提供的網路需求
  2. 確認必須的訊息
  3. 確認實行時需要的工作及建立實施計劃
  4. 驗證活動

實施政策

  1. 基礎結構採用 CISCO 的三層式架構:
  2. 必須滿足的基本要求
    1. Functionality 在時限內滿足並且支援應用程式及資料流量的需
    2. Performance 滿足企業對 響應速度,吞吐量,利用率
    3. Scalability 滿足企業對 人員,應用程式及資料流量未來的可擴展性
    4. Availability 提供企業網路及應用接近 99.999的可用性
    5. Cost-effectiveness: 在限定的預算

解決方案範例.

  1. 1-確認必須提供的網路需求& 2. 確認必須的訊息
    1.1 使用的應用程式及需要的資料流量
    1.2 存在的網路設備,及其作業系統/固件(OS /FirmWare)
    1.3 拓樸圖及連線資訊
    1.4 IP位址及部署分配
    1.5 使用的路由協定及路由器上的設定(注:通常應為所有的網路設備協定)
  2. 3-確認實行時需要的工作及建立實施計劃
    2.1 撰寫必要交件的資訊
    2.2 準備必須的工具及資源
    連接PC(Terminal)到設備
    選擇並且保留必要資源
    2.3 設定所有設備上的IP位址
    2.4 啟用所有參與運作的界面
    2.5 設定網路設備上的必要協定(例:路由協定 )
    2.6 設定特定網路設備上的必要特性(例:路由聚合,及封閉網路)
    2.7 驗證網路設備及連線是否依據設定正常的運作
    2.8 測量執行效率及記錄結果是否滿足
    2.9 建立設定備份

  3. 2.10建立實施計劃,網路維運基線,及提出必要建議
  4. 4-驗證活動
    3.1 驗證所有設備界面正常運作
    3.2 驗證網路設備上的設定是否正運作(例:路由協定)
    3.3 驗證網路設備上的路徑是否正確(例:路由表是否包含所有規劃的正確路徑)
    3.4 驗證特定網路設備上的必要特性(例:送出聚合路由的路由器是否自我生成指向null0界面的路)
    3.5 驗證網路設備上的路徑是否正確及是否要進行調整

LAB 2-1


目的:

  1. 在WAN 和 LAB 的界面上設定基本的EIGRP及驗證其運
  2. 使用必要的工具及指令進行設定
  3. 在某一路由器上使用LAN界面上的次要IP位址加入EIGRP路由協定
  4. 更改EIGRP路徑測量參數來影響路由的選擇
  5. 最佳化-1.避免EIGRP的界面送出不必要的HELLO封包訊息
  6. 最佳化-2.避免不必要的小路由被送出,在特定設備上執行路由聚合
  7. 列出實施行步驟
  8. 寫下驗證,測試的計劃檢查所有的設定如規劃方式進行運作
  9. 利用 SHOW 及 DEBUG的指令檢查設定及驗證運作

Note: 以上router的介面名稱可能與您正在使用的Lab有所不同, 請以實際介面名稱為準.


實施政策

1 講師已為您準備好基本的設定 (IP, Frame-Relay Map)

2 進行EIGRP的基本設定:

2.1 設定R1R4上的所有路由器, 讓所有網路上的SubnetRoute都能互相交換, 包括來自BBR1Routes.

2.2 EIGRP的設定應該精確, 請確定當有其它網段的 IP被設定到路由器的介面上時, EIGRP不會自動地將此新增的網段(Route)送出.

2.3 網段都應該依照原有的網路與subnet mask長度送出, auto summarization 則應該被disable.

3 EIGRP 設定的確認:

3.1 檢查R1 BBR1 Neighbor有正確的建立.

3.2 檢查R1 R2, R3, R4 Neighbor有正確的建立.

3.3 檢查Router所送出的routesubnet mask長度正確, 請嘗試用不同的指令查看而不要直接查看topologyrouting Table.

3.4 查看R1topology routing table, 你應該學到所有的routes, 請注意每筆routetopology table中的FD值都正確的
反應在routing table Metric 欄位.

3.5 檢查R4topologyrouting table, 請注意, R4應該學到external routes, 並且這些routes都各有兩條不同的路徑.
例如,你將會看到 192.168.1.0/24route來自兩個不同的neighbor, 而且metric 相同, 由於預設的Equal Cost Load Balancing 的原故, 這兩個路徑都被 install routing table .

3 3.6 R4啟動 EIGRP event debugging, 你應該看到EIGRP封包的交換, 其中包括10.1.112.0/24(介於R1R2間的網段)這筆route,
在其它routerquery R4, R4的回應中將會含有infinite metric的值(4294967295)

解答範例:

1.檢查各路由器上所有界面的資訊
R1:

P5R1.LAB21#sh ip interface brief | section up

FastEthernet0/0 172.30.13.1 YES NVRAM up up

Serial0/0/0 unassigned YES NVRAM up up

Serial0/0/0.1 10.1.112.1 YES NVRAM up up

Serial0/0/0.4 10.1.115.1 YES TFTP up up

P5R1.LAB21#sh frame-relay pvc | section DLCI

DLCI = 512, DLCI USAGE = LOCAL, PVC STATUS = ACTIVE, INTERFACE = Serial0/0/0.1

DLCI = 513, DLCI USAGE = UNUSED, PVC STATUS = ACTIVE, INTERFACE = Serial0/0/0

DLCI = 514, DLCI USAGE = UNUSED, PVC STATUS = ACTIVE, INTERFACE = Serial0/0/0

DLCI = 515, DLCI USAGE = LOCAL, PVC STATUS = ACTIVE, INTERFACE = Serial0/0/0.4

DLCI = 516, DLCI USAGE = UNUSED, PVC STATUS = ACTIVE, INTERFACE = Serial0/0/0

P5R1.LAB21#sh ip protocols

R2
P5R2.LAB21#sh ip int brief | section up

FastEthernet0/0 172.30.24.2 YES NVRAM up up

Serial0/0/0 unassigned YES NVRAM up up

Serial0/0/0.1 10.1.112.2 YES NVRAM up up

P5R2.LAB21#sh frame-relay pvc | section DLCI

DLCI = 521, DLCI USAGE = LOCAL, PVC STATUS = ACTIVE, INTERFACE = Serial0/0/0.1

DLCI = 523, DLCI USAGE = UNUSED, PVC STATUS = ACTIVE, INTERFACE = Serial0/0/0

DLCI = 524, DLCI USAGE = UNUSED, PVC STATUS = ACTIVE, INTERFACE = Serial0/0/0

P5R2.LAB21#sh ip protocols

R3:

P5R3.LAB21#sh ip interface brief | section up

FastEthernet0/0 172.30.13.3 YES NVRAM up up

Serial0/0/0 unassigned YES NVRAM up up

Serial0/0/0.3 10.1.134.3 YES NVRAM up up

P5R3.LAB21#sh frame-relay pvc | section DLCI

DLCI = 531, DLCI USAGE = UNUSED, PVC STATUS = ACTIVE, INTERFACE = Serial0/0/0

DLCI = 532, DLCI USAGE = UNUSED, PVC STATUS = ACTIVE, INTERFACE = Serial0/0/0

DLCI = 534, DLCI USAGE = LOCAL, PVC STATUS = ACTIVE, INTERFACE = Serial0/0/0.3

P5R3.LAB21#sh ip protocols

R4:

P5R4.LAB21#sh ip interface brief | section up

FastEthernet0/0 172.30.24.4 YES NVRAM up up

Serial0/0/0 unassigned YES NVRAM up up

Serial0/0/0.3 10.1.134.4 YES NVRAM up up

P5R4.LAB21#sh frame-relay pvc | section DLCI

DLCI = 541, DLCI USAGE = UNUSED, PVC STATUS = ACTIVE, INTERFACE = Serial0/0/0

DLCI = 542, DLCI USAGE = UNUSED, PVC STATUS = ACTIVE, INTERFACE = Serial0/0/0

DLCI = 543, DLCI USAGE = LOCAL, PVC STATUS = ACTIVE, INTERFACE = Serial0/0/0.3

P5R4.LAB21#

P5R4.LAB21#sh ip protocols

S1:

P5S1.LAB21.to.LAB61# sh vlan brief

VLAN Name Status Ports

—- ——————————– ——— ——————————-

1 default active Fa0/2, Fa0/4, Fa0/5, Fa0/6

Fa0/7, Fa0/8, Fa0/9, Fa0/10

Fa0/11, Fa0/12, Fa0/13, Fa0/14

Fa0/15, Fa0/16, Fa0/17, Fa0/18

Fa0/19, Fa0/20, Fa0/21, Fa0/22

Fa0/23, Fa0/24, Gi0/1, Gi0/2

111 VLAN0111 active

113 VLAN0113 active Fa0/1, Fa0/3

1002 fddi-default act/unsup

1003 token-ring-default act/unsup

1004 fddinet-default act/unsup

1005 trnet-default act/unsup

P5S1.LAB21.to.LAB61# sh vlan sum

P5S1.LAB21.to.LAB61# sh vlan summary

Number of existing VLANs : 7

Number of existing VTP VLANs : 7

LAB2-2


以上router的介面名稱可能與您正在使用的Lab有所不同, 請以實際介面名稱為準.
2.3 R3-R4 的 p2p sub-interface 介面, 含 LAN 的網段.

2.4 EIGRP 的設定應讓這個Lab所使用的其它子網路一但加入時, 會自動加到 EIGRP Table .

3 確定 R1 Topology Table Routing Table:

3.1 BBR1 學到 192.168.x.0/24

3.2 BBR2 學到 172.30.10.0/24

3.3 比對 Topology Table Routing Table 中的Metric .

4 啟動 EIGRP :

4.1 R1 (R2, R3, R4) 間的 Multipoint Sub-interface.

4.2 所有Router 要能交換 Routes.

5 檢查 Neighbor 與 Routing Table:

5.1 R1-R2

5.2 R1-R3

5.3 R1-R4

5.4 Shutdown R3-R4, 檢查 R3此時學不到 172.30.24.0/24

6 調整 R1 的設定:

6.1 讓 R3 與 R4 仍能學到彼此的LAN subnet.

6.2 No shutdown R3-R4 間的介面.

7 檢查 R1-R2, R1-R3, R1-R4:

7.1 Neighbor Table

7.2 Topology Table

7.3 Routing Table

7.4 觀察 Topology Table 與 Routing Table 的 metric 變化.

7.5 再次 shutdown R3-R4 間的介面, 並確認 R2, R4 是從 R1 學到 172.30.13.0/24

8 正確調整參數, 影響路徑的選擇:

8.1 設定R3 與 R4之間介面的 Delay, 讓R2把學自R1的Route當作是Feasible Successor(Backup)

8.2 設定 R3, 讓R3到 172.30.24.0/24 的路徑可執行 Unequal Cost Load Balancing.

8.3 設定正確Route與參數, 讓 R3 到 172.30.24.0/24 的路徑是以 R4作為 Primary Route, 以 R1作為Backup Route.

9 最後, 確定要讓R3的 LAN 要能與 R2, R4 的 LAN 仍然可以建立連線.

LAB 2-3


以上router的介面名稱可能與您正在使用的Lab有所不同, 請以實際介面名稱為準.

1 LAN介面上設定EIGRP Authentication.

1.1 EIGRP Authentication 應使用
安全的機制.

1.2 EIGRP Authentication 的密碼永不過期.

1.3 在所有Router上應用正確的指令檢查 Key Chain 的設定正確無誤, 並且使用正確的key 在作Authentication, 確認 Key 的時間永不過期.

1.4 檢查 EIGRP Neighbor 正確的建立.

1.5 檢查 EIGRP Routing 都有正確學習到每一個Router.

2 WAN介面上設定 EIGRP Authentication.

2.1 EIGRP Authentication 應使用
安全的機制.

2.2 EIGRP Authentication 的密碼永不過期.

2.3 在所有Router上應用正確的指令檢查 Key Chain 的設定正確無誤, 並且使用正確的key 在作Authentication, 確認 Key 的時間永不過期.

2.4 檢查 EIGRP Neighbor 正確的建立.

2.5 檢查 EIGRP Routing 都有正確學習到每一個Router.

LAB2-4


以上router的介面名稱可能與您正在使用的Lab有所不同, 請以實際介面名稱為準.

1 LAN介面上設定EIGRP Authentication.

1.1 EIGRP Authentication 應使用
安全的機制.

1.2 EIGRP Authentication 的密碼永不過期.

1.3 在所有Router上應用正確的指令檢查 Key Chain 的設定正確無誤, 並且使用正確的key 在作Authentication, 確認 Key 的時間永不過期.

1.4 檢查 EIGRP Neighbor 正確的建立.

1.5 檢查 EIGRP Routing 都有正確學習到每一個Router.

2 WAN介面上設定 EIGRP Authentication.

2.1 EIGRP Authentication 應使用
安全的機制.

2.2 EIGRP Authentication 的密碼永不過期.

2.3 在所有Router上應用正確的指令檢查 Key Chain 的設定正確無誤, 並且使用正確的key 在作Authentication, 確認 Key 的時間永不過期.

2.4 檢查 EIGRP Neighbor 正確的建立.

2.5 檢查 EIGRP Routing 都有正確學習到每一個Router.

———————————————————————————————————————-

LAB3-1


1 設定OSPF於介面上 (R1-R3的LAN, R2-R4的LAN):

1.1 設定OSPF LAN的網段能夠被存取的到.

1.2 所有的Router都在Backbone Area.

1.3 OSPF 的設定應該要精確, 以免當額外的子網段介面加入時自動的啟動了OSPF.

1.4 IP Routing Table 中的網段也應該與實際網路遮罩吻合.

2 確認R1-R3, R2-R4的LAN

2.1 OSPF Neighbor已建立:

2.2 並檢查Neighbor建立的時間有多久?

2.3 是否有任何問題影響Neighbor的溝通? 例如封包在Queue中無法送出?

2.4 在不看Routing Table 與 Topology Table的情況下, 請確定有送出所有LAN與Loopback正確的Route以及正確的 Subnet mask.

2.5 檢查R1的Topology 與 Routing Table進行比較, 你應該看到R3的 Loopback網段及其metric 值.

2.6 確定R1與R3的LAN上是由 R1擔任DR.

3 設定OSPF於WAN介面上(R3-R4)

3.1 R3-R4需交換LAN與Loopback網段.

3.2 OSPF的設定是在 Frame-Relay的Point-to-Point介面上.

3.3 Area 請設定在Backbone Area之內.

3.4 OSPF的設定應該要精確, 以便有額外的IP加入Router時不會自動的被加入OSPF送出.

4 確認R3-R4的WAN

4.1 OSPF Neighbor已建立:

4.2 並檢查Neighbor建立的時間有多久?

4.3 是否有任何問題影響Neighbor的溝通? 例如封包在Queue中無法送出?

4.4 在不看Routing Table 與 Topology Table的情況下, 請確定有送出所有LAN與Loopback正確的Route以及正確的 Subnet mask.

4.5 檢查R1的Topology 與 Routing Table進行比較, 你應該看到R3的 Loopback網段及其metric 值.

5 設定OSPF於WAN介面上(R1-R2, R1-R4)

5.1 OSPF的設定是在 Frame-Relay的Multi-point介面上.

5.2 Area 請設定在Backbone Area之內.

5.3 OSPF的設定應該要精確, 以便有額外的IP加入Router時不會自動的被加入OSPF送出.

6 確認R1-R2, R1-R4的WAN

6.1 OSPF Neighbor已建立:

6.2 並檢查Neighbor建立的時間有多久?

6.3 是否有任何問題影響Neighbor的溝通? 例如封包在Queue中無法送出?

6.4 檢查所有的Router的Topology Table與Routing Table都有學習到所有的Routes及正確的Subnet Mask.

————————————————————————————————————————————-

LAB 3-2


1 設定R1-BBR2 WAN 界面上OSPF於(R1-BBR2):

BBR2已經預設為Area 0.

啟動 OSPF 於 R1與BBR2的 WAN介面, 同樣是 Area0.

R1應該由BBR2收到172.30.10.0/24 的網段.

2 確認OSPF的設定(R1-BBR2):

Neighbor 應該已經建立

比對 R1的LSDB與IP Routing Table, 應正確學到Routes.

確定R1的Route可以與172.30.10.0/24網段連線.

3 設定其它OSPF Area (R2, R3, R4):

設定R3的所有介面於 Area 3之中.

設定R2與R4 的所有介面於Area24之中.

檢查所有的Router都應該學習到所有網段的Routes.

4 確認OSPF的設定:

R1與R3應建立Adjacency於Area 3之中.

比對R3的LSDB, Routing Table. R3應正確學到Routes.

R1-R2, R1-R4應建立Adjacency於Area 24之中.

比對R2與R4的LSDB, Routing Table.

R2, R4應正確學到Routes, 包含來自BBR2的subnets.

確定可以正確連到BBR2的172.30.10.0/24 Subnet.

5 調整OSPF參數:

請在Area24中精確的調整Path Cost, 影響運算的結果. 目的是讓R1的172.30.24.0/24 Route是以R2為最佳路徑.

為了讓Area 0更穩定, 請手動指定R1的Router ID.

請在R3上設定讓LAN網段減少不必要的Traffic. 目的是簡省CPU的運算.

6 確認OSPF的設定:

確定所有的Router的OSPF Adjacency 都是 up並且運作正常.

R1應與BBR2在 Area0 中.

R1應與R3在Area3 中.

R1應與R2, R4 在Area24中.

R1應使用新定的Router ID.

R1應使用R2作為前往172.30.24.0/24 做為最佳路徑.

R3應只有與R1建立Adjacency

R3不應透過LAN與R1建立Adjacency.

2. 檢測OSPF的基本設定,運作及目前網路的結構

Rl#show ip ospf neighbor

Rl#show ip ospf database

3. Summarizing the OSPF intemal routes.

R1#

router ospf 1

area 0 range 172.30.0.0 255.255.0.0

4. 1. Use the following example to configure router R3 in this lab:

R3#

router ospf 1

summary-address 192.168.0.0 255.255.0.0

4.2. Verify the OSPF link-state databases and IP routing tables.

R1#show ip ospf database

—————————————————————————————————————————————–

LAB3-3


檢查OSPF (R1-R4)目前的Routes:

R1-R4 都已設定將直接連接的網段以OSPF送出.

R3 已將OSPF External Routes送往你的OSPF網路當中.

檢查OSPF(R1-R4)既有狀態:

檢視R1-R4的設定, 包括涵蓋的network, 啟動的介面, Adjacencies, LSDB與OSPF的Area.

確定R1-R4都可以連到(Ping) 其所學到的每一個網段.

查看Routing Table, 寫下目前的各Router送出的Routes.

設定OSPF Internal Routes 的 Summarization:

根據前面收集的資訊, 進行Routes Summarization的設定.

你需要將來自BBR2的 172.30.x.0/24 Routes進行Summary.

確認OSPF Summarization的設定:

確定 R1-R4的Adjacency仍然正常.

檢查 172.30.x.0/24 經過 Summary 之後的Routes 資訊存在於R1-R4的LSDB 與Routing Table中.

確定各Router都能連線到(Ping)172.30.x.0/24 的IP.

進一步設定OSPF External Routes 的 Summarization:

R3目前已將192.168.x.0/24 的Routes 以 Redistribute的方式送入OSPF之中, 由於R3是這些網段的唯一來源, 因此沒有必要讓其它Router一一學習到每一筆192.168.x.0的Route. 但是, 未來還有可能會有192.168.x.0/24的網段會加入R3.

請設定將192.168.x.0/24 的Routes 進行 Summarization.

確認OSPF Summarization的設定:

確定 R1-R4的Adjacency仍然正常.

檢查 192.168.x.0/24 Summary 之後的Route 資訊存在於R1-R4的LSDB 與Routing Table中.

確定各Router都能連線到(Ping)192.168.x.0/24 的IP.

1.

2.

3.

3. Summarizing the OSPF intemal routes.

3. 1. Use the following example to configure router Rl in this lab:

R 工#

router ospf 1

area 0 range 172.30.0.0 255.255.0.0

3之Veri有T the OSPF link-state databases and IP routing tables.

Rl#show ip ospf database

OSPF Router with ID (1.1.1.1) (process ID 1)

4. Summarizing OSPF extemal routes.

4. 1. Use the following example to configure router R3 in this lab:

R3#

router ospf 1

summary-address 192.168.0.0 255.255.0.0

4.2. Verify the OSPF link-state databases and IP routing tables.

R1#show ip ospf database

————————————————————————————————————————–

LAB 3-4


檢查OSPF (R1-R4)目前的Routes及 網路結構

R1-R4 都已設定將直接連接的網段以OSPF送出.

R3 同時也已將OSPF External Routes送往你的OSPF網路當中.

檢查OSPF(R1-R4)既有狀態:

檢視R1-R4的設定, 包括所涵蓋的OSPF範圍, 啟動的介面, Adjacencies, LSDB與OSPF的Area.

確定R1-R4都可連接到OSPF送出的每一個網段.

查看Routing Table, 記錄目前的各Router送出的Routes與IP定址.

設定OSPF Area 24 的 Area Type:

在R2與R4沒有足夠的CPU與Memory來處理來大量Routing Information. 因此必需設法降低R2與R4上的OSPF Link-State Database大小來節省資源的使用.

確認OSPF的設定:

確認R1與 R2, R3, R4, BBR2都有建立 Adjacency.

確認 R2 與 R4之間有建立 Adjacency.

檢查 R1 與 R3的LSDB, 確定它們都有每一筆OSPF internal 與 external 資訊, 且都有將正確的最佳路徑置入Routing Table.

檢查 R2 與 R4的LSDB有變得較小, 因它們不再擁有每一筆來自External 的網段的資訊, 也就是那些被Redistributed 進入 OSPF的Routes.

確定即使 R2 與 R4 沒有每一筆資訊的細節, 但仍然可以與External Routes的網段連線.

設定 OSPF Area 24 的 Area Type:

在前一個步驟中, 雖然已降低了Area 24 的LSDB的資訊數量以節省R2, R4的資源使用, 但你發現它們仍然無法處理所有OSPF的資訊. 因此, 需要進一步降低OSPF的資訊數量, 可是還是要維持讓R2 與 R4可以連線到每一個網段.

確認OSPF 的設定:

確認R1與 R2, R3, R4, BBR2都有建立 Adjacency.

確認 R2 與 R4之間有建立 Adjacency.

檢查 R1 與 R3的LSDB, 確定它們都有每一筆細節的OSPF internal 與 external 資訊, 且都有將正確的最佳路徑置入Routing Table.

檢查 R2 與 R4的LSDB有變得比較小, 因為它們不再擁有每一筆來自Area 24 以外的網段的資訊, 換言之就是那些被Redistribute 進入 OSPF的Routes以及其它Area的Routes.

確定即使 R2 與 R4 沒有每一筆資訊的細節, 但仍然可以與External Routes的網段

與其它的Area連線.

設定 OSPF Area 3 的 Area Type:

此步驟中將透過設定降低 Area 3 內的資訊數量.

你發現R3沒有足夠的記憶體來儲存所有的OSPF IP Routing 資訊, 換言之, 無法儲存任何動態學到的Routing 資訊.

確認OSPF 的設定:

確認R1與 R2, R3, R4, BBR2都有建立 Adjacency.

確認 R2 與 R4之間有建立 Adjacency.

檢查 R1的LSDB, 確定它們都有每一筆細節的OSPF internal 與 external 資訊, 且都有將正確的最佳路徑置入Routing Table.

確定 R1 可以連接所有學習到的網段.

檢查 R2 與 R4有來自Area 24 internal的Route, 但沒有Area24以外的網段的資訊. 即便如此, R2與R4 仍可連接每一個網段.

檢查 R3的Database並確認其Size變小了, Database 應該有Area3內部的資訊及Redistribute進入Area 3 的資訊, 但沒有任何來自其它Area的資訊或從其它Area 進來的 External Route.

確定 R3 可以連線到每一個網段.

1.

2.

Rl#
router ospf 1
area 24 stub

R2#
router ospf 1
area 24 stub

R4#

router ospf 1

area 24 stub

3.

4.

Use the following examplc to configure routcr R 1 in this lab:

R1#

router ospf 1

area 24 stub no-summary

5.

6.

5.1. Use the following example to configure router R1 in this lab:

R1#

router ospf 1

area 3 nssa no-summary

R3#

router ospf 1

area 3 nssa

7.

—————————————————————————————————————————–

LAB 3-5

檢視網路目前的設定:

1 檢查Routing的設定與動作是否正常.

2 R1, R2, R3, R4目前應已設定OSPF並將它們直連的網段送出.

3 部份Router同時還送出一些External OSPF network 到OSPF的routing domain中.

網路管理員必需在Router上進行設定來防止Traffic被駭客侵入並製造Routing的黑洞, 因此:

1 請以per-interface設定OSPF Authentication於Area 3 與 Area24 的Router上.

2 於 R3-R1間使用Simple OSPF Authentication 並查看其動作過程.

3 於 R2-R4間的LAN使用較安全的 OSPF Authentication 並查看其動作過程.

由於使用最小的指令在下列OSPF AREA的所有界面設定較安全的 OSPF驗證:

1 在Area 24上設定Secure的OSPF Authentication驗證.

2 請確定Authentication成功, LSDB, Routing Table 學習正確.

  1. 在所有的路由器上用下列指令記錄目前的 OSPF設定
    Rx# show ip ospf
    RX#show ip ospf databae
    RX#show ip route [ospf ]
    RX#show ip ospf neighbor

  2. 在 R1,R3 的OSPF 路由器上 ,針對WAN連結不同OSPF路由器的界面配置簡單密碼驗證 ,密碼為CISCO
    在 R2,R4 的OSPF 路由器上 ,針對WAN連結不同OSPF路由器的界面配置較安全的md5驗證 ,ID及key為 1及CISCO
    R1#

interface SerialO/0/0.2 point-to-point

ip ospf authentication

ip ospf authentication-key CISCO

R2#

interface FastEthernetO/O

ip ospf authentication message-digest

ip ospf message-digest-key 1 md5 CISCO

R3#

interface SerialO/0/0.2 point-to-point

ip ospf authentication

ip ospf authentication-key CISCO

R4#

interface FastEthernetO/O

ip ospf authentication message-digest

ip ospf message-digest-key 1 md5 CISCO

  1. 驗證R1-R4在驗證後用

    Rx# show ip ospf
    RX#show ip ospf databae
    RX#show ip route [ospf ]
    RX#show ip ospf neighbor

令觀察的狀態和未驗證之前相同

LAB 4-1


基本設定

  1. 在R1與R3之間設定RIPv2路由協定,並且宣告R3的區域網路網段,RIPv2只在廣域網路上交換更新訊息 .
  2. 在R1, R2 與 R4之間設定 OSPF.路由協定,R1的OSPF路由執行程序只包含連結到 R2,R4的廣域網路界面,
    而R2,R4則除了連結R1的廣域網路亦包含了區域網路.
  3. 在R1 與 BBR2之設定EIGRP路由協定.

基本設定驗證檢查:

  1. 確認R1與R3之間的RIPv2已啟動, 且R1可以存取由RIPv2學到的網段.
  2. 確認R1與BBR2之間的EIGRP已啟動, 且R1收到由BBR2送出的EIGRP Routes, 並且可以存取這些網段.
  3. 確認R1, R2與R4之間的OSPF已啟動, Adjacency已建立, 而且R1可從LAN Segment上的R2與R4學到Routes.同時 R1也可以存取這些網段.

單向Redistribution(RIP-to-EIGRP) 設定:

  1. 在R3上僅將目前存的Loopback上的網路以重分配(redistribution)的方式加入RIPv2 路由協定,將網段送出.
    (限制:不可使用ACL及Route-Map 進行設定->Distribute with prefix-list)
  2. 在R1上設定RIP-to-EIGRP 的redistribution與filter, 目的是只讓其中一段Loopback(192.168.1.0/24)轉入EIGRP協定
    (不可使用Distribute-List.->Route-map with ACL )
  3. 由於RIP-to-EIGRP是單向將RIP的route轉換為EIGRP, 因此你必需在R3上設定一筆靜態預設路由(Static Default Route)
    以提供能夠連線到其它網路的能力.

單向Redistribution(RIP-to-EIGRP) 設定驗證檢查::

  1. 檢查R1與R3上的RIPv2 Database, 確定R3的Loopback網段在Redistribution後已出現.
  2. 在R3上再新增一個Loopback介面, 確定這個新增的介面不會自動被Redistribution進入RIPv2的Database中.
    R1也不應收到這個訊息.
  3. 確定 R3可以連線到BBR2的區域網路LAN.

在R1上設定OSPF vs EIGRP双向Redistribution(及 OSPF vs RIP):

  1. 在適當的Router上設定OSPF與RIP的双向Redistribution.
  2. RIP 僅接受原來由OSPF路由協定產生的路由進行重分配至RIP的路由協定中
  3. OSPF僅接受原來由RIP路由協定產生的路由進行重分配至OSPF的路由協定中

在R1上設定OSPF vs EIGRP双向Redistribution(及 OSPF vs RIP)驗證檢查

  1. 檢查R3上RIP的Routing Table, 應可以看到來自OSPF網域的網段.
  2. 檢查R1上EIGRP的Topology Table, 應可看到來自OSPF網域的網段.DEX的routes
  3. 檢查R2與R4的OSPF LSDB 與 Routing Table, 應可看到從RIP與EIGRP網域中Redistribution進來的Routes.
  4. 確定可以從R2的LAN連接到BBR2的LAN.
  5. 確定可以從R3的LAN 連接到R2 的LAN.

Solution

1.在R1&R3 啟動 RIP 路由協定

Rl#

router rip

version 2

network 10.0.0.0

no auto-summary

R3#

router rip

version 2

network 10.0.0.0

network 172.30.0.0

no auto-summary

2.驗證RIP路由協定確運作.

驗證 RIP的指令

RX# show ip rip database

RX# show ip route [RIP]

3.在R1&R2&R4 啟動 OSPF 路由協定

R1#

interface SerialO/0/0.1 multipoint

ip ospf network point-to-multipoint

ip ospf hello-interval 10

router ospf 1

log-adjacency-change

network 10.1.110.0 0.0.0.255 area 0

R2#

interface serialO/0/0.1 multipoint

ip ospf network point-to-multipoint

ip ospf hello-interval 10

router ospf 1

log-adjacency-changes

network 10.1.110.0 0.0.0.255 area 0

network 172.30.24.0 0.0.0.255 area 0

R4#

interface serialO/0/0.1 multipoint

ip ospf network point-to-multipoint

ip ospf hello-interval 10

router ospf 1

log-adjacency-changes

network 10.1.110.0 0.0.0.255 area 0

network 172.30.24.0 0.0.0.255 area 0

在R1&R2&R4 驗證 OSPF 路由協定

驗證OSPF的指令

RX#show ip ospf interface

RX#show ip ospf neighbor

RX#show ip ospf database

RX#show ip route

3.在R1啟動 eigrp 路由協定

R1#

router eigrp 1

network 10.l.l16.0 0.0.0.255

在R1驗證 EIGRP 路由協定

驗證 EIGRP的指令

RX#show ip eigrp interface

RX#show ip eigrp neighbor

RX#show ip eigrp toplogy

RX#show ip route

4.(Redistribute CONNECTED)重分配指定的直連界面到 RIP 路由協定

利用 Prefix-list限制重分配的直連界面的網路

ip prefix-list PL-R1P seq 5 permit 192.168.1.0/24

ip prefix-list PL-R1P seq 10 permit 192.168.2.0/24

ip prefix-list PL-R1P seq 15 permit 192.168.3.0/24

R3#

router rip

redistribute connected

distribute-list prefix PL-RIP out connected

R1#重分配指定的RIP路由到 eigrp 路由協定

router eigrp 1

redistribute rip route-map RM-RIP

default-metric 1500 100 255 1 1500

!設定轉入 EIGRP路由的 seed metrics

ip access-list standard ACL-R工P

permit 192.168.2.0 0.0.0.255

permit 192.168.3.0 0.0.0.255

!

route-map RM-RIP deny 10

match ip address ACL-RIP

route-map RM-R1P permit 99

7.在R3上設定預設路由

R3#

ip route 0.0.0.0 0.0.0.0 10.1.113.1

8. 在R1上設定OSPF vs EIGRP双向Redistribution

R1#

router eigrp 1

redistribute ospf 1

router ospf 1

redistribute eigrp 1 subnets

9.在R1上設定OSPF vs RIP 双向Redistribution

R1#

router ospf 1

redistribute rip subnets

router rip

redistribute ospf 1

________________________________________________________________________________________________________________________________________

LAB 5-1


在R1-R4上將所有的界面(LANs ,WANs 及 loopbacks)加入EIGRP 1 的路由協定並檢查其運作
測試由SW上送到 192.168.1.0 及 192.168.2.0的路徑,及是否可到達192.168.1.0 及 192.168.2.0

測試由R1上送到 192.168.3.0 的路徑,及是否可到達192.168.3.0
在R3上更改路徑決定政策,將由來源為 SW上的IP 位址(172.30.13;11)送往192.168.1.0及192.168.2.0時
使用 R1當作下一站位址 (path R3->R1->R2->R4)
驗證R3的決策性路由是否正確運作
在R1上更改路徑決定政策,將R1本身產生的資料流量送往192.168.3.0使用 R3當作下一站位址 (path R1->R3->R4)

STEP1

Rl#

router eigrp 1

network 10.0.0.0

network 172.30.0.0

no auto-sumrnary

R2#

router eigrp 1

network 10.0.0.0

network 172.30.0.0

no auto-summary

R3#

router eigrp 1

network 10.0.0.0

network 172.30.0.0

no auto-summary

R4#

router eigrp 1

network 10.0.0.0

network 172.30.0.0

network 192.168.0.0 0.0.255.255

no auto-summary

STEP2

show ip route & ping

STEP3
在R3上設定 POLICY-BASE ROUTING

Use the following example to configure PBR on router R3 in the lab.

R3#

interface FastEthernetO/O

ip policy route-map RM-PBR

ip access-listextended ACL-PBR

permit ip host 172.30.13.11 192.168.1.0 0.0.0.255

permit ip host 172.30.13.11 192.168.2.0 0.0.0.255

route-map RM-PBR permit 10

match ip address ACL-PBR

set ip next-hop 172.30.13.1

驗證the traffic flow from switch SWl and PBR on R3.

Examine the path of the IP packcts.

timeout is 2 seconds:

sw1#ping 192.168.1.1

Type escape sequence to abort.

Sending 5 , 100-byte ICMP Echos to 192.168.1.1 ,

!!!!!

Success rate is 100 percent (5/5) , round-trip min/avg/max = 58/58/59 ms

timeout is 2 seconds:

R3#debug ip policy

policy routing debugging is on

Note Enable debugging in order to see the policy macth following the ping commands on pod

sw1#ping 192.168.1.1

Type escape sequence to abort.

sending 5 , 100-byte 工CMP Echos to 192.168.1.1 , timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5) , round-trip min/avg/max = 51/58/67 ms

R3#

*May 24 14:14:49.025: IP: s=172.30.13.11 (FastEthernetO/O) , d=192.168.1.1 , len

100, FIB policy match

*May 24 14:14:49.025: IP: s=172.30.13.11 (FastEthernetO/O) , d=192.168.1.1 , len

100 , policy match

*May 24 14:14:49.025: IP: route map RM-PBR, item 10 , permit

*May 24 14:14:49.025: IP: s=172.30.13.11 (FastEthernetO/O) , d=192.168.1.1

(FastEthernetO/O) , len 100, policy routed

sw1#ping 192.168.3.1

Type escape sequence to abort.

Sending 5 , 100-byte 工CMP Echos to 192.168.3.1 , timeout is 2 seconds:

!!!!!.

8uccess rate is 100 percent (5/5) , round-trip min/avg/max = 50/57/59 ms

R3#

*May 24 14:15:16.645: IP: s=172.30.13.11 (FastEthernetO/O) , d=192.168.3.1 , len

100 , FIB policy rejected(no match) – normal forwarding

*May 24 14:15:16.645: IP: s=172.30.13.11 (FastEthernetO/O) , d=192.168.3.1

(FastEthernetO/O) , 1en 100 , po1icy rejected – norma1 forwarding

在R1上定義決策性路由影響本身產生流量的傳送路徑

ip local policy route-map RM-LOCAL-PBR
!

ip access-list extended ACL-LOCAL-PBR

permit ip any 192.168.3.0 0.0.0.255

!

route-map RM-LOCAL-PBR permit 10

match ip address ACL-LOCAL-PBR

set ip next-hop 172.30.13.3

. 驗證Verify the traffic flow and PBR on Rl.

R1#ping 192.168.3.1

Type escape sequence to abort.

Sending 5 , 100-byte ICMP Echos to 192.168.3.1 , timeout is 2 seconds:

!!!!!.

Success rate is 100 percent (5/5) , round 咀trip min/avg/max = 56/57/60 ms

R1#traceroute 192.168.3.1

Type escape sequence to abort.

Tracing the route to 192.168.3.1

1 172.30.13.3 0 msec 0 msec 0 msec

2 172.30.13. 工36 msec 32 msec 32 msec

3 10.1.112.2 28 msec 28 msec 28 msec

4 172.30.24.4 28 msec 28 msec *

R1#debug ip po1icy

Po1icy routing debugging is on

Note:Enable debugging in order to see the policy match following the ping commands on pod

router R1

R1#ping 192.168.3.1

Type escape sequence to abort.

Sending 5 , 100-byte ICMP Echos to 192.168.3.1 , timeout is 2 seconds:

!!!!!.

Success rate is 100 percent (5/5) , round-trip min/avg/max = 56/58/60 ms

!

R1#

*May 24 14:28:08.341: IP: s=10.1.112.1 (loca1) , d=192.168.3.1 , 1en 100 , po1icy

match

*May 24 14:28:08.341: IP: route map RM-LOCAL-PBR , item 10 , permit

*May 24 14:28:08.341: IP: s=10.1.112.1 (loca1) , d=192.168.3.1

(FastEthernetO/O) , 1en 100 , po1icy routed

*May 24 14:28:08.341: IP: local to FastEthernetO/O 172.30.13.3

*May 24 14:28:08.401: IP: s=10.1.112.1 (local) , d=192.168.3.1 , len 100 , policy

match

*May 24 14:28:08.401: IP: route map RM-LOCAL-PBR , item 10 , permit

*May 24 14:28:08.401: IP: s=10.1.112.1 (local) , d=192.168.3.1

(FastEthernetO/O) , len 100 , policy routed

*May 24 14:28:08.401: IP: 1ocal to FastEthernetO/O 172.30.13.3

*May 24 14:28:08.457: IP: s=10.1.112.1 (local) , d=192.168.3.1 , len 100 , policy

match

*May 24 14:28:08.457: IP: route map RM-LOCAL-PBR, item 10 , permit

*May 24 14:28:08.457: IP: s=10.1.112.1 (local) , d=192.168.3.1

(FastEthernetO/O) , len 100 , policy routed

*May 24 14:28:08.457: IP: local to FastEthernetO/O 172.30.13.3

*May 24 14:28:08.517: IP: s=10.1.112.1 (local) , d=192.168.3.1 ,len 100, policy

Match

R1#ping 192.168.1.1

Type escape sequence to abort.

Sending 5 , 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds:

! ! ! ! !

Success rate is 100 percent (5/5) ,言。und-trip min/avg/max = 56/56/60 ms

R1#

*May 24 14:28:18.977: IP: s=10.1.112.1

rejected — normal forwarding

*May 24 14:28:19.033: 工P: s=10 .1. 112.1

———————————————————————————————————

LAB 6-1 & 6-2 BGP


TASK1

  1. 在 R1-R4 上 設定及啟用 BGP 協定
  2. R3 加入 BGP AS 130  ,R1 加入 BGP AS 100 ,並且在 R3 & R1 之間建立 EBGP 的 PEER 關係
  3. R3 加入 BGP AS 130  ,R4 加入 BGP AS 400 ,並且在 R3 & R4 之間建立 EBGP 的 PEER 關係
  4. R2加入 BGP AS 200  並和,在AS 100 的R1 加入 之間建立 EBGP 的 PEER 關係
  5. 在 AS200 的R2 和 加入 BGP AS 400的 R4 之間 建立 EBGP 的 PEER 關係
  6. 在 AS 130 ,100,400之間的peer 需使用 MD5 進行驗證以達到最安全的交換訊息方式
  7. 驗證所有 PEER 正確建立鄰居,及接收BGP路由更新訊息

    SOL:

    STEP 1: 在 R1-R4 使用 show ip int brief | section up 找出所有使用中的界面及IP位址

    STEP 2 : 設定基本 BGP PEER關係

R1#

router bgp 100

no synchronization

bgp log-neighbor-changes

ne 工ghbor 10.1.112.2 remote-as 200

neighbor 10.1.113.3 remote-as 130

neighbor 10.1.113.3 password cisco

no auto-summary

R2#

router bgp 200

no synchronization

bgp log-neighbor-changes

neighbor 10.1.112.1 remote-as 100

neighbor 10.1.124.4 remote-as 400

no auto-summary

R3#

router bgp 130

no synchronization

bgp log-neighbor-changes

neighbor 10.1.113.1 remote-as 100

neighbor 10.1.113.1 password cisco

neighbor 10.1.134.4 remote-as 400

neighbor 10.1.134.4 password cisco

no auto-summary

R4#

router bgp 400

no synchronization

bgp log-neighbor-changes

neighbor 10.1.124.2 remote-as 200

neighbor 10.1.134.3 remote-as 130

neigrilior 10.1.134.3 password cisco

no auto-summary

STEP3:驗證

在 R1-R4 上 使用

Rx# Show ip bgp summary

Rx# Show ip bgp neighbor

的指令檢查是否鄰居正確建立

TASK2

  1. R3利用 NETWORK 指令 宣告直連的網路 172.30.13.0/24 給之前建立的EBGP 鄰居
  2. R3 利用 REDISTRIBUT 的方式宣告 本身的 loop Back界面給 10.3.3.3/32 給PEER AS 100, 及 400
  3. 設定 R2 宣告 192.168.x.0的 網路 給鄰居的 AS, 除了宣告各別的192.168.x.0 /24 之外只要有任合
    一筆 192.168.x.0/24存在就只送出 192.168.0.0/16 的聚合網路
  4. 檢查 R1,R2,R4 是否有 172.30.13.0/24 , 10.3.3.3/32 的路由存在 ,且 R1,R3,R4 上是否有192.168.0.0/16 的路由存在(Routing Table & BGP TABEL)


Step 4 宣告BGP的網路

R3# router bgp 130
network 172.30.13.0 mask 255.255.255.0
redistribute connected route-map RM-BGP
!
ip access-l工ststandard ACL-BGP permit 10.3.3.3
!
route-map RM-BGP permit 10 match ip address ACL-BGP

R2#

router bgp 200

network 192.168.1.0

network 192.168.2.0

network 192.168.3.0

aggregate-address 192.168.0.0 255.255.0.0 summary-only

STEP 5 路由表及 BGP table驗證

在 R1,R2,R4 使用 Rx# Show ip bgp 及 sh ip route 的指令進行驗證 172.30.13.0/24 及 10.3.3.3/32 存在與否
在 R1,R3,R4 使用 Rx#show ip bgp 及 s hip route 的指令進行驗證 192.168.0.0/16是否存在

  LAB 6-2 BGP

各設備加入的 AS號碼


AS130 和 AS 100 建立 BGP PEER (R3-R1)

AS200 和 AS 100 建立 BGP PEER(R2-R1)

AS400 和 AS 200 建立 BGP PEER(R4-R2)

R3宣告172.30.13.0 /24資訊給 PEER 的 AS

R2宣告192.168.1.0 /24,192.168.2.0/24 ,192.168.3.0/24 資訊給 PEER 的 AS

更改BGP的預設選擇路徑的方式,封包由AS103送往AS200時將使用經由 10.1.131.1的路徑將被當成主要路徑,
10.1.113.1的路徑為次要路徑

建立額外的BGP PEER

SW1加入AS130 和在AS 100的R1建立 E-BGP SESSION

在AS130 的R3 和在AS 400的 R4建立 E-BGP SESSION

在AS130 的 R3和 SW 建立 i-BGP SESSION

移除AS130 R3 和 AS100 R1之間的 E-BGP PEER

檢查 EBGP 的 PEER 關係 ,及路由表中存在需要的路由 ,以及AS130的主要傳送及接收路徑
影響來自AS200 進入 AS130的路徑將偏好使用R1

SOL:

STEP1:建立基本BGP peer

R1#

router bgp 100
no synchronization
bgp log-neighbor-changes
neighbor 10.1.112.2 remoteas200
! TO R2
neighbor 10.1.113.3 remote-as 130
! TO R3
neighbor 10.1.131.3 remote-as 130
! TO R3
no auto-summary

R2#
router bgp 200
no synchronization
bgp log neighbor-changes
neighbor 10.1.112.1 remote-as 100
! TO R1
neighbor 10.1.124.4 remote-as 400
! To R4

no auto-summary

R3#
router bgp 130
no synchronization
bgp log-neighbor-changes
neighbor 10.1.113.1remote-as 100
! To R1
neighbor 10.1.131.1 remote-as 100
! To R1
no auto-summary

R4#
router bgp 400
no synchronization
bgp log-neighbor-changes
neighbor 10.1.124.2 remote-as 200
! TO R2
no auto-summary

STEP2:

RX# show ip bgp summary

RX# show ip bgp

STEP 3 宣告網路

R2#

router bgp 200

network 192.168.1.0

network 192.168.2.0

network 192.168.3.0

R3#

router bgp 130

network 172.30.13.0 mask 255.255.255.0

STEP4

RX# show ip bgp

RX# show ip route

STEP 5修正路徑

R3#

router bgp 130

neighbor 10.1.113.1 route-map RM-MED out

!影響返回的路徑,用10.1.131,1當作較佳路徑

neighbor 10.1.131.1 route-map RM-WEIGHT in

!影響傳送路徑使用10.1.131.1當作主要傳送路徑

route-map RM-WEIGHT permit 10

set weight 1000 route-map RM-MED permit 10

route-map RM-MED permit 10

set metric 1000

EIGRP Intrduce


EIGRP


Introduction

Traditional routing protocols are inherently prone to loops as they flood routing information throughout the network, hence why techniques such as Split Horizon, Poison Reverse and Hold Down timers are used. Also, traditional routing protocols have to recalculate their algorithms before advertising routes out, and each router has to do this, thereby making convergence slow.

Enhanced Interior Gateway Routing Protocol (EIGRP) is designed to give all the flexibility of routing protocols such as OSPF but with much faster convergence. In addition, EIGRP has Protocol-Dependent Modules that can deal with AppleTalk and IPX as well as IP. The advantage with this is that only one routing process need run instead of a routing process for each of the protocols. EIGRP provides loop-free operation and almost instant simultaneous synchronisation of all routers. Redistribution between EIGRP and other routing protocols is generally automatic. For example, if IGRP and EIGRP routers use the same AS number then by default routes are redistributed one to the other.

Whereas other routing protocols use a variant of the Bellman-Ford algorithm and calculate routes individually, EIGRP uses the Diffusing Update Algorithm (DUAL) (SRI International) where routers share the route calculations (hence ‘diffuse’). A router only sends routing updates as distance vectors of directly connected routes, rather than every route that is in the network. Also, the router only sends an update of a particular if a topology change has occurred to that specific route. In addition, this update is only sent to relevant neighbour routers, not to all routers. This makes EIGRP a bandwidth-efficient routing protocol. Other routing protocols have regular routing updates that contain all route information by default.

EIGRP packet delivery is handled using Reliable Transport Protocol (RTP) which ensures delivery in order using Reliable Multicast on the multicast address 224.0.0.10. EIGRP uses IP protocol number 88.

Unlike IGRP, in the IP environment, EIGRP is a Classless routing protocol since updates carry subnet mask information. Although EIGRP automatically summarises on the network boundary, it can be configured to summarise on any bit boundary. EIGRP can also be used when aggregating routes i.e. when summarising major networks.

EIGRP uses the Neighbor Table to list adjacent routers. The Topology Table lists all the learned routes to a destination whilst the Routing Table contains the best route to a destination, which is known as the Successor. The Feasible Successor is a backup route to a destination which is kept in the Topology Table.

MD5 authentication can be used to authorise EIGRP packets.

Metrics

Cisco’s EIGRP is similar to IGRP only in the sense that it uses the same metrics; Delay, Bandwidth, Reliability and Load. Be aware that the MTU is NOT used in the calculation of the metric, however the MTU is tracked through the path to find the smallest MTU.

As with IGRP, the ‘K’ values for the last three are defaulted to ‘0’. Only the military use ‘Reliability’. Most configurations use the first two metrics Delay and Bandwidth, with Bandwidth taking precedence. The metric for EIGRP is calculated by multiplying the IGRP metric by 256. So the formula used to calculate the metric is EIGRP Metric = 256*([K1*Bw + K2*Bw/(256-Load) + K3*Delay]*[K5/(Reliability + K4)]).

The default values for weights are:

  • K1 – 1
  • K2 – 0
  • K3 – 1
  • K4 – 0
  • K5 – 0

This gives the default formula of 256*(Bw + Delay) for the EIGRP metric. The term [K5/(Reliability + K4)] is completely ignored if K5 = 0! You can change the weights if you want to. However, just as with IGRP, these weights must be the same on all the routers!.

Taking the example we used when looking at IGRP, a link where the bandwidth to a particular destination is 128k and the delay is 84000 microseconds. Using the cut down formula EIGRP metric = 256*(Bw + Delay), we obtain the value 256*(107/128 + 84000/10) which gives 256*86525 = 22150400.

EIGRP Packet Format


  • Version – there has only been one version
  • Opcode – this is the EIGRP packet type:
    • 1 – Update
    • 3 – Query
    • 4 – Reply
    • 5 – Hello
    • 6 – IPX SAP
  • Checksum – this is calculated for the whole EIGRP portion of the IP datagram
  • Flags – The LSB (0x00000001) is the Init bit meaning that the route in this packet is the first in a new neighbour relationship. The next bit (0x00000002) is the Conditional Receive bit used in Cisco’s Reliable Multicasting algorithm.
  • Sequence – the 32-bit sequence number used by RTP.
  • ACK – the 32-bit sequence last heard from the neighbour. A Hello packet with a non-zero value is an ACK.
  • AS Number – the Autonomous System number of the EIGRP domain.
  • Type/Length/Value (TLV) – There are a number of TLVs, all of them begin with a 16 bit Type field and a 16 bit Length field. There then follows a number of fields that vary depending on the type as given below.
    • General TLVs
      • 0x0001 – General EIGRP parameters (applies to any EIGRP packet regardless of protocol)
      • 0x0003 – Sequence (used by Cisco’s Reliable Multicast)
      • 0x0004 – EIGRP software version, the original version being 0 and the current version being 1 (used by Cisco’s Reliable Multicast)
      • 0x0005 – Next Multicast Sequence (used by Cisco’s Reliable Multicast)
    • IP TLVs
      • 0x0102 – IP internal routes
      • 0x0103 – IP external routes
    • AppleTalk TLVs
      • 0x0202 – AppleTalk internal routes
      • 0x0203 – AppleTalk external routes
      • 0x0204 – AppleTalk cable setup
    • IPX TLVs
      • 0x0302 – IPX internal routes
      • 0x0303 – IPX external routes

The above diagram illustrates the General TLV (containing the ‘K’ values) and the IP TLVs (containing details such as the five metrics). Of most interest are the IP TLVs, and these are detailed below:

Type 0x0102 IP internal routes TLV

  • Type 0x0102
  • Length – Length of the TLV
  • Next Hop – The next hop route for this route
  • Delay – The number of 10 microsecond chunks which is the sum of delays
  • Bandwidth – 256 * IGRP bandwidth
  • MTU – The smallest MTU encountered along the route to this particular destination network.
  • Hop Count – A number between 0x00 (directly connected network) and 0xFF.
  • Reliability – A number between 0x01 and 0xFF to indicate the error rates totalled along the route. 0xFF is reliable.
  • Load – A number between 0x01 and 0xFF expressing the total load along a route where 0xFF is totally loaded.
  • Reserved – 0x0000 and not used.
  • Prefix Length – The number of bits used for the mask
  • Destination – Destination network

Type 0x0103 IP external routes TLV

  • Type 0x0103
  • Length – Length of the TLV
  • Next Hop – The next hop route for this route
  • Originating Autonomous System – The AS from where the route came
  • Tag – Used with Route Maps to track routes
  • External Protocol Metric – The metric for this route used by the external routing protocol e.g. IGRP, OSPF, RIP
  • Reserved – 0x0000 and not used.
  • External Protocol ID – identifies the external protocol advertising this particular route
    • 0x01 – IGRP
    • 0x02 – EIGRP (a different AS)
    • 0x03 – Static Route
    • 0x04 – RIP
    • 0x05 – Hello
    • 0x06 – OSPF
    • 0x07 – IS-IS
    • 0x08 – EGP
    • 0x09 – BGP
    • 0x0A – IDRP
    • 0x0B – directly connected
  • Flags0x01 means the route is an external route whereas 0x02 means that the route could be a default route.
  • Delay – The number of 10 microsecond chunks which is the sum of delays
  • Bandwidth – 256 * IGRP bandwidth
  • MTU – The smallest MTU encountered along the route to this particular destination network.
  • Hop Count – A number between 0x00 (directly connected network) and 0xFF.
  • Reliability – A number between 0x01 and 0xFF to indicate the error rates totalled along the route. 0xFF is reliable.
  • Load – A number between 0x01 and 0xFF expressing the total load along a route where 0xFF is totally loaded.
  • Reserved – 0x0000 and not used.
  • Prefix Length – The number of bits used for the mask
  • Destination – Destination network

Neighbour Discovery and Adjacencies

Neighbour discovery is achieved via the periodic use of Hello packets. The Hello Interval is every 5 seconds on LANs and fast WANs using multicast Hellos, and every 60 seconds on slow WAN links (except point-to-point sub-interfaces), using Unicast Hellos. The multicast Hello packets are sent to the multicast address 224.0.0.10 since it is not necessary to send unicast packets specifically to each neighbour. These neighbour/peer relationships only occur over primary interface addresses NOT via any secondary addresses that may be configured!

EIGRP uses Reliable Transport Protocol to provide guaranteed, ordered packet delivery to all the neighbours with mixed unicast and multicast packets. On multiaccess networks, Hellos are multicast without the requirement for Acknowledgements i.e. Unreliable Multicast. Updates on the other hand, DO require Acknowledgements. The Hellos are the only regular communication. Once a neighbour has been discovered, the router attempts to form an adjacency with that neighbour whereby routing Updates are sent.

Routing Updates are NOT regularly sent, thereby minimising bandwidth usage, instead Updates are sent when there are changes to routes, and even then, the Updates are only sent to those routers that need them. If one router requests an Update, the Update is unicast, but if a number of routers require an Update (e.g. because of a topology change), then the Update is multicast.

The Hello packet contains a Hold Time which is 3 times the Hello Interval. This Hold Time is the time that the receiving router should expect to wait before declaring the neighbour as unreachable. For most networks, this Hold Time is 3 x 5 = 15 seconds which is alot faster than traditional routing protocols Hold time (e.g. 180 seconds for RIP).

A Neighbour Table is built up and contains the following information:

  • H is the order in which the neighbours were discovered
  • IP Address of neighbour
  • Interface on which the Hello was received
  • Hold Time in seconds
  • Up Time i.e. how long the neighbour has been up
  • Smooth Round Trip Time (SRTT) – the average time in milliseconds between the transmission of a packet to a neighbour and the receipt of an acknowledgement.
  • Retransmission Timeout (RTO) – if a multicast has failed, then a unicast is sent to that particular router, the RTO is the time in milliseconds that the router waits for an acknowledgement of that unicast.
  • Queue – shows the number of queued packets.
  • Sequence Number of the last EIGRP packet received.

The SRTT indicates generally indicates the speed of the link(s) along the path to that particular neighbour. The RTO defaults to 200ms and increases if a neighbour fails to respond to a query. You can test this by clearing one neighbour and seeing the increase in the RTO on the other neighbour(s). Over time as and when updates are sent, the RTO starts to come down, this only happens if changes occur in the network since EIGRP only sends updates when changes occur.

EIGRP uses Split Horizon and Poison Reverse to ensure that routes learned on a particular interface are not re-advertised out of that same interface, or if they are, that they are advertised as unreachable. If a router has an interface with a secondary address configured say on a LAN, then other routers on that LAN will not learn of that subnet from that router because of Split Horizon being enabled (by default).

EIGRP Topology Table and DUAL

Once a neighbour relationship has been formed, called an Adjacency, the routers exchange routing update information and each router builds its own topology table. The Updates contain all the routes known by the sender. For each route, the receiving router calculates a distance for that route based on the distance that is conveyed and the cost to that neighbour that advertised the particular route. If the receiving router sees several routes to a particular network with different metrics, then the route with the lowest metric becomes the Feasible Distance (FD) to that network. The Feasible Distance is the metric of a network advertised by the connected neighbour plus the cost of reaching that neighbour. This path with the best metric is entered into the routing table because this is the quickest way to get to that network.

With the other possible routes to a particular network with larger metrics, the receiving router also receives the Reported Distance (RD) to this network via other routers. The Reported Distance being the total metric along a path to a destination network as advertised by an upstream neighbour. The Reported Distance for a particular route is compared with the Feasible Distance that it already has for that route. If the Reported Distance is larger than the Feasible Distance then this route is not entered into the Topology Table as a Feasible Successor. This prevents loops from occurring. If the Reported Distance is smaller than the Feasible Distance, then this path is considered to be a Feasible Successor and is entered into the Topology table. The Successor for a particular route is the neighbour/peer with the lowest metric/distance to that network.

If the receiving router has a Feasible Distance to a particular network and it receives an update from a neighbour with a lower advertised distance (Reported Distance) to that network, then there is a Feasibility Condition. In this instance, the neighbour becomes a Feasible Successor for that route because it is one hop closer to the destination network. There may be a number of Feasible Successors in a meshed network environment, up to 6 of them are entered into the Topology table thereby giving a number of next hop choices for the local router should the neighbour with the lowest metric fail. What you should note here, is that the metric for a neighbour to reach a particular network (i.e. the Reported Distance) must always be less than the metric (Feasible Distance) for the local router to reach that same network. This way routing loops are avoided. This is why routes that have Reported Distances larger than the Feasible Distance are not entered into the Topology table, so that they can never be considered as successors, since the route is likely to loop back through that local router.

DUAL therefore uses distance information to select the optimum routes that do not create loops. There could be a number of routers that can lead to a particular destination network with the potential for loops. DUAL uses this concept of Feasible Successor, which is a router that has a least cost path to a network and therefore does not form part of a loop since the router will not choose a path that runs back through itself again.

The Topology Table consists of the advertised metric to reach a network by a neighbour and the Feasible Distance to that destination network, via that particular EIGRP neighbour. A network could have a number of entries. Each entry will have the following information:

  • The Feasible Distance
  • Feasible Successors
  • Each Feasible Successor’s distance to the network
  • The locally calculated metric to the network via each Feasible Successor.
  • The interface on which each Feasible Successor is discovered.

For example the composite metric 327168/326912 would mean that the locally calculated metric is 327168 and the advertised Feasible Successor’s distance (RD) to the network is 326912.

For each network listed in the Topology table the one with the lowest metric is added to the Route table and the neighbour that advertises that route becomes the Successor.

Maintaining a Topology Table allows a router to make sure that all its own metrics to destination networks are larger than its neighbours, thereby avoiding routing loops. EIGRP therefore does not need Hold Down or Flush timers since loops are avoided anyway.

If a route becomes unreachable e.g. the link to the Successor fails, then the router looks in its Topology Table for another route with a lower metric than its Feasible Distance i.e. a Feasible Successor, and that one becomes the Successor. This requires no neighbour querying and is therefore very fast.

If a neighbour fails, after three failed hello messages, the router sends an update. If the backup route fails, only then does it query its neighbours for an alternate route. When route information changes, the router just sends an update about that link only, and only to the routers that need it. This is in contrast to OSPF where the whole link state database needs to be synchronised across the whole area.

In the routing table, because EIGRP relies on the Topology table for updating its routes, the routing entries can become very old. The Topology table contains the known routes and the successors for each route with each interface indicated on which the successors are connected.

By default, if there are multiple equal-cost paths to a destination the router will load share across up to four paths. Generally with most routing protocols, you can change this in the routing process with the command maximum-paths
number and have up to 6 paths. By default, on interfaces where fast switching is enabled, the router will perform per-destination load balancing. If fast-switching is turned off then all packets will be examined by the CPU and be load-balanced on a per-packet basis. The load on the CPU can be extensive. Using Cisco Express Forwarding (CEF), you can choose to load balance on a per-packet or per-destination basis with less impact on the CPU.

You can also load share over unequal cost paths. To do this we use the variance feature in the EIGRP routing process. The variance is defined with a multiplier that represents the difference between the metrics of the paths. The default variance is ‘1’ which means that the multiple paths must have the same metrics.

The DUAL Finite State Machine and Diffusing Computation

The principles of DUAL are:

  • Neighbour loss or detection occurs within a finite time.
  • Messages are correctly received and in order, within a finite time.
  • Messages are processed in the order in which they are received, within a finite time.

In a steady state situation where the Successors for each network are known and the Feasible Distances are the lowest, then each network listed in the Topology Table will be in the Passive state meaning that no diffusing calculations are being performed.

The list of Feasible Successors for a particular route will be reassessed locally if there is a change to the cost of the link, a change of state or if update, query or reply packets are received. It could be that the Feasible Distance changes, or that the Feasible Successor takes over from the existing Successor. Provided that a Feasible Successor is found, this is advertised via Updates whilst all the while remaining in Passive state. The idea with this is that if a topology change occurs, the router should be able to find an alternate route without having to recompute the route.

If no neighbour exists with a metric for a particular network that is less than the Feasible Distance, i.e. no Feasible Successor exists, then the local router goes into Active state and queries its neighbours for routing information. If no Feasible Successor is available for a route, then a Diffusing Computation must be implemented, thereby slowing down re-convergence. The local router sets a Reply Status flag to track all the queries to its neighbours.

When performing the Diffusing Computation, queries are sent to all the neighbours and these contain the new locally calculated distance for the network. If a neighbour has Feasible successors, it will recalculate its own local distance to the network and send this back. If a neighbour does not have a Feasible Successor, then it will itself move into Active state.

The originating router does not consider the Diffusing Computation to be complete until replies have been received from all the neighbours. There is an Active Timer that has a default value of 3 minutes. This timer is used to time how long it takes to perform the Diffusing Computation. On a large network where a chain of routers may end up performing the Diffusing Computation, it may be a while before the originating router completes. If all the replies are not received within this 3 minutes, then the route is said to be Stuck-in-Active (SIA). The neighbour involved is removed from the neighour table and the metric for that route set to infinity so that another neighbour can meet the Feasibility Condition and become a Feasible Successor. If an EIGRP network is particularly large, or there are a number of low bandwidth links such that it takes a while for replies to get back, then those neighbours that have yet to reply have their Reply Status flag set. If no reply is received from a particular neighbour before the Active timer times out, then the neighbour will be removed from the neighbour table. If a reply DOES come back after the Active timer has timed out then the neighbour gets reinstated. This disappearance and reappearance of neighbours acts to cause extra Diffusing computations and extra changes to the routing table. Examining the Topology tables of the routers as you chase the SIA neighbour entries helps to track the issues causing the SIA.

Using DUAL, routers maintain up to six backup routes in case the main one fails, and this is carried out by storing neighbour’s routing tables. Using the DUAL Finite State Machine results in very fast convergence as it keeps track of all routes advertised by all neighbours.

Iscsi mpio

在ESXi 5.0之前的版本中,要想實現完整的iSCSI MPIO(容錯/負載均衡),需要通過複雜的命令列才能實現。
在ESXi 5.0中,可以通過圖形管理介面來簡單的實現。
步驟:

1 首先,新增一個iSCSI-1 VMKernel (同時會新建一個vSwitch2),(本案例使用vmnic2/vmnic3兩張物理網卡)


9-27-2011 17:27:22 上传

下载附件 (72.99 KB)


9-27-2011 17:27:23 上传

下载附件 (66.8 KB)


9-27-2011 17:27:24 上传

下载附件 (59.8 KB)

2 在vSwitch2中,再添加一個iSCSI-2 VMKernel


9-27-2011 17:27:25 上传

下载附件 (80.8 KB)

然後會得到這樣一個配置的vSwitch2


9-27-2011 17:27:26 上传

下载附件 (21.41 KB)

3 在vSwitch2中,編輯iSCSI-1 VMKernel的屬性,在NIC Teaming下的Override switch failover order處打上勾,
然後將vmnic2設為Active Adapters, vmnic3設為Unused Adapters


9-27-2011 17:27:28 上传

下载附件 (106.95 KB)

同樣的方法編輯iSCSI-2 VMKernel的屬性,在NIC Teaming下的Override switch failover order處打上勾,
這裡要注意,要將vmnic3設為Active Adapters, vmnic2設為Unused Adapters


9-27-2011 17:27:29 上传

下载附件 (97.59 KB)

到此,iSCSI VMKernel設置完成。

4 創建Software iSCSI Adapter(iSCSI Initiator)
在ESXi 5.0中,默認是不存在Software iSCSI Adapter的,沒關係,可以在Storage Adapter中創建一個


9-27-2011 17:27:12 上传

下载附件 (58.13 KB)

 


9-27-2011 17:27:21 上传

下载附件 (23.14 KB)



9-27-2011 17:27:21 上传

下载附件 (78.17 KB)

5 然後在iSCSI SAN中給予此iSCSI Initiator訪問共用vmfs lun的存取權限。
然後在此Software iSCSI Adapter(vmhba35)的屬性中設置iSCSI LUN的連結。


9-27-2011 17:27:30 上传

下载附件 (33.61 KB)


9-27-2011 17:27:31 上传

下载附件 (46.41 KB)

6 在Software iSCSI Adapter(vmhba35)的屬性中設置Network Configuration,將 iSCSI-1和 iSCSI-2加入到其中


9-27-2011 17:27:32 上传

下载附件 (84.48 KB)


9-27-2011 17:27:33 上传

下载附件 (95.36 KB)

然後Rescan All Storage … 添加上分配的LUN, 這是可以看到Patch Status由原來Not used變為了Active.


9-27-2011 17:27:34 上传

下载附件 (82.66 KB)

到此,只實現了 iSCSI MPIO的容錯功能,要實現負載均衡,繼續一下步

7 打開iSCSI Storage的屬性,點擊右下角的Manager Paths…


9-27-2011 17:27:36 上传

下载附件 (111.93 KB)

可以看到默認的Path策略是Fixed(VMWare) – 【固定】,
在下面的路徑資訊中可以看到路徑C1的Status為Active(I/O),
並在Preferred(首選)中標注了*, 而路徑C0的Status為Active,
Preferred中沒有標注*這個策略是不能實現負載均衡的.


9-27-2011 17:27:37 上传

下载附件 (102.46 KB)

將策略改為Round Robin(VMWare) – 【迴圈/輪轉】


9-27-2011 17:27:37 上传

下载附件 (107.03 KB)

修改完成後可以看到:路徑C1和C0的Status都為Active(I/O),Preferred中都沒有標注*


9-27-2011 17:27:38 上传

下载附件 (77.51 KB)

至此,設置基本完成,測試一下多個VM的I/O,可以看到由原來的集中於vmnic2的I/O,現在平均分佈到
vmnic2/vmnic3兩者當中。


9-27-2011 17:27:35 上传

下载附件 (82.05 KB)


9-27-2011 17:27:39 上传

下载附件 (89.5 KB)


9-27-2011 17:27:11 上传

下载附件 (93.17 KB)

鏈路負載均衡策略除了以上的基本設置,還可以通過2個主要參數進行細調,
以符合不同的要求或環境。調整Round Robin策略通過命令列進行操作:

設置完預設的Round Robin策略後,以命令列模式執行

esxcli storage nmp device list

可以看到Round Robin策略的默認設置,其中紅字處標明了當前啟用的策略及其應用參數:
naa.6000eb38732d44470000000000000027
Device Display Name: LEFTHAND iSCSI Disk (naa.6000eb38732d44470000000000000027)
Storage Array Type: VMW_SATP_DEFAULT_AA
Storage Array Type Device Config: SATP VMW_SATP_DEFAULT_AA does not support device configuration.
Path Selection Policy: VMW_PSP_RR
Path Selection Policy Device Config: {policy=rr,iops=1000,bytes=10485760,useA NO=0;lastPathIndex=0: NumIOsPending=2,numBytesPending=36864}

Path Selection Policy Device Custom Config:
Working Paths: vmhba35:C0:T00, vmhba35:C1:T00

VMW_PSP_RR說明當前啟用了Round Robin策略
2個主要的參數 iops=1000, bytes=10485760
前者限定在進行1000次io操作後切換到下一個路徑,後者限定在發送10485760位元組的資料後切換到下一個路徑
可以通過以下命令列來修改這2個參數的值,以符合不同的要求或環境。

修改iops參數:
esxcli storage nmp psp roundrobin deviceconfig set –type=iops –iops 888 –device naa.xxxxxxxxxxxxxxxxxx

修改bytes參數:
esxcli storage nmp psp roundrobin deviceconfig set –type “bytes" -B 12345 –device naa.xxxxxxxxxxxxxxxxxx

iSCSI LUN的UUID(naa.xxx)可以通過命令: esxcli storage core path list 獲取

有很多人關心Jumbo Frames的設置,那就補充一下:
要設置 Jumbo Frames,打開連接iSCSI SAN的vSwitch(vSwitch2)的屬性,在這裡你可以針對整個vSwitch2(All Port)
做JF修改,也可以只針對其中所有設置了MPIO的iSCSI VMkernel(port group)做JF修改。


9-28-2011 10:45:03 上传

下载附件 (52.78 KB)


9-28-2011 10:45:02 上传

下载附件 (62.16 KB)

注1:要能實際啟用Jumbo Frames,整個iSCSI鏈路的所有連接設備(網卡/OS or Hypervisor/交換機/存儲端)都要支援和啟用JF,
才能實現效果。另外,不是所有的設備或環境下啟用Jumbo Frames都能帶來很大性能的提升,建議以自己的評估測試結果
來決定是否啟用。

注2:另外要提醒一點,如果VM中設置了MSCS群集服務,MSCS不能通過設置為Round Robin策略
的路徑來連接MSCS共用盤,否則會出現I/O錯誤。

VM VCB & VDR Collection

VM Backup

 

淺談VMWare虛擬環境架構下的備份方式

VMware虛擬環境架構中,常見的備份主要有四種,分別為:傳統備份方式、VMware

Consolidated Backup (VCB)VMware Data Recovery (VDR)、儲存裝置備份方式。

傳統備份方式:

這種備份方式是將每一個虛擬機器當作實體機器來看待,在每個虛擬機器中安裝所需要的

備份代理程式,並透過既有的成熟備份方案進行作業。優點:

1. 可沿用過去所使用的備份解決方案。

2. 減少資訊管理人員額外的備份教育訓練需求。

缺點:

1. 因為需要在每個虛擬機器安裝備份代理程式,傳統的計價方式可能會造成成本過高。

2. 備份時將嚴重影響線上機器的運作效能(包含其他在同一部實體主機上的虛擬機

器)。

3. 無法充分利用HADRSvMotion等技術帶來的好處。

4. 還原可靠度備受考驗,需不斷進行災害復原演練確保還原作業可行。

 

 

VCB備份方式:

VMware Consolidated Backup (VCB)VMWare所提供的一組Framework,可透過第三方備

份軟體(如:Symantec Back EXEC 2010Vizioncore vRanger ProVeeamPHD

esXpress)或VCB指令,並結合虛擬機器快照及FC / iSCSI傳輸技術來進行備份作業。

其備份動作簡述如下:

1. 凍結虛擬機器,並進行應用程式一致性備份(VSS)

2. 進行虛擬機器快照作業。

3. 解凍虛擬機器。

4. 將快照檔案載入至備份代理伺服器。

5. 執行備份作業。

6. 移除虛擬機器快照檔案。

 

VCB

 

使用VCB備份方式帶來的優點很多,簡述如下:

1. 透過備份代理伺服器,可減低ESX主機的負載(甚至可達到零負載)。

2. 不需要在每個虛擬機器上安裝備份代理程式,可減輕管理負擔及減少軟體授權費用。

3. 透過SAN的傳輸,可大幅減少備份時的網路負載。

4. 可做到映像層級及檔案層級的備份,亦即可完整備份整個系統,也可還原單一檔案。

5. 減少備份所需的時間。

依照系統架構的不同,VCB運作的方式可分為三種,分別為SAN模式、Hot Add模式、

NBD模式,簡述如下:

 

VCB SAN模式:

1. 需要有SAN儲存裝置架構。

2. 備份代理伺服器直接透過FC / iSCSI讀取SAN資料內容。

3. 效能最高、系統負載最小、不會產生額外網路流量


 

 

VCB Hot Add模式:

1. 使用虛擬機器作為備份代理伺服器。

2. 無需將儲存裝置的LUN對應到備份代理伺服器。

3. 可備份該ESX主機上的本機磁碟區及NAS存放裝置(如需備份多台ESX主機上的儲存

裝置,需在各ESX主機上安裝備份代理伺服器)。

4. 會消耗ESX主機資源,備份效能低於SAN模式。

簡單說明如下圖:



VCB NBD模式:

1. SAN儲存裝置架構。

2. 透過網路進行備份傳輸(支援加密傳輸模式)。

3. 備份代理伺服器可安裝於實體機器或虛擬機器。

4. 效能低於SAN模式及Hot Add模式,但仍高於傳統備份方式。

 


 

 

VDR備份方式:

VMware Data Recovery (VDR)VMWarevSphere開始加入的一項備份軟體。

提供於vSphere Essentials PlusAdvancedEnterpriseEnterprise Plus,其備份原理類似於

VCB,支援100個虛擬機以下的備份,適合於中小型的虛擬環境中使用。

VDR為運作於虛擬環境中的虛擬主機,透過VMWare提供的OVF格式進行安裝佈署,其作

業系統平台為CentOS Linux

優點如下:

1. 無需額外的軟體及備份代理程式費用,很適合中小型環境使用。

2. 虛擬機器無需安裝任何備份代理程式。

3. 支援增量備份方式(強制啟用)。

4. 整合vCenter Server排程備份作業。

5. 提供資料重複刪除技術(磁碟映像等級)。

6. 可進行檔案層級還原(實驗階段,僅支援Windows平台)。

缺點如下:

1. 只支援本機、NAS儲存裝置、SAN儲存裝置,不支援磁帶備份。

2. 至多同時支援兩個目標儲存區。

3. 目標儲存區容量限制(網路磁碟500GB、本機磁碟1TB)。

4. 只支援vSphere主機,無法支援ESX 3.5主機。

儲存裝置備份方式:

透過SAN儲存裝置的複寫機制進行備份,如NetAPP SnapMirrorIBM Enhanced Remote

MirroringMetro Mirror等,透過此種備份方式可達到最佳的備份效能,並能透過VMWare

Site Recovery Manager完成異地備援架構。

 

儲存裝置備份一般分為三種方式,簡述如下:

同步複製模式:

1. 主站點需收到遠端站點的I/O回報後,才算完成整個I/O作業。

2. 同步模式適用於高度資料保全要求或機房內部使用,此模式不會產生資料遺失。

3. 因同步模式需等待遠端站點的I/O回報,因此整體運作效能較低,也會受限於頻寬及

距離的限制。

 

非同步模式(無一致性):

淺談VMWare虛擬環境架構下的備份方式 « SaSa技術隨筆手札頁 4 / 6

1. 主站點完成I/O後即算完成整個I/O作業,不需等待遠端站點的回報。

2. 非同步模式適用於大多數的情況。

3. 不保證備援端與主站點有相同的I/O順序。

4. 非同步模式斷線時可能會造成部分資料遺失,需視網路頻寬及距離而定。

5. 非同步模式整體效能高於同步模式,亦較不受頻寬及距離的限制。

 

非同步模式(一致性):

1. 其運作方式與非同步模式(無一致性)相同,差別在於可保證備援端與主站點有相同

I/O順序。

 

Good Article For SNAPSHOT NOTES

大家在用虛擬機器的時候最最看重可能就是虛擬機器的快照功能了,做個快照,然後隨便開始整就算系統壞了,在用快照恢復一

下就OK了,多好的技術呀。但是請記住快照不等於備份,千萬不要把快照當作備份。

 

當虛擬機器開著時,快照提供了一個備份原始VMDK檔的好辦法。所有的寫入操作在原始檔上暫停了,因此,複製它在另

一個存儲卷很安全。這就是像
VMware Consolidated BackupVizioncorevRanger功能那樣的備份應用。它們給虛擬機器進

行快照、備份磁片檔並在完成時刪除快照。

 

諸如VMBK這樣的腳本也提供這種功能。這些程式允許複製VMDK檔到本機存放區或網路共用以提供另一種恢復重要虛擬機器

的方法。

 

只有一個快照的虛擬機器在刪除快照時不需要額外的磁碟空間。不過如果你有許多快照,當刪除所有快照時,你將需要額外的

磁碟空間。這是由於這些快照要合併到原始磁片檔

 

例如,假設你要刪除有三個快照的虛擬機器上的所有快照,我們稱它們為快照1、快照2及快照3。首先,快照3將合併到快

2,快照2的大小將增加。接下來,快照2合併到快照1,快照1的大小也將增加。最後,快照1將合併到原始磁片檔,這

不需要額外的磁碟空間。當原始磁片檔在整個操作結束時更新,快照檔被刪除,而不是每個合併過程時刪除。因此,當

刪除它們時,擁有20GB快照檔的虛擬機器可能需要額外的20GB
( NEW Method When delete all snaopshots all delta direct copy to Base Image)

 

如果你有一台低磁碟空間的ESX主機,這將用光所有可用的磁碟空間,並且阻止你刪除快照。

使用較少額外磁碟空間來刪除多個快照的解決辦法是一個一個刪除它們,從虛擬機器父級快照開始到子級。使用這種方法,當

快照被合併到先前的快照,只有先前快照增加了,然後刪除。這個方法雖然沉悶,但不需要較多的額外磁碟空間。

注意:當虛擬機器有一個快照運行時,不要運行Windows磁片磁碟重組。磁碟重組操作改變許多磁片塊並能引起快照檔急

速增加。

 

多長時間刪除快照當使用VMware Infrastructure ClientVI Client)刪除快照時,這個任務狀態列容易使人誤解。一般來說,任務狀態跳

95%完成率時應該很快完成,不過能注意到它在95%一直不動,直到整個刪除過程完成。VirtualCenter15分鐘的超時時

間。因此,就算你的檔仍然在刪除,VirtualCenter將報告這個操作超時. 找到任務完成的方法是使用VI Client裡的資料存

儲流覽器查看虛擬機器目錄。當delta檔消失了,你就知道快照刪除完成了。

活動了很長時間的快照(因此變得很大)在刪除時需要很長時間。快照刪除需要的時間的變化取決於虛擬機器活動等級;當關

閉虛擬機器時,刪除時間短。ESX主機上的磁片子系統活動數量也能影響快照刪除時的時間。100GB的快照需要36小時合併

到原始磁片。

使用ESX 3.5的話,由於整合演算法的變更,將需要更長的時間。這將影響虛擬機器和ESX主機的性能。正因如

此,你應該限制保留快照的時間長度,在你不需要它們時就刪除。

快照和遠資料鎖定影響ESX性能

快照對ESX主機和虛擬機器的影響有幾種方式。當你第一次創建一個快照時,虛擬機器活動將暫時停止;當創建快照時,如果虛

擬機響了,你將注意到超時。同樣,創建快照引起中繼資料更新,將導致SCSI預留衝突以致鎖定LUN(邏輯單元號)。結果,

在一小段時間裡,LUN只能在ESX Server主機上可用。

如果你創建了個虛擬機器快照並運行虛擬機器,這個快照是活動的。如果這個快照是活動的,由於ESX有區別地寫入delta檔,
不如寫入標準的
VMDK檔那樣有效率,虛擬機器性能將降低。由於中繼資料鎖定了,當一個寫入到磁片時,其他的都不能寫入
delta文件。

同樣,隨著delta檔以每個
16MB增量增加,將引起另一個中繼資料上鎖。這能影響虛擬機器和ESX主機。
性能影響有多大取決於虛擬機器和ESX主機有多繁忙。

最後,刪除一個快照也創建一個中繼資料鎖定。另外,當delta檔正被commit時,你正刪除的快照將造成虛擬機器性能的大幅

度下降。如果虛擬機器非常繁忙,這將很容易看到。為避免這個問題,最好在主機伺服器不繁忙的閒時刪除大的或多個快照。

當快照運行時不要擴充磁片檔

 

當一個快照是活動的時候不能擴充虛擬磁片。在ESX 3.0.x,你只能使用vmkfstools——X command擴充磁片;不過,當你試

圖擴充磁片時,這個指令不會警告你磁片擁有快照。你也可以通過VI Client擴充虛擬磁片,VI Client允許你使用快照擴充磁

盤。VI Client將成功地報告任務完成,不過實際上卻沒有擴充磁片檔。

當一個快照活動時,如果你使用vmkfstools擴充虛擬磁片,虛擬機器將不再工作並出現錯誤:不能打開磁片‘.vmdk’或在它之

上的一個快照磁片。

拒絕虛擬磁片使用快照如果你的一台虛擬機器有多個磁片,你希望拒絕一個磁片使用快照,你必須通過改變磁片模式為獨立來

編輯虛擬機器設置。獨立設置能讓你獨立地控制每個磁片的功能,磁片檔和構造沒有區別。一旦一個磁片是獨立的,它將不

包括任何快照。

另外,你將不能在擁有獨立磁片的虛擬機器上包括存儲快照。這麼做是為了保護獨立的磁片,萬一你恢復到先前的有存儲狀態

的快照,有一個寫入獨立磁片的應用在運行。當其他磁片在恢復時,由於這個獨立磁片沒有恢復,在它上面將有潛在的損壞

數據。


 

vSphere Data Protection replaces VDR with vSphere 5.1

vSphere Data Protection replaces VDR with vSphere 5.1

This new backup product replaces VMware Data Recovery, which has been introduced in vSphere 4.0 and which will still be supported. But from vSphere 5.1 the vSphere Data Protection (VDP) is going to be The Backup product bunled with vSphere.

The VDP has the most of the code from EMC’s Avamar backup product and in fonctionnalities. It’s has more or less the same functions as VDR, (no fancy “Run VM from backup") but much more robust than VDR, and including features that can even rollback the appliance to previous point in time. The backup limit per appliance is 2 Tb and you can have up to 10 VDP appliances managed by single vCenter with tight integration into the New vSphere 5.1 Web Client.

It’s agent-less and disk based backup architecture, which uses vSphere API for Data protection (VADP) with Changed Blocks tracking (CBT) … like VDR does, but there is also some Avamar goodnes there. The appliance uses an EMC’s Avamar variable-length segment de-duplication engine to optimize backup and recovery times. De-duplication is used not only within each VM, but across all backups jobs and all VMs being backed up by the VDP appliance.

Initial backups take a fair amount of time, but subsequent backups can be as little as a few minutes depending on the number of changes that have occurred since the last backup. CBT tracks the changes made to a VM at the block level and provides this information to VDP so that only changed blocks are backed up. VMware Tools on Windows VMs are using Volume Shadow Copy Service (VSS) components to assist with guest OS and application quiescing when backing up Windows VMs.

What are the new functionality and how the product is delivered to the end user?

The VDP is a virtual appliance which is available in 3 sizes for the destination datastores, which will be as in the case of VDR, be used as a deduplication store, to store the backups. So the destination datastore can be configured in 3 sizes:

– 500Gigs, 1Tb, 2Tb

The actual virtual appliance which runs the Suse Linux Enterprise Server 11 (SLES) runs with 4 vCPU and 4 Gigs of RAM. During the deployment process, the thick disks are used, and those disks consume 850 GB (3 .vmdk files), 1600 GB (7 .vmdk files), and 3100 GB (13 .vmdk files) respectively. To create the necessary deduplication destination datastore, which will be used later for the target of the backup jobs.

The VDP appliance can be managed only by vCenter Server 5.1 through web client. VMware is shifting away of the “thick" client so the management of backups through the vSphere Client is possible only through the new vSphere Web Client. And there is no plugin for the “thick" client anymore…. Curiously, the plugin for vSphere Update manager (VUM) hasn’t been released at the same time, but AFAIK the integration of VUM will follow in the days to come.


It’s possible to make a backup of powered Off VMs, since no agent is installed inside of backed up VMs.

The management through web clientrelaying on Flash – good or bad – The management of the appliance is only possible through supported browsers. Currently supported browsers: IE 7, 8 on Windows. Firefox 3.6 and higher on Windows or Linux. Adobe Flash is required, it means that MAC iOS users can’t manage this backup solution (unless they Install VMware Fusion and Windows or Linux VM).

Update: The MAC users can of course use alternate browser supporting Flash plugin. (Firefoex, Chrome).. I’m using Chrome, because ist’s so fast.

The Backup/Restore/Schedulling Possibilities – The Possibilities are about the same as we use to have with VDR, but the product seems to me more robust…. more professional looking and hopefully more reliable than VDR was.

The Sizing of the VDP’s has to be done before the deployment – When deploying the solution, you must think before on what size you’ll need at the destination deduplication datastore since this size cannot be changed later. The same as in VDR.

Here is a screenshot what it looks like just after the deployment of the appliance. The “maintenance mode".


Backup/restoration jobs and scheduling – those tasks are Wizard driven and permits the configuration of backup job. In the UI There are containers such as data centers, clusters, hosts, folders, etc. An individual VMs can be selected for backup. If new VMs are added to a container that is currently backed up (backup job has already been configured), these new VMs will automatically get backed up on the next run of the backup job.


The restore operations – to restore a VM, it seems that the UI stays fairly similar (if not the same) with VDR. There is possibility to restore full VM or FLR (file level restore), by selecting the restore point. Also wizard driven, it’s necessary to provide a name for the restored VM and a location. There is checkbox which enables to select the original location as a restore location.

But again, compared to VDR, the product seems just more mature and more robust, giving you for example more choices when restoring individual files from VM image.

There are some requirements for the FLR though, like the VMware Tools installed inside of the VMs and the file Systems supported (currently Windows NTFS and Linux LVM, Ext 2, Ext 3 and basic disks – non-extended).


Monitoring restore jobs – there is a possibility to monitor restore jobs, by clicking the Monitor Resources button, and see the progress of the restore operations.

8 mount points mounted simultaneously – another thing is that you can mount more than one restore point simultaneously (eight maximum), which can helpful if you are not sure of the exact version/date of the file you need to restore.


Advanced Login Possibilities – 2 ways of login (basic and advanced). The basic login uses local credentials only. The basic login can be used by owners of the VM for example to restore the files inside of that particular VM only.

As for the advanced login, the admin has the possibility to restore files from a VM elsewhere. The advance login requires credentials with administrative permissions on the local machine and credentials with administrative permissions on vCenter Server.

Locking and unlocking backup images – this might be useful for keeping restore points for archiving purposes. The restore point is kept even the retention policy says that the restore point should be deleted.


Reporting capabilities – The VDP has a reporting TAB which provides several pans, which shows each detailed information about the appliance’s status, the status of the backup jobs, the storage capacity, the success (and failures) of backup/restoration jobs.

There are possibility to create filters on specific criterias like VM, last backup date, last backup job occurred within x number of days, etc.


E-mail Reporting – the application provides e-mail reporting capability, which can be schedulled daily at specific time. You can also change the default English language to specific locale (which is pretty nice for customers wishing to receive this information in french, Dutch, or Japanese language).

Backup and Maintenance window – the backup window (Green) runs by default from 8:00 PM to 8:00 AM, the blackout window (Black) blackout window runs from 8:00 AM to 11:00 AM, and the maintenance window (yellow). During backup window the backup jobs can run only. The jobs starts at the beginning of backup window automatically (up to 8 jobs simultaneously – per appliance). If the job overlap the backup window, the job fails.

When the VDP appliance is first deployed and configured, the maintenance services are disabled for the 24-48 hours. This allows for a longer backup window to support the initial backups, which are full backups.

– What is the Blackout Window? – During the blackout window the Garbage collection deletes orphaned chunks of data that are no longer references within any backups on the system. Only restores can be executed, but no other (including administrative) activity can be performed.

Maintenance window – there are integrity checks, which progress is stored in VDP appliance itself. If the process has not finished at the end of maintenance window, it will be picked up the next day, where it left off. You can also force the Integrity checks manually, but obviously the tasks are Full Integrity Checks.


The Integrity checks which runs in the maintenance window are verifying the integrity of deduplication stores. are two types:

– Full: Checks the entire de-duplication store.
– Incremental: Checks the checkpoints since the last full or incremental integrity check.

VDP Rollback and Checkpoints – this feature that I mentioned at the beginning, helps you (if needed) to restore the appliance to the previous point in time (like in windows, the system restore application).


The VDP appliance uses EMC’s Avamar deduplicaiton technology which should perform more smoothly and more efficiently than the VDR. The VDR will still be supported but further developpement was stopped.

I haven’t seen any way to import existent jobs or deduplication stores into VDP….. Any suggestions here from VMware? Are the thousands of customers left to themselves here? Is the only way to setup the new product by re-creating new jobs for your virtual infrastructure?

In my opinion, VMware did a good job here to replace the VDR, since there has been quite a problems with the stability and reliability of VDR.

VMware vSphere 5.1 – More about VMware vSphere 5.1 news from the launch

vSphere 5.1 – New features and enhancements