패킷 전달 동작 구성
간접 다음 홉 이해하기
Junos OS는 간접적으로 연결된 다음 홉(타사 다음 홉이라고도 함)을 지원하는 모든 라우팅 프로토콜에 대해 간접 다음 홉의 개념을 지원합니다.
내부 BGP(IBGP)와 같은 라우팅 프로토콜은 간접적으로 연결된 경로에 대한 라우팅 정보를 전송할 수 있기 때문에, Junos OS는 AS 내부 라우팅 프로토콜(OSPF, IS-IS, RIP 및 정적)의 경로에 의존하여 최고의 직접 연결된 다음 홉을 확인합니다. 라우팅 엔진은 경로 확인을 수행하여 최고의 연결된 다음 홉을 결정하고 패킷 포워딩 엔진에 경로를 설치합니다.
기본적으로 Junos OS는 패킷 포워딩 엔진 포워딩 테이블에서 포워딩 넥스트 홉 바인딩에 대한 간접 다음 홉 경로를 유지하지 않습니다. 그 결과, 재라우팅 이벤트가 발생할 때 잠재적으로 수천 개의 포워딩 넥스트 홉 바인딩에 대한 경로를 업데이트해야 하며, 이 경우 경로 컨버전스 시간이 증가합니다. 그림 1 은 간접 다음 홉이 비활성화된 상태에서 다음 홉 바인딩을 포워딩하는 경로를 보여줍니다.

Junos OS를 활성화하여 패킷 포워딩 엔진 포워딩 테이블에서 포워딩 다음 홉 바인딩에 대한 간접 다음 홉을 유지할 수 있습니다. 그 결과, 포워딩 다음 홉 바인딩을 업데이트해야 하는 경로 수가 줄어들어 경로 컨버전스 시간이 향상됩니다. 그림 2 는 간접 다음 홉을 사용하도록 설정된 다음 홉 바인딩을 전달하는 경로를 보여줍니다.

예: 패킷 포워딩 엔진에서 간접 다음 홉을 활성화하여 경로 리컨버전스 최적화
이 예는 간접 다음 홉을 사용하여 네트워크 토폴로지 변경 시 필요한 포워딩 테이블 변경 횟수를 줄임으로써 더 빠른 네트워크 컨버전스(예: BGP 네트워크)를 촉진하는 방법을 보여줍니다.
요구 사항
이 예를 구성하기 전에 디바이스 초기화를 제외한 특별한 구성은 필요하지 않습니다.
개요
이 예에서는 여러 디바이스가 동일하지 않은 비용 경로를 통해 연결됩니다. 디바이스 R1에서 디바이스 R2까지, 디바이스 R3을 통과하는 경로는 디바이스 R4를 통과하는 경로보다 더 높은 IGP 메트릭을 가집니다. 디바이스 R1은 디바이스 R2로의 내부 BGP 연결을 보유합니다. 디바이스 R0은 여러 경로를 네트워크에 삽입하고, 디바이스 R1은 이러한 경로를 디바이스 R2에 보급합니다. 디바이스 R2가 디바이스 R1에 직접 연결되어 있지 않기 때문에 디바이스 R2의 포워딩 테이블에는 간접 다음 홉이 포함됩니다. 내부 게이트웨이 프로토콜(이 경우 OSPF)은 디바이스 R1, R2, R3 및 R4 사이의 내부 링크에서 실행됩니다. 각 라우터는 루프백 인터페이스 IPv4 주소를 광고합니다.
디바이스 R2에서 명령문은 indirect-next-hop
Junos OS가 패킷 포워딩 엔진 포워딩 테이블에서 포워딩 넥스트 홉 바인딩에 대한 간접 다음 홉을 유지할 수 있도록 합니다. 그 결과, 포워딩 다음 홉 바인딩을 업데이트해야 하는 경로 수가 줄어들어 경로에 장애가 발생할 경우 경로 컨버전스 시간이 향상됩니다.
구성
CLI 빠른 구성
이 예를 빠르게 구성하려면, 아래 명령을 복사하여 텍스트 파일로 붙여 넣은 다음 모든 라인브레이크를 제거하고, 네트워크 구성을 일치하는 데 필요한 세부 사항을 바꾸고 계층 수준에서 명령을 CLI [edit]
로 복사해 붙여 넣습니다.
디바이스 R0
set interfaces fe-1/2/0 unit 1 family inet address 10.0.0.1/30 set interfaces lo0 unit 1 family inet address 10.1.0.1/32 set interfaces lo0 unit 1 family inet address 10.1.0.2/32 set interfaces lo0 unit 1 family inet address 10.1.0.3/32 set interfaces lo0 unit 1 family inet address 10.1.0.4/32 set interfaces lo0 unit 1 family inet address 10.1.0.5/32 set interfaces lo0 unit 1 family inet address 10.1.0.6/32 set interfaces lo0 unit 1 family inet address 10.1.0.7/32 set interfaces lo0 unit 1 family inet address 10.1.0.8/32 set interfaces lo0 unit 1 family inet address 10.1.0.9/32 set routing-options static route 0.0.0.0/0 next-hop 10.0.0.2
디바이스 R1
set interfaces fe-1/2/0 unit 2 family inet address 10.0.0.2/30 set interfaces fe-1/2/1 unit 5 family inet address 10.0.0.5/30 set interfaces fe-1/2/2 unit 9 family inet address 10.0.0.9/30 set interfaces lo0 unit 2 family inet address 10.1.1.1/32 set protocols bgp export send-local set protocols bgp export send-static set protocols bgp group int type internal set protocols bgp group int local-address 10.1.1.1 set protocols bgp group int neighbor 10.2.2.2 set protocols ospf area 0.0.0.0 interface fe-1/2/1.5 set protocols ospf area 0.0.0.0 interface fe-1/2/2.9 set protocols ospf area 0.0.0.0 interface lo0.2 set policy-options policy-statement send-local from protocol local set policy-options policy-statement send-local from protocol direct set policy-options policy-statement send-local then accept set policy-options policy-statement send-static from protocol static set policy-options policy-statement send-static then accept set routing-options static route 10.1.0.2/32 next-hop 10.0.0.1 set routing-options static route 10.1.0.1/32 next-hop 10.0.0.1 set routing-options static route 10.1.0.3/32 next-hop 10.0.0.1 set routing-options static route 10.1.0.4/32 next-hop 10.0.0.1 set routing-options static route 10.1.0.5/32 next-hop 10.0.0.1 set routing-options static route 10.1.0.6/32 next-hop 10.0.0.1 set routing-options static route 10.1.0.7/32 next-hop 10.0.0.1 set routing-options static route 10.1.0.8/32 next-hop 10.0.0.1 set routing-options static route 10.1.0.9/32 next-hop 10.0.0.1 set routing-options autonomous-system 65500
디바이스 R2
set interfaces fe-1/2/0 unit 14 family inet address 10.0.0.14/30 set interfaces fe-1/2/1 unit 18 family inet address 10.0.0.18/30 set interfaces fe-1/2/2 unit 21 family inet set interfaces lo0 unit 3 family inet address 10.2.2.2/32 set protocols bgp export send-local set protocols bgp group int type internal set protocols bgp group int local-address 10.2.2.2 set protocols bgp group int family inet unicast set protocols bgp group int family inet-vpn unicast set protocols bgp group int neighbor 10.1.1.1 set protocols ospf area 0.0.0.0 interface fe-1/2/0.14 set protocols ospf area 0.0.0.0 interface fe-1/2/1.18 set protocols ospf area 0.0.0.0 interface lo0.3 set policy-options policy-statement send-local from protocol local set policy-options policy-statement send-local from protocol direct set policy-options policy-statement send-local then accept set routing-options autonomous-system 65500 set routing-options forwarding-table indirect-next-hop
디바이스 R3
set interfaces fe-1/2/0 unit 6 family inet address 10.0.0.6/30 set interfaces fe-1/2/1 unit 13 family inet address 10.0.0.13/30 set interfaces lo0 unit 4 family inet address 10.3.3.3/32 set protocols ospf area 0.0.0.0 interface fe-1/2/0.6 metric 5000 set protocols ospf area 0.0.0.0 interface fe-1/2/1.13 metric 5000 set protocols ospf area 0.0.0.0 interface lo0.4
디바이스 R4
set interfaces fe-1/2/0 unit 10 family inet address 10.0.0.10/30 set interfaces fe-1/2/1 unit 17 family inet address 10.0.0.17/30 set interfaces lo0 unit 5 family inet address 10.4.4.4/32 set protocols ospf area 0.0.0.0 interface fe-1/2/0.10 set protocols ospf area 0.0.0.0 interface fe-1/2/1.17 set protocols ospf area 0.0.0.0 interface lo0.5
디바이스 R5
set interfaces fe-1/2/0 unit 22 family inet address 10.0.0.22/30 set interfaces lo0 unit 6 family inet address 10.5.5.5/32
디바이스 R0 구성
단계별 절차
다음 예제에서는 구성 계층에서 다양한 수준의 탐색이 필요합니다. CLI 탐색 관련 정보는 Junos OS CLI 사용자 가이드의 구성 모드에서 CLI 편집기 사용을 참조하십시오.
디바이스 R0 구성:
-
데모용으로 네트워크에 삽입할 수 있는 여러 경로를 포함하여 인터페이스를 구성합니다.
[edit interfaces] user@R0# set fe-1/2/0 unit 1 family inet address 10.0.0.1/30 user@R0# set lo0 unit 1 family inet address 10.1.0.1/32 user@R0# set lo0 unit 1 family inet address 10.1.0.2/32 user@R0# set lo0 unit 1 family inet address 10.1.0.3/32 user@R0# set lo0 unit 1 family inet address 10.1.0.4/32 user@R0# set lo0 unit 1 family inet address 10.1.0.5/32 user@R0# set lo0 unit 1 family inet address 10.1.0.6/32 user@R0# set lo0 unit 1 family inet address 10.1.0.7/32 user@R0# set lo0 unit 1 family inet address 10.1.0.8/32 user@R0# set lo0 unit 1 family inet address 10.1.0.9/32
-
네트워크 연결성을 위해 정적 기본 경로를 구성합니다.
[edit routing-options] user@R0# set static route 0.0.0.0/0 next-hop 10.0.0.2
-
디바이스 구성을 완료하면 해당 구성을 커밋합니다.
[edit] user@R0# commit
디바이스 R1 구성
단계별 절차
다음 예제에서는 구성 계층에서 다양한 수준의 탐색이 필요합니다. CLI 탐색 관련 정보는 Junos OS CLI 사용자 가이드의 구성 모드에서 CLI 편집기 사용을 참조하십시오.
디바이스 R1 구성
-
데모용으로 네트워크에 삽입할 수 있는 여러 경로를 포함하여 인터페이스를 구성합니다.
[edit interfaces] user@R1# set fe-1/2/0 unit 2 family inet address 10.0.0.2/30 user@R1# set fe-1/2/1 unit 5 family inet address 10.0.0.5/30 user@R1# set fe-1/2/2 unit 9 family inet address 10.0.0.9/30 user@R1# set lo0 unit 2 family inet address 10.1.1.1/32
-
BGP를 구성합니다.
[edit protocols] user@R1# set bgp export send-local user@R1# set bgp export send-static user@R1# set bgp group int type internal user@R1# set bgp group int local-address 10.1.1.1 user@R1# set bgp group int neighbor 10.2.2.2
-
OSPF를 구성합니다.
[edit protocols] user@R1# set ospf area 0.0.0.0 interface fe-1/2/1.5 user@R1# set ospf area 0.0.0.0 interface fe-1/2/2.9 user@R1# set ospf area 0.0.0.0 interface lo0.2
-
라우팅 정책을 구성합니다.
[edit] user@R1# set policy-options policy-statement send-local from protocol local user@R1# set policy-options policy-statement send-local from protocol direct user@R1# set policy-options policy-statement send-local then accept user@R1# set policy-options policy-statement send-static from protocol static user@R1# set policy-options policy-statement send-static then accept
-
디바이스 R0에서 구성된 인터페이스 집합에 대한 정적 경로 집합을 구성합니다.
[edit] user@R1# set routing-options static route 10.1.0.2/32 next-hop 10.0.0.1 user@R1# set routing-options static route 10.1.0.1/32 next-hop 10.0.0.1 user@R1# set routing-options static route 10.1.0.3/32 next-hop 10.0.0.1 user@R1# set routing-options static route 10.1.0.4/32 next-hop 10.0.0.1 user@R1# set routing-options static route 10.1.0.5/32 next-hop 10.0.0.1 user@R1# set routing-options static route 10.1.0.6/32 next-hop 10.0.0.1 user@R1# set routing-options static route 10.1.0.7/32 next-hop 10.0.0.1 user@R1# set routing-options static route 10.1.0.8/32 next-hop 10.0.0.1 user@R1# set routing-options static route 10.1.0.9/32 next-hop 10.0.0.1
-
AS(Autonomous System) 식별자를 구성합니다.
[edit] user@R1# set routing-options autonomous-system 65500
-
디바이스 구성을 완료하면 해당 구성을 커밋합니다.
[edit] user@R1# commit
디바이스 R2 구성
단계별 절차
다음 예제에서는 구성 계층에서 다양한 수준의 탐색이 필요합니다. CLI 탐색 관련 정보는 Junos OS CLI 사용자 가이드의 구성 모드에서 CLI 편집기 사용을 참조하십시오.
디바이스 R2 구성:
-
데모용으로 네트워크에 삽입할 수 있는 여러 경로를 포함하여 인터페이스를 구성합니다.
[edit interfaces] user@R2# set fe-1/2/0 unit 14 family inet address 10.0.0.14/30 user@R2# set fe-1/2/1 unit 18 family inet address 10.0.0.18/30 user@R2# set fe-1/2/2 unit 21 family inet address 10.0.0.21/30; user@R2# set lo0 unit 3 family inet address 10.2.2.2/32
-
BGP를 구성합니다.
[edit] user@R2# set protocols bgp export send-local user@R2# set protocols bgp group int type internal user@R2# set protocols bgp group int local-address 10.2.2.2 user@R2# set protocols bgp group int family inet unicast user@R2# set protocols bgp group int family inet-vpn unicast user@R2# set protocols bgp group int neighbor 10.1.1.1
-
OSPF를 구성합니다.
[edit] user@R2# set protocols ospf area 0.0.0.0 interface fe-1/2/0.14 user@R2# set protocols ospf area 0.0.0.0 interface fe-1/2/1.18 user@R2# set protocols ospf area 0.0.0.0 interface lo0.3
-
라우팅 정책을 구성합니다.
[edit] user@R2# set policy-options policy-statement send-local from protocol local user@R2# set policy-options policy-statement send-local from protocol direct user@R2# set policy-options policy-statement send-local then accept
-
AS 식별자를 구성합니다.
[edit] user@R2# set routing-options autonomous-system 65500
-
포워딩 플레인에서 간접 다음 홉을 활성화합니다.
[edit] user@R2# set routing-options forwarding-table indirect-next-hop
-
디바이스 구성을 완료하면 해당 구성을 커밋합니다.
[edit] user@R2# commit
결과
, show protocols
, show policy-options
show routing-options
및 명령을 입력하여 show interfaces
구성을 확인합니다. 출력 결과가 의도한 구성대로 표시되지 않으면 이 예의 지침을 반복하여 구성을 수정하십시오.
디바이스 R0
user@R0# show interfaces fe-1/2/0 { unit 1 { family inet { address 10.0.0.1/30; } } } lo0 { unit 1 { family inet { address 10.1.0.1/32; address 10.1.0.2/32; address 10.1.0.3/32; address 10.1.0.4/32; address 10.1.0.5/32; address 10.1.0.6/32; address 10.1.0.7/32; address 10.1.0.8/32; address 10.1.0.9/32; } } }
user@R0# show routing-options static { route 0.0.0.0/0 next-hop 10.0.0.2; }
디바이스 R1
user@R1# show interfaces fe-1/2/0 { unit 2 { family inet { address 10.0.0.2/30; } } } fe-1/2/1 { unit 5 { family inet { address 10.0.0.5/30; } } } fe-1/2/2 { unit 9 { family inet { address 10.0.0.9/30; } } } lo0 { unit 2 { family inet { address 10.1.1.1/32; } } }
user@R1# show protocols bgp { export [ send-local send-static ]; group int { type internal; local-address 10.1.1.1; neighbor 10.2.2.2; } } ospf { area 0.0.0.0 { interface fe-1/2/1.5; interface fe-1/2/2.9; interface lo0.2; } }
user@R1# show policy-options policy-statement send-local { from protocol [ local direct ]; then accept; } policy-statement send-static { from protocol static; then accept; }
user@R1# show routing-options static { route 10.1.0.2/32 next-hop 10.0.0.1; route 10.1.0.1/32 next-hop 10.0.0.1; route 10.1.0.3/32 next-hop 10.0.0.1; route 10.1.0.4/32 next-hop 10.0.0.1; route 10.1.0.5/32 next-hop 10.0.0.1; route 10.1.0.6/32 next-hop 10.0.0.1; route 10.1.0.7/32 next-hop 10.0.0.1; route 10.1.0.8/32 next-hop 10.0.0.1; route 10.1.0.9/32 next-hop 10.0.0.1; } autonomous-system 65500;
디바이스 R2
user@R2# show interfaces fe-1/2/0 { unit 14 { family inet { address 10.0.0.14/30; } } } fe-1/2/1 { unit 18 { family inet { address 10.0.0.18/30; } } } fe-1/2/2 { unit 21 { family inet { address 10.0.0.21/30 } } } lo0 { unit 3 { family inet { address 10.2.2.2/32; } } }
user@R2# show protocols bgp { export send-local; group int { type internal; local-address 10.2.2.2; family inet { unicast; } family inet-vpn { unicast; } neighbor 10.1.1.1; } } ospf { area 0.0.0.0 { interface fe-1/2/0.14; interface fe-1/2/1.18; interface lo0.3; } }
user@R2# show policy-options policy-statement send-local { from protocol [ local direct ]; then accept; }
user@R2# show routing-options autonomous-system 65500; forwarding-table { indirect-next-hop; }
CLI 빠른 구성에 표시된 대로 디바이스 R3, 디바이스 R4 및 디바이스 R5를 구성합니다.
확인
구성이 올바르게 작동하고 있는지 확인합니다.
경로에 예상되는 indirect-next-hop 플래그가 있는지 확인
목적
디바이스 R2가 패킷 포워딩 엔진 포워딩 테이블에서 포워딩 다음 홉 바인딩에 대한 간접 다음 홉을 유지하도록 구성되었는지 확인합니다.
행동
user@R2> show krt indirect-next-hop show krt indirect-next-hop Indirect Nexthop: Index: 1048575 Protocol next-hop address: 10.255.3.1 RIB Table: __mpls-oam__.mpls.0 Label: Swap 299968 Policy Version: 0 References: 1 Locks: 2 0x95bc514 Flags: 0x3 INH Session ID: 0xa INH Version ID: 1 Ref RIB Table: unknown Next hop: 10.50.244.9 via ge-2/0/2.0 Label operation: Swap 299968, Push 299792(top) Label TTL action: no-prop-ttl, no-prop-ttl(top) Session Id: 0x9 IGP FRR Interesting proto count : 0
의미
출력의 플래그는 0x3
디바이스 R2가 패킷 포워딩 엔진 포워딩 테이블에서 포워딩 다음 홉 바인딩에 대한 간접 다음 홉을 유지하도록 구성되었음을 나타냅니다. indirect-next-hop
구성에서 문이 삭제되거나 비활성화되면 이 플래그는 으로 변경됩니다0x2
. Trio MPC(Modular Port Concentrator) 칩셋이 장착된 Junos MX 시리즈 라우터는 기본적으로 간접 다음 홉을 지원하며 비활성화할 수 없습니다. 따라서 에서 forwarding-options
구성하지 않았더라도 indirect-next-hop
이 기능은 기본적으로 작동합니다. 0x3
따라서 플래그는 Trio MPC(Modular Port Concentrator)에 적용되지 않습니다.
show krt indirect-next-hop
명령이 숨겨져 있으므로 문서화되지 않습니다. show krt indirect-next-hop
명령이 여기에 표시된 이유는 이 명령이 간접 다음 홉 기능을 확인하는 유일한 명령이기 때문입니다. 물론 가장 좋은 검증 방법은 경로 장애 후 재컨버전스 중에 네트워크 성능을 모니터링하는 것입니다.