논리적 시스템에서 최단 경로 우선(OSPF) 구성
논리적 시스템에 대한 최단 경로 우선(OSPF) 지원
이 항목에서는 다음 정보에 대해 설명합니다.
논리적 시스템 소개
Junos OS를 사용하면 단일 물리적 라우터를 독립적인 라우팅 작업을 수행하는 여러 논리적 디바이스로 분할할 수 있습니다. 논리적 시스템은 메인 라우터에서 처리한 작업의 하위 집합을 수행하기 때문에 논리적 시스템은 단일 라우팅 또는 스위칭 플랫폼의 사용을 극대화할 수 있는 효과적인 방법을 제공합니다. 논리적 시스템에는 고유한 라우팅 테이블, 인터페이스, 정책 및 라우팅 인스턴스가 있습니다.
OSPF 및 논리적 시스템
논리적 시스템에 대해 OSPF 버전 2(OSPFv2) 및 OSPF 버전 3(OSPFv3)을 모두 구성할 수 있습니다. OSPFv3의 경우 논리적 시스템에 대해 OSPFv3 영역을 구성할 수도 있으며, 이를 통해 OSPFv3는 유니캐스트 IPv6 이외의 주소 패밀리를 보급할 수 있습니다.
다음 계층 수준에서 논리적 시스템에 대해 최단 경로 우선(OSPF)을 구성합니다.
[edit logical-systems logical-system-name protocols (ospf | ospf3)]
[edit logical-systems logical-system-name protocols ospf3 realm (ipv4-unicast | ipv4-multicast | ipv6-multicast)]
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols (ospf | ospf3)]
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols ospf3 realm (ipv4-unicast | ipv4-multicast | ipv6-multicast)]
예: 동일한 라우터 내의 논리적 시스템에서 최단 경로 우선(OSPF) 구성
이 예에서는 단일 물리적 라우터에서 실행되는 여러 논리적 시스템을 사용해 최단 경로 우선(OSPF) 네트워크를 구성하는 방법을 보여줍니다. 논리적 시스템은 논리적 터널 인터페이스에 의해 연결됩니다.
요구 사항
논리적 터널(lt) 인터페이스를 사용하여 논리적 시스템을 연결해야 합니다. 예: MX 시리즈 라우터 및 EX 시리즈 스위치에서 논리적 터널 인터페이스를 사용하여 동일한 디바이스 내에서 논리적 시스템 연결을 참조하십시오.
개요
이 예는 하나의 물리적 라우터에서 실행되는 세 개의 논리적 시스템을 가진 단일 최단 경로 우선(OSPF) 영역의 구성을 보여줍니다. 각 논리적 시스템에는 자체 라우팅 테이블이 있습니다. 구성은 OSPF 도메인에 참여하는 모든 논리적 시스템 인터페이스에서 프로토콜을 활성화하고 인터페이스가 속한 영역을 지정합니다.
구성
CLI 빠른 구성
이 예를 빠르게 구성하려면 다음의 명령을 복사하여 텍스트 파일에 붙여 넣고 줄 바꿈을 제거한 다음 네트워크 구성에 맞게 필요한 세부 정보를 변경한 후 명령을 복사하여 [edit] 계층 수준에서 CLI에 붙여 넣고 구성 모드에서 을 입력 commit 하시면 됩니다.
set logical-systems LS1 interfaces lt-1/2/0 unit 0 description LS1->LS3 set logical-systems LS1 interfaces lt-1/2/0 unit 0 encapsulation ethernet set logical-systems LS1 interfaces lt-1/2/0 unit 0 peer-unit 5 set logical-systems LS1 interfaces lt-1/2/0 unit 0 family inet address 10.0.1.2/30 set logical-systems LS1 interfaces lt-1/2/0 unit 2 description LS1->LS2 set logical-systems LS1 interfaces lt-1/2/0 unit 2 encapsulation ethernet set logical-systems LS1 interfaces lt-1/2/0 unit 2 peer-unit 1 set logical-systems LS1 interfaces lt-1/2/0 unit 2 family inet address 10.0.0.1/30 set logical-systems LS1 protocols ospf area 0.0.0.0 interface lt-1/2/0.0 set logical-systems LS1 protocols ospf area 0.0.0.0 interface lt-1/2/0.2 set logical-systems LS2 interfaces lt-1/2/0 unit 1 description LS2->LS1 set logical-systems LS2 interfaces lt-1/2/0 unit 1 encapsulation ethernet set logical-systems LS2 interfaces lt-1/2/0 unit 1 peer-unit 2 set logical-systems LS2 interfaces lt-1/2/0 unit 1 family inet address 10.0.0.2/30 set logical-systems LS2 interfaces lt-1/2/0 unit 4 description LS2->LS3 set logical-systems LS2 interfaces lt-1/2/0 unit 4 encapsulation ethernet set logical-systems LS2 interfaces lt-1/2/0 unit 4 peer-unit 3 set logical-systems LS2 interfaces lt-1/2/0 unit 4 family inet address 10.0.2.2/30 set logical-systems LS2 protocols ospf area 0.0.0.0 interface lt-1/2/0.1 set logical-systems LS2 protocols ospf area 0.0.0.0 interface lt-1/2/0.4 set logical-systems LS3 interfaces lt-1/2/0 unit 3 description LS3->LS2 set logical-systems LS3 interfaces lt-1/2/0 unit 3 encapsulation ethernet set logical-systems LS3 interfaces lt-1/2/0 unit 3 peer-unit 4 set logical-systems LS3 interfaces lt-1/2/0 unit 3 family inet address 10.0.2.1/30 set logical-systems LS3 interfaces lt-1/2/0 unit 5 description LS3->LS1 set logical-systems LS3 interfaces lt-1/2/0 unit 5 encapsulation ethernet set logical-systems LS3 interfaces lt-1/2/0 unit 5 peer-unit 0 set logical-systems LS3 interfaces lt-1/2/0 unit 5 family inet address 10.0.1.1/30 set logical-systems LS3 protocols ospf area 0.0.0.0 interface lt-1/2/0.5 set logical-systems LS3 protocols ospf area 0.0.0.0 interface lt-1/2/0.3
절차
단계별 절차
다음 예제에서는 구성 계층에서 다양한 수준의 탐색이 필요합니다. CLI 탐색에 관한 정보는 CLI 사용자 가이드에서 구성 모드에서 CLI 편집기 사용을 참조하십시오.
논리적 시스템에서 최단 경로 우선(OSPF)을 구성하려면 다음을 수행합니다.
논리적 시스템 LS2에 연결하는 논리적 시스템 LS1에서 논리적 터널 인터페이스를 구성합니다.
[edit] user@host# set logical-systems LS1 interfaces lt-1/2/0 unit 2 description LS1->LS2 user@host# set logical-systems LS1 interfaces lt-1/2/0 unit 2 encapsulation ethernet user@host# set logical-systems LS1 interfaces lt-1/2/0 unit 2 peer-unit 1 user@host# set logical-systems LS1 interfaces lt-1/2/0 unit 2 family inet address 10.0.0.1/30
논리적 시스템 LS3에 연결하는 논리적 시스템 LS1에서 논리적 터널 인터페이스를 구성합니다.
[edit] user@host# set logical-systems LS1 interfaces lt-1/2/0 unit 0 description LS1->LS3 user@host# set logical-systems LS1 interfaces lt-1/2/0 unit 0 encapsulation ethernet user@host# set logical-systems LS1 interfaces lt-1/2/0 unit 0 peer-unit 5 user@host# set logical-systems LS1 interfaces lt-1/2/0 unit 0 family inet address 10.0.1.2/30
논리적 시스템 LS1에 연결하는 논리적 시스템 LS2에서 논리적 터널 인터페이스를 구성합니다.
[edit] user@host# set logical-systems LS2 interfaces lt-1/2/0 unit 1 description LS2->LS1 user@host# set logical-systems LS2 interfaces lt-1/2/0 unit 1 encapsulation ethernet user@host# set logical-systems LS2 interfaces lt-1/2/0 unit 1 peer-unit 2 user@host# set logical-systems LS2 interfaces lt-1/2/0 unit 1 family inet address 10.0.0.2/30
논리적 시스템 LS3에 연결하는 논리적 시스템 LS2에 논리적 터널 인터페이스를 구성합니다.
[edit] user@host# set logical-systems LS2 interfaces lt-1/2/0 unit 4 description LS2->LS3 user@host# set logical-systems LS2 interfaces lt-1/2/0 unit 4 encapsulation ethernet user@host# set logical-systems LS2 interfaces lt-1/2/0 unit 4 peer-unit 3 user@host# set logical-systems LS2 interfaces lt-1/2/0 unit 4 family inet address 10.0.2.2/30
논리적 시스템 LS2에 연결하는 논리적 시스템 LS3에서 논리적 터널 인터페이스를 구성합니다.
[edit] user@host# set logical-systems LS3 interfaces lt-1/2/0 unit 3 description LS3->LS2 user@host# set logical-systems LS3 interfaces lt-1/2/0 unit 3 encapsulation ethernet user@host# set logical-systems LS3 interfaces lt-1/2/0 unit 3 peer-unit 4 user@host# set logical-systems LS3 interfaces lt-1/2/0 unit 3 family inet address 10.0.2.1/30
논리적 시스템 LS1에 연결하는 논리적 시스템 LS3에서 논리적 터널 인터페이스를 구성합니다.
[edit] user@host# set logical-systems LS3 interfaces lt-1/2/0 unit 5 description LS3->LS1 user@host# set logical-systems LS3 interfaces lt-1/2/0 unit 5 encapsulation ethernet user@host# set logical-systems LS3 interfaces lt-1/2/0 unit 5 peer-unit 0 user@host# set logical-systems LS3 interfaces lt-1/2/0 unit 5 family inet address 10.0.1.1/30
모든 인터페이스에 최단 경로 우선(OSPF)를 구성합니다.
[edit] user@host# set logical-systems LS1 protocols ospf area 0.0.0.0 interface lt-1/2/0.0 user@host# set logical-systems LS1 protocols ospf area 0.0.0.0 interface lt-1/2/0.2 user@host# set logical-systems LS2 protocols ospf area 0.0.0.0 interface lt-1/2/0.1 user@host# set logical-systems LS2 protocols ospf area 0.0.0.0 interface lt-1/2/0.4 user@host# set logical-systems LS3 protocols ospf area 0.0.0.0 interface lt-1/2/0.5 user@host# set logical-systems LS3 protocols ospf area 0.0.0.0 interface lt-1/2/0.3
디바이스 구성을 완료하면 해당 구성을 커밋합니다.
[edit] user@host# commit
결과
명령을 실행하여 show logical-systems 구성을 확인합니다.
show logical-systems
LS1 {
interfaces {
lt-1/2/0 {
unit 0 {
description LS1->LS3;
encapsulation ethernet;
peer-unit 5;
family inet {
address 10.0.1.2/30;
}
}
unit 2 {
description LS1->LS2;
encapsulation ethernet;
peer-unit 1;
family inet {
address 10.0.0.1/30;
}
}
}
}
protocols {
ospf {
area 0.0.0.0 {
interface lt-1/2/0.0;
interface lt-1/2/0.2;
}
}
}
}
LS2 {
interfaces {
lt-1/2/0 {
unit 1 {
description LS2->LS1;
encapsulation ethernet;
peer-unit 2;
family inet {
address 10.0.0.2/30;
}
}
unit 4 {
description LS2->LS3;
encapsulation ethernet;
peer-unit 3;
family inet {
address 10.0.2.2/30;
}
}
}
}
protocols {
ospf {
area 0.0.0.0 {
interface lt-1/2/0.1;
interface lt-1/2/0.4;
}
}
}
}
LS3 {
interfaces {
lt-1/2/0 {
unit 3 {
description LS3->LS2;
encapsulation ethernet;
peer-unit 4;
family inet {
address 10.0.2.1/30;
}
}
unit 5 {
description LS3->LS1;
encapsulation ethernet;
peer-unit 0;
family inet {
address 10.0.1.1/30;
}
}
}
}
protocols {
ospf {
area 0.0.0.0 {
interface lt-1/2/0.5;
interface lt-1/2/0.3;
}
}
}
}
확인
구성이 올바르게 작동하고 있는지 확인합니다.
논리적 시스템이 작동 중인지 확인하기
목적
인터페이스가 올바르게 구성되었는지 확인합니다.
행동
user@host> show interfaces terse Interface Admin Link Proto Local Remote ... lt-1/2/0 up up lt-1/2/0.0 up up inet 10.0.1.2/30 lt-1/2/0.1 up up inet 10.0.0.2/30 lt-1/2/0.2 up up inet 10.0.0.1/30 lt-1/2/0.3 up up inet 10.0.2.1/30 lt-1/2/0.4 up up inet 10.0.2.2/30 lt-1/2/0.5 up up inet 10.0.1.1/30 ...
논리적 시스템 간 연결 검증
목적
OSPF 인접 테이블을 확인하고, 라우팅 테이블을 확인하고, 논리적 시스템을 ping하여 OSPF 인접성이 설정되었는지 확인합니다.
행동
user@host> show ospf neighbor logical-system LS1 Address Interface State ID Pri Dead 10.0.1.1 lt-1/2/0.0 Full 10.0.1.1 128 37 10.0.0.2 lt-1/2/0.2 Full 10.0.0.2 128 33
user@host> show ospf neighbor logical-system LS2 Address Interface State ID Pri Dead 10.0.0.1 lt-1/2/0.1 Full 10.0.0.1 128 32 10.0.2.1 lt-1/2/0.4 Full 10.0.1.1 128 36
user@host> show ospf neighbor logical-system LS3 Address Interface State ID Pri Dead 10.0.2.2 lt-1/2/0.3 Full 10.0.0.2 128 36 10.0.1.2 lt-1/2/0.5 Full 10.0.0.1 128 37
user@host> show route logical-system LS1
inet.0: 6 destinations, 6 routes (6 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.0.0.0/30 *[Direct/0] 00:28:00
> via lt-1/2/0.2
10.0.0.1/32 *[Local/0] 00:28:00
Local via lt-1/2/0.2
10.0.1.0/30 *[Direct/0] 00:28:00
> via lt-1/2/0.0
10.0.1.2/32 *[Local/0] 00:28:00
Local via lt-1/2/0.0
10.0.2.0/30 *[OSPF/10] 00:27:05, metric 2
> to 10.0.1.1 via lt-1/2/0.0
to 10.0.0.2 via lt-1/2/0.2
224.0.0.5/32 *[OSPF/10] 00:28:03, metric 1
MultiRecv
user@host> show route logical-system LS2
inet.0: 6 destinations, 6 routes (6 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.0.0.0/30 *[Direct/0] 00:28:31
> via lt-1/2/0.1
10.0.0.2/32 *[Local/0] 00:28:32
Local via lt-1/2/0.1
10.0.1.0/30 *[OSPF/10] 00:27:38, metric 2
> to 10.0.0.1 via lt-1/2/0.1
to 10.0.2.1 via lt-1/2/0.4
10.0.2.0/30 *[Direct/0] 00:28:32
> via lt-1/2/0.4
10.0.2.2/32 *[Local/0] 00:28:32
Local via lt-1/2/0.4
224.0.0.5/32 *[OSPF/10] 00:28:34, metric 1
MultiRecv
user@host> show route logical-system LS3
inet.0: 6 destinations, 6 routes (6 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.0.0.0/30 *[OSPF/10] 00:28:23, metric 2
> to 10.0.2.2 via lt-1/2/0.3
to 10.0.1.2 via lt-1/2/0.5
10.0.1.0/30 *[Direct/0] 00:29:13
> via lt-1/2/0.5
10.0.1.1/32 *[Local/0] 00:29:15
Local via lt-1/2/0.5
10.0.2.0/30 *[Direct/0] 00:29:14
> via lt-1/2/0.3
10.0.2.1/32 *[Local/0] 00:29:15
Local via lt-1/2/0.3
224.0.0.5/32 *[OSPF/10] 00:29:16, metric 1
MultiRecv
LS1에서 LS3 ping
user@host> set cli logical-system LS1
user@host:LS1> ping 10.0.2.1 PING 10.0.2.1 (10.0.2.1): 56 data bytes 64 bytes from 10.0.2.1: icmp_seq=0 ttl=64 time=1.215 ms 64 bytes from 10.0.2.1: icmp_seq=1 ttl=64 time=1.150 ms 64 bytes from 10.0.2.1: icmp_seq=2 ttl=64 time=1.134 ms
LS3에서 LS1 ping
user@host> set cli logical-system LS3
user@host:LS3> ping 10.0.0.1 PING 10.0.0.1 (10.0.0.1): 56 data bytes 64 bytes from 10.0.0.1: icmp_seq=0 ttl=64 time=1.193 ms 64 bytes from 10.0.0.1: icmp_seq=1 ttl=64 time=1.114 ms 64 bytes from 10.0.0.1: icmp_seq=2 ttl=64 time=1.190 ms
