Step 1: Begin
In this guide, we walk you through how to install and configure Junos® containerized routing protocol process (cRPD) on a Linux host and access it using Junos CLI. Next, we show you how to connect and configure two Junos cRPD instances and establish an OSPF adjacency.
Meet Junos cRPD
Junos cRPD is a cloud-native, containerized routing engine that supports simple deployment throughout the cloud infrastructure. Junos cRPD decouples the RPD from Junos OS and packages the RPD as a Docker container that runs on any Linux-based system, including servers and whitebox routers. Docker is an open source software platform that makes it simple to create and manage a virtual container.
Junos cRPD supports multiple protocols such as OSPF, IS-IS, BGP, MP-BGP, and so on. Junos cRPD shares the same management functionality as Junos OS and Junos OS Evolved to deliver a consistent configuration and management experience in routers, servers, or any Linux-based device.
Get Ready
Before you begin deployment:
- Familiarize yourself with your Junos cRPD license agreement. See Flex Software License for cRPD and Managing cRPD Licenses.
- Set up a Docker hub account. You'll need an account to download Docker Engine. See Docker ID accounts for details.
Install and Configure Docker on a Linux Host
- Verify that your host meets these minimum system requirements.
- Linux OS support - Ubuntu 18.04
- Linux Kernel - 4.15
- Docker Engine- 18.09.1 or later versions
- CPUs- 2 CPU core
- Memory - 4 GB
- Disk space - 10 GB
- Host processor type - x86_64 multicore CPU
- Network Interface - Ethernet
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
- Download the Docker software.
- Download the necessary
tools.
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) ...
- Add the Docker repository to Advanced Packaging Tool (APT) sources.
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
- Update the list of available
packages.
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
- Install the latest version of 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) ... …………………………………………………………….
- Check to see if the installation is
successful.
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
- Download the necessary
tools.
Use these commands to install the components you need for the Python environment and packages:
apt-add-repository universe
apt-get update
apt-get install python-pip
python -m pip install grpcio
python -m pip install grpcio-tools
Download and Install Junos cRPD Software
Now that you've installed Docker on the Linux host and confirmed that the Docker Engine is running, let's download the Junos cRPD software from the Juniper Networks software download page.
To download, install, and start using Junos cRPD without a license key, see Start your free trial today.
You can open an Admin Case with Customer Care for privileges to download the software.
- Navigate to the Juniper Networks Support page for Junos cRPD: https://support.juniper.net/support/downloads/?p=crpd and click the latest version.
- Enter your user ID and password and accept the Juniper end-user license agreement. You’ll be guided to the software image download page.
- Download the image directly on your host. Copy and paste the generated string as
instructed on the screen.
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]
- Load the Junos cRPD software image to 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
- Create a data volume for configuration and var
logs.
root@crpd:~# docker volume create crpd01-config crpd01-config
root@crpd:~# docker volume create crpd01-varlog crpd01-varlog
- Create a Junos cRPD instance. In this example, you'll name it 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
Check cRPD Resource Requirements for the details.
- Verify the newly created container
details.
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