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

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.

轉BFD white Paper

BFD技術白皮書

BFD技術白皮書

關鍵字:BFD

摘要:BFD是用來實現快速故障檢測的標準協定。本文對BFD技術實現和典型組網應用進行介紹。

術語:

欄位 英文全名 中文解釋
BFD Bidirectional Forwarding Detection 雙向轉發檢測
UDP User Datagram Protocol 使用者資料包通訊協定

目  錄

1 概述… 3

1.1 產生背景… 3

1.2 技術優點… 3

2 BFD技術實現… 3

2.1 BFD實現簡介… 3

2.2 BFD訊息… 5

2.2.1 BFD控制訊息… 5

2.2.2 BFD Echo訊息… 6

2.3 BFD會話連接建立… 7

2.4 計時器協商… 8

2.5 故障檢測… 9

3 典型組網應用… 10

3.1 路由式通訊協定與BFD聯動典型組網應用… 10

3.2 快速重路由與BFD聯動典型組網應用… 10

4 參考文獻… 10

1  概述

1.1  產生背景

為了保護關鍵應用,網路中會設計有一定的額外的備份鏈路,網路發生故障時就要求網路設備能夠快速檢測出故障並將流量切換至備份鏈路以加快網路收斂速度。目前有些鏈路(如POS)通過硬體檢測機制來實現快速故障檢測。但是某些鏈路(如乙太網鏈路)不具備這樣的檢測機制。此時,應用就要依靠上層協議自身的機制來進行故障檢測,上層協定的檢測時間都在1秒以上,這樣的故障檢測時間對某些應用來說是不能容忍的。
某些路由式通訊協定如OSPF、IS-IS雖然有Fast Hello功能來加快檢測速度,但是檢測時間也只能達到1秒的精度,而且Fast Hello功能只是針對本協議的,無法為其它協定提供快速故障檢測。

1.2  技術優點

BFD協議就是在這種背景下產生的,提供了一個通用的標準化的介質無關和協定無關的快速故障檢測機制。具有以下優點:

對網路設備間任意類型的雙向轉發路徑進行故障檢測,包括直連物理鏈路、虛電路、隧道、MPLS LSP、多站路由路徑以及單向鏈路等。

可以為不同的上層應用服務,提供一致的快速故障檢測時間。提供小於1秒的檢測時間,從而加快網路收斂速度,減少應用中斷時間,提高網路的可靠性。

2  BFD技術實現

2.1  BFD實現簡介

BFD在兩台網路設備上建立會話,用來檢測網路設備間的雙向轉發路徑,為上層應用服務。BFD本身並沒有鄰居發現機制,而是靠被服務的上層應用通知其鄰居資訊以建立會話。

會話建立後會週期性地快速發送BFD訊息,如果在檢測時間內沒有收到BFD訊息則認為該雙向轉發路徑發生了故障,通知被服務的上層應用進行相應的處理。下面以OSPF與BFD聯動為例,簡單介紹會話工作流程。

1. BFD會話建立流程


圖1 BFD會話建立流程圖

(1) OSPF通過自己的Hello機制發現鄰居並建立連接;

(2)OSPF在建立了新的鄰居關係後,將鄰居資訊(包括目的地址和源
位址等)通告給BFD;

(3) BFD根據收到的鄰居資訊建立會話。


2. BFD故障發現處理流程


圖2 BFD故障發現處理流程圖

(1)被檢測鏈路出現故障;

(2)BFD檢測到鏈路故障,解除BFD鄰居會話;

(3) BFD通知本地OSPF程序BFD鄰居不可達;

(4) 本地OSPF程序中斷OSPF鄰居關係

BFD有兩種操作模式:非同步模式和查詢模式。

目前Comware只支援非同步模式。在此模式下,會話兩端週期性地
發送BFD控制訊息,根據是否能收到對端的BFD控制訊息來檢測會
話狀態。

另外,Comware還支援回聲功能。回聲功能啟動後,會話的一端
週期性地發送BFD Echo訊息,對端不對此訊息進行處理,而只將
此訊息轉發回發送端。根據發送端是否能收到BFD Echo訊息來檢
測會話狀態。

BFD會話的兩端可能是在直連網段(即IP訊息的一跳),也可能
是在不同網段。回聲功能只可以檢測直連網段故障,即BFD Echo
訊息是單站發送;而BFD控制訊息可以檢測直連網段和非直連網段
的故障,即BFD控制訊息可以是單站或多站發送。


2.2  BFD訊息

2.2.1  BFD控制訊息

BFD控制訊息包括強制部分和可選認證部分。

強制部分格式如圖3:


圖3 BFD控制訊息

可選認證部分格式如圖4:


圖4 BFD控制訊息(認證部分)

BFD控制訊息各欄位含義如表1:

表1 BFD控制訊息各欄位含義

欄位 含義
Vers BFD協議版本號,目前版本號為1
Diag 診斷碼,表明發送方最近一次會話Down的原因
Sta 發送方BFD會話當前狀態,取值為:0代表AdminDown,1代表Down,2代表Init,3代表Up
P 會話參數變化時置位
F 如果收到的BFD控制訊息P欄位置位,則將下一個發送的BFD控制訊息的F欄位置位作為應答
C 該欄位置位表明BFD的實現是獨立於控制平面的
A 該欄位置位元表明訊息包含認證部分,會話需要進行認證
D 該欄位置位元表明發送方希望以查詢模式運行,不置位元元表明不希望以查詢模式運行或不支援查詢模式
R 保留位,發送時設為0,接收時忽略該欄位
Detect Mult 檢測時間倍數
Length BFD控制訊息長度,單位為位元組
My Discriminator 發送方產生的一個唯一非0值,用來標識不同的BFD會話
Your Discriminator 如果已經收到會話鄰居發送的BFD控制訊息則該值為收到訊息中的My Discriminator,否則為0
Desired Min TX Interval 發送方支援的最小BFD控制訊息發送時間間隔,單位為微秒。
Required Min RX Interval 發送方支援的最小BFD控制訊息接收時間間隔,單位為微秒
Required Min Echo RX Interval 發送方支持的最小BFD Echo訊息接收時間間隔,單位為微秒。為0表示不支持BFD Echo訊息
Auth Type 認證類型
Auth Len 可選認證部分長度,包括Auth Type和Auth Len欄位,單位為位元組

BFD控制訊息采用UDP封裝,目的埠號為3784,源埠號在4915265535的範圍內。

2.2.2  BFD Echo訊息

BFD Echo訊息提供了一種不依賴於BFD控制訊息的故障檢測方法。本端發送本端接收,遠端不對訊息進行處理,而只是將此此訊息在反向通道上返回。因此BFD協議並沒有對BFD Echo訊息的格式進行定義,唯一的要求是發送方能夠通過訊息內容區分會話。

BFD Echo訊息采用UDP封裝,目的埠號為3785,目的IP位元址為發送介面的位址,來源IP位元址由配置產生(配置的來源IP位元址要避免產生ICMP重新定向)。

2.3  BFD會話連接建立

  說明:

下面僅介紹通過發送控制訊息來建立會話並進行故障檢測的過
程。

BFD會話建立前有主動被動兩種模式。如果一台設備為主動模式,那麼在會話建立前不管有沒有收到對端發來的BFD控制訊息,都會主動發送BFD控制訊息。如果一台設備為被動模式,那麼在會話建立前就不會主動發送BFD控制訊息,直到收到對端發來的BFD控制訊息才發送。

要建立BFD會話的兩端中至少要有一端為主動模式才能成功建立起會話。下面對兩端都為主動模式的會話建立過程進行說明,一端主動模式一端被動模式的會話建立過程基本相同。


圖5 BFD會話連接建立

BFD使用三向握手的機制來建立會話,發送方在發送BFD控制訊息時會在Sta欄位填入本地當前的會話狀態,接收方根據收到的BFD控制訊息的Sta欄位以及本地當前會話狀態來進行狀態機的遷移,建立會話。

              Router A和Router B的BFD收到上層應用的通知後,發送狀態為DOWN的BFD控制訊息。Router B的BFD狀態變化同Router A。

              Router B收到對端狀態為DOWN的BFD控制訊息後,本地會話狀態由DOWN遷移到INIT,隨後發送的BFD控制訊息中將Sta欄位填為2表明會話狀態為INIT。Router A的BFD狀態變化同Router B。

              Router A收到對端狀態為INIT的BFD控制訊息後,本地會話狀態由INIT遷移到UP,隨後發送的BFD控制訊息中將Sta欄位填為3表明會話狀態為UP。Router B的BFD狀態變化同Router A。

              BFD雙方狀態都為UP,會話成功建立並開始檢測鏈路狀態。

2.4  計時器協商

BFD會話建立前BFD控制訊息以1秒的時間間隔週期發送以減小訊息流量。在會話建立後則以協商的時間間隔發送BFD控制訊息以實現快速檢測。在BFD會話建立的同時,BFD控制訊息發送時間間隔以及檢測時間也會通過訊息交互協商確定。在BFD會話有效期間,這些計時器可以隨時協商修改而不影響會話狀態。BFD會話不同方向的計時器協商是分別獨立進行的,雙向計時器時間可以不同。

BFD控制訊息發送時間間隔為本端Desired Min TX Interval與對端Required Min RX Interval之中的最大值,也就是說比較慢的一方決定了發送頻率。

檢測時間為對端BFD控制訊息中的Detect Mult乘以經過協商的對端BFD控制訊息發送時間間隔。

如果加大本端Desired Min TX Interval,那麼本端實際發送BFD控制訊息的時間間隔必須要等收到對端F欄位置位的訊息後才能改變,這是為了確保在本端加大BFD控制訊息發送時間間隔前對端已經加大了檢測時間,否則可能導致對端檢測計時器錯誤超時。

如果減小本端Required Min RX Interval,那麼本端檢測時間必須要等收到對端F欄位置位的訊息後才能改變,這是為了確保在本端減小檢測時間前對端已經減小了BFD控制訊息發送間隔時間,否則可能導致本端檢測計時器錯誤超時。

然而如果減小Desired Min TX Interval,本端BFD控制訊息發送時間間隔將會立即減小;加大Required Min RX Interval,本端檢測時間將會立即加大。

下麵詳細介紹參數改變後計時器的協商過程:


圖6 BFD檢測時間協商

Router A與Router B建立BFD會話,雙方的Desired Min TX Interval和Required Min RX Interval(下麵簡稱為TX和RX)都為100ms,Detect Mult都為3。根據計時器協商規則,Router A的發送時間間隔為Router A的TX與Router B的RX中的最大值也就是100ms,Router B的發送時間間隔也是100ms,雙方的檢測超時時間都為300ms。

如果此時將Router A的TX和RX加大到150 ms。

(1)        Router A比較本端的RX(150ms)和Router B的TX(100ms),從而將本端檢測時間改為450ms。同時向對端發送P欄位置位的BFD控制訊息(TX和RX均為150ms)。

(2)        Router B收到訊息後,給Router A回復F欄位置位的BFD控制訊息(TX和RX均為100ms)。同時將收到訊息中的RX與本端的TX進行比較,由於TX較大,故Router B的發送間隔改為150ms。經過比較本端RX和對端的TX,從而將檢測時間也增大到450ms。

(3)        Router A收到對端發來F欄位置位的控制訊息。根據訊息中的RX與本端的TX進行比較計算出新的時間間隔為150ms。

(4)        計時器協商完成,雙方的發送間隔和檢測時間分別為150ms和450ms。

2.5  故障檢測

BFD會話建立及計時器協商完成後,兩端會以協商後的間隔發送BFD控制訊息。每當收到BFD控制訊息時,就會重置檢測時間計時器,保持會話UP狀態。如果在檢測時間內沒有收到BFD控制訊息,BFD會話會遷移到DOWN狀態,並通知該會話所服務的上層應用發生故障,由上層應用採取相應的措施。本端BFD會話DOWN後,發給對端的BFD控制訊息中的Sta欄位就填為1,通知對端會話DOWN,對端的BFD會話也遷移到DOWN狀態。

3  典型組網應用

3.1  路由式通訊協定與BFD聯動典型組網應用


圖7 路由式通訊協定與BFD聯動組網圖

兩台路由器Router A、Router B通過二層交換機互連,在設備上運行路由式通訊協定,網路層相互可達。

由於通過二層交換機相連,Router A與Router B之間的鏈路故障可能不會導致介面DOWN,只能通過協定握手去檢測。通過在Router A與Router B之間使用BFD就能快速檢測出故障,路由式通訊協定得到BFD通知後可以儘快計算新的路由,從而縮短收斂時間。

3.2  快速重路由與BFD聯動典型組網應用


圖8 快速重路由與BFD聯動典型組網圖

隨著網路的快速發展,IP網路越來越多的承載語音、視頻等多種業務,這些業務對網路的高可靠性提出了更高的要求,從而運營商網路要求更快的收斂速度。

BFD應用於路由式通訊協定以及路由式通訊協定快速收斂技術的使用雖然很大程度提高了收斂速度,但還是無法滿足語音、視頻等新業務對業務中斷時間的要求。

而快速重路由和BFD聯動技術可以很好的滿足這種要求,通過提前計算備用路徑,快速發現主用路徑故障,並在主用路徑故障時不依賴於控制平面的收斂而直接在轉發平面切換至備用路徑,極大的縮短了業務中斷時間。

4  參考文獻

              Katz D., Ward D., “Bidirectional Forwarding Detection", draft-ietf-bfd-base-05.

              Katz D., Ward D., “Generic Application of BFD", draft-ietf-bfd-generic-02.

              Katz D., Ward D., “BFD for IPv4 and IPv6 (Single Hop)", draft-ietf-bfd-v4v6-1hop-05.

              Katz D., Ward D., “BFD for Multihop Paths", draft-ietf-bfd-multihop-03.


Cisco SONA

CiscoSONA介紹(1)

瞭解思科服務導向網路架構 (sona)

企業面臨的挑戰
儘管投入大量 it 資金,但許多企業發現大多數的關鍵網路資源和資訊資產仍處於遊離狀態。事實上,擁有數百個無法彼此通信的"孤立"應用和資料庫是常見的企業現象。

K造成此種現象的原因是由於內外部客戶不斷增長卻無法預測的需求所致。許多企業都被迫迅速部署新技術,常導致部署多個分立系統,進而無法在機構內有效地共用資訊。
例如,如果不建立將應用和資訊結合在一起的各種重疊網路,銷售人員、客戶服務人員或採購部門將無法輕鬆訪問客戶記錄。許多企業都發現,這種盲目擴展為他們帶來了多個未得到充分利用的、無法協調的 分離系統和資源。這些分離的系統同時還難以 管理 且管理成本高昂。

思科的SONA & IIN優勢

智慧資訊網路優勢

思科系統公司®憑藉智慧資訊網路 (iin) 計畫,正在幫助全球 it 機構解決這些問題並迎接新挑戰,如部署服務導向的架構、web服務和虛擬化等。 iin 詳細闡述了網路在促進軟硬體集成方面的發展,這將使機構能夠更好地根據業務優先順序來調整 it 資源。通過將智慧構建於現有網路基礎設施之中,iin 將幫助機構實現降低基礎設施複雜性和成本等優勢
網路的重要性.com/I]n+_+Z:H9m,YE
it 環境的創新主要集中在通過傳統的基於伺服器的系統來分發新業務應用。然而,網路仍然是透明連接並支持it 基礎 架構 的所有組件的平臺。
使用思科®服務導向網路架構 (sona) ,企業可優化應用、流程和資源,來獲得更大的商業利益 。通過提供更出色的網路功能和智慧,企業可提高與網路相關的各種活動的效率,同時 將更多的 資金用於全新的戰略投資和創新。
標準化降低了支持相同數量的資產所需的運營成本,進而提高了資產效率。虛擬化優化了資產的使用,可從邏輯上分割實際資源,以便在所有的分散部門中使用。整個網路效率的全面提高能夠增強靈活性及可擴展性,進而對業務發展、客戶忠誠度及利潤產生巨大影響 — 從而提高企業的競爭優勢。
利用架構取得成功

cisco  sona 架構闡述了企業應如何發展到智慧資訊網路,以便加速應用、業務流程和資源使用、並使 it 能夠為企業提供更好服務。
cisco sona 利用思科及思科合作夥伴在各行業的解決方案、服務和經驗來提供公認的、可擴展的商業解決方案。

cisco sona 架構闡述了如何在全面融合的智慧型網路上構建集成系統,以便大幅度提高靈活性和效率。

企業可將這種 綜合的 智慧特性部署在整個網路之中,包括資料中心、分支機搆和園區環境。

圖 1. 思科服務導向網路架構 NB Vista(Vista技術論壇) O        L K]W"a1V

&^1~­fD-PL#Y+q

\ 遠程工作人員n
           伺服器    存儲 O-I   用戶端:b2F        G(I,[2`%EZ
o n,?&tE
w;P2U(J
DY(@Hnhv$`
智慧資訊網路(IIN)N(B Vista(Vista技術論壇)A’Y(W"(A4I(

應用層     商業應用 4JR 協調統合應用

互動服務層服務     網路基礎設施虛擬化  基礎設施服務  自我調適的管理)k


網路基礎設施服務    園區  分支機搆 資料中

cisco  sona 的三個層次^

1. 網路基礎設施層,在此,所有的 it 資源在融合網路平臺上

2.交互服務層,為利用網路基礎設施的應用和業務流程有效分配資源

3.應用層,包含商業應用和協作應用,充分利用交互服務的效率在網路基礎設施層,經過驗證的思科企業
架構提供全面的設計指南,為你的全部網路提供全面的集成的端到端系統設計指南。在交互服務層,思科將全套服務集成到智慧系統中,以優化商業和協作應用的分發,從而提供可預測性更強、更可靠的性

能,同時降低運營成本。在應用層,通過與網路矩陣深入集成,思科應用網路解決方案無需安裝用戶端
或更改應用,同時在整個應用分發時保持應用可視性和 安全性。

;n~:P.w(ZO構建 cisco sona 的商業優勢,更簡單、更靈活的集成基礎設施將提供更高的靈活性和適應性,進而以更低成本實現更高的商業收益。使用 cisco sona ,您將能夠提高整體 it 效率和利用率,由此增強 it 的效能,我們稱之為網路乘法效應
網路放大效應
網路放大效應指通過 cisco sona 幫助企業 it 增強對整個企業的貢獻。 it 資源的最佳效率和使用將以更低成本對企業產生更高影響,使您的網路成為可盈利的增值資源
網路放大效應計算如下:   K.V
GZ-@Nz6KD

f.gh zC j
效率 = it 資產的成本 ÷ (it 資產的成本+運營成本 ) ;ksSi’l f
w*Wn2c
使用率 = 所使用的資產與總資產的百分比 (如正使用的可用存儲百分比) NB Vista(Vista技術論壇)WgMwf._(D
效能 = 效率 x 使用率
網路放大效應 = 使用 cisco sona 時的資產效能 ÷ 不使用 cisco sona 時的資產效能
投資收益 NB Vista(Vista技術論壇)C­D2XlCl`
cisco sona 中思科智慧系統的優勢不僅是提高效率和降低成本。通過 cisco sona ,您可通過網路的力量實現:

增加收入和機會
改進客戶關係
提高業務永續性和靈活性
提高生產率和效率並降低成本
即時發展
通過 cisco sona 朝著更智慧的集成網路發展,企業可分階段完成:融合、標準化、虛擬化和自動化。與思科管道夥伴或客戶團隊合作,您可使用 cisco sona 框架 為企業的發展制訂 藍圖 。憑藉思科生命週期管理服務、標準化領域的領先地位、成熟的企業架構和創建針對性行業解決方案的豐富經驗,思科客戶團隊可幫您即時滿足業務要求。

發展到智慧資訊網路
網路的作用正在不斷發展。明天的智慧型網路將 不止 提供基本的連接、用戶帶寬和應用訪問服務,它將提供端到端的功能和集中統一的 控制,實現真正的企業透明性和靈活性。 cisco sona 使企業能夠擴展其現有基礎設施,朝著智慧型網路發展,以加速應用並改進業務流程。思科提供設計、支援和融資服務,以便最大限度地提高您的投資回報。

思科生命週期服務與支援
思科及其合作夥伴提供了生命週期服務方法,以使客戶的業務目標與技術實施保持一致。此方法根據技術和 網路的 複雜性,定義了必須採取的措施,以幫您成功部署並運行思科技術,且在網路的整個生命週期中優化它們的性能。
思科及其合作夥伴將針對客戶環境和能力共同構建適當的部署模式,包括技能識別、能力評估及方法差距評估等內容,以便創建一個定制的解決方案,幫助客戶移植到 cisco sona 。
思科資本融資
思科資本®公司在為企業提供此完整解決方案方面發揮著關鍵作用 — 它可即時滿足企業要求。思科資本公司不僅提供交易幫助,還可確保經濟因素不會對企業實施技術的時間產生影響