【技術(shù)分享】EIGRP不等價負載均衡

實驗目的
了解EIGRP等價負載均衡;
了解EIGRP不等價負載均衡;
掌握EIGRP不等價負載均衡實現(xiàn)的方法。
實驗拓撲

實驗需求
根據(jù)實驗拓撲圖,完成設備的基本配置;
在R1、R2、R3上啟用EIGRP 100,關(guān)閉自動匯總并宣告相應的接口;
通過配置R2,使得R2去往R3的環(huán)回口實現(xiàn)不等價負載均衡。
實驗步驟
設備基本配置
R1的基本配置如下:
hostname?R1
interface?serial0/1/0
?clock?rate?64000
ip?address?12.1.1.1?255.255.255.0
no?shutdown
interface?serial0/1/1
?clock?rate?64000
?ip?address?13.1.1.1?255.255.255.0
?no?shutdown
interface?loopback1
?ip?address?10.1.1.1?255.255.255.0
interface?loopback2
?ip?address?10.1.2.1?255.255.255.0
interface?loopback3
?ip?address?10.1.3.1?255.255.255.0
?
R2的基本配置如下:
hostname?R2
interface?serial0/0
?ip?address?12.1.1.2?255.255.255.0
?no?shutdown
interface?serial0/1
?clock?rate?64000
?ip?address?23.1.1.2?255.255.255.0
?no?shut
interface?loopback1
?ip?address?20.1.1.1?255.255.255.0
interface?loopback2
?ip?address?20.1.2.1?255.255.255.0
interface?loopback3
?ip?address?20.1.3.1?255.255.255.0
?
R3的基本配置如下:
hostname?R3
interface?serial0/0
?ip?address?13.1.1.3?255.255.255.0
?no?shutdown
interface?serial0/1
?ip?address?23.1.1.3?255.255.255.0
?no?shut
interface?loopback1
?ip?address?30.1.1.1?255.255.255.0
interface?loopback2
?ip?address?30.1.2.1?255.255.255.0
interface?loopback3
?ip?address?30.1.3.1?255.255.255.0在R1、R2、R3上配置EIGRP 100
R1的EIGRP配置如下:
router?eigrp?100
?no?auto-summary
?network?12.1.1.0?0.0.0.255
?network?13.1.1.0?0.0.0.255
?network?10.1.1.0?0.0.0.255
?network?10.1.2.0?0.0.0.255
?network?10.1.3.0?0.0.0.255
R2的EIGRP配置如下:
router?eigrp?100
?no?auto-summary
?network?12.1.1.0?0.0.0.255
?network?23.1.1.0?0.0.0.255
?network?20.1.1.0?0.0.0.255
?network?20.1.2.0?0.0.0.255
?network?20.1.3.0?0.0.0.255
R3的EIGRP配置如下:
router?eigrp?100
?no?auto-summary
?network?13.1.1.0?0.0.0.255
?network?23.1.1.0?0.0.0.255
?network?30.1.1.0?0.0.0.255
?network?30.1.2.0?0.0.0.255
?network?30.1.3.0?0.0.0.255在R1、R2、R3上檢查EIGRP路由
R1的EIGRP路由如下:
R1#show?ip?route?eigrp?
?????20.0.0.0/24?is?subnetted,?3?subnets
D???????20.1.1.0?[90/2297856]?via?12.1.1.2,?00:01:16,?Serial0/1/0
D???????20.1.3.0?[90/2297856]?via?12.1.1.2,?00:01:16,?Serial0/1/0
D???????20.1.2.0?[90/2297856]?via?12.1.1.2,?00:01:16,?Serial0/1/0
?????23.0.0.0/24?is?subnetted,?1?subnets
D???????23.1.1.0?[90/2681856]?via?13.1.1.3,?00:01:16,?Serial0/1/1
???????????????? [90/2681856]?via?12.1.1.2,?00:01:16,?Serial0/1/0
?????30.0.0.0/24?is?subnetted,?3?subnets
D???????30.1.3.0?[90/2297856]?via?13.1.1.3,?00:01:16,?Serial0/1/1
D???????30.1.2.0?[90/2297856]?via?13.1.1.3,?00:01:16,?Serial0/1/1
D???????30.1.1.0?[90/2297856]?via?13.1.1.3,?00:01:16,?Serial0/1/1R1去往23.1.1.0/24存在兩條路徑,一條通過R2到達另外一條通過R3到達,但是不管通過R2到達還是通過R3到達,沿途路徑的Metric是相等的,又因為都是通過EIGRP學習到的路由,AD值都是90,所以R1路由表里面去往23.1.1.0/24是等價負載的路徑。
R2的EIGRP路由如下:
R2#show?ip?route?eigrp?
?????10.0.0.0/24?is?subnetted,?3?subnets
D???????10.1.3.0?[90/2297856]?via?12.1.1.1,?00:01:56,?Serial0/0
D???????10.1.2.0?[90/2297856]?via?12.1.1.1,?00:01:56,?Serial0/0
D???????10.1.1.0?[90/2297856]?via?12.1.1.1,?00:01:56,?Serial0/0
?????13.0.0.0/24?is?subnetted,?1?subnets
D???????13.1.1.0?[90/2681856]?via?23.1.1.3,?00:01:56,?Serial0/1
????????????????[90/2681856]?via?12.1.1.1,?00:01:56,?Serial0/0
?????30.0.0.0/24?is?subnetted,?3?subnets
D???????30.1.3.0?[90/2297856]?via?23.1.1.3,?00:01:56,?Serial0/1
D???????30.1.2.0?[90/2297856]?via?23.1.1.3,?00:01:56,?Serial0/1
D???????30.1.1.0?[90/2297856]?via?23.1.1.3,?00:01:56,?Serial0/1R3的EIGRP路由如下:
R3#show?ip?route?eigrp?
?????20.0.0.0/24?is?subnetted,?3?subnets
D???????20.1.1.0?[90/2297856]?via?23.1.1.2,?00:00:02,?Serial0/1
D???????20.1.3.0?[90/2297856]?via?23.1.1.2,?00:00:02,?Serial0/1
D???????20.1.2.0?[90/2297856]?via?23.1.1.2,?00:00:02,?Serial0/1
?????10.0.0.0/24?is?subnetted,?3?subnets
D???????10.1.3.0?[90/2297856]?via?13.1.1.1,?00:00:02,?Serial0/0
D???????10.1.2.0?[90/2297856]?via?13.1.1.1,?00:00:02,?Serial0/0
D???????10.1.1.0?[90/2297856]?via?13.1.1.1,?00:00:02,?Serial0/0
?????12.0.0.0/24?is?subnetted,?1?subnets
D???????12.1.1.0?[90/2681856]?via?23.1.1.2,?00:00:02,?Serial0/1
? ? ? ? ? ? ? ? ?[90/2681856]?via?13.1.1.1,?00:00:02,?Serial0/0EIGRP不等價負載均衡的實現(xiàn)
首先我們來看R2的EIGRP拓撲表:
R2#show?ip?eigrp?topology?
IP-EIGRP?Topology?Table?for?AS(100)/ID(20.1.3.1)
Codes:?P?-?Passive,?A?-?Active,?U?-?Update,?Q?-?Query,?R?-?Reply,
???????r?-?reply?Status,?s?-?sia?Status?
P?10.1.3.0/24,?1?successors,?FD?is?2297856
????????via?12.1.1.1?(2297856/128256),?Serial0/0
P?10.1.2.0/24,?1?successors,?FD?is?2297856
????????via?12.1.1.1?(2297856/128256),?Serial0/0
P?10.1.1.0/24,?1?successors,?FD?is?2297856
????????via?12.1.1.1?(2297856/128256),?Serial0/0
P?12.1.1.0/24,?1?successors,?FD?is?2169856
????????via?Connected,?Serial0/0
P?13.1.1.0/24,?2?successors,?FD?is?2681856
????????via?12.1.1.1?(2681856/2169856),?Serial0/0
????????via?23.1.1.3?(2681856/2169856),?Serial0/1
P?20.1.1.0/24,?1?successors,?FD?is?128256
????????via?Connected,?Loopback1
P?20.1.3.0/24,?1?successors,?FD?is?128256
????????via?Connected,?Loopback3
P?20.1.2.0/24,?1?successors,?FD?is?128256
????????via?Connected,?Loopback2
P?23.1.1.0/24,?1?successors,?FD?is?2169856
Codes:?P?-?Passive,?A?-?Active,?U?-?Update,?Q?-?Query,?R?-?Reply,
???????r?-?reply?Status,?s?-?sia?Status?
????????via?Connected,?Serial0/1
P?30.1.3.0/24,?1?successors,?FD?is?2297856
????????via?23.1.1.3?(2297856/128256),?Serial0/1
P?30.1.2.0/24,?1?successors,?FD?is?2297856
????????via?23.1.1.3?(2297856/128256),?Serial0/1
P?30.1.1.0/24,?1?successors,?FD?is?2297856
????????via?23.1.1.3?(2297856/128256),?Serial0/1發(fā)現(xiàn)R2去往R3的三個環(huán)回口下一跳都為23.1.1.3,存在Successor R3,F(xiàn)D為2297856,AD為128256。事實上R2去往這三個網(wǎng)段是存在兩條路徑的,一條路徑通過R1到達,另外一條路徑通過R3到達,但是為什么R1沒有成為Feasible Successor呢?我們來看R2詳細的拓撲表:
R2#show?ip?eigrp?topology?all-links?
IP-EIGRP?Topology?Table?for?AS(100)/ID(20.1.3.1)
Codes:?P?-?Passive,?A?-?Active,?U?-?Update,?Q?-?Query,?R?-?Reply,
???????r?-?reply?Status,?s?-?sia?Status?
P?10.1.3.0/24,?1?successors,?FD?is?2297856,?serno?148
????????via?12.1.1.1?(2297856/128256),?Serial0/0
????????via?23.1.1.3?(2809856/2297856),?Serial0/1
P?10.1.2.0/24,?1?successors,?FD?is?2297856,?serno?147
????????via?12.1.1.1?(2297856/128256),?Serial0/0
????????via?23.1.1.3?(2809856/2297856),?Serial0/1
P?10.1.1.0/24,?1?successors,?FD?is?2297856,?serno?146
????????via?12.1.1.1?(2297856/128256),?Serial0/0
????????via?23.1.1.3?(2809856/2297856),?Serial0/1
P?12.1.1.0/24,?1?successors,?FD?is?2169856,?serno?35
????????via?Connected,?Serial0/0
P?13.1.1.0/24,?2?successors,?FD?is?2681856,?serno?149
????????via?12.1.1.1?(2681856/2169856),?Serial0/0
????????via?23.1.1.3?(2681856/2169856),?Serial0/1
P?20.1.1.0/24,?1?successors,?FD?is?128256,?serno?7
????????via?Connected,?Loopback1
P?20.1.3.0/24,?1?successors,?FD?is?128256,?serno?9
????????via?Connected,?Loopback3
Codes:?P?-?Passive,?A?-?Active,?U?-?Update,?Q?-?Query,?R?-?Reply,
???????r?-?reply?Status,?s?-?sia?Status?
P?20.1.2.0/24,?1?successors,?FD?is?128256,?serno?8
????????via?Connected,?Loopback2
P?23.1.1.0/24,?1?successors,?FD?is?2169856,?serno?131
????????via?Connected,?Serial0/1
P?30.1.3.0/24,?1?successors,?FD?is?2297856,?serno?142
????????via?23.1.1.3?(2297856/128256),?Serial0/1
????????via?12.1.1.1?(2809856/2297856),?Serial0/0
P?30.1.2.0/24,?1?successors,?FD?is?2297856,?serno?141
????????via?23.1.1.3?(2297856/128256),?Serial0/1
????????via?12.1.1.1?(2809856/2297856),?Serial0/0
P?30.1.1.0/24,?1?successors,?FD?is?2297856,?serno?140
????????via?23.1.1.3?(2297856/128256),?Serial0/1
????????via?12.1.1.1?(2809856/2297856),?Serial0/0我們發(fā)現(xiàn),如果R2通過R1去往R3的三個環(huán)回口,AD為2297856,F(xiàn)D為2809856,然而要成為Feasible Successor必須滿足可行條件(FC): AD of Second Best Route < FD of Best Route(后備路徑的AD < 當前的FD),現(xiàn)在通過R1前往的AD為2297856,和當前的FD=2297856相等,沒有滿足FC,所以R1不能成為Feasible Successor。
R2上作如下修改:
interface?Serial0/1
?bandwidth?128
clear?ip?eigrp?neighbor檢查R2的EIGRP拓撲表:
R2#show?ip?eigrp?topology?
IP-EIGRP?Topology?Table?for?AS(100)/ID(20.1.3.1)
Codes:?P?-?Passive,?A?-?Active,?U?-?Update,?Q?-?Query,?R?-?Reply,
???????r?-?reply?Status,?s?-?sia?Status?
P?10.1.3.0/24,?1?successors,?FD?is?2297856
????????via?12.1.1.1?(2297856/128256),?Serial0/0
P?10.1.2.0/24,?1?successors,?FD?is?2297856
????????via?12.1.1.1?(2297856/128256),?Serial0/0
P?10.1.1.0/24,?1?successors,?FD?is?2297856
????????via?12.1.1.1?(2297856/128256),?Serial0/0
P?12.1.1.0/24,?1?successors,?FD?is?2169856
????????via?Connected,?Serial0/0
P?13.1.1.0/24,?1?successors,?FD?is?2681856
????????via?12.1.1.1?(2681856/2169856),?Serial0/0
????????via?23.1.1.3?(21024000/2169856),?Serial0/1
P?20.1.1.0/24,?1?successors,?FD?is?128256
????????via?Connected,?Loopback1
P?20.1.3.0/24,?1?successors,?FD?is?128256
????????via?Connected,?Loopback3
P?20.1.2.0/24,?1?successors,?FD?is?128256
????????via?Connected,?Loopback2
P?23.1.1.0/24,?1?successors,?FD?is?20512000
Codes:?P?-?Passive,?A?-?Active,?U?-?Update,?Q?-?Query,?R?-?Reply,
???????r?-?reply?Status,?s?-?sia?Status?
????????via?Connected,?Serial0/1
????????via?12.1.1.1?(3193856/2681856),?Serial0/0
P?30.1.3.0/24,?1?successors,?FD?is?2809856
????????via?12.1.1.1?(2809856/2297856),?Serial0/0
????????via?23.1.1.3?(20640000/128256),?Serial0/1
P?30.1.2.0/24,?1?successors,?FD?is?2809856
????????via?12.1.1.1?(2809856/2297856),?Serial0/0
????????via?23.1.1.3?(20640000/128256),?Serial0/1
P?30.1.1.0/24,?1?successors,?FD?is?2809856
????????via?12.1.1.1?(2809856/2297856),?Serial0/0
????????via?23.1.1.3?(20640000/128256),?Serial0/1通過調(diào)整R2 Serial0/1接口的bandwidth之后,我們發(fā)現(xiàn)現(xiàn)在R2去往R3的三個環(huán)回口網(wǎng)段,Successor為R1,F(xiàn)easible Successor為R3,因為通過R3前往滿足可行條件(FC):128256 < 2809869。那是不是存在Feasible Successor的情況下EIGRP就能自動實現(xiàn)不等價負載均衡了呢?不會!我們來觀察R2的路由表:
R2#show?ip?route?eigrp?
?????10.0.0.0/24?is?subnetted,?3?subnets
D???????10.1.3.0?[90/2297856]?via?12.1.1.1,?00:00:13,?Serial0/0
D???????10.1.2.0?[90/2297856]?via?12.1.1.1,?00:00:13,?Serial0/0
D???????10.1.1.0?[90/2297856]?via?12.1.1.1,?00:00:13,?Serial0/0
?????13.0.0.0/24?is?subnetted,?1?subnets
D???????13.1.1.0?[90/2681856]?via?12.1.1.1,?00:00:13,?Serial0/0
?????30.0.0.0/24?is?subnetted,?3?subnets
D???????30.1.3.0?[90/2809856]?via?12.1.1.1,?00:00:13,?Serial0/0
D???????30.1.2.0?[90/2809856]?via?12.1.1.1,?00:00:13,?Serial0/0
D???????30.1.1.0?[90/2809856]?via?12.1.1.1,?00:00:13,?Serial0/0發(fā)現(xiàn)R2并沒有負載。 那存在Feasible Successor的情況下,EIGRP如何實現(xiàn)不等價負載均衡呢?我們要借助于variance參數(shù),并且必須滿足如下條件:
FS's FD < U*Successor's FD
當前Successor的FD為2809856,F(xiàn)easible Successor的FD為20640000,要滿足 以上公式U至少取8才行。對R2進行如下配置:
router?eigrp?100
?variance?8檢查R2的路由表:
R2#show?ip?route?eigrp?
?????10.0.0.0/24?is?subnetted,?3?subnets
D???????10.1.3.0?[90/2297856]?via?12.1.1.1,?00:00:04,?Serial0/0
D???????10.1.2.0?[90/2297856]?via?12.1.1.1,?00:00:04,?Serial0/0
D???????10.1.1.0?[90/2297856]?via?12.1.1.1,?00:00:04,?Serial0/0
?????13.0.0.0/24?is?subnetted,?1?subnets
D???????13.1.1.0?[90/21024000]?via?23.1.1.3,?00:00:04,?Serial0/1
?????????????????[90/2681856]?via?12.1.1.1,?00:00:04,?Serial0/0
?????30.0.0.0/24?is?subnetted,?3?subnets
D???????30.1.3.0?[90/20640000]?via?23.1.1.3,?00:00:04,?Serial0/1
????????????????[90/2809856]?via?12.1.1.1,?00:00:04,?Serial0/0
D???????30.1.2.0?[90/20640000]?via?23.1.1.3,?00:00:04,?Serial0/1
????????????????[90/2809856]?via?12.1.1.1,?00:00:04,?Serial0/0
D???????30.1.1.0?[90/20640000]?via?23.1.1.3,?00:00:04,?Serial0/1
????????????????[90/2809856]?via?12.1.1.1,?00:00:04,?Serial0/0發(fā)現(xiàn),R2去往R3的環(huán)回口是負載均衡的,雖然AD一樣,但是Metric值不一樣,不等價負載均衡。