예: IS-IS로 OSPF 경로 재배포
이 예에서는 최단 경로 우선(OSPF) 경로를 IS-IS 네트워크로 재배포하는 방법을 보여줍니다.
요구 사항
이 예를 구성하기 전에 디바이스 초기화를 제외한 특별한 구성은 필요하지 않습니다.
개요
내보내기 정책을 IS-IS(Intermediate System to Intermediate System)에 적용하여 경로 재배포를 용이하게 할 수 있습니다.
Junos OS는 IS-IS(Intermediate System to Intermediate System)와 같은 link-state 라우팅 프로토콜에 대한 가져오기 정책 적용을 지원하지 않습니다. 이러한 정책은 일관되지 않은 LSDB(link-state database) 항목으로 이어질 수 있으며, 이는 라우팅 불일치를 초래할 수 있기 때문입니다.
이 예에서 최단 경로 우선(OSPF) 경로 192.168.0/24부터 192.168.3/24는 디바이스 R2에서 IS-IS 영역 49.0002로 재배포됩니다.
또한 Device R1이 10.0.0.44/30 네트워크의 대상에 도달하고, Device R3이 10.0.0.36/30 네트워크의 목적지에 도달할 수 있도록 정책이 구성됩니다. 이를 통해 엔드 투 엔드 연결이 가능합니다.
그림 1 은 이 예에서 사용되는 토폴로지입니다.

CLI 빠른 구성 은 그림 1의 모든 디바이스에 대한 구성을 보여줍니다. #configuration759__isis-redist-ospf-step-by-step-r2 섹션에서는 디바이스 R2의 단계를 설명합니다. #configuration759__isis-redist-ospf-step-by-step-r3 은 디바이스 R3의 단계를 설명합니다.
위상수학
구성
절차
CLI 빠른 구성
이 예를 빠르게 구성하려면, 아래 명령을 복사하여 텍스트 파일로 붙여 넣은 다음 모든 라인브레이크를 제거하고, 네트워크 구성을 일치하는 데 필요한 세부 사항을 바꾸고 계층 수준에서 명령을 CLI [edit]
로 복사해 붙여 넣습니다.
디바이스 R1
set interfaces fe-1/2/0 unit 0 description to-R7 set interfaces fe-1/2/0 unit 0 family inet address 10.0.0.38/30 set interfaces fe-1/2/0 unit 0 family iso set interfaces lo0 unit 0 family inet address 172.16.3.5/32 set interfaces lo0 unit 0 family iso address 49.0002.0172.0016.0305.00 set protocols isis interface fe-1/2/0.0 set protocols isis interface lo0.0
디바이스 R2
set interfaces fe-1/2/1 unit 0 description to-R5 set interfaces fe-1/2/1 unit 0 family inet address 10.0.0.37/30 set interfaces fe-1/2/1 unit 0 family iso set interfaces fe-1/2/0 unit 0 description to-OSPF-network set interfaces fe-1/2/0 unit 0 family inet address 10.0.0.45/30 set interfaces lo0 unit 0 family inet address 172.16.9.7/32 set interfaces lo0 unit 0 family iso address 49.0002.0172.0016.0907.00 set protocols isis export ospf-isis set protocols isis export send-direct-to-isis-neighbors set protocols isis interface fe-1/2/1.0 set protocols isis interface lo0.0 set protocols ospf export send-direct-to-ospf-neighbors set protocols ospf area 0.0.0.1 interface fe-1/2/0.0 set protocols ospf area 0.0.0.1 interface lo0.0 passive set policy-options policy-statement ospf-isis term 1 from protocol ospf set policy-options policy-statement ospf-isis term 1 from route-filter 192.168.0.0/22 longer set policy-options policy-statement ospf-isis term 1 then accept set policy-options policy-statement send-direct-to-isis-neighbors from protocol direct set policy-options policy-statement send-direct-to-isis-neighbors from route-filter 10.0.0.44/30 exact set policy-options policy-statement send-direct-to-isis-neighbors then accept set policy-options policy-statement send-direct-to-ospf-neighbors from protocol direct set policy-options policy-statement send-direct-to-ospf-neighbors from route-filter 10.0.0.36/30 exact set policy-options policy-statement send-direct-to-ospf-neighbors then accept
디바이스 R3
set interfaces fe-1/2/0 unit 0 family inet address 10.0.0.46/30 set interfaces lo0 unit 0 family inet address 192.168.1.1/32 set interfaces lo0 unit 0 family inet address 192.168.2.1/32 set interfaces lo0 unit 0 family inet address 192.168.3.1/32 set interfaces lo0 unit 0 family inet address 192.168.0.1/32 set protocols ospf export ospf set protocols ospf area 0.0.0.1 interface fe-1/2/0.0 set protocols ospf area 0.0.0.1 interface lo0.0 passive set policy-options policy-statement ospf term 1 from protocol static set policy-options policy-statement ospf term 1 then accept set routing-options static route 192.168.0.0/24 discard set routing-options static route 192.168.1.0/24 discard set routing-options static route 192.168.3.0/24 discard set routing-options static route 192.168.2.0/24 discard
단계별 절차
디바이스 R2 구성:
네트워크 인터페이스를 구성합니다.
[edit interfaces] user@R2# set fe-1/2/1 unit 0 description to-R5 user@R2# set fe-1/2/1 unit 0 family inet address 10.0.0.37/30 user@R2# set fe-1/2/1 unit 0 family iso user@R2# set fe-1/2/0 unit 0 description to-OSPF-network user@R2# set fe-1/2/0 unit 0 family inet address 10.0.0.45/30 user@R2# set lo0 unit 0 family inet address 172.16.9.7/32 user@R2# set lo0 unit 0 family iso address 49.0002.0172.0016.0907.00
디바이스 R1을 향하는 인터페이스와 루프백 인터페이스에서 IS-IS(Intermediate System to Intermediate System)를 구성합니다.
[edit protocols isis] user@R2# set interface fe-1/2/1.0 user@R2# set interface lo0.0
디바이스 R1이 10.0.0.44/30 네트워크에 연결할 수 있도록 정책을 구성합니다.
[edit policy-options policy-statement send-direct-to-isis-neighbors] user@R2# set from protocol direct user@R2# set from route-filter 10.0.0.44/30 exact user@R2# set then accept
디바이스 R1이 10.0.0.44/30 네트워크에 연결할 수 있도록 하는 정책을 적용합니다.
[edit protocols isis] user@R2# set export send-direct-to-isis-neighbors
인터페이스에 최단 경로 우선(OSPF)를 구성합니다.
[edit protocols ospf] user@R2# set area 0.0.0.1 interface fe-1/2/0.0 user@R2# set area 0.0.0.1 interface lo0.0 passive
OSPF 경로 재배포 정책을 구성합니다.
[edit policy-options policy-statement ospf-isis term 1] user@R2# set from protocol ospf user@R2# set from route-filter 192.168.0.0/22 longer user@R2# set then accept
IS-IS 인스턴스에 최단 경로 우선(OSPF) 경로 재배포 정책을 적용합니다.
[edit protocols isis] user@R2# set export ospf-isis
디바이스 R3이 10.0.0.36/30 네트워크에 연결할 수 있도록 정책을 구성합니다.
[edit policy-options policy-statement send-direct-to-ospf-neighbors] user@R2# set from protocol direct user@R2# set from route-filter 10.0.0.36/30 exact user@R2# set then accept
디바이스 R3이 10.0.0.36/30 네트워크에 연결할 수 있도록 하는 정책을 적용합니다.
[edit protocols ospf] user@R2# set export send-direct-to-ospf-neighbors
단계별 절차
다음 예제에서는 구성 계층에서 다양한 수준의 탐색이 필요합니다. CLI 탐색에 관한 정보는 CLI 사용자 가이드에서 구성 모드에서 CLI 편집기 사용을 참조하십시오.
다중 레벨 IS-IS 구성:
네트워크 인터페이스를 구성합니다.
여러 경로 대상을 시뮬레이션하기 위해 루프백 인터페이스에 여러 주소가 구성됩니다.
[edit interfaces] user@R3# set fe-1/2/0 unit 0 family inet address 10.0.0.46/30 user@R3# set lo0 unit 0 family inet address 192.168.1.1/32 user@R3# set lo0 unit 0 family inet address 192.168.2.1/32 user@R3# set lo0 unit 0 family inet address 192.168.3.1/32 user@R3# set lo0 unit 0 family inet address 192.168.0.1/32
루프백 인터페이스 주소에 대한 정적 경로를 구성합니다.
IS-IS로 재배포되는 경로입니다.
[edit routing-options static] user@R3# set route 192.168.0.0/24 discard user@R3# set route 192.168.1.0/24 discard user@R3# set route 192.168.3.0/24 discard user@R3# set route 192.168.2.0/24 discard
인터페이스에 최단 경로 우선(OSPF)를 구성합니다.
[edit protocols ospf area 0.0.0.1] user@R3# set interface fe-1/2/0.0 user@R3# set interface lo0.0 passive
정적 경로를 내보내도록 OSPF 정책을 구성합니다.
[edit policy-options policy-statement ospf term 1] user@R3# set from protocol static user@R3# set then accept
OSPF 내보내기 정책을 적용합니다.
[edit protocols ospf] user@R3# set export ospf
결과
구성 모드에서 , show protocols
, show policy-options
및 show routing-options
명령을 입력하여 show interfaces
구성을 확인합니다. 출력 결과가 의도한 구성대로 표시되지 않으면 이 예의 지침을 반복하여 구성을 수정하십시오.
디바이스 R2
user@R2# show interfaces
fe-1/2/1 {
unit 0 {
description to-R5;
family inet {
address 10.0.0.37/30;
}
family iso;
}
}
fe-1/2/0 {
unit 0 {
description to-OSPF-network;
family inet {
address 10.0.0.45/30;
}
}
}
lo0 {
unit 0 {
family inet {
address 172.16.9.7/32;
}
family iso {
address 49.0002.0172.0016.0907.00;
}
}
}
user@R2# show protocols
isis {
export [ ospf-isis send-direct-to-isis-neighbors ];
interface fe-1/2/1.0;
interface lo0.0;
}
ospf {
export send-direct-to-ospf-neighbors;
area 0.0.0.1 {
interface fe-1/2/0.0;
interface lo0.0 {
passive;
}
}
}
user@R2# show policy-options
policy-statement ospf-isis {
term 1 {
from {
protocol ospf;
route-filter 192.168.0.0/22 longer;
}
then accept;
}
}
policy-statement send-direct-to-isis-neighbors {
from {
protocol direct;
route-filter 10.0.0.44/30 exact;
}
then accept;
}
policy-statement send-direct-to-ospf-neighbors {
from {
protocol direct;
route-filter 10.0.0.36/30 exact;
}
then accept;
}
디바이스 R3
user@R3# show interfaces
fe-1/2/0 {
unit 0 {
family inet {
address 10.0.0.46/30;
}
}
}
lo0 {
unit 0 {
family inet {
address 192.168.1.1/32;
address 192.168.2.1/32;
address 192.168.3.1/32;
address 192.168.0.1/32;
}
}
}
user@R3# show protocols
ospf {
export ospf;
area 0.0.0.1 {
interface fe-1/2/0.0;
interface lo0.0 {
passive;
}
}
}
user@R3# show policy-options
policy-statement ospf {
term 1 {
from protocol static;
then accept;
}
}
user@R3# show routing-options
static {
route 192.168.0.0/24 discard;
route 192.168.1.0/24 discard;
route 192.168.3.0/24 discard;
route 192.168.2.0/24 discard;
}
디바이스 구성을 마쳤으면 구성 모드에서 을(를) 입력합니다 commit
.
확인
구성이 올바르게 작동하고 있는지 확인합니다.
OSPF 경로 보급 확인
목적
예상되는 경로가 최단 경로 우선(OSPF)에 의해 보급되는지 확인합니다.
행동
디바이스 R2의 작동 모드에서 명령을 입력합니다 show route protocol ospf
.
user@R2> show route protocol ospf inet.0: 15 destinations, 15 routes (15 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 192.168.0.0/24 *[OSPF/150] 03:54:21, metric 0, tag 0 > to 10.0.0.46 via fe-1/2/0.0 192.168.0.1/32 *[OSPF/10] 03:54:21, metric 1 > to 10.0.0.46 via fe-1/2/0.0 192.168.1.0/24 *[OSPF/150] 03:54:21, metric 0, tag 0 > to 10.0.0.46 via fe-1/2/0.0 192.168.1.1/32 *[OSPF/10] 03:54:21, metric 1 > to 10.0.0.46 via fe-1/2/0.0 192.168.2.0/24 *[OSPF/150] 03:54:21, metric 0, tag 0 > to 10.0.0.46 via fe-1/2/0.0 192.168.2.1/32 *[OSPF/10] 03:54:21, metric 1 > to 10.0.0.46 via fe-1/2/0.0 192.168.3.0/24 *[OSPF/150] 03:54:21, metric 0, tag 0 > to 10.0.0.46 via fe-1/2/0.0 192.168.3.1/32 *[OSPF/10] 03:54:21, metric 1 > to 10.0.0.46 via fe-1/2/0.0 224.0.0.5/32 *[OSPF/10] 03:56:03, metric 1 MultiRecv iso.0: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden)
의미
192.168/16 경로는 최단 경로 우선(OSPF)에 의해 보급됩니다.
경로 재분배 확인
목적
예상 경로가 최단 경로 우선(OSPF)에서 IS-IS(Intermediate System to Intermediate System)로 재배포되었는지 확인합니다.
행동
디바이스 R1의 작동 모드에서 명령을 입력합니다 show route protocol isis
.
user@R1> show route protocol isis inet.0: 13 destinations, 13 routes (13 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 10.0.0.44/30 *[IS-IS/160] 03:45:24, metric 20 > to 10.0.0.37 via fe-1/2/0.0 172.16.9.7/32 *[IS-IS/15] 03:49:46, metric 10 > to 10.0.0.37 via fe-1/2/0.0 192.168.0.0/24 *[IS-IS/160] 03:49:46, metric 10 > to 10.0.0.37 via fe-1/2/0.0 192.168.0.1/32 *[IS-IS/160] 03:49:46, metric 11, tag2 1 > to 10.0.0.37 via fe-1/2/0.0 192.168.1.0/24 *[IS-IS/160] 03:49:46, metric 10 > to 10.0.0.37 via fe-1/2/0.0 192.168.1.1/32 *[IS-IS/160] 03:49:46, metric 11, tag2 1 > to 10.0.0.37 via fe-1/2/0.0 192.168.2.0/24 *[IS-IS/160] 03:49:46, metric 10 > to 10.0.0.37 via fe-1/2/0.0 192.168.2.1/32 *[IS-IS/160] 03:49:46, metric 11, tag2 1 > to 10.0.0.37 via fe-1/2/0.0 192.168.3.0/24 *[IS-IS/160] 03:49:46, metric 10 > to 10.0.0.37 via fe-1/2/0.0 192.168.3.1/32 *[IS-IS/160] 03:49:46, metric 11, tag2 1 > to 10.0.0.37 via fe-1/2/0.0 iso.0: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden)
의미
192.168/16 경로는 IS-IS로 재배포됩니다.
연결 확인
목적
디바이스 R1이 디바이스 R3의 대상에 도달할 수 있는지 확인합니다.
행동
운영 모드에서 명령을 입력합니다 ping
.
user@R1> ping 192.168.1.1 PING 192.168.1.1 (192.168.1.1): 56 data bytes 64 bytes from 192.168.1.1: icmp_seq=0 ttl=63 time=2.089 ms 64 bytes from 192.168.1.1: icmp_seq=1 ttl=63 time=1.270 ms 64 bytes from 192.168.1.1: icmp_seq=2 ttl=63 time=2.135 ms
의미
이러한 결과는 디바이스 R1이 OSPF 네트워크의 대상에 도달할 수 있음을 확인합니다.