예: MBGP MVPN에서 중복 가상 터널 인터페이스 구성
이 예는 멀티프로토콜 BGP(MBGP) 멀티캐스트 VPN(MVPN)에서 중복 가상 터널(VT) 인터페이스를 구성하는 방법을 보여줍니다. 구성하려면 라우팅 인스턴스에 여러 VT 인터페이스를 포함하고, 선택적으로 VT 인터페이스 중 하나에 명령문을 적용합니다 primary
.
요구 사항
중복 VT 인터페이스가 구성된 라우팅 디바이스는 Junos OS 릴리스 12.3 이상을 실행해야 합니다.
개요
구성
절차
CLI 빠른 구성
이 예를 빠르게 구성하려면, 아래 명령을 복사하여 텍스트 파일로 붙여 넣은 다음 모든 라인브레이크를 제거하고, 네트워크 구성을 일치하는 데 필요한 세부 사항을 변경한 다음, 계층 수준에서 명령을 CLI로 [edit]
복사해 붙여 넣습니다.
디바이스 CE1
set interfaces ge-1/2/0 unit 0 family inet address 10.1.1.1/30 set interfaces ge-1/2/0 unit 0 family mpls set interfaces lo0 unit 0 family inet address 192.0.2.1/24 set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ospf area 0.0.0.0 interface ge-1/2/0.0 set protocols pim rp static address 198.51.100.0 set protocols pim interface all set routing-options router-id 192.0.2.1
디바이스 CE2
set interfaces ge-1/2/0 unit 0 family inet address 10.1.1.18/30 set interfaces ge-1/2/0 unit 0 family mpls set interfaces lo0 unit 0 family inet address 192.0.2.6/24 set protocols sap listen 192.168.0.0 set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ospf area 0.0.0.0 interface ge-1/2/0.0 set protocols pim rp static address 198.51.100.0 set protocols pim interface all set routing-options router-id 192.0.2.6
디바이스 CE3
set interfaces ge-1/2/0 unit 0 family inet address 10.1.1.22/30 set interfaces ge-1/2/0 unit 0 family mpls set interfaces lo0 unit 0 family inet address 192.0.2.7/24 set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ospf area 0.0.0.0 interface ge-1/2/0.0 set protocols pim rp static address 198.51.100.0 set protocols pim interface all set routing-options router-id 192.0.2.7
디바이스 P
set interfaces ge-1/2/0 unit 0 family inet address 10.1.1.6/30 set interfaces ge-1/2/0 unit 0 family mpls set interfaces ge-1/2/1 unit 0 family inet address 10.1.1.9/30 set interfaces ge-1/2/1 unit 0 family mpls set interfaces lo0 unit 0 family inet address 192.0.2.3/24 set protocols mpls interface ge-1/2/0.0 set protocols mpls interface ge-1/2/1.0 set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ospf area 0.0.0.0 interface ge-1/2/0.0 set protocols ospf area 0.0.0.0 interface ge-1/2/1.0 set protocols ldp interface ge-1/2/0.0 set protocols ldp interface ge-1/2/1.0 set protocols ldp p2mp set routing-options router-id 192.0.2.3
디바이스 PE1
set interfaces ge-1/2/0 unit 0 family inet address 10.1.1.2/30 set interfaces ge-1/2/0 unit 0 family mpls set interfaces ge-1/2/1 unit 0 family inet address 10.1.1.5/30 set interfaces ge-1/2/1 unit 0 family mpls set interfaces vt-1/2/0 unit 2 family inet set interfaces lo0 unit 0 family inet address 192.0.2.2/24 set interfaces lo0 unit 1 family inet address 198.51.100.0/24 set protocols mpls interface ge-1/2/1.0 set protocols bgp group ibgp type internal set protocols bgp group ibgp local-address 192.0.2.2 set protocols bgp group ibgp family inet-vpn any set protocols bgp group ibgp family inet-mvpn signaling set protocols bgp group ibgp neighbor 192.0.2.4 set protocols bgp group ibgp neighbor 192.0.2.5 set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ospf area 0.0.0.0 interface ge-1/2/1.0 set protocols ldp interface ge-1/2/1.0 set protocols ldp p2mp set policy-options policy-statement parent_vpn_routes from protocol bgp set policy-options policy-statement parent_vpn_routes then accept set routing-instances vpn-1 instance-type vrf set routing-instances vpn-1 interface ge-1/2/0.0 set routing-instances vpn-1 interface vt-1/2/0.2 multicast set routing-instances vpn-1 interface lo0.1 set routing-instances vpn-1 route-distinguisher 100:100 set routing-instances vpn-1 provider-tunnel ldp-p2mp set routing-instances vpn-1 vrf-target target:1:1 set routing-instances vpn-1 protocols ospf export parent_vpn_routes set routing-instances vpn-1 protocols ospf area 0.0.0.0 interface lo0.1 passive set routing-instances vpn-1 protocols ospf area 0.0.0.0 interface ge-1/2/0.0 set routing-instances vpn-1 protocols pim rp static address 198.51.100.0 set routing-instances vpn-1 protocols pim interface ge-1/2/0.0 mode sparse set routing-instances vpn-1 protocols mvpn set routing-options router-id 192.0.2.2 set routing-options autonomous-system 1001
디바이스 PE2
set interfaces ge-1/2/0 unit 0 family inet address 10.1.1.10/30 set interfaces ge-1/2/0 unit 0 family mpls set interfaces ge-1/2/2 unit 0 family inet address 10.1.1.13/30 set interfaces ge-1/2/2 unit 0 family mpls set interfaces ge-1/2/1 unit 0 family inet address 10.1.1.17/30 set interfaces ge-1/2/1 unit 0 family mpls set interfaces vt-1/1/0 unit 0 family inet set interfaces vt-1/2/1 unit 0 family inet set interfaces lo0 unit 0 family inet address 192.0.2.4/24 set interfaces lo0 unit 1 family inet address 203.0.113.4/24 set protocols mpls interface ge-1/2/0.0 set protocols mpls interface ge-1/2/2.0 set protocols bgp group ibgp type internal set protocols bgp group ibgp local-address 192.0.2.4 set protocols bgp group ibgp family inet-vpn any set protocols bgp group ibgp family inet-mvpn signaling set protocols bgp group ibgp neighbor 192.0.2.2 set protocols bgp group ibgp neighbor 192.0.2.5 set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ospf area 0.0.0.0 interface ge-1/2/0.0 set protocols ospf area 0.0.0.0 interface ge-1/2/2.0 set protocols ldp interface ge-1/2/0.0 set protocols ldp interface ge-1/2/2.0 set protocols ldp p2mp set policy-options policy-statement parent_vpn_routes from protocol bgp set policy-options policy-statement parent_vpn_routes then accept set routing-instances vpn-1 instance-type vrf set routing-instances vpn-1 interface vt-1/1/0.0 multicast set routing-instances vpn-1 interface vt-1/1/0.0 primary set routing-instances vpn-1 interface vt-1/2/1.0 multicast set routing-instances vpn-1 interface ge-1/2/1.0 set routing-instances vpn-1 interface lo0.1 set routing-instances vpn-1 route-distinguisher 100:100 set routing-instances vpn-1 vrf-target target:1:1 set routing-instances vpn-1 protocols ospf export parent_vpn_routes set routing-instances vpn-1 protocols ospf area 0.0.0.0 interface lo0.1 passive set routing-instances vpn-1 protocols ospf area 0.0.0.0 interface ge-1/2/1.0 set routing-instances vpn-1 protocols pim rp static address 198.51.100.0 set routing-instances vpn-1 protocols pim interface ge-1/2/1.0 mode sparse set routing-instances vpn-1 protocols mvpn set routing-options router-id 192.0.2.4 set routing-options autonomous-system 1001
디바이스 PE3
set interfaces ge-1/2/0 unit 0 family inet address 10.1.1.14/30 set interfaces ge-1/2/0 unit 0 family mpls set interfaces ge-1/2/1 unit 0 family inet address 10.1.1.21/30 set interfaces ge-1/2/1 unit 0 family mpls set interfaces vt-1/2/0 unit 5 family inet set interfaces lo0 unit 0 family inet address 192.0.2.5/24 set interfaces lo0 unit 1 family inet address 203.0.113.5/24 set protocols mpls interface ge-1/2/0.0 set protocols bgp group ibgp type internal set protocols bgp group ibgp local-address 192.0.2.5 set protocols bgp group ibgp family inet-vpn any set protocols bgp group ibgp family inet-mvpn signaling set protocols bgp group ibgp neighbor 192.0.2.2 set protocols bgp group ibgp neighbor 192.0.2.4 set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ospf area 0.0.0.0 interface ge-1/2/0.0 set protocols ldp interface ge-1/2/0.0 set protocols ldp p2mp set policy-options policy-statement parent_vpn_routes from protocol bgp set policy-options policy-statement parent_vpn_routes then accept set routing-instances vpn-1 instance-type vrf set routing-instances vpn-1 interface vt-1/2/0.5 multicast set routing-instances vpn-1 interface ge-1/2/1.0 set routing-instances vpn-1 interface lo0.1 set routing-instances vpn-1 route-distinguisher 100:100 set routing-instances vpn-1 vrf-target target:1:1 set routing-instances vpn-1 protocols ospf export parent_vpn_routes set routing-instances vpn-1 protocols ospf area 0.0.0.0 interface lo0.1 passive set routing-instances vpn-1 protocols ospf area 0.0.0.0 interface ge-1/2/1.0 set routing-instances vpn-1 protocols pim rp static address 198.51.100.0 set routing-instances vpn-1 protocols pim interface ge-1/2/1.0 mode sparse set routing-instances vpn-1 protocols mvpn set routing-options router-id 192.0.2.5 set routing-options autonomous-system 1001
단계별 절차
다음 예제에서는 구성 계층의 다양한 수준을 탐색해야 합니다. CLI 탐색에 대한 정보는 CLI 사용자 가이드의 구성 모드에서 CLI 편집기 사용을 참조하십시오.
MBGP MVPN에서 중복 VT 인터페이스를 구성하려면 다음을 수행합니다.
물리적 인터페이스와 루프백 인터페이스를 구성합니다.
[edit interfaces] user@PE2# set ge-1/2/0 unit 0 family inet address 10.1.1.10/30 user@PE2# set ge-1/2/0 unit 0 family mpls user@PE2# set ge-1/2/2 unit 0 family inet address 10.1.1.13/30 user@PE2# set ge-1/2/2 unit 0 family mpls user@PE2# set ge-1/2/1 unit 0 family inet address 10.1.1.17/30 user@PE2# set ge-1/2/1 unit 0 family mpls user@PE2# set lo0 unit 0 family inet address 192.0.2.4/24 user@PE2# set lo0 unit 1 family inet address 203.0.113.4/24
VT 인터페이스를 구성합니다.
각 VT 인터페이스는 하나의 라우팅 인스턴스에서 구성할 수 있습니다.
[edit interfaces] user@PE2# set vt-1/1/0 unit 0 family inet user@PE2# set vt-1/2/1 unit 0 family inet
물리적 인터페이스에서 MPLS를 구성합니다.
[edit protocols mpls] user@PE2# set interface ge-1/2/0.0 user@PE2# set interface ge-1/2/2.0
BGP를 구성합니다.
[edit protocols bgp group ibgp] user@PE2# set type internal user@PE2# set local-address 192.0.2.4 user@PE2# set family inet-vpn any user@PE2# set family inet-mvpn signaling user@PE2# set neighbor 192.0.2.2 user@PE2# set neighbor 192.0.2.5
내부 게이트웨이 프로토콜을 구성합니다.
[edit protocols ospf area 0.0.0.0] user@PE2# set interface lo0.0 passive user@PE2# set interface ge-1/2/0.0 user@PE2# set interface ge-1/2/2.0
LDP를 구성합니다.
[edit protocols ldp] user@PE2# set interface ge-1/2/0.0 user@PE2# set interface ge-1/2/2.0 user@PE2# set p2mp
라우팅 정책을 구성합니다.
[edit policy-options policy-statement parent_vpn_routes] user@PE2# set from protocol bgp user@PE2# set then accept
라우팅 인스턴스를 구성합니다.
[edit routing-instances vpn-1] user@PE2# set instance-type vrf user@PE2# set interface ge-1/2/1.0 user@PE2# set interface lo0.1 user@PE2# set route-distinguisher 100:100 user@PE2# set vrf-target target:1:1 user@PE2# set protocols ospf export parent_vpn_routes user@PE2# set protocols ospf area 0.0.0.0 interface lo0.1 passive user@PE2# set protocols ospf area 0.0.0.0 interface ge-1/2/1.0 user@PE2# set protocols pim rp static address 198.51.100.0 user@PE2# set protocols pim interface ge-1/2/1.0 mode sparse user@PE2# set protocols mvpn
라우팅 인스턴스에서 중복 VT 인터페이스를 구성합니다.
vt-1/1/0.0을 기본 인터페이스로 설정합니다.
[edit routing-instances vpn-1] user@PE2# set interface vt-1/1/0.0 multicast primary user@PE2# set interface vt-1/2/1.0 multicast
라우터 ID 및 AS(Autonomous System) 번호를 구성합니다.
[edit routing-options] user@PE2# set router-id 192.0.2.4 user@PE2# set autonomous-system 1001
결과
구성 모드에서 , show protocols, show policy-options, show routing-instances및 show routing-options 명령을 입력하여 show interfaces구성을 확인합니다. 출력이 의도한 구성을 표시하지 않으면, 이 예의 구성 지침을 반복하여 수정합니다.
user@PE2# show interfaces ge-1/2/0 { unit 0 { family inet { address 10.1.1.10/30; } family mpls; } } ge-1/2/2 { unit 0 { family inet { address 10.1.1.13/30; } family mpls; } } ge-1/2/1 { unit 0 { family inet { address 10.1.1.17/30; } family mpls; } } vt-1/1/0 { unit 0 { family inet; } } vt-1/2/1 { unit 0 { family inet; } } lo0 { unit 0 { family inet { address 192.0.2.4/24; } } unit 1 { family inet { address 203.0.113.4/24; } } }
user@PE2# show protocols mpls { interface ge-1/2/0.0; interface ge-1/2/2.0; } bgp { group ibgp { type internal; local-address 192.0.2.4; family inet-vpn { any; } family inet-mvpn { signaling; } neighbor 192.0.2.2; neighbor 192.0.2.5; } } ospf { area 0.0.0.0 { interface lo0.0 { passive; } interface ge-1/2/0.0; interface ge-1/2/2.0; } } ldp { interface ge-1/2/0.0; interface ge-1/2/2.0; p2mp; }
user@PE2# show policy-options policy-statement parent_vpn_routes { from protocol bgp; then accept; }
user@PE2# show routing-instances vpn-1 { instance-type vrf; interface vt-1/1/0.0 { multicast; primary; } interface vt-1/2/1.0 { multicast; } interface ge-1/2/1.0; interface lo0.1; route-distinguisher 100:100; vrf-target target:1:1; protocols { ospf { export parent_vpn_routes; area 0.0.0.0 { interface lo0.1 { passive; } interface ge-1/2/1.0; } } pim { rp { static { address 198.51.100.0; } } interface ge-1/2/1.0 { mode sparse; } } mvpn; } }
user@PE2# show routing-options router-id 192.0.2.4; autonomous-system 1001;
디바이스 구성을 마쳤으면 구성 모드에서 을 입력합니다 commit .
확인
구성이 올바르게 작동하고 있는지 확인합니다.
또한 이 show multicast route extensive instance instance-name
명령은 멀티캐스트 트래픽이 VPN을 통해 전송될 때 멀티캐스트 포워딩 테이블에 VT 인터페이스를 표시합니다.
LSP 경로 확인
목적
예상되는 LT 인터페이스가 LDP 학습 경로에 할당되었는지 확인합니다.
행동
운영 모드에서 명령을 입력합니다 show route table mpls .
user@PE2> show route table mpls mpls.0: 13 destinations, 13 routes (13 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 0 *[MPLS/0] 02:09:36, metric 1 Receive 1 *[MPLS/0] 02:09:36, metric 1 Receive 2 *[MPLS/0] 02:09:36, metric 1 Receive 13 *[MPLS/0] 02:09:36, metric 1 Receive 299776 *[LDP/9] 02:09:14, metric 1 > via ge-1/2/0.0, Pop 299776(S=0) *[LDP/9] 02:09:14, metric 1 > via ge-1/2/0.0, Pop 299792 *[LDP/9] 02:09:09, metric 1 > via ge-1/2/2.0, Pop 299792(S=0) *[LDP/9] 02:09:09, metric 1 > via ge-1/2/2.0, Pop 299808 *[LDP/9] 02:09:04, metric 1 > via ge-1/2/0.0, Swap 299808 299824 *[VPN/170] 02:08:56 > via ge-1/2/1.0, Pop 299840 *[VPN/170] 02:08:56 > via ge-1/2/1.0, Pop 299856 *[VPN/170] 02:08:56 receive table vpn-1.inet.0, Pop 299872 *[LDP/9] 02:08:54, metric 1 > via vt-1/1/0.0, Pop via ge-1/2/2.0, Swap 299872
구성 모드에서 vt-1/1/0.0 인터페이스에서 문을 제거하고
primary
vt-1/2/1.0 인터페이스에 추가하여 기본 VT 인터페이스를 변경합니다.[edit routing-instances vpn-1] user@PE2# delete interface vt-1/1/0.0 primary user@PE2# set interface vt-1/2/1.0 primary user@PE2# commit
운영 모드에서 명령을 입력합니다 show route table mpls .
user@PE2> show route table mpls mpls.0: 13 destinations, 13 routes (13 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 0 *[MPLS/0] 02:09:36, metric 1 Receive 1 *[MPLS/0] 02:09:36, metric 1 Receive 2 *[MPLS/0] 02:09:36, metric 1 Receive 13 *[MPLS/0] 02:09:36, metric 1 Receive 299776 *[LDP/9] 02:09:14, metric 1 > via ge-1/2/0.0, Pop 299776(S=0) *[LDP/9] 02:09:14, metric 1 > via ge-1/2/0.0, Pop 299792 *[LDP/9] 02:09:09, metric 1 > via ge-1/2/2.0, Pop 299792(S=0) *[LDP/9] 02:09:09, metric 1 > via ge-1/2/2.0, Pop 299808 *[LDP/9] 02:09:04, metric 1 > via ge-1/2/0.0, Swap 299808 299824 *[VPN/170] 02:08:56 > via ge-1/2/1.0, Pop 299840 *[VPN/170] 02:08:56 > via ge-1/2/1.0, Pop 299856 *[VPN/170] 02:08:56 receive table vpn-1.inet.0, Pop 299872 *[LDP/9] 02:08:54, metric 1 > via vt-1/2/1.0, Pop via ge-1/2/2.0, Swap 299872
의미
원래 구성에서는 출력에 vt-1/1/0.0 인터페이스가 표시됩니다. 기본 인터페이스를 vt-1/2/1.0으로 변경하면 출력에 vt-1/2/1.0 인터페이스가 표시됩니다.