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 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-user@linux-host:~# uname -a Linux ix-crpd-03 4.15.0-147-generic #151-Ubuntu SMP Fri Jun 18 19:21:19 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
root-user@linux-host:lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 18.04.1 LTS Release: 18.04 Codename: bionic
- Download the Docker software.
- Update your existing list of packages and download the necessary
tools.
rootuser@linux-host:~# apt install apt-transport-https ca-certificates curl software-properties-common [sudo] password for lab: Reading package lists... Done Building dependency tree Reading state information... Done Note, selecting 'apt' instead of 'apt-transport-https' The following additional packages will be installed:……………………………………….
- Add the Docker repository to Advanced Packaging Tool (APT) sources.
rootuser@linux-host:~# add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable" Get:1 https://download.docker.com/linux/ubuntu bionic InRelease [64.4 kB] Get:2 https://download.docker.com/linux/ubuntu bionic/stable amd64 Packages [18.8 kB] Hit:3 http://archive.ubuntu.com/ubuntu bionic InRelease Get:4 http://archive.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB] Get:5 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB] Get:6 http://archive.ubuntu.com/ubuntu bionic/main Translation-en [516 kB] Get:7 http://archive.ubuntu.com/ubuntu bionic-security/main Translation-en [329 kB] Get:8 http://archive.ubuntu.com/ubuntu bionic-updates/main Translation-en [422 kB] Fetched 1,528 kB in 8s (185 kB/s) Reading package lists... Done
- Update the database with the Docker
packages.
rootuser@linux-host:~# apt update Hit:1 https://download.docker.com/linux/ubuntu bionic InRelease Hit:2 http://archive.ubuntu.com/ubuntu bionic InRelease Hit:3 http://archive.ubuntu.com/ubuntu bionic-security InRelease Hit:4 http://archive.ubuntu.com/ubuntu bionic-updates InRelease Reading package lists... Done Building dependency tree Reading state information... Done
- Update the apt package index, and install the latest version of Docker
Engine.
rootuser@linux-host:~# 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-ce-cli docker-ce-rootless-extras docker-scan-plugin libltdl7 libseccomp2 Suggested packages: aufs-tools cgroupfs-mount | cgroup-lite Recommended packages: pigz slirp4netns …………………………………………………………….
- Check to see if the installation is
successful.
rootuser@linux-host:~# 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
- Update your existing list of packages and 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.
rootuser@linux-host:~# wget -O junos-routing-crpd-docker-21.2R1.10.tgz https://cdn.juniper.net/software/crpd/21.2R1.10/junos-routing-crpd-docker-21.2R1.10.tgz?SM_USER=user1&__gda__=1626246704_4cd5cfea47ebec7c1226d07e671d0186 Resolving cdn.juniper.net (cdn.juniper.net)... 23.203.176.210 Connecting to cdn.juniper.net (cdn.juniper.net)|23.203.176.210|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 127066581 (121M) [application/octet-stream] Saving to: âjunos-routing-crpd-docker-21.2R1.10.tgzâ junos-routing-crpd-docker-21.2R1.10.tgz 100%[=====================================================================================>] 121.18M 4.08MB/s in 34s 2021-07-14 07:02:44 (3.57 MB/s) - âjunos-routing-crpd-docker-21.2R1.10.tgzâ saved [127066581/127066581]
- Load the Junos cRPD software image to Docker.
rootuser@linux-host:~# docker load -i junos-routing-crpd-docker-21.2R1.10.tgz 6effd95c47f2: Loading layer [==================================================>] 65.61MB/65.61MB …………………………………………………………………………………………………………………………………….. Loaded image: crpd:21.2R1.10
rootuser@linux-host:~# docker images REPOSITORY TAG IMAGE ID CREATED SIZE crpd 21.2R1.10 f9b634369718 3 weeks ago 374MB
- Create a data volume for configuration and var
logs.
rootuser@linux-host:~# docker volume create crpd01-config crpd01-config
rootuser@linux-host:~# docker volume create crpd01-varlog crpd01-varlog
- Create a Junos cRPD instance. In this example, you'll name it
crpd01.
rootuser@linux-host:~# docker run --rm --detach --name crpd01 -h crpd01 --net=bridge --privileged -v crpd01-config:/config -v crpd01-varlog:/var/log -it crpd:21.2R1.10 e39177e2a41b5fc2147115092d10e12a27c77976c88387a694faa5cbc5857f1e
Alternatively, you can allocate the amount of memory to the Junos cRPD instance while creating the instance.
rootuser@linux-host:~# docker run --rm --detach --name crpd-01 -h crpd-01 --privileged -v crpd01-config:/config -v crpd01-varlog:/var/log -m 2048MB --memory-swap=2048MB -it crpd:21.2R1.10 WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap. 1125e62c9c639fc6fca87121d8c1a014713495b5e763f4a34972f5a28999b56c
Check cRPD Resource Requirements for the details.
- Verify the newly created container
details.
rootuser@linux-host:~# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES e39177e2a41b crpd:21.2R1.10 "/sbin/runit-init.sh" About a minute ago Up About a minute 22/tcp, 179/tcp, 830/tcp, 3784/tcp, 4784/tcp, 6784/tcp, 7784/tcp, 50051/tcp crpd01
rootuser@linux-host:~# docker stats CONTAINER ID NAME CPU % MEM USAGE / LIMIT MEM % NET I/O BLOCK I/O PIDS e39177e2a41b crpd01 0.00% 147.1MiB / 3.853GiB 3.73% 1.24kB / 826B 4.1kB / 35MB 58 CONTAINER ID NAME CPU % MEM USAGE / LIMIT MEM % NET I/O BLOCK I/O PIDS e39177e2a41b crpd01 0.00% 147.1MiB / 3.853GiB 3.73% 1.24kB / 826B 4.1kB / 35MB 58 CONTAINER ID NAME CPU % MEM USAGE / LIMIT MEM % NET I/O BLOCK I/O PIDS e39177e2a41b crpd01 0.05% 147.1MiB / 3.853GiB 3.73% 1.24kB / 826B 4.1kB / 35MB 58