Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Cloud-Native Router Operator Service Module: Host-Based Routing Example Configuration Files

This section contains example scripts and configuration files that you can use to create a service module host-based routing deployment.

Host-Based Routing: Example Scripts and Configuration Files to Install cRPD

Example cRPD Installation Script

The following example script installs cRPD on the node where you run the script. If cRPD is already running on the node, the script removes the running cRPD instance and installs a new instance. If the script finds an existing cRPD configuration file, it will reuse that configuration file. Otherwise, it will use the configuration file specified by the CONFIG_TEMPLATE variable that you set in the script.

Run this script with the proper CONFIG_TEMPLATE configuration file on every node in your cluster.

We provide sample CONFIG_TEMPLATE configuration files in Example Control Plane Node Configuration File and Example Worker Node Configuration File.

install-crpd.sh:

Example Control Plane Node Configuration File

This configuration file is referenced by CONFIG_TEMPLATE in the cRPD installation script. There is one control plane node configuration file per control plane node. See Table 1 through Table 3 for the variable values to set for each control plane node.

ctl_plane_crpd_connectivity_template_5_node.conf:

Table 1: Node 1 (Control Plane Node) Example Settings

Variable

Setting

LO0_IP_POOL

10.12.0.0/24

LO0_IP

10.12.0.1

VETH_CRPD

10.1.1.2

VETH6_CRPD

2001:db8:1::2

VETH_PREFIX

10.1.1.0

VETH6_PREFIX

2001:db8:1::0

VETH_K8S

10.1.1.1

VETH6_K8S

2001:db8:1::1

POD_CIDR

192.168.0.0/24

MASTER1_EVPN_PEER_IP

10.12.0.2

MASTER2_EVPN_PEER_IP

10.12.0.3

WORKER1_EVPN_PEER_IP

10.12.0.4

WORKER2_EVPN_PEER_IP

10.12.0.5

MASTER1_PEER_ENS4_IP

192.168.1.102

MASTER2_PEER_ENS4_IP

192.168.1.103

WORKER1_PEER_ENS4_IP

192.168.1.104

WORKER2_PEER_ENS4_IP

192.168.1.105

Table 2: Node 2 (Control Plane Node) Example Settings

Variable

Setting

LO0_IP_POOL

10.12.0.0/24

LO0_IP

10.12.0.2

VETH_CRPD

10.1.2.2

VETH6_CRPD

2001:db8:2::2

VETH_PREFIX

10.1.2.0

VETH6_PREFIX

2001:db8:2::0

VETH_K8S

10.1.2.1

VETH6_K8S

2001:db8:2::1

POD_CIDR

192.168.0.0/24

MASTER1_EVPN_PEER_IP

10.12.0.1

MASTER2_EVPN_PEER_IP

10.12.0.3

WORKER1_EVPN_PEER_IP

10.12.0.4

WORKER2_EVPN_PEER_IP

10.12.0.5

MASTER1_PEER_ENS4_IP

192.168.1.1

MASTER2_PEER_ENS4_IP

192.168.1.3

WORKER1_PEER_ENS4_IP

192.168.1.4

WORKER2_PEER_ENS4_IP

192.168.1.5

Table 3: Node 3 (Control Plane Node) Example Settings

Variable

Setting

LO0_IP_POOL

10.12.0.0/24

LO0_IP

10.12.0.3

VETH_CRPD

10.1.3.2

VETH6_CRPD

2001:db8:3::2

VETH_PREFIX

10.1.3.0

VETH6_PREFIX

2001:db8:3::0

VETH_K8S

10.1.3.1

VETH6_K8S

2001:db8:3::1

POD_CIDR

192.168.0.0/24

MASTER1_EVPN_PEER_IP

10.12.0.1

MASTER2_EVPN_PEER_IP

10.12.0.2

WORKER1_EVPN_PEER_IP

10.12.0.4

WORKER2_EVPN_PEER_IP

10.12.0.5

MASTER1_PEER_ENS4_IP

192.168.1.1

MASTER2_PEER_ENS4_IP

192.168.1.2

WORKER1_PEER_ENS4_IP

192.168.1.4

WORKER2_PEER_ENS4_IP

192.168.1.5

Example Worker Node Configuration File

This configuration file is referenced by CONFIG_TEMPLATE in the cRPD installation script. There is one worker node configuration file per worker node. See Table 4 and Table 5 for the variable values to set for each worker node.

worker_crpd_connectivity_template_5_node.conf:

Table 4: Node 4 (Worker Node) Example Settings

Variable

Setting

LO0_IP_POOL

10.12.0.0/24

LO0_IP

10.12.0.4

VETH_CRPD

10.1.4.2

VETH6_CRPD

2001:db8:4::2

VETH_PREFIX

10.1.4.0

VETH6_PREFIX

2001:db8:4::0

VETH_K8S

10.1.4.1

VETH6_K8S

2001:db8:4::1

POD_CIDR

192.168.0.0/24

MASTER1_EVPN_PEER_IP

10.12.0.1

MASTER2_EVPN_PEER_IP

10.12.0.2

MASTER3_EVPN_PEER_IP

10.12.0.3

MASTER1_PEER_ENS4_IP

192.168.1.101

MASTER2_PEER_ENS4_IP

192.168.1.102

MASTER3_PEER_ENS4_IP

192.168.1.103

Table 5: Node 5 (Worker Node) Example Settings

Variable

Setting

LO0_IP_POOL

10.12.0.0/24

LO0_IP

10.12.0.5

VETH_CRPD

10.1.5.2

VETH6_CRPD

2001:db8:5::2

VETH_PREFIX

10.1.5.0

VETH6_PREFIX

2001:db8:5::0

VETH_K8S

10.1.5.1

VETH6_K8S

2001:db8:5::1

POD_CIDR

192.168.0.0/24

MASTER1_EVPN_PEER_IP

10.12.0.1

MASTER2_EVPN_PEER_IP

10.12.0.2

MASTER3_EVPN_PEER_IP

10.12.0.3

MASTER1_PEER_ENS4_IP

192.168.1.101

MASTER2_PEER_ENS4_IP

192.168.1.102

MASTER3_PEER_ENS4_IP

192.168.1.103

Host-Based Routing: Example Calico Configuration

BGP Configuration Example

bgpconfig.yaml:

IP Pool Configuration Example

ippool-v4.yaml:

ippool-v6.yaml:

BGP Peer Configuration Example

bgppeers-v4.yaml:

bgppeers-v6.yaml:

Host-Based Routing: Example VxLAN and Route Target Pools

VxLAN Pool Example

vxlan-pool.yaml:

Route Target Pool Example

rt-pool.yaml:

Host-Based Routing: Example JCNR Configuration

JCNR Configuration

jcnr-config.yaml:

Host-Based Routing: Example Secondary CNI Configuration Files

Example MACVLAN Custom Resource

macvlan-cr.yaml:

Example MACVLAN Pods

macvlan-pods.yaml:

Example IPVLAN Custom Resource

ipvlan-cr.yaml:

Example IPVLAN Pods

ipvlan-pods.yaml: