본문 바로가기

Ryu's Tech

EIGRP 동작 순서, Hello-interval Timer, Hold-down Timer, Neighbor의 관계

EIGRP의 동작




위와 같은 순서로 동작이 되는데, 이를 실제로 Dynamips에서 동작해 보도록 하겠습니다.

먼저 토폴로지를 보여드리겠습니다.





기본설정은 생략하도록 하겠습니다.

그리고 이제 R1에서 디버그를 켜고 EIGRP를 활성화 시켜 보겠습니다.

debug eigrp packets 로 eigrp에 대한 모든 패킷을 알 수 있습니다.


conf t
!
router eigrp 1
no auto-summary
network 10.0.0.0
end


R1#
*Mar  1 00:14:42.651: EIGRP: Sending HELLO on FastEthernet0/0
*Mar  1 00:14:42.651:   AS 1, Flags 0x0, Seq 0/0 idbQ 0/0 iidbQ un/rely 0/0
*Mar  1 00:14:42.655: EIGRP: Sending HELLO on Serial1/0
*Mar  1 00:14:42.655:   AS 1, Flags 0x0, Seq 0/0 idbQ 0/0 iidbQ un/rely 0/0
*Mar  1 00:14:42.659: EIGRP: Sending HELLO on Loopback1
*Mar  1 00:14:42.659:   AS 1, Flags 0x0, Seq 0/0 idbQ 0/0 iidbQ un/rely 0/0
*Mar  1 00:14:42.667: EIGRP: Received HELLO on Loopback1 nbr 10.1.1.1
*Mar  1 00:14:42.671:   AS 1, Flags 0x0, Seq 0/0 idbQ 0/0
*Mar  1 00:14:42.671: EIGRP: Packet from ourselves ignored
R1#
*Mar  1 00:14:46.979: EIGRP: Sending HELLO on Loopback1
*Mar  1 00:14:46.979:   AS 1, Flags 0x0, Seq 0/0 idbQ 0/0 iidbQ un/rely 0/0
*Mar  1 00:14:46.983: EIGRP: Received HELLO on Loopback1 nbr 10.1.1.1
*Mar  1 00:14:46.983:   AS 1, Flags 0x0, Seq 0/0 idbQ 0/0
*Mar  1 00:14:46.987: EIGRP: Packet from ourselves ignored
*Mar  1 00:14:47.259: EIGRP: Sending HELLO on FastEthernet0/0
*Mar  1 00:14:47.259:   AS 1, Flags 0x0, Seq 0/0 idbQ 0/0 iidbQ un/rely 0/0
*Mar  1 00:14:47.515: EIGRP: Sending HELLO on Serial1/0
*Mar  1 00:14:47.515:   AS 1, Flags 0x0, Seq 0/0 idbQ 0/0 iidbQ un/rely 0/0
R1#
*Mar  1 00:14:51.851: EIGRP: Sending HELLO on Serial1/0
*Mar  1 00:14:51.851:   AS 1, Flags 0x0, Seq 0/0 idbQ 0/0 iidbQ un/rely 0/0
*Mar  1 00:14:51.895: EIGRP: Sending HELLO on FastEthernet0/0
*Mar  1 00:14:51.895:   AS 1, Flags 0x0, Seq 0/0 idbQ 0/0 iidbQ un/rely 0/0
*Mar  1 00:14:51.927: EIGRP: Sending HELLO on Loopback1
*Mar  1 00:14:51.927:   AS 1, Flags 0x0, Seq 0/0 idbQ 0/0 iidbQ un/rely 0/0
*Mar  1 00:14:51.935: EIGRP: Received HELLO on Loopback1 nbr 10.1.1.1
*Mar  1 00:14:51.935:   AS 1, Flags 0x0, Seq 0/0 idbQ 0/0
*Mar  1 00:14:51.939: EIGRP: Packet from ourselves ignored
R1#
*Mar  1 00:14:56.183: EIGRP: Sending HELLO on Serial1/0
*Mar  1 00:14:56.183:   AS 1, Flags 0x0, Seq 0/0 idbQ 0/0 iidbQ un/rely 0/0
*Mar  1 00:14:56.539: EIGRP: Sending HELLO on Loopback1
*Mar  1 00:14:56.539:   AS 1, Flags 0x0, Seq 0/0 idbQ 0/0 iidbQ un/rely 0/0
*Mar  1 00:14:56.547: EIGRP: Received HELLO on Loopback1 nbr 10.1.1.1
*Mar  1 00:14:56.547:   AS 1, Flags 0x0, Seq 0/0 idbQ 0/0
*Mar  1 00:14:56.547: EIGRP: Packet from ourselves ignored
*Mar  1 00:14:56.803: EIGRP: Sending HELLO on FastEthernet0/0
*Mar  1 00:14:56.803:   AS 1, Flags 0x0, Seq 0/0 idbQ 0/0 iidbQ un/rely 0/0
R1#
R1#
R1#
*Mar  1 00:15:00.839: EIGRP: Sending HELLO on Loopback1
*Mar  1 00:15:00.839:   AS 1, Flags 0x0, Seq 0/0 idbQ 0/0 iidbQ un/rely 0/0
*Mar  1 00:15:00.847: EIGRP: Received HELLO on Loopback1 nbr 10.1.1.1
*Mar  1 00:15:00.851:   AS 1, Flags 0x0, Seq 0/0 idbQ 0/0
*Mar  1 00:15:00.851: EIGRP: Packet from ourselves ignored
*Mar  1 00:15:01.131: EIGRP: Sending HELLO on Serial1/0
*Mar  1 00:15:01.131:   AS 1, Flags 0x0, Seq 0/0 idbQ 0/0 iidbQ un/rely 0/0
*Mar  1 00:15:01.611: EIGRP: Sending HELLO on FastEthernet0/0
*Mar  1 00:15:01.611:   AS 1, Flags 0x0, Seq 0/0 idbQ 0/0 iidbQ un/rely 0/0
R1#un all

같은 메세지의 반복이긴 한데 몇몇 부분을 보겠습니다.
보시는데로 Hello 패킷을 죽어라 날리는 것을 볼 수 있네요

*Mar  1 00:15:00.839: EIGRP: Sending HELLO on Loopback1
*Mar  1 00:15:00.847: EIGRP: Received HELLO on Loopback1 nbr 10.1.1.1

딱 보니 아시겠죠? Loopback 1 인터페이스에서 Hello 패킷을 주고 받는 것을 볼 수 있습니다.

그리고 나머지를 정리를 해보겠습니다.
*Mar  1 00:14:42.659: EIGRP: Sending HELLO on Loopback1
*Mar  1 00:14:42.667: EIGRP: Received HELLO on Loopback1 nbr 10.1.1.1
*Mar  1 00:14:46.979: EIGRP: Sending HELLO on Loopback1
*Mar  1 00:14:46.983: EIGRP: Received HELLO on Loopback1 nbr 10.1.1.1
*Mar  1 00:14:51.927: EIGRP: Sending HELLO on Loopback1
*Mar  1 00:14:51.935: EIGRP: Received HELLO on Loopback1 nbr 10.1.1.1
*Mar  1 00:14:56.539: EIGRP: Sending HELLO on Loopback1
*Mar  1 00:14:56.547: EIGRP: Received HELLO on Loopback1 nbr 10.1.1.1
*Mar  1 00:15:00.839: EIGRP: Sending HELLO on Loopback1
*Mar  1 00:15:00.847: EIGRP: Received HELLO on Loopback1 nbr 10.1.1.1

Loopback 만 쭉 모아봤습니다. Loopback 주소이기 때문에 바로바로 Hello에 대한 Hello로 응답해 주는것을 볼 수 있죠?

*Mar  1 00:14:42.651: EIGRP: Sending HELLO on FastEthernet0/0
*Mar  1 00:14:42.655: EIGRP: Sending HELLO on Serial1/0
*Mar  1 00:14:42.671: EIGRP: Packet from ourselves ignored
*Mar  1 00:14:46.987: EIGRP: Packet from ourselves ignored
*Mar  1 00:14:47.259: EIGRP: Sending HELLO on FastEthernet0/0
*Mar  1 00:14:47.515: EIGRP: Sending HELLO on Serial1/0
*Mar  1 00:14:51.851: EIGRP: Sending HELLO on Serial1/0
*Mar  1 00:14:51.895: EIGRP: Sending HELLO on FastEthernet0/0
*Mar  1 00:14:51.939: EIGRP: Packet from ourselves ignored
*Mar  1 00:14:56.183: EIGRP: Sending HELLO on Serial1/0
*Mar  1 00:14:56.547: EIGRP: Packet from ourselves ignored
*Mar  1 00:14:56.803: EIGRP: Sending HELLO on FastEthernet0/0
*Mar  1 00:15:00.851: EIGRP: Packet from ourselves ignored
*Mar  1 00:15:01.131: EIGRP: Sending HELLO on Serial1/0
*Mar  1 00:15:01.611: EIGRP: Sending HELLO on FastEthernet0/0

여기를 보시면 Hello를 5초마다 계속해서 보내는 것을 알 수 있습니다.

R1(config-if)#ip hello-interval eigrp 1 5

이러한 방식으로 Hello-interval timer를 조절할 수 있습니다.
설정을 할 인터페이스에서
ip hello-interval eigrp [as number] [seconds]

그러고 패킷이 무시당했다는 것도 뜨네요. 그렇다면 반대편에서 eigrp를 잡아 준다면 neighbor를 맺는 것을 볼 수 있겠군요~
한번 해보도록 하겠습니다.


R1에서 보겠습니다.

*Mar  1 00:35:57.275: EIGRP: Received HELLO on FastEthernet0/0 nbr 10.1.100.2
*Mar  1 00:35:57.279: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 1: Neighbor 10.1.100.2 (FastEthernet0/0) is up: new adjacency
여기서 Hello를 받으면서 FA0/0으로 연결된 인터페이스로 neighbor를 맺는 것을 볼 수 있네요.
*Mar  1 00:35:57.283: EIGRP: Enqueueing UPDATE on FastEthernet0/0 nbr 10.1.100.2 iidbQ un/rely 0/1 peerQ un/rely 0/0 serno 1-3

Enqueueing은 queue가 줄이죠? 줄을 세워놓는다고 생각하시면 됩니다. update를 보내려고 레디를 박고 있는거죠.
*Mar  1 00:35:57.299: EIGRP: Requeued unicast on FastEthernet0/0

*Mar  1 00:35:57.307: EIGRP: Sending UPDATE on FastEthernet0/0 nbr 10.1.100.2
*Mar  1 00:35:59.311: EIGRP: Sending UPDATE on FastEthernet0/0 nbr 10.1.100.2, retry 1, RTO 3000
자 이제 업데이트를 드디어 보내는군요^^ 한번 재시도는 하였지만 ( 재시도한 이유는 모르겠지만 아무튼... ) 제대로 보냈네요.
*Mar  1 00:35:59.623: EIGRP: Sending HELLO on FastEthernet0/0

*Mar  1 00:35:59.699: EIGRP: Received UPDATE on FastEthernet0/0 nbr 10.1.100.2
*Mar  1 00:36:01.703: EIGRP: Received UPDATE on FastEthernet0/0 nbr 10.1.100.2
자 이제 드디어 업데이트를 받는 것을 볼 수 있네요.
그런데 아직까지는 ACK가 없는 것을 보니 데이터를 다 주고 받진 않은 것 같네요.
*Mar  1 00:36:02.315: EIGRP: Sending UPDATE on FastEthernet0/0 nbr 10.1.100.2, retry 2, RTO 4500

여기서 보시면 UPdate를 보내고...
*Mar  1 00:36:02.423: EIGRP: Received ACK on FastEthernet0/0 nbr 10.1.100.2

드디어 ACK를 받는군요.
*Mar  1 00:36:02.427: EIGRP: Received UPDATE on FastEthernet0/0 nbr 10.1.100.2
이제 Update를 이쪽도 받아야겠죠~?^^
*Mar  1 00:36:02.435: EIGRP: Enqueueing ACK on FastEthernet0/0 nbr 10.1.100.2
*Mar  1 00:36:02.443: EIGRP: Sending ACK on FastEthernet0/0 nbr 10.1.100.2
ACK를 준비하고 보내게 됩니다.^^
*Mar  1 00:36:10.763: EIGRP: Received HELLO on FastEthernet0/0 nbr 10.1.100.2

*Mar  1 00:36:10.927: EIGRP: Sending HELLO on Loopback1
*Mar  1 00:36:10.927: EIGRP: Received HELLO on Loopback1 nbr 10.1.1.1
*Mar  1 00:36:10.927: EIGRP: Packet from ourselves ignored
*Mar  1 00:36:11.435: EIGRP: Received HELLO on Serial1/0 nbr 10.1.200.2
R1#un all

그냥 맨 위의 이미지를 보시면, 간단해 보이지만 실제로는 꽤나 복잡하군요!
이렇게 세세하게 debug까지 해 보는 것이 필요 없어 보이지만, neighbor를 맺지 못할때 이러한 방법으로 trouble shooting을 하기 위해서는 익숙해 지시는 것이 좋습니다.

아무튼 이제 R3도 마저 셋팅을 끝내고...

확인을 해봐야겠죠?! 셋팅만큼 중요한 것이 확인입니다.
R1#sh ip eigrp neighbors
IP-EIGRP neighbors for process 1
H   Address                 Interface       Hold Uptime   SRTT   RTO  Q  Seq
                                            (sec)         (ms)       Cnt Num
2   10.1.100.3              Fa0/0             13 00:00:20   80   480  0  4
1   10.1.200.2              Se1/0             11 00:11:52   27   200  0  7
0   10.1.100.2              Fa0/0             14 00:11:52   69   414  0  6
R1#

연결된 상대방 인터페이스의 IP가 나오는 군요.

Hold (sec) 타이머가 실시간으로 깍이다가 올라갔다가 하는데요 이건 Hold-down Timer 라고 하는 것입니다.
연결이 제대로 되어 있는지 EIGRP는 Hello 패킷을 통해서 계속 ` 확인을 하죠. 그리고 EIGRP는 이 패킷을 받으면 이 타이머를 리셋 시킵니다. default 값은 15초구요. 역시나 아래와 같이 설정해 줄 수 있습니다. hold-down timer를 60초(1분)으로 하겠다는 말이죠.
R1(config-if)#ip hold-time eigrp 1 60
hold-down timer는 hello-timer의 3배를 주는 것이 일반적입니다. 3번의 hello 패킷을 날릴 시간을 주는 거죠.
그렇다면 hello를 받지 못한다면 어떻게 되는지 볼까요?



위 부분의 인터페이스의 hello-interval timer를 30초로 줘버리면 되겠군요.
한번 해보겠습니다.


R2(config-if)#ip hello-interval eigrp 1 30
R2(config-if)#


다시 R1으로 와서 기다려보겠습니다.

R1#sh ip eigrp nei
IP-EIGRP neighbors for process 1
H   Address                 Interface       Hold Uptime   SRTT   RTO  Q  Seq
                                            (sec)         (ms)       Cnt Num
2   10.1.100.3              Fa0/0             10 00:06:42   80   480  0  4
1   10.1.200.2              Se1/0              5 00:18:14   27   200  0  7
0   10.1.100.2              Fa0/0             14 00:18:14   69   414  0  6
R1#

R1#sh ip eigrp nei
IP-EIGRP neighbors for process 1
H   Address                 Interface       Hold Uptime   SRTT   RTO  Q  Seq
                                            (sec)         (ms)       Cnt Num
2   10.1.100.3              Fa0/0             11 00:06:46   80   480  0  4
1   10.1.200.2              Se1/0              1 00:18:18   27   200  0  7
0   10.1.100.2              Fa0/0             10 00:18:18   69   414  0  6
R1#sh ip eigrp nei
IP-EIGRP neighbors for process 1
H   Address                 Interface       Hold Uptime   SRTT   RTO  Q  Seq
                                            (sec)         (ms)       Cnt Num
2   10.1.100.3              Fa0/0             14 00:06:46   80   480  0  4
1   10.1.200.2              Se1/0              0 00:18:19   27   200  0  7
0   10.1.100.2              Fa0/0             14 00:18:19   69   414  0  6
R1#
*Mar  1 00:54:17.167: EIGRP: Holdtime expired
*Mar  1 00:54:17.167: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 1: Neighbor 10.1.200.2 (Serial1/0) is down: holding time expired
R1#sh ip eigrp nei
IP-EIGRP neighbors for process 1
H   Address                 Interface       Hold Uptime   SRTT   RTO  Q  Seq
                                            (sec)         (ms)       Cnt Num
2   10.1.100.3              Fa0/0             13 00:06:48   80   480  0  4
0   10.1.100.2              Fa0/0             13 00:18:20   69   414  0  6
R1#
*Mar  1 00:54:17.179: EIGRP: Neighbor 10.1.200.2 went down on Serial1/0
*Mar  1 00:54:18.043: EIGRP: Packet from ourselves ignored
R1#un all
All possible debugging has been turned off
R1#


보이시죠? holdtime가 만기되고 neighbor를 끊어 버립니다.
eigrp neighbor table에서도 삭제 되었네요^^


아무튼 이정도로 하고 이제 Routing Table을 보겠습니다.



R1#sh ip route eigrp
     10.0.0.0/24 is subnetted, 5 subnets
D       10.1.3.0 [90/156160] via 10.1.100.3, 00:02:02, FastEthernet0/0
D       10.1.2.0 [90/156160] via 10.1.100.2, 00:00:11, FastEthernet0/0
R1#

흠... 하나씩 보면 D는 EIGRP를 말하는 것이고,
10.1.3.0 은 목적지 네트워크 [ AD / Metric ] 이렇습니다. 뒤의 via는 ~~을 통해서 라는 뜻이구요
그렇다면 metric을 한번 보도록 하겠습니다. R2와 R3의 Loopback address로 가는 Metric이 156160이군요... 한번 계산해 볼까요??

일단 FastEthernet을 통해서 나가므로... 인터페이스의 정보를 볼까요?
R1#sh int fa0/0
FastEthernet0/0 is up, line protocol is up
  Hardware is AmdFE, address is cc00.0944.0000 (bia cc00.0944.0000)
  Internet address is 10.1.100.1/24
  MTU 1500 bytes, BW 100000 Kbit, DLY 100 usec,
     reliability 255/255, txload 1/255, rxload 1/255
  Encapsulation ARPA, loopback not set
  Keepalive set (10 sec)
  Full-duplex, 100Mb/s, 100BaseTX/FX
  ARP type: ARPA, ARP Timeout 04:00:00
  Last input 00:00:02, output 00:00:01, output hang never
  Last clearing of "show interface" counters never
  Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
  Queueing strategy: fifo
  Output queue: 0/40 (size/max)
  5 minute input rate 1000 bits/sec, 0 packets/sec
  5 minute output rate 0 bits/sec, 0 packets/sec
     575 packets input, 69402 bytes
     Received 563 broadcasts, 0 runts, 0 giants, 0 throttles
     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
     0 watchdog
     0 input packets with dribble condition detected
     935 packets output, 78638 bytes, 0 underruns
     0 output errors, 0 collisions, 1 interface resets
     0 babbles, 0 late collision, 0 deferred
     0 lost carrier, 0 no carrier
     0 output buffer failures, 0 output buffers swapped out
R1#

R2#show interfaces loopback 2
Loopback2 is up, line protocol is up
  Hardware is Loopback
  Internet address is 10.1.2.1/24
  MTU 1514 bytes, BW 8000000 Kbit, DLY 5000 usec,
     reliability 255/255, txload 1/255, rxload 1/255
  Encapsulation LOOPBACK, loopback not set
  Last input 00:00:01, output never, output hang never
  Last clearing of "show interface" counters never
  Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
  Queueing strategy: fifo
  Output queue: 0/0 (size/max)
  5 minute input rate 0 bits/sec, 0 packets/sec
  5 minute output rate 0 bits/sec, 0 packets/sec
     0 packets input, 0 bytes, 0 no buffer
     Received 0 broadcasts, 0 runts, 0 giants, 0 throttles
     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
     50 packets output, 3000 bytes, 0 underruns
     0 output errors, 0 collisions, 0 interface resets
     0 output buffer failures, 0 output buffers swapped out
R2#

EIGRP의 메트릭 값은... 복잡하지만 결국 Bandwidth와 Delay만 사용하죠.
그럼 한번 계산해 보겠습니다.
[{(10^7)/가장낮은 Bandwidth } + {모든 Delay값의 합}] x 256

delay는 단위가 다르므로, 계산하실때는 0을 하나 빼시면 됩니다.
그렇다면
[ { ( 10^7 ) / 100000} +  { 10 + 500 } ] x 256
[ { ( 10^2 ) }             + { 510 } ]        x 256
[610] x 256 = 156160

결과는...

D       10.1.3.0 [90/156160] via 10.1.100.3, 00:02:02, FastEthernet0/0

와우 똑같네요!!!!!!!!!!!
이 맛에 계산을 합니다.

아무튼... 오늘은 이까지만 하도록 하겠습니다.



  • 내용만 많지만... 결론은 아주 간단합니다.
    • EIGRP는 라우팅 프로토콜을 enable 시키면, Hello을 자꾸 보낸다.
    • Hello를 보내는 Link에서 Hello를 주고 받으면 바로 Neighbor(이웃)이 된다.
    • 이웃이 되고 나서 서로 Update를 주고 받는다.
    • 이웃이 되고 나면 Hold-down timer가 있어서, 계속 Hello를 해주지 않으면 친구삭제를 해버린다.
  • 그리고는 Timer 조절
    • Router(config-if)#ip hello-interval eigrp [AS Number] [초단위 시간]
    • R1(config-if)#ip hold-time eigrp [AS Number] [초단위 시간]
  • 마지막으로 Metric 값
    • 바로 위에 있네요;;ㅋㅋ

결론적으로 EIGRP는 생각보다 간단한 놈인것을 알 수 있습니다.