본문 바로가기

Ryu's Tech

EIGRP의 Unequal Cost Load Balancing





R1#sh ip eigrp topology all-links
IP-EIGRP Topology Table for AS(100)/ID(10.1.1.9)

Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
       r - reply Status, s - sia Status

P 10.1.3.8/30, 1 successors, FD is 40640000, serno 16
        via 10.1.103.3 (40640000/128256), Serial1/1
        via 10.1.102.2 (41152000/40640000), Serial1/0
P 10.1.2.8/30, 1 successors, FD is 40640000, serno 9
        via 10.1.102.2 (40640000/128256), Serial1/0
        via 10.1.103.3 (41152000/40640000), Serial1/1
P 10.1.1.8/30, 1 successors, FD is 128256, serno 5
        via Connected, Loopback19
P 10.1.3.0/30, 1 successors, FD is 40640000, serno 14
        via 10.1.103.3 (40640000/128256), Serial1/1
        via 10.1.102.2 (41152000/40640000), Serial1/0
P 10.1.2.0/30, 1 successors, FD is 40640000, serno 7
        via 10.1.102.2 (40640000/128256), Serial1/0
        via 10.1.103.3 (41152000/40640000), Serial1/1
P 10.1.1.0/30, 1 successors, FD is 128256, serno 3
        via Connected, Loopback11
P 10.1.3.4/30, 1 successors, FD is 40640000, serno 15
        via 10.1.103.3 (40640000/128256), Serial1/1
         
Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
       r - reply Status, s - sia Status

        via 10.1.102.2 (41152000/40640000), Serial1/0
P 10.1.2.4/30, 1 successors, FD is 40640000, serno 8
        via 10.1.102.2 (40640000/128256), Serial1/0
        via 10.1.103.3 (41152000/40640000), Serial1/1
P 10.1.1.4/30, 1 successors, FD is 128256, serno 4
        via Connected, Loopback15
P 10.1.103.0/29, 1 successors, FD is 40512000, serno 2
        via Connected, Serial1/1
P 10.1.102.0/29, 1 successors, FD is 40512000, serno 1
        via Connected, Serial1/0
P 10.1.203.0/29, 2 successors, FD is 41024000, serno 13
        via 10.1.103.3 (41024000/40512000), Serial1/1
        via 10.1.102.2 (41024000/40512000), Serial1/0
R1#

이번에는 all-link를 붙이니 라우팅 테이블에서 본 정보들보다 훨씬 많은 경로가 보이네요?
이 차이는 경로가 Feasible Successor로 등록 되었느냐 아니냐의 차이입니다

R1과 R3를 이어주는 Link 빼고는 Bandwidth를 전부 128kbps로 바꿔보겠습니다.

그러고 이제 확인을 해 보죠.
라우팅 테이블에서는...


     10.0.0.0/8 is variably subnetted, 12 subnets, 2 masks
D       10.1.3.8/30 [90/21152000] via 10.1.102.2, 00:02:44, Serial1/0
D       10.1.2.8/30 [90/20640000] via 10.1.102.2, 00:02:48, Serial1/0
C       10.1.1.8/30 is directly connected, Loopback19
D       10.1.3.0/30 [90/21152000] via 10.1.102.2, 00:02:44, Serial1/0
D       10.1.2.0/30 [90/20640000] via 10.1.102.2, 00:02:48, Serial1/0
C       10.1.1.0/30 is directly connected, Loopback11
D       10.1.3.4/30 [90/21152000] via 10.1.102.2, 00:02:44, Serial1/0
D       10.1.2.4/30 [90/20640000] via 10.1.102.2, 00:02:48, Serial1/0
C       10.1.1.4/30 is directly connected, Loopback15
C       10.1.103.0/29 is directly connected, Serial1/1
C       10.1.102.0/29 is directly connected, Serial1/0
D       10.1.203.0/29 [90/21024000] via 10.1.102.2, 00:02:53, Serial1/0
R1#

경로가 하나
show ip eigrp topology all-link 를 사용하면?
P 10.1.3.0/30, 1 successors, FD is 21152000, serno 23
        via 10.1.102.2 (21152000/20640000), Serial1/0
        via 10.1.103.3 (40640000/128256), Serial1/1

자 그럼 이제 이 경로를 가지고 놀아 보겠습니다.

R1#sh ip eigrp topology 10.1.3.0/30
IP-EIGRP (AS 100): Topology entry for 10.1.3.0/30
  State is Passive, Query origin flag is 1, 1 Successor(s), FD is 21152000
  Routing Descriptor Blocks:
  10.1.102.2 (Serial1/0), from 10.1.102.2, Send flag is 0x0
      Composite metric is (21152000/20640000), Route is Internal
      Vector metric:
        Minimum bandwidth is 128 Kbit
        Total delay is 45000 microseconds
        Reliability is 255/255
        Load is 1/255
        Minimum MTU is 1500
        Hop count is 2
  10.1.103.3 (Serial1/1), from 10.1.103.3, Send flag is 0x0
      Composite metric is (40640000/128256), Route is Internal
      Vector metric:
        Minimum bandwidth is 64 Kbit
        Total delay is 25000 microseconds
        Reliability is 255/255
        Load is 1/255
        Minimum MTU is 1500
        Hop count is 1
R1#

21152000 / 20640000
40640000 / 128256

앞의 값이 FD ( Feasible Distance ) 뒤의 값이 AD (Advertisement Distance ) 혹은 RD (Reported Distance) 라고 합니다.
두 값 모두 목적지까지의 경로로 가는 메트릭을 계산한 값인데 FD는 라우터 자신을 기준으로 하여 계산한 값이고,
AD/RD는 목적지로 가는 다음홉의 라우터 (이웃) 를 기준으로 계산한 값입니다. 당연히 FD > AD(RD)는 당연한 말이겠죠.

그렇다면 위의 두 경로를 Load Balancing 하는 방법을 한번 보겠습니다.


R1(config-router)#do debug ip eigrp 100
IP-EIGRP Route Events debugging is on
R1(config-router)#variance 2
R1(config-router)#do clear ip route *
R1(config-router)#
*Mar  1 00:40:04.991: IP-EIGRP(Default-IP-Routing-Table:100): route installed for 10.1.3.0  ()
*Mar  1 00:40:04.995: IP-EIGRP(Default-IP-Routing-Table:100): route installed for 10.1.3.0  ()
두 경로가 올라왔죠?

     10.0.0.0/8 is variably subnetted, 12 subnets, 2 masks
D       10.1.3.8/30 [90/40640000] via 10.1.103.3, 00:00:44, Serial1/1
                    [90/21152000] via 10.1.102.2, 00:00:44, Serial1/0
D       10.1.2.8/30 [90/20640000] via 10.1.102.2, 00:00:44, Serial1/0
C       10.1.1.8/30 is directly connected, Loopback19
D       10.1.3.0/30 [90/40640000] via 10.1.103.3, 00:00:44, Serial1/1
                    [90/21152000] via 10.1.102.2, 00:00:44, Serial1/0
D       10.1.2.0/30 [90/20640000] via 10.1.102.2, 00:00:44, Serial1/0
C       10.1.1.0/30 is directly connected, Loopback11
D       10.1.3.4/30 [90/40640000] via 10.1.103.3, 00:00:44, Serial1/1
                    [90/21152000] via 10.1.102.2, 00:00:44, Serial1/0
D       10.1.2.4/30 [90/20640000] via 10.1.102.2, 00:00:44, Serial1/0
C       10.1.1.4/30 is directly connected, Loopback15
C       10.1.103.0/29 is directly connected, Serial1/1
C       10.1.102.0/29 is directly connected, Serial1/0
D       10.1.203.0/29 [90/41024000] via 10.1.103.3, 00:00:44, Serial1/1
                      [90/21024000] via 10.1.102.2, 00:00:44, Serial1/0
R1#
라우팅 테이블도 전체적으로 Unequal cost Load Balancing이 되고 있는 것을 볼 수 있습니다.

위와 같이 확인!

R1#ping 10.1.3.1 repeat 10

Type escape sequence to abort.
Sending 10, 100-byte ICMP Echos to 10.1.3.1, timeout is 2 seconds:
!!!!!!!!!!
Success rate is 100 percent (10/10), round-trip min/avg/max = 12/51/80 ms
R1#
*Mar  1 00:41:38.755: IP: s=10.1.102.1 (local), d=10.1.3.1 (Serial1/0), len 100, sending
*Mar  1 00:41:38.819: IP: s=10.1.102.1 (local), d=10.1.3.1 (Serial1/0), len 100, sending
*Mar  1 00:41:38.883: IP: s=10.1.103.1 (local), d=10.1.3.1 (Serial1/1), len 100, sending
*Mar  1 00:41:38.947: IP: s=10.1.103.1 (local), d=10.1.3.1 (Serial1/1), len 100, sending
*Mar  1 00:41:38.995: IP: s=10.1.103.1 (local), d=10.1.3.1 (Serial1/1), len 100, sending
*Mar  1 00:41:39.071: IP: s=10.1.103.1 (local), d=10.1.3.1 (Serial1/1), len 100, sending
*Mar  1 00:41:39.151: IP: s=10.1.103.1 (local), d=10.1.3.1 (Serial1/1), len 100, sending
*Mar  1 00:41:39.195: IP: s=10.1.103.1 (local), d=10.1.3.1 (Serial1/1), len 100, sending
*Mar  1 00:41:39.211: IP: s=10.1.103.1 (local), d=10.1.3.1 (Serial1/1), len 100, sending
*Mar  1 00:41:39.227: IP: s=10.1.103.1 (local), d=10.1.3.1 (Serial1/1), len 100, sending
R1#

아까보단 덜 규칙적이지만 로드밸런싱이 되고 있는 것을 확인할 수 있군요~


정리를 해보자면

위의 Variance 커맨드는 unequal load balancing을 가능하게 해 주는 명령어 인데요


    Successor 는 라우팅 테이블에 올라오는 경로.

    Feasible Successor는 최적의 경로보다는 쪼끔 모자라는 경로 ( Successor의 FD 값 > 후보의 AD 값 )


    FD = 목적지까지의 총 메트릭


    AD,RD = 다음홉부터 목적지까지의 총 메트릭


    variance 1 (default)

    디폴트 상태에서는 Metric이 같을 경우에만 Load balancing이 가능
    즉, FD=FD 여야지만 라우팅 테이블에 나란히 올라옴

    variance X
    Successor의 FD값에 X를 곱해서 Feasible Successor 중에서 Successor FD * X > 후보의 FD 가 성립하면
    로드밸런싱을 한다.