例:イーサネットベースのレイヤ 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 を使用する場合は、[edit interfaces
ethernet-interface-fpc
/pic
/port]
階層レベルで vlan-tagging
ステートメントを含めます。また、[edit interfaces
ethernet-interface-fpc
/pic
/port]
と[edit interfaces
ethernet-interface-fpc
/pic
/port
unit
unit-number]
の両方の階層レベルでencapsulation vlan-ccc
ステートメントを含めます。
[edit protocols]
階層レベルでl2circuit
ステートメントを設定して、レイヤー2 回線を確立します。レイヤー 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 回線を完了します。イーサネットベースのCEに面するインターフェイスをCCCカプセル化で設定します。繰り返しになりますが、VLAN CCCを使用する場合は、[edit interfaces
ethernet-interface-fpc
/pic
/port]
階層レベルにvlan-tagging
文を含める必要があります。また、[edit interfaces
ethernet-interface-fpc
/pic
/port]
と[edit interfaces
ethernet-interface-fpc
/pic
/port
unit
unit-number]
階層レベルの両方にencapsulation vlan-ccc
ステートメントを含めます。
[edit protocols]
階層レベルでl2circuit
ステートメントを設定して、レイヤー2 回線を確立します。レイヤー2 回線設定には、リモートPEネイバー(ルーターPE1)のIPアドレス、ルーターPE1で以前に設定した仮想回線識別子、およびCEルーターに接続されたインターフェイスを忘れずに含めてください。最後に、MPLS、LDP、および OSPF を設定して、レイヤー 2 回線のシグナリングを有効にします。
ルーター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
show ldp database
コマンドは、IP プレフィックスのバインディングを表示するだけでなく、レイヤー 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