例:NFX150 デバイスでのクロス コネクトの設定
この例では、NFX150デバイスでクロスコネクトを設定する方法を示しています。
要件
この例では、以下のハードウェアとソフトウェアのコンポーネントを使用しています。
Junos OSリリース18.1R1を実行するNFX150
概要
クロスコネクト機能により、任意の 2 つの VNF インターフェイス間でトラフィックを切り替えることができます。任意の 2 つの VNF インターフェイス間で、すべてのトラフィックまたは特定の VLAN に属するトラフィックを双方向に切り替えることができます。
この機能は、一方向トラフィック フローをサポートしていません。
クロスコネクト機能は以下をサポートします。
すべてのネットワークトラフィックに対応する2つのVNFインターフェイス間のポートクロスコネクト。
以下の機能をサポートする VNF インターフェイス間の VLAN ベースのトラフィック転送:
VLAN ID に基づいてトラフィックを切り替えるオプションを提供します。
POP運用によりトランクからアクセスポートへのネットワークトラフィックフローをサポートします。
PUSH動作により、アクセスからトランクポートへのネットワークトラフィックフローをサポートします。
VLAN プッシュ、ポップ、スワップ操作をサポートします。
構成
VLANの作成
手順
LAN 側インターフェイスの VLAN を設定します。
user@host# set vlans vlan100 vlan-id 100 user@host# set vlans vlan200 vlan-id 200
インターフェイスのマッピング
手順
heth-0-0物理ポートをFPC0インターフェイスにマッピングします。
user@host# set vmhost virtualization-options interfaces ge-0/0/0 mapping interface heth-0-0
heth-0-1物理ポートをFPC0インターフェイスにマッピングします。
user@host# set vmhost virtualization-options interfaces ge-0/0/1 mapping interface heth-0-1
FPC1インターフェイスge-1/0/2をシステムブリッジOVSにマッピングします。
user@host# set vmhost virtualization-options interfaces ge-1/0/2
レイヤー2データパスの設定
手順
LAN 側のフロント パネル ポートを設定し、LAN 側 VLAN に追加します。
user@host# set interfaces ge-0/0/0 unit 0 family ethernet-switching interface-mode trunk user@host# set interfaces ge-0/0/0 unit 0 family ethernet-switching vlan members vlan100
内部に面したインターフェイスをトランク ポートとして設定し、LAN 側 VLAN に追加します。内部に面するインターフェイスは、複数のフロントパネルポートおよびVLANからのトラフィックをサポートする必要があるため、通常はトランクポートとなります。
user@host# set interfaces sxe-0/0/0 unit 0 family ethernet-switching interface-mode trunk user@host# set interfaces sxe-0/0/0 unit 0 family ethernet-switching vlan members vlan100
レイヤー3データパスの設定
手順
ge-1/0/0 で VLAN タギングを設定します。
user@host# set interfaces ge-1/0/0 vlan-tagging user@host# set interfaces ge-1/0/0 unit 0 vlan-id 100 user@host# set interfaces ge-1/0/0 unit 0 family inet address 192.0.3.1/24
ge-1/0/2 で VLAN タギングを設定します。
user@host# set interfaces ge-1/0/2 vlan-tagging user@host# set interfaces ge-1/0/2 unit 0 vlan-id 200 user@host# set interfaces ge-1/0/2 unit 0 family inet address 203.0.113.2/24
VNFを設定する
手順
VNFを起動します。
user@host# set virtual-network-functions vnf-name image /var/public/centos-updated1.img user@host# set virtual-network-functions vnf-name image image-type raw
VNF に必要な CPU の数を指定します。
user@host# set virtual-network-functions vnf-name virtual-cpu count 1
仮想 CPU を物理 CPU にピン留めします。
user@host# set virtual-network-functions vnf-name virtual-cpu 0 physical-cpu 2
ホストVLANを作成します。
user@host# set vmhost vlans vlan200 vlan-id 200
VNF インターフェイスをトランク ポートとして設定し、LAN 側 VLAN に追加します。
user@host# set virtual-network-functions vnf-name interfaces eth2 mapping vlan mode trunk user@host# set virtual-network-functions vnf-name interfaces eth2 mapping vlan members vlan200
SR-IOV 仮想機能を使用して、VNF インターフェイスを物理インターフェイスに接続します。
user@host# set virtual-network-functions vnf-name interfaces eth3 mapping interface heth-0-4 virtual-function vlan-id 300
VNFのメモリ割り当てを指定します。
user@host# set virtual-network-functions memory size 1048576
クロスコネクトの設定
手順
クロスコネクトを設定します。
user@host# set vmhost cross-connect c1 virtual-interface ge-1/0/2 user@host# set vmhost cross-connect c1 virtual-network-function vnf-name interface eth2
設定の確認
コントロール プレーンの設定の確認
目的
コントロールプレーンの設定を確認します。
アクション
コントロールプレーンの設定を確認するには:
コマンドを使用して、VLAN と VLAN メンバーシップが正しい
show vmhost vlans
ことを確認します。user@host> show vmhost vlans Routing instance VLAN name Tag Interfaces vmhost custom-br ge-1/0/2.0 vnf-name_eth2.0 vmhost vlan200 200
VNFが動作していることを確認します。VNF のステータスを表示して、VNF が稼働していることを確認します。
user@host# show virtual-network-functions vnf-name ID Name State Liveliness -------------------------------------------------------------------------------- 2 vnf-name Running alive
VNFの出力フィールドは
Liveliness
、VNFのIPアドレスがJunosから到達可能かどうかを示します。VNFの詳細を表示するには:
user@host# show virtual-network-functions vnf-name detail Virtual Network Function Information ------------------------------------ Id: 2 Name: vnf-name State: Running Liveliness: Up IP Address: 192.0.2.101 VCPUs: 1 Maximum Memory: 1048576 KiB Used Memory: 1048576 KiB Used 1G Hugepages: 0 Used 2M Hugepages: 0 Error: None
データ プレーンの設定の確認
目的
データ プレーンの設定を検証します。
アクション
データ プレーンの設定を確認するには:
物理ポートのステータスを確認します。
user@host> show interfaces heth-0-0 statistics Physical interface: heth-0-0, Enabled, Physical link is Up Link-level type: Ethernet, Media type: Copper, MTU: 9192, Speed: 1Gbps, Duplex: Full-duplex, Auto-negotiation: Enabled Device flags : Present Running Current address: 00:00:5e:00:53:8d, Hardware address: 00:00:5e:00:53:8d Input packets : 311143 Output packets: 674 MAC statistics: Input bytes: 19913152, Input packets: 311143, Output bytes: 48658, Output packets: 674 VF statistics: VF Number: 0, PCI Address: 0000:02:10:1, Mapped to: ge-0/0/0 Input bytes: 19909120, Input packets: 311080, Output bytes: 48658, Output packets: 674, Multicast packets: 311080 VF Number: 1, PCI Address: 0000:02:10:5, Mapped to: ge-0/0/0 Input bytes: 0, Input packets: 0, Output bytes: 0, Output packets: 0, Multicast packets: 0 VF Number: 2, PCI Address: 0000:02:11:1, Mapped to: ge-0/0/0 Input bytes: 0, Input packets: 0, Output bytes: 0, Output packets: 0, Multicast packets: 0 VF Number: 3, PCI Address: 0000:02:11:5, Mapped to: ge-0/0/0 Input bytes: 0, Input packets: 0, Output bytes: 0, Output packets: 0, Multicast packets: 0
レイヤー 2(ge-0/0/x)およびレイヤー 3(ge-1/0/x)インターフェイスのステータスを検証します。
user@host > show interfaces interface-name statistics
例えば:
user@host > show interfaces ge-0/0/0 statistics Physical interface: ge-0/0/0, Enabled, Physical link is Up Interface index: 144, SNMP ifIndex: 518 Link-level type: Ethernet, MTU: 9192, LAN-PHY mode, Speed: 1000mbps, BPDU Error: None, Loop Detect PDU Error: None, Ethernet-Switching Error: None, MAC-REWRITE Error: None, Loopback: Disabled, Source filtering: Disabled, Flow control: Enabled Device flags : Present Running Interface flags: SNMP-Traps Internal: 0x4000 Link flags : None CoS queues : 8 supported, 8 maximum usable queues Current address: 00:00:5e:00:53:43, Hardware address: 00:00:5e:00:53:43 Last flapped : 2018-04-18 05:38:22 UTC (6d 00:28 ago) Statistics last cleared: Never Input rate : 0 bps (0 pps) Output rate : 0 bps (0 pps) Input errors: 0, Output errors: 0 Active alarms : None Active defects : None PCS statistics Seconds Bit errors 0 Errored blocks 0 Ethernet FEC statistics Errors FEC Corrected Errors 0 FEC Uncorrected Errors 0 FEC Corrected Errors Rate 0 FEC Uncorrected Errors Rate 0 PRBS Statistics : Disabled Interface transmit statistics: Disabled Logical interface ge-0/0/0.0 (Index 333) (SNMP ifIndex 524) Flags: Up SNMP-Traps 0x24024000 Encapsulation: Ethernet-Bridge Input packets : 311115 Output packets: 22 Protocol eth-switch, MTU: 9192 Flags: Trunk-Mode
user@host > show interfaces ge-1/0/2 statistics Physical interface: ge-1/0/2, Enabled, Physical link is Up Interface index: 158, SNMP ifIndex: 536 Link-level type: Ethernet, MTU: 1518, LAN-PHY mode, Link-mode: Full-duplex, Speed: 1000mbps, BPDU Error: None, Loop Detect PDU Error: None, Ethernet-Switching Error: None, MAC-REWRITE Error: None, Loopback: Disabled, Source filtering: Disabled, Flow control: Enabled, Auto-negotiation: Enabled, Remote fault: Online Device flags : Present Running Interface flags: SNMP-Traps Internal: 0x4000 CoS queues : 8 supported, 8 maximum usable queues Current address: 00:00:5e:00:53:5d, Hardware address: 00:00:5e:00:53:5d Last flapped : 2018-04-23 06:03:29 UTC (1d 00:04 ago) Statistics last cleared: Never Input rate : 0 bps (0 pps) Output rate : 0 bps (0 pps) Input errors: 0, Output errors: 0 Active alarms : None Active defects : None PCS statistics Seconds Bit errors 0 Errored blocks 0 Ethernet FEC statistics Errors FEC Corrected Errors 0 FEC Uncorrected Errors 0 FEC Corrected Errors Rate 0 FEC Uncorrected Errors Rate 0 PRBS Statistics : Disabled Interface transmit statistics: Disabled Logical interface ge-1/0/2.0 (Index 342) (SNMP ifIndex 538) Flags: Up SNMP-Traps 0x4000 VLAN-Tag [ 0x8100.200 ] Encapsulation: ENET2 Input packets : 0 Output packets: 0 Security: Zone: untrust Allowed host-inbound traffic : dns dhcp tftp https Protocol inet, MTU: 1500 Max nh cache: 75000, New hold nh limit: 75000, Curr nh cnt: 0, Curr new hold cnt: 0, NH drop cnt: 0 Flags: Sendbcast-pkt-to-re Addresses, Flags: Is-Preferred Is-Primary Destination: 203.0.113/24, Local: 203.0.113.2, Broadcast: 203.0.113.255 Protocol multiservice, MTU: Unlimited Logical interface ge-1/0/2.32767 (Index 343) (SNMP ifIndex 545) Flags: Up SNMP-Traps 0x4004000 VLAN-Tag [ 0x0000.0 ] Encapsulation: ENET2 Input packets : 0 Output packets: 0 Security: Zone: Null Protocol multiservice, MTU: Unlimited Flags: None