クラウドネイティブルーターの共通の機能
概要 この章では、Juniper Cloud-Native Routerの一般的な機能について説明します。L2とL3の両方の導入モードに存在するクラウドネイティブルーターインターフェイスタイプとその他の機能について説明します。
Juniper Cloud-Native Router のインターフェイスタイプ
Juniper Cloud-Native Routerは、以下のタイプのインターフェイスをサポートしています。
-
エージェント インターフェイス
vRouter のエージェント インターフェイスは 1 つだけです。エージェント インターフェイスにより、vRouter エージェントと vRouter 間の通信が可能になります。vRouter CLI で コマンドを発行
vif --list
すると、エージェントインターフェイスは次のようになります。vif0/0 Socket: unix Type:Agent HWaddr:00:00:5e:00:01:00 Vrf:65535 Flags:L2 QOS:-1 Ref:3 RX queue errors to lcore 0 0 0 0 0 0 0 0 0 0 0 0 RX packets:0 bytes:0 errors:0 TX packets:650 bytes:99307 errors:0 Drops:0
-
データ プレーン開発キット(DPDK)仮想関数(VF)ワークロード インターフェイス
これらのインターフェイスは、無線ユニット(RU)またはミリ波分散ユニット(ミリ波DU)に接続します。 コマンドを発行
vif --list
すると、vRouter CLI では、DPDK VF ワークロード インターフェイスは次のようになります。vif0/5 PCI: 0000:ca:19.1 (Speed 10000, Duplex 1) Type:Workload HWaddr:9e:52:29:9e:97:9b Vrf:0 Flags:L2Vof QOS:-1 Ref:9 RX queue packets:29087 errors:0 RX queue errors to lcore 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Fabric Interface: 0000:ca:19.1 Status: UP Driver: net_iavf Vlan Mode: Access Vlan Id: 1250 OVlan Id: 1250 RX packets:29082 bytes:6766212 errors:5 TX packets:0 bytes:0 errors:0 Drops:29896
-
DPDK VFファブリック インターフェイス
ホスト サーバー上の物理ネットワーク インターフェイス カード(NIC)に関連付けられている DPDK VF ファブリック インターフェイスは、複数の VLAN からのトラフィックを受け入れます。コマンドを発行
vif --list
すると、vRouter CLI では、DPDK VF ファブリック インターフェイスは次のようになります。vif0/1 PCI: 0000:31:01.0 (Speed 10000, Duplex 1) Type:Physical HWaddr:d6:22:c5:42:de:c3 Vrf:65535 Flags:L2Vof QOS:-1 Ref:12 RX queue packets:11813 errors:1 RX queue errors to lcore 0 0 0 0 0 0 0 0 0 0 0 0 1 0 Fabric Interface: 0000:31:01.0 Status: UP Driver: net_iavf Vlan Mode: Trunk Vlan: 1001-1100 RX packets:0 bytes:0 errors:49962 TX packets:18188356 bytes:2037400554 errors:0 Drops:49963
-
アクティブまたはスタンバイ ボンド インターフェイス
ボンドインターフェイスは、複数のVLANからのトラフィックを受け入れます。ボンドインターフェイスは、アクティブまたはスタンバイモード(モード0)で動作します。
vRouter CLI で コマンドを発行
vif --list
すると、ボンド インターフェイスは次のようになります。vif0/2 PCI: 0000:00:00.0 (Speed 10000, Duplex 1) Type:Physical HWaddr:32:f8:ad:8c:d3:bc Vrf:65535 Flags:L2Vof QOS:-1 Ref:8 RX queue packets:1882 errors:0 RX queue errors to lcore 0 0 0 0 0 0 0 0 0 0 0 0 Fabric Interface: eth_bond_bond0 Status: UP Driver: net_bonding Slave Interface(0): 0000:81:01.0 Status: UP Driver: net_iavf Slave Interface(1): 0000:81:03.0 Status: UP Driver: net_iavf Vlan Mode: Trunk Vlan: 751-755 RX packets:8108366000 bytes:486501960000 errors:4234 TX packets:65083776 bytes:4949969408 errors:0 Drops:8108370394
-
virtio と DPDK データプレーンを使用したポッドインターフェイス
Virtio インターフェイスは、複数の VLAN からのトラフィックを受信し、DPDK データ プレーンで virtio を使用するポッド インターフェイスに関連付けられます。
コマンドを発行
vif --list
すると vRouter CLI では、DPDK データプレーンインターフェイスを持つ virtio は次のようになります。vif0/3 PMD: vhost242ip-93883f16-9ebb-4acf-b Type:Virtual HWaddr:00:16:3e:7e:84:a3 Vrf:65535 Flags:L2 QOS:-1 Ref:13 RX queue errors to lcore 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Vlan Mode: Trunk Vlan: 1001-1003 RX packets:0 bytes:0 errors:0 TX packets:10604432 bytes:1314930908 errors:0 Drops:0 TX port packets:0 errors:10604432
-
仮想イーサネット(veth)ペアとDPDKデータプレーンを使用したポッドインターフェイス
veth ペアと DPDK データ プレーンを使用するポッド インターフェイスは、トランク インターフェイスではなくアクセス インターフェイスです。このタイプのポッドインターフェイスでは、1つのVLANからのトラフィックのみを通過させることができます。
コマンドを発行
vif --list
すると、vRouter CLI で DPDK データ プレーン インターフェイスを持つ veth ペアは次のようになります。vif0/4 Ethernet: jvknet1-88c44c3 Type:Virtual HWaddr:02:00:00:3a:8f:73 Vrf:0 Flags:L2Vof QOS:-1 Ref:10 RX queue packets:524 errors:0 RX queue errors to lcore 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Vlan Mode: Access Vlan Id: 3001 OVlan Id: 3001 RX packets:9 bytes:802 errors:515 TX packets:0 bytes:0 errors:0 Drops: 525
-
VLAN サブインターフェイス
Juniper Cloud-Native Router Release 22.4以降、cloud-native routerは、VLANサブインターフェイスの使用をサポートしています。VLANサブインターフェイスは、物理スイッチまたはルーター上の論理インターフェイスのようなものです。クラウドネイティブルーターをL2モードで実行する場合、各サブインターフェイスを特定のVLANに関連付ける必要があります。JCNR-vRouterでは、VLANサブインターフェイスは次のようになります。
vif0/5 Virtual: vhostnet1-71cd7db1-1a5e-49.3003 Vlan(o/i)(,S): 3003/3003 Parent:vif0/4 Type:Virtual(Vlan) HWaddr:00:99:99:99:33:09 Vrf:0 Flags:L2 QOS:-1 Ref:3 RX queue errors to lcore 0 0 0 0 0 0 0 0 0 0 0 0 RX packets:0 bytes:0 errors:0 TX packets:0 bytes:0 errors:0 Drops:0
-
物理機能(PF)ワークロード・インターフェース
-
PF ファブリック インターフェイス
-
vhost0 インターフェイス
インターフェイスは
vhost0
L3 専用インターフェイスです。Cloud-native ルーターを L3 モードで実行する場合、 、en1
などのカーネルベースの物理インターフェイスにインターフェイスeth0
をvhost0
マッピングする必要があります。マッピングを行うには、デプロイの前にファイル Juniper_Cloud_Native_Router_version/helmchart/values_L3.yaml 内のキーの値をvrouter_dpdk_physical_interface:
調整します。この設定では、システムは IPv4 と IPv6 の両方のトラフィックに同じ物理インターフェイスを使用します。または、 キーと キーにそれぞれ適切な物理インターフェイス名を入力することで、IPv4 と
vhost_interface_ipv6:
IPv6 のトラフィックにvhost_interface_ipv4:
特定のインターフェイスを選択できます。
vRouter は、L2 モードで実行されている場合、この vhost0
インターフェイスをサポートしません。
vRouterエージェントは、導入中に values.yaml でL2モードを検出するため、インターフェイスが起動するのを vhost0
待たずにインストールが完了します。vRouterエージェントは仮想ホストインターフェイス追加メッセージを送信しないため、vRouterはインターフェイスを作成し vhost0
ません。
ポッドは、クラウドネイティブルーターで使用されるインターフェイスを含むKubernetes要素です。インターフェイスの作成を制御するには、YAML 構成ファイルの キーと値の ペアの値部分を操作します。クラウドネイティブ ルーターは、ポッドとインターフェイスの作成にポッド固有のファイルとネットワーク接続デバイス(NAD)固有のファイルを使用します。ポッドの作成時に、Kubernetes はポッドと NAD の構成ファイルを参照し、NAD 構成ファイルに含まれる値から必要なインターフェイスを作成します。
NAD およびポッドの YAML ファイルの例については、『L2 - カーネルアクセスを持つユーザーポッドをクラウドネイティブルーターインスタンスに追加する』および 「L2 - virtio トランクポートを持つユーザーポッドをクラウドネイティブルーターインスタンスに追加する」の例を参照してください。
ログ記録と通知
Juniper Cloud-Native Routerのログ機能と通知機能については、このトピックをお読みください。ログ ファイルの場所、ログに記録できる内容、およびさまざまなログ レベルについて説明します。また、利用可能な通知と、その通知がクラウドネイティブルーターにどのように実装されているかについても学習できます。
ファイルの場所
Juniper Cloud-Native Routerのポッドとコンテナは、ロギングメカニズムとしてsyslogを使用します。デプロイ時のログ ファイルの場所を確認するには、values.yaml ファイル内の log_path キーの値を保持または変更します。デフォルトでは、ログファイルの場所は /var/log/jcnr です。システムは、すべてのクラウドネイティブルーターポッドとコンテナのログファイルをlog_pathディレクトリに保存します。
さらに、syslog-ngポッドは、イベント通知データをJSON形式でホストサーバーに保存します。syslog-ngポッドは、values.yaml ファイルの syslog_notifications キーで指定されたディレクトリに JSON 形式の通知を格納します。デフォルトでは、ファイルの場所は /var/log/jcnr で、ファイル名は jcnr_notifications.json です。クラウドネイティブルーターを導入する前に、syslog_notificationsキーの値を変更することで、場所とファイル名を変更できます。
デフォルトのファイル・ロケーションを使用すると、/var/ log/jcnr ディレクトリーに以下のファイルが表示されます。
[root@jcnr-1 /var/log/jcnr]# ls contrail-vrouter-agent.log contrail-vrouter-agent.log.2 contrail-vrouter-dpdk.log jcnr_notifications.json contrail-vrouter-agent.log.1 contrail-vrouter-dpdk-init.log jcnr-cni.log vrouter-kernel-init.log
ホスト サーバーは、 contrail-vrouter-dpdk.log ファイルと jcnr-cni.log ファイルのログ ローテーションを管理する必要があります。
通知
syslog-ng ポッドは、インターフェイス アップ、インターフェイス ダウン、インターフェイス アドなどの通知イベントについて、前述のログ ファイルを継続的に監視します。これらのイベントがログ ファイルに表示されると、syslog-ng はログ イベントを通知イベントに変換し、values.yaml ファイルで構成された syslog_notifications ファイル内にイベントを JSON 形式で格納します。
Juniper Cloud-Native Routerリリース22.2以降、syslog-ngには以下の通知が保存されます。
通知 | ソースポッド |
---|---|
ライセンスの有効期限が近づいている |
プリエンプション |
ライセンスの有効期限が切れています |
プリエンプション |
ライセンスが無効です |
プリエンプション |
ライセンスOK |
プリエンプション |
JCNR 初期化成功 |
デプロイヤ |
JCNR 初期化の失敗 |
デプロイヤ |
アップストリーム ファブリック ボンド メンバー リンク アップ |
vRouter |
アップストリーム ファブリック ボンド メンバー リンク ダウン |
vRouter |
アップストリーム ファブリック ボンド リンク アップ |
vRouter |
アップストリーム ファブリック ボンド リンク ダウン |
vRouter |
ダウンストリーム ファブリック リンク アップ |
vRouter |
ダウンストリーム ファブリック リンク ダウン |
vRouter |
アプライアンスのリンクアップ |
vRouter |
アプライアンスのリンク ダウン |
vRouter |
JCNR アプリケーションの重大なエラー |
vRouter |
JCNR MAC テーブルの制限に達しました |
vRouter |
JCNR CLI 開始 |
cRPDまたはvRouter-Agent |
JCNR CLI 停止 |
cRPDまたはvRouter-Agent |
JCNR カーネルアプリケーションのインターフェイスをアップ |
vRouter |
JCNR カーネル・アプリケーション・インターフェースのダウン |
vRouter |
JCNR Virtio ユーザーインターフェイスをアップ |
vRouter |
JCNR Virtio ユーザー インターフェイス ダウン |
vRouter |
関連項目
Juniper Cloud-Native Routerライセンス
このセクションでは、Juniper Cloud-Native Routerのライセンスについて学習します。
Juniper Cloud-Native Routerのライセンス
Juniper Cloud-Native Router Release 22.2より、Juniper Agile Licensing (JAL) モデルが有効になりました。JALは、機能がジュニパーのエンドユーザーライセンス契約に準拠した形で使用されることを保証します。Juniper Cloud-Native Routerソフトウェアのライセンスは、ジュニパーアカウントチームを通じてご購入いただけます。クラウドネイティブルーターコントローラーのCLIを使用して、ライセンスを適用できます。複数のクラウドネイティブルーター導入で複数のライセンスファイルを管理する方法の詳細については、 ジュニパーアジャイルライセンシングの概要を参照してください。
ホストサーバーで コマンドkubectl get pods -A
を発行したときに cRPD ポッドの状態が実行中と表示される場合は、ライセンス ファイルが正しく適用されています。
Juniper Cloud-Native Routerリリース22.3および22.4では、ライセンスコンプライアンスのみを監視しています。ライセンスの遵守は強制されません。
After configuring, apply your firewall filters to a bridge domain using a cRPD configuration command similar to:set routing-instances vswitch bridge-domains bd3001 forwarding-options filter input filter1
. Then, commit the configuration for the firewall filter to take effect.
To see the how many packets matched the filter (per VLAN), you can use the cRPD CLI and issue the command:
show firewall filter filter1
The output from the above command looks like:
Filter : filter1 vlan-id : 3001 Term Packet t1 0
In this example, we applied the filter to the bridge domain bd3001
. The filter has not yet matched any packets.
便利なCLIコマンド
このセクションでは、CLI コマンドとその出力の例をいくつか示します。また、コマンド補完の出力例もいくつか提供します。これらの出力により、利用可能なコマンド階層を確認し、クラウドネイティブなルーターシステムで探索することができます。
以下に示すコマンドで show bridge ?
bridge コマンドの階層を確認できます。
show bridge ? Possible completions: mac-table Show media access control table statistics Show bridge statistics information
If you look further into the hierarchy, you see:
show bridge mac-table ? Possible completions: <[Enter]> Execute this command count Number of MAC address mac-address MAC address in the format XX:XX:XX:XX:XX:XX vlan-id Display MAC address learned on a specified VLAN or 'all-vlan' | Pipe through a command
If you use the <[Enter]> option, you see something like:
show bridge mac-table Routing Instance : default-domain:default-project:ip-fabric:__default__ Bridging domain VLAN id : 3002 MAC MAC Logical address flags interface 00:00:5E:00:53:01 D bond0
The show bridge mac-table
command displays the L2 MAC table which is dynamically learned by the vRouter.
If you look at the other option, statistics
, you see:
show bridge statistics ? Possible completions: <[Enter]> Execute this command vlan-id Display statistics for a particular vlan (1..4094) | Pipe through a command
If you use the <[Enter]> option, you see:
show bridge statistics Bridge domain vlan-id: 100 Local interface: bond0 Broadcast packets Tx : 0 Rx : 0 Multicast packets Tx : 0 Rx : 0 Unicast packets Tx : 0 Rx : 0 Broadcast bytes Tx : 0 Rx : 0 Multicast bytes Tx : 0 Rx : 0 Unicast bytes Tx : 0 Rx : 0 Flooded packets : 0 Flooded bytes : 0 Local interface: ens1f0v1 Broadcast packets Tx : 0 Rx : 0 Multicast packets Tx : 0 Rx : 0 Unicast packets Tx : 0 Rx : 0 Broadcast bytes Tx : 0 Rx : 0 Multicast bytes Tx : 0 Rx : 0 Unicast bytes Tx : 0 Rx : 0 Flooded packets : 0 Flooded bytes : 0 Local interface: ens1f3v1 Broadcast packets Tx : 0 Rx : 0 Multicast packets Tx : 0 Rx : 0 Unicast packets Tx : 0 Rx : 0 Broadcast bytes Tx : 0 Rx : 0 Multicast bytes Tx : 0 Rx : 0 Unicast bytes Tx : 0 Rx : 0 Flooded packets : 0
The show bridge statistics
command displays the L2 VLAN traffic statistics per interface within a bridge domain.
To see the firewall (ACL) configuration:
show configuration firewall:firewall family { bridge { filter filter1 { term t1 { from { destination-mac-address 10:30:30:30:30:31; source-mac-address 10:30:30:30:30:30; ether-type oam; } then { discard; } } } } }