ジュニパークラウドネイティブルーターコントローラ(cRPD)
この章を読んで、Juniper Cloud-Native Router-controller(クラウドネイティブ ルーター コントローラまたは cRPD)、Juniper Cloud-Native Router コントロール プレーンについて理解してください。
ジュニパークラウドネイティブルーターコントローラのメリット
cRPDは、ジュニパークラウドネイティブルーターソリューションにおけるコントロールプレーンの役割を果たします。cRPDは、ユーザー(CLI)とアプリケーション(API)に同様に設定インターフェイスを提供します。これらのインターフェイスを使用して、JCNR-vRouter 転送プレーンを設定またはプログラムできます。JCNR-Controller を使用すると、以下のさまざまなことが構成できます。
-
仮想機能(VF)ファブリックインターフェイス
-
VFワークロードインターフェイス
-
トランク インターフェイス
-
アクセス インターフェイス
-
L2 ACL(ファイアウォール ルール)
-
ブリッジ ドメイン
-
イーサネット スイッチング
-
Vlan
cRPDは、以下の機能を実行します。
-
転送プレーンとして JCNR-vRouter をサポート
-
トランク インターフェイス、アクセス インターフェイス、VF(仮想機能インターフェイス)、VLAN など、vRouter インターフェイスの設定を維持します。
-
ブリッジ ドメインの設定を維持します。
-
L2ファイアウォールの設定を維持
-
ブリッジ ドメイン、VLAN、仮想スイッチなどの設定を維持します。
-
vRouter エージェントを介して vRouter に設定情報を渡す
-
ライセンス キー情報を保存します。
設定オプション
展開中に、ソフトウェア配布TARファイルに含まれるvalue.yamlファイルに含まれるキー:値ペアの値を変更して、cRPDを設定します。
導入後は、PyEZ と共に NETCONF プロトコルを使用して cRPD を設定することをお勧めします。PyEZ の詳細については、「 https://www.juniper.net/documentation/us/en/software/junos-pyez/junos-pyez-developer/index.html 」を参照してください。または、TCPポート24でcRPDに直接SSHすることも、TCPポート830でNETCONFを使用することもできます。最後に、クラウドネイティブルーターを設定するもう1つのオプションは、Kubernetesコマンドを使用してcRPD上のJunos CLIにアクセスしてcRPDポッドに接続することです。
CLI へのアクセス
In this procedure we provide CLI commands that you run on the host server. We do not show a prompt before the commands so you can copy and paste the commands into your own cloud-native router.
kubectl get pods -A
The output should look like:
NAMESPACE NAME READY STATUS RESTARTS AGE contrail-deploy contrail-k8s-deployer-7b5dd699b9-smqgn 1/1 Running 0 37h contrail contrail-vrouter-masters-htcvt 3/3 Running 0 37h default delete-crpd-dirs--1-bjngd 0/1 Completed 0 37h default delete-vrouter-dirs--1-k5wgb 0/1 Completed 0 37h default odu-pktgen-trunkint 1/1 Running 0 24h default odu-subinterface-3003 1/1 Running 0 7d kube-system calico-kube-controllers-57b9767bdb-76fvw 1/1 Running 52 (8d ago) 107d kube-system calico-node-pgljp 1/1 Running 18 (8d ago) 107d kube-system coredns-8474476ff8-2nbnv 1/1 Running 38 (8d ago) 107d kube-system dns-autoscaler-7f76f4dd6-8b4w5 1/1 Running 18 (8d ago) 107d kube-system kube-apiserver-nodem27.englab.juniper.net 1/1 Running 45 (8d ago) 107d kube-system kube-controller-manager-nodem27.englab.juniper.net 1/1 Running 34 (8d ago) 107d kube-system kube-crpd-worker-ds-89wzg 1/1 Running 0 32h kube-system kube-multus-ds-amd64-f2pls 1/1 Running 0 8d kube-system kube-proxy-vrqjm 1/1 Running 18 (8d ago) 107d kube-system kube-scheduler-nodem27.englab.juniper.net 1/1 Running 35 (8d ago) 107d kube-system nodelocaldns-hm56k 1/1 Running 43 (8d ago) 107d kube-system syslog-ng-54749b7b77-tqvpk 1/1 Running 0 37h
The command to access the cRPD CLI has the form: kubectl exec -n kube-system -it <full cRPD Pod name> -- bash
. If we use the output from above, the command appears as: kubectl exec -n kube-system -it kube-crpd-worker-ds-89wzg -- bash
.
The output from the command above (when you use the full name of your cRPD Pod) should look like:
Defaulted container "kube-crpd-worker" out of: kube-crpd-worker, jcnr-crpd-config (init), install-cni (init) ===> Containerized Routing Protocols Daemon (CRPD) Copyright (C) 2020-2021, Juniper Networks, Inc. All rights reserved. <===
This output indicates that you have attached to the cRPD CLI. At this point, your access level is root and you are in shell mode. Just as when you connect as root to any Junos OS-based device, you must enter the cli
command to access the Junos CLI in operation mode.
便利な CLI コマンド
このセクションでは、CLI コマンドとその出力例を示します。コマンド補完の出力例も示します。これらの出力では、クラウドネイティブルーターシステムで確認できる使用可能なコマンド階層を表示できます。
以下に示すように、 コマンドでブリッジコマンド階層を show 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 something like:
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; } } } } }
Once configured, you must 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 you must 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.