예: IS-IS에 대한 레이어 2 매핑 구성
이 예는 IS-IS에 대한 레이어 2 매핑, 즉 레이어 2 MAC 주소 포워딩 다음 홉의 IPv4 주소에 매핑하는 방법을 보여줍니다. 레이어 2 매핑은 트래픽 손실을 최소화하고, 더 나은 보안을 제공하며, 이더넷 링크를 활성화하는 동시에 코어 링크에서 레이어 2 해상도 처리를 줄입니다.
요구 사항
이 예는 다음과 같은 하드웨어 및 소프트웨어 구성 요소를 사용합니다.
MX 시리즈 라우터 2개
Junos OS 모든 디바이스에서 릴리스 16.1 이상 실행
개요
레이어 2 매핑은 포워딩 다음 홉 해상도가 트래픽 중심이 아닌 토폴로지 중심임을 보장합니다. IS-IS LAN 및 point-to-point Hellos는 주소 해결을 위해 모든 관련 레이어 2 및 레이어 3 바인딩 주소 정보를 제공합니다. 수신 엔드의 디바이스는 정보를 사용하여 경로 설치 시간 이전에도 커널의 ARP 또는 neighbor discovery 캐시를 채울 수 있습니다. 레이어 2 매핑이 활성화되면 IS-IS는 ARP 또는 인접 탐색 다음 홉 항목을 포워딩 테이블 설치합니다. 이는 레이어 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를 비활성화합니다.
[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 주소에 매핑됩니다.