본문으로 바로가기

[실습 환경]

 

 

0. EIGRP(Enhanced Interior Gateway Routing Protocol)

 

 - Cisco 전용 라우팅 프로토콜
 - Advanced Distance Vector
 - Classless Routing Protocol
 - VLSM, CIDR
 - auto-summary -> no auto-summary,
 - IGP

 - 224.0.0.10 멀티캐스트 주소를 사용

 - 88번 프로토콜을 사용

 - Procees-ID로 사용해야 한다.(autonomous System Number)를 사용하여야 한다.... 자율 시스템 번호는 라우터들의 집합 번호이다.

 - RTP 프로토콜을 사용,,, 신뢰성과 비신뢰성의 패킷전달 기능을 모두 가지고 있다. 제 4계층에 해당

   예를 들어서 송신측은 수신측으로부터 ACK확인을 필요로 하지만 비신뢰성연결으로 패킷을 전달할 경우 필요하지 않고, 멀티캐스트나 유니케스트로 패킷전달가능

- 헬로라는 패킷을 보내 이웃하는 라우터와 인접성을 맺은 후 라우팅 테이블을 교환한다.(네이버성립)

 - 토폴로지 테이블이라는 것이 있는데 이 경로들 중 Dual 알고리즘을 이용하여 가장 좋은 경로를 선출되어 라우팅 테이블에 등록되는 것이다

 

 

 

 

 1. EIGRP 설정----> 와일드 카드 마스크 사용 가능

 

Router(config)# router eigrp [1~65535 AS Number]
Router(config-router)# no auto-summary
Router(config-router)# network A.0.0.0 (와일드카드 마스크)
Router(config-router)# network B.B.0.0
Router(config-router)# network C.C.C.0
Router(config-router)# passive-interface [Interface Name] ----> 해당 인터페이스로 라우팅 정보를 보내지 않게 한다.

그렇다고 해서 해당 인터페이스가 라우팅 테이블에 안올라가지는 않는다.

 

 - 설정시 주의 사항 : AS 번호가 동일해야지만, 네이버 성립 및 라우팅 업데이트 가능

 

 

2. 네이버 성립 및 라우팅 업데이트

 

 - 네이버 성립 -> 라우팅 업데이트 실시
 - 주기적인 전체 라우팅 업데이트 X -> 추가된 부분만 라우팅 업데이트 실시(증분 업데이트)

 

 

 


3. 네이버 성립 조건

 

 - AS 번호 동일
 - K 상수 동일

 

R1#show ip protocols --------> rip가 마찬가지로 여러 정보 확인 가능
Routing Protocol is "eigrp 100"
  Outgoing update filter list for all interfaces is not set
  Incoming update filter list for all interfaces is not set
  Default networks flagged in outgoing updates
  Default networks accepted from incoming updates
  EIGRP metric weight K1=1, K2=0, K3=1, K4=0, K5=0
  EIGRP maximum hopcount 100
~ 중간 생략 ~

 

 

 


4. EIGRP 패켓 유형

 

 - Hello : 네이버 관계 성립하기 위해서 교환하는 패켓, 주기적인 교환으로 네이버 관계 유지
 - Update : 네이버 관계를 성립한 라우터 간에 라우팅 업데이트를 실시할때 사용하는 패켓
 - Query : EIGRP 네트워크 장애 발생시, 네이버 라우터에게 도달 불가능한 정보 및 대체 경로를 질의 패켓
 - Reply : Query 패켓에 대한 응답을 할때 사용하는 패켓
 - Ack : Update, Query, Reply 수신을 확인하기 위해서 전송하는 패켓

 

 

 

 

eigrp 동작 과정

 

EIGRP동작과정(1)
     - EIGRP가 라우팅 경로를 계산하는 절차 -
           1)Hello packet을 인접 Router가 서로 교환Neighbor관계를 맺고 Neighbor table을 생성한다
           2)Update packet을 통해 라우팅 정보를 교환하고 Topology table을 생성한다.

           3)Topology table 정보를 종합해서 라우팅 경로를 계산하고 Best path를 Routing table에 저장한다.

 

       R1 ---------------------------------------------------- R2

     HELLO    -------------------------------------------->

             <-------------------------------------------------UPDATE : update할때 topology table을 생성한다. 그후 최적경로를 선출하여 라우팅 테이블에 저장

     ACK---------------------------------------------------->


EIGRP동작과정 예(2)

     - 특정 네트워크로 가는 경로 또는 인접 Router가 다운되었을때 -

 

         1)R1은 R2에게 ACK 전송

         2)R1은 R2에게 EIGRP query메세지를 전송(R1으로 전송할수 있는지 query메세지를 보낸다)

         3)R2는 EIGRP query를 수신하였다는 Ack를 보내고 이에 대한 응답으로 reply를 보낸다.

         4)R1은 EIGRO Reply를 수신하였다는 ACK를 보낸다


5. EIGRP 토폴로지 테이블 ---> EIGRP DUAL(diffusing Update algorithm)알고리즘을 사용

 

 - 라우팅 테이블에 등록하기 이전에, EIGRP 경로가 관리되는 테이블
 - 토폴로지 테이블 등록된 경로 중에, 최적 경로만 라우팅 테이블에 등록됨

 

R1#show ip eigrp topology
IP-EIGRP Topology Table for AS(100)/ID(172.16.1.1)

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

~ 중간 생략 ~

 

P 13.13.30.0/24, 1 successors, FD is 2707456
        via 13.13.12.2 (2707456/2195456), Serial1/0
P 172.16.1.0/24, 1 successors, FD is 128256
        via Connected, Loopback172
P 172.16.3.0/24, 1 successors, FD is 2809856
        via 13.13.12.2 (2809856/2297856), Serial1/0

 

 - P   : Passive 상태, 경로 계산이 완료된 상태 -> 라우팅 테이블 등록 O
 - A   : Active 상태, 경로 계산이 진행되는 상태 -> 라우팅 테이블 등록 X


 - 13.13.30.0/24  : 목적지 네트워크 이름
 - successors  : 최적 경로 상에 이웃 라우터 = 최적 경로
 - FD is 2707456  : 로컬 라우터에서 목적지까지 EIGRP 메트릭 feasibie Distance(유효거리)
 - via 13.13.12.2  : 경유하는 라우터 = 넥스트-홉 라우터
 - (2707456/  : FD 메트릭, 로컬 라우터에서 목적지까지 EIGRP 메트릭
 - /2195456) : AD 메트릭, 네이버 라우터에서 목적지까지 EIGRP 메트릭 advanced distance(광고거리)
 -Serial1/0 : 목적지 네트워크로 나가기 위한 출국 인터페이스

 

 

6. EIGRP Dual 알고리즘

 

 - EIGRP 토폴로지 정보를 기반으로 경로를 선출하는 알고리즘
 - EIGRP 경로 선출 과정

 

 ① 최적 경로 선출 : FD 메트릭(거리)이 가장 작은 경로
 ② 후속 경로 선출 : 최적 경로 FD > AD 작은 경로

 

Ex) 다음 중 후속 경로가 있는 경우는 몇번인가? ②

 

Router#show ip eigrp topology all-link

① P 172.16.3.0/24, 1 successors, FD is 2809856
         via 13.13.12.2 (2809856/2297856), Serial1/0
         via 13.13.13.3 (2993144/2809856), Serial1/1

 

② P 172.16.3.0/24, 1 successors, FD is 2809856
         via 13.13.12.2 (2809856/2297856), Serial1/0
         via 13.13.13.3 (2993144/1809856), Serial1/1

 

③ P 172.16.3.0/24, 1 successors, FD is 2809856
         via 13.13.12.2 (2809856/2297856), Serial1/0
         via 13.13.13.3 (3193144/2909856), Serial1/1

 

④ P 172.16.3.0/24, 2 successors, FD is 2809856
         via 13.13.12.2 (2809856/2297856), Serial1/0
         via 13.13.13.3 (2809856/2297856), Serial1/0 

 

 

7. EIGRP 메트릭

 

 - Bandwidth & Delay 값을 기반으로 계산함

 - Vector 메트릭 : MTU, Bandwidth, Delay, reliability, load
 - K 상수  : K1=1, K2=0, K3=1, K4=0, K5=0

 

R1#show int s1/0
Serial1/0 is up, line protocol is up
  Hardware is M4T
  Internet address is 13.13.12.1/24
  MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec,
     reliability 255/255, txload 1/255, rxload 1/255

 

R1#show ip protocols
Routing Protocol is "eigrp 100"
  Outgoing update filter list for all interfaces is not set
  Incoming update filter list for all interfaces is not set
  Default networks flagged in outgoing updates
  Default networks accepted from incoming updates
  EIGRP metric weight K1=1, K2=0, K3=1, K4=0, K5=0

 


 - EIGRP 메트릭 계산 방법

 

[K1 x Bandwidth + K2 x Bandwidth / (256 - Load) + K3 x Delay] x 256

[1 x Bandwidth + 0 x Bandwidth / (256 - Load) + 1 x Delay] x 256

[Bandwidth + 0 + Delay] x 256

[Bandwidth + Delay] x 256

 

 Bandwidth = 10^10 / 목적지까지 가장 작은 Bandwidth(bps)
 Delay = 목적지까지 합산 Delay / 10

 


Ex) R1에서 '13.13.30.0/24' 메트릭 계산

 

    BW 1544k, DLY 20000 usec        BW 1544k, DLY 20000 usec     BW 10000k, DLY 1000 usec
R1---------------------------R2---------------------------R3------------------------| 13.13.30.0/24

 

 

 Bandwidth = 10^10 / 1544000 = 6476
 Delay = 41000 / 10 = 4100

 EIGRP Metric = [6476 + 4100] x 256 = 10576 x 256 = 2707456

 

R1#show ip route 13.13.30.0
Routing entry for 13.13.30.0/24
  Known via "eigrp 100", distance 90, metric 2707456, type internal
  Redistributing via eigrp 100
  Last update from 13.13.12.2 on Serial1/0, 01:09:17 ago
  Routing Descriptor Blocks:
  * 13.13.12.2, from 13.13.12.2, 01:09:17 ago, via Serial1/0
      Route metric is 2707456, traffic share count is 1
      Total delay is 41000 microseconds, minimum bandwidth is 1544 Kbit
      Reliability 255/255, minimum MTU 1500 bytes
      Loading 1/255, Hops 2

 

 

 

8. 수동 요약 기능

 

 - 경로 개수를 최소화하여 라우팅 업데이트 실시
 - 장점 : 라우팅 테이블 크기 최소화 및 메모리 사용률 최소화

 

Ex) R2는 R3에게 '128.28.8.0/24 ~ 128.28.12.0/24'를 수동 요약하여 라우팅 업데이트하여라.

 

  128.28.00001 000.0
  128.28.00001 001.0
  128.28.00001 010.0
  128.28.00001 011.0
  128.28.00001 100.0
-----------------------------------------> 128.28.8.0/21
255.255.11111 000.0 <- 255.255.248.0 <- /21

 

 

R2(config)#int s1/0
R2(config-if)#ip summary-address eigrp 100 128.28.8.0 255.255.248.0
R2(config-if)#end
R2#show run

 

R3#sh ip route eigrp 
     172.16.0.0/24 is subnetted, 2 subnets
D       172.16.1.0 [90/2809856] via 13.13.23.2, 01:18:42, Serial1/1
     128.28.0.0/21 is subnetted, 1 subnets
D       128.28.8.0 [90/2809856] via 13.13.23.2, 00:00:35, Serial1/1
     13.0.0.0/24 is subnetted, 5 subnets
D       13.13.10.0 [90/2707456] via 13.13.23.2, 00:56:39, Serial1/1
D       13.13.12.0 [90/2681856] via 13.13.23.2, 01:18:43, Serial1/1
D       13.13.20.0 [90/2195456] via 13.13.23.2, 01:18:43, Serial1/1

 

R3#sh ip route summary
IP routing table name is Default-IP-Routing-Table(0)
IP routing table maximum-paths is 16
Route Source    Networks    Subnets     Overhead    Memory (bytes)
connected       0           3           216         408
static          0           0           0           0
eigrp 100       0           5           360         680
internal        3                                   3468
Total           3           8           576         4556

 

R3#ping 128.28.8.1
R3#ping 128.28.9.1
R3#ping 128.28.10.1
R3#ping 128.28.11.1
R3#ping 128.28.12.1

 

 

 

 

9. MD5 해시 함수를 이용한 인증 기능

 

 - EIGRP 패켓 변조 방지

 

R1[S1/0]-----------------------------------[S1/1]R2

 

 

R1(config)#key chain EIGRP_K
R1(config-keychain)#key 13
R1(config-keychain-key)#key-string cisco
R1(config-keychain-key)#
R1(config-keychain-key)#int s1/0
R1(config-if)#ip authentication mode eigrp 100 md5
R1(config-if)#ip authentication key-chain eigrp 100 EIGRP_K
R1(config-if)#end

R1#show run
R1#show ip eigrp neighbor

 

R2(config)#key chain EIGRP_K
R2(config-keychain)#key 13
R2(config-keychain-key)#key-string cisco
R2(config-keychain-key)#
R2(config-keychain-key)#int s1/1
R2(config-if)#ip authentication mode eigrp 100 md5
R2(config-if)#ip authentication key-chain eigrp 100 EIGRP_K
R2(config-if)#end

R2#show run
R2#show ip eigrp neighbor

 

 

 

 

 

10. EIGRP 외부 경로

 

 - D : 내부 경로(신뢰도 : 90), 같은 AS 안에서 라우팅 업데이트 경로
 - D EX : 외부 경로(신뢰도 : 170), 외부 네트워크로부터 라우팅 업데이트 경로

 

R3(config)#int lo 100
R3(config-if)#ip address 100.100.1.1 255.255.255.0
R3(config-if)#ip address 100.100.2.1 255.255.255.0 secondary
R3(config-if)#ip address 100.100.3.1 255.255.255.0 secondary
R3(config-if)#
R3(config-if)#router rip
R3(config-router)#version 2
R3(config-router)#no auto-summary
R3(config-router)#network 100.0.0.0
R3(config-router)#
R3(config-router)#router eigrp 100
R3(config-router)#redistribute rip metric 1544 2000 255 1 1500

 

 

R1,R2#show ip route

 

R1#show ip route
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 not set

     100.0.0.0/24 is subnetted, 3 subnets
D EX    100.100.1.0 [170/3193856] via 13.13.12.2, 00:02:31, Serial1/0
D EX    100.100.2.0 [170/3193856] via 13.13.12.2, 00:02:31, Serial1/0
D EX    100.100.3.0 [170/3193856] via 13.13.12.2, 00:02:31, Serial1/0
~ 중간 생략 ~

 



출처: http://net123.tistory.com/234 [Cisco Network / Linux / 모의 해킹]

 -

11. EIGRP 기본 경로

 

ip route 0.0.0.0 0.0.0.0 nexthop 또는 시리얼 인터페이스 주소

router eigrp 7

redistribute static : 먼저 디폴트 정적경로를 설정하고 나서 이를 eigrp에서 재분배 


 

 

 

 

 

 

 

 

 

다음과 같이 네트워크가 구성되었다고 가정했을때

 

EIGRP의 디톨트 경로를 설정하려면 외부인터넷망과 가까운곳의 라우터에 설정해야 한다.

여기서는 61.41162.129에 디폴트를 설정하겠다.

 

@ R1

conf t

int fa0/1
 ip add 61.41.162.129 255.255.255.252
 no shutdown
!
ip route 0.0.0.0 0.0.0.0 61.41.162.130-----> 디폴트 경로(isp망과 가까운곳)
!
router eigrp 100
redistribute static  ---> 먼저 디폴트 정적경로를 설정하고 나서 이를 eigrp에서 isp망으로 재분배  !

int lo 100
 ip add 168.126.63.1 255.255.255.0
 ip add 198.133.219.25 255.255.255.0 sec 패킷트레이서는 secondary 지원 불가
 ->!
end

R2,R3#show ip route

D*EX 0.0.0.0/0  -> 코드값 DE*X를 가지는 디폴트 자동경로가 자동으로 생성됨

R2,R3 ping 168.126.63.1
R2,R3 ping 198.133.219.25


이거 하고 R1, R2, R3  router eigrp 100 네트워크 구성..