ステップ1:開始
このガイドでは、LinuxホストにJunos®コンテナ化ルーティングプロトコルプロセス(cRPD)をインストールおよび設定し、Junos CLIを使用してアクセスする方法について説明します。次に、2つのJunos cRPDインスタンスを接続して設定し、OSPF隣接関係を確立する方法について説明します。
Junos cRPDの紹介
Junos cRPDは、クラウドネイティブのコンテナ化されたルーティングエンジンで、クラウドインフラストラクチャ全体へのシンプルな導入をサポートします。Junos cRPDは、RPDをJunos OSから切り離し、サーバーやホワイトボックスルーターなど、Linuxベースのシステムで実行されるDockerコンテナとしてRPDをパッケージ化します。Dockerは、仮想コンテナの作成と管理を簡単にするオープンソースのソフトウェアプラットフォームです。
Junos cRPDは、OSPF、IS-IS、BGP、MP-BGPなどの複数のプロトコルをサポートしています。Junos cRPDは、Junos OSやJunos OS Evolvedと同じ管理機能を共有し、ルーター、サーバー、Linuxベースのデバイスに一貫した構成と管理のエクスペリエンスを提供します。
準備を整える
導入を開始する前に:
- Junos cRPDライセンス契約についてよく理解してください。 cRPDのフレックスソフトウェアライセンス および cRPDライセンスの管理を参照してください。
- Docker ハブ アカウントを設定します。Docker Engine をダウンロードするにはアカウントが必要です。詳細については、「 Docker IDアカウント 」を参照してください。
LinuxホストへのDockerのインストールと設定
- ホストがこれらの最小システム要件を満たしていることを確認します。
- Linux OSサポート - Ubuntu 18.04
- Linux カーネル - 4.15
- Docker エンジン- 18.09.1 以降のバージョン
- CPU - 2 CPUコア
- メモリ - 4 GB
- ディスク容量 - 10 GB
- ホストプロセッサータイプ - x86_64マルチコアCPU
- ネットワークインターフェイス - イーサネット
root@crpd:~# uname -a Linux crpd 5.4.0-193-generic #213-Ubuntu SMP Fri Aug 2 19:14:16 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
root@crpd:~# lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04.5 LTS Release: 20.04 Codename: focal
- Dockerソフトウェアをダウンロードします。
- 必要なツールをダウンロードします。
root@crpd:~# apt install apt-transport-https ca-certificates curl software-properties-common Reading package lists... Done Building dependency tree Reading state information... Done ca-certificates is already the newest version (20230311ubuntu0.20.04.1). ca-certificates set to manually installed. curl is already the newest version (7.68.0-1ubuntu2.23). curl set to manually installed. The following additional packages will be installed: python3-software-properties The following NEW packages will be installed: apt-transport-https The following packages will be upgraded: python3-software-properties software-properties-common 2 upgraded, 1 newly installed, 0 to remove and 58 not upgraded. Need to get 33.8 kB of archives. After this operation, 143 kB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 http://us.archive.ubuntu.com/ubuntu focal-updates/universe amd64 apt-transport-https all 2.0.10 [1,704 B] Get:2 http://us.archive.ubuntu.com/ubuntu focal-updates/main amd64 software-properties-common all 0.99.9.12 [10.4 kB] Get:3 http://us.archive.ubuntu.com/ubuntu focal-updates/main amd64 python3-software-properties all 0.99.9.12 [21.7 kB] Fetched 33.8 kB in 0s (73.4 kB/s) Selecting previously unselected package apt-transport-https. (Reading database ... 72196 files and directories currently installed.) Preparing to unpack .../apt-transport-https_2.0.10_all.deb ... Unpacking apt-transport-https (2.0.10) ... Preparing to unpack .../software-properties-common_0.99.9.12_all.deb ... Unpacking software-properties-common (0.99.9.12) over (0.99.9.8) ... Preparing to unpack .../python3-software-properties_0.99.9.12_all.deb ... Unpacking python3-software-properties (0.99.9.12) over (0.99.9.8) ... Setting up apt-transport-https (2.0.10) ... Setting up python3-software-properties (0.99.9.12) ... Setting up software-properties-common (0.99.9.12) ... Processing triggers for man-db (2.9.1-1) ... Processing triggers for dbus (1.12.16-2ubuntu2.3) ...
- Docker リポジトリを Advanced Packaging Tool(APT)ソースに追加します。
root@crpd:~# curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - OK root@crpd:~# lsb_release -cs focal root@crpd:~# add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" Get:1 https://download.docker.com/linux/ubuntu focal InRelease [57.7 kB] Hit:2 http://us.archive.ubuntu.com/ubuntu focal InRelease Hit:3 http://us.archive.ubuntu.com/ubuntu focal-updates InRelease Hit:4 http://us.archive.ubuntu.com/ubuntu focal-backports InRelease Hit:5 http://us.archive.ubuntu.com/ubuntu focal-security InRelease Get:6 https://download.docker.com/linux/ubuntu focal/stable amd64 Packages [49.7 kB] Fetched 107 kB in 1s (84.9 kB/s) Reading package lists... Done
- 利用可能なパッケージのリストを更新します。
root@crpd:~# apt update Hit:1 https://download.docker.com/linux/ubuntu focal InRelease Hit:2 http://us.archive.ubuntu.com/ubuntu focal InRelease Hit:3 http://us.archive.ubuntu.com/ubuntu focal-updates InRelease Hit:4 http://us.archive.ubuntu.com/ubuntu focal-backports InRelease Hit:5 http://us.archive.ubuntu.com/ubuntu focal-security InRelease Reading package lists... Done Building dependency tree Reading state information... Done
- 最新バージョンの Docker Engine をインストールします。
root@crpd:~# apt install docker-ce Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: containerd.io docker-buildx-plugin docker-ce-cli docker-ce-rootless-extras docker-compose-plugin pigz slirp4netns Suggested packages: aufs-tools cgroupfs-mount | cgroup-lite The following NEW packages will be installed: containerd.io docker-buildx-plugin docker-ce docker-ce-cli docker-ce-rootless-extras docker-compose-plugin pigz slirp4netns 0 upgraded, 8 newly installed, 0 to remove and 58 not upgraded. Need to get 121 MB of archives. After this operation, 437 MB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 pigz amd64 2.4-1 [57.4 kB] Get:2 https://download.docker.com/linux/ubuntu focal/stable amd64 containerd.io amd64 1.7.21-1 [29.5 MB] Get:3 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 slirp4netns amd64 0.4.3-1 [74.3 kB] Get:4 https://download.docker.com/linux/ubuntu focal/stable amd64 docker-buildx-plugin amd64 0.16.2-1~ubuntu.20.04~focal [29.9 MB] Get:5 https://download.docker.com/linux/ubuntu focal/stable amd64 docker-ce-cli amd64 5:27.2.0-1~ubuntu.20.04~focal [14.8 MB] Get:6 https://download.docker.com/linux/ubuntu focal/stable amd64 docker-ce amd64 5:27.2.0-1~ubuntu.20.04~focal [25.2 MB] Get:7 https://download.docker.com/linux/ubuntu focal/stable amd64 docker-ce-rootless-extras amd64 5:27.2.0-1~ubuntu.20.04~focal [9,328 kB] Get:8 https://download.docker.com/linux/ubuntu focal/stable amd64 docker-compose-plugin amd64 2.29.2-1~ubuntu.20.04~focal [12.5 MB] Fetched 121 MB in 2s (54.7 MB/s) Selecting previously unselected package pigz. (Reading database ... 72197 files and directories currently installed.) Preparing to unpack .../0-pigz_2.4-1_amd64.deb ... Unpacking pigz (2.4-1) ... Selecting previously unselected package containerd.io. Preparing to unpack .../1-containerd.io_1.7.21-1_amd64.deb ... Unpacking containerd.io (1.7.21-1) ... Selecting previously unselected package docker-buildx-plugin. Preparing to unpack .../2-docker-buildx-plugin_0.16.2-1~ubuntu.20.04~focal_amd64.deb ... Unpacking docker-buildx-plugin (0.16.2-1~ubuntu.20.04~focal) ... Selecting previously unselected package docker-ce-cli. Preparing to unpack .../3-docker-ce-cli_5%3a27.2.0-1~ubuntu.20.04~focal_amd64.deb ... Unpacking docker-ce-cli (5:27.2.0-1~ubuntu.20.04~focal) ... …………………………………………………………….
- インストールが正常に完了したかどうかを確認します。
root@crpd:~# docker version Client: Docker Engine - Community Version: 20.10.7 API version: 1.41 Go version: go1.13.15 Git commit: f0df350 Built: Wed Jun 2 11:56:40 2021 OS/Arch: linux/amd64 Context: default Experimental: true Server: Docker Engine - Community Engine: Version: 20.10.7 API version: 1.41 (minimum version 1.12) Go version: go1.13.15 Git commit: b0f5bc3 Built: Wed Jun 2 11:54:48 2021 OS/Arch: linux/amd64 Experimental: false containerd: Version: 1.4.6 GitCommit: d71fcd7d8303cbf684402823e425e9dd2e99285d runc: Version: 1.0.0-rc95 GitCommit: b9ee9c6314599f1b4a7f497e1f1f856fe433d3b7 docker-init: Version: 0.19.0 GitCommit: de40ad0
- 必要なツールをダウンロードします。
これらのコマンドを使用して、Python 環境とパッケージに必要なコンポーネントをインストールします。
apt-add-repository universeapt-get updateapt-get install python-pippython -m pip install grpciopython -m pip install grpcio-tools
Junos cRPDソフトウェアのダウンロードとインストール
LinuxホストにDockerをインストールし、Dockerエンジンが実行されていることを確認したところで、ジュニパーネットワークスのソフトウェアダウンロードページからJunos cRPDソフトウェアをダウンロードしましょう。
ライセンスキーなしでJunos cRPDをダウンロード、インストールし、使用を開始するには、「 今すぐ無料トライアルを開始する」を参照してください。
カスタマーケアで管理ケースをオープンして、ソフトウェアをダウンロードする権限を得ることができます。
- Junos cRPD: https://support.juniper.net/support/downloads/?p=crpd のジュニパーネットワークスサポートページに移動し、最新バージョンをクリックします。
- ユーザーIDとパスワードを入力し、ジュニパーエンドユーザーライセンス契約に同意します。ソフトウェアイメージのダウンロードページに移動します。
- イメージをホストに直接ダウンロードします。画面の指示に従って、生成された文字列をコピーアンドペーストします。
root@crpd:~# wget "https://cdn.juniper.net/software/crpd/24.2R1/junos-routing-crpd-docker-amd64-24.2R1.14.tgz?SM_USER=user1&__gda__=xxxxx" -O junos-routing-crpd-docker-amd64-24.2R1.14.tgz --2024-08-29 18:12:48-- https://cdn.juniper.net/software/crpd/24.2R1/junos-routing-crpd-docker-amd64-24.2R1.14.tgz?SM_USER=xxxxx&__gda__=xxxxx Resolving cdn.juniper.net (cdn.juniper.net)... 104.92.231.114 Connecting to cdn.juniper.net (cdn.juniper.net)|104.92.231.114|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 167932289 (160M) [application/octet-stream] Saving to: ‘junos-routing-crpd-docker-amd64-24.2R1.14.tgz’ junos-routing-crpd-docker-amd64-24.2R1. 100%[============================================================================>] 160.15M 67.2MB/s in 2.4s 2024-08-29 18:12:51 (67.2 MB/s) - ‘junos-routing-crpd-docker-amd64-24.2R1.14.tgz’ saved [167932289/167932289]
- Junos cRPDソフトウェアイメージをDockerにロードします。
root@crpd:~# docker load -i junos-routing-crpd-docker-amd64-24.2R1.14.tgz 8716c4e476eb: Loading layer [==================================================>] 537.7MB/537.7MB Loaded image: crpd:24.2R1.14
root@crpd:~# docker images REPOSITORY TAG IMAGE ID CREATED SIZE crpd 24.2R1.14 281363ff6dbf 2 months ago 530MB
- 設定とvarログ用のデータボリュームを作成します。
root@crpd:~# docker volume create crpd01-config crpd01-config
root@crpd:~# docker volume create crpd01-varlog crpd01-varlog
- Junos cRPDインスタンスを作成します。この例では、crpd01 という名前を付けます。
root@crpd:~# docker run --rm --detach --name crpd01 -h crpd01 --net=none --privileged -v crpd01-config:/config -v crpd01-varlog:/var/log -it crpd:24.2R1.14 e39177e2a41b5fc2147115092d10e12a27c77976c88387a694faa5cbc5857f1e
詳細については、 cRPDリソース要件を確認してください 。
- 新しく作成されたコンテナの詳細を確認します。
root@crpd:~# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 710b3b6ca824 crpd:24.2R1.14 "/sbin/runit-init.sh" 4 seconds ago Up 4 seconds crpd01