Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

header-navigation
keyboard_arrow_up
list Table of Contents
file_download PDF
{ "lLangCode": "en", "lName": "English", "lCountryCode": "us", "transcode": "en_US" }
English
keyboard_arrow_right

Install cRPD on Docker

date_range 12-Dec-24
This section outlines the steps to install the cRPD container in a Linux server environment that is running Ubuntu or Red Hat Enterprise Linux (RHEL). The cRPD container is packaged in a Docker image and runs in the Docker Engine on the Linux host.

This section includes the following topics:

Before You Install

Before you install cRPD as routing service to achieve routing functionality in a Linux container environment, ensure:

Install and Verify Docker

Install and configure Docker on Linux host platform to implement the Linux container environment, see Install Docker for installation instructions on the supported Linux host operating systems.

Verify the Docker installation. See Debug cRPD Application.

To install the latest Docker:

Add the Docker repository to Advanced Packaging Tool (APT) sources. Log in and download the software.

root@ubuntu-vm18:~# curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

content_copy zoom_out_map
OK

root@ubuntu-vm18:~# lsb_release -cs

content_copy zoom_out_map
focal

root@ubuntu-vm18:~# add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"

content_copy zoom_out_map
Hit:1 http://us.archive.ubuntu.com/ubuntu focal InRelease
Get:2 http://us.archive.ubuntu.com/ubuntu focal-updates InRelease [128 kB]
Get:3 https://download.docker.com/linux/ubuntu focal InRelease [57.7 kB]
Hit:4 http://us.archive.ubuntu.com/ubuntu focal-backports InRelease
Get:5 https://download.docker.com/linux/ubuntu focal/stable amd64 Packages [50.2 kB]
Get:6 http://us.archive.ubuntu.com/ubuntu focal-security InRelease [128 kB]
Get:7 http://us.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [3,563 kB]
Get:8 http://us.archive.ubuntu.com/ubuntu focal-updates/main Translation-en [550 kB]
Get:9 http://us.archive.ubuntu.com/ubuntu focal-updates/main amd64 c-n-f Metadata [17.7 kB]
Get:10 http://us.archive.ubuntu.com/ubuntu focal-updates/restricted amd64 Packages [3,236 kB]
Get:11 http://us.archive.ubuntu.com/ubuntu focal-updates/restricted Translation-en [453 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages [1,230 kB]
Get:13 http://us.archive.ubuntu.com/ubuntu focal-updates/universe Translation-en [295 kB]
Get:14 http://us.archive.ubuntu.com/ubuntu focal-security/main amd64 Packages [3,195 kB]
Get:15 http://us.archive.ubuntu.com/ubuntu focal-security/main Translation-en [472 kB]
Get:16 http://us.archive.ubuntu.com/ubuntu focal-security/restricted amd64 Packages [3,117 kB]
Get:17 http://us.archive.ubuntu.com/ubuntu focal-security/restricted Translation-en [436 kB]
Fetched 16.9 MB in 8s (2,172 kB/s)
Reading package lists... Done

root@ubuntu-vm18:~# apt update

content_copy zoom_out_map
Hit:1 https://download.docker.com/linux/ubuntu focal InRelease
Hit:2 http://us.archive.ubuntu.com/ubuntu focal InRelease
Get:3 http://us.archive.ubuntu.com/ubuntu focal-updates InRelease [128 kB]
Hit:4 http://us.archive.ubuntu.com/ubuntu focal-backports InRelease
Get:5 http://us.archive.ubuntu.com/ubuntu focal-security InRelease [128 kB]
Get:6 http://us.archive.ubuntu.com/ubuntu focal-security/main amd64 c-n-f Metadata [14.3 kB]
Fetched 270 kB in 1s (198 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
67 packages can be upgraded. Run 'apt list --upgradable' to see them.
root@ubuntu-vm18:~# apt install docker-ce
content_copy zoom_out_map
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 67 not upgraded.
Need to get 122 MB of archives.
After this operation, 440 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 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 slirp4netns amd64 0.4.3-1 [74.3 kB]
Get:3 https://download.docker.com/linux/ubuntu focal/stable amd64 containerd.io amd64 1.7.22-1 [29.5 MB]
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.1-1~ubuntu.20.04~focal [15.0 MB]
Get:6 https://download.docker.com/linux/ubuntu focal/stable amd64 docker-ce amd64 5:27.2.1-1~ubuntu.20.04~focal [25.6 MB]
Get:7 https://download.docker.com/linux/ubuntu focal/stable amd64 docker-ce-rootless-extras amd64 5:27.2.1-1~ubuntu.20.04~focal [9,577 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 122 MB in 4s (29.5 MB/s)
Selecting previously unselected package pigz.
(Reading database ... 71975 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.22-1_amd64.deb ...
Unpacking containerd.io (1.7.22-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.1-1~ubuntu.20.04~focal_amd64.deb ...
Unpacking docker-ce-cli (5:27.2.1-1~ubuntu.20.04~focal) ...
Selecting previously unselected package docker-ce.
Preparing to unpack .../4-docker-ce_5%3a27.2.1-1~ubuntu.20.04~focal_amd64.deb ...
Unpacking docker-ce (5:27.2.1-1~ubuntu.20.04~focal) ...
Selecting previously unselected package docker-ce-rootless-extras.
Preparing to unpack .../5-docker-ce-rootless-extras_5%3a27.2.1-1~ubuntu.20.04~focal_amd64.deb ...
Unpacking docker-ce-rootless-extras (5:27.2.1-1~ubuntu.20.04~focal) ...
Selecting previously unselected package docker-compose-plugin.
Preparing to unpack .../6-docker-compose-plugin_2.29.2-1~ubuntu.20.04~focal_amd64.deb ...
Unpacking docker-compose-plugin (2.29.2-1~ubuntu.20.04~focal) ...
Selecting previously unselected package slirp4netns.
Preparing to unpack .../7-slirp4netns_0.4.3-1_amd64.deb ...
Unpacking slirp4netns (0.4.3-1) ...
Setting up slirp4netns (0.4.3-1) ...
Setting up docker-buildx-plugin (0.16.2-1~ubuntu.20.04~focal) ...
Setting up containerd.io (1.7.22-1) ...
Created symlink /etc/systemd/system/multi-user.target.wants/containerd.service → /lib/systemd/system/containerd.service.
Setting up docker-compose-plugin (2.29.2-1~ubuntu.20.04~focal) ...
Setting up docker-ce-cli (5:27.2.1-1~ubuntu.20.04~focal) ...
Setting up pigz (2.4-1) ...
Setting up docker-ce-rootless-extras (5:27.2.1-1~ubuntu.20.04~focal) ...
Setting up docker-ce (5:27.2.1-1~ubuntu.20.04~focal) ...
Created symlink /etc/systemd/system/multi-user.target.wants/docker.service → /lib/systemd/system/docker.service.
Created symlink /etc/systemd/system/sockets.target.wants/docker.socket → /lib/systemd/system/docker.socket.
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for systemd (245.4-4ubuntu3.20) ...
root@ubuntu-vm18:~# docker version
content_copy zoom_out_map
Client: Docker Engine - Community
 Version:           27.2.1
 API version:       1.47
 Go version:        go1.22.7
 Git commit:        9e34c9b
 Built:             Fri Sep  6 12:08:15 2024
 OS/Arch:           linux/amd64
 Context:           default

Server: Docker Engine - Community
 Engine:
  Version:          27.2.1
  API version:      1.47 (minimum version 1.24)
  Go version:       go1.22.7
  Git commit:       8b539b8
  Built:            Fri Sep  6 12:08:15 2024
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.7.22
  GitCommit:        7f7fdf5fed64eb6a7caf99b3e12efcf9d60e311c
 runc:
  Version:          1.1.14
  GitCommit:        v1.1.14-0-g2c9f560
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

Download cRPD Software from Docker Registry

The cRPD software is available as a cRPD Docker file from the Juniper Docker registry.

You can download the software in two ways:

  • Juniper Docker registry

  • Juniper software download page

Prerequisites
  • Before you import the cRPD software, ensure that Docker is installed on the Linux host and that the Docker Engine is running.

  • Ensure to register with Juniper Support before you download the cRPD software.

Once the Docker Engine has been installed on the host, perform the following to download and start using the cRPD image:

To download the cRPD software using the Juniper Docker registry:

  1. Log in to the Juniper Docker registry using the following steps:
    1. Create the file -passwd.txt and copy the access token excluding the quotes provided by Juniper customer care team.
    2. Log in to enterprise hub using the following command:
      root@ubuntu-vm18$ cat passwd.txt | docker login -u"<registered-email-id>" --password-stdin enterprise-hub.juniper.net:443

      For example, root@ubuntu-vm18$ cat passwd.txt | docker login -u user@domain.com --password-stdin enterprise-hub.juniper.net:443

  2. Pull the docker image from the download site using the following command:

    root@ubuntu-vm18:~# docker pull enterprise-hub.juniper.net:443/crpd-docker-prod/crpd:<release tag>

    root@ubuntu-vm18:~# docker pull enterprise-hub.juniper.net:443/crpd-docker-prod/crpd:22.3R1

  3. Verify images in docker image repository.

    root@ubuntu-vm18:~# docker images

    content_copy zoom_out_map
    REPOSITORY                                                                           TAG                             IMAGE ID       CREATED         SIZE   
    enterprise-hub.juniper.net:443/crpd-docker-prod/crpd                                 latest                          5d3c29ee4521   3 months ago    550MB
    enterprise-hub.juniper.net:443/crpd-docker-prod/crpd                                 22.3R1                          5dfdda6ea2de   5 months ago    461MB
    
    

Download cRPD Software from Juniper URL

To download the cRPD software from the Juniper download URL:
  1. Download the cRPD software image from the Juniper Networks website.
    root@ubuntu-vm18:~# wget "https://cdn.juniper.net/software/crpd/24.2R1/junos-routing-crpd-docker-amd64-24.2R1.14.tgz?SM_USER=username&__gda__=xxx" -O junos-routing-crpd-docker-amd64-24.2R1.14.tgz
    root@ubuntu-vm18:~# docker load -i junos-routing-crpd-docker-24.2R1.14.tgz
    content_copy zoom_out_map
    8716c4e476eb: Loading layer [==================================================>]  537.7MB/537.7MB
    Loaded image: crpd:24.2R1.14
  2. Verify the downloaded images in docker image repository.
    root@ubuntu-vm18:~# docker images
    content_copy zoom_out_map
    REPOSITORY   TAG         IMAGE ID       CREATED        SIZE
    crpd         24.2R1.14   281363ff6dbf   2 months ago   530MB
    

Create Data Volumes

To create data volumes:

  1. Create data volume for configuration and var logs.

    root@ubuntu-vm18:~# docker volume create crpd01-config

    content_copy zoom_out_map
    crpd01-config
    

    root@ubuntu-vm18:~# docker volume create crpd01-varlog

    content_copy zoom_out_map
    crpd01-varlog

    Data volumes remain even after containers are destroyed and can be attached to newer containers. Data volumes are not shared between multiple containers at the same time unless they are ready-only volumes.

  2. Download and load the cRPD software.
  3. Attach the data volumes to create and launch the container to the cRPD instance.

    In the bridge mode, containers are connected to host network stack through bridge(s). Multiple containers can connect to the same bridge and communicate with each other. External devices communication is possible, if the bridge is connected to the host OS network interfaces.

    For routing purposes, it is also possible to assign exclusively assign all or a subset of physical interfaces for exclusive use by a docker container.

    Note:

    You must include the --privileged flag in the docker run command to enable the cRPD container to run in privileged mode.

    root@ubuntu-vm18:~# docker run --rm --detach --name crpd01 -h crpd01 --net=bridge --privileged -v crpd01-config:/config -v crpd01-varlog:/var/log -it enterprise-hub.juniper.net/crpd-docker-prod/crpd:24.2R1.14

    content_copy zoom_out_map
    e38724100bdc5e0f8261484315ca70b8d275306291115fb9e45f6aab3e3475ed

    Bridge mode is the default working mode of docker. This allows multiple containers to run on same host without any assignment of dynamic port. Each container runs its own private network namespace.

To launch cRPD in host networking mode:

  1. In the host mode, the network namespace is shared. For example, if an interface is defined inside a pod, the same interface is visible on the host as well. Docker containers use the host network namespace. Run the command to launch cRPD in host networking mode:

    root@ubuntu-vm18:~# docker run --rm --detach --name crpd01 -h crpd01 --privileged --net=host -v crpd01-config:/config -v crpd01-varlog:/var/log -it crpd:24.2R1.14

Configure Memory

You can limit the amount of memory allocated to the cRPD by specifying the memory size in the following command:

  • root@ubuntu-vm18:~# docker run --rm --detach --name crpd01 -h crpd01 --privileged -v crpd01-config:/config -v crpd01-varlog:/var/log -m 2048MB --memory-swap=2048MB -it crpd:24.2R1.14

Configure cRPD using the CLI

cRPD provides Junos command line configuration and operational commands for routing service. It provides subsets of routing protocols configuration that enable node participates in topology and routing.

You can configure interfaces from Linux shell. Interface configuration is available only for the ISO addresses.

To configure the cRPD container using the CLI:

  1. Log in to the cRPD container.

    root@ubuntu-vm18:~/# docker exec -it crpd01 cli

  2. Enter configuration mode.

    root@crpd01> configure

    content_copy zoom_out_map
    Entering configuration mode
    [edit]
  3. Set the root authentication password by entering a cleartext password, an encrypted password, or an SSH public key string (DSA or RSA).

    root@crpd01# set system root-authentication plain-text-password

    content_copy zoom_out_map
    New password: password 
    Retype new password: password
  4. Commit the configuration to activate it on the cRPD instance.

    root@crpd01# commit

    content_copy zoom_out_map
    commit complete
  5. (Optional) Use the show command to display the configuration to verify that it is correct.

    root@crpd01# show

    content_copy zoom_out_map
    ## Last changed: 2019-02-13 19:28:26 UTC
    version "19.2I20190125_1733_rbu-builder [rbu-builder]";
    system {
        root-authentication {
            encrypted-password "$6$JEc/p$QOUpqi2ew4tVJNKXZYiCKT8CjnlP3SLu16BRIxvtz0CyBMc57WGu2oCyg/lTr0iR8oJMDumtEKi0HVo2NNFEJ."; ## SECRET-DATA
        }
    }
    
footer-navigation