예: IS-IS(Intermediate System to Intermediate System)에 대한 레이어 2 매핑 구성
이 예는 IS-IS(Intermediate System to Intermediate System)에 대한 레이어 2 매핑, 즉 레이어 2 MAC 주소를 포워딩 다음 홉의 IPv4 주소에 매핑하는 방법을 보여줍니다. 레이어 2 매핑은 트래픽 손실을 최소화하고, 보안을 강화하며, 이더넷 링크를 활성화하는 동안 코어 링크에서 레이어 2 해상도 처리를 줄입니다.
요구 사항
이 예에서 사용되는 하드웨어 및 소프트웨어 구성 요소는 다음과 같습니다.
MX 시리즈 라우터 2개
모든 디바이스에서 Junos OS 릴리스 16.1 이상 실행
개요
레이어 2 매핑은 포워딩 다음 홉 해상도가 트래픽 기반이 아닌 토폴로지 기반이 되도록 합니다. IS-IS(Intermediate System to Intermediate System) LAN 및 point-to-point Hello는 주소 해결을 위해 관련된 모든 레이어 2 및 레이어 3 바인딩 주소 정보를 제공합니다. 수신 엔드의 디바이스는 정보를 사용하여 경로 설치 시간 전에도 커널의 ARP 또는 neighbor discovery 캐시를 채울 수 있습니다. 레이어 2 매핑이 활성화되면 IS-IS(Intermediate System to Intermediate System)는 포워딩 테이블에 ARP 또는 neighbor 디스커버리 넥스트 홉 엔트리를 설치합니다. 이는 레이어 2 넥스트 홉 바인딩을 미리 제공하기 때문에 IS-IS 네트워크는 링크를 실행하는 동안 트래픽 손실을 경험하지 않습니다.
위상수학
그림 1에서 라우터 R1은 라우터 R2에 연결되어 있습니다. 레이어 2 매핑은 라우터 R1에서 활성화됩니다. 라우터 R2는 라우터 R1로부터 레이어 2 정보를 수신하고 포워딩 테이블을 업데이트합니다.

구성
CLI 빠른 구성
이 예를 빠르게 구성하려면, 아래 명령을 복사하여 텍스트 파일로 붙여 넣은 다음 모든 라인브레이크를 제거하고, 네트워크 구성을 일치하는 데 필요한 세부 사항을 바꾸고 계층 수준에서 명령을 CLI [edit]
로 복사해 붙여 넣은 다음, 구성 모드에서 을(를) 입력합니다 commit
.
라우터 R1
set interfaces ge-1/0/3 description R0–>R1_1 set interfaces ge-1/0/3 unit 0 family inet address 192.10.1.1/24 set interfaces ge-1/0/3 unit 0 family iso set interfaces ge-1/0/3 unit 0 family inet6 address 0000:0000:0000:0000:192:10:1:1/120 set interfaces ge-1/0/3 unit 0 family mpls set interfaces ge-1/0/7 description R0–>RT0 set interfaces ge-1/0/7 unit 0 family inet address 193.1.1.1/30 set interfaces ge-1/0/7 unit 0 family iso set interfaces ge-1/0/7 unit 0 family inet6 address 0000:0000:0000:0000:193:1:1:1/120 set interfaces ge-1/0/7 unit 0 family mpls set interfaces ge-1/1/1 description R0–>R1_2 set interfaces ge-1/1/1 unit 0 family inet address 192.10.2.1/30 set interfaces ge-1/1/1 unit 0 family iso set interfaces ge-1/1/1 unit 0 family inet6 address 0000:0000:0000:0000:192:10:2:1/120 set interfaces ge-1/1/1 unit 0 family mpls set lo0 unit 0 family inet address 10.255.162.100/32 set routing-options router-id 10.255.162.100 set protocols rsvp interface all set protocols rsvp interface lo0.0 set protocols rsvp interface fxp0.0 disable set protocols mpls interface all set protocols mpls interface lo0.0 set protocols mpls interface fxp0.0 disable set protocols isis layer2-map set protocols isis interface ge-1/0/3.0 level 2 disable set protocols ldp interface all set protocols ldp interface fxp0.0 disable set protocols ldp interface lo0.0
라우터 R2
set interfaces ge-0/0/2 descriptionR0–>R1_1 set interfaces ge-0/0/2 unit 0 family inet address 192.10.1.2/24 set interfaces ge-0/0/2 unit 0 family iso set interfaces ge-0/0/2 unit 0 family inet6 address 0000:0000:0000:0000:192:10:1:2/120 set interfaces ge-0/0/2 unit 0 family mpls set interfaces ge-2/0/3 description R1–>RT0 set interfaces ge-2/0/3 unit 0 family inet address 193.2.1.1/30 set interfaces ge-2/0/3 unit 0 family iso set interfaces ge-2/0/3 unit 0 family inet6 address 0000:0000:0000:0000:193:2:1:1/120 set interfaces ge-2/0/3 unit 0 family mpls set interfaces ge-2/0/8 description R0–>R1_2 set interfaces ge-2/0/8 unit 0 family inet address 192.10.2.2/30 set interfaces ge-2/0/8 unit 0 family iso set interfaces ge-2/0/8 unit 0 family inet6 address 0000:0000:0000:0000:192:10:2:2/120 set interfaces ge-2/0/8 unit 0 family mpls set interfaces lo0 unit 0 family inet address 10.255.162.102/32 set routing-options router-id 10.255.162.109 set protocols rsvp interface all set protocols rsvp interface lo0.0 set protocols rsvp interface fxp0.0 disable set protocols mpls interface all set protocols mpls interface lo0.0 set protocols mpls interface fxp0.0 disable set protocols isis interface ge-0/0/2.0 level 2 disable set protocols ldp interface all set protocols ldp interface fxp0.0 disable set protocols ldp interface lo0.0
절차
단계별 절차
다음 예는 구성 계층에서 다양한 수준의 탐색이 필요합니다. CLI 탐색 관련 정보는 Junos OS CLI 사용자 가이드의 구성 모드에서 CLI 편집기 사용을 참조하십시오.
라우터 R1에서 레이어 2 매핑을 구성하려면 다음과 같이 하십시오.
적절한 인터페이스 이름, 주소, 기타 매개 변수를 수정한 후 라우터 2에 이 절차를 반복합니다.
디바이스 인터페이스를 구성합니다.
[edit interfaces] user@R1# set ge-1/0/3 description R0–>R1_1 user@R1# set ge-1/0/3 unit 0 family inet address 192.10.1.1/24 user@R1# set ge-1/0/3 unit 0 family iso user@R1# set ge-1/0/3 unit 0 family inet6 address 0000:0000:0000:0000:192:10:1:1/120 user@R1# set ge-1/0/3 unit 0 family mpls user@R1# set ge-1/0/7 description R0–>RT0 user@R1# set ge-1/0/7 unit 0 family inet address 193.1.1.1/30 user@R1# set ge-1/0/7 unit 0 family iso user@R1# set ge-1/0/7 unit 0 family inet6 address 0000:0000:0000:0000:193:1:1:1/120 user@R1# set ge-1/0/7 unit 0 family mpls user@R1# set ge-1/1/1 description R0–>R1_2 user@R1# set ge-1/1/1 unit 0 family inet address 192.10.2.1/30 user@R1# set ge-1/1/1 unit 0 family iso user@R1# set ge-1/1/1 unit 0 family inet6 address 0000:0000:0000:0000:192:10:2:1/120 user@R1# set ge-1/1/1 unit 0 family mpls
루프백 인터페이스를 구성합니다.
[edit interfaces] user@R1# set lo0 unit 0 family inet address 10.255.162.100/32
라우터 ID를 구성합니다.
[edit routing-options] user@R1# set router-id 10.255.162.100
관리 인터페이스를 제외한 모든 인터페이스에서 RSVP, MPLS 및 LDP를 구성합니다.
[edit protocols] user@R1# set rsvp interface all user@R1# set rsvp interface lo0.0 user@R1# set rsvp interface fxp0.0 disable user@R1# set mpls interface all user@R1# set mpls interface lo0.0 user@R1# set mpls interface fxp0.0 disable user@R1# set ldp interface all user@R1# set ldp interface fxp0.0 disable user@R1# set ldp interface lo0.0
레이어 2 매핑을 활성화합니다.
[edit protocols] user@R1# set isis layer2-map
인터페이스 ge-1/0/3.0에서 레벨 2 IS-IS(Intermediate System to Intermediate System)를 비활성화합니다.
[edit protocols] user@R1# set isis interface ge-1/0/3.0 level 2 disable
결과
구성 모드에서 , show protocols
, 및 show routing-options
명령을 입력하여 show interfaces
구성을 확인합니다. 출력 결과가 의도한 구성대로 표시되지 않으면 이 예의 지침을 반복하여 구성을 수정하십시오.
[edit] user@R1# show interfaces ge-1/0/3 { description 0–>R1_1; unit 0 { family inet { address 192.10.1.1/24; } family iso; family inet6 { address 0000:0000:0000:0000:192:10:1:1/120; } family mpls; } } ge-1/0/7 { description R0–>RT0; unit 0 { family inet { address 193.1.1.1/30; } family iso; family inet6 { address 0000:0000:0000:0000:193:1:1:1/120; } family mpls; } } ge-1/1/1 { description R0–>R1_2; unit 0 { family inet { address 192.10.2.1/30; } family iso; family inet6 { address 0000:0000:0000:0000:192:10:2:1/120; } family mpls; } } lo0 { unit 0 { family inet { address 10.255.162.100/32; } } }
[edit] user@R1# show protocols rsvp { interface all; interface lo0.0; interface fxp0.0 { disable; } } mpls { interface all; interface lo0.0; interface fxp0.0 { disable; } } isis { layer2-map; } ldp { interface all; interface fxp0.0 { disable; } interface lo0.0; }
[edit] user@R1# show routing-options router-id 10.255.162.100;
디바이스 구성을 완료하면 해당 구성을 커밋합니다.
user@R1# commit
확인
구성이 올바르게 작동하고 있는지 확인합니다.
IS-IS 인접성 확인
목적
라우터 R1과 라우터 R2 사이에 예상되는 인접성이 형성되었는지 확인합니다.
행동
운영 모드의 라우터 R1에서 명령을 실행합니다 show isis adjacency .
user@R1> show isis adjacency Interface System L State Hold (secs) SNPA ge-1/0/3.0 R2 1 Up 8 88:e0:f3:5e:e8:2
의미
라우터 R1의 인터페이스 ge-1/0/3.0은 라우터 R2와 인접성을 설정했습니다.
레이어 2 매핑이 활성화되었는지 확인
목적
라우터 R1에서 레이어 2 매핑이 활성화되었는지 확인합니다.
행동
운영 모드의 라우터 R1에서 명령을 실행합니다 show isis interface detail .
user@R1> show isis interface detail IS-IS interface database: ge-1/0/3.0 Index: 196612, State: 0x6, Circuit id: 0x1, Circuit type: 1 LSP interval: 100 ms, CSNP interval: 10 s Adjacency advertisement: Advertise, Layer2-map: Enabled Level Adjacencies Priority Metric Hello (s) Hold (s) Designated Router 1 1 64 10 9.000 27 R2.02 (not us) 2 0 64 10 Disabled
의미
출력은 라우터 R1에서 레이어 2 매핑이 활성화되었음을 확인합니다.
레이어 2 주소가 매핑되는지 확인
목적
라우팅 인스턴스에 대한 커널에 레이어 3 다음 홉과 매핑된 데이터 링크 주소를 표시합니다.
행동
운영 모드의 라우터 R1에서 명령을 실행합니다 show isis layer2-map .
user@R1> show isis layer2-map Layer2 mapping database for instance master IP Address Interface SNPA Refresh State 192.10.1.2 ge-1/0/3.0 88:e0:f3:5e:e8:2 00:11:54 fe80::8ae0:f3ff:fe5e:e802 ge-1/0/3.0 88:e0:f3:5e:e8:2 00:04:02 IPv4 records: 1 IPv6 records: 1
의미
다음 홉의 레이어 2 MAC 주소는 커널에서 인터페이스 ge-1/0/3.0의 IP 주소에 매핑됩니다.