리눅스에 네트워크 라우터 구현하기


Cisco 라우터의 강력한 대안-Zebra

Level: Intermediate

Dominique
Cimafranca
, IT Specialist, IBM
Rex Young,
Network Manager, C-Cube

2003년 10월 8일

Zebra는 오픈 소스 TCP/IP 라우팅 소프트웨어이다. Cisco의 Internetworking Operating
System (IOS)와 비슷하다. 유연하고 강력하여 Routing Information Protocol (RIP), Open Shortest
Path First (OSPF), Border Gateway Protocol (BGP) 등의 라우팅 프로토콜을 핸들 할 수
있다.

동적이고 강력한 라우팅은 인터넷 작동에 필수적이다. 인터네트워킹(internetworking)의 초보 엔지니어는 이것의 개념을 알아야 할
뿐만 아니라 실제 상황에 적용할 수 있어야 한다.

우리는 TCP/IP 라우팅에 클래스를 조직할 때 어떤 문제에 직면했다. 작은 테스트 네트워크로 작업하면서 Routing
Information Protocol (RIP)과 Open Shortest Path First (OSPF)로 다양한 로드 밸런싱 시나리오를 설명
할 필요를 느꼈다. 하지만 사용할 수 있는 Cisco 라우터의 수는 제한되어 있었다. 사용할 수 있는 몇 개의 PC를 갖고 있어서 리눅스를
사용하여 Cisco 라우터의 대안을 찾기 시작했다.

처음에는 전통적인 라우팅 및 게이팅 데몬을 사용하여 테스트 네트워크를 설정하려고 했지만 이것의 어색한 설정과 제한된 기능은 가치보다 장애가
더 많이 만들어진다는 것을 빠르게 깨달았다. 네트워크를 완료할 보다 현대적인 수단을 찾기로 결정했는데 운좋게도 Zebra가 우리에게
왔다.

Zebra
Zebra는 TCP/IP 라우팅 소프트웨어로서 BGP-4, BGP-4+,
OSPFv2, OSPFv3, RIPv1, RIPv2, RIPng를 지원한다. GNU General Public License로 배포되며 리눅스는
물론 유닉스 계열 머신에서도 실행된다. Zebra는 대부분의 배포판에 라우팅 소프트웨어로서 포함되어 있다. 최신 버전(문서 포함)은 GNU
Zebra 웹 사이트에서 사용할 수 있다. (참고자료).

원래의 Zebra 패키지는 1966년에 Kunihiro Ishiguro와 Yoshinari Yoshikawa가 작성했다. 요즘 이 패키지는
IP Infusion이 관리하고 있고 네트워킹 엔지니어와 오픈 소스 자원자들이 도움을 주고있다.

Zebra는 디자인이 독특하다. 이것이 관리하는 프로토콜에 모듈식의 접근 방식을 취하기 때문이다. 프로토콜들은 네트워크의 요구사항 명령에
따라 실행 가능 또는 불가가 될 수 있다.

지금까지, Zebra에서 찾아낸 가장 유용한 기능은 Cisco IOS 설정 포맷과의 긴밀한 유사성이다. IOS와는 약간 차이점이 있지만
IOS에 익숙한 네트워크 엔지니어가 이 환경에 안정감을 느낄 정도로 유사하다.

Zebra
설치

Zebra 테스트를 위한 플랫폼은 오래된 것이지만 강력한 ThinkPad X20(Red Hat Linux 9)로
정했다. ThinkPad에는 빌트인 Ethernet 포트가 있어서 또 다른 Ethernet PCMCIA 카드를 추가했다. 이것은 라우터로서
작동할 수 있었다. Zebra 설치 전에 두 개의 네트워크 카드를 리눅스가 인식하는지와 작동하는지를 확인했다.

RPM for Zebra-0.93b가 Red Hat 9에 이미 포함되어 있었다. Zebra RPM은 바이너리, 스크립트, 설정 파일,
매뉴얼, 예제, 문서 파일 등을 설치한다.

Zebra 기본 설정
Zebra 데몬은 실제
라우팅 매니저로서 다른 모듈들을 제어한다. 또한 사용자와의 인터랙션 기본 포인트도 제공한다. 이것이 설정할 때 필요한 첫 번째이고
/etc/zebra/zebra.conf 파일을 통해 이를 수행했다.

Zebra RPM 패키지에는 완성된 샘플 설정 파일이 포함되어 있다. 하지만 최소한 다음 라인을 포함하는
/etc/zebra/zebra.conf 파일을 만들기만 해도 된다:

Listing 1. Zebra 설정 파일


hostname speedmetal
password zebra
enable password zebra

hostname 명령어는 인터랙티브 설정 모드로 들어갈 때 라우터 이름을
정의한다. 어떤 레이블도 가능하며 머신의 호스트네임에 상응하지 않아도 된다.

password 명령어는 인터랙티브 Zebra 터미널에 로그인할 때의
패스워드를 지정한다.

enable password 명령어는 고급 Zebra 액세스를 위한
패스워드를 정의한다. 설정을 변경할 때 쓰인다.

/etc/zebra/zebra.conf 파일을 만들면 다음을 실행하여 Zebra를 시작할 수 있다:

# service zebra start

이제 우리 머신의 port 2601의 텔넷팅을 통해 Zebra 인터랙티브 세션에 들어갈 수 있다.

Listing 2. Zebra 세션 샘플


[root@speedmetal zebra]# telnet 127.0.0.1 2601
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.

Hello, this is zebra (version 0.93b).
Copyright 1996-2002 Kunihiro Ishiguro.

User Access Verification

Password: zebra
speedmetal> enable
Password: zebra
speedmetal# ?
configure Configuration from vty interface
copy Copy configuration
debug Debugging functions (see also 'undebug')
disable Turn off privileged mode command
end End current mode and change to enable mode.
exit Exit current mode and down to previous mode
help Description of the interactive help system
list Print command list
no Negate a command or set its defaults
quit Exit current mode and down to previous mode
show Show running system information
terminal Set terminal line parameters
who Display who is on vty
write Write running configuration to memory, network, or terminal
speedmetal#

인터랙티브 터미널 내부를 돌아다니기란 쉽지 않다. 사용가능한 명령어 힌트를 보려면 언제라도 ?를 누르면 된다. 그러면 스크린이 나타날 것이다. 자신의 Zebra 라우터를 설정한다면 이 설정은
Cisco와 매우 유사하게 될 것이다.

이 지점에서 Zebra만이 설정 및 실행되었다. 다른 프로토콜들은 그렇지 않았다.

MRLG 설정 및
사용

Multi-Router Looking Glass(MRLG)는 EnterZone의 John Frazier가 작성한
것으로 웹 기반 유틸리티이다. Zebra에 의해 인식되는 인터페이스와 라우터를 디스플레이하는데 사용된다. MRLG는 제한된 명령어를 갖춘
Zebra 쉘에 대한 웹 인터페이스 그 이상도 이하도 아니다. 하지만 테스팅 과정 중에 라우트를 빠르고 유용하게 디스플레이 할 방법을 발견했다.
Zebra 프로토콜을 설정하기 전에 설치 과정을 설명하겠다.

MRLG가 Zebra 쉘과 통신하기 위해서는 Net::Telnet Perl
패키지가 필요하다. 안타깝게도 Red Hat 9 에는 포함되지 않았다. 따라서 다운로드 할 수 밖에 없었다. (참고자료).

MRLG가 CGI 애플리케이션으로서 실행되기 때문에 웹 서버를 설치해야 했다. 이를 스스로 해보려면 httpd RPM을 사용해도
된다.

/usr/share/doc/zebra-0.93b/tools 에서 /var/www/cgi-bin 으로 mrlg.cgi 파일을 복사했다.
그런다음 36번 행을 다음과 같이 수정했다:

$url="http://www.sample.com/mrlg.cgi";

$url="http://127.0.0.1/cgi-bin/mrlg.cgi";

168에서 174행 까지의 블록을 수정했다. 다음과 같이 읽힌다:


if ($Form{'router'} eq 'router1')
{
$server = '127.0.0.1';
$login_pass = 'zebra';
$bgpd = "2605";
$zebra = "2601";
$full_tables=1;

MRLG에 액세스 하려면 브라우저를 http://127.0.0.1/cgi-bin/mrlg.cgi에 둔다.

그림 1. Multi-Router Looking
Glass

The multi-router looking glass

기본 lab
설정

우리의 lab 설정은 두 개의 Cisco 3620 라우터와 빌트인 Ethernet 포트와 Home-and-Away
PCMCIA Ethernet 카드를 갖춘 ThinkPad X20으로 구성되었다. 이 두 개의 라우터는 시리얼 커넥션을 통해 서로 통신하고 각
라우터는 Ethernet을 통해 ThinkPad로 연결된다. 다음이 이러한 연결 다이어그램이다. :

그림 2. Lab 연결
다이어그램

Lab connection diagram

Zebra로 인터페이스
설정하기

RIP로 시작되는 Zebra를 사용하여 라우팅에 첫 번째로 개입했다. ThinkPad에 Zebra를 설치했다.
ThinkPad에 또 다른 네트워크 인터페이스가 필요했기 때문에 다음과 같은 더미 네트워크 디바이스를 설치했다:

# modprobe dummy
# ifconfig dummy0

설정을 시작하기 위해 Zebra 포트에 텔넷팅을 했다. Zebra와의 다이얼로그는 다음 순서와 같다:

Listing 3. IP 인터페이스 설정하기


User Access Verification

Password: zebra
speedmetal> enable
Password: zebra
speedmetal# configure terminal
speedmetal(config)# interface eth0
speedmetal(config-if)# ip address 192.168.2.1/30
speedmetal(config-if)# quit
speedmetal(config)# interface eth1
speedmetal(config-if)# ip address 192.168.1.1/30
speedmetal(config-if)# quit
speedmetal(config)# interface dummy0
speedmetal(config-if)# ip address 10.0.2.1/24
speedmetal(config-if)# write
Configuration saved to /etc/zebra/zebra.conf
speedmetal(config-if)# end
speedmetal# show run

Current configuration:
!
hostname speedmetal
password zebra
enable password zebra
!
interface lo
!
interface eth0
ip address 192.168.2.1/30
!
interface dummy0
ip address 10.0.2.1/24
!
interface eth1
ip address 192.168.1.1/30
!
!
line vty
!
end

일반적인 방법으로 ThinkPad에 IP 어드레스를 설정하지 않았다는 것을 기억하라. 대신 Zebra를 통해 설정했다. 이 설정은
설정파일인 /etc/zebra/zebra.conf에서 유지되어 Zebra 서비스가 시작할 때 마다 이 설정이 발효된다.

zebra.conf 파일의 내용은 다음과 같다 :

Listing 4. /etc/zebra/zebra.conf-Zebra에 의해 변경


!
! Zebra configuration saved from vty
! 2003/08/20 00:07:51
!
hostname speedmetal
password zebra
enable password zebra
!
interface lo
!
interface eth0
ip address 192.168.2.1/30
!
interface dummy0
ip address 10.0.2.1/24
!
interface eth1
ip address 192.168.1.1/30
!
!
line vty
!

“router1″을 선택하여 MRLG를 사용하는 인터페이스의 상황을 점검할 수 있다. “show interface” 라디오 버튼을 누르고
“Execute”를클릭한다.

Zebra를
이용하여 RIP 라우팅 설정하기

ThinkPad/라우터에 네트워크 인터페이스를 설정했기 때문에 RIP 업데이트와 작동할
것을 설정한 것이다. 앞서 언급했지만 Zebra는 개별 데몬을 사용하여 라우팅 프로토콜들을 구현하기 때문에 /etc/zebra에 있는 RIP
데몬을 위해 우선 간단한 설정파일인 ripd.conf를 만들어야 했다. .

Listing 5. 기본적인 /etc/zebra/ripd.conf 파일


hostname speedmetal-rip
password zebra
enable password zebra

ripd 데몬을 시작한다:

# service ripd start

이것이 실행되면 Zebra 라우터의 포트 2602로 텔네팅하여 RIP 데몬을 설정할 수 있었다.

Listing 6. RIP 설정하기


User Access Verification

Password: zebra
speedmetal-rip> enable
Password: zebra
speedmetal-rip# configure terminal
speedmetal-rip(config)# router rip
speedmetal-rip(config-router)# network 10.0.0.0/8
speedmetal-rip(config-router)# network 192.168.0.0/16
speedmetal-rip(config-router)# end
speedmetal-rip# show run

Current configuration:
!
hostname speedmetal-rip
password zebra
enable password zebra
!
interface lo
!
interface eth0
!
interface dummy0
!
router rip
network 0.0.0.0/0
network 192.168.0.0/16
!
line vty
!
end
speedmetal-rip# write
Configuration saved to /etc/zebra/ripd.conf
speedmetal-rip#

결과 ripd.conf 설정 파일은 다음과 같다:

Listing 7. /etc/zebra/ripd.conf 파일


!
! Zebra configuration saved from vty
! 2003/08/19 13:50:30
!
hostname speedmetal-rip
password zebra
enable password zebra
!
interface lo
!
interface eth0
!
interface eth1
!
interface dummy0
!
router rip
network 10.0.0.0/8
network 192.168.0.0/16
!
line vty
!

Cisco 라우터에
RIP 라우팅 설정하기

두 개의 Cisco 3620 (각각 이름을 A와 B로 지었다) 라우터 설정을 이용하기 위해
라우터가 적절히 실행되는데 필요한 최소한의 설정만 하였다. 인터페이스 IP 어드레스, 루프백(loopback) 어드레스, 적절한 시리얼 포트
통신을 위한 시리얼 clockrate를 설정하였다.

Listing 8. 라우터 A 설정하기


Router#config terminal
Router(config)#hostname RouterA
RouterA(config)#int s0/0
RouterA(config-if)#ip address 192.168.0.1 255.255.255.252
RouterA(config-if)#no shut
RouterA(config-if)# interface fastEthernet 0/0
RouterA(config-if)#ip address 192.168.2.2 255.255.255.252
RouterA(config-if)#no shut
RouterA(config-if)#int loopback 0
RouterA(config-if)#ip address 10.0.0.1 255.255.255.0
RouterA(config-if)#end
RouterA#write

라우터 B 설정도 비슷하다.

Listing 9.
라우터 B 설정하기


Router#configure terminal
Router(config)#hostname RouterB
RouterB(config)#int s0/0
RouterB(config-if)#ip address 192.168.0.2 255.255.255.252
RouterB(config-if)#no shut
RouterB(config-if)#int fastEthernet0/0
RouterB(config-if)#ip address 192.168.1.2 255.255.255.252
RouterB(config-if)#no shut
RouterB(config-if)#int loopback 0
RouterB(config-if)#ip address 10.0.1.1 255.255.255.0
RouterB(config-router)#end
RouterB#write

3620 라우터에 RIP을 설정하는 것은 Zebra의 명령어와 매우 비슷하다. 콘솔 케이블을 통해 두 개의 3620에 액세스 하여 다음의
명령어를 실행시켰다:

Listing 10. RIP에
라우터 A 설정하기


RouterA#conf t
Enter configuration commands, one per line. End with CNTL/Z.
RouterA(config)#router rip
RouterA(config-router)#network 10.0.0.0
RouterA(config-router)#network 192.168.0.0
RouterA(config-router)#network 192.168.2.0
RouterA(config-router)#version 2
RouterA(config-router)#end
RouterA#write

그리고 B는:

Listing 11. RIP에
라우터 B 설정하기


RouterB#conf t
Enter configuration commands, one per line. End with CNTL/Z.
RouterB(config)#router rip
RouterB(config-router)#network 10.0.1.0
RouterB(config-router)#network 192.168.0.0
RouterB(config-router)#network 192.168.1.0
RouterB(config-router)#version 2
RouterB(config-router)#end
RouterB#write

router rip 명령어는 RIP 프로세스를 실행한다.
network 명령어는 RIP에 의해 선전될 네트워크가 어떤 것인지를 라우터에게
말해준다.

RIP을 이용하여 선전된
라우트

Cisco 라우터와 Zebra가 모두 설정되었으므로 선전되고 있는 라우트를 점검한다. MRLG에서 “show
ip route”를 선택하고 “Execute”를 클릭한다. 다음과 같은 리포트가 나온다:

Listing 12. RIP 라우트를 반영하는 Zebra


Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF,
B - BGP, > - selected route, * - FIB route

R>* 10.0.0.0/24 [120/2] via 192.168.2.2, eth0, 00:11:05
R>* 10.0.1.0/24 [120/2] via 192.168.1.2, eth1, 00:02:08
C>* 10.0.2.0/24 is directly connected, dummy0
K * 127.0.0.0/8 is directly connected, lo
C>* 127.0.0.0/8 is directly connected, lo
R>* 192.168.0.0/30 [120/2] via 192.168.2.2, eth0, 00:11:05
C>* 192.168.1.0/30 is directly connected, eth1
C>* 192.168.2.0/30 is directly connected, eth0

RIP을 통해 알려진 라우트들은 R로 표시된다.

Zebra는 10.0.0.0/24와 10.0.1.0/24 네트워크에 대해 알고 있다. ThinkPad Zebra 라우터에서
10.0.0.1과 10.0.1.1을 PING 하여 이것을 테스트했다.

라우트 페일오버(failover)를 테스트하기 위해 라우터 A에서 네트워크 연결을 끊었다. 약 2분 정도의 타임아웃 뒤에 Zebra는
10.0.0.0/24 네트워크의 대안 라우트를 알게되고 라우터 B를 통해 갔다.

Listing 13. RIP 라우트를 반영하는 Zebra


Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF,
B - BGP, > - selected route, * - FIB route

R>* 10.0.0.0/24 [120/3] via 192.168.1.2, eth0, 00:00:26
R>* 10.0.1.0/24 [120/2] via 192.168.1.2, eth1, 00:06:02
C>* 10.0.2.0/24 is directly connected, dummy0
K * 127.0.0.0/8 is directly connected, lo
C>* 127.0.0.0/8 is directly connected, lo
R>* 192.168.0.0/30 [120/2] via 192.168.1.2, eth1, 00:00:26
C>* 192.168.1.0/30 is directly connected, eth1
C>* 192.168.2.0/30 is directly connected, eth0

총 타임아웃이 2분 이상이 된 이유는? RIP의 디폴트 타임아웃은 30초이다. 하지만 RIP 프로토콜은 라우트가 무효라는 것과 무효
라우트를 플러쉬하는데 필요한 시간(별도의 240초)를 결정하기 전에 세 번의 재시도(총 90초)를 지정해놓았다. RIP은 연결 실패에 대한
응답이 느린 것으로 알려졌는데 이유가 있었다.

Listing 14. 라우터 A의 라우팅 테이블(페일오버 전)


RouterA#show ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
i - IS-IS, 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

10.0.0.0/24 is subnetted, 3 subnets
R 10.0.2.0 [120/1] via 192.168.2.1, 00:00:11, FastEthernet0/0
C 10.0.0.0 is directly connected, Loopback0
R 10.0.1.0 [120/1] via 192.168.0.2, 00:00:18, Serial0/0
192.168.0.0/30 is subnetted, 1 subnets
C 192.168.0.0 is directly connected, Serial0/0
192.168.1.0/30 is subnetted, 1 subnets
R 192.168.1.0 [120/1] via 192.168.0.2, 00:00:18, Serial0/0
[120/1] via 192.168.2.1, 00:00:11, FastEthernet0/0
192.168.2.0/30 is subnetted, 1 subnets
C 192.168.2.0 is directly connected, FastEthernet0/0

그리고 페일오버 후는,

Listing 15.
라우터 A의 라우팅 테이블 (페일오버 후)


RouterA#show ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
i - IS-IS, 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

10.0.0.0/24 is subnetted, 3 subnets
R 10.0.2.0 [120/2] via 192.168.0.2, 00:00:09, Serial0/0
C 10.0.0.0 is directly connected, Loopback0
R 10.0.1.0 [120/1] via 192.168.0.2, 00:00:09, Serial0/0
192.168.0.0/30 is subnetted, 1 subnets
C 192.168.0.0 is directly connected, Serial0/0
192.168.1.0/30 is subnetted, 1 subnets
R 192.168.1.0 [120/1] via 192.168.0.2, 00:00:09, Serial0/0
192.168.2.0/30 is subnetted, 1 subnets
R 192.168.2.0 [120/2] via 192.168.0.2, 00:00:10, Serial0/0

Zebra를
이용하여 OSPF 라우팅 설정하기

이제 OSPF 라우팅이다. OSPF와 RIP이 함께 사용되기는 하지만 보다 단순한
설정을 더욱 선호하기 때문에 OSPF를 주로 사용했다. Zebra에서 RIP을 실행불가로 하려면 ripd 서비스를 끈다.

# service ripd stop

OSPF용 기본 설정 파일을 시작한다. 이 경우, /etc/zebra에 있는 ospfd.conf 이다.

Listing 16. 기본 /etc/zebra/ospfd.conf
파일


hostname speedmetal-ospf
password zebra
enable password zebra

OSPF 서비스를 시작했다:

# service ospfd start

OSPF 설정은 RIP 설정 보다 단순하다. OSPF에게 알고있는 모든 라우트를 방송하라고 명령하면 된다.

OSPF 설정 포트는 2604 이다.

OSPF 설정 다이얼로그는 다음과 같다.

Listing 17. OSPF 설정 다이얼로그


[root@speedmetal zebra]# telnet 127.0.0.1 2604
User Access Verification

Password: zebra
speedmetal-ospf> enable
Password: zebra
speedmetal-ospf# configure terminal
speedmetal-ospf(config)# router ospf
speedmetal-ospf(config-router)# network 0.0.0.0/0 area 0
speedmetal-ospf(config-router)# end
speedmetal-ospf# write
Configuration saved to /etc/zebra/ospfd.conf
speedmetal-ospf# show run

Current configuration:
!
hostname speedmetal-ospf
password zebra
enable password zebra
!
!
router ospf
network 0.0.0.0/0 area 0
!
line vty
!
end
speedmetal-ospf#

결과 설정 파일인 ospfd.conf는 다음과 같다:

Listing 18.
/etc/zebra/ospfd.conf-Zebra에 의해 변경


!
! Zebra configuration saved from vty
! 2003/08/19 14:22:17
!
hostname speedmetal-ospf
password zebra
enable password zebra
!
!
!
interface lo
!
interface eth0
!
interface eth1
!
interface dummy0
!
router ospf
network 0.0.0.0/0 area 0
!
line vty
!

Cisco 라우터에
OSPF 설정하기

라우터에서 RIP을 제거하고 OSPF를 추가하기 위해 다음의 명령어를 실행했다:

Listing 19. RIP을 제거하고 OSPF
추가하기


RouterA#conf term
RouterA(config)no router rip
RouterA(config)#router ospf 100
RouterA(config-router)#network 0.0.0.0 255.255.255.255 area 0
RouterA(config-router)end

라우터 A와 라우터 B 모두 수행 단계는 같다.

OSPF로 선전된
라우트

MRLG 리포트는 다음과 같다:

Listing 20. OSPF 라우트를 반영하는 Zebra


Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF,
B - BGP, > - selected route, * - FIB route

O>* 10.0.0.0/32 [110/11] via 192.168.2.2, eth0, 00:00:01
O>* 10.0.1.1/32 [110/11] via 192.168.1.2, eth1, 00:02:53
O 10.0.2.0/24 [110/10] is directly connected, dummy0, 00:03:31
C>* 10.0.2.0/24 is directly connected, dummy0
K * 127.0.0.0/8 is directly connected, lo
C>* 127.0.0.0/8 is directly connected, lo
O>* 192.168.0.0/30 [110/58] via 192.168.2.2, eth0, 00:00:01
via 192.168.1.2, eth1, 00:00:01
O 192.168.1.0/30 [110/10] is directly connected, eth1, 00:03:21
C>* 192.168.1.0/30 is directly connected, eth1
O 192.168.2.0/30 [110/10] is directly connected, eth0, 00:03:31
C>* 192.168.2.0/30 is directly connected, eth0

10.0.0.1/32와 10.0.1.1/32로의 라우트는 O로 표시된다.

Zebra 라우터에서 라우터 A 까지 연결을 끊을 때, 이 라우트는 자동으로 업데이트 되었다. MRLG는 다음을 리포팅했다:

Listing 21. OSPF 라우트를 반영하는
Zebra(패일오버 후)


Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF,
B - BGP, > - selected route, * - FIB route

O>* 10.0.0.1/32 [110/59] via 192.168.2.2, eth0, 00:01:10
O>* 10.0.1.1/32 [110/11] via 192.168.1.2, eth1, 00:09:46
O 10.0.2.0/24 [110/10] is directly connected, dummy0, 00:10:24
C>* 10.0.2.0/24 is directly connected, dummy0
K * 127.0.0.0/8 is directly connected, lo
C>* 127.0.0.0/8 is directly connected, lo
O>* 192.168.0.0/30 [110/58] via 192.168.1.2, eth1, 00:01:10
O 192.168.1.0/30 [110/10[ is directly connected, eth1, 00:10:14
C>* 192.168.1.0/30 is directly connected, eth1
O 192.168.2.0/30 [110/10] is directly connected, eth0, 00:10:24
C>* 192.168.2.0/30 is directly connected, eth0

OSPF의 링크 특성 상 패일오버는 훨씬 빠르다. 새로운 라우트가 30초 이내에 선전되었다.

참고자료

출처 : http://blog.daum.net/dangsu77/2112394?srchid=BR1http%3A%2F%2Fblog.daum.net%2Fdangsu77%2F2112394

Tags: ,

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.