亚洲激情专区-91九色丨porny丨老师-久久久久久久女国产乱让韩-国产精品午夜小视频观看

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

CCNP路由實驗之八 路由重發布

發布時間:2020-07-27 20:28:52 來源:網絡 閱讀:1267 作者:xyz3553 欄目:網絡安全

CCNP路由實驗之八 路由重發布

 

   在前面幾個實驗,已經學習了靜態路由和動態路由。現在,我們要掌握如何使它們在一個網絡中融合,即路由重發布。路由重分布可以實現多種路由協議之間共享路由信息并進行路由信息交換,使得同一個互聯網絡中高效地支持多種路由協議提供了可能。執行路由重分布的路由器被稱為邊界路由器。因為他們位于兩個或多個自治系統的邊界上。

   路由重分布時,計量單位和管理距離是必須要考慮的因素。每一種路由協議都有自己的度量標準,所以在進行重分布時必須轉換度量標準,使得它們兼容。種子度量值(Seed Metric)是定義在路由重分布里的,它是一條從外部重分布進來的路由的初始度量值。路由協議默認的管理距離如下表:

路由來源

管理距離(AD)

直連口

0

使用出站口作為靜態路由

0

使用下一跳地址作為靜態路由

1

EIGRP匯總路由

5

EBGP(外部)

20

內部EIGRP

90

IGRP

100

OSPF

110

IS-IS自治系統

115

RIP

120

EGP外部網關協議(淘汰)

140

ODR

160

外部EIGRP

        170(重發布)

iBGP(內部)

200

默認路由

默認路由是在路由器找不到具體路由時的一種處理方式,它總是被最后使用

 未知

255


注:

  1. 管理距離是指一種路由協議的路由可信度,在正常情況下,管理距離越小,它的優先級就越高,也就是可信度越高!路由器根據管理距離決定哪一個協議的路由進入路由表

  2. 使用出站接口配置的靜態路由AD實際處于0-1之間

  3. 如果AD相同,則會比較路由協議的度量值(如跳計數或鏈路的寬帶值),帶有較低度量值的路由會被放置在路由表中;

  4. 距離矢量路由協議(如RIP和IGRP)的度量值為跳數

  5. EIGRP的度量值默認為帶寬和延遲,其它可選因素是負載,可靠性和最大傳輸單元

  6. OSPF的度量值為開銷,默認為10*7/帶寬(單位是bit/s)

  7. 如果AD和度量值都相同,那么路由選擇協議會使用負載均衡,即發送的數據包會平均分配到每個鏈路上。

  8. 所有協議都可以實現負載均衡,EIGRP和IGRP默認時可以支持最多到4條鏈路的不等代價負載均衡,可以通過maximum-paths 命令可以使數值達到6

  9. AD為255的路由不會被使用

 

 路由重分布并不是完美的,它有如下幾點不足:

  1. 路由回環:根據重分布的使用方法,路由器有可能將它從一個AS收到的路由信息發回到這個AS中,這種回饋與距離矢量路由協議的水平分割問題類似。

  2. 路由信息不兼容:不同的路由協議使用不有的量度值,因為這些量度值可能無法正確引入到不同的路由協議,使用重分布的路由信息來進行路徑選擇可能不是最優的。

  3. 收斂時間不一致:不同的路由協議收斂效率不同,例如,RIP比EIGRP收斂慢,因此如果一條鏈路DOWN掉,EIGRP網絡將比RIP網絡更早得知這一信息。

    在配置路由重分布時應注意以下情況:

  4. 不要重疊使用路由協議:不要在同一個網絡里使用兩個不同的路由協議,在使用不同路由協議的網絡之間應該有明顯的邊界。

  5. 重分布原則:路由必須位于路由選擇表中才能被重分發

  6. 在單邊界的情況下使用雙向重分布: 當一個網絡中只有一個邊界路由器時,雙向重分布工作很穩定。如果沒有任何機制來防止路由回環,不要在一個多邊界的網絡中使用雙向重分布。綜合使用默認路由、路由過濾以及修改管理距離可以防止路由回環。

  7. 有多個邊界路由器的情況下使用單向重分布: 如果有多于一臺路由器作為重分布點,使用單向重分布可以避免回環和收斂問題。在不需要接收外部路由的路由器上使用默認路由。

     

    實驗一、單邊界多向路由重分布


     

    R1配置(邊界路由器)

    R1#conf t

    R1(config)#int lo0

    R1(config-if)#ip add 1.1.1.1255.255.255.0 //直連路由

    R1(config-if)#desc Directly

    R1(config-if)#exit

    R1(config)#int f1/0

    R1(config-if)#desc static

    R1(config-if)#ip add 172.168.1.1 255.255.255.0

    R1(config-if)#no sh

    R1(config-if)#exit

    R1(config)#int s2/0

    R1(config-if)#desc Internet

    R1(config-if)#clock rate 64000

    R1(config-if)#ip add 202.100.100.1255.255.255.0

    R1(config-if)#no sh

    R1(config-if)#exit

    R1(config)#int e0/0

    R1(config-if)#desc RIP

    R1(config-if)#ip add 192.168.12.1255.255.255.0

    R1(config-if)#no sh

    R1(config-if)#exit

    R1(config)#int e0/1

    R1(config-if)# desc EIGRP

    R1(config-if)#ip add 192.168.13.1255.255.255.0

    R1(config-if)#no sh

    R1(config-if)#exit

    R1(config)#int e0/2

    R1(config-if)#desc OSPF

    R1(config-if)#ip add 192.168.14.1255.255.255.0

    R1(config-if)#no sh

    R1(config-if)#exit

    R1(config)#int e0/3

    R1(config-if)#desc IS-IS

    R1(config-if)#ip add 192.168.15.1255.255.255.0

    R1(config-if)#ip router isis //將接口宣告到IS-IS路由進程中

    R1(config-if)#no sh

    R1(config-if)#exit

    R1(config)#ip route 0.0.0.0 0.0.0.0202.100.100.2 //默認路由

    R1(config)#ip route 172.168.100.0255.255.255.0 172.168.1.2 //靜態路由

    R1(config)#router rip //開啟RIP路由協議

    R1(config-router)#version 2

    R1(config-router)#no auto-summary

    R1(config-router)#net 192.168.12.0

    R1(config-router)#exit

    R1(config)#router eigrp 1 //開啟EIGRP路由協議

    R1(config-router)#no auto-summary

    R1(config-router)#network 192.168.13.0255.255.255.0

    R1(config-router)#exit

    R1(config)#router ospf 1 //開啟ospf路由協議

    R1(config-router)#network 192.168.14.0255.255.255.0 area 0

    R1(config-router)#exit

    R1(config)#router isis //開啟IS-IS路由協議

    R1(config-router)#net49.0001.1111.1111.1111.00

    R1(config-router)#exit

     

    R2配置(RIP路由協議)

    R2#conf t

    R2(config)#int lo 0

    R2(config-if)#ip add 2.2.2.2 255.255.255.0

    R2(config-if)#desc RIP

    R2(config-if)#exit

    R2(config)#int e0/0

    R2(config-if)#ip add 192.168.12.2255.255.255.0

    R2(config-if)#desc RIP

    R2(config-if)#exit

    R2(config)#int e0/0

    R2(config-if)#no sh

    R2(config-if)#exit

    R2(config)#router rip

    R2(config-router)#ver 2

    R2(config-router)#no auto-summary

    R2(config-router)#net 2.2.2.0

    R2(config-router)#net 192.168.12.0

    R2(config-router)#exit

     

    R3配置:(EIGRP路由協議)

    R3#conf t

    R3(config)#int lo0

    R3(config-if)#ip add 3.3.3.3255.255.255.0

    R3(config-if)#desc EIGRP

    R3(config-if)#exit

    R3(config)#int e0/0

    R3(config-if)#desc EIGRP

    R3(config-if)#ip add 192.168.13.2255.255.255.0

    R3(config-if)#no sh

    R3(config-if)#exit

    R3(config)#router eigrp 1

    R3(config-router)#net 192.168.13.0

    R3(config-router)#net 3.3.3.0

    R3(config-router)#exit

     

    R4配置:(OSPF路由協議)

    R4#conf t

    R4(config)#int lo0

    R4(config-if)#desc OSPF

    R4(config-if)#ip add 4.4.4.4255.255.255.0

    R4(config-if)#exit

    R4(config)#int e0/0

    R4(config-if)#desc OSPF

    R4(config-if)#ip add 192.168.14.2255.255.255.0

    R4(config-if)#no sh

    R4(config-if)#exit

    R4(config)#router ospf 1

    R4(config-router)#net 4.4.4.0255.255.255.0 area 0

    R4(config-router)#net 192.168.14.0255.255.255.0 area 0

    R4(config-router)#exit

     

    R5配置:(IS-IS路由協議)

    R5#conf t

    R5(config)#int lo0

    R5(config-if)#desc IS-IS

    R5(config-if)#ip add 5.5.5.5255.255.255.0

    R5(config-if)#ip router isis

    R5(config-if)#exit

    R5(config)#int e0/0

    R5(config-if)#desc IS-IS

    R5(config-if)#ip add 192.168.15.2255.255.255.0

    R5(config-if)#ip router isis

    R5(config-if)#no sh

    R5(config-if)#exit

    R5(config)#router isis

    R5(config-router)#net49.0001.5555.5555.5555.00

    R5(config-router)#exit

     

    Branch配置(靜態路由)

    Branch#conf t

    Branch(config)#int lo0

    Branch(config-if)#ip add 172.168.100.1255.255.255.0

    Branch(config-if)#exit

    Branch(config)#int fa0/0

    Branch(config-if)#ip add 172.168.1.2255.255.255.0

    Branch(config-if)#no sh

    Branch(config-if)#exit

    Branch(config)#ip route 0.0.0.0 0.0.0.0172.168.1.1 //回程路由

     

    Internet配置:

    Internet#conf t

    Internet(config)#int lo0

    Internet(config-if)#ip add 10.10.10.10255.255.255.0

    Internet(config-if)#exit

    Internet(config)#int s0/0

    Internet(config-if)#clock rate 64000

    Internet(config-if)#ip add 202.100.100.2255.255.255.0

    Internet(config-if)#no sh

    Internet(config-if)#exit

    Internet(config)#ip route 0.0.0.0 0.0.0.0202.100.100.1 //回程路由

     

    完成以上基本配置后R1上運行多種路由協議,它可以與所有網絡互通,是網絡上的邊界路由。此時在它之上使用路由重分布功能,就可以實現各路由協議交換路由信息。下面開始

     

    第一向R2的RIP協議注入靜態路由、默認路由、直連路由、EIGRP、OSPF、ISIS,在向RIP區域重分布路由的時候,必須指定度量值,否則由于注入的路由度量值會變成無窮大而無法加入路由表,因此必須手工指定metric值,注意RIP的metric不能大于15,因為RIP最大跳數為16,可以通過"default-metric"設置默認種子度量值,只有重分布靜態路由或默認路由可以不指定種子度量值。

    R1#conf t

    R1(config)#router rip

    R1(config-router)#default-informationoriginate //注入默認路由

    R1(config-router)#redistribute  static//注入靜態路由

    R1(config-router)#redistribute connectedmetric 6 //注入直連路由

    R1(config-router)#redistribute  eigrp 1 metric 3//注入EIGRP路由

    R1(config-router)#redistribute  ospf 1 metric 4//注入OSPF路由

    R1(config-router)#redistribute  isis level-1-2 metric 5//注入ISIS路由

     

    R2#sh ip rou //此時R2路由表變化。注意路由代碼為"R"的metric值;

    Codes: C - connected, S - static, R -RIP, M - mobile, B - BGP

          D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

          N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

          E1 - OSPF external type 1, E2 - OSPF external type 2

          i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2

          ia - IS-IS inter area, * - candidate default, U - per-user static route

          o - ODR, P - periodic downloaded static route、

    Gateway of last resort is 192.168.12.1to network 0.0.0.0

    C   192.168.12.0/24 is directly connected, Ethernet0/0

        1.0.0.0/24 is subnetted, 1 subnets

    R      1.1.1.0 [120/6] via 192.168.12.1, 00:00:01, Ethernet0/0

    R   192.168.13.0/24 [120/6] via 192.168.12.1, 00:00:01, Ethernet0/0

        2.0.0.0/24 is subnetted, 1 subnets

    C      2.2.2.0 is directly connected, Loopback0

    R   192.168.14.0/24 [120/6] via 192.168.12.1, 00:00:01, Ethernet0/0

    R   3.0.0.0/8 [120/3] via 192.168.12.1, 00:00:01, Ethernet0/0

    R   192.168.15.0/24 [120/6] via 192.168.12.1, 00:00:02, Ethernet0/0

        4.0.0.0/32 is subnetted, 1 subnets

    R      4.4.4.4 [120/4] via 192.168.12.1, 00:00:02, Ethernet0/0

    R   202.100.100.0/24 [120/6] via 192.168.12.1, 00:00:02, Ethernet0/0

        5.0.0.0/24 is subnetted, 1 subnets

    R      5.5.5.0 [120/5] via 192.168.12.1, 00:00:03, Ethernet0/0

        172.168.0.0/24 is subnetted, 2 subnets

    R      172.168.1.0 [120/6] via 192.168.12.1, 00:00:03, Ethernet0/0

    R      172.168.100.0 [120/1] via 192.168.12.1, 00:00:03, Ethernet0/0

    R*  0.0.0.0/0 [120/1] via 192.168.12.1, 00:00:03, Ethernet0/0

     

    第二向R3的EIGRP路由協議注入靜態路由、默認路由、直連路由、RIP、OSPF、ISIS,由于重分布到EIGRP的路由管理距離會變成無限大,所以必須手工分別設置帶寬、延遲、可靠性、負載以及MTU的參數值。在"Redistribute"命令中用參數"metric"指定的種子度量值優先于在路由模式下使用"default-metric命令設定的默認的種子度量值".注意靜態、默認、直連不需要指定metric值

    R1#conf t

    R1(config)#router eigrp1

    R1(config-router)#redistribute static //注入靜態和默認路由,或使用network0.0.0.0

    R1(config-router)#redistributeconnected//注入直連路由

    R1(config-router)#redistribute ripmetric 1000 100 255 1 1500 //注入rip路由

    R1(config-router)#redistribute ospf 1metric 1000 100 255 1 1500//注入OSPF路由

    R1(config-router)#redistribute isislevel-1-2 metric 1000 100 255 1 1500//注入ISIS路由

     

    R3#sh ip rou //R3路由表,重分布的路由代碼為"D EX"

    Codes: C - connected, S - static, R -RIP, M - mobile, B - BGP

          D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

          N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

          E1 - OSPF external type 1, E2 - OSPF external type 2

          i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2

          ia - IS-IS inter area, * - candidate default, U - per-user static route

          o - ODR, P - periodic downloaded static route

    Gateway of last resort is 192.168.13.1to network 0.0.0.0

    D EX 192.168.12.0/24 [170/307200] via192.168.13.1, 00:00:04, Ethernet0/0

        1.0.0.0/24 is subnetted, 1 subnets

    D EX   1.1.1.0 [170/409600] via 192.168.13.1, 00:00:04, Ethernet0/0

    C   192.168.13.0/24 is directly connected, Ethernet0/0

        2.0.0.0/24 is subnetted, 1 subnets

    D EX   2.2.2.0 [170/2611200] via 192.168.13.1, 00:11:03, Ethernet0/0

    D EX 192.168.14.0/24 [170/307200] via192.168.13.1, 00:00:04, Ethernet0/0

        3.0.0.0/8 is variably subnetted, 2 subnets, 2 masks

    C      3.3.3.0/24 is directly connected, Loopback0

    D      3.0.0.0/8 is a summary, 01:24:53, Null0

    D EX 192.168.15.0/24 [170/307200] via 192.168.13.1,00:00:05, Ethernet0/0

        4.0.0.0/32 is subnetted, 1 subnets

    D EX   4.4.4.4 [170/2611200] via 192.168.13.1, 00:09:40, Ethernet0/0

    D EX 202.100.100.0/24 [170/2195456] via192.168.13.1, 00:00:20, Ethernet0/0

        5.0.0.0/24 is subnetted, 1 subnets

    D EX   5.5.5.0 [170/2611200] via 192.168.13.1, 00:09:15, Ethernet0/0

        172.168.0.0/24 is subnetted, 2 subnets

    D EX   172.168.1.0 [170/284160] via 192.168.13.1, 00:00:20, Ethernet0/0

    D EX   172.168.100.0 [170/284160] via 192.168.13.1, 00:20:35, Ethernet0/0

    D*EX 0.0.0.0/0 [170/2195456] via192.168.13.1, 00:20:35, Ethernet0/0

     

    第三向R4的OSPF路由協議注入靜態路由、默認路由、直連路由、RIP、EIGRP、ISIS,重發布時管理距離為110且Metric為20,當然可也以通過"metric-type"設置類型,或者"metric"參數設置外部路徑成本。注意在向ospf重發布是需要加上subnets,否則只重發布主類網

    R1#conf t

    R1(config)#router ospf 1

    R1(config-router)#default-informationoriginate //注入默認路由

    R1(config-router)#redistribute connectedsubnets//注入直連路由

    R1(config-router)#redistribute staticsubnets//注入靜態路由

    R1(config-router)#redistribute ripsubnets//注入RIP路由

    R1(config-router)#redistribute eigrp 1subnets//注入EIGRP路由

    R1(config-router)#redistribute isislevel-1-2 subnets//注入ISIS路由

     

    R4#ship rou//重分布進OSPF的路由被路由器R4學到,代碼為"O E2",

     Codes:C - connected, S - static, R - RIP, M - mobile, B - BGP

          D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

          N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

          E1 - OSPF external type 1, E2 - OSPF external type 2

          i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2

          ia - IS-IS inter area, * - candidate default, U - per-user static route

          o - ODR, P - periodic downloaded static route

    Gateway of last resort is 192.168.14.1to network 0.0.0.0

    O E2 192.168.12.0/24 [110/20] via192.168.14.1, 00:11:00, Ethernet0/0

        1.0.0.0/24 is subnetted, 1 subnets

    O E2   1.1.1.0 [110/20] via 192.168.14.1, 00:10:50, Ethernet0/0

    O E2 192.168.13.0/24 [110/20] via192.168.14.1, 00:11:00, Ethernet0/0

        2.0.0.0/24 is subnetted, 1 subnets

    O E2   2.2.2.0 [110/20] via 192.168.14.1, 00:09:33, Ethernet0/0

    C   192.168.14.0/24 is directly connected, Ethernet0/0

    O E2 3.0.0.0/8 [110/20] via192.168.14.1, 00:08:47, Ethernet0/0

    O E2 192.168.15.0/24 [110/20] via192.168.14.1, 00:11:01, Ethernet0/0

        4.0.0.0/24 is subnetted, 1 subnets

    C      4.4.4.0 is directly connected, Loopback0

    O E2 202.100.100.0/24 [110/20] via192.168.14.1, 00:11:01, Ethernet0/0

        5.0.0.0/24 is subnetted, 1 subnets

    O E2   5.5.5.0 [110/20] via 192.168.14.1, 00:08:10, Ethernet0/0

        172.168.0.0/24 is subnetted, 2 subnets

    O E2   172.168.1.0 [110/20] via 192.168.14.1, 00:10:53, Ethernet0/0

    O E2   172.168.100.0 [110/20] via 192.168.14.1, 00:10:18, Ethernet0/0

    O*E2 0.0.0.0/0 [110/1] via 192.168.14.1,00:11:58, Ethernet0/0

     

    第四向R5的ISIS路由協議注入靜態路由、默認路由、直連路由、RIP、EIGRP、ISIS,重發布時管理距離為115且Metric為10。當把其他路由協議重分發到isis中時,必須使用level-2類型.默認就是Level-2

    R1#conf t

    R1(config)#router isis

    R1(config-router)#default-informationoriginate //注入默認路由

    R1(config-router)#redistribute static//注入靜態路由

    R1(config-router)#redistribute connected//注入直連路由

    R1(config-router)#redistribute rip//注入RIP路由

    R1(config-router)#redistribute ospf 1//注入OSPF路由

    R1(config-router)#redistribute eigrp 1//注入EIGRP路由

     

    R5#sh ip rou //R5的路由表

    Codes: C - connected, S - static, R -RIP, M - mobile, B - BGP

          D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

          N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

          E1 - OSPF external type 1, E2 - OSPF external type 2

          i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2

          ia - IS-IS inter area, * - candidate default, U - per-user static route

          o - ODR, P - periodic downloaded static route

    Gateway of last resort is 192.168.15.1to network 0.0.0.0

    i L2 192.168.12.0/24 [115/10] via192.168.15.1, Ethernet0/0

        1.0.0.0/24 is subnetted, 1 subnets

    i L2   1.1.1.0 [115/10] via 192.168.15.1, Ethernet0/0

    i L2 192.168.13.0/24 [115/10] via192.168.15.1, Ethernet0/0

        2.0.0.0/24 is subnetted, 1 subnets

    i L2   2.2.2.0 [115/10] via 192.168.15.1, Ethernet0/0

    i L2 192.168.14.0/24 [115/10] via192.168.15.1, Ethernet0/0

    i L2 3.0.0.0/8 [115/10] via192.168.15.1, Ethernet0/0

    C   192.168.15.0/24 is directly connected, Ethernet0/0

        4.0.0.0/32 is subnetted, 1 subnets

    i L2   4.4.4.4 [115/10] via 192.168.15.1, Ethernet0/0

    i L2 202.100.100.0/24 [115/10] via192.168.15.1, Ethernet0/0

        5.0.0.0/24 is subnetted, 1 subnets

    C      5.5.5.0 is directly connected, Loopback0

        172.168.0.0/24 is subnetted, 2 subnets

    i L2   172.168.1.0 [115/10] via 192.168.15.1, Ethernet0/0

    i L2    172.168.100.0 [115/10] via 192.168.15.1,Ethernet0/0

    i*L2 0.0.0.0/0 [115/10] via192.168.15.1, Ethernet0/0

     

    實驗二、多點多向路由重發布

    R2配置:(邊界路由)

    R2#conft

    R2(config)#inte0/0

    R2(config-if)#ipadd 192.168.21.2 255.255.255.0

    R2(config-if)#nosh

    R2(config-if)#exit

    R2(config)#inte0/1

    R2(config-if)#ipadd 192.168.24.2 255.255.255.0

    R2(config-if)#nosh

    R2(config-if)#exit

    R2(config)#inte0/2

    R2(config-if)#ipadd 192.168.25.2 255.255.255.0

    R2(config-if)#nosh

    R2(config-if)#exit

    R2(config)#inte0/3

    R2(config-if)#ipadd 192.168.26.2 255.255.255.0

    R2(config-if)#iprouter isis

    R2(config-if)#nosh

    R2(config-if)#exit

    R2(config)#routerrip

    R2(config-router)#ver2

    R2(config-router)#noau

    R2(config-router)#net192.168.21.0

    R2(config-router)#exit

    R2(config)#routereigrp 1

    R2(config-router)#net192.168.24.0

    R2(config-router)#exit

    R2(config)#routerospf 1

    R2(config-router)#net192.168.25.0 255.255.255.0 area 0

    R2(config-router)#exit

    R2(config)#routerisis

    R2(config-router)#net49.0001.2222.2222.2222.00

    R2(config-router)#exit

     

    R3配置(邊界路由器)

    R3#conft

    R3(config)#inte0/0

    R3(config-if)#ipadd 192.168.31.3 255.255.255.0

    R3(config-if)#nosh

    R3(config-if)#exit

    R3(config)#inte0/1

    R3(config-if)#ipadd 192.168.34.3 255.255.255.0

    R3(config-if)#nosh

    R3(config-if)#exit

    R3(config)#inte0/2

    R3(config-if)#ipadd 192.168.35.3 255.255.255.0

    R3(config-if)#nosh

    R3(config-if)#exit

    R3(config)#inte0/3

    R3(config-if)#ipadd 192.168.36.3 255.255.255.0

    R3(config-if)#iprouter isis

    R3(config-if)#nosh

    R3(config-if)#exit

    R3(config)#routerrip

    R3(config-router)#ver2

    R3(config-router)#noau

    R3(config-router)#net192.168.31.0

    R3(config-router)#exit

    R3(config)#routereigrp 1

    R3(config-router)#net192.168.34.0

    R3(config-router)#exit

    R3(config)#routerospf 1

    R3(config-router)#net192.168.35.0 255.255.255.0 area 0

    R3(config-router)#exit

    R3(config)#routerisis

    R3(config-router)#net49.0001.3333.3333.3333.00

    R3(config-router)#exit

     

    R1配置(rip路由協議)

    R1#conft

    R1(config)#inte0/0

    R1(config-if)#ipadd 192.168.21.1 255.255.255.0

    R1(config-if)#nosh

    R1(config-if)#exit

    R1(config)#inte0/1

    R1(config-if)#ipadd 192.168.31.1 255.255.255.0

    R1(config-if)#nosh

    R1(config-if)#exit

    R1(config-if)#ipadd 1.1.1.1 255.255.255.0

    R1(config-if)#exit

    R1(config)#routerrip

    R1(config-router)#ver2

    R1(config-router)#noau

    R1(config-router)#net192.168.21.0

    R1(config-router)#noau

    R1(config-router)#net192.168.31.0

    R1(config-router)#net1.1.1.0

     

    R4配置(eigrp路由)

    R4#conft

    R4(config)#inte0/0

    R4(config-if)#ipadd 192.168.24.4 255.255.255.0

    R4(config-if)#nosh

    R4(config-if)#exit

    R4(config)#inte0/1

    R4(config-if)#ipadd 192.168.34.4 255.255.255.0

    R4(config-if)#nosh

    R4(config-if)#exit

    R4(config)#routereigrp 1

    R4(config-router)#net192.168.34.0

    R4(config-router)#net192.168.24.0

     

    第一向R1的RIP路由協議注入EIGRP、OSPF、ISIS

    R2#conft

    R2(config)#routerrip

    R2(config-router)#default-metric4

    R2(config-router)#redistributeeigrp 1

    R2(config-router)#redistributeospf 1

    R2(config-router)#redistributeisis level-1-2

     

    R3#conft

    R3(config)#routerrip

    R3(config-router)#default-metric4

    R3(config-router)#redistributeeigrp 1

    R3(config-router)#redistributeospf 1

    R3(config-router)#redistributeisis level-1-2

     

    第二向R4的EIGRP路由協議注入RIP、OSPF、ISIS

    R2#conft

    R2(config)#routereigrp 1

    R2(config-router)#default-metric1000 2500 255 1 1500

    R2(config-router)#redistributerip

    R2(config-router)#redistributeospf 1

    R2(config-router)#redistributeisis level-1-2

     

    R3#conft

    R3(config)#routereigrp 1

    R3(config-router)#default-metric1000 2500 255 1 1500

    R3(config-router)#redistributerip

    R3(config-router)#redistributeospf 1

    R3(config-router)#redistributeisis level-1-2

     

    第三向R5的OSPF路由協議中注入RIP、EIGRP、ISIS

    R2#conft

    R2(config)#routerospf 1

    R2(config-router)#redistributerip subnets

    R2(config-router)#redistributeeigrp 1 subnets

    R2(config-router)#redistributeisis level-1-2 subnets

     

    R3#conft

    R3(config)#routerospf 1

    R3(config-router)#redistributerip subnets

    R3(config-router)#redistributeeigrp 1 subnets

    R3(config-router)#redistributeisis level-1-2 subnets

     

    第四向R6的ISIS路由協議注入RIP、EIGRP、OSPF

    R2#conf t

    R2(config)#routerisis

    R2(config-router)#redistributerip level-2

    R2(config-router)#redistributeeigrp 1 level-2

    R2(config-router)#redistributeospf 1 level-2

     

    R3#conft

    R3(config-router)#redistributerip level-2

    R3(config-router)#redistributeeigrp 1 level-2

    R3(config-router)#redistributeospf 1 level-2

     

    先查看R2和R3的路由表,留意紅色標記的路由,其實并不是最佳路由,也就是說出現了次優路由。

    R2#ship rou

    Codes:C - connected, S - static, R - RIP, M - mobile, B - BGP

           D - EIGRP, EX - EIGRP external, O -OSPF, IA - OSPF inter area

           N1 - OSPF NSSA external type 1, N2 -OSPF NSSA external type 2

           E1 - OSPF external type 1, E2 - OSPFexternal type 2

           i - IS-IS, su - IS-IS summary, L1 -IS-IS level-1, L2 - IS-IS level-2

           ia - IS-IS inter area, * - candidatedefault, U - per-user static route

           o- ODR, P - periodic downloaded static route

    Gatewayof last resort is not set

         1.0.0.0/24 is subnetted, 1 subnets

    i L2    1.1.1.0 [115/20] via192.168.26.6, Ethernet0/3

    O E2 192.168.31.0/24 [110/20] via 192.168.25.5, 00:15:21,Ethernet0/2

    C    192.168.25.0/24 is directly connected,Ethernet0/2

    D    4.0.0.0/8 [90/409600] via 192.168.24.4,01:46:16, Ethernet0/1

    C    192.168.24.0/24 is directly connected,Ethernet0/1

         5.0.0.0/32 is subnetted, 1 subnets

    O       5.5.5.5 [110/11] via 192.168.25.5,00:15:21, Ethernet0/2

         6.0.0.0/24 is subnetted, 1 subnets

    iL1    6.6.6.0 [115/20] via 192.168.26.6,Ethernet0/3

    C    192.168.26.0/24 is directly connected,Ethernet0/3

    C    192.168.21.0/24 is directly connected,Ethernet0/0

    i L1192.168.36.0/24 [115/20] via 192.168.26.6, Ethernet0/3

    D    192.168.34.0/24 [90/307200] via192.168.24.4, 01:46:19, Ethernet0/1

    O    192.168.35.0/24 [110/20] via 192.168.25.5,00:15:25, Ethernet0/2

     

    R3#ship rou

    Codes:C - connected, S - static, R - RIP, M - mobile, B - BGP

           D- EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

           N1 - OSPF NSSA external type 1, N2 -OSPF NSSA external type 2

           E1 - OSPF external type 1, E2 - OSPFexternal type 2

           i - IS-IS, su - IS-IS summary, L1 -IS-IS level-1, L2 - IS-IS level-2

           ia - IS-IS inter area, * - candidatedefault, U - per-user static route

           o - ODR, P - periodic downloaded staticroute

    Gatewayof last resort is not set

         1.0.0.0/24 is subnetted, 1 subnets

    O E2    1.1.1.0 [110/20] via192.168.35.5, 00:23:48, Ethernet0/2

    C    192.168.31.0/24 is directly connected,Ethernet0/0

    O    192.168.25.0/24 [110/20] via 192.168.35.5,00:23:48, Ethernet0/2

    D    4.0.0.0/8 [90/409600] via 192.168.34.4,01:54:22, Ethernet0/1

    D    192.168.24.0/24 [90/307200] via192.168.34.4, 01:54:22, Ethernet0/1

         5.0.0.0/32 is subnetted, 1 subnets

    O       5.5.5.5 [110/11] via 192.168.35.5,00:23:48, Ethernet0/2

         6.0.0.0/24 is subnetted, 1 subnets

    O E2   6.6.6.0 [110/20] via 192.168.35.5, 00:23:50, Ethernet0/2

    i L1192.168.26.0/24 [115/20] via 192.168.36.6, Ethernet0/3

    O E2 192.168.21.0/24 [110/20] via 192.168.35.5, 00:23:50,Ethernet0/2

    C    192.168.36.0/24 is directly connected,Ethernet0/3

    C    192.168.34.0/24 is directly connected,Ethernet0/1

    C    192.168.35.0/24 is directly connected,Ethernet0/2

     

    分析:在單點重分發下似乎沒有這種情況,這是因為發往一個方向的路由不會被重分發回來。但是在多點雙向時情況就不同了,自己分發出去的路由會被另一個協議重分發回來的。如果AD值高的路由協議向AD值低的路由協議中重分發,就會產生次優路由,路由環路等問題,反之,AD值低的路由協議向AD高的路由協議重分發,就不會發生這個問題。注意錯誤發生在邊界路由器上。此時就要使用路由策略來解決,方法如下

  8. CCNP路由實驗之八 路由重發布

  9. CCNP路由實驗之八 路由重發布

  10. 路由過濾 不讓產生環路的路由條目進入我這臺路由器,這樣也就不會產生次優路徑了

  11. 修改管理距離AD 把次優路由條目的AD值調高,高到路由器即便看到兩條路由條目去往同一目的地,也不會把次優路由寫入路由表。這種方法比前一種好在如果最佳路徑down了,次優路由變成備份路由使用。

     

    這里我們修改管理距離,然后再次查看每個路由器的路由表,注意R1、R4、R5、R6間的負載均衡。

    R2#conf t

    R2(config)#routerrip

    R2(config-router)#distance111 //修改RIP外部路由的管理距離,使小于ISIS、ospf 、Eigrp

    R2(config-router)#exit

    R2(config)#routerospf 1                           

    R2(config-router)#distanceospf external 170 //修改OSPF的管理距離大于isis 和rip,等于eigrp

     

    R3#conf t

    R3(config)#routerrip

    R3(config-router)#distance111

    R3(config-router)#exit

    R3(config)#routerospf 1                           

    R3(config-router)#distanceospf external 170

     

    R2#ship rou

    Codes:C - connected, S - static, R - RIP, M - mobile, B - BGP

           D - EIGRP, EX - EIGRP external, O -OSPF, IA - OSPF inter area

           N1 - OSPF NSSA external type 1, N2 -OSPF NSSA external type 2

           E1 - OSPF external type 1, E2 - OSPFexternal type 2

           i - IS-IS, su - IS-IS summary, L1 -IS-IS level-1, L2 - IS-IS level-2

           ia - IS-IS inter area, * - candidatedefault, U - per-user static route

           o- ODR, P - periodic downloaded static route

    Gatewayof last resort is not set

         1.0.0.0/24 is subnetted, 1 subnets

    R       1.1.1.0 [111/1] via 192.168.21.1,00:00:04, Ethernet0/0

    R    192.168.31.0/24 [111/1] via 192.168.21.1,00:00:04, Ethernet0/0

    C    192.168.25.0/24 is directly connected,Ethernet0/2

    D    4.0.0.0/8 [90/409600] via 192.168.24.4,00:00:04, Ethernet0/1

    C    192.168.24.0/24 is directly connected,Ethernet0/1

         5.0.0.0/32 is subnetted, 1 subnets

    O       5.5.5.5 [110/11] via 192.168.25.5,00:00:04, Ethernet0/2

         6.0.0.0/24 is subnetted, 1 subnets

    iL1    6.6.6.0 [115/20] via 192.168.26.6,Ethernet0/3

    C    192.168.26.0/24 is directly connected,Ethernet0/3

    C    192.168.21.0/24 is directly connected,Ethernet0/0

    i L1192.168.36.0/24 [115/20] via 192.168.26.6, Ethernet0/3

    D    192.168.34.0/24 [90/307200] via192.168.24.4, 00:00:08, Ethernet0/1

    O    192.168.35.0/24 [110/20] via 192.168.25.5,00:00:08, Ethernet0/2

     

    R3#ship rou

    Codes:C - connected, S - static, R - RIP, M - mobile, B - BGP

           D - EIGRP, EX - EIGRP external, O -OSPF, IA - OSPF inter area

           N1 - OSPF NSSA external type 1, N2 -OSPF NSSA external type 2

           E1 - OSPF external type 1, E2 - OSPFexternal type 2

           i - IS-IS, su - IS-IS summary, L1 -IS-IS level-1, L2 - IS-IS level-2

           ia - IS-IS inter area, * - candidatedefault, U - per-user static route

           o - ODR, P - periodic downloaded staticroute

    Gatewayof last resort is not set

         1.0.0.0/24 is subnetted, 1 subnets

    R       1.1.1.0 [111/1] via 192.168.31.1,00:00:00, Ethernet0/0

    C    192.168.31.0/24 is directly connected,Ethernet0/0

    O    192.168.25.0/24 [110/20] via 192.168.35.5,00:00:01, Ethernet0/2

    D    4.0.0.0/8 [90/409600] via 192.168.34.4,00:00:01, Ethernet0/1

    D    192.168.24.0/24 [90/307200] via192.168.34.4, 00:00:01, Ethernet0/1

         5.0.0.0/32 is subnetted, 1 subnets

    O       5.5.5.5 [110/11] via 192.168.35.5,00:00:01, Ethernet0/2

         6.0.0.0/24 is subnetted, 1 subnets

    iL1    6.6.6.0 [115/20] via 192.168.36.6,Ethernet0/3

    i L1192.168.26.0/24 [115/20] via 192.168.36.6, Ethernet0/3

    R    192.168.21.0/24 [111/1] via 192.168.31.1,00:00:02, Ethernet0/0

    C    192.168.36.0/24 is directly connected,Ethernet0/3

    C    192.168.34.0/24 is directly connected,Ethernet0/1

    C    192.168.35.0/24 is directly connected,Ethernet0/2

     

    R1#ship rou

    Codes:C - connected, S - static, R - RIP, M - mobile, B - BGP

           D - EIGRP, EX - EIGRP external, O -OSPF, IA - OSPF inter area

           N1 - OSPF NSSA external type 1, N2 -OSPF NSSA external type 2

           E1 - OSPF external type 1, E2 - OSPFexternal type 2

           i - IS-IS, su - IS-IS summary, L1 -IS-IS level-1, L2 - IS-IS level-2

           ia - IS-IS inter area, * - candidatedefault, U - per-user static route

           o - ODR, P - periodic downloaded staticroute

    Gatewayof last resort is not set

         1.0.0.0/24 is subnetted, 1 subnets

    C       1.1.1.0 is directly connected, Loopback0

    C    192.168.31.0/24 is directly connected,Ethernet0/1

    R    192.168.25.0/24 [120/4] via 192.168.31.3,00:00:20, Ethernet0/1

                         [120/4] via 192.168.21.2,00:00:14, Ethernet0/0

    R    4.0.0.0/8 [120/4] via 192.168.31.3,00:00:20, Ethernet0/1

                   [120/4] via 192.168.21.2,00:00:14, Ethernet0/0

    R    192.168.24.0/24 [120/4] via 192.168.31.3,00:00:20, Ethernet0/1

                         [120/4] via 192.168.21.2,00:00:14, Ethernet0/0

         5.0.0.0/32 is subnetted, 1 subnets

    R       5.5.5.5 [120/4] via 192.168.31.3,00:00:22, Ethernet0/1

                    [120/4] via 192.168.21.2,00:00:16, Ethernet0/0

         6.0.0.0/24 is subnetted, 1 subnets

    R       6.6.6.0 [120/4] via 192.168.31.3,00:00:24, Ethernet0/1

                    [120/4] via 192.168.21.2,00:00:17, Ethernet0/0

    R    192.168.26.0/24 [120/4] via 192.168.31.3,00:00:24, Ethernet0/1

    C    192.168.21.0/24 is directly connected,Ethernet0/0

    R    192.168.36.0/24 [120/4] via 192.168.21.2,00:00:17, Ethernet0/0

    R    192.168.34.0/24 [120/4] via 192.168.31.3,00:00:24, Ethernet0/1

                         [120/4] via 192.168.21.2,00:00:17, Ethernet0/0

    R    192.168.35.0/24 [120/4] via 192.168.31.3,00:00:24, Ethernet0/1

                         [120/4] via 192.168.21.2,00:00:17, Ethernet0/0

     

    R4#ship rou

    Codes:C - connected, S - static, R - RIP, M - mobile, B - BGP

           D - EIGRP, EX - EIGRP external, O -OSPF, IA - OSPF inter area

           N1 - OSPF NSSA external type 1, N2 -OSPF NSSA external type 2

           E1 - OSPF external type 1, E2 - OSPFexternal type 2

           i - IS-IS, su - IS-IS summary, L1 -IS-IS level-1, L2 - IS-IS level-2

           ia - IS-IS inter area, * - candidatedefault, U - per-user static route

           o - ODR, P - periodic downloaded staticroute

    Gatewayof last resort is not set

         1.0.0.0/24 is subnetted, 1 subnets

    DEX    1.1.1.0 [170/3225600] via192.168.34.3, 00:00:07, Ethernet0/1

                    [170/3225600] via 192.168.24.2,00:00:07, Ethernet0/0

    D EX192.168.31.0/24 [170/3225600] via 192.168.34.3, 00:00:07, Ethernet0/1

                         [170/3225600] via192.168.24.2, 00:00:07, Ethernet0/0

    D EX192.168.25.0/24 [170/3225600] via 192.168.34.3, 00:00:07, Ethernet0/1

                         [170/3225600] via192.168.24.2, 00:00:07, Ethernet0/0

         4.0.0.0/8 is variably subnetted, 2subnets, 2 masks

    C       4.4.4.0/24 is directly connected, Loopback0

    D       4.0.0.0/8 is a summary, 00:00:09, Null0

    C    192.168.24.0/24 is directly connected,Ethernet0/0

         5.0.0.0/32 is subnetted, 1 subnets

    DEX    5.5.5.5 [170/3225600] via192.168.34.3, 00:00:09, Ethernet0/1

                    [170/3225600] via 192.168.24.2,00:00:09, Ethernet0/0

         6.0.0.0/24 is subnetted, 1 subnets

    DEX    6.6.6.0 [170/3225600] via192.168.34.3, 00:00:10, Ethernet0/1

                    [170/3225600] via 192.168.24.2,00:00:10, Ethernet0/0

    D EX192.168.26.0/24 [170/3225600] via 192.168.34.3, 00:00:10, Ethernet0/1

    D EX192.168.21.0/24 [170/3225600] via 192.168.34.3, 00:00:10, Ethernet0/1

                         [170/3225600] via192.168.24.2, 00:00:10, Ethernet0/0

    D EX192.168.36.0/24 [170/3225600] via 192.168.24.2, 00:00:10, Ethernet0/0

    C    192.168.34.0/24 is directly connected,Ethernet0/1

    D EX192.168.35.0/24 [170/3225600] via 192.168.34.3, 00:00:10, Ethernet0/1

                         [170/3225600] via192.168.24.2, 00:00:10, Ethernet0/0

     

    R5# ship rou

    Codes:C - connected, S - static, R - RIP, M - mobile, B - BGP

           D - EIGRP, EX - EIGRP external, O -OSPF, IA - OSPF inter area

           N1 - OSPF NSSA external type 1, N2 -OSPF NSSA external type 2

           E1 - OSPF external type 1, E2 - OSPFexternal type 2

           i - IS-IS, su - IS-IS summary, L1 -IS-IS level-1, L2 - IS-IS level-2

           ia - IS-IS inter area, * - candidatedefault, U - per-user static route

           o - ODR, P - periodic downloaded staticroute

    Gatewayof last resort is not set

         1.0.0.0/24 is subnetted, 1 subnets

    OE2    1.1.1.0 [110/20] via 192.168.35.3,00:00:02, Ethernet0/1

                    [110/20] via 192.168.25.2,00:00:02, Ethernet0/0

    O E2192.168.31.0/24 [110/20] via 192.168.35.3, 00:00:02, Ethernet0/1

                         [110/20] via 192.168.25.2,00:00:02, Ethernet0/0

    C    192.168.25.0/24 is directly connected,Ethernet0/0

    O E24.0.0.0/8 [110/20] via 192.168.35.3, 00:00:02, Ethernet0/1

                   [110/20] via 192.168.25.2,00:00:02, Ethernet0/0

    O E2192.168.24.0/24 [110/20] via 192.168.35.3, 00:00:04, Ethernet0/1

                         [110/20] via 192.168.25.2,00:00:04, Ethernet0/0

         5.0.0.0/24 is subnetted, 1 subnets

    C       5.5.5.0 is directly connected, Loopback0

         6.0.0.0/24 is subnetted, 1 subnets

    OE2    6.6.6.0 [110/20] via 192.168.35.3,00:00:06, Ethernet0/1

                    [110/20] via 192.168.25.2,00:00:06, Ethernet0/0

    O E2192.168.26.0/24 [110/20] via 192.168.35.3, 00:00:06, Ethernet0/1

    O E2192.168.21.0/24 [110/20] via 192.168.35.3, 00:00:06, Ethernet0/1

                         [110/20] via 192.168.25.2,00:00:06, Ethernet0/0

    O E2192.168.36.0/24 [110/20] via 192.168.25.2, 00:00:06, Ethernet0/0

    O E2192.168.34.0/24 [110/20] via 192.168.35.3, 00:00:06, Ethernet0/1

                         [110/20] via 192.168.25.2,00:00:06, Ethernet0/0

    C    192.168.35.0/24 is directly connected,Ethernet0/1

     

    R6#ship rou

    Codes:C - connected, S - static, R - RIP, M - mobile, B - BGP

           D - EIGRP, EX - EIGRP external, O -OSPF, IA - OSPF inter area

           N1 - OSPF NSSA external type 1, N2 -OSPF NSSA external type 2

           E1 - OSPF external type 1, E2 - OSPFexternal type 2

           i - IS-IS, su - IS-IS summary, L1 -IS-IS level-1, L2 - IS-IS level-2

           ia - IS-IS inter area, * - candidatedefault, U - per-user static route

           o - ODR, P - periodic downloaded staticroute

    Gatewayof last resort is not set

         1.0.0.0/24 is subnetted, 1 subnets

    iL2    1.1.1.0 [115/10] via 192.168.36.3,Ethernet0/1

                    [115/10] via 192.168.26.2,Ethernet0/0

    i L2192.168.31.0/24 [115/10] via 192.168.36.3, Ethernet0/1

                         [115/10] via 192.168.26.2,Ethernet0/0

    i L2192.168.25.0/24 [115/10] via 192.168.36.3, Ethernet0/1

                         [115/10] via 192.168.26.2,Ethernet0/0

    i L24.0.0.0/8 [115/10] via 192.168.36.3, Ethernet0/1

                   [115/10] via 192.168.26.2,Ethernet0/0

    i L2192.168.24.0/24 [115/10] via 192.168.36.3, Ethernet0/1

                         [115/10] via 192.168.26.2,Ethernet0/0

         5.0.0.0/32 is subnetted, 1 subnets

    iL2    5.5.5.5 [115/10] via 192.168.36.3,Ethernet0/1

                    [115/10] via 192.168.26.2,Ethernet0/0

         6.0.0.0/24 is subnetted, 1 subnets

    C       6.6.6.0 is directly connected, Loopback0

    C    192.168.26.0/24 is directly connected,Ethernet0/0

    i L2192.168.21.0/24 [115/10] via 192.168.36.3, Ethernet0/1

                         [115/10] via 192.168.26.2,Ethernet0/0

    C    192.168.36.0/24 is directly connected,Ethernet0/1

    i L2192.168.34.0/24 [115/10] via 192.168.36.3, Ethernet0/1

                         [115/10] via 192.168.26.2,Ethernet0/0

    i L2192.168.35.0/24 [115/10] via 192.168.36.3, Ethernet0/1

                         [115/10] via 192.168.26.2,Eth


向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

武宣县| 金寨县| 河间市| 临沭县| 开化县| 唐海县| 兴业县| 敖汉旗| 永兴县| 青河县| 辰溪县| 田林县| 六盘水市| 怀来县| 东明县| 桂平市| 嵊州市| 洪泽县| 安阳县| 山东省| 枣庄市| 南通市| 建瓯市| 探索| 扬中市| 宁波市| 阿瓦提县| 佛山市| 嫩江县| 平陆县| 营山县| 隆回县| 肃南| 喀喇沁旗| 哈巴河县| 丹江口市| 石楼县| 嵩明县| 图片| 宁安市| 邵阳市|