例:NFX250 NextGenデバイスでのカスタムブリッジを使用したサービスチェイニングの設定
この例では、カスタムブリッジを使用してサービスチェイニングを構成する方法を示します。
要件
この例では、Junos OS リリース 19.1R1 を実行する NFX250 NextGen デバイスを使用します。
概要
デフォルトのシステム ブリッジは OVS(Open vSwitch)です。OVSブリッジはVLAN対応システムブリッジであり、VNFとFPCが接続するネットワーク機能仮想化(NFV)バックプレーンとして機能します。ただし、要件に基づいてカスタムブリッジを作成することを選択できます。この例では、カスタムブリッジを使用してサービスチェイニングを構成する方法について説明します。
構成
VLAN の構成とカスタム ブリッジの作成
手順
LAN 側インターフェイスの VLAN を設定します。
user@host# set vlans vlan100 vlan-id 100 user@host# set vlans vlan200 vlan-id 200
カスタムブリッジを作成します。
user@host# set vmhost vlans custom-br vlan-id none
レイヤー 3 インターフェイスをカスタム ブリッジにマッピングします。
user@host# set vmhost virtualization-options interfaces ge-1/0/2 mapping vlan custom-br
レイヤー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 user@host# set interfaces xe-0/0/12 unit 0 family ethernet-switching interface-mode trunk user@host# set interfaces xe-0/0/12 unit 0 family ethernet-switching vlan members vlan200
内部に面したインターフェイスをトランク ポートとして設定し、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 user@host# set interfaces sxe-0/0/1 unit 0 family ethernet-switching interface-mode trunk user@host# set interfaces sxe-0/0/1 unit 0 family ethernet-switching vlan members vlan200
レイヤー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.2.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 の設定
手順
この例では、レイヤー2 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
vmhost インスタンスを構成します。
user@host# set vmhost vlans vlan200 vlan-id 200
カスタム OVS ブリッジで VNF インターフェイスを作成します。
user@host# set virtual-network-functions vnf-name interfaces eth2 mapping vlan members custom-br
OVS ブリッジ上に VNF インターフェイスを作成します。
user@host# set virtual-network-functions vnf-name interfaces eth3 mapping vlan members vlan200
VNFのメモリ割り当てを指定します。
user@host# set virtual-network-functions vnf-name memory size 1048576
メモ:VNFインターフェイスがカスタムブリッジにマッピングされている場合、マッピングを有効にするには、VNFを再起動する必要があります。
設定の確認
コントロール プレーンの設定の確認
目的
コントロールプレーンの設定を確認します。
アクション
VLAN が構成されていることを確認します。
user@host > show vlans Routing instance VLAN name Tag Interfaces default-switch default 1 default-switch vlan100 100 ge-0/0/0.0* sxe-0/0/0.0* default-switch vlan200 200 sxe-0/0/1.0* xe-0/0/12.0*
vmhost VLAN を検証します。
user@host> show vmhost vlans Routing instance VLAN name Tag Interfaces vmhost custom-br vnf-name_eth2.0 vmhost vlan200 200 vnf-name_eth3.0
VNFが動作していることを確認します。フィールドには
State
、稼働中の VNF が表示されますRunning
。user@host> show virtual-network-functions ID Name State Liveliness -------------------------------------------------------------------------------- 4 vnf-name Running alive 1 vjunos0 Running alive
VNFのフィールドは
Liveliness
、VNFの内部管理IPアドレスがJunosコントロールプレーン(JCP)から到達可能かどうかを示します。VNFの詳細を表示するには:
user@host> show virtual-network-functions vnf-name detail Virtual Network Function Information ------------------------------------ Id: 4 Name: vnf-name State: Running Liveliness: alive IP Address: 192.0.2.100 VCPUs: 1 Maximum Memory: 1048576 KiB Used Memory: 1048576 KiB Used 1G Hugepages: 0 Used 2M Hugepages: 0 Error: None
データ プレーン設定の検証
目的
データ プレーンの設定を検証します。
アクション
レイヤー 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: 149, SNMP ifIndex: 517 Link-level type: Ethernet, MTU: 1514, LAN-PHY mode, Link-mode: Full-duplex, Speed: 1000mbps, Duplex: Full-Duplex, 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, IEEE 802.3az Energy Efficient Ethernet: Disabled, Auto-MDIX: Enabled Device flags : Present Running Interface flags: SNMP-Traps Internal: 0x4000 Link flags : None CoS queues : 12 supported, 12 maximum usable queues Current address: 30:7c:5e:4c:78:03, Hardware address: 30:7c:5e:4c:78:03 Last flapped : 2018-11-26 11:03:32 UTC (04:25:39 ago) Input rate : 0 bps (0 pps) Output rate : 0 bps (0 pps) 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 330) (SNMP ifIndex 519) Flags: Up SNMP-Traps 0x24024000 Encapsulation: Ethernet-Bridge Input packets : 0 Output packets: 0 Protocol eth-switch, MTU: 1514 Flags: Trunk-Mode
OVSとカスタムブリッジのインターフェイスのステータスを確認します。
user@host > show vmhost network nfv-back-plane Network Name : custom-br Interface : custom-br Type : internal, Link type : Full-Duplex, MAC : 2e:8e:a3:e3:e5:40 MTU : [], Link State :down, Admin State : down IPV4 : None, Netmask : None IPV6 : None, IPV6 netmask : None Rx-packets : 0 Rx-drops : 0 Rx-errors : 0 Tx-packets : 0 Tx-drops : 0 Tx-errors : 0 Interface : vnf-name_eth2 Type : dpdkvhostuser, Link type : Full-Duplex, MAC : 00:00:00:00:00:00 MTU : 1500, Link State :down, Admin State : up IPV4 : None, Netmask : None IPV6 : None, IPV6 netmask : None Rx-packets : 0 Rx-drops : 0 Rx-errors : 0 Tx-packets : 0 Tx-drops : 0 Tx-errors : 0 Network Name : ovs-sys-br Interface : ovs-sys-br Type : internal, Link type : Full-Duplex, MAC : 66:9c:3f:25:04:40 MTU : [], Link State :down, Admin State : down IPV4 : None, Netmask : None IPV6 : None, IPV6 netmask : None Rx-packets : 0 Rx-drops : 0 Rx-errors : 0 Tx-packets : 0 Tx-drops : 0 Tx-errors : 0 Interface : dpdk0 Type : dpdk, Link type : Full-Duplex, MAC : 02:09:c0:1a:c6:ee MTU : [], Link State :up, Admin State : up IPV4 : None, Netmask : None IPV6 : None, IPV6 netmask : None Rx-packets : 0 Rx-drops : 0 Rx-errors : 0 Tx-packets : 0 Tx-drops : 0 Tx-errors : 0 Interface : dpdk1 Type : dpdk, Link type : Full-Duplex, MAC : 02:09:c0:7b:6c:47 MTU : [], Link State :up, Admin State : up IPV4 : None, Netmask : None IPV6 : None, IPV6 netmask : None Rx-packets : 0 Rx-drops : 0 Rx-errors : 0 Tx-packets : 0 Tx-drops : 0 Tx-errors : 0 Interface : l3_h_ge_1_0_0 Type : dpdkvhostuser, Link type : Full-Duplex, MAC : 00:00:00:00:00:00 MTU : [], Link State :down, Admin State : up IPV4 : None, Netmask : None IPV6 : None, IPV6 netmask : None Rx-packets : 0 Rx-drops : 0 Rx-errors : 0 Tx-packets : 0 Tx-drops : 0 Tx-errors : 0 Interface : l3_h_ge_1_0_1 Type : dpdkvhostuser, Link type : Full-Duplex, MAC : 00:00:00:00:00:00 MTU : [], Link State :down, Admin State : up IPV4 : None, Netmask : None IPV6 : None, IPV6 netmask : None Rx-packets : 0 Rx-drops : 0 Rx-errors : 0 Tx-packets : 0 Tx-drops : 0 Tx-errors : 0 Interface : l3_h_ge_1_0_2 Type : dpdkvhostuser, Link type : Full-Duplex, MAC : 00:00:00:00:00:00 MTU : [], Link State :down, Admin State : up IPV4 : None, Netmask : None IPV6 : None, IPV6 netmask : None Rx-packets : 0 Rx-drops : 0 Rx-errors : 0 Tx-packets : 0 Tx-drops : 0 Tx-errors : 0 Interface : vnf-name_eth3 Type : dpdkvhostuser, Link type : Full-Duplex, MAC : 00:00:00:00:00:00 MTU : 1500, Link State :down, Admin State : up IPV4 : None, Netmask : None IPV6 : None, IPV6 netmask : None Rx-packets : 0 Rx-drops : 0 Rx-errors : 0 Tx-packets : 0 Tx-drops : 0 Tx-errors : 0