이 페이지의 내용
BGP 세션을 위한 AS(Autonomous System)
BGP 로컬 AS 속성 이해
인터넷 서비스 프로바이더(ISP)가 다른 AS(Autonomous System)에 속하는 네트워크를 인수하는 경우, 인수한 네트워크의 BGP 피어를 획득 ISP의 AS로 이동할 수 있는 원활한 방법은 없습니다. 새 AS 번호로 BGP 피어를 구성하는 프로세스는 시간이 많이 걸리고 번거로울 수 있습니다. 때로는 고객이 피어 배열이나 구성을 즉시 수정하기를 원하지 않거나 수정할 수 없는 경우도 있습니다. 이러한 종류의 전환 기간 동안 BGP 업데이트에서 이전 AS 번호를 사용하도록 새 AS에서 BGP 지원 디바이스를 구성하는 것이 유용할 수 있습니다. 이 이전 AS 번호를 로컬 AS라고 합니다.
로컬 AS 번호를 사용하면 획득한 네트워크의 라우팅 디바이스가 이전 AS에 속하는 것처럼 보일 수 있습니다.
예를 들어, AS가 65200인 ISP A는 AS가 65250인 ISP B를 인수합니다. ISP B의 고객인 ISP C는 구성을 변경하지 않으려는 고객입니다. ISP B가 ISP A의 일부가 된 후, 로컬 AS 번호 65250이 ISP C와의 EBGP 피어 세션에서 사용하도록 구성됩니다. 결과적으로, ISP C의 직접 외부 피어로 경로를 내보내는 데 사용되는 AS 경로에서 글로벌 AS 번호 65200 대신 로컬 AS 번호 65250이 앞에 추가되거나 사용됩니다.
경로가 내부 BGP(IBGP) 피어에서 수신된 경우 AS 경로에는 글로벌 AS 번호 앞에 로컬 AS 번호가 포함됩니다.
경로가 BGP로 가져오는 정적 경로 또는 IGP(Interior Gateway Protocol) 경로와 같은 외부 경로인 경우 글로벌 AS 번호 대신 로컬 AS 번호가 사용됩니다. 경로가 외부이고 글로벌 AS 번호가 AS 경로에 포함되기를 원하는 경우, 를 as-path-prepend사용하는 as-path-expand 또는 라우팅 정책을 적용할 수 있습니다. 정책 작업을 사용하여 as-path-expand 글로벌 AS 번호를 로컬 AS 번호 뒤에 배치합니다. 정책 작업을 사용하여 as-path-prepend 글로벌 AS 번호를 로컬 AS 번호 앞에 배치합니다.
예를 들면 다음과 같습니다.
user@R2# show policy-options
policy-statement prepend-global {
term 1 {
from protocol static;
then {
as-path-prepend 65200; # or use as-path-expand
accept;
}
}
}
user@R2# show protocols bgp
group ext {
export prepend-global;
type external;
local-as 65250;
neighbor 10.0.0.1 {
peer-as 65100;
}
neighbor 10.1.0.2 {
peer-as 65300;
}
}
user@R2# show routing-options
static {
route 10.1.1.1/32 next-hop 10.0.0.1;
}
autonomous-system 65200;
user@R3# run show route 10.1.1.1 protocol bgp
inet.0: 6 destinations, 6 routes (6 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.1.1.1/32 *[BGP/170] 00:05:11, localpref 100
AS path: 65200 65250 I, validation-state: unverified
> to 10.1.0.1 via lt-1/2/0.4
프로바이더 에지(PE) 디바이스가 외부 BGP(EBGP)를 사용하여 고객 에지(CE) 디바이스 local-as 와 피어링하는 레이어 3 VPN 시나리오에서 명령문은 비 VPN 시나리오와 다르게 동작합니다. VPN 시나리오에서는 마스터 인스턴스에 정의된 글로벌 AS 번호가 기본적으로 AS 경로 앞에 추가됩니다. 이 동작을 재정의하기 위해 다음과 같이 PE 디바이스의 routing-instance BGP 구성에서 를 no-prepend-global-as 구성할 수 있습니다.
user@R2# show routing-instances
red {
instance-type vrf;
interface fe-1/2/0.2;
route-distinguisher 10:1;
vrf-target target:10:1;
protocols {
bgp {
group toR1 {
type external;
peer-as 65001;
local-as 65200 no-prepend-global-as;
neighbor 10.1.1.1;
}
}
}
}
로컬 AS 속성의 Junos 운영체제(Junos OS) 구현은 다음 옵션을 지원합니다.
-
Local AS with private option- 이
private옵션을 사용하면 로컬 AS는 EBGP 인접 라우터와의 BGP 세션 설정 중에 사용되지만 다른 IBGP 및 EBGP 피어로 전송되는 AS 경로에는 숨겨집니다. 외부 피어로 전송되는 AS 경로에는 글로벌 AS만 포함됩니다.이
private옵션은 이전 AS로 구성된 상태로 유지되는 라우팅 디바이스 또는 피어 배열을 아직 수정하지 않은 특정 고객과의 로컬 피어링을 설정하는 데 유용합니다. 로컬 AS는 EBGP 인접 라우터와의 BGP 세션을 설정하는 데 사용되지만 다른 AS의 외부 피어로 전송되는 AS 경로에는 숨겨져 있습니다.외부 피어로 전송되는 AS 경로에서 로컬 AS가 글로벌 AS 앞에 추가되지 않도록 옵션을 포함
private합니다. 옵션을 지정private하면 로컬 AS는 EBGP 인접 라우터로 전송되는 AS 경로에만 앞에 추가됩니다.예를 들어, 그림 1에서 라우터 1과 라우터 2는 AS 64496에 있고, 라우터 4는 AS 64511에 있으며, 라우터 3은 AS 64510에 있습니다. 라우터 2는 이전에 AS 64497에 속해 있었지만 다른 네트워크와 병합되어 현재 AS 64496에 속합니다. 라우터 3은 여전히 이전 AS(64497)를 사용하여 라우터 2와 피어링하기 때문에 라우터 3과의 피어링을 유지하려면 라우터 2를 로컬 AS 64497로 구성해야 합니다. 로컬 AS 64497을 구성하면 라우터 3에 경로를 보급할 때 라우터 2가 AS 64497을 추가할 수 있습니다. 라우터 3은 접두사 10/8에 대해 AS 경로 64497 64496을 확인합니다.
그림 1: 로컬 AS 구성
라우터 2가 다른 피어에 대한 공지 시 로컬 AS 번호를 추가하는 것을 방지하려면 문을
local-as 64497 private사용합니다. 이 명령문은 라우터 1과 라우터 4에 대한 경로를 발표할 때 라우터 2가 로컬 AS 64497을 포함하지 않도록 구성합니다. 이 경우, 라우터 4는 접두사 10.222/16에 대한 AS 경로 64496 64510을 확인합니다. -
Local AS with alias option—Junos OS 릴리스 9.5 이상에서 로컬 AS를 별칭으로 구성할 수 있습니다. BGP 개방형 세션이 구축되는 동안 개방형 메시지에 사용되는 AS는 로컬 AS와 글로벌 AS 사이를 번갈아 가며 진행됩니다. 로컬 AS가 EBGP 인접 라우터와 연결하는 데 사용되는 경우 BGP 피어 세션이 설정되면 BGP 피어 세션이 설정되면 로컬 AS만 AS 경로 앞에 추가됩니다. 글로벌 AS가 EBGP 인접 라우터와 연결하는 데 사용되는 경우 BGP 피어 세션이 설정되면 글로벌 AS만 AS 경로 앞에 추가됩니다. 또한 이
alias옵션을 사용한다는 것은 로컬 AS가 해당 EBGP 인접 항목에서 학습된 경로에 대한 AS 경로 앞에 추가되지 않는다는 것을 의미합니다. 따라서 로컬 AS는 다른 외부 피어로부터 숨겨진 상태로 유지됩니다.옵션으로
alias로컬 AS를 구성하는 것은 획득한 네트워크의 라우팅 디바이스를 새 AS로 마이그레이션할 때 특히 유용합니다. 마이그레이션 프로세스 중에 일부 라우팅 디바이스는 새로운 AS로 구성되는 반면 다른 라우팅 디바이스는 이전 AS로 구성된 상태로 유지될 수 있습니다. 예를 들어, 먼저 경로 리플렉터 역할을 하는 모든 라우팅 디바이스를 새로운 AS로 마이그레이션하는 것이 좋습니다. 그러나 경로 리플렉터 클라이언트를 점진적으로 마이그레이션함에 따라 각 경로 리플렉터는 이전 AS로 구성된 라우팅 디바이스와는 물론 새 AS로 구성된 라우팅 디바이스와도 피어링해야 합니다. 로컬 피어 세션을 설정하려면 네트워크의 BGP 피어가 로컬 AS와 글로벌 AS를 모두 사용하는 것이 유용할 수 있습니다. 동시에 외부 피어로부터 이 로컬 AS를 숨기고 다른 AS로 경로를 내보낼 때 AS 경로의 글로벌 AS만 사용하려고 합니다. 이런 상황에서는 옵션을 구성합니다alias.로컬 AS를 계층 수준에서
[edit routing-options]구성된 글로벌 AS에 대한 별칭으로 구성하는 옵션을 포함alias합니다. 로컬 AS를 별칭으로 구성할 경우, BGP 개방형 세션이 설정된 동안 개방형 메시지에 사용되는 AS가 로컬 AS와 글로벌 AS 사이를 번갈아 전환합니다. 로컬 AS는 EBGP 인접 라우터와의 피어 세션이 해당 로컬 AS를 사용하여 설정된 경우에만 AS 경로 앞에 추가됩니다. 로컬 AS는 다른 외부 피어로 전송되는 AS 경로에 숨겨져 있습니다. 글로벌 AS를 사용하여 BGP 세션이 설정되면 글로벌 AS만 AS 경로 앞에 추가됩니다.참고:private및alias옵션은 상호 배타적입니다. 동일한local-as문으로 두 옵션을 모두 구성할 수 없습니다. -
Local AS with option not to prepend the global AS—Junos OS 릴리스 9.6 이상에서는 글로벌 AS 앞에 추가하지 않는 옵션으로 로컬 AS를 구성할 수 있습니다. 외부 피어로 전송되는 AS 경로에는 로컬 AS만 포함됩니다.
가상 사설망(VPN) 시나리오에서 아웃바운드 BGP 업데이트에서 글로벌 AS 번호를 제거하려는 경우 이
no-prepend-global-as옵션을 사용합니다. 이 옵션은 VPN에서 글로벌 AS를 숨기려는 VPN 시나리오에서 유용합니다.외부 피어로 전송되는 AS 경로에서 계층 수준에서
[edit routing-options]구성된 글로벌 AS를 제거하는 옵션을 포함no-prepend-global-as합니다. 이 옵션을 사용하면 고객 에지(CE) 디바이스로 전송되는 경로의 AS 경로에는 로컬 AS만 포함됩니다. -
Number of loops option—또한 로컬 AS 기능은 AS_PATH 속성에서 AS 번호를 탐지하여 경로가 삭제되거나 숨겨지는 횟수 지정을 지원합니다. 예를 들어, 를 구성
loops 1한 경우 AS 번호가 경로에서 한 번 이상 감지되면 경로가 숨겨집니다. 이는 기본 동작입니다. 구성하는 경우loops 2, 경로에서 AS 번호가 두 번 이상 감지되면 경로가 숨겨집니다.문의 경우
loops number1에서 10까지 구성할 수 있습니다.참고:모든 BGP 그룹에 대한 로컬 AS 값을 구성하는 경우, 모든 BGP 그룹에 대한 AS 및 로컬 AS 값을 모두 사용하여 라우팅 루프 감지가 수행됩니다.
EBGP 또는 IBGP 피어의 로컬 AS가 현재 AS와 동일한 경우, 로컬 AS 번호를 지정하기 위해 문을 사용하지
local-as마십시오.VRF 내에서 로컬 AS를 구성할 때, 이는 AS 경로 루프 감지 메커니즘에 영향을 미칩니다. 디바이스에 구성된 모든
local-as문은 단일 AS 도메인의 일부입니다. AS 경로 루프 감지 메커니즘은 도메인에 있는 일치하는 AS를 찾는 것을 기반으로 합니다.
또한보십시오
예: EBGP 세션을 위한 로컬 AS 구성
이 예는 글로벌 AS와 로컬 AS 모두 BGP 인바운드 및 아웃바운드 업데이트에 사용되도록 BGP 피어에 대한 로컬 AS(Autonomous System)를 구성하는 방법을 보여줍니다.
요구 사항
이 예제를 구성하기 전에 디바이스 초기화 이외의 특별한 구성은 필요하지 않습니다.
개요
ISP가 병합되고 고객의 구성, 특히 고객이 피어 관계를 설정하도록 구성된 AS를 보존하려는 경우 이 local-as 문을 사용합니다. local-as ISP의 라우터가 다른 AS로 이동한 경우에도 이 문은 고객 라우터에 이미 있는 AS 번호를 라우터 시뮬레이션합니다.
이 예는 문을 사용하여 local-as 로컬 AS를 구성하는 방법을 보여줍니다. 이 local-as 문은 글로벌, 그룹 및 이웃 계층 수준에서 BGP에 대해 지원됩니다.
문을 구성할 local-as 때 AS 번호를 지정해야 합니다. 1에서 4,294,967,295까지의 숫자 를 일반 숫자 형식으로 지정할 수 있습니다. Junos OS 릴리스 9.1 이상에서는 RFC 4893, 4개의 옥텟 AS 번호 공백을 위한 BGP 지원에 정의된 대로 AS 번호 범위가 확장되었습니다. Junos OS 릴리스 9.3 이상에서는 마침표로 결합된 두 정수 값의 AS-dot 표기법 형식을 사용하여 4바이트 AS 번호를 구성할 수도 있습니다: <>16-bit high-order value in decimal.<16-bit low-order value in decimal>. 예를 들어, 일반 숫자 형식의 4바이트 AS 번호 65,546은 AS-dot 표기법 형식에서 1.10으로 표시됩니다. 0.0에서 65535.65535까지의 값을 AS-dot 표기법 형식으로 지정할 수 있습니다. Junos OS는 2바이트 AS 번호를 계속 지원합니다. 2바이트 AS 번호 범위는 1에서 65,535까지입니다(이것은 4바이트 범위의 하위 집합임).
그림 2 는 샘플 토폴로지를 보여줍니다.
구성을 위한 토폴로지
이 예에서 디바이스 R2는 이전에 AS 250에 속해 있었지만 현재는 AS 200에 있습니다. 디바이스 R1 및 디바이스 R3은 새로운 AS 번호(AS 200) 대신 AS 250과 피어링하도록 구성됩니다. 디바이스 R2에는 문으로 구성된 새 AS 번호가 있습니다. autonomous-system 200 피어링 세션이 작동할 수 있도록 BGP 구성에 문이 local-as 250 추가됩니다. local-as 250 디바이스 R2는 BGP 인바운드 및 아웃바운드 업데이트에서 글로벌 AS(200)와 로컬 AS(250)를 모두 포함합니다.
구성
CLI 빠른 구성
이 예를 빠르게 구성하려면, 아래 명령을 복사하여 텍스트 파일로 붙여 넣은 다음 모든 라인브레이크를 제거하고, 네트워크 구성을 일치하는 데 필요한 세부 사항을 변경한 다음, 계층 수준에서 [edit] 명령을 복사하여 CLI에 붙여 넣습니다.
디바이스 R1
set interfaces fe-1/2/0 unit 1 family inet address 10.0.0.1/30 set interfaces lo0 unit 1 family inet address 192.168.0.1/32 set protocols bgp group ext type external set protocols bgp group ext export send-direct set protocols bgp group ext export send-static set protocols bgp group ext peer-as 250 set protocols bgp group ext neighbor 10.0.0.2 set policy-options policy-statement send-direct term 1 from protocol direct set policy-options policy-statement send-direct term 1 then accept set policy-options policy-statement send-static term 1 from protocol static set policy-options policy-statement send-static term 1 then accept set routing-options static route 10.1.0.0/30 next-hop 10.0.0.2 set routing-options autonomous-system 100
디바이스 R2
set interfaces fe-1/2/0 unit 2 family inet address 10.0.0.2/30 set interfaces fe-1/2/1 unit 3 family inet address 10.1.0.1/30 set interfaces lo0 unit 2 family inet address 192.168.0.2/32 set protocols bgp group ext type external set protocols bgp group ext export send-direct set protocols bgp group ext export send-static set protocols bgp group ext local-as 250 set protocols bgp group ext neighbor 10.0.0.1 peer-as 100 set protocols bgp group ext neighbor 10.1.0.2 peer-as 300 set policy-options policy-statement send-direct term 1 from protocol direct set policy-options policy-statement send-direct term 1 then accept set policy-options policy-statement send-static term 1 from protocol static set policy-options policy-statement send-static term 1 then accept set routing-options autonomous-system 200
디바이스 R3
set interfaces fe-1/2/0 unit 4 family inet address 10.1.0.2/30 set interfaces lo0 unit 3 family inet address 192.168.0.3/32 set protocols bgp group ext type external set protocols bgp group ext export send-direct set protocols bgp group ext export send-static set protocols bgp group ext peer-as 250 set protocols bgp group ext neighbor 10.1.0.1 set policy-options policy-statement send-direct term 1 from protocol direct set policy-options policy-statement send-direct term 1 then accept set policy-options policy-statement send-static term 1 from protocol static set policy-options policy-statement send-static term 1 then accept set routing-options static route 10.0.0.0/30 next-hop 10.1.0.1 set routing-options autonomous-system 300
디바이스 R1 구성
단계별 절차
다음 예에서는 구성 계층에서 다양한 수준을 탐색해야 합니다. CLI 탐색에 대한 정보는 Junos OS CLI 사용자 가이드의 구성 모드에서 CLI 편집기 사용을 참조하십시오.
디바이스 R1 구성:
인터페이스를 구성합니다.
[edit interfaces] user@R1# set fe-1/2/0 unit 1 family inet address 10.0.0.1/30 user@R1# set lo0 unit 1 family inet address 192.168.0.1/32
외부 BGP(EBGP)를 구성합니다.
[edit protocols bgp group ext] user@R1# set type external user@R1# set export send-direct user@R1# set export send-static user@R1# set peer-as 250 user@R1# set neighbor 10.0.0.2
라우팅 정책 구성합니다.
[edit policy-options] user@R1# set policy-statement send-direct term 1 from protocol direct user@R1# set policy-statement send-direct term 1 then accept user@R1# set policy-statement send-static term 1 from protocol static user@R1# set policy-statement send-static term 1 then accept
디바이스 R2와 디바이스 R3 사이의 원격 네트워크에 대한 정적 경로를 구성합니다.
[edit routing-options] user@R1# set static route 10.1.0.0/30 next-hop 10.0.0.2
글로벌 AS 번호를 구성합니다.
[edit routing-options] user@R1# set autonomous-system 100
결과
구성 모드에서 , show policy-options, show protocols및 show routing-options 명령을 show interfaces입력하여 구성을 확인합니다. 출력에 의도한 구성이 표시되지 않으면 이 예의 지침을 반복하여 구성을 수정합니다.
user@R1# show interfaces
fe-1/2/0 {
unit 1 {
family inet {
address 10.0.0.1/30;
}
}
}
lo0 {
unit 1 {
family inet {
address 192.168.0.1/32;
}
}
}
user@R1# show policy-options
policy-statement send-direct {
term 1 {
from protocol direct;
then accept;
}
}
policy-statement send-static {
term 1 {
from protocol static;
then accept;
}
}
user@R1# show protocols
bgp {
group ext {
type external;
export [ send-direct send-static ];
peer-as 250;
neighbor 10.0.0.2;
}
}
user@R1# show routing-options
static {
route 10.1.0.0/30 next-hop 10.0.0.2;
}
autonomous-system 100;
디바이스 구성이 완료되면 구성 모드에서 들어갑니다 commit .
디바이스 R2 구성
단계별 절차
다음 예에서는 구성 계층에서 다양한 수준을 탐색해야 합니다. CLI 탐색에 대한 정보는 Junos OS CLI 사용자 가이드의 구성 모드에서 CLI 편집기 사용을 참조하십시오.
디바이스 R2 구성:
인터페이스를 구성합니다.
[edit interfaces] user@R2# set fe-1/2/0 unit 2 family inet address 10.0.0.2/30 user@R2# set fe-1/2/1 unit 3 family inet address 10.1.0.1/30 user@R2# set lo0 unit 2 family inet address 192.168.0.2/32
EBGP를 구성합니다.
[edit protocols bgp group ext] user@R2# set type external user@R2# set export send-direct user@R2# set export send-static user@R2# set neighbor 10.0.0.1 peer-as 100 user@R2# set neighbor 10.1.0.2 peer-as 300
로컬 AS(Autonomous System) 번호를 구성합니다.
[edit protocols bgp group ext] user@R2# set local-as 250
글로벌 AS 번호를 구성합니다.
[edit routing-options] user@R2# set autonomous-system 200
라우팅 정책 구성합니다.
[edit policy-options] user@R2# set policy-statement send-direct term 1 from protocol direct user@R2# set policy-statement send-direct term 1 then accept user@R2# set policy-statement send-static term 1 from protocol static user@R2# set policy-statement send-static term 1 then accept
결과
구성 모드에서 , show policy-options, show protocols및 show routing-options 명령을 show interfaces입력하여 구성을 확인합니다. 출력에 의도한 구성이 표시되지 않으면 이 예의 지침을 반복하여 구성을 수정합니다.
user@R2# show interfaces
fe-1/2/0 {
unit 2 {
family inet {
address 10.0.0.2/30;
}
}
}
fe-1/2/1 {
unit 3 {
family inet {
address 10.1.0.1/30;
}
}
}
lo0 {
unit 2 {
family inet {
address 192.168.0.2/32;
}
}
}
user@R2# show policy-options
policy-statement send-direct {
term 1 {
from protocol direct;
then accept;
}
}
policy-statement send-static {
term 1 {
from protocol static;
then accept;
}
}
user@R2# show protocols
bgp {
group ext {
type external;
export [ send-direct send-static ];
local-as 250;
neighbor 10.0.0.1 {
peer-as 100;
}
neighbor 10.1.0.2 {
peer-as 300;
}
}
}
user@R2# show routing-options autonomous-system 200;
디바이스 구성이 완료되면 구성 모드에서 들어갑니다 commit .
디바이스 R3 구성
단계별 절차
다음 예에서는 구성 계층에서 다양한 수준을 탐색해야 합니다. CLI 탐색에 대한 정보는 Junos OS CLI 사용자 가이드의 구성 모드에서 CLI 편집기 사용을 참조하십시오.
디바이스 R3 구성:
인터페이스를 구성합니다.
[edit interfaces] user@R3# set fe-1/2/0 unit 4 family inet address 10.1.0.2/30 user@R3# set lo0 unit 3 family inet address 192.168.0.3/32
EBGP를 구성합니다.
[edit protocols bgp group ext] user@R3# set type external user@R3# set export send-direct user@R3# set export send-static user@R3# set peer-as 250 user@R3# set neighbor 10.1.0.1
글로벌 AS(Autonomous System) 번호를 구성합니다.
[edit routing-options] user@R3# set autonomous-system 300
디바이스 R1과 디바이스 R2 사이의 원격 네트워크에 대한 정적 경로를 구성합니다.
[edit routing-options] user@R3# set static route 10.0.0.0/30 next-hop 10.1.0.1
라우팅 정책 구성합니다.
[edit policy-options] user@R3# set policy-statement send-direct term 1 from protocol direct user@R3# set policy-statement send-direct term 1 then accept user@R3# set policy-statement send-static term 1 from protocol static user@R3# set policy-statement send-static term 1 then accept
결과
구성 모드에서 , show policy-options, show protocols및 show routing-options 명령을 show interfaces입력하여 구성을 확인합니다. 출력에 의도한 구성이 표시되지 않으면 이 예의 지침을 반복하여 구성을 수정합니다.
user@R3# show interfaces
fe-1/2/0 {
unit 4 {
family inet {
address 10.1.0.2/30;
}
}
}
lo0 {
unit 3 {
family inet {
address 192.168.0.3/32;
}
}
}
user@R3# show policy-options
policy-statement send-direct {
term 1 {
from protocol direct;
then accept;
}
}
policy-statement send-static {
term 1 {
from protocol static;
then accept;
}
}
user@R3# show protocols
bgp {
group ext {
type external;
export [ send-direct send-static ];
peer-as 250;
neighbor 10.1.0.1;
}
}
user@R3# show routing-options
static {
route 10.0.0.0/30 next-hop 10.1.0.1;
}
autonomous-system 300;
디바이스 구성이 완료되면 구성 모드에서 들어갑니다 commit .
검증
구성이 제대로 작동하고 있는지 확인합니다.
로컬 및 글로벌 AS 설정 확인
목적
디바이스 R2에 로컬 및 글로벌 AS 설정이 구성되어 있는지 확인합니다.
작업
운영 모드에서 명령을 입력합니다.show bgp neighbors
user@R2> show bgp neighbors
Peer: 10.0.0.1+179 AS 100 Local: 10.0.0.2+61036 AS 250
Type: External State: Established Flags: <Sync>
Last State: OpenConfirm Last Event: RecvKeepAlive
Last Error: None
Export: [ send-direct send-static ]
Options: <Preference PeerAS LocalAS Refresh>
Holdtime: 90 Preference: 170 Local AS: 250 Local System AS: 200
Number of flaps: 0
Peer ID: 192.168.0.1 Local ID: 192.168.0.2 Active Holdtime: 90
Keepalive Interval: 30 Peer index: 0
BFD: disabled, down
Local Interface: fe-1/2/0.2
NLRI for restart configured on peer: inet-unicast
NLRI advertised by peer: inet-unicast
NLRI for this session: inet-unicast
Peer supports Refresh capability (2)
Stale routes from peer are kept for: 300
Peer does not support Restarter functionality
NLRI that restart is negotiated for: inet-unicast
NLRI of received end-of-rib markers: inet-unicast
NLRI of all end-of-rib markers sent: inet-unicast
Peer supports 4 byte AS extension (peer-as 100)
Peer does not support Addpath
Table inet.0 Bit: 10000
RIB State: BGP restart is complete
Send state: in sync
Active prefixes: 1
Received prefixes: 3
Accepted prefixes: 2
Suppressed due to damping: 0
Advertised prefixes: 4
Last traffic (seconds): Received 6 Sent 14 Checked 47
Input messages: Total 258 Updates 3 Refreshes 0 Octets 4969
Output messages: Total 258 Updates 2 Refreshes 0 Octets 5037
Output Queue[0]: 0
Peer: 10.1.0.2+179 AS 300 Local: 10.1.0.1+52296 AS 250
Type: External State: Established Flags: <Sync>
Last State: OpenConfirm Last Event: RecvKeepAlive
Last Error: None
Export: [ send-direct send-static ]
Options: <Preference PeerAS LocalAS Refresh>
Holdtime: 90 Preference: 170 Local AS: 250 Local System AS: 200
Number of flaps: 0
Peer ID: 192.168.0.3 Local ID: 192.168.0.2 Active Holdtime: 90
Keepalive Interval: 30 Peer index: 1
BFD: disabled, down
Local Interface: fe-1/2/1.3
NLRI for restart configured on peer: inet-unicast
NLRI advertised by peer: inet-unicast
NLRI for this session: inet-unicast
Peer supports Refresh capability (2)
Stale routes from peer are kept for: 300
Peer does not support Restarter functionality
NLRI that restart is negotiated for: inet-unicast
NLRI of received end-of-rib markers: inet-unicast
NLRI of all end-of-rib markers sent: inet-unicast
Peer supports 4 byte AS extension (peer-as 300)
Peer does not support Addpath
Table inet.0 Bit: 10000
RIB State: BGP restart is complete
Send state: in sync
Active prefixes: 1
Received prefixes: 3
Accepted prefixes: 2
Suppressed due to damping: 0
Advertised prefixes: 4
Last traffic (seconds): Received 19 Sent 26 Checked 9
Input messages: Total 256 Updates 3 Refreshes 0 Octets 4931
Output messages: Total 256 Updates 2 Refreshes 0 Octets 4999
Output Queue[0]: 0
의미
로컬 AS: 250 및 로컬 시스템 AS: 200 출력은 디바이스 R2가 예상되는 설정을 가지고 있음을 보여줍니다. 또한 출력은 옵션 목록에 LocalAS가 포함되어 있음을 보여줍니다.
BGP 피어링 세션 확인
목적
세션이 설정되고 로컬 AS 번호 250이 표시되는지 확인합니다.
작업
운영 모드에서 명령을 입력합니다.show bgp summary
user@R1> show bgp summary Groups: 1 Peers: 1 Down peers: 0 Table Tot Paths Act Paths Suppressed History Damp State Pending inet.0 4 2 0 0 0 0 Peer AS InPkt OutPkt OutQ Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped... 10.0.0.2 250 232 233 0 4 1:42:37 2/4/4/0 0/0/0/0
user@R3> show bgp summary Groups: 1 Peers: 1 Down peers: 0 Table Tot Paths Act Paths Suppressed History Damp State Pending inet.0 4 2 0 0 0 0 Peer AS InPkt OutPkt OutQ Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped... 10.1.0.1 250 235 236 0 4 1:44:25 2/4/4/0 0/0/0/0
의미
디바이스 R1과 디바이스 R3은 디바이스 R2가 실제로 AS 200에 있더라도 AS 250의 디바이스와 피어링하는 것처럼 보입니다.
BGP AS 경로 확인
목적
경로가 라우팅 테이블에 있고 AS 경로가 로컬 AS 번호 250을 표시하는지 확인합니다.
작업
구성 모드에서 명령을 입력합니다.set route protocol bgp
user@R1> show route protocol bgp
inet.0: 6 destinations, 8 routes (6 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.0.0.0/30 [BGP/170] 01:46:44, localpref 100
AS path: 250 I
> to 10.0.0.2 via fe-1/2/0.1
10.1.0.0/30 [BGP/170] 01:46:44, localpref 100
AS path: 250 I
> to 10.0.0.2 via fe-1/2/0.1
192.168.0.2/32 *[BGP/170] 01:46:44, localpref 100
AS path: 250 I
> to 10.0.0.2 via fe-1/2/0.1
192.168.0.3/32 *[BGP/170] 01:46:40, localpref 100
AS path: 250 300 I
> to 10.0.0.2 via fe-1/2/0.1
user@R3> show route protocol bgp
inet.0: 6 destinations, 8 routes (6 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.0.0.0/30 [BGP/170] 01:47:10, localpref 100
AS path: 250 I
> to 10.1.0.1 via fe-1/2/0.4
10.1.0.0/30 [BGP/170] 01:47:10, localpref 100
AS path: 250 I
> to 10.1.0.1 via fe-1/2/0.4
192.168.0.1/32 *[BGP/170] 01:47:10, localpref 100
AS path: 250 100 I
> to 10.1.0.1 via fe-1/2/0.4
192.168.0.2/32 *[BGP/170] 01:47:10, localpref 100
AS path: 250 I
> to 10.1.0.1 via fe-1/2/0.4
의미
출력은 디바이스 R1과 디바이스 R3이 실제로 AS 200에 있음에도 불구하고 AS 250을 포함하는 AS 경로가 있는 경로를 가진 것으로 보인다는 것을 보여줍니다.
예: EBGP 세션을 위한 프라이빗 로컬 AS 구성
이 예는 프라이빗 로컬 AS(Autonomous System) 번호를 구성하는 방법을 보여줍니다. 로컬 AS는 피어링에 로컬 AS 번호를 사용하는 피어에 보급되기 때문에 비공개로 간주되지만 피어링에 글로벌 AS 번호를 사용할 수 있는 피어에 대한 공지 사항에는 숨겨져 있습니다.
요구 사항
이 예제를 구성하기 전에 디바이스 초기화 이외의 특별한 구성은 필요하지 않습니다.
개요
ISP가 병합되고 고객의 구성, 특히 고객이 피어 관계를 설정하도록 구성된 AS를 보존하려는 경우 이 local-as 문을 사용합니다. local-as ISP의 라우터가 다른 AS로 이동한 경우에도 이 문은 고객 라우터에 이미 있는 AS 번호를 라우터 시뮬레이션합니다.
이 private 옵션을 사용하면 로컬 AS는 외부 BGP(EBGP) 인접 라우터와의 BGP 세션을 설정하는 동안 사용되지만 다른 EBGP 피어로 전송되는 AS 경로에는 숨겨집니다. 외부 피어로 전송되는 AS 경로에는 글로벌 AS만 포함됩니다.
이 private 옵션은 이전 AS로 구성된 상태로 유지되는 라우팅 디바이스 또는 피어 배열을 아직 수정하지 않은 특정 고객과의 로컬 피어링을 설정하는 데 유용합니다. 로컬 AS는 EBGP 인접 라우터와의 BGP 세션을 설정하는 데 사용되지만, 다른 AS의 외부 피어로 전송되는 AS 경로에는 숨겨져 있습니다.
외부 피어로 전송되는 AS 경로에서 로컬 AS가 글로벌 AS 앞에 추가되지 않도록 옵션을 포함 private 합니다. 옵션을 지정 private 하면 로컬 AS는 EBGP 인접 라우터로 전송되는 AS 경로에만 앞에 추가됩니다.
그림 3은 샘플 토폴로지를 보여줍니다.
구성을 위한 토폴로지
디바이스 R1은 AS 64496에 있습니다. 디바이스 R2는 AS 64510에 있습니다. 디바이스 R3은 AS 64511에 있습니다. 디바이스 R4는 AS 64512에 있습니다. 디바이스 R1은 이전에 AS 64497에 속해 있었으나 다른 네트워크와 병합되어 현재 AS 64496에 속합니다. 디바이스 R3은 여전히 이전 AS 64497을 사용하여 디바이스 R1과 피어링하기 때문에 디바이스 R1은 디바이스 R3과의 피어링을 유지하기 위해 로컬 AS 64497로 구성되어야 합니다. 로컬 AS 64497을 구성하면 디바이스 R1이 디바이스 R3에 경로를 보급할 때 AS 64497을 추가할 수 있습니다. 디바이스 R3은 디바이스 R2의 루프백 인터페이스인 접두사 10.1.1.2/32에 대해 AS 경로 64497 64496을 확인합니다. 디바이스 R3 뒤에 있는 디바이스 R4는 디바이스 R2의 루프백 인터페이스에 대한 64511 64497 64496 64510의 AS 경로를 확인합니다. 디바이스 R1이 다른 피어에 대한 공지 시 로컬 AS 번호를 추가하는 것을 방지하기 위해 이 예에는 명령문이 포함됩니다. local-as 64497 private 이 private 옵션은 디바이스 R1이 디바이스 R2에 대한 경로를 발표할 때 로컬 AS 64497을 포함하지 않도록 구성합니다. 디바이스 R2는 디바이스 R3에 대한 64496 64511의 AS 경로와 디바이스 R4에 대한 64496 64511 64512의 AS 경로를 확인합니다. 디바이스 R1 구성의 옵션으로 인해 private 디바이스 R1이 디바이스 R2에 재보급하는 AS 경로에서 AS 번호 64497이 누락됩니다.
디바이스 R1은 디바이스 R3을 제외한 모든 라우터에서 프라이빗 로컬 AS를 숨기고 있습니다. 이 private 옵션은 디바이스 R1이 디바이스 R3으로부터 수신(학습)하고 해당 디바이스 R1이 차례로 다른 라우터에 재보급하는 경로에 적용됩니다. 디바이스 R3에서 학습한 이러한 경로가 디바이스 R1에 의해 디바이스 R2로 재보급되면 디바이스 R2에 보급된 AS 경로에서 프라이빗 로컬 AS가 누락됩니다.
구성
CLI 빠른 구성
이 예를 빠르게 구성하려면, 아래 명령을 복사하여 텍스트 파일로 붙여 넣은 다음 모든 라인브레이크를 제거하고, 네트워크 구성을 일치하는 데 필요한 세부 사항을 변경한 다음, 계층 수준에서 [edit] 명령을 복사하여 CLI에 붙여 넣습니다.
디바이스 R1
set interfaces fe-1/2/0 unit 3 family inet address 192.168.1.1/24 set interfaces fe-1/2/1 unit 5 family inet address 192.168.10.1/24 set interfaces lo0 unit 2 family inet address 10.1.1.1/32 set protocols bgp group external-AS64511 type external set protocols bgp group external-AS64511 peer-as 64511 set protocols bgp group external-AS64511 local-as 64497 set protocols bgp group external-AS64511 local-as private set protocols bgp group external-AS64511 neighbor 192.168.1.2 set protocols bgp group external-AS64510 type external set protocols bgp group external-AS64510 peer-as 64510 set protocols bgp group external-AS64510 neighbor 192.168.10.2 set policy-options policy-statement send-direct term 1 from protocol direct set policy-options policy-statement send-direct term 1 then accept set routing-options autonomous-system 64496
디바이스 R2
set interfaces fe-1/2/0 unit 6 family inet address 192.168.10.2/24 set interfaces lo0 unit 3 family inet address 10.1.1.2/32 set protocols bgp group external type external set protocols bgp group external export send-direct set protocols bgp group external peer-as 64496 set protocols bgp group external neighbor 192.168.10.1 set policy-options policy-statement send-direct term 1 from protocol direct set policy-options policy-statement send-direct term 1 then accept set routing-options autonomous-system 64510
디바이스 R3
set interfaces fe-1/2/0 unit 4 family inet address 192.168.1.2/24 set interfaces fe-1/2/1 unit 7 family inet address 192.168.5.1/24 set interfaces lo0 unit 4 family inet address 10.1.1.3/32 set protocols bgp group external type external set protocols bgp group external export send-direct set protocols bgp group external neighbor 192.168.1.1 peer-as 64497 set protocols bgp group external neighbor 192.168.5.2 peer-as 64512 set policy-options policy-statement send-direct term 1 from protocol direct set policy-options policy-statement send-direct term 1 then accept set routing-options autonomous-system 64511
디바이스 R4
set interfaces fe-1/2/0 unit 8 family inet address 192.168.5.2/24 set interfaces lo0 unit 5 family inet address 10.1.1.4/32 set protocols bgp group external type external set protocols bgp group external export send-direct set protocols bgp group external peer-as 64511 set protocols bgp group external neighbor 192.168.5.1 set policy-options policy-statement send-direct term 1 from protocol direct set policy-options policy-statement send-direct term 1 then accept set routing-options autonomous-system 64512
디바이스 R1 구성
단계별 절차
다음 예에서는 구성 계층에서 다양한 수준을 탐색해야 합니다. CLI 탐색에 대한 정보는 Junos OS CLI 사용자 가이드의 구성 모드에서 CLI 편집기 사용을 참조하십시오.
디바이스 R1 구성:
-
인터페이스를 구성합니다.
[edit interfaces fe-1/2/0 unit 3] user@R1# set family inet address 192.168.1.1/24 [edit interfaces fe-1/2/1 unit 5] user@R1# set family inet address 192.168.10.1/24 [edit interfaces lo0 unit 2] user@R1# set family inet address 10.1.1.1/32
-
디바이스 R2와의 EBGP 피어링 세션을 구성합니다.
[edit protocols bgp group external-AS64510] user@R1# set type external user@R1# set peer-as 64510 user@R1# set neighbor 192.168.10.2
-
디바이스 R3과의 EBGP 피어링 세션을 구성합니다.
[edit protocols bgp group external-AS64511] user@R1# set type external user@R1# set peer-as 64511 user@R1# set local-as 64497 user@R1# set local-as private user@R1# set neighbor 192.168.1.2
-
라우팅 정책 구성합니다.
[edit policy-options policy-statement send-direct term 1] user@R1# set from protocol direct user@R1# set then accept
-
글로벌 AS(Autonomous System) 번호를 구성합니다.
[edit routing-options] user@R1# set autonomous-system 64496
결과
구성 모드에서 , show policy-options, show protocols및 show routing-options 명령을 show interfaces입력하여 구성을 확인합니다. 출력에 의도한 구성이 표시되지 않으면 이 예의 지침을 반복하여 구성을 수정합니다.
user@R1# show interfaces
fe-1/2/0 {
unit 3 {
family inet {
address 192.168.1.1/24;
}
}
}
fe-1/2/1 {
unit 5 {
family inet {
address 192.168.10.1/24;
}
}
}
lo0 {
unit 2 {
family inet {
address 10.1.1.1/32;
}
}
}
user@R1# show policy-options
policy-statement send-direct {
term 1 {
from protocol direct;
then accept;
}
}
user@R1# show protocols
bgp {
group external-AS64511 {
type external;
peer-as 64511;
local-as 64497 private;
neighbor 192.168.1.2;
}
group external-AS64510 {
type external;
peer-as 64510;
neighbor 192.168.10.2;
}
}
user@R1# show routing-options autonomous-system 64496;
디바이스 구성이 완료되면 구성 모드에서 들어갑니다 commit .
토폴로지의 다른 디바이스에 대해 필요에 따라 구성을 반복합니다.
검증
구성이 제대로 작동하고 있는지 확인합니다.
디바이스 R2의 AS 경로 확인
목적
디바이스 R2의 AS 경로에 디바이스 R3 및 디바이스 R4에 AS 64497이 없는지 확인합니다.
작업
운영 모드에서 명령을 입력합니다.show route protocol bgp
user@R2> show route protocol bgp
inet.0: 6 destinations, 6 routes (6 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.1.1.3/32 *[BGP/170] 01:33:11, localpref 100
AS path: 64496 64511 I
> to 192.168.10.1 via fe-1/2/0.6
10.1.1.4/32 *[BGP/170] 01:33:11, localpref 100
AS path: 64496 64511 64512 I
> to 192.168.10.1 via fe-1/2/0.6
192.168.5.0/24 *[BGP/170] 01:49:15, localpref 100
AS path: 64496 64511 I
> to 192.168.10.1 via fe-1/2/0.6
의미
디바이스 R2의 AS 경로에는 AS 64497이 포함되지 않습니다.
디바이스 R3의 AS 경로 확인
목적
로컬 AS 64497이 EBGP neighbor R3으로 전송된 AS 경로에서만 앞에 추가되는지 확인합니다. 디바이스 R3은 디바이스 R2의 루프백 인터페이스인 접두사 10.1.1.2/32에 대해 AS 경로 64497 64496을 확인합니다.
작업
운영 모드에서 명령을 입력합니다.show route protocol bgp
user@R3> show route protocol bgp
inet.0: 7 destinations, 8 routes (7 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.1.1.2/32 *[BGP/170] 01:35:11, localpref 100
AS path: 64497 64496 64510 I
> to 192.168.1.1 via fe-1/2/0.4
10.1.1.4/32 *[BGP/170] 01:35:11, localpref 100
AS path: 64512 I
> to 192.168.5.2 via fe-1/2/1.7
192.168.5.0/24 [BGP/170] 01:51:15, localpref 100
AS path: 64512 I
> to 192.168.5.2 via fe-1/2/1.7
의미
디바이스 R2(접두사 10.1.1.2)에 대한 디바이스 R3의 경로에는 디바이스 R1(각각 64497 및 64496)에 구성된 로컬 및 글로벌 AS가 모두 포함됩니다.
BGP에 대한 누적 IGP 속성 이해
IGP(Interior Gateway Protocol)는 단일 도메인 또는 AS(Autonomous System) 내에서 라우팅을 처리하도록 설계되었습니다. 각 링크에는 메트릭이라는 특정 값이 할당됩니다. 두 노드 사이의 거리는 경로를 따라 링크에 대한 모든 메트릭 값의 합계로 계산됩니다. IGP는 거리에 따라 두 노드 간의 최단 경로를 선택합니다.
BGP는 각 관리 간에 조정이 제한되거나 전혀 없는 다수의 독립적인 AS를 통해 라우팅을 제공하도록 설계되었습니다. BGP는 경로 선택 결정에 메트릭을 사용하지 않습니다.
BGP에 대한 AIGP(누적 IGP) 메트릭 속성은 단일 관리가 여러 개의 인접한 BGP AS를 실행할 수 있는 구축을 가능하게 합니다. 이러한 구축을 통해 BGP는 IGP 메트릭에 따라 라우팅 결정을 내릴 수 있습니다. 이러한 네트워크에서 BGP는 IGP에서 수행하는 것처럼 메트릭을 기반으로 경로를 선택할 수 있습니다. 이 경우 BGP는 노드가 두 개의 서로 다른 AS에 있더라도 두 노드 간의 최단 경로를 선택합니다.
AIGP 속성은 터널링을 사용하여 패킷을 BGP 다음 홉으로 전달하는 네트워크에서 특히 유용합니다. 주니퍼 네트웍®스 Junos® 운영 체제(Junos OS)는 현재 두 개의 BGP 주소 패밀리에 family inet6 labeled-unicastfamily inet labeled-unicast 대한 AIGP 속성을 지원합니다.
AIGP는 BGP 최적 경로 결정 프로세스에 영향을 미칩니다. AIGP 속성 선호 규칙은 로컬 선호 규칙 뒤에 적용됩니다. AIGP 거리는 동점을 깨는 것과 비교됩니다. 또한 BGP 최적 경로 결정 프로세스는 해결 다음 홉에 AIGP 속성이 있는 경우 내부 비용 규칙이 적용되는 방식에도 영향을 미칩니다. AIGP를 활성화하지 않으면 경로의 내부 비용은 경로의 다음 홉에 대한 메트릭 계산을 기반으로 합니다. AIGP를 활성화하면 분해 AIGP 거리가 내부 비용에 추가됩니다.
릴리스 20.2R1부터 Junos OS는 AIGP 메트릭을 MED로 변환할 수 있도록 지원합니다. MED가 최상의 경로를 선택하는 데 사용되는 엔드 투 엔드 AIGP 메트릭 값을 전달하도록 할 때 이 기능을 활성화할 수 있습니다. 이는 고객 사이트가 두 개의 서로 다른 서비스 프로바이더를 통해 연결되고 고객 에지 라우터가 IGP 메트릭 기반 결정을 수행하려는 Inter-AS MPLS VPN 솔루션에서 특히 유용합니다. effective-aigp가 이전에 알려진 최저 값을 넘어 변경될 때 불필요한 경로 업데이트를 방지하도록 구성할 minimum-aigp 수 있습니다. 유효 AIGP는 경로와 함께 보급된 AIGP 값에 다음 홉에 도달하기 위한 IGP 비용을 더한 값입니다. 및 [edit policy-options policy-statement <name> then metric] 계층 수준에서 [edit protocols bgp group <group-name> metric-out] 및 minimum-effective-aigp 문을 구성할 effective-aigp 수 있습니다.
AIGP 속성은 선택적 비전이적 BGP 경로 속성이며 인터넷 초안 draft-ietf-idr-aigp-06, BGP에 대한 누적 IGP 메트릭 속성에 지정되어 있습니다.
또한보십시오
예: BGP에 대한 누적 IGP 속성 구성
이 예는 BGP에 대한 누적 IGP(AIGP) 메트릭 속성을 구성하는 방법을 보여줍니다.
요구 사항
이 예에서 사용되는 하드웨어 및 소프트웨어 구성 요소는 다음과 같습니다.
-
BGP 스피커 디바이스 7개.
-
Junos OS 릴리스 12.1 이상.
개요
AIGP 속성은 단일 관리가 여러 개의 인접한 BGP AS(Autonomous System)를 실행할 수 있는 구축을 가능하게 합니다. 이러한 구축을 통해 BGP는 IGP 메트릭에 따라 라우팅 결정을 내릴 수 있습니다. AIGP가 활성화되면 BGP는 IGP 메트릭에 기반하여 경로를 선택할 수 있습니다. 이를 통해 BGP는 노드가 서로 다른 AS에 있더라도 두 노드 간의 최단 경로를 선택할 수 있습니다. AIGP 속성은 터널링을 사용하여 패킷을 BGP 다음 홉으로 전달하는 네트워크에서 특히 유용합니다. 이 예는 MPLS 레이블 스위칭 경로로 구성된 AIGP를 보여줍니다.
AIGP를 활성화하려면 프로토콜 패밀리 기반의 BGP 구성에 문을 포함 aigp 합니다. 특정 패밀리에서 AIGP를 구성하면 해당 패밀리에서 AIGP 속성을 송수신할 수 있습니다. 기본적으로 AIGP는 비활성화되어 있습니다. AIGP가 비활성화된 이웃은 AIGP 속성을 보내지 않고 수신된 AIGP 속성을 자동으로 폐기합니다.
Junos OS는 및 family inet6 labeled-unicast에 대한 AIGP를 지원합니다.family inet labeled-unicast aigp 이 문은 글로벌 BGP, 그룹 또는 neighbor 수준에서 지정된 패밀리에 대해 구성할 수 있습니다.
기본적으로 로컬 접두사에 대한 AIGP 속성 값은 0입니다. AIGP 지원 이웃은 정책 작업을 사용하여 내보내기 정책에 의해 지정된 접두사에 대한 AIGP 속성을 생성할 수 있습니다 aigp-originate . AIGP 속성의 값은 접두사에 대한 IGP 거리를 반영합니다. 또는 정책 작업을 사용하여 aigp-originate distance distance 값을 지정할 수 있습니다. 구성 가능한 범위는 0에서 4,294,967,295입니다. 하나의 노드만 AIGP 속성을 생성하면 됩니다. 이웃이 BGP 구성의 문으로 aigp AIGP를 활성화하면 AIGP 속성이 유지되고 재보급됩니다.
AIGP 속성을 생성하는 정책 작업에는 다음 요구 사항이 있습니다.
-
neighbor는 AIGP를 지원해야 합니다.
-
정책을 내보내기 정책으로 적용해야 합니다.
-
접두사에는 현재 AIGP 속성이 없어야 합니다.
-
접두사는 다음 홉 self로 내보내야 합니다.
-
접두사는 AIGP 도메인 내에 있어야 합니다. 일반적으로 루프백 IP 주소는 시작되는 접두사입니다.
이러한 요구 사항이 충족되지 않으면 정책이 무시됩니다.
토폴로지 다이어그램
그림 4 는 이 예에서 사용되는 토폴로지를 보여줍니다. 최단 경로 우선(OSPF)은 내부 게이트웨이 프로토콜(IGP)으로 사용됩니다. 내부 BGP(IBGP)는 디바이스 PE1과 디바이스 PE4 간에 구성됩니다. 외부 BGP(EBGP)는 디바이스 PE7과 디바이스 PE1 사이, 디바이스 PE4와 디바이스 PE3 사이, 디바이스 PE4와 디바이스 PE2 사이에서 구성됩니다. 디바이스 PE4, PE2 및 PE3는 멀티홉용으로 구성됩니다. 디바이스 PE4는 AIGP 값을 기반으로 경로를 선택한 다음 AIGP 및 정책 구성에 따라 AIGP 값을 재보급합니다. 디바이스 PE1은 AIGP 값을 다른 관리 도메인에 있는 디바이스 PE7에 다시 보급합니다. 모든 디바이스에는 두 개의 루프백 인터페이스 주소가 있습니다. 10.9.9.x는 BGP 피어링 및 라우터 ID에 사용되며, 10.100.1.x는 BGP 다음 홉에 사용됩니다.
디바이스 PE1과 PE3 간의 네트워크에는 IBGP 피어링 및 여러 OSPF 영역이 있습니다. 디바이스 PE7에 대한 외부 링크는 AIGP 속성이 관리 도메인 외부의 이웃에 재보급된다는 것을 보여주도록 구성됩니다.
에서 다중 경로 보급
AIGP 속성의 발생을 위해서는 BGP 다음 홉이 그 자체여야 합니다. BGP 다음 홉이 변경되지 않은 상태로 유지되면 수신된 AIGP 속성이 있는 그대로 다른 AIGP neighbor에 다시 보급됩니다. 다음 홉이 변경되면 수신된 AIGP 속성이 증가된 값으로 다른 AIGP 인접 라우터에 다시 보급됩니다. 값의 증가는 이전 BGP 다음 홉까지의 IGP 거리를 반영합니다. 시연을 위해 이 예에서는 디바이스 PE2 및 디바이스 PE3와의 디바이스 PE4의 EBGP 피어링 세션에 루프백 인터페이스 주소를 사용합니다. 포인트 투 포인트 인터페이스를 결정하기 위해 재귀적 조회가 수행되도록 이러한 세션에서 멀티홉이 활성화됩니다. 다음 홉이 변경되기 때문에 IGP 거리가 AIGP 거리에 추가됩니다.
구성
CLI 빠른 구성
이 예를 빠르게 구성하려면, 아래 명령을 복사하여 텍스트 파일로 붙여 넣은 다음 모든 라인브레이크를 제거하고, 네트워크 구성을 일치하는 데 필요한 세부 사항을 변경한 다음, 계층 수준에서 [edit] 명령을 복사하여 CLI에 붙여 넣습니다.
디바이스 P1
set interfaces fe-1/2/0 unit 1 description P1-to-PE1 set interfaces fe-1/2/0 unit 1 family inet address 10.0.0.2/30 set interfaces fe-1/2/0 unit 1 family mpls set interfaces fe-1/2/1 unit 4 description P1-to-P2 set interfaces fe-1/2/1 unit 4 family inet address 10.0.0.29/30 set interfaces fe-1/2/1 unit 4 family mpls set interfaces fe-1/2/2 unit 8 description P1-to-PE4 set interfaces fe-1/2/2 unit 8 family inet address 10.0.0.17/30 set interfaces fe-1/2/2 unit 8 family mpls set interfaces lo0 unit 3 family inet address 10.9.9.2/32 set interfaces lo0 unit 3 family inet address 10.100.1.2/32 set protocols rsvp interface fe-1/2/0.1 set protocols rsvp interface fe-1/2/2.8 set protocols rsvp interface fe-1/2/1.4 set protocols mpls label-switched-path P1-to-P2 to 10.9.9.3 set protocols mpls label-switched-path P1-to-PE1 to 10.9.9.1 set protocols mpls label-switched-path P1-to-PE4 to 10.9.9.4 set protocols mpls interface fe-1/2/0.1 set protocols mpls interface fe-1/2/2.8 set protocols mpls interface fe-1/2/1.4 set protocols bgp group internal type internal set protocols bgp group internal local-address 10.9.9.2 set protocols bgp group internal family inet labeled-unicast aigp set protocols bgp group internal neighbor 10.9.9.1 set protocols bgp group internal neighbor 10.9.9.3 set protocols bgp group internal neighbor 10.9.9.4 set protocols ospf area 0.0.0.1 interface fe-1/2/0.1 metric 1 set protocols ospf area 0.0.0.1 interface fe-1/2/1.4 metric 1 set protocols ospf area 0.0.0.0 interface fe-1/2/2.8 metric 1 set protocols ospf area 0.0.0.0 interface 10.9.9.2 passive set protocols ospf area 0.0.0.0 interface 10.9.9.2 metric 1 set protocols ospf area 0.0.0.0 interface 10.100.1.2 passive set protocols ospf area 0.0.0.0 interface 10.100.1.2 metric 1 set routing-options router-id 10.9.9.2 set routing-options autonomous-system 13979
디바이스 P2
set interfaces fe-1/2/0 unit 3 description P2-to-PE1 set interfaces fe-1/2/0 unit 3 family inet address 10.0.0.6/30 set interfaces fe-1/2/0 unit 3 family mpls set interfaces fe-1/2/1 unit 5 description P2-to-P1 set interfaces fe-1/2/1 unit 5 family inet address 10.0.0.30/30 set interfaces fe-1/2/1 unit 5 family mpls set interfaces fe-1/2/2 unit 6 description P2-to-PE4 set interfaces fe-1/2/2 unit 6 family inet address 10.0.0.13/30 set interfaces fe-1/2/2 unit 6 family mpls set interfaces lo0 unit 5 family inet address 10.9.9.3/32 set interfaces lo0 unit 5 family inet address 10.100.1.3/32 set protocols rsvp interface fe-1/2/1.5 set protocols rsvp interface fe-1/2/2.6 set protocols rsvp interface fe-1/2/0.3 set protocols mpls label-switched-path P2-to-PE1 to 10.9.9.1 set protocols mpls label-switched-path P2-to-P1 to 10.9.9.2 set protocols mpls label-switched-path P2-to-PE4 to 10.9.9.4 set protocols mpls interface fe-1/2/1.5 set protocols mpls interface fe-1/2/2.6 set protocols mpls interface fe-1/2/0.3 set protocols bgp group internal type internal set protocols bgp group internal local-address 10.9.9.3 set protocols bgp group internal family inet labeled-unicast aigp set protocols bgp group internal neighbor 10.9.9.1 set protocols bgp group internal neighbor 10.9.9.2 set protocols bgp group internal neighbor 10.9.9.4 set protocols ospf area 0.0.0.0 interface fe-1/2/2.6 metric 1 set protocols ospf area 0.0.0.0 interface 10.9.9.3 passive set protocols ospf area 0.0.0.0 interface 10.9.9.3 metric 1 set protocols ospf area 0.0.0.0 interface 10.100.1.3 passive set protocols ospf area 0.0.0.0 interface 10.100.1.3 metric 1 set routing-options router-id 10.9.9.3 set routing-options autonomous-system 13979
디바이스 PE4
set interfaces fe-1/2/0 unit 7 description PE4-to-P2 set interfaces fe-1/2/0 unit 7 family inet address 10.0.0.14/30 set interfaces fe-1/2/0 unit 7 family mpls set interfaces fe-1/2/1 unit 9 description PE4-to-P1 set interfaces fe-1/2/1 unit 9 family inet address 10.0.0.18/30 set interfaces fe-1/2/1 unit 9 family mpls set interfaces fe-1/2/2 unit 10 description PE4-to-PE2 set interfaces fe-1/2/2 unit 10 family inet address 10.0.0.21/30 set interfaces fe-1/2/2 unit 10 family mpls set interfaces fe-1/0/2 unit 12 description PE4-to-PE3 set interfaces fe-1/0/2 unit 12 family inet address 10.0.0.25/30 set interfaces fe-1/0/2 unit 12 family mpls set interfaces lo0 unit 7 family inet address 10.9.9.4/32 set interfaces lo0 unit 7 family inet address 10.100.1.4/32 set protocols rsvp interface fe-1/2/0.7 set protocols rsvp interface fe-1/2/1.9 set protocols rsvp interface fe-1/2/2.10 set protocols rsvp interface fe-1/0/2.12 set protocols mpls label-switched-path PE4-to-PE2 to 10.9.9.5 set protocols mpls label-switched-path PE4-to-PE3 to 10.9.9.6 set protocols mpls label-switched-path PE4-to-P1 to 10.9.9.2 set protocols mpls label-switched-path PE4-to-P2 to 10.9.9.3 set protocols mpls interface fe-1/2/0.7 set protocols mpls interface fe-1/2/1.9 set protocols mpls interface fe-1/2/2.10 set protocols mpls interface fe-1/0/2.12 set protocols bgp export next-hop set protocols bgp export aigp set protocols bgp group internal type internal set protocols bgp group internal local-address 10.9.9.4 set protocols bgp group internal family inet labeled-unicast aigp set protocols bgp group internal neighbor 10.9.9.1 set protocols bgp group internal neighbor 10.9.9.3 set protocols bgp group internal neighbor 10.9.9.2 set protocols bgp group external type external set protocols bgp group external multihop ttl 2 set protocols bgp group external local-address 10.9.9.4 set protocols bgp group external family inet labeled-unicast aigp set protocols bgp group external peer-as 7018 set protocols bgp group external neighbor 10.9.9.5 set protocols bgp group external neighbor 10.9.9.6 set protocols ospf area 0.0.0.0 interface fe-1/2/1.9 metric 1 set protocols ospf area 0.0.0.0 interface fe-1/2/0.7 metric 1 set protocols ospf area 0.0.0.0 interface 10.9.9.4 passive set protocols ospf area 0.0.0.0 interface 10.9.9.4 metric 1 set protocols ospf area 0.0.0.0 interface 10.100.1.4 passive set protocols ospf area 0.0.0.0 interface 10.100.1.4 metric 1 set protocols ospf area 0.0.0.2 interface fe-1/2/2.10 metric 1 set protocols ospf area 0.0.0.3 interface fe-1/0/2.12 metric 1 set policy-options policy-statement aigp term 10 from protocol static set policy-options policy-statement aigp term 10 from route-filter 44.0.0.0/24 exact set policy-options policy-statement aigp term 10 then aigp-originate distance 200 set policy-options policy-statement aigp term 10 then next-hop 10.100.1.4 set policy-options policy-statement aigp term 10 then accept set policy-options policy-statement next-hop term 10 from protocol bgp set policy-options policy-statement next-hop term 10 then next-hop 10.100.1.4 set policy-options policy-statement next-hop term 10 then accept set policy-options policy-statement next-hop term 20 from protocol direct set policy-options policy-statement next-hop term 20 from route-filter 10.9.9.4/32 exact set policy-options policy-statement next-hop term 20 from route-filter 10.100.1.4/32 exact set policy-options policy-statement next-hop term 20 then next-hop 10.100.1.4 set policy-options policy-statement next-hop term 20 then accept set routing-options static route 44.0.0.0/24 discard set routing-options router-id 10.9.9.4 set routing-options autonomous-system 13979
디바이스 PE1
set interfaces fe-1/2/0 unit 0 description PE1-to-P1 set interfaces fe-1/2/0 unit 0 family inet address 10.0.0.1/30 set interfaces fe-1/2/0 unit 0 family mpls set interfaces fe-1/2/1 unit 2 description PE1-to-P2 set interfaces fe-1/2/1 unit 2 family inet address 10.0.0.5/30 set interfaces fe-1/2/1 unit 2 family mpls set interfaces fe-1/2/2 unit 14 description PE1-to-PE7 set interfaces fe-1/2/2 unit 14 family inet address 10.0.0.9/30 set interfaces lo0 unit 1 family inet address 10.9.9.1/32 set interfaces lo0 unit 1 family inet address 10.100.1.1/32 set protocols rsvp interface fe-1/2/0.0 set protocols rsvp interface fe-1/2/1.2 set protocols rsvp interface fe-1/2/2.14 set protocols mpls label-switched-path PE1-to-P1 to 10.9.9.2 set protocols mpls label-switched-path PE1-to-P2 to 10.9.9.3 set protocols mpls interface fe-1/2/0.0 set protocols mpls interface fe-1/2/1.2 set protocols mpls interface fe-1/2/2.14 set protocols bgp group internal type internal set protocols bgp group internal local-address 10.9.9.1 set protocols bgp group internal family inet labeled-unicast aigp set protocols bgp group internal export SET_EXPORT_ROUTES set protocols bgp group internal vpn-apply-export set protocols bgp group internal neighbor 10.9.9.4 set protocols bgp group internal neighbor 10.9.9.2 set protocols bgp group internal neighbor 10.9.9.3 set protocols bgp group external type external set protocols bgp group external family inet labeled-unicast aigp set protocols bgp group external export SET_EXPORT_ROUTES set protocols bgp group external peer-as 7019 set protocols bgp group external neighbor 10.0.0.10 set protocols ospf area 0.0.0.1 interface fe-1/2/0.0 metric 1 set protocols ospf area 0.0.0.1 interface fe-1/2/1.2 metric 1 set protocols ospf area 0.0.0.1 interface 10.9.9.1 passive set protocols ospf area 0.0.0.1 interface 10.9.9.1 metric 1 set protocols ospf area 0.0.0.1 interface 10.100.1.1 passive set protocols ospf area 0.0.0.1 interface 10.100.1.1 metric 1 set policy-options policy-statement SET_EXPORT_ROUTES term 10 from protocol direct set policy-options policy-statement SET_EXPORT_ROUTES term 10 from protocol bgp set policy-options policy-statement SET_EXPORT_ROUTES term 10 then next-hop 10.100.1.1 set policy-options policy-statement SET_EXPORT_ROUTES term 10 then accept set routing-options router-id 10.9.9.1 set routing-options autonomous-system 13979
디바이스 PE2
set interfaces fe-1/2/0 unit 11 description PE2-to-PE4 set interfaces fe-1/2/0 unit 11 family inet address 10.0.0.22/30 set interfaces fe-1/2/0 unit 11 family mpls set interfaces lo0 unit 9 family inet address 10.9.9.5/32 primary set interfaces lo0 unit 9 family inet address 10.100.1.5/32 set protocols rsvp interface fe-1/2/0.11 set protocols mpls label-switched-path PE2-to-PE4 to 10.9.9.4 set protocols mpls interface fe-1/2/0.11 set protocols bgp group external type external set protocols bgp group external multihop ttl 2 set protocols bgp group external local-address 10.9.9.5 set protocols bgp group external family inet labeled-unicast aigp set protocols bgp group external export next-hop set protocols bgp group external export aigp set protocols bgp group external export SET_EXPORT_ROUTES set protocols bgp group external vpn-apply-export set protocols bgp group external peer-as 13979 set protocols bgp group external neighbor 10.9.9.4 set protocols ospf area 0.0.0.2 interface 10.9.9.5 passive set protocols ospf area 0.0.0.2 interface 10.9.9.5 metric 1 set protocols ospf area 0.0.0.2 interface 10.100.1.5 passive set protocols ospf area 0.0.0.2 interface 10.100.1.5 metric 1 set protocols ospf area 0.0.0.2 interface fe-1/2/0.11 metric 1 set policy-options policy-statement SET_EXPORT_ROUTES term 10 from protocol direct set policy-options policy-statement SET_EXPORT_ROUTES term 10 from protocol static set policy-options policy-statement SET_EXPORT_ROUTES term 10 from protocol bgp set policy-options policy-statement SET_EXPORT_ROUTES term 10 then next-hop 10.100.1.5 set policy-options policy-statement SET_EXPORT_ROUTES term 10 then accept set policy-options policy-statement aigp term 10 from route-filter 55.0.0.0/24 exact set policy-options policy-statement aigp term 10 then aigp-originate distance 20 set policy-options policy-statement aigp term 10 then next-hop 10.100.1.5 set policy-options policy-statement aigp term 10 then accept set policy-options policy-statement aigp term 20 from route-filter 99.0.0.0/24 exact set policy-options policy-statement aigp term 20 then aigp-originate distance 30 set policy-options policy-statement aigp term 20 then next-hop 10.100.1.5 set policy-options policy-statement aigp term 20 then accept set policy-options policy-statement next-hop term 10 from protocol bgp set policy-options policy-statement next-hop term 10 then next-hop 10.100.1.5 set policy-options policy-statement next-hop term 10 then accept set policy-options policy-statement next-hop term 20 from protocol direct set policy-options policy-statement next-hop term 20 from route-filter 10.9.9.5/32 exact set policy-options policy-statement next-hop term 20 from route-filter 10.100.1.5/32 exact set policy-options policy-statement next-hop term 20 then next-hop 10.100.1.5 set policy-options policy-statement next-hop term 20 then accept set routing-options static route 99.0.0.0/24 discard set routing-options static route 55.0.0.0/24 discard set routing-options router-id 10.9.9.5 set routing-options autonomous-system 7018
디바이스 PE3
set interfaces fe-1/2/0 unit 13 description PE3-to-PE4 set interfaces fe-1/2/0 unit 13 family inet address 10.0.0.26/30 set interfaces fe-1/2/0 unit 13 family mpls set interfaces lo0 unit 11 family inet address 10.9.9.6/32 set interfaces lo0 unit 11 family inet address 10.100.1.6/32 set protocols rsvp interface fe-1/2/0.13 set protocols mpls label-switched-path PE3-to-PE4 to 10.9.9.4 set protocols mpls interface fe-1/2/0.13 set protocols bgp group external type external set protocols bgp group external multihop ttl 2 set protocols bgp group external local-address 10.9.9.6 set protocols bgp group external family inet labeled-unicast aigp set protocols bgp group external export next-hop set protocols bgp group external export SET_EXPORT_ROUTES set protocols bgp group external vpn-apply-export set protocols bgp group external peer-as 13979 set protocols bgp group external neighbor 10.9.9.4 set protocols ospf area 0.0.0.3 interface 10.9.9.6 passive set protocols ospf area 0.0.0.3 interface 10.9.9.6 metric 1 set protocols ospf area 0.0.0.3 interface 10.100.1.6 passive set protocols ospf area 0.0.0.3 interface 10.100.1.6 metric 1 set protocols ospf area 0.0.0.3 interface fe-1/2/0.13 metric 1 set policy-options policy-statement SET_EXPORT_ROUTES term 10 from protocol direct set policy-options policy-statement SET_EXPORT_ROUTES term 10 from protocol static set policy-options policy-statement SET_EXPORT_ROUTES term 10 from protocol bgp set policy-options policy-statement SET_EXPORT_ROUTES term 10 then next-hop 10.100.1.6 set policy-options policy-statement SET_EXPORT_ROUTES term 10 then accept set policy-options policy-statement next-hop term 10 from protocol bgp set policy-options policy-statement next-hop term 10 then next-hop 10.100.1.6 set policy-options policy-statement next-hop term 10 then accept set policy-options policy-statement next-hop term 20 from protocol direct set policy-options policy-statement next-hop term 20 from route-filter 10.9.9.6/32 exact set policy-options policy-statement next-hop term 20 from route-filter 10.100.1.6/32 exact set policy-options policy-statement next-hop term 20 then next-hop 10.100.1.6 set policy-options policy-statement next-hop term 20 then accept set routing-options router-id 10.9.9.6 set routing-options autonomous-system 7018
디바이스 PE7
set interfaces fe-1/2/0 unit 15 description PE7-to-PE1 set interfaces fe-1/2/0 unit 15 family inet address 10.0.0.10/30 set interfaces lo0 unit 13 family inet address 10.9.9.7/32 set interfaces lo0 unit 13 family inet address 10.100.1.7/32 set protocols bgp group external type external set protocols bgp group external family inet labeled-unicast aigp set protocols bgp group external export SET_EXPORT_ROUTES set protocols bgp group external peer-as 13979 set protocols bgp group external neighbor 10.0.0.9 set policy-options policy-statement SET_EXPORT_ROUTES term 10 from protocol direct set policy-options policy-statement SET_EXPORT_ROUTES term 10 from protocol bgp set policy-options policy-statement SET_EXPORT_ROUTES term 10 then next-hop 10.100.1.7 set policy-options policy-statement SET_EXPORT_ROUTES term 10 then accept set routing-options router-id 10.9.9.7 set routing-options autonomous-system 7019
디바이스 P1 구성
단계별 절차
다음 예에서는 구성 계층에서 다양한 수준을 탐색해야 합니다. CLI 탐색에 대한 정보는 Junos OS CLI 사용자 가이드의 구성 모드에서 CLI 편집기 사용을 참조하십시오.
디바이스 P1 구성:
-
인터페이스를 구성합니다.
[edit interfaces] user@P1# set fe-1/2/0 unit 1 description P1-to-PE1 user@P1# set fe-1/2/0 unit 1 family inet address 10.0.0.2/30 user@P1# set fe-1/2/0 unit 1 family mpls user@P1# set fe-1/2/1 unit 4 description P1-to-P2 user@P1# set fe-1/2/1 unit 4 family inet address 10.0.0.29/30 user@P1# set fe-1/2/1 unit 4 family mpls user@P1# set fe-1/2/2 unit 8 description P1-to-PE4 user@P1# set fe-1/2/2 unit 8 family inet address 10.0.0.17/30 user@P1# set fe-1/2/2 unit 8 family mpls user@P1# set lo0 unit 3 family inet address 10.9.9.2/32 user@P1# set lo0 unit 3 family inet address 10.100.1.2/32
-
MPLS 및 신호 프로토콜(예: RSVP 또는 LDP)을 구성합니다.
[edit protocols] user@P1# set rsvp interface fe-1/2/0.1 user@P1# set rsvp interface fe-1/2/2.8 user@P1# set rsvp interface fe-1/2/1.4 user@P1# set mpls label-switched-path P1-to-P2 to 10.9.9.3 user@P1# set mpls label-switched-path P1-to-PE1 to 10.9.9.1 user@P1# set mpls label-switched-path P1-to-PE4 to 10.9.9.4 user@P1# set mpls interface fe-1/2/0.1 user@P1# set mpls interface fe-1/2/2.8 user@P1# set mpls interface fe-1/2/1.4
-
BGP를 구성합니다.
[edit protocols bgp group internal] user@P1# set type internal user@P1# set local-address 10.9.9.2 user@P1# set neighbor 10.9.9.1 user@P1# set neighbor 10.9.9.3 user@P1# set neighbor 10.9.9.4
-
AIGP를 활성화합니다.
[edit protocols bgp group internal] user@P1# set family inet labeled-unicast aigp
-
OSPF, RIP 또는 IS-IS와 같은 IGP를 구성합니다.
[edit protocols ospf] user@P1# set area 0.0.0.1 interface fe-1/2/0.1 metric 1 user@P1# set area 0.0.0.1 interface fe-1/2/1.4 metric 1 user@P1# set area 0.0.0.0 interface fe-1/2/2.8 metric 1 user@P1# set area 0.0.0.0 interface 10.9.9.2 passive user@P1# set area 0.0.0.0 interface 10.9.9.2 metric 1 user@P1# set area 0.0.0.0 interface 10.100.1.2 passive user@P1# set area 0.0.0.0 interface 10.100.1.2 metric 1
-
라우터 ID 및 자율 시스템 번호를 구성합니다.
[edit routing-options] user@P1# set router-id 10.9.9.2 user@P1# set autonomous-system 13979
-
디바이스 구성을 완료하면 구성을 커밋합니다.
user@P1# commit
결과
구성 모드에서 , show protocols및 show routing-options 명령을 show interfaces입력하여 구성을 확인합니다. 출력에 의도한 구성이 표시되지 않으면 이 예의 지침을 반복하여 구성을 수정합니다.
user@P1# show interfaces
fe-1/2/0 {
unit 1 {
description P1-to-PE1;
family inet {
address 10.0.0.2/30;
}
family mpls;
}
}
fe-1/2/1 {
unit 4 {
description P1-to-P2;
family inet {
address 10.0.0.29/30;
}
family mpls;
}
}
fe-1/2/2 {
unit 8 {
description P1-to-PE4;
family inet {
address 10.0.0.17/30;
}
family mpls;
}
}
lo0 {
unit 3 {
family inet {
address 10.9.9.2/32;
address 10.100.1.2/32;
}
}
}
user@P1# show protocols
rsvp {
interface fe-1/2/0.1;
interface fe-1/2/2.8;
interface fe-1/2/1.4;
}
mpls {
label-switched-path P1-to-P2 {
to 10.9.9.3;
}
label-switched-path P1-to-PE1 {
to 10.9.9.1;
}
label-switched-path P1-to-PE4 {
to 10.9.9.4;
}
interface fe-1/2/0.1;
interface fe-1/2/2.8;
interface fe-1/2/1.4;
}
bgp {
group internal {
type internal;
local-address 10.9.9.2;
family inet {
labeled-unicast {
aigp;
}
}
neighbor 10.9.9.1;
neighbor 10.9.9.3;
neighbor 10.9.9.4;
}
}
ospf {
area 0.0.0.1 {
interface fe-1/2/0.1 {
metric 1;
}
interface fe-1/2/1.4 {
metric 1;
}
}
area 0.0.0.0 {
interface fe-1/2/2.8 {
metric 1;
}
interface 10.9.9.2 {
passive;
metric 1;
}
interface 10.100.1.2 {
passive;
metric 1;
}
}
}
user@P1# show routing-options router-id 10.9.9.2; autonomous-system 13979;
디바이스 P2 구성
단계별 절차
다음 예에서는 구성 계층에서 다양한 수준을 탐색해야 합니다. CLI 탐색에 대한 정보는 Junos OS CLI 사용자 가이드의 구성 모드에서 CLI 편집기 사용을 참조하십시오.
디바이스 P2 구성:
-
인터페이스를 구성합니다.
[edit interfaces] user@P2# set fe-1/2/0 unit 3 description P2-to-PE1 user@P2# set fe-1/2/0 unit 3 family inet address 10.0.0.6/30 user@P2# set fe-1/2/0 unit 3 family mpls user@P2# set fe-1/2/1 unit 5 description P2-to-P1 user@P2# set fe-1/2/1 unit 5 family inet address 10.0.0.30/30 user@P2# set fe-1/2/1 unit 5 family mpls user@P2# set fe-1/2/2 unit 6 description P2-to-PE4 user@P2# set fe-1/2/2 unit 6 family inet address 10.0.0.13/30 user@P2# set fe-1/2/2 unit 6 family mpls user@P2# set lo0 unit 5 family inet address 10.9.9.3/32 user@P2# set lo0 unit 5 family inet address 10.100.1.3/32
-
MPLS 및 신호 프로토콜(예: RSVP 또는 LDP)을 구성합니다.
[edit protocols] user@P2# set rsvp interface fe-1/2/1.5 user@P2# set rsvp interface fe-1/2/2.6 user@P2# set rsvp interface fe-1/2/0.3 user@P2# set mpls label-switched-path P2-to-PE1 to 10.9.9.1 user@P2# set mpls label-switched-path P2-to-P1 to 10.9.9.2 user@P2# set mpls label-switched-path P2-to-PE4 to 10.9.9.4 user@P2# set mpls interface fe-1/2/1.5 user@P2# set mpls interface fe-1/2/2.6 user@P2# set mpls interface fe-1/2/0.3
-
BGP를 구성합니다.
[edit protocols bgp group internal] user@P2# set type internal user@P2# set local-address 10.9.9.3 user@P2# set neighbor 10.9.9.1 user@P2# set neighbor 10.9.9.2 user@P2# set neighbor 10.9.9.4
-
AIGP를 활성화합니다.
[edit protocols bgp group internal] user@P2# set family inet labeled-unicast aigp
-
OSPF, RIP 또는 IS-IS와 같은 IGP를 구성합니다.
[edit protocols ospf] user@P2# set area 0.0.0.0 interface fe-1/2/2.6 metric 1 user@P2# set area 0.0.0.0 interface 10.9.9.3 passive user@P2# set area 0.0.0.0 interface 10.9.9.3 metric 1 user@P2# set area 0.0.0.0 interface 10.100.1.3 passive user@P2# set area 0.0.0.0 interface 10.100.1.3 metric 1
-
라우터 ID 및 자율 시스템 번호를 구성합니다.
[edit routing-options] user@P2# set router-id 10.9.9.3 user@P2# set autonomous-system 13979
-
디바이스 구성을 완료하면 구성을 커밋합니다.
user@P2# commit
결과
구성 모드에서 , show protocols및 show routing-options 명령을 show interfaces입력하여 구성을 확인합니다. 출력에 의도한 구성이 표시되지 않으면 이 예의 지침을 반복하여 구성을 수정합니다.
user@P2# show interfaces
fe-1/2/0 {
unit 3 {
description P2-to-PE1;
family inet {
address 10.0.0.6/30;
}
family mpls;
}
}
fe-1/2/1 {
unit 5 {
description P2-to-P1;
family inet {
address 10.0.0.30/30;
}
family mpls;
}
}
fe-1/2/2 {
unit 6 {
description P2-to-PE4;
family inet {
address 10.0.0.13/30;
}
family mpls;
}
}
lo0 {
unit 5 {
family inet {
address 10.9.9.3/32;
address 10.100.1.3/32;
}
}
}
user@P2# show protocols
rsvp {
interface fe-1/2/1.5;
interface fe-1/2/2.6;
interface fe-1/2/0.3;
}
mpls {
label-switched-path P2-to-PE1 {
to 10.9.9.1;
}
label-switched-path P2-to-P1 {
to 10.9.9.2;
}
label-switched-path P2-to-PE4 {
to 10.9.9.4;
}
interface fe-1/2/1.5;
interface fe-1/2/2.6;
interface fe-1/2/0.3;
}
bgp {
group internal {
type internal;
local-address 10.9.9.3;
family inet {
labeled-unicast {
aigp;
}
}
neighbor 10.9.9.1;
neighbor 10.9.9.2;
neighbor 10.9.9.4;
}
}
ospf {
area 0.0.0.0 {
interface fe-1/2/2.6 {
metric 1;
}
interface 10.9.9.3 {
passive;
metric 1;
}
interface 10.100.1.3 {
passive;
metric 1;
}
}
}
user@P2# show routing-options router-id 10.9.9.3; autonomous-system 13979;
디바이스 PE4 구성
단계별 절차
다음 예에서는 구성 계층에서 다양한 수준을 탐색해야 합니다. CLI 탐색에 대한 정보는 Junos OS CLI 사용자 가이드의 구성 모드에서 CLI 편집기 사용을 참조하십시오.
디바이스 PE4 구성:
-
인터페이스를 구성합니다.
[edit interfaces] user@PE4# set fe-1/2/0 unit 7 description PE4-to-P2 user@PE4# set fe-1/2/0 unit 7 family inet address 10.0.0.14/30 user@PE4# set fe-1/2/0 unit 7 family mpls user@PE4# set fe-1/2/1 unit 9 description PE4-to-P1 user@PE4# set fe-1/2/1 unit 9 family inet address 10.0.0.18/30 user@PE4# set fe-1/2/1 unit 9 family mpls user@PE4# set fe-1/2/2 unit 10 description PE4-to-PE2 user@PE4# set fe-1/2/2 unit 10 family inet address 10.0.0.21/30 user@PE4# set fe-1/2/2 unit 10 family mpls user@PE4# set fe-1/0/2 unit 12 description PE4-to-PE3 user@PE4# set fe-1/0/2 unit 12 family inet address 10.0.0.25/30 user@PE4# set fe-1/0/2 unit 12 family mpls user@PE4# set lo0 unit 7 family inet address 10.9.9.4/32 user@PE4# set lo0 unit 7 family inet address 10.100.1.4/32
-
MPLS 및 신호 프로토콜(예: RSVP 또는 LDP)을 구성합니다.
[edit protocols] user@PE4# set rsvp interface fe-1/2/0.7 user@PE4# set rsvp interface fe-1/2/1.9 user@PE4# set rsvp interface fe-1/2/2.10 user@PE4# set rsvp interface fe-1/0/2.12 user@PE4# set mpls label-switched-path PE4-to-PE2 to 10.9.9.5 user@PE4# set mpls label-switched-path PE4-to-PE3 to 10.9.9.6 user@PE4# set mpls label-switched-path PE4-to-P1 to 10.9.9.2 user@PE4# set mpls label-switched-path PE4-to-P2 to 10.9.9.3 user@PE4# set mpls interface fe-1/2/0.7 user@PE4# set mpls interface fe-1/2/1.9 user@PE4# set mpls interface fe-1/2/2.10 user@PE4# set mpls interface fe-1/0/2.12
-
BGP를 구성합니다.
[edit protocols bgp] user@PE4# set export next-hop user@PE4# set export aigp user@PE4# set group internal type internal user@PE4# set group internal local-address 10.9.9.4 user@PE4# set group internal neighbor 10.9.9.1 user@PE4# set group internal neighbor 10.9.9.3 user@PE4# set group internal neighbor 10.9.9.2 user@PE4# set group external type external user@PE4# set group external multihop ttl 2 user@PE4# set group external local-address 10.9.9.4 user@PE4# set group external peer-as 7018 user@PE4# set group external neighbor 10.9.9.5 user@PE4# set group external neighbor 10.9.9.6
-
AIGP를 활성화합니다.
[edit protocols bgp] user@PE4# set group external family inet labeled-unicast aigp user@PE4# set group internal family inet labeled-unicast aigp
-
접두사를 시작하고 AIGP 거리를 구성합니다.
기본적으로 접두사는 현재 IGP 거리를 사용하여 시작됩니다. 선택적으로 다음과 같이 옵션을 사용하여
distanceAIGP 속성에 대한 거리를 구성할 수 있습니다.[edit policy-options policy-statement aigp term 10] user@PE4# set from protocol static user@PE4# set from route-filter 44.0.0.0/24 exact user@PE4# set then aigp-originate distance 200 user@PE4# set then next-hop 10.100.1.4 user@PE4# set then accept
-
정책을 활성화합니다.
[edit policy-options policy-statement next-hop] user@PE4# set term 10 from protocol bgp user@PE4# set term 10 then next-hop 10.100.1.4 user@PE4# set term 10 then accept user@PE4# set term 20 from protocol direct user@PE4# set term 20 from route-filter 10.9.9.4/32 exact user@PE4# set term 20 from route-filter 10.100.1.4/32 exact user@PE4# set term 20 then next-hop 10.100.1.4 user@PE4# set term 20 then accept
-
정적 경로를 구성합니다.
[edit routing-options] user@PE4# set static route 44.0.0.0/24 discard
-
OSPF, RIP 또는 IS-IS와 같은 IGP를 구성합니다.
[edit protocols ospf] user@PE4# set area 0.0.0.0 interface fe-1/2/1.9 metric 1 user@PE4# set area 0.0.0.0 interface fe-1/2/0.7 metric 1 user@PE4# set area 0.0.0.0 interface 10.9.9.4 passive user@PE4# set area 0.0.0.0 interface 10.9.9.4 metric 1 user@PE4# set area 0.0.0.0 interface 10.100.1.4 passive user@PE4# set area 0.0.0.0 interface 10.100.1.4 metric 1 user@PE4# set area 0.0.0.2 interface fe-1/2/2.10 metric 1 user@PE4# set area 0.0.0.3 interface fe-1/0/2.12 metric 1
-
라우터 ID 및 자율 시스템 번호를 구성합니다.
[edit routing-options] user@PE4# set router-id 10.9.9.4 user@PE4# set autonomous-system 13979
-
디바이스 구성을 완료하면 구성을 커밋합니다.
user@PE4# commit
결과
구성 모드에서 , show policy-options, show protocols및 show routing-options 명령을 show interfaces입력하여 구성을 확인합니다. 출력에 의도한 구성이 표시되지 않으면 이 예의 지침을 반복하여 구성을 수정합니다.
user@PE4# show interfaces
fe-1/0/2 {
unit 12 {
description PE4-to-PE3;
family inet {
address 10.0.0.25/30;
}
family mpls;
}
}
fe-1/2/0 {
unit 7 {
description PE4-to-P2;
family inet {
address 10.0.0.14/30;
}
family mpls;
}
}
fe-1/2/1 {
unit 9 {
description PE4-to-P1;
family inet {
address 10.0.0.18/30;
}
family mpls;
}
}
fe-1/2/2 {
unit 10 {
description PE4-to-PE2;
family inet {
address 10.0.0.21/30;
}
family mpls;
}
}
lo0 {
unit 7 {
family inet {
address 10.9.9.4/32;
address 10.100.1.4/32;
}
}
}
user@PE4# show policy-options
policy-statement aigp {
term 10 {
from {
protocol static;
route-filter 44.0.0.0/24 exact;
}
then {
aigp-originate distance 200;
next-hop 10.100.1.4;
accept;
}
}
}
policy-statement next-hop {
term 10 {
from protocol bgp;
then {
next-hop 10.100.1.4;
accept;
}
}
term 20 {
from {
protocol direct;
route-filter 10.9.9.4/32 exact;
route-filter 10.100.1.4/32 exact;
}
then {
next-hop 10.100.1.4;
accept;
}
}
}
user@PE4# show protocols
rsvp {
interface fe-1/2/0.7;
interface fe-1/2/1.9;
interface fe-1/2/2.10;
interface fe-1/0/2.12;
}
mpls {
label-switched-path PE4-to-PE2 {
to 10.9.9.5;
}
label-switched-path PE4-to-PE3 {
to 10.9.9.6;
}
label-switched-path PE4-to-P1 {
to 10.9.9.2;
}
label-switched-path PE4-to-P2 {
to 10.9.9.3;
}
interface fe-1/2/0.7;
interface fe-1/2/1.9;
interface fe-1/2/2.10;
interface fe-1/0/2.12;
}
bgp {
export [ next-hop aigp ];
group internal {
type internal;
local-address 10.9.9.4;
family inet {
labeled-unicast {
aigp;
}
}
neighbor 10.9.9.1;
neighbor 10.9.9.3;
neighbor 10.9.9.2;
}
group external {
type external;
multihop {
ttl 2;
}
local-address 10.9.9.4;
family inet {
labeled-unicast {
aigp;
}
}
peer-as 7018;
neighbor 10.9.9.5;
neighbor 10.9.9.6;
}
}
ospf {
area 0.0.0.0 {
interface fe-1/2/1.9 {
metric 1;
}
interface fe-1/2/0.7 {
metric 1;
}
interface 10.9.9.4 {
passive;
metric 1;
}
interface 10.100.1.4 {
passive;
metric 1;
}
}
area 0.0.0.2 {
interface fe-1/2/2.10 {
metric 1;
}
}
area 0.0.0.3 {
interface fe-1/0/2.12 {
metric 1;
}
}
}
user@PE4# show routing-options
static {
route 44.0.0.0/24 discard;
}
router-id 10.9.9.4;
autonomous-system 13979;
디바이스 PE1 구성
단계별 절차
다음 예에서는 구성 계층에서 다양한 수준을 탐색해야 합니다. CLI 탐색에 대한 정보는 Junos OS CLI 사용자 가이드의 구성 모드에서 CLI 편집기 사용을 참조하십시오.
디바이스 PE1 구성:
-
인터페이스를 구성합니다.
[edit interfaces] user@PE1# set fe-1/2/0 unit 0 description PE1-to-P1 user@PE1# set fe-1/2/0 unit 0 family inet address 10.0.0.1/30 user@PE1# set fe-1/2/0 unit 0 family mpls user@PE1# set fe-1/2/1 unit 2 description PE1-to-P2 user@PE1# set fe-1/2/1 unit 2 family inet address 10.0.0.5/30 user@PE1# set fe-1/2/1 unit 2 family mpls user@PE1# set fe-1/2/2 unit 14 description PE1-to-PE7 user@PE1# set fe-1/2/2 unit 14 family inet address 10.0.0.9/30 user@PE1# set lo0 unit 1 family inet address 10.9.9.1/32 user@PE1# set lo0 unit 1 family inet address 10.100.1.1/32
-
MPLS 및 신호 프로토콜(예: RSVP 또는 LDP)을 구성합니다.
[edit protocols] user@PE1# set rsvp interface fe-1/2/0.0 user@PE1# set rsvp interface fe-1/2/1.2 user@PE1# set rsvp interface fe-1/2/2.14 user@PE1# set mpls label-switched-path PE1-to-P1 to 10.9.9.2 user@PE1# set mpls label-switched-path PE1-to-P2 to 10.9.9.3 user@PE1# set mpls interface fe-1/2/0.0 user@PE1# set mpls interface fe-1/2/1.2 user@PE1# set mpls interface fe-1/2/2.14
-
BGP를 구성합니다.
[edit protocols bgp] user@PE1# set group internal type internal user@PE1# set group internal local-address 10.9.9.1 user@PE1# set group internal export SET_EXPORT_ROUTES user@PE1# set group internal vpn-apply-export user@PE1# set group internal neighbor 10.9.9.4 user@PE1# set group internal neighbor 10.9.9.2 user@PE1# set group internal neighbor 10.9.9.3 user@PE1# set group external type external user@PE1# set group external export SET_EXPORT_ROUTES user@PE1# set group external peer-as 7019 user@PE1# set group external neighbor 10.0.0.10
-
AIGP를 활성화합니다.
[edit protocols bgp] user@PE1# set group internal family inet labeled-unicast aigp user@PE1# set group external family inet labeled-unicast aigp
-
정책을 활성화합니다.
[edit policy-options policy-statement SET_EXPORT_ROUTES term 10] user@PE1# set from protocol direct user@PE1# set from protocol bgp user@PE1# set then next-hop 10.100.1.1 user@PE1# set then accept
-
OSPF, RIP 또는 IS-IS와 같은 IGP를 구성합니다.
[edit protocols ospf area 0.0.0.1] user@PE1# set interface fe-1/2/0.0 metric 1 user@PE1# set interface fe-1/2/1.2 metric 1 user@PE1# set interface 10.9.9.1 passive user@PE1# set interface 10.9.9.1 metric 1 user@PE1# set interface 10.100.1.1 passive user@PE1# set interface 10.100.1.1 metric 1
-
라우터 ID 및 자율 시스템 번호를 구성합니다.
[edit routing-options] user@PE1# set router-id 10.9.9.1 user@PE1# set autonomous-system 13979
-
디바이스 구성을 완료하면 구성을 커밋합니다.
user@PE1# commit
결과
구성 모드에서 , show policy-options, show protocols및 show routing-options 명령을 show interfaces입력하여 구성을 확인합니다. 출력에 의도한 구성이 표시되지 않으면 이 예의 지침을 반복하여 구성을 수정합니다.
user@PE1# show interfaces
fe-1/2/0 {
unit 0 {
description PE1-to-P1;
family inet {
address 10.0.0.1/30;
}
family mpls;
}
}
fe-1/2/1 {
unit 2 {
description PE1-to-P2;
family inet {
address 10.0.0.5/30;
}
family mpls;
}
}
fe-1/2/2 {
unit 14 {
description PE1-to-PE7;
family inet {
address 10.0.0.9/30;
}
}
}
lo0 {
unit 1 {
family inet {
address 10.9.9.1/32;
address 10.100.1.1/32;
}
}
}
user@PE1# show policy-options
policy-statement SET_EXPORT_ROUTES {
term 10 {
from protocol [ direct bgp ];
then {
next-hop 10.100.1.1;
accept;
}
}
}
user@PE1# show protocols
rsvp {
interface fe-1/2/0.0;
interface fe-1/2/1.2;
interface fe-1/2/2.14;
}
mpls {
label-switched-path PE1-to-P1 {
to 10.9.9.2;
}
label-switched-path PE1-to-P2 {
to 10.9.9.3;
}
interface fe-1/2/0.0;
interface fe-1/2/1.2;
interface fe-1/2/2.14;
}
bgp {
group internal {
type internal;
local-address 10.9.9.1;
family inet {
labeled-unicast {
aigp;
}
}
export SET_EXPORT_ROUTES;
vpn-apply-export;
neighbor 10.9.9.4;
neighbor 10.9.9.2;
neighbor 10.9.9.3;
}
group external {
type external;
family inet {
labeled-unicast {
aigp;
}
}
export SET_EXPORT_ROUTES;
peer-as 7019;
neighbor 10.0.0.10;
}
}
ospf {
area 0.0.0.1 {
interface fe-1/2/0.0 {
metric 1;
}
interface fe-1/2/1.2 {
metric 1;
}
interface 10.9.9.1 {
passive;
metric 1;
}
interface 10.100.1.1 {
passive;
metric 1;
}
}
}
user@PE1# show routing-options router-id 10.9.9.1; autonomous-system 13979;
디바이스 PE2 구성
단계별 절차
다음 예에서는 구성 계층에서 다양한 수준을 탐색해야 합니다. CLI 탐색에 대한 정보는 Junos OS CLI 사용자 가이드의 구성 모드에서 CLI 편집기 사용을 참조하십시오.
디바이스 PE2 구성:
-
인터페이스를 구성합니다.
[edit interfaces] user@PE2# set fe-1/2/0 unit 11 description PE2-to-PE4 user@PE2# set fe-1/2/0 unit 11 family inet address 10.0.0.22/30 user@PE2# set fe-1/2/0 unit 11 family mpls user@PE2# set lo0 unit 9 family inet address 10.9.9.5/32 primary user@PE2# set lo0 unit 9 family inet address 10.100.1.5/32
-
MPLS 및 신호 프로토콜(예: RSVP 또는 LDP)을 구성합니다.
[edit protocols] user@PE2# set rsvp interface fe-1/2/0.11 user@PE2# set mpls label-switched-path PE2-to-PE4 to 10.9.9.4 user@PE2# set mpls interface fe-1/2/0.11
-
BGP를 구성합니다.
[edit protocols bgp] user@PE2# set group external type external user@PE2# set group external multihop ttl 2 user@PE2# set group external local-address 10.9.9.5 user@PE2# set group external export next-hop user@PE2# set group external export aigp user@PE2# set group external export SET_EXPORT_ROUTES user@PE2# set group external vpn-apply-export user@PE2# set group external peer-as 13979 user@PE2# set group external neighbor 10.9.9.4
-
AIGP를 활성화합니다.
[edit protocols bgp] user@PE2# set group external family inet labeled-unicast aigp
-
접두사를 시작하고 AIGP 거리를 구성합니다.
기본적으로 접두사는 현재 IGP 거리를 사용하여 시작됩니다. 선택적으로 다음과 같이 옵션을 사용하여
distanceAIGP 속성에 대한 거리를 구성할 수 있습니다.[edit policy-options policy-statement aigp] user@PE2# set term 10 from route-filter 55.0.0.0/24 exact user@PE2# set term 10 then aigp-originate distance 20 user@PE2# set term 10 then next-hop 10.100.1.5 user@PE2# set term 10 then accept user@PE2# set term 20 from route-filter 99.0.0.0/24 exact user@PE2# set term 20 then aigp-originate distance 30 user@PE2# set term 20 then next-hop 10.100.1.5 user@PE2# set term 20 then accept
-
정책을 활성화합니다.
[edit policy-options] user@PE2# set policy-statement SET_EXPORT_ROUTES term 10 from protocol direct user@PE2# set policy-statement SET_EXPORT_ROUTES term 10 from protocol static user@PE2# set policy-statement SET_EXPORT_ROUTES term 10 from protocol bgp user@PE2# set policy-statement SET_EXPORT_ROUTES term 10 then next-hop 10.100.1.5 user@PE2# set policy-statement SET_EXPORT_ROUTES term 10 then accept user@PE2# set policy-statement next-hop term 10 from protocol bgp user@PE2# set policy-statement next-hop term 10 then next-hop 10.100.1.5 user@PE2# set policy-statement next-hop term 10 then accept user@PE2# set policy-statement next-hop term 20 from protocol direct user@PE2# set policy-statement next-hop term 20 from route-filter 10.9.9.5/32 exact user@PE2# set policy-statement next-hop term 20 from route-filter 10.100.1.5/32 exact user@PE2# set policy-statement next-hop term 20 then next-hop 10.100.1.5 user@PE2# set policy-statement next-hop term 20 then accept
-
일부 정적 경로를 활성화합니다.
[edit routing-options] user@PE2# set static route 99.0.0.0/24 discard user@PE2# set static route 55.0.0.0/24 discard
-
OSPF, RIP 또는 IS-IS와 같은 IGP를 구성합니다.
[edit protocols ospf area 0.0.0.2] user@PE2# set interface 10.9.9.5 passive user@PE2# set interface 10.9.9.5 metric 1 user@PE2# set interface 10.100.1.5 passive user@PE2# set interface 10.100.1.5 metric 1 user@PE2# set interface fe-1/2/0.11 metric 1
-
라우터 ID 및 자율 시스템 번호를 구성합니다.
[edit routing-options] user@PE2# set router-id 10.9.9.5 user@PE2# set autonomous-system 7018
-
디바이스 구성을 완료하면 구성을 커밋합니다.
user@PE2# commit
결과
구성 모드에서 , show policy-options, show protocols및 show routing-options 명령을 show interfaces입력하여 구성을 확인합니다. 출력에 의도한 구성이 표시되지 않으면 이 예의 지침을 반복하여 구성을 수정합니다.
user@PE2# show interfaces
fe-1/2/0 {
unit 11 {
description PE2-to-PE4;
family inet {
address 10.0.0.22/30;
}
family mpls;
}
}
lo0 {
unit 9 {
family inet {
address 10.9.9.5/32 {
primary;
}
address 10.100.1.5/32;
}
}
}
user@PE2# show policy-options
policy-statement SET_EXPORT_ROUTES {
term 10 {
from protocol [ direct static bgp ];
then {
next-hop 10.100.1.5;
accept;
}
}
}
policy-statement aigp {
term 10 {
from {
route-filter 55.0.0.0/24 exact;
}
then {
aigp-originate distance 20;
next-hop 10.100.1.5;
accept;
}
}
term 20 {
from {
route-filter 99.0.0.0/24 exact;
}
then {
aigp-originate distance 30;
next-hop 10.100.1.5;
accept;
}
}
}
policy-statement next-hop {
term 10 {
from protocol bgp;
then {
next-hop 10.100.1.5;
accept;
}
}
term 20 {
from {
protocol direct;
route-filter 10.9.9.5/32 exact;
route-filter 10.100.1.5/32 exact;
}
then {
next-hop 10.100.1.5;
accept;
}
}
}
user@PE2# show protocols
rsvp {
interface fe-1/2/0.11;
}
mpls {
label-switched-path PE2-to-PE4 {
to 10.9.9.4;
}
interface fe-1/2/0.11;
}
bgp {
group external {
type external;
multihop {
ttl 2;
}
local-address 10.9.9.5;
family inet {
labeled-unicast {
aigp;
}
}
export [ next-hop aigp SET_EXPORT_ROUTES ];
vpn-apply-export;
peer-as 13979;
neighbor 10.9.9.4;
}
}
ospf {
area 0.0.0.2 {
interface 10.9.9.5 {
passive;
metric 1;
}
interface 10.100.1.5 {
passive;
metric 1;
}
interface fe-1/2/0.11 {
metric 1;
}
}
}
user@PE2# show routing-options
static {
route 99.0.0.0/24 discard;
route 55.0.0.0/24 discard;
}
router-id 10.9.9.5;
autonomous-system 7018;
디바이스 PE3 구성
단계별 절차
다음 예에서는 구성 계층에서 다양한 수준을 탐색해야 합니다. CLI 탐색에 대한 정보는 Junos OS CLI 사용자 가이드의 구성 모드에서 CLI 편집기 사용을 참조하십시오.
디바이스 PE3 구성:
-
인터페이스를 구성합니다.
[edit interfaces] user@PE3# set fe-1/2/0 unit 13 description PE3-to-PE4 user@PE3# set fe-1/2/0 unit 13 family inet address 10.0.0.26/30 user@PE3# set fe-1/2/0 unit 13 family mpls user@PE3# set lo0 unit 11 family inet address 10.9.9.6/32 user@PE3# set lo0 unit 11 family inet address 10.100.1.6/32
-
MPLS 및 신호 프로토콜(예: RSVP 또는 LDP)을 구성합니다.
[edit protocols] user@PE3# set rsvp interface fe-1/2/0.13 user@PE3# set mpls label-switched-path PE3-to-PE4 to 10.9.9.4 user@PE3# set mpls interface fe-1/2/0.13
-
BGP를 구성합니다.
[edit protocols bgp group external] user@PE3# set type external user@PE3# set multihop ttl 2 user@PE3# set local-address 10.9.9.6 user@PE3# set export next-hop user@PE3# set export SET_EXPORT_ROUTES user@PE3# set vpn-apply-export user@PE3# set peer-as 13979 user@PE3# set neighbor 10.9.9.4
-
AIGP를 활성화합니다.
[edit protocols bgp group external] user@PE3# set family inet labeled-unicast aigp
-
정책을 활성화합니다.
[edit policy-options] user@PE3# set policy-statement SET_EXPORT_ROUTES term 10 from protocol direct user@PE3# set policy-statement SET_EXPORT_ROUTES term 10 from protocol static user@PE3# set policy-statement SET_EXPORT_ROUTES term 10 from protocol bgp user@PE3# set policy-statement SET_EXPORT_ROUTES term 10 then next-hop 10.100.1.6 user@PE3# set policy-statement SET_EXPORT_ROUTES term 10 then accept user@PE3# set policy-statement next-hop term 10 from protocol bgp user@PE3# set policy-statement next-hop term 10 then next-hop 10.100.1.6 user@PE3# set policy-statement next-hop term 10 then accept user@PE3# set policy-statement next-hop term 20 from protocol direct user@PE3# set policy-statement next-hop term 20 from route-filter 10.9.9.6/32 exact user@PE3# set policy-statement next-hop term 20 from route-filter 10.100.1.6/32 exact user@PE3# set policy-statement next-hop term 20 then next-hop 10.100.1.6 user@PE3# set policy-statement next-hop term 20 then accept
-
OSPF, RIP 또는 IS-IS와 같은 IGP를 구성합니다.
[edit protocols ospf area 0.0.0.3] user@PE3# set interface 10.9.9.6 passive user@PE3# set interface 10.9.9.6 metric 1 user@PE3# set interface 10.100.1.6 passive user@PE3# set interface 10.100.1.6 metric 1 user@PE3# set interface fe-1/2/0.13 metric 1
-
라우터 ID 및 자율 시스템 번호를 구성합니다.
[edit routing-options] user@PE3# set router-id 10.9.9.6 user@PE3# set autonomous-system 7018
-
디바이스 구성을 완료하면 구성을 커밋합니다.
user@PE3# commit
결과
구성 모드에서 , show policy-options, show protocols및 show routing-options 명령을 show interfaces입력하여 구성을 확인합니다. 출력에 의도한 구성이 표시되지 않으면 이 예의 지침을 반복하여 구성을 수정합니다.
user@PE3# show interfaces
fe-1/2/0 {
unit 13 {
description PE3-to-PE4;
family inet {
address 10.0.0.26/30;
}
family mpls;
}
}
lo0 {
unit 11 {
family inet {
address 10.9.9.6/32;
address 10.100.1.6/32;
}
}
}
user@PE3# show policy-options
policy-statement SET_EXPORT_ROUTES {
term 10 {
from protocol [ direct static bgp ];
then {
next-hop 10.100.1.6;
accept;
}
}
}
policy-statement next-hop {
term 10 {
from protocol bgp;
then {
next-hop 10.100.1.6;
accept;
}
}
term 20 {
from {
protocol direct;
route-filter 10.9.9.6/32 exact;
route-filter 10.100.1.6/32 exact;
}
then {
next-hop 10.100.1.6;
accept;
}
}
}
user@PE3# show protocols
rsvp {
interface fe-1/2/0.13;
}
mpls {
label-switched-path PE3-to-PE4 {
to 10.9.9.4;
}
interface fe-1/2/0.13;
}
bgp {
group external {
type external;
multihop {
ttl 2;
}
local-address 10.9.9.6;
family inet {
labeled-unicast {
aigp;
}
}
export [ next-hop SET_EXPORT_ROUTES ];
vpn-apply-export;
peer-as 13979;
neighbor 10.9.9.4;
}
}
ospf {
area 0.0.0.3 {
interface 10.9.9.6 {
passive;
metric 1;
}
interface 10.100.1.6 {
passive;
metric 1;
}
interface fe-1/2/0.13 {
metric 1;
}
}
}
user@PE3# show routing-options router-id 10.9.9.6; autonomous-system 7018;
디바이스 PE7 구성
단계별 절차
다음 예에서는 구성 계층에서 다양한 수준을 탐색해야 합니다. CLI 탐색에 대한 정보는 Junos OS CLI 사용자 가이드의 구성 모드에서 CLI 편집기 사용을 참조하십시오.
디바이스 PE7 구성:
-
인터페이스를 구성합니다.
[edit interfaces] user@PE7# set fe-1/2/0 unit 15 description PE7-to-PE1 user@PE7# set fe-1/2/0 unit 15 family inet address 10.0.0.10/30 user@PE7# set lo0 unit 13 family inet address 10.9.9.7/32 user@PE7# set lo0 unit 13 family inet address 10.100.1.7/32
-
BGP를 구성합니다.
[edit protocols bgp group external] user@PE7# set type external user@PE7# set export SET_EXPORT_ROUTES user@PE7# set peer-as 13979 user@PE7# set neighbor 10.0.0.9
-
AIGP를 활성화합니다.
[edit protocols bgp group external] user@PE7# set family inet labeled-unicast aigp
-
라우팅 정책 구성합니다.
[edit policy-options policy-statement SET_EXPORT_ROUTES term 10] user@PE7# set from protocol direct user@PE7# set from protocol bgp user@PE7# set then next-hop 10.100.1.7 user@PE7# set then accept
-
라우터 ID 및 자율 시스템 번호를 구성합니다.
[edit routing-options] user@PE7# set router-id 10.9.9.7 user@PE7# set autonomous-system 7019
-
디바이스 구성을 완료하면 구성을 커밋합니다.
user@PE7# commit
결과
구성 모드에서 , show policy-options, show protocols및 show routing-options 명령을 show interfaces입력하여 구성을 확인합니다. 출력에 의도한 구성이 표시되지 않으면 이 예의 지침을 반복하여 구성을 수정합니다.
user@PE7# show interfaces
interfaces {
fe-1/2/0 {
unit 15 {
description PE7-to-PE1;
family inet {
address 10.0.0.10/30;
}
}
}
lo0 {
unit 13 {
family inet {
address 10.9.9.7/32;
address 10.100.1.7/32;
}
}
}
}
user@PE7# show policy-options
policy-statement SET_EXPORT_ROUTES {
term 10 {
from protocol [ direct bgp ];
then {
next-hop 10.100.1.7;
accept;
}
}
}
user@PE7# show protocols
bgp {
group external {
type external;
family inet {
labeled-unicast {
aigp;
}
}
export SET_EXPORT_ROUTES;
peer-as 13979;
neighbor 10.0.0.9;
}
}
user@PE7# show routing-options router-id 10.9.9.7; autonomous-system 7019;
검증
구성이 제대로 작동하고 있는지 확인합니다.
- 디바이스 PE4가 EBGP 인접 라우터 PE2로부터 AIGP 속성을 수신하는지 확인
- IGP 메트릭 확인
- 디바이스 PE4가 AIGP 속성에 IGP 메트릭을 추가하는지 확인
- 디바이스 PE7이 EBGP 인접 라우터 PE1로부터 AIGP 속성을 수신하는지 확인
- AIGP 메트릭 확인
- BGP 업데이트에서 AIGP 속성의 존재 확인
디바이스 PE4가 EBGP 인접 라우터 PE2로부터 AIGP 속성을 수신하는지 확인
목적
디바이스 PE2의 AIGP 정책이 작동하는지 확인합니다.
작업
user@PE4> show route receive-protocol bgp 10.9.9.5 extensive
* 55.0.0.0/24 (1 entry, 1 announced)
Accepted
Route Label: 299888
Nexthop: 10.100.1.5
AS path: 7018 I
AIGP: 20
* 99.0.0.0/24 (1 entry, 1 announced)
Accepted
Route Label: 299888
Nexthop: 10.100.1.5
AS path: 7018 I
AIGP: 30
의미
디바이스 PE2 aigp-originate 에서 문은 20(aigp-originate distance 20)의 거리로 구성됩니다. 이 문은 경로 55.0.0.0/24에 적용됩니다. 마찬가지로 이 aigp-originate distance 30 문은 경로 99.0.0.0/24에 적용됩니다. 따라서 디바이스 PE4가 이러한 경로를 수신하면 AIGP 속성이 구성된 메트릭과 함께 연결됩니다.
IGP 메트릭 확인
목적
디바이스 PE4에서 BGP 다음 홉 10.100.1.5에 대한 IGP 메트릭을 확인합니다.
작업
user@PE4> show route 10.100.1.5
inet.0: 30 destinations, 40 routes (30 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.100.1.5/32 *[OSPF/10] 05:35:50, metric 2
> to 10.0.0.22 via fe-1/2/2.10
[BGP/170] 03:45:07, localpref 100, from 10.9.9.5
AS path: 7018 I
> to 10.0.0.22 via fe-1/2/2.10
의미
이 경로에 대한 IGP 메트릭은 2입니다.
디바이스 PE4가 AIGP 속성에 IGP 메트릭을 추가하는지 확인
목적
디바이스 PE4가 IBGP 인접 디바이스인 디바이스 PE1에 대한 경로를 다시 보급할 때 AIGP 속성에 IGP 메트릭을 추가하는지 확인합니다.
작업
user@PE4> show route advertising-protocol bgp 10.9.9.1 extensive
* 55.0.0.0/24 (1 entry, 1 announced)
BGP group internal type Internal
Route Label: 300544
Nexthop: 10.100.1.4
Flags: Nexthop Change
Localpref: 100
AS path: [13979] 7018 I
AIGP: 22
* 99.0.0.0/24 (1 entry, 1 announced)
BGP group internal type Internal
Route Label: 300544
Nexthop: 10.100.1.4
Flags: Nexthop Change
Localpref: 100
AS path: [13979] 7018 I
AIGP: 32
의미
이러한 경로에 대한 다음 홉이 변경되기 때문에 IGP 메트릭은 AIGP 메트릭(20 + 2 = 22 및 30 + 2 = 32)에 추가됩니다.
디바이스 PE7이 EBGP 인접 라우터 PE1로부터 AIGP 속성을 수신하는지 확인
목적
디바이스 PE1의 AIGP 정책이 작동하는지 확인합니다.
작업
user@PE7> show route receive-protocol bgp 10.0.0.9 extensive
* 44.0.0.0/24 (1 entry, 1 announced)
Accepted
Route Label: 300096
Nexthop: 10.0.0.9
AS path: 13979 I
AIGP: 203
* 55.0.0.0/24 (1 entry, 1 announced)
Accepted
Route Label: 300112
Nexthop: 10.0.0.9
AS path: 13979 7018 I
AIGP: 25
* 99.0.0.0/24 (1 entry, 1 announced)
Accepted
Route Label: 300112
Nexthop: 10.0.0.9
AS path: 13979 7018 I
AIGP: 35
의미
44.0.0.0/24 경로는 디바이스 PE4에서 시작됩니다. 55.0.0.0/24 및 99.0.0.0/24 경로는 디바이스 PE2에서 시작됩니다. 구성된 AIGP 거리에 IGP 거리가 추가됩니다.
AIGP 메트릭 확인
목적
접두사가 재귀를 통해 해결되고 재귀 다음 홉에 AIGP 메트릭이 있는 경우, 접두사에는 재귀 BGP 다음 홉에 있는 AIGP 값의 합이 있는지 확인합니다.
작업
-
66.0.0.0/24에 정적 경로를 추가합니다.
[edit routing-options] user@PE2# set static route 66.0.0.0/24 discard
-
디바이스 PE2의 정책 문에서
aigp기존 용어를 삭제합니다.[edit policy-options policy-statement aigp] user@PE2# delete term 10 user@PE2# delete term 20
-
66.0.0.0에 대한 경로에 대한 재귀 경로 조회를 구성합니다.
이 정책은 접두사 66.0.0.0/24(없음)와 해당 재귀 다음 홉에 대한 AIGP 메트릭을 표시합니다. 접두사 66.0.0.0/24는 55.0.0.1로 해결됩니다. 접두사 66.0.0.0/24에는 생성되는 자체 AIGP 메트릭이 없지만 재귀 다음 홉인 55.0.0.1에는 AIGP 값이 있습니다.
[edit policy-options policy-statement aigp] user@PE2# set term 10 from route-filter 55.0.0.1/24 exact user@PE2# set term 10 then aigp-originate distance 20 user@PE2# set term 10 then next-hop 10.100.1.5 user@PE2# set term 10 then accept user@PE2# set term 20 from route-filter 66.0.0.0/24 exact user@PE2# set term 20 then next-hop 55.0.0.1 user@PE2# set term 20 then accept
-
디바이스 PE4에서 명령을 실행합니다
show route 55.0.0.0 extensive.Metric2의 값은 BGP 다음 홉에 대한 IGP 메트릭입니다. 디바이스 PE4가 이러한 경로를 IBGP 피어인 디바이스 PE1에 재보급할 때, AIGP 메트릭은 AIGP + AIGP 해결 메트릭 + 메트릭2의 합계입니다.
접두사 55.0.0.0은 디바이스 PE2에 의해 정의 및 보급된 자체 IGP 메트릭 20을 보여줍니다. 재귀 BGP 다음 홉이 없기 때문에 확인 AIGP 값을 표시하지 않습니다. Metric2의 값은 2입니다.
user@PE4> show route 55.0.0.0 extensive inet.0: 31 destinations, 41 routes (31 active, 0 holddown, 0 hidden) 55.0.0.0/24 (1 entry, 1 announced) TSI: KRT in-kernel 55.0.0.0/24 -> {indirect(262151)} Page 0 idx 0 Type 1 val 928d1b8 Flags: Nexthop Change Nexthop: 10.100.1.4 Localpref: 100 AS path: [13979] 7018 I Communities: AIGP: 22 Path 55.0.0.0 from 10.9.9.5 Vector len 4. Val: 0 *BGP Preference: 170/-101 Next hop type: Indirect Address: 0x925da38 Next-hop reference count: 4 Source: 10.9.9.5 Next hop type: Router, Next hop index: 1004 Next hop: 10.0.0.22 via fe-1/2/2.10, selected Label operation: Push 299888 Label TTL action: prop-ttl Protocol next hop: 10.100.1.5 Push 299888 Indirect next hop: 93514d8 262151 State: <Active Ext> Local AS: 13979 Peer AS: 7018 Age: 22:03:26 Metric2: 2 AIGP: 20 Task: BGP_7018.10.9.9.5+58560 Announcement bits (3): 3-KRT 4-BGP_RT_Background 5-Resolve tree 1 AS path: 7018 I Accepted Route Label: 299888 Localpref: 100 Router ID: 10.9.9.5 Indirect next hops: 1 Protocol next hop: 10.100.1.5 Metric: 2 Push 299888 Indirect next hop: 93514d8 262151 Indirect path forwarding next hops: 1 Next hop type: Router Next hop: 10.0.0.22 via fe-1/2/2.10 10.100.1.5/32 Originating RIB: inet.0 Metric: 2 Node path count: 1 Forwarding nexthops: 1 Nexthop: 10.0.0.22 via fe-1/2/2.10 -
디바이스 PE4에서 명령을 실행합니다
show route 66.0.0.0 extensive.접두사 66.0.0.0/24는 자체 AIGP 메트릭과 재귀 BGP 다음 홉의 합계인 해결 AIGP를 보여줍니다.
66.0.0.1 = 0, 55.0.0.1 = 20, 0+20 = 20
user@PE4> show route 66.0.0.0 extensive inet.0: 31 destinations, 41 routes (31 active, 0 holddown, 0 hidden) 66.0.0.0/24 (1 entry, 1 announced) TSI: KRT in-kernel 66.0.0.0/24 -> {indirect(262162)} Page 0 idx 0 Type 1 val 928cefc Flags: Nexthop Change Nexthop: 10.100.1.4 Localpref: 100 AS path: [13979] 7018 I Communities: Path 66.0.0.0 from 10.9.9.5 Vector len 4. Val: 0 *BGP Preference: 170/-101 Next hop type: Indirect Address: 0x925d4e0 Next-hop reference count: 4 Source: 10.9.9.5 Next hop type: Router, Next hop index: 1006 Next hop: 10.0.0.22 via fe-1/2/2.10, selected Label operation: Push 299888, Push 299888(top) Label TTL action: prop-ttl, prop-ttl(top) Protocol next hop: 55.0.0.1 Push 299888 Indirect next hop: 9353e88 262162 State: <Active Ext> Local AS: 13979 Peer AS: 7018 Age: 31:42 Metric2: 2 Resolving-AIGP: 20 Task: BGP_7018.10.9.9.5+58560 Announcement bits (3): 3-KRT 4-BGP_RT_Background 5-Resolve tree 1 AS path: 7018 I Accepted Route Label: 299888 Localpref: 100 Router ID: 10.9.9.5 Indirect next hops: 1 Protocol next hop: 55.0.0.1 Metric: 2 AIGP: 20 Push 299888 Indirect next hop: 9353e88 262162 Indirect path forwarding next hops: 1 Next hop type: Router Next hop: 10.0.0.22 via fe-1/2/2.10 55.0.0.0/24 Originating RIB: inet.0 Metric: 2 Node path count: 1 Indirect nexthops: 1 Protocol Nexthop: 10.100.1.5 Metric: 2 Push 299888 Indirect nexthop: 93514d8 262151 Indirect path forwarding nexthops: 1 Nexthop: 10.0.0.22 via fe-1/2/2.10 10.100.1.5/32 Originating RIB: inet.0 Metric: 2 Node path count: 1 Forwarding nexthops: 1 Nexthop: 10.0.0.22 via fe-1/2/2.10
BGP 업데이트에서 AIGP 속성의 존재 확인
목적
AIGP 속성이 BGP(또는 group OR neighbor 계층)에서 활성화되지 않은 경우, AIGP 속성은 자동으로 삭제됩니다. 구성 옵션에 detail 플래그를 packets 활성화 traceoptions 하고 포함시켜 전송 또는 수신된 BGP 업데이트에서 AIGP 속성의 존재를 확인합니다. 이는 AIGP 문제를 디버깅할 때 유용합니다.
작업
-
에 대한 디바이스 PE2 및 디바이스 PE4를 구성합니다.traceoptions
user@host> show protocols bgp traceoptions { file bgp size 1m files 5; flag packets detail; } -
디바이스 PE2에서 파일을 확인합니다 traceoptions .
다음 샘플은 AIGP 메트릭 20으로 디바이스 PE4(10.9.9.4)에 접두사 99.0.0.0/24를 보급하는 디바이스 PE2를 보여줍니다.
user@PE2> show log bgp Mar 22 09:27:18.982150 BGP SEND 10.9.9.5+49652 -> 10.9.9.4+179 Mar 22 09:27:18.982178 BGP SEND message type 2 (Update) length 70 Mar 22 09:27:18.982198 BGP SEND Update PDU length 70 Mar 22 09:27:18.982248 BGP SEND flags 0x40 code Origin(1): IGP Mar 22 09:27:18.982273 BGP SEND flags 0x40 code ASPath(2) length 6: 7018 Mar 22 09:27:18.982295 BGP SEND flags 0x80 code AIGP(26): AIGP: 20 Mar 22 09:27:18.982316 BGP SEND flags 0x90 code MP_reach(14): AFI/SAFI 1/4 Mar 22 09:27:18.982341 BGP SEND nhop 10.100.1.5 len 4 Mar 22 09:27:18.982372 BGP SEND 99.0.0.0/24 (label 301664) Mar 22 09:27:33.665412 bgp_send: sending 19 bytes to abcd::10:255:170:84 (External AS 13979)
-
명령을 사용하여 show route receive-protocol 디바이스 PE4에서 경로가 수신되었는지 확인합니다.
AIGP는 디바이스 PE4에서 활성화되지 않으므로 AIGP 속성은 접두사 99.0.0.0/24에 대해 자동으로 삭제되고 다음 출력에 나타나지 않습니다.
user@PE4> show route receive-protocol bgp 10.9.9.5 extensive | find 55.0.0.0 * 99.0.0.0/24 (2 entries, 1 announced) Accepted Route Label: 301728 Nexthop: 10.100.1.5 AS path: 7018 I -
디바이스 PE4에서 파일을 확인합니다 traceoptions .
로그의 traceoptions 다음 출력은 AIGP 속성이 첨부된 99.0.0.0/24 접두사가 수신되었음을 보여줍니다.
user@PE4> show log bgp Mar 22 09:41:39.650295 BGP RECV 10.9.9.5+64690 -> 10.9.9.4+179 Mar 22 09:41:39.650331 BGP RECV message type 2 (Update) length 70 Mar 22 09:41:39.650350 BGP RECV Update PDU length 70 Mar 22 09:41:39.650370 BGP RECV flags 0x40 code Origin(1): IGP Mar 22 09:41:39.650394 BGP RECV flags 0x40 code ASPath(2) length 6: 7018 Mar 22 09:41:39.650415 BGP RECV flags 0x80 code AIGP(26): AIGP: 20 Mar 22 09:41:39.650436 BGP RECV flags 0x90 code MP_reach(14): AFI/SAFI 1/4 Mar 22 09:41:39.650459 BGP RECV nhop 10.100.1.5 len 4 Mar 22 09:41:39.650495 BGP RECV 99.0.0.0/24 (label 301728) Mar 22 09:41:39.650574 bgp_rcv_nlri: 99.0.0.0/24 Mar 22 09:41:39.650607 bgp_rcv_nlri: 99.0.0.0/24 belongs to meshgroup Mar 22 09:41:39.650629 bgp_rcv_nlri: 99.0.0.0/24 qualified bnp->ribact 0x0 l2afcb 0x0
의미
이 검증을 수행하면 AIGP 문제 해결 및 디버깅 문제에 도움이 됩니다. 이를 통해 네트워크에서 AIGP 속성을 보내고 받는 디바이스를 확인할 수 있습니다.
AS 재정의 이해하기
AS 재정의 기능을 사용하면 프로바이더 에지(PE) 라우터가 VPN 라우팅 및 포워딩(VRF) 액세스 링크에서 실행되는 외부 BGP(EBGP) 세션에서 고객 에지(CE) 디바이스가 사용하는 AS(Private Autonomous System) 번호를 변경할 수 있습니다. 프라이빗 AS 번호가 PE AS 번호로 변경됩니다. 다른 PE 디바이스에 연결된 다른 CE 디바이스는 provider-ASN site1-ASN 대신 provider-ASN provider-ASN의 AS 경로를 가진 첫 번째 사이트에서 오는 EBGP 경로를 확인합니다. 이를 통해 엔터프라이즈 네트워크는 모든 사이트에서 동일한 프라이빗 ASN을 사용할 수 있습니다.
BGP는 기본적으로 로컬 AS 번호를 포함하는 AS 경로 속성이 있는 BGP 경로를 허용하지 않기 때문에 AS 재정의 기능은 서비스 프로바이더에게 명확한 관리 이점을 제공합니다.
여러 사이트가 있는 엔터프라이즈 네트워크에서는 여러 사이트에 걸쳐 단일 AS 번호를 사용하길 원할 수 있습니다. 예를 들어, 두 개의 CE 디바이스가 AS 64512에 있고 프로바이더 네트워크가 AS 65534에 있다고 가정해봅시다.
서비스 프로바이더가 이러한 설정으로 레이어 3 VPN을 구성할 때, MPLS 네트워크에 디바이스 CE1 및 디바이스 CE2로 향하는 경로가 있더라도 AS 경로 속성이 64512 65534 64512로 나타나기 때문에 디바이스 CE1과 디바이스 CE2는 서로 경로가 없습니다. BGP는 루프 방지 메커니즘으로 AS 경로 속성을 사용합니다. 사이트가 AS 경로에서 자체 AS 번호를 두 번 이상 보게 되면 경로가 잘못된 것으로 간주됩니다.
이러한 어려움을 극복하는 한 가지 방법은 PE 장치에 적용되는 명령문을 사용하는 as-override 것입니다. as-override 이 문은 CE 디바이스의 AS 번호를 PE 디바이스의 AS 번호로 대체하므로 고객 AS 번호가 AS 경로 속성에 두 번 이상 나타나지 않습니다.
고객이 특정 경로를 덜 바람직하게 만들기 위해 AS 경로 앞에 추가를 사용하고 서비스 프로바이더가 AS 재정의를 사용하는 경우, AS 경로의 각 CE AS 번호 발생은 서비스 프로바이더 AS 번호로 변경됩니다. 예를 들어, 모든 고객 사이트에서 동일한 AS 번호(예: 64512)를 사용한다고 가정해 보겠습니다. ISP가 AS 번호 65534를 사용하는 경우, 한 고객 사이트는 다른 사이트에 대한 경로를 65534 65534로 간주합니다. 고객이 특정 경로 앞에 64512를 추가하여 덜 바람직하게 만들면 다른 고객 사이트에서는 해당 경로를 65534 65534 65534로 간주합니다.
또한보십시오
예: 경로 리플렉션 및 AS 재정의를 사용하여 레이어 3 VPN 구성
매니지드 MPLS 기반 레이어 3 VPN 서비스를 제공하는 서비스 프로바이더라고 가정해 보겠습니다. 고객은 여러 사이트를 보유하고 있으며 각 사이트의 고객 에지(CE) 디바이스에 대한 BGP 라우팅이 필요합니다.
요구 사항
이 예제를 구성하기 전에 디바이스 초기화 이외의 특별한 구성은 필요하지 않습니다.
개요
이 예에는 2개의 CE 디바이스, 2개의 프로바이더 에지(PE) 디바이스 및 여러 개의 프로바이더 코어 디바이스가 있습니다. 또한 프로바이더 네트워크는 IS-IS를 사용하여 LDP 및 BGP 루프백 도달 가능성을 지원합니다. 디바이스 P2는 경로 리플렉터(RR) 역할을 합니다. 두 CE 디바이스 모두 AS(Autonomous System) 64512에 있습니다. 프로바이더 네트워크는 AS 65534에 있습니다.
명령문은 as-override PE 디바이스에 적용되므로 CE 디바이스의 AS 번호가 PE 디바이스의 AS 번호로 대체됩니다. 이렇게 하면 고객 AS 번호가 AS 경로 속성에 두 번 이상 나타나는 것을 방지할 수 있습니다.
그림 5 는 이 예에서 사용되는 토폴로지를 보여줍니다.
CLI 빠른 구성 은 그림 5의 모든 디바이스에 대한 구성을 보여줍니다. 단계별 절차 섹션에서는 디바이스 PE1의 단계를 설명합니다.
토폴로지
구성
절차
CLI 빠른 구성
이 예를 빠르게 구성하려면, 아래 명령을 복사하여 텍스트 파일로 붙여 넣은 다음 모든 라인브레이크를 제거하고, 네트워크 구성을 일치하는 데 필요한 세부 사항을 변경한 다음, 계층 수준에서 [edit] 명령을 복사하여 CLI에 붙여 넣습니다.
디바이스 CE1
set interfaces ge-1/2/0 unit 0 family inet address 10.0.0.1/30 set interfaces ge-1/2/0 unit 0 family iso set interfaces lo0 unit 0 family inet address 10.255.1.1/32 set interfaces lo0 unit 0 family iso address 49.0001.0010.0000.0101.00 set protocols bgp group PE type external set protocols bgp group PE family inet unicast set protocols bgp group PE export ToBGP set protocols bgp group PE peer-as 65534 set protocols bgp group PE neighbor 10.0.0.2 set policy-options policy-statement ToBGP term Direct from protocol direct set policy-options policy-statement ToBGP term Direct then accept set routing-options router-id 10.255.1.1 set routing-options autonomous-system 64512
디바이스 P1
set interfaces ge-1/2/0 unit 0 family inet address 10.0.0.6/30 set interfaces ge-1/2/0 unit 0 family iso set interfaces ge-1/2/0 unit 0 family mpls set interfaces ge-1/2/1 unit 0 family inet address 10.0.0.9/30 set interfaces ge-1/2/1 unit 0 family iso set interfaces ge-1/2/1 unit 0 family mpls set interfaces ge-1/2/2 unit 0 family inet address 10.0.0.25/30 set interfaces ge-1/2/2 unit 0 family iso set interfaces ge-1/2/2 unit 0 family mpls set interfaces lo0 unit 0 family inet address 10.255.3.3/32 set interfaces lo0 unit 0 family iso address 49.0001.0010.0000.0303.00 set protocols mpls interface all set protocols mpls interface fxp0.0 disable set protocols bgp group l3vpn type internal set protocols bgp group l3vpn local-address 10.255.3.3 set protocols bgp group l3vpn family inet-vpn unicast set protocols bgp group l3vpn peer-as 65534 set protocols bgp group l3vpn local-as 65534 set protocols bgp group l3vpn neighbor 10.255.4.4 set protocols isis interface all level 2 metric 10 set protocols isis interface all level 1 disable set protocols isis interface fxp0.0 disable set protocols isis interface lo0.0 level 2 metric 0 set protocols ldp deaggregate set protocols ldp interface all set protocols ldp interface fxp0.0 disable set routing-options router-id 10.255.3.3
디바이스 P2
set interfaces ge-1/2/0 unit 0 family inet address 10.0.0.10/30 set interfaces ge-1/2/0 unit 0 family iso set interfaces ge-1/2/0 unit 0 family mpls set interfaces ge-1/2/1 unit 0 family inet address 10.0.0.13/30 set interfaces ge-1/2/1 unit 0 family iso set interfaces ge-1/2/1 unit 0 family mpls set interfaces lo0 unit 0 family inet address 10.255.4.4/32 set interfaces lo0 unit 0 family iso address 49.0001.0010.0000.0404.00 set protocols mpls interface all set protocols mpls interface fxp0.0 disable set protocols bgp group Core-RRClients type internal set protocols bgp group Core-RRClients local-address 10.255.4.4 set protocols bgp group Core-RRClients family inet-vpn unicast set protocols bgp group Core-RRClients cluster 10.255.4.4 set protocols bgp group Core-RRClients peer-as 65534 set protocols bgp group Core-RRClients neighbor 10.255.3.3 set protocols bgp group Core-RRClients neighbor 10.255.7.7 set protocols bgp group Core-RRClients neighbor 10.255.2.2 set protocols bgp group Core-RRClients neighbor 10.255.5.5 set protocols isis interface all level 2 metric 10 set protocols isis interface all level 1 disable set protocols isis interface fxp0.0 disable set protocols isis interface lo0.0 level 2 metric 0 set protocols ldp deaggregate set protocols ldp interface all set protocols ldp interface fxp0.0 disable set routing-options router-id 10.255.4.4 set routing-options autonomous-system 65534
디바이스 P3
set interfaces ge-1/2/0 unit 0 family inet address 10.0.0.22/30 set interfaces ge-1/2/0 unit 0 family iso set interfaces ge-1/2/0 unit 0 family mpls set interfaces ge-1/2/1 unit 0 family inet address 10.0.0.26/30 set interfaces ge-1/2/1 unit 0 family iso set interfaces ge-1/2/1 unit 0 family mpls set interfaces ge-1/2/2 unit 0 family inet address 10.0.0.30/30 set interfaces ge-1/2/2 unit 0 family iso set interfaces ge-1/2/2 unit 0 family mpls set interfaces lo0 unit 0 family inet address 10.255.7.7/32 set interfaces lo0 unit 0 family iso address 49.0001.0010.0000.0707.00 set protocols mpls interface all set protocols mpls interface fxp0.0 disable set protocols bgp group l3vpn type internal set protocols bgp group l3vpn local-address 10.255.7.7 set protocols bgp group l3vpn family inet-vpn unicast set protocols bgp group l3vpn peer-as 65534 set protocols bgp group l3vpn local-as 65534 set protocols bgp group l3vpn neighbor 10.255.4.4 set protocols isis interface all level 2 metric 10 set protocols isis interface all level 1 disable set protocols isis interface fxp0.0 disable set protocols isis interface lo0.0 level 2 metric 0 set protocols ldp deaggregate set protocols ldp interface all set protocols ldp interface fxp0.0 disable set routing-options router-id 10.255.7.7
디바이스 PE1
set interfaces ge-1/2/0 unit 0 family inet address 10.0.0.2/30 set interfaces ge-1/2/0 unit 0 family iso set interfaces ge-1/2/0 unit 0 family mpls set interfaces ge-1/2/1 unit 0 family inet address 10.0.0.5/30 set interfaces ge-1/2/1 unit 0 family iso set interfaces ge-1/2/1 unit 0 family mpls set interfaces ge-1/2/2 unit 0 family inet address 10.0.0.21/30 set interfaces ge-1/2/2 unit 0 family iso set interfaces ge-1/2/2 unit 0 family mpls set interfaces lo0 unit 0 family inet address 10.255.2.2/32 set interfaces lo0 unit 0 family iso address 49.0001.0010.0000.0202.00 set protocols mpls interface ge-1/2/2.0 set protocols mpls interface ge-1/2/1.0 set protocols mpls interface lo0.0 set protocols mpls interface fxp0.0 disable set protocols bgp group l3vpn type internal set protocols bgp group l3vpn local-address 10.255.2.2 set protocols bgp group l3vpn family inet-vpn unicast set protocols bgp group l3vpn peer-as 65534 set protocols bgp group l3vpn local-as 65534 set protocols bgp group l3vpn neighbor 10.255.4.4 set protocols isis interface ge-1/2/1.0 level 2 metric 10 set protocols isis interface ge-1/2/1.0 level 1 disable set protocols isis interface ge-1/2/2.0 level 2 metric 10 set protocols isis interface ge-1/2/2.0 level 1 disable set protocols isis interface fxp0.0 disable set protocols isis interface lo0.0 level 2 metric 0 set protocols ldp deaggregate set protocols ldp interface ge-1/2/1.0 set protocols ldp interface ge-1/2/2.0 set protocols ldp interface fxp0.0 disable set protocols ldp interface lo0.0 set routing-instances VPN-A instance-type vrf set routing-instances VPN-A interface ge-1/2/0.0 set routing-instances VPN-A route-distinguisher 65534:1234 set routing-instances VPN-A vrf-target target:65534:1234 set routing-instances VPN-A protocols bgp group CE type external set routing-instances VPN-A protocols bgp group CE family inet unicast set routing-instances VPN-A protocols bgp group CE neighbor 10.0.0.1 peer-as 64512 set routing-instances VPN-A protocols bgp group CE neighbor 10.0.0.1 as-override set routing-options router-id 10.255.2.2 set routing-options autonomous-system 65534
디바이스 PE2
set interfaces ge-1/2/0 unit 0 family inet address 10.0.0.14/30 set interfaces ge-1/2/0 unit 0 family iso set interfaces ge-1/2/0 unit 0 family mpls set interfaces ge-1/2/1 unit 0 family inet address 10.0.0.17/30 set interfaces ge-1/2/1 unit 0 family iso set interfaces ge-1/2/2 unit 0 family inet address 10.0.0.29/30 set interfaces ge-1/2/2 unit 0 family iso set interfaces ge-1/2/2 unit 0 family mpls set interfaces lo0 unit 0 family inet address 10.255.5.5/32 set interfaces lo0 unit 0 family iso address 49.0001.0010.0000.0505.00 set protocols mpls interface ge-1/2/0.0 set protocols mpls interface ge-1/2/2.0 set protocols mpls interface lo0.0 set protocols mpls interface fxp0.0 disable set protocols bgp group l3vpn type internal set protocols bgp group l3vpn local-address 10.255.5.5 set protocols bgp group l3vpn family inet-vpn unicast set protocols bgp group l3vpn peer-as 65534 set protocols bgp group l3vpn local-as 65534 set protocols bgp group l3vpn neighbor 10.255.4.4 set protocols isis interface ge-1/2/0.0 level 2 metric 10 set protocols isis interface ge-1/2/0.0 level 1 disable set protocols isis interface ge-1/2/2.0 level 2 metric 10 set protocols isis interface ge-1/2/2.0 level 1 disable set protocols isis interface fxp0.0 disable set protocols isis interface lo0.0 level 2 metric 0 set protocols ldp deaggregate set protocols ldp interface ge-1/2/0.0 set protocols ldp interface ge-1/2/2.0 set protocols ldp interface fxp0.0 disable set protocols ldp interface lo0.0 set routing-instances VPN-A instance-type vrf set routing-instances VPN-A interface ge-1/2/1.0 set routing-instances VPN-A route-distinguisher 65534:1234 set routing-instances VPN-A vrf-target target:65534:1234 set routing-instances VPN-A protocols bgp group CE type external set routing-instances VPN-A protocols bgp group CE family inet unicast set routing-instances VPN-A protocols bgp group CE neighbor 10.0.0.18 peer-as 64512 set routing-instances VPN-A protocols bgp group CE neighbor 10.0.0.18 as-override set routing-options router-id 10.255.5.5 set routing-options autonomous-system 65534
디바이스 CE2
set interfaces ge-1/2/0 unit 0 family inet address 10.0.0.18/30 set interfaces ge-1/2/0 unit 0 family iso set interfaces lo0 unit 0 family inet address 10.255.6.6/32 set interfaces lo0 unit 0 family iso address 49.0001.0010.0000.0606.00 set protocols bgp group PE type external set protocols bgp group PE family inet unicast set protocols bgp group PE export ToBGP set protocols bgp group PE peer-as 65534 set protocols bgp group PE neighbor 10.0.0.17 set policy-options policy-statement ToBGP term Direct from protocol direct set policy-options policy-statement ToBGP term Direct then accept set routing-options router-id 10.255.6.6 set routing-options autonomous-system 64512
단계별 절차
다음 예에서는 구성 계층에서 다양한 수준을 탐색해야 합니다. CLI 탐색에 대한 정보는 CLI 사용자 가이드의 구성 모드에서 CLI 편집기 사용을 참조하십시오.
AS 재정의를 구성하려면 다음을 수행합니다.
-
인터페이스를 구성합니다.
MPLS를 활성화하려면 인터페이스가 들어오는 MPLS 트래픽을 삭제하지 않도록 인터페이스에 프로토콜 family를 포함합니다.
[edit interfaces] user@PE1# set ge-1/2/0 unit 0 family inet address 10.0.0.2/30 user@PE1# set ge-1/2/0 unit 0 family iso user@PE1# set ge-1/2/0 unit 0 family mpls user@PE1# set ge-1/2/1 unit 0 family inet address 10.0.0.5/30 user@PE1# set ge-1/2/1 unit 0 family iso user@PE1# set ge-1/2/1 unit 0 family mpls user@PE1# set ge-1/2/2 unit 0 family inet address 10.0.0.21/30 user@PE1# set ge-1/2/2 unit 0 family iso user@PE1# set ge-1/2/2 unit 0 family mpls user@PE1# set lo0 unit 0 family inet address 10.255.2.2/32 user@PE1# set lo0 unit 0 family iso address 49.0001.0010.0000.0202.00
-
MPLS 프로토콜에 인터페이스를 추가하여 컨트롤 플레인 수준 연결을 설정합니다.
프로바이더 디바이스가 서로 통신할 수 있도록 IGP를 설정합니다.
MPLS 레이블을 배포하는 메커니즘을 설정하려면 LDP를 활성화합니다. 선택적으로 LDP의 경우 FEC(Forwarding Equivalence Class) 격리를 활성화하면 글로벌 컨버전스 속도가 빨라집니다.
[edit protocols] user@PE1# set mpls interface ge-1/2/2.0 user@PE1# set mpls interface ge-1/2/1.0 user@PE1# set mpls interface lo0.0 user@PE1# set mpls interface fxp0.0 disable user@PE1# set isis interface ge-1/2/1.0 level 2 metric 10 user@PE1# set isis interface ge-1/2/1.0 level 1 disable user@PE1# set isis interface ge-1/2/2.0 level 2 metric 10 user@PE1# set isis interface ge-1/2/2.0 level 1 disable user@PE1# set isis interface fxp0.0 disable user@PE1# set isis interface lo0.0 level 2 metric 0 user@PE1# set ldp deaggregate user@PE1# set ldp interface ge-1/2/1.0 user@PE1# set ldp interface ge-1/2/2.0 user@PE1# set ldp interface fxp0.0 disable user@PE1# set ldp interface lo0.0
-
IPv4 VPN 유니캐스트 주소 패밀리를 사용하여 내부 BGP(IBGP) 연결을 활성화하여 RR과만 피어링합니다.
[edit protocols bgp group l3vpn] user@PE1# set type internal user@PE1# set local-address 10.255.2.2 user@PE1# set family inet-vpn unicast user@PE1# set peer-as 65534 user@PE1# set local-as 65534 user@PE1# set neighbor 10.255.4.4
-
문을 포함하여 라우팅 인스턴스를 구성합니다.
as-overridePE 디바이스에 라우팅 인스턴스(VRF)를 생성하고 디바이스 CE1과 피어링하도록 BGP 구성을 설정합니다.
[edit routing-instances VPN-A] user@PE1# set instance-type vrf user@PE1# set interface ge-1/2/0.0 user@PE1# set route-distinguisher 65534:1234 user@PE1# set vrf-target target:65534:1234 user@PE1# set protocols bgp group CE type external user@PE1# set protocols bgp group CE family inet unicast user@PE1# set protocols bgp group CE neighbor 10.0.0.1 peer-as 64512 user@PE1# set protocols bgp group CE neighbor 10.0.0.1 as-override
-
라우터 ID 및 AS 번호를 구성합니다.
[edit routing-options] user@PE1# set router-id 10.255.2.2 user@PE1# set autonomous-system 65534
결과
구성 모드에서 , show protocols, show routing-instances및 show routing-options 명령을 show interfaces입력하여 구성을 확인합니다. 출력에 의도한 구성이 표시되지 않으면 이 예의 구성 지침을 반복하여 수정합니다.
user@PE1# show interfaces
ge-1/2/0 {
unit 2 {
family inet {
address 10.0.0.2/30;
}
family iso;
family mpls;
}
}
ge-1/2/1 {
unit 5 {
family inet {
address 10.0.0.5/30;
}
family iso;
family mpls;
}
}
ge-1/2/2 {
unit 21 {
family inet {
address 10.0.0.21/30;
}
family iso;
family mpls;
}
}
lo0 {
unit 0 {
family inet {
address 10.255.2.2/32;
}
family iso {
address 49.0001.0010.0000.0202.00;
}
}
}
user@PE1# show protocols
mpls {
interface ge-1/2/2.0;
interface ge-1/2/1.0;
interface lo0.0;
interface fxp0.0 {
disable;
}
}
bgp {
group l3vpn {
type internal;
local-address 10.255.2.2;
family inet-vpn {
unicast;
}
peer-as 65534;
local-as 65534;
neighbor 10.255.4.4;
}
}
isis {
interface ge-1/2/1.0 {
level 2 metric 10;
level 1 disable;
}
interface ge-1/2/2.0 {
level 2 metric 10;
level 1 disable;
}
interface fxp0.0 {
disable;
}
interface lo0.0 {
level 2 metric 0;
}
}
ldp {
deaggregate;
interface ge-1/2/1.0;
interface ge-1/2/2.0;
interface fxp0.0 {
disable;
}
interface lo0.0;
}
user@PE1# show routing-instances
VPN-A {
instance-type vrf;
interface ge-1/2/0.0;
route-distinguisher 65534:1234;
vrf-target target:65534:1234;
protocols {
bgp {
group CE {
type external;
family inet {
unicast;
}
neighbor 10.0.0.1 {
peer-as 64512;
as-override;
}
}
}
}
}
user@PE1# show routing-options
router-id 10.255.2.2;
autonomous-system 65534;
디바이스 구성이 완료되면 구성 모드에서 들어갑니다 commit .
검증
구성이 제대로 작동하고 있는지 확인합니다.
CE 디바이스에 대한 AS 경로 확인
목적
디바이스 PE1에서 디바이스 CE2의 루프백 인터페이스에 대한 경로에 대한 AS 경로 속성에 대한 정보를 표시합니다.
작업
디바이스 PE1의 운영 모드에서 명령을 입력합니다.show route table VPN-A.inet.0 10.255.6.6
user@PE1> show route table VPN-A.inet.0 10.255.6.6
VPN-A.inet.0: 5 destinations, 6 routes (5 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.255.6.6/32 *[BGP/170] 02:19:35, localpref 100, from 10.255.4.4
AS path: 64512 I, validation-state: unverified
> to 10.0.0.22 via ge-1/2/2.0, Push 300032, Push 299776(top)
의미
출력은 디바이스 PE1이 AS 64512에서 오는 10.255.6.6/32에 대한 AS 경로를 가지고 있음을 보여줍니다.
디바이스 CE2에 대한 경로가 보급되는 방법 확인
목적
디바이스 CE2에 대한 경로가 마치 MPLS 코어에서 오는 것처럼 디바이스 CE1에 보급되는지 확인합니다.
작업
디바이스 PE1의 운영 모드에서 명령을 입력합니다.show route advertising-protocol bgp 10.0.0.1
user@PE1> show route advertising-protocol bgp 10.0.0.1 VPN-A.inet.0: 5 destinations, 6 routes (5 active, 0 holddown, 0 hidden) Prefix Nexthop MED Lclpref AS path * 10.0.0.16/30 Self I * 10.255.1.1/32 10.0.0.1 65534 I * 10.255.6.6/32 Self 65534 I
의미
출력은 디바이스 PE1이 AS 경로에서 자체 AS 번호만 보급하고 있음을 나타냅니다.
디바이스 CE1에서 경로 확인
목적
디바이스 CE1이 디바이스 CE2에 대한 경로에 대한 AS 경로에 프로바이더 AS 번호만 포함하는지 확인합니다.
작업
운영 모드에서 명령을 입력합니다.show route table inet.0 terse 10.255.6.6
user@CE1> show route table inet.0 terse 10.255.6.6 inet.0: 5 destinations, 6 routes (5 active, 0 holddown, 1 hidden) + = Active Route, - = Last Active, * = Both A V Destination P Prf Metric 1 Metric 2 Next hop AS path * ? 10.255.6.6/32 B 170 100 65534 65534 I unverified >10.0.0.2
의미
출력은 디바이스 CE1이 디바이스 CE2에 대한 경로를 가지고 있음을 나타냅니다. 루프 문제는 문을 as-override 사용하여 해결됩니다.
하나의 경로는 CE 디바이스에 숨겨져 있습니다. 이는 Junos OS가 BGP 스플릿 호라이즌을 수행하지 않기 때문입니다. 일반적으로 BGP의 스플릿 호라이즌은 필요하지 않습니다. AS 경로 길이(EBGP의 경우), AS 경로 루프 감지(IBGP) 또는 기타 BGP 메트릭으로 인해 원본이 다시 수신할 수 있는 경로가 덜 선호되기 때문입니다. 학습된 이웃으로 경로를 다시 보급하는 것은 라우터의 성능에 미치는 영향은 무시할 수 있으며, 올바른 방법입니다.
예: BGP 경로 보급 활성화
Junos OS는 한 EBGP 피어에서 학습한 경로를 동일한 외부 BGP(EBGP) 피어로 다시 알리지 않습니다. 또한 소프트웨어는 라우팅 인스턴스에 관계없이 원래 피어와 동일한 AS(Autonomous System)에 있는 EBGP 피어에 이러한 경로를 다시 알리지 않습니다. 구성에 문을 포함하여 advertise-peer-as 이 동작을 수정할 수 있습니다.
구성에 문을 포함 advertise-peer-as 하면 BGP는 이 확인에 관계없이 경로를 보급합니다.
기본 동작을 복원하려면 구성에 문을 포함합니다.no-advertise-peer-as
no-advertise-peer-as;
문이 as-override 구성에 포함된 경우 경로 억제 기본 동작이 비활성화됩니다. 구성에 및 as-override 문을 no-advertise-peer-as 모두 포함하면 문은 no-advertise-peer-as 무시됩니다.
요구 사항
이 예제를 구성하기 전에 디바이스 초기화 이외의 특별한 구성은 필요하지 않습니다.
이 예는 Junos 릴리스 21.2R1에서 업데이트되고 재검증되었습니다.
개요
이 예는 외부 BGP(EBGP) 연결이 있는 라우팅 디바이스 3개를 보여줍니다. 디바이스 R2는 디바이스 R1에 대한 EBGP 연결과 디바이스 R3에 대한 또 다른 EBGP 연결을 가지고 있습니다. AS 64511에 있는 디바이스 R2에 의해 분리되지만, 디바이스 R1과 디바이스 R3은 동일한 AS(AS 64512)에 있습니다. 디바이스 R1 및 디바이스 R3은 BGP 직접 경로로 자체 루프백 인터페이스 주소에 보급합니다.
디바이스 R2는 이러한 루프백 인터페이스 경로를 수신하고 문은 advertise peer-as 디바이스 R2가 이를 보급하도록 허용합니다. 구체적으로, 디바이스 R1은 디바이스 R2에 192.168.0.1 경로를 전송하며, 디바이스 R2는 를 advertise peer-as 구성했으므로 디바이스 R2는 디바이스 R3에 192.168.0.1 경로를 전송할 수 있습니다. 마찬가지로 디바이스 R3은 디바이스 R2에 192.168.0.3 경로를 전송하고 advertise peer-as 디바이스 R2가 해당 경로를 디바이스 R1로 전달할 수 있도록 합니다.
디바이스 R1 및 디바이스 R3이 AS 경로에 자체 AS 번호를 포함하는 경로를 수락할 수 있도록 하려면 디바이스 R1 및 디바이스 R3에 문이 loops 2 필요합니다.
토폴로지
구성
CLI 빠른 구성
이 예를 빠르게 구성하려면, 아래 명령을 복사하여 텍스트 파일로 붙여 넣은 다음 모든 라인브레이크를 제거하고, 네트워크 구성을 일치하는 데 필요한 세부 사항을 변경한 다음, 계층 수준에서 [edit] 명령을 복사하여 CLI에 붙여 넣습니다.
디바이스 R1
set interfaces xe-0/2/0 description R1-to-R2 set interfaces xe-0/2/0 unit 0 family inet address 10.0.0.1/30 set interfaces lo0 unit 0 family inet address 192.168.0.1/32 set protocols bgp family inet unicast loops 2 set protocols bgp group ext type external set protocols bgp group ext export send-direct set protocols bgp group ext peer-as 64511 set protocols bgp group ext neighbor 10.0.0.2 set policy-options policy-statement send-direct term 1 from protocol direct set policy-options policy-statement send-direct term 1 then accept set routing-options autonomous-system 64512
디바이스 R2
set interfaces xe-0/2/0 description R2-to-R1 set interfaces xe-0/2/0 unit 0 family inet address 10.0.0.2/30 set interfaces xe-0/2/1 description R2-to-R3 set interfaces xe-0/2/1 unit 0 family inet address 10.1.0.1/30 set interfaces lo0 unit 0 family inet address 192.168.0.2/32 set protocols bgp group ext type external set protocols bgp group ext advertise-peer-as set protocols bgp group ext export send-direct set protocols bgp group ext neighbor 10.0.0.1 peer-as 64512 set protocols bgp group ext neighbor 10.1.0.2 peer-as 64512 set policy-options policy-statement send-direct term 1 from protocol direct set policy-options policy-statement send-direct term 1 then accept set routing-options autonomous-system 64511
디바이스 R3
set interfaces xe-0/2/0 description R3-to-R2 set interfaces xe-0/2/0 unit 0 family inet address 10.1.0.2/30 set interfaces lo0 unit 0 family inet address 192.168.0.3/32 set protocols bgp family inet unicast loops 2 set protocols bgp group ext type external set protocols bgp group ext export send-direct set protocols bgp group ext peer-as 64511 set protocols bgp group ext neighbor 10.1.0.1 set policy-options policy-statement send-direct term 1 from protocol direct set policy-options policy-statement send-direct term 1 then accept set routing-options autonomous-system 64512
절차
단계별 절차
다음 예에서는 구성 계층에서 다양한 수준의 탐색이 필요합니다. CLI 탐색에 대한 정보는 Junos OS CLI 사용자 가이드의 구성 모드에서 CLI 편집기 사용을 참조하십시오.
디바이스 R1 구성:
-
디바이스 인터페이스를 구성합니다.
[edit interfaces] user@R1# set xe-0/2/0 description R1-to-R2 user@R1# set xe-0/2/0 unit 0 family inet address 10.0.0.1/30 user@R1# set lo0 unit 0 family inet address 192.168.0.1/32
-
BGP를 구성합니다.
[edit protocols bgp group ext] user@R1# set type external user@R1# set peer-as 64511 user@R1# set neighbor 10.0.0.2
-
문을 포함하여
loops 2디바이스 R3의 경로가 디바이스 R1에 숨겨지지 않도록 합니다.이 명령문은
loops 2로컬 디바이스의 자체 AS 번호가 경로를 숨기지 않고 AS 경로에 최대 1회까지 나타날 수 있음을 의미합니다. 로컬 디바이스의 AS 번호가 경로에서 두 번 이상 감지되면 경로가 숨겨집니다.[edit protocols bgp family inet unicast] user@R1# set loops 2
-
직접 경로를 전송하는 라우팅 정책을 구성합니다.
[edit policy-options policy-statement send-direct term 1] user@R1# set from protocol direct user@R1# set then accept
-
디바이스 R2와의 BGP 피어링 세션에 내보내기 정책을 적용합니다.
[edit protocols bgp group ext] user@R1# set export send-direct
-
AS(Autonomous System) 번호를 구성합니다.
[edit routing-options ] user@R1# set autonomous-system 64512
단계별 절차
디바이스 R2 구성:
-
디바이스 인터페이스를 구성합니다.
[edit interfaces] user@R2# set xe-0/2/0 description R2-to-R1 user@R2# set xe-0/2/0 unit 0 family inet address 10.0.0.2/30 user@R2# set xe-0/2/1 description R2-to-R3 user@R2# set xe-0/2/1 unit 0 family inet address 10.1.0.1/30 user@R2# set lo0 unit 0 family inet address 192.168.0.2/32
-
BGP를 구성합니다.
[edit protocols bgp group ext] user@R2# set type external user@R2# set neighbor 10.0.0.1 peer-as 64512 user@R2# set neighbor 10.1.0.2 peer-as 64512
-
디바이스 R2를 구성하여 하나의 EBGP 피어에서 학습한 경로를 동일한 AS의 다른 EBGP 피어로 보급합니다.
즉, 디바이스 R1과 디바이스 R3이 동일한 AS에 있더라도 디바이스 R3에서 학습한 디바이스 R1 경로(및 그 반대)에 보급합니다.
[edit protocols bgp group ext] user@R2# set advertise-peer-as
-
직접 경로를 전송하는 라우팅 정책을 구성합니다.
[edit policy-options policy-statement send-direct term 1] user@R2# set from protocol direct user@R2# set then accept
-
내보내기 정책을 적용합니다.
[edit protocols bgp group ext] user@R2# set export send-direct
-
AS 번호를 구성합니다.
[edit routing-options] user@R2# set autonomous-system 64511
결과
구성 모드에서 , show protocols, show policy-options및 show routing-options 명령을 show interfaces입력하여 구성을 확인합니다. 출력에 의도한 구성이 표시되지 않으면 이 예의 지침을 반복하여 구성을 수정합니다.
디바이스 R1
user@R1# show interfaces
xe-0/2/0 {
description R1-to-R2;
unit 0 {
family inet {
address 10.0.0.1/30;
}
}
}
lo0 {
unit 0 {
family inet {
address 192.168.0.1/32;
}
}
}
user@R1# show protocols
bgp {
family inet {
unicast {
loops 2;
}
}
group ext {
type external;
export send-direct;
peer-as 64511;
neighbor 10.0.0.2;
}
}
user@R1# show policy-options
policy-statement send-direct {
term 1 {
from protocol direct;
then accept;
}
}
user@R1# show routing-options autonomous-system 64512;
디바이스 R2
user@R2# show interfaces
xe-0/2/0 {
description R2-to-R1;
unit 0 {
family inet {
address 10.0.0.2/30;
}
}
}
xe-0/2/1 {
description R2-to-R3;
unit 0 {
family inet {
address 10.1.0.1/30;
}
}
}
lo0 {
unit 0 {
family inet {
address 192.168.0.2/32;
}
}
}
user@R2# show protocols
bgp {
group ext {
type external;
advertise-peer-as;
export send-direct;
neighbor 10.0.0.1 {
peer-as 64512;
}
neighbor 10.1.0.2 {
peer-as 64512;
}
}
}
user@R2# show policy-options
policy-statement send-direct {
term 1 {
from protocol direct;
then accept;
}
}
user@R2# show routing-options autonomous-system 64511;
디바이스 구성이 완료되면 구성 모드에서 들어갑니다 commit .
검증
구성이 제대로 작동하고 있는지 확인합니다.
BGP 경로 확인
목적
디바이스 R1 및 디바이스 R3의 라우팅 테이블에 예상되는 경로가 포함되어 있는지 확인합니다.
작업
-
디바이스 R2에서 BGP 구성의 문을 비활성화
advertise-peer-as합니다.[edit protocols bgp group ext] user@R2# deactivate advertise-peer-as user@R2# commit
-
디바이스 R3에서 BGP 구성의 문을 비활성화
loops합니다.[edit protocols bgp family inet unicast ] user@R3# deactivate unicast loops user@R3# commit
-
디바이스 R1에서 디바이스 R2에 보급되는 경로를 확인합니다.
user@R1> show route advertising-protocol bgp 10.0.0.2 inet.0: 5 destinations, 6 routes (5 active, 0 holddown, 0 hidden) Prefix Nexthop MED Lclpref AS path * 10.0.0.0/30 Self I * 192.168.0.1/32 Self I
-
디바이스 R2에서 디바이스 R1에서 수신된 경로를 확인합니다.
user@R2> show route receive-protocol bgp 10.0.0.1 inet.0: 7 destinations, 9 routes (7 active, 0 holddown, 0 hidden) Prefix Nexthop MED Lclpref AS path 10.0.0.0/30 10.0.0.1 64512 I * 192.168.0.1/32 10.0.0.1 64512 I
-
디바이스 R2에서 디바이스 R3에 어떤 경로가 보급되는지 확인합니다.
user@R2> show route advertising-protocol bgp 10.1.0.2 inet.0: 7 destinations, 9 routes (7 active, 0 holddown, 0 hidden) Prefix Nexthop MED Lclpref AS path * 10.0.0.0/30 Self I * 10.1.0.0/30 Self I * 192.168.0.2/32 Self I
-
디바이스 R2에서 BGP 구성에서 문을 활성화
advertise-peer-as합니다.[edit protocols bgp group ext] user@R2# activate advertise-peer-as user@R2# commit
-
디바이스 R2에서 디바이스 R3에 보급된 경로를 다시 확인합니다.
user@R2> show route advertising-protocol bgp 10.1.0.2 inet.0: 7 destinations, 9 routes (7 active, 0 holddown, 0 hidden) Prefix Nexthop MED Lclpref AS path * 10.0.0.0/30 Self I * 10.1.0.0/30 Self I * 192.168.0.1/32 Self 64512 I * 192.168.0.2/32 Self I * 192.168.0.3/32 10.1.0.2 64512 I
-
디바이스 R3에서 디바이스 R2로부터 수신된 경로를 확인합니다.
user@R3> show route receive-protocol bgp 10.1.0.1 inet.0: 5 destinations, 6 routes (5 active, 0 holddown, 0 hidden) Prefix Nexthop MED Lclpref AS path * 10.0.0.0/30 10.1.0.1 64511 I 10.1.0.0/30 10.1.0.1 64511 I * 192.168.0.2/32 10.1.0.1 64511 I
-
디바이스 R3에서 BGP 구성에서 문을 활성화
loops합니다.[edit protocols bgp family inet unicast ] user@R3# activate unicast loops user@R3# commit
-
디바이스 R3에서 디바이스 R2에서 수신한 경로를 다시 확인합니다.
user@R3> show route receive-protocol bgp 10.1.0.1 inet.0: 6 destinations, 8 routes (6 active, 0 holddown, 1 hidden) Prefix Nexthop MED Lclpref AS path * 10.0.0.0/30 10.1.0.1 64511 I 10.1.0.0/30 10.1.0.1 64511 I * 192.168.0.1/32 10.1.0.1 64511 64512 I * 192.168.0.2/32 10.1.0.1 64511 I
의미
먼저 advertise-peer-as 기본 동작을 검사할 수 있도록 문과 loops 문이 비활성화됩니다. 디바이스 R1은 디바이스 R2에 디바이스 R1의 루프백 인터페이스 주소 192.168.0.1/32에 대한 경로를 보냅니다. 디바이스 R2는 이 경로를 디바이스 R3에 알리지 않습니다. 문을 활성화한 advertise-peer-as 후, 디바이스 R2는 디바이스 R3에 192.168.0.1/32 경로를 보급합니다. 디바이스 R3은 문이 활성화될 때까지 loops 이 경로를 수락하지 않습니다.
BGP 루프 감지를 위해 독립 AS 도메인에서 속성 집합 메시지 비활성화
특정 경로에 대한 BGP 루프 감지는 라우팅 인스턴스에 로컬 AS(Autonomous System) 도메인을 사용합니다. 기본적으로 모든 라우팅 인스턴스는 글로벌 계층 routing-options에서 구성된 단일 기본 라우팅 인스턴스 도메인에 속합니다. 따라서 BGP 루프 감지는 모든 라우팅 인스턴스에 구성된 로컬 AS를 사용합니다. 네트워크 구성에 따라 이 기본 동작으로 인해 경로가 반복되고 숨겨질 수 있습니다. 간결성을 위해 '로컬 AS'는 특정 라우팅 인스턴스에 대한 AS로, 글로벌 구성 또는 기본 라우팅 인스턴스에 대한 '글로벌 AS'라고 지칭합니다.
기본 라우팅 인스턴스에서 로컬 AS를 제한하기 위해 라우팅 인스턴스에 대해 독립적인 AS 도메인을 구성할 수 있습니다. 독립 도메인은 기본 라우팅 인스턴스와 분리되어 있으며, 독립 도메인의 AS 경로가 다른 도메인의 AS 경로 및 AS 경로 속성과 공유되지 않도록 합니다.
기본적으로 독립 도메인은 전이적 경로 속성 128(속성 세트) 메시지를 사용하여 내부 BGP(IBGP) 코어를 통해 독립 도메인의 BGP 속성을 터널링합니다. 그러나 독립 도메인에 대한 속성 세트 메시지 동작은 많은 경우 원하지 않습니다. 라우팅 인스턴스에서 로컬 AS의 독립성을 유지하고 라우팅 인스턴스에서 지정된 로컬 AS에 대해서만 BGP 루프 감지를 수행하기 위해 독립 도메인만 구성하려는 경우, 속성 집합 메시지를 비활성화할 수 있습니다.
독립 도메인에서 속성 집합 메시지를 비활성화하려면 다음 문을 포함합니다.independent-domain no-attrset
독립 도메인에 대한 라우팅 인스턴스를 지정하면 로컬 AS는 해당 라우팅 인스턴스와만 연결됩니다. 즉, BGP 루프 감지는 라우팅 인스턴스에 정의된 로컬 AS만 사용합니다.
또한보십시오
예: 최적의 경로 선택 시 AS 경로 속성 무시
동일한 목적지에 대한 여러 BGP 경로가 존재하는 경우 BGP는 경로의 경로 속성을 기반으로 최적의 경로를 선택합니다. 최적 경로 결정에 영향을 미치는 경로 속성 중 하나는 각 경로의 AS 경로 길이입니다. AS 경로가 긴 경로보다 AS 경로가 짧은 경로가 선호됩니다. 일반적으로 실용적이지는 않지만 일부 시나리오에서는 경로 선택 프로세스에서 AS 경로 길이를 무시해야 할 수도 있습니다. 이 예는 AS 경로 속성을 무시하도록 라우팅 디바이스를 구성하는 방법을 보여줍니다.
요구 사항
이 예제를 구성하기 전에 디바이스 초기화 이외의 특별한 구성은 필요하지 않습니다.
개요
외부에 연결된 라우팅 디바이스에서 AS 경로 비교를 건너뛰는 목적은 외부 BGP(EBGP) 대 내부 BGP(IBGP) 결정에서 가능한 한 빨리 네트워크에서 트래픽을 제거하도록 강요하는 것일 수 있습니다. 내부적으로 연결된 라우팅 디바이스에서 IBGP 전용 라우터가 기본적으로 로컬 외부 연결 게이트웨이로 설정되기를 원할 수 있습니다. 로컬 IBGP 전용(내부) 라우터는 AS 경로 비교를 건너뛰고 의사 결정 트리를 아래로 이동하여 가장 가까운 내부 게이트웨이 프로토콜(IGP) 게이트웨이(가장 낮은 IGP 메트릭)를 사용합니다. 이렇게 하면 이러한 라우터가 WAN 연결 대신 LAN 연결을 사용하도록 하는 효과적인 방법일 수 있습니다.
네트워크의 라우팅 디바이스에 문을 포함 as-path-ignore 할 때, 라우팅 루프 및 컨버전스 문제를 방지하기 위해 네트워크의 다른 모든 BGP 지원 디바이스에도 이를 포함해야 할 수 있습니다. 이는 특히 IBGP 경로 비교에 해당됩니다.
이 예에서 디바이스 R2는 디바이스 R1 및 디바이스 R3의 디바이스 R4(10.4.4.4/32)의 루프백 인터페이스 주소에 대해 학습하고 있습니다. 디바이스 R1은 AS 경로가 65001 65005 65004인 10.4.4.4/32를 광고하고, 디바이스 R3은 AS 경로가 65003 65004인 10.4.4.4/32를 광고합니다. 디바이스 R2는 AS 경로가 디바이스 R1의 AS 경로보다 짧기 때문에 디바이스 R3의 10.4.4.4/32 경로를 최적의 경로로 선택합니다.
이 예에서는 AS-path 길이가 최적 경로 선택에 사용되지 않도록 디바이스 R2의 BGP 구성을 수정합니다.
디바이스 R1은 디바이스 R3(10.3.3.3)보다 낮은 라우터 ID(10.1.1.1)를 가지고 있습니다. 다른 모든 경로 선택 기준이 동일한 경우(또는 이 경우와 같이 무시되면) 디바이스 R1에서 학습한 경로가 사용됩니다. AS-경로 속성이 무시되기 때문에 라우터 ID 값이 낮기 때문에 디바이스 R1로 향하는 경로가 가장 좋습니다.
그림 7은 샘플 토폴로지를 보여줍니다.
구성
CLI 빠른 구성
이 예를 빠르게 구성하려면, 아래 명령을 복사하여 텍스트 파일로 붙여 넣은 다음 모든 라인브레이크를 제거하고, 네트워크 구성을 일치하는 데 필요한 세부 사항을 변경한 다음, 계층 수준에서 [edit] 명령을 복사하여 CLI에 붙여 넣습니다.
디바이스 R1
set interfaces fe-1/2/0 unit 1 family inet address 192.168.10.1/24 set interfaces fe-1/2/1 unit 10 family inet address 192.168.50.2/24 set interfaces lo0 unit 1 family inet address 10.1.1.1/32 set protocols bgp group ext type external set protocols bgp group ext export send-direct set protocols bgp group ext export send-static set protocols bgp group ext export send-local set protocols bgp group ext neighbor 192.168.10.2 peer-as 65002set protocols bgp group ext neighbor 192.168.50.1 peer-as 65005 set policy-options policy-statement send-direct term 1 from protocol direct set policy-options policy-statement send-direct term 1 then accept set policy-options policy-statement send-local term 1 from protocol local set policy-options policy-statement send-local term 1 then accept set policy-options policy-statement send-static term 1 from protocol static set policy-options policy-statement send-static term 1 then accept set routing-options static route 192.168.20.0/24 next-hop 192.168.10.2 set routing-options static route 192.168.30.0/24 next-hop 192.168.10.2 set routing-options static route 192.168.40.0/24 next-hop 192.168.50.1 set routing-options router-id 10.1.1.1 set routing-options autonomous-system 65001
디바이스 R2
set interfaces fe-1/2/0 unit 2 family inet address 192.168.10.2/24 set interfaces fe-1/2/1 unit 3 family inet address 192.168.20.2/24 set interfaces lo0 unit 2 family inet address 10.2.2.2/32 set protocols bgp path-selection as-path-ignore set protocols bgp group ext type external set protocols bgp group ext export send-direct set protocols bgp group ext export send-static set protocols bgp group ext export send-local set protocols bgp group ext neighbor 192.168.10.1 peer-as 65001 set protocols bgp group ext neighbor 192.168.20.1 peer-as 65003 set policy-options policy-statement send-direct term 1 from protocol direct set policy-options policy-statement send-direct term 1 then accept set policy-options policy-statement send-local term 1 from protocol local set policy-options policy-statement send-local term 1 then accept set policy-options policy-statement send-static term 1 from protocol static set policy-options policy-statement send-static term 1 then accept set routing-options static route 192.168.50.0/24 next-hop 192.168.10.1 set routing-options static route 192.168.40.0/24 next-hop 192.168.10.1 set routing-options static route 192.168.30.0/24 next-hop 192.168.20.1 set routing-options router-id 10.2.2.2 set routing-options autonomous-system 65002
디바이스 R3
set interfaces fe-1/2/0 unit 4 family inet address 192.168.20.1/24 set interfaces fe-1/2/1 unit 5 family inet address 192.168.30.1/24 set interfaces lo0 unit 3 family inet address 10.3.3.3/32 set protocols bgp group ext type external set protocols bgp group ext export send-direct set protocols bgp group ext export send-static set protocols bgp group ext export send-local set protocols bgp group ext neighbor 192.168.20.2 peer-as 65002 set protocols bgp group ext neighbor 192.168.30.2 peer-as 65004 set policy-options policy-statement send-direct term 1 from protocol direct set policy-options policy-statement send-direct term 1 then accept set policy-options policy-statement send-local term 1 from protocol local set policy-options policy-statement send-local term 1 then accept set policy-options policy-statement send-static term 1 from protocol static set policy-options policy-statement send-static term 1 then accept set routing-options static route 192.168.10.0/24 next-hop 192.168.20.2 set routing-options static route 192.168.50.0/24 next-hop 192.168.20.2 set routing-options static route 192.168.40.0/24 next-hop 192.168.30.2 set routing-options router-id 10.3.3.3 set routing-options autonomous-system 65003
디바이스 R4
set interfaces fe-1/2/0 unit 6 family inet address 192.168.30.2/24
set interfaces fe-1/2/1 unit 7 family inet address 192.168.40.1/24
set interfaces lo0 unit 4 family inet address 10.4.4.4/32
set protocols bgp group ext type external
set protocols bgp group ext export send-direct
set protocols bgp group ext export send-static
set protocols bgp group ext export send-local
set protocols bgp group ext neighbor 192.168.30.1 peer-as 65003
set protocols bgp group ext neighbor 192.168.40.2 peer-as 65005
set policy-options policy-statement send-direct term 1 from protocol direct
set policy-options policy-statement send-direct term 1 then accept
set policy-options policy-statement send-local term 1 from protocol local
set policy-options policy-statement send-local term 1 then accept
set policy-options policy-statement send-static term 1 from protocol static
set policy-options policy-statement send-static term 1 then accept
set routing-options static route 192.168.10.0/24 next-hop 192.168.40.2
set routing-options static route 192.168.50.0/24 next-hop 192.168.40.2
set routing-options static route 192.168.40.0/24 next-hop 192.168.30.1
set routing-options router-id 10.4.4.4
set routing-options autonomous-system 65004
디바이스 R5
set interfaces fe-1/2/0 unit 8 family inet address 192.168.40.2/24 set interfaces fe-1/2/1 unit 9 family inet address 192.168.50.1/24 set interfaces lo0 unit 5 family inet address 10.5.5.5/32 set protocols bgp group ext type external set protocols bgp group ext export send-direct set protocols bgp group ext export send-static set protocols bgp group ext export send-local set protocols bgp group ext neighbor 192.168.40.1 peer-as 65004 set protocols bgp group ext neighbor 192.168.50.2 peer-as 65001 set policy-options policy-statement send-direct term 1 from protocol direct set policy-options policy-statement send-direct term 1 then accept set policy-options policy-statement send-local term 1 from protocol local set policy-options policy-statement send-local term 1 then accept set policy-options policy-statement send-static term 1 from protocol static set policy-options policy-statement send-static term 1 then accept set routing-options static route 192.168.10.0/24 next-hop 192.168.50.2 set routing-options static route 192.168.20.0/24 next-hop 192.168.50.2 set routing-options static route 192.168.30.0/24 next-hop 192.168.40.1 set routing-options router-id 10.5.5.5 set routing-options autonomous-system 65005
디바이스 R2 구성
단계별 절차
다음 예에서는 구성 계층에서 다양한 수준을 탐색해야 합니다. CLI 탐색에 대한 정보는 Junos OS CLI 사용자 가이드의 구성 모드에서 CLI 편집기 사용을 참조하십시오.
디바이스 R2 구성:
-
인터페이스를 구성합니다.
[edit interfaces] user@R2# set fe-1/2/0 unit 2 family inet address 192.168.10.2/24 user@R2# set fe-1/2/1 unit 3 family inet address 192.168.20.2/24 user@R2# set lo0 unit 2 family inet address 10.2.2.2/32
-
EBGP를 구성합니다.
[edit protocols bgp group ext] user@R2# set type external user@R2# set export send-direct user@R2# set export send-static user@R2# set export send-local user@R2# set neighbor 192.168.10.1 peer-as 65001 user@R2# set neighbor 192.168.20.1 peer-as 65003
-
Junos OS 경로 선택 알고리즘에서 무시할 AS(Autonomous System) 경로 속성 구성합니다.
[edit protocols bgp] user@R2# set path-selection as-path-ignore
-
라우팅 정책 구성합니다.
[edit policy-options] user@R2# set policy-statement send-direct term 1 from protocol direct user@R2# set policy-statement send-direct term 1 then accept user@R2# set policy-statement send-local term 1 from protocol local user@R2# set policy-statement send-local term 1 then accept user@R2# set policy-statement send-static term 1 from protocol static user@R2# set policy-statement send-static term 1 then accept
-
일부 정적 경로를 구성합니다.
[edit routing-options static] user@R2# set route 192.168.50.0/24 next-hop 192.168.10.1 user@R2# set route 192.168.40.0/24 next-hop 192.168.10.1 user@R2# set route 192.168.30.0/24 next-hop 192.168.20.1
-
AS(Autonomous System) 번호와 라우터 ID를 구성합니다.
[edit routing-options] user@R2# set router-id 10.2.2.2 user@R2# set autonomous-system 65002
결과
구성 모드에서 , show policy-options, show protocols및 show routing-options 명령을 show interfaces입력하여 구성을 확인합니다. 출력에 의도한 구성이 표시되지 않으면 이 예의 지침을 반복하여 구성을 수정합니다.
user@R2# show interfaces
fe-1/2/0 {
unit 2 {
family inet {
address 192.168.10.2/24;
}
}
}
fe-1/2/1 {
unit 3 {
family inet {
address 192.168.20.2/24;
}
}
}
lo0 {
unit 2 {
family inet {
address 10.2.2.2/32;
}
}
}
user@R2# show policy-options
policy-statement send-direct {
term 1 {
from protocol direct;
then accept;
}
}
policy-statement send-local {
term 1 {
from protocol local;
then accept;
}
}
policy-statement send-static {
term 1 {
from protocol static;
then accept;
}
}
user@R2# show protocols
bgp {
path-selection as-path-ignore;
group ext {
type external;
export [ send-direct send-static send-local ];
neighbor 192.168.10.1 {
peer-as 65001;
}
neighbor 192.168.20.1 {
peer-as 65003;
}
}
}
user@R2# show routing-options
static {
route 192.168.50.0/24 next-hop 192.168.10.1;
route 192.168.40.0/24 next-hop 192.168.10.1;
route 192.168.30.0/24 next-hop 192.168.20.1;
}
router-id 10.2.2.2;
autonomous-system 65002;
디바이스 구성이 완료되면 구성 모드에서 commit 을 입력합니다. 네트워크의 다른 디바이스에 대한 구성을 반복하고 필요에 따라 인터페이스 이름 및 IP 주소를 변경합니다.
검증
구성이 제대로 작동하고 있는지 확인합니다.
이웃 상태 확인
목적
디바이스 R2에서 AS 4로 이동하는 활성 경로가 AS 65003이 아닌 AS 65001 및 AS 65005를 통해 이루어지는지 확인합니다.
명령문의 기능을 as-path-ignore 확인하려면 명령을 실행 restart routing 하여 활성 경로를 강제로 재평가해야 할 수도 있습니다. BGP의 경우 두 경로가 모두 외부인 경우 Junos OS 동작이 현재 활성 경로를 선호하기 때문입니다. 이 동작은 경로 플래핑을 최소화하는 데 도움이 됩니다. 운영 네트워크에서 라우팅 프로토콜 프로세스를 다시 시작할 때는 주의하십시오.
작업
운영 모드에서 명령을 입력합니다. restart routing
user@R2> restart routing Routing protocols process started, pid 49396
운영 모드에서 명령을 입력합니다.show route 10.4.4.4 protocol bgp
user@R2> show route 10.4.4.4 protocol bgp
inet.0: 12 destinations, 25 routes (12 active, 0 holddown, 4 hidden)
+ = Active Route, - = Last Active, * = Both
10.4.4.4/32 *[BGP/170] 00:00:12, localpref 100
AS path: 65001 65005 65004 I
> to 192.168.10.1 via fe-1/2/0.2
[BGP/170] 00:00:08, localpref 100
AS path: 65003 65004 I
> to 192.168.20.1 via fe-1/2/1.3
의미
별표(*)는 R1에서 학습한 경로 옆에 있으며, 이는 이것이 활성 경로임을 의미합니다. 활성 경로의 AS 경로는 65001 65005 65004이며, 이는 라우터 R3에서 학습한 비활성 경로의 AS 경로(65003 65004)보다 깁니다.
AS 경로에서 프라이빗 AS 번호 제거 이해
기본적으로 BGP가 원격 시스템에 AS 경로를 보급할 때 프라이빗 AS 번호를 포함한 모든 AS 번호가 포함됩니다. AS 경로에서 프라이빗 AS 번호를 제거하도록 소프트웨어를 구성할 수 있습니다. 이 작업은 다음 상황 중 하나에 해당할 때 유용합니다.
연결을 제공하는 원격 AS는 멀티호밍되지만 로컬 AS에만 해당됩니다.
원격 AS에는 공식적으로 할당된 AS 번호가 없습니다.
원격 AS를 로컬 AS의 컨페더레이션 멤버 AS로 만드는 것은 적절하지 않습니다.
대부분의 회사는 자체 AS 번호를 획득합니다. 일부 회사는 프라이빗 AS 번호를 사용하여 퍼블릭 AS 네트워크에 연결하기도 합니다. 이러한 회사는 회사가 비즈니스를 수행하는 각 지역에 대해 다른 프라이빗 AS 번호를 사용할 수 있습니다. 어떤 구현에서든 인터넷에 프라이빗 AS 번호를 알리는 것은 피해야 합니다. 서비스 프로바이더는 이 remove-private 문을 사용하여 프라이빗 AS 번호가 인터넷에 보급되는 것을 방지할 수 있습니다.
엔터프라이즈 시나리오에서는 회사에 여러 개의 AS 번호가 있는데, 그 중 일부는 프라이빗 AS 번호이고 다른 하나는 퍼블릭 AS 번호라고 가정해 보겠습니다. 공용 AS 번호가 있는 것은 서비스 프로바이더에 직접 연결됩니다. 서비스 프로바이더에 직접 연결되는 AS에서, 이 문을 사용하여 remove-private 서비스 프로바이더에게 전송되는 광고의 프라이빗 AS 번호를 필터링할 수 있습니다.
AS 번호는 AS 경로의 왼쪽 끝(AS 경로가 가장 최근에 추가된 끝)에서 시작하여 AS 경로에서 제거됩니다. 라우팅 디바이스는 첫 번째 비프라이빗 AS 또는 피어의 프라이빗 AS를 찾으면 프라이빗 AS 검색을 중단합니다. AS 경로에 외부 BGP(EBGP) 인접 라우터의 AS 번호가 포함된 경우 BGP는 프라이빗 AS 번호를 제거하지 않습니다.
Junos OS 10.0R2 이상부터 AS 경로의 AS 번호와 일치하는 AS 번호를 가진 EBGP 피어에 접두사를 전송해야 하는 경우 문 대신 문을 사용하는 as-override 것이 좋습니다.remove-private
해당하는 경우 컨페더레이션 멤버 AS가 AS 경로에서 이미 제거된 후에 작업이 수행됩니다.
소프트웨어는 비공개로 간주되는 AS 번호 집합에 대한 지식으로 사전 구성되어 있으며, 이는 Internet Assigned Numbers Authority(IANA) 할당 번호 문서에 정의된 범위입니다. 프라이빗으로 예약된 16비트 AS 번호 집합은 64,512에서 65,534 사이 입니다. 프라이빗으로 예약된 32비트 AS 번호는 4,200,000,000에서 4,294,967,294 사이입니다.
또한보십시오
예: AS 경로에서 프라이빗 AS 번호 제거
이 예는 프라이빗 AS 번호가 인터넷에 발표되지 않도록 보급된 AS 경로에서 프라이빗 AS 번호를 제거하는 방법을 보여줍니다.
요구 사항
이 예제를 구성하기 전에 디바이스 초기화 이외의 특별한 구성은 필요하지 않습니다.
개요
서비스 프로바이더 및 엔터프라이즈 네트워크는 이 remove-private 문을 사용하여 프라이빗 AS 번호를 인터넷에 보급하는 것을 방지합니다. 명령문은 remove-private 아웃바운드 방향으로 작동합니다. 퍼블릭 AS 번호가 있고 프라이빗 AS 번호가 있는 하나 이상의 디바이스에 연결된 디바이스에서 문을 구성 remove-private 합니다. 일반적으로 프라이빗 AS 번호가 있는 디바이스에서는 이 명령문을 구성하지 않습니다.
그림 8은 샘플 토폴로지를 보여줍니다.
이 예에서 디바이스 R1은 프라이빗 AS 번호 65530을 사용하여 서비스 프로바이더에 연결됩니다. 이 예는 디바이스 R1의 프라이빗 AS 번호가 디바이스 R2에 공지되는 것을 방지하기 위해 디바이스 ISP에 구성된 문을 보여줍니다 remove-private . 디바이스 R2는 서비스 프로바이더의 AS 번호만 확인합니다.
BGP 옵션을 remove-private 추가하거나 삭제하면 영향을 받는 BGP 피어링 세션이 플랩됩니다.
구성
CLI 빠른 구성
이 예를 빠르게 구성하려면, 아래 명령을 복사하여 텍스트 파일로 붙여 넣은 다음 모든 라인브레이크를 제거하고, 네트워크 구성을 일치하는 데 필요한 세부 사항을 변경한 다음, 계층 수준에서 [edit] 명령을 복사하여 CLI에 붙여 넣습니다.
디바이스 R1
set interfaces fe-1/2/0 unit 1 family inet address 192.168.10.1/24
set interfaces lo0 unit 1 family inet address 10.10.10.1/32
set protocols bgp group ext type external
set protocols bgp group ext export send-direct
set protocols bgp group ext export send-static
set protocols bgp group ext peer-as 100
set protocols bgp group ext neighbor 192.168.10.10
set policy-options policy-statement send-direct term 1 from protocol direct
set policy-options policy-statement send-direct term 1 then accept
set policy-options policy-statement send-static term 1 from protocol static
set policy-options policy-statement send-static term 1 then accept
set routing-options static route 192.168.20.0/24 next-hop 192.168.10.10
set routing-options autonomous-system 65530
디바이스 ISP
set interfaces fe-1/2/0 unit 2 family inet address 192.168.10.10/24 set interfaces fe-1/2/1 unit 3 family inet address 192.168.20.20/24 set interfaces lo0 unit 2 family inet address 10.10.0.1/32 set protocols bgp group ext type external set protocols bgp group ext neighbor 192.168.10.1 peer-as 65530 set protocols bgp group ext neighbor 192.168.20.1 remove-private set protocols bgp group ext neighbor 192.168.20.1 peer-as 200 set routing-options autonomous-system 100
디바이스 R2
set interfaces fe-1/2/0 unit 4 family inet address 192.168.20.1/24 set interfaces lo0 unit 3 family inet address 10.10.20.1/32 set protocols bgp group ext type external set protocols bgp group ext export send-direct set protocols bgp group ext export send-static set protocols bgp group ext peer-as 100 set protocols bgp group ext neighbor 192.168.20.20 set policy-options policy-statement send-direct term 1 from protocol direct set policy-options policy-statement send-direct term 1 then accept set policy-options policy-statement send-static term 1 from protocol static set policy-options policy-statement send-static term 1 then accept set routing-options static route 192.168.10.0/24 next-hop 192.168.20.20 set routing-options autonomous-system 200
디바이스 ISP
단계별 절차
다음 예에서는 구성 계층에서 다양한 수준을 탐색해야 합니다. CLI 탐색에 대한 정보는 Junos OS CLI 사용자 가이드의 구성 모드에서 CLI 편집기 사용을 참조하십시오.
디바이스 ISP 구성:
-
인터페이스를 구성합니다.
[edit interfaces] user@ISP# set fe-1/2/0 unit 2 family inet address 192.168.10.10/24 user@ISP# set fe-1/2/1 unit 3 family inet address 192.168.20.20/24 user@ISP# set lo0 unit 2 family inet address 10.10.0.1/32
-
EBGP를 구성합니다.
[edit protocols bgp group ext] user@ISP# set type external user@ISP# set neighbor 192.168.10.1 peer-as 65530 user@ISP# set neighbor 192.168.20.1 peer-as 200
-
AS(Autonomous System) 200(디바이스 R2)의 인접 라우터의 경우, 보급된 AS 경로에서 프라이빗 AS 번호를 제거합니다.
[edit protocols bgp group ext] user@ISP# set neighbor 192.168.20.1 remove-private
-
AS 번호를 구성합니다.
[edit routing-options] user@ISP# set autonomous-system 100
결과
구성 모드에서 , show protocols및 show routing-options 명령을 show interfaces입력하여 구성을 확인합니다. 출력에 의도한 구성이 표시되지 않으면 이 예의 지침을 반복하여 구성을 수정합니다.
user@ISP# show interfaces
fe-1/2/0 {
unit 2 {
family inet {
address 192.168.10.10/24;
}
}
}
fe-1/2/1 {
unit 3 {
family inet {
address 192.168.20.20/24;
}
}
}
lo0 {
unit 2 {
family inet {
address 10.10.0.1/32;
}
}
}
user@ISP# show protocols
bgp {
group ext {
type external;
neighbor 192.168.10.1 {
peer-as 65530;
}
neighbor 192.168.20.1 {
remove-private;
peer-as 200;
}
}
}
user@ISP# show routing-options autonomous-system 100;
디바이스 구성이 완료되면 구성 모드에서 commit 을 입력합니다. 디바이스 R1 및 디바이스 R2에서 구성을 반복하고, 필요에 따라 인터페이스 이름과 IP 주소를 변경하고, 라우팅 정책 구성을 추가합니다.
검증
구성이 제대로 작동하고 있는지 확인합니다.
이웃 상태 확인
목적
디바이스 ISP가 디바이스 R2와의 이웃 세션에서 remove-private 설정을 활성화했는지 확인합니다.
작업
운영 모드에서 명령을 입력합니다.show bgp neighbor 192.168.20.1
user@ISP> show bgp neighbor 192.168.20.1
Peer: 192.168.20.1+179 AS 200 Local: 192.168.20.20+60216 AS 100
Type: External State: Established Flags: <ImportEval Sync>
Last State: OpenConfirm Last Event: RecvKeepAlive
Last Error: None
Options: <Preference RemovePrivateAS PeerAS Refresh>
Holdtime: 90 Preference: 170
Number of flaps: 0
Peer ID: 10.10.20.1 Local ID: 10.10.0.1 Active Holdtime: 90
Keepalive Interval: 30 Peer index: 0
BFD: disabled, down
Local Interface: fe-1/2/1.3
NLRI for restart configured on peer: inet-unicast
NLRI advertised by peer: inet-unicast
NLRI for this session: inet-unicast
Peer supports Refresh capability (2)
Stale routes from peer are kept for: 300
Peer does not support Restarter functionality
NLRI that restart is negotiated for: inet-unicast
NLRI of received end-of-rib markers: inet-unicast
NLRI of all end-of-rib markers sent: inet-unicast
Peer supports 4 byte AS extension (peer-as 200)
Peer does not support Addpath
Table inet.0 Bit: 10001
RIB State: BGP restart is complete
Send state: in sync
Active prefixes: 1
Received prefixes: 3
Accepted prefixes: 2
Suppressed due to damping: 0
Advertised prefixes: 1
Last traffic (seconds): Received 10 Sent 16 Checked 55
Input messages: Total 54 Updates 3 Refreshes 0 Octets 1091
Output messages: Total 54 Updates 1 Refreshes 0 Octets 1118
Output Queue[0]: 0
의미
RemovePrivateAS 이 옵션은 디바이스 ISP에 예상된 설정이 있음을 보여줍니다.
라우팅 테이블 확인
목적
디바이스에 예상되는 경로와 AS 경로가 있는지 확인합니다.
작업
운영 모드에서 명령을 입력합니다.show route protocol bgp
user@R1> show route protocol bgp
inet.0: 5 destinations, 5 routes (5 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.10.20.1/32 *[BGP/170] 00:28:57, localpref 100
AS path: 100 200 I
> to 192.168.10.10 via fe-1/2/0.1
user@ISP> show route protocol bgp
inet.0: 7 destinations, 11 routes (7 active, 0 holddown, 2 hidden)
+ = Active Route, - = Last Active, * = Both
10.10.10.1/32 *[BGP/170] 00:29:40, localpref 100
AS path: 65530 I
> to 192.168.10.1 via fe-1/2/0.2
10.10.20.1/32 *[BGP/170] 00:29:36, localpref 100
AS path: 200 I
> to 192.168.20.1 via fe-1/2/1.3
192.168.10.0/24 [BGP/170] 00:29:40, localpref 100
AS path: 65530 I
> to 192.168.10.1 via fe-1/2/0.2
192.168.20.0/24 [BGP/170] 00:29:36, localpref 100
AS path: 200 I
> to 192.168.20.1 via fe-1/2/1.3
user@R2> show route protocol bgp
inet.0: 5 destinations, 5 routes (5 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.10.10.1/32 *[BGP/170] 00:29:53, localpref 100
AS path: 100 I
> to 192.168.20.20 via fe-1/2/0.4
의미
디바이스 ISP는 디바이스 R1에 대한 AS 경로에 프라이빗 AS 번호 65530이 있습니다. 그러나 디바이스 ISP는 이 프라이빗 AS 번호를 디바이스 R2에 알리지 않습니다. 이는 디바이스 R2의 라우팅 테이블에 표시됩니다. 디바이스 R1에 대한 디바이스 R2의 경로에는 디바이스 ISP의 AS 번호만 포함됩니다.
remove-private 문이 비활성화된 경우 AS 경로 확인
목적
문이 remove-private 없으면 디바이스 R2의 라우팅 테이블에 프라이빗 AS 번호가 나타나는지 확인합니다.
작업
디바이스 ISP의 구성 모드에서 명령을 입력 deactivate remove-private 한 다음 디바이스 R2의 라우팅 테이블을 다시 확인합니다.
[protocols bgp group ext neighbor 192.168.20.1] user@ISP# deactivate remove-private user@ISP# commit
user@R2> show route protocol bgp
inet.0: 5 destinations, 5 routes (5 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.10.10.1/32 *[BGP/170] 00:00:54, localpref 100
AS path: 100 65530 I
> to 192.168.20.20 via fe-1/2/0.4
의미
프라이빗 AS 번호 65530은 디바이스 R1에 대한 디바이스 R2의 AS 경로에 나타납니다.
변경 내역 표
기능 지원은 사용 중인 플랫폼과 릴리스에 따라 결정됩니다. 기능 탐색기를 사용하여 플랫폼에서 기능이 지원되는지 확인합니다.