예: 이더넷 기반 레이어 2 서킷 구성

그림 1에서는 라우터 PE1과 PE2 사이에 레이어 2 서킷이 설정되어 고객 라우터 CE1과 CE2 사이에 레이어 2 트래픽을 전달합니다. 레이어 2 서킷 VC 연결은 PE 라우터에서만 구성됩니다. CE 라우터에는 특별한 구성이 필요하지 않으며, 프로바이더 코어 P0 라우터는 PE 라우터 간에 레이블을 공유할 수 있도록 적절한 인터페이스에 MPLS 및 LDP만 있으면 됩니다.
라우터 CE1에서 고속 이더넷 인터페이스를 구성하여 VLAN 트래픽을 처리합니다. 여기와 라우터 CE2의 고속 이더넷 인터페이스 모두에서 동일한 VLAN ID를 사용해야 합니다.
라우터 CE1
[edit] interfaces { fe-1/1/2 { description "to PE1 fe-1/1/0"; vlan-tagging; unit 600 { vlan-id 600; # Be sure this VLAN ID matches the VLAN ID of your CE neighbor. family inet { address 10.1.1.1/24; } } } }
라우터 PE1에서 원하는 CCC 캡슐화 유형을 사용하여 이더넷 기반 고객 에지(CE) 대면 인터페이스를 구성합니다. VLAN CCC를 사용하는 경우 계층pic
수준에서 //port]
문을 ethernet-interface-fpc
[edit interfaces
포함합니다vlan-tagging
. 또한 //port]
및 [edit interfaces
ethernet-interface-fpc
/pic
pic
/ unit
unit-number]
port
계층 수준 모두에 ethernet-interface-fpc
[edit interfaces
문을 포함합니다.encapsulation vlan-ccc
계층 수준에서 문을 구성 l2circuit
하여 레이어 2 서킷을 [edit protocols]
설정합니다. 레이어 2 서킷 컨피그레이션에 원격 PE 네이버의 IP 주소(일반적으로 네이버의 루프백 주소), CE 라우터에 연결된 인터페이스 및 이 VC에 대한 가상 서킷 식별자를 포함해야 합니다. 그런 다음 MPLS, LDP 및 IGP(예: OSPF)를 구성하여 레이어 2 서킷에 대한 신호 처리를 활성화합니다.
라우터 PE1
[edit] interfaces { so-0/1/0 { description "to P0 so-0/0/0"; unit 0 { family inet { address 192.168.245.22/30; } family mpls; # Include the MPLS family on core-facing interfaces. } } fe-1/1/0 { description "to CE1 fe-1/1/2"; vlan-tagging; encapsulation vlan-ccc; # Configure CCC encapsulation on CE-facing interfaces. unit 600 { encapsulation vlan-ccc; # Enable this encapsulation on the logical interface. vlan-id 600; } } lo0 { unit 0 { family inet { address 10.245.14.173/32; } } } } protocols { ospf { traffic-engineering; area 0.0.0.0 { interface so-0/1/0.0; interface lo0.0; } } ldp { # LDP is required as the signaling protocol for Layer 2 circuits. interface so-0/1/0.0; interface lo0.0;# You must include the loopback address in LDP. } l2circuit { neighbor 10.245.14.179 { # This points to the loopback of the PE neighbor. interface fe-1/1/0.600 { # Here you include the local CE-facing interface. virtual-circuit-id 5; # Be sure this ID matches the ID of your PE neighbor. } } } }
라우터 P0에서 PE 라우터에 연결된 인터페이스에 LDP, MPLS 및 OSPF를 구성합니다. 코어 라우터는 수신 PR 라우터에서 송신 PE 라우터로 레이어 2 트래픽을 터널링하는 데 필요한 MPLS 백본을 제공합니다.
라우터 P0
[edit] interfaces { so-0/0/0 { description "to PE1 so-0/1/0"; unit 0 { family inet { address 192.168.245.21/30; } family mpls; # Include the MPLS family on core interfaces. } } t3-0/2/1 { description "to PE2 t3-0/1/0"; unit 0 { family inet { address 192.168.245.17/30; } family mpls; # Include the MPLS family on core interfaces. } } lo0 { unit 0 { family inet { address 10.245.14.171/32; } } } } protocols { ospf { traffic-engineering; area 0.0.0.0 { interface so-0/0/0.0; interface t3-0/2/1.0; } } ldp { # LDP is required as the signaling protocol for Layer 2 circuits. interface so-0/0/0.0; interface t3-0/2/1.0; } }
라우터 PE2에서 이전에 라우터 PE1에 설정된 것과 일치하도록 문을 구성하여 레이어 2 서킷을 완료합니다. CCC 캡슐화를 통해 이더넷 기반 CE 대면 인터페이스를 구성합니다. 다시 말하지만, VLAN CCC를 [edit interfaces
ethernet-interface-fpc
사용할 때는 /pic
/port]
계층 수준에서 문을 포함해야 vlan-tagging
합니다. 또한 //port]
및 [edit interfaces
ethernet-interface-fpc
/pic
pic
/ unit
unit-number]
port
계층 수준 모두에ethernet-interface-fpc
[edit interfaces
문을 포함합니다.encapsulation vlan-ccc
계층 수준에서 문을 구성 l2circuit
하여 레이어 2 서킷을 [edit protocols]
설정합니다. 레이어 2 서킷 구성에 원격 PE 이웃(라우터 PE1)의 IP 주소, 라우터 PE1에서 이전에 구성된 가상 서킷 식별자 및 CE 라우터에 연결된 인터페이스를 포함해야 합니다. 마지막으로, 레이어 2 서킷에 대한 시그널링을 활성화하도록 MPLS, LDP 및 OSPF를 구성합니다.
라우터 PE2
[edit] interfaces { t3-0/1/0 { description "P0 t3-0/2/1"; unit 0 { family inet { address 192.168.245.18/30; } family mpls; # Include the MPLS family on core-facing interfaces. } } fe-0/2/0 { description "to CE2 fe-0/2/0"; vlan-tagging; encapsulation vlan-ccc; # Configure CCC encapsulation on CE-facing interfaces. unit 600 { encapsulation vlan-ccc; # Enable this encapsulation on the logical interface. vlan-id 600; } } lo0 { unit 0 { family inet { address 10.245.14.179/32; } } } } protocols { ospf { traffic-engineering; area 0.0.0.0 { interface t3-0/1/0.0; interface lo0.0; } } ldp { # LDP is required as the signaling protocol for Layer 2 circuits. interface t3-0/1/0.0; interface lo0.0; # You must include the loopback address in LDP. } l2circuit { neighbor 10.245.14.173 { # This points to the loopback of the PE neighbor. interface fe-0/2/0.600 { # Here you include the local CE-facing interface. virtual-circuit-id 5; # Be sure this ID matches the ID of your PE neighbor. } } } }
라우터 CE2에서 고속 이더넷 인터페이스를 구성하여 VLAN 트래픽을 처리합니다. 이 인터페이스에서 라우터 CE1의 고속 이더넷 인터페이스에 표시되는 것과 동일한 VLAN ID를 사용해야 합니다.
라우터 CE2
[edit] interfaces { fe-0/2/0 { description "to PE2 fe-0/2/0"; vlan-tagging; unit 600 { vlan-id 600; # Be sure this VLAN ID matches the VLAN ID of your CE neighbor. family inet { address 10.1.1.2/24; } } } }
작업 확인
레이어 2 회로가 제대로 작동하는지 확인하려면 다음 명령을 사용합니다.
ping mpls l2circuit interfaceinterface-name
ping mpls l2circuit virtual-circuit virtual-circuit-id neighbor
ip-address
show l2circuit connections
옵션:
[brief] | [down] | [extensive] | [history] | [instance] | [local-site] | [remote-site] |[status] | [summary] | [up] | [up-down]
show ldp database
명령은 IP 접두사에 대한 바인딩을 표시할 뿐만 아니라 show ldp database
레이어 2 FEC에 대한 바인딩도 표시합니다.
다음 섹션은 구성 예제와 함께 사용되는 이러한 명령의 출력을 보여줍니다.
라우터 PE1 상태
user@PE1> show l2circuit connections Layer-2 Circuit Connections: Legend for connection status (St) Legend for interface status EI -- encapsulation invalid UP -- operational MM -- mtu mismatch Dn -- down EM -- encapsulation mismatch NP -- no present OL -- no outgoing label DS -- disabled Dn -- down WE -- wrong encapsulation VC-Dn -- Virtual circuit Down UN -- uninitialized UP -- operational XX -- unknown Neighbor: 10.245.14.179 Interface Type St Time last up # Up trans fe-1/1/0.600 (vc 5) rmt Up Nov 30 00:54:55 2001 1 Local interface: fe-1/1/0.600, Status: Up, Encapsulation: VLAN Remote PE: 10.245.14.179, Negotiated control-word: Yes (Null) Incoming label: 100007, Outgoing label: 100000 user@PE1> show ldp database Input label database, 10.245.14.173:0-10.245.14.171:0 Label Prefix 100019 10.245.14.173/32 100020 10.245.14.179/32 3 10.245.14.171/32 Output label database, 10.245.14.173:0-10.245.14.171:0 Label Prefix 100009 10.245.14.179/32 3 10.245.14.173/32 100008 10.245.14.171/32 Input label database, 10.245.14.173:0-10.245.14.179:0 Label Prefix 100001 10.245.14.171/32 100002 10.245.14.173/32 3 10.245.14.179/32 100000 L2CKT VLAN VC 5 Output label database, 10.245.14.173:0-10.245.14.179:0 Label Prefix 100009 10.245.14.179/32 3 10.245.14.173/32 100008 10.245.14.171/32 100007 L2CKT VLAN VC 5
라우터 P0 상태
user@P0> show ldp database Input label database, 10.245.14.171:0-10.245.14.173:0 Label Prefix 3 10.245.14.173/32 100009 10.245.14.179/32 100008 10.245.14.171/32 Output label database, 10.245.14.171:0-10.245.14.173:0 Label Prefix 100019 10.245.14.173/32 100020 10.245.14.179/32 3 10.245.14.171/32 Input label database, 10.245.14.171:0-10.245.14.179:0 Label Prefix 100001 10.245.14.171/32 3 10.245.14.179/32 100002 10.245.14.173/32 Output label database, 10.245.14.171:0-10.245.14.179:0 Label Prefix 100019 10.245.14.173/32 100020 10.245.14.179/32 3 10.245.14.171/32
라우터 PE2 상태
user@PE2> show l2circuit connections Layer-2 Circuit Connections: Legend for connection status (St) Legend for interface status EI -- encapsulation invalid UP -- operational MM -- mtu mismatch Dn -- down EM -- encapsulation mismatch NP -- no present OL -- no outgoing label DS -- disabled Dn -- down WE -- wrong encapsulation VC-Dn -- Virtual circuit Down UN -- uninitialized UP -- operational XX -- unknown Neighbor: 10.245.14.173 Interface Type St Time last up # Up trans fe-0/2/0.600 (vc 5) rmt Up Nov 30 00:54:54 2001 1 Local interface: fe-0/2/0.600, Status: Up, Encapsulation: VLAN Remote PE: 10.245.14.173, Negotiated control-word: Yes (Null) Incoming label: 100000, Outgoing label: 100007 user@PE2> show ldp database Input label database, 10.245.14.179:0-10.245.14.171:0 Label Prefix 100019 10.245.14.173/32 3 10.245.14.171/32 100020 10.245.14.179/32 Output label database, 10.245.14.179:0-10.245.14.171:0 Label Prefix 100001 10.245.14.171/32 100002 10.245.14.173/32 3 10.245.14.179/32 Input label database, 10.245.14.179:0-10.245.14.173:0 Label Prefix 3 10.245.14.173/32 100008 10.245.14.171/32 100009 10.245.14.179/32 100007 L2CKT VLAN VC 5 Output label database, 10.245.14.179:0-10.245.14.173:0 Label Prefix 100001 10.245.14.171/32 100002 10.245.14.173/32 3 10.245.14.179/32 100000 L2CKT VLAN VC 5