bxm's IT Story

동적 라우팅 프로토콜 Test 2 (OSPF & EIGRP 재분배) 본문

Network/Cisco (KEDU)

동적 라우팅 프로토콜 Test 2 (OSPF & EIGRP 재분배)

bxmsta9ram 2021. 11. 8. 14:35

 

 


공통]

conf t
no ip domain lookup
line console 0
  exec-timeout 0
  logg sy
  exit
line vty 0 4
  pass cisco
  exit

int s1/0
  no shut
  enc fram
  no fram inverse-arp
  clock rate 64000
  exit


## Frame-relay 맺기 ##

R1]

int lo0

  ip add 29.29.1.1 255.255.255.0

  exit

 

int s1/0

  ip add 29.29.12.1 255.255.255.0

  fram map ip 29.29.12.2 102 br

  end

 

 

R2]

int lo0

  ip add 29.29.2.2 255.255.255.0

  exit

 

int s1/0.12 m

  ip add 29.29.12.2 255.255.255.0

  fram map ip 29.29.12.1 201 br

  exit

 

int s1/0.23 m

  ip add 29.29.23.2 255.255.255.0

  fram map ip 29.29.23.3 203 br

  exit

 

R3]

int lo0

  ip add 29.29.3.3 255.255.255.0

  exit

 

int s1/0.23 m

  ip add 29.29.23.3 255.255.255.0

  fram map ip 29.29.23.2 302 br

  exit

 

int s1/0.34 p

  ip add 29.29.34.3 255.255.255.0

  fram inter 304

  end

 

R4]

int lo0

  ip add 29.29.4.4 255.255.255.0

  exit

 

int s1/0.34 p

  ip add 29.29.34.4 255.255.255.0

  fram inter 403

  end


## 1번 : Area0(백본)으로 OSPF 맺기 ##

R1]

conf t

router ospf 8

  router-id 29.29.1.1

  network 29.29.1.1 0.0.0.0 area 0

  network 29.29.12.1 0.0.0.0 area 0

  nei 29.29.12.2

  exit

 

int lo0

  ip os net point-to-point

  end

 

R2] 

conf t

router ospf 8

  router-id 29.29.2.2

  network 29.29.2.2 0.0.0.0 area 0

  network 29.29.12.2 0.0.0.0 area 0

  exit

 

int lo0

  ip os net point-to-point

  end

 

R1, R2]

show ip ospf nei

OSPF를 결성 후, NBMA라서 BR과 BDR이 선정되었다.

// Broadcast로 맺는게 가장 이상적이긴 하지만(Hello Time : 10초, Neighbor 자동 맺음) 나는 그냥 NBMA로 했음.


## 2번 : EIGRP 설정 ##

R2]

conf t

router eigrp 8

  eigrp router-id 29.29.2.2

  network 29.29.23.2 0.0.0.0

  no auto

  passive-interface lo0

  end

 

R3]

conf t

router eigrp 8

  eigrp router-id 29.29.3.3

  network 29.29.3.3 0.0.0.0

  network 29.29.23.3 0.0.0.0

  network 29.29.34.3 0.0.0.0

  no auto

  passive-interface lo0

  end

 

R4]

conf t

router eigrp 8

  eigrp router-id 29.29.4.4

  network 29.29.4.4 0.0.0.0

  network 29.29.34.4 0.0.0.0

  no auto

  passive-interface lo0

  end


R2, R3, R4]

show ip eigrp nei

EIGRP가 성공적으로 맺어진 모습 확인!!


## 3번 : [R2]에 '29.29.0.0/20 null 0'이 보이게 하시오 ##

// 우측의 EIGRP를 축약해서 재분배 하라는 이야기임.

 

R2]

show ip route

현재 라우팅 테이블 화면

 

conf t

router eigrp 8

  redistribute ospf 8 metric 1544 2000 255 1 1500

  exit

 

router ospf 8

  redistribute eigrp 8 sub

  end

 

 

// 이제 축약할 것이다.

conf t

int s1/0.23

  ip summary-address eigrp 8 29.29.0.0 255.255.240.0

  end                            //   /20비트이므로, .240.0

 

show ip route

축약되고 Null 0 등장!!


## 4번 : R4에 Loopback5를 5.5.8~11.1/24로 4개 만드시오. ##

// Loopback5에 [5.5.8.1/24] , [5.5.9.1/24] , [5.5.10.1/24] , [5.5.11.1/24] 4개의 IP 넣어주기.

 

R4]

show ip route

변경 전 라우팅 테이블

 

conf t

int lo5

  ip add 5.5.8.1 255.255.255.0

  ip add 5.5.9.1 255.255.255.0 sec

  ip add 5.5.10.1 255.255.255.0 sec

  ip add 5.5.11.1 255.255.255.0 sec

  end

 

show ip route


## 5번 : R1에서는 R4의 Loopback5가 5.5.8.0/22 하나로 보여야 한다. ##

// [5.5.8.1/24] , [5.5.9.1/24] , [5.5.10.1/24] , [5.5.11.1/24] 4개의 IP를 축약해서 넘겨야 한다.

// 일단 EIGRP에 4개의 IP를 넣어준 뒤 ==> 축약해서 넘기기

 

R4]

conf t

router eigrp 8

  network 5.5.8.0 0.0.3.255              

  exit                  // 5.5.8.0/22로 축약할 것이므로 Wildmask는 '0.0.3.255'가 된다.

  

int s1/0.34

  ip summary-address eigrp 8 5.5.8.0 255.255.252.0

  end

 

 

R1]

show ip route


## 6번 : R1에서 '29.29.0.0/20' "O E2"가 보이지 않게 하시오. ##

## prefix를 만들고, distribute로 거르면 된다.

R1]

show ip route

3번 문항을 통해 축약되어 보내진 29.29.0.0/20이 보인다. EIGRP를 통해 R2로 넘어왔고, 같은 OSPF를 통해서 R1이 가진 대역

 

R2]

conf t

ip prefix-list OVEREAT deny 29.29.0.0/20             // 29.29.0.0/20 은 Deny 시키고,

ip prefix-list OVEREAT permit 0.0.0.0/0 le 32        // 0.0.0.0/0~32(그 외의 모든 것)은 Permit 시킨다!!

                                                                     (le 32 == 0부터 32비트까지)

 

router ospf 8

  distribute-list prefix OVEREAT out eigrp 8

  end

  // 현재 R1에서 R2를 통해 R3로 Summary 되서 넘어간게 다시 R1으로 넘어오는것을 막아야 하므로,

     out eigrp 8을 해줘야 한다. 

  // OSPF에서 eigrp 쪽으로 다시 밀쳐내야함!!

 

 

R1]

show ip route


## 7번 : R3에서는 5.5.8.0/22가 DEx로 보이면 안되며, 없어야 한다. ##

## 자동으로 걸러졌다...?

EIGRP(90) vs OSPF(110)이고, AD값이 낮은 것을 우선하므로 Overeat을 하지 않고 D(EIGRP)로 라우팅 테이블에 저장되었음.

! ! ! 끝 ! ! !