image image image image image image



On This Page

Created on Aug 20, 2019

Introduction

This Reference Deployment Guide (RDG) describes the process of building a scalable Ethernet fabric with NVIDIA end-2-end solutions for deploying a Kubernetes (k8s) or an OpenShift cluster with RoCE acceleration enabled. RDMA/RoCE network technologies are essential to unlocking superior performance in Kubernetes or OpenShift clusters for machine learning (ML) and artificial intelligence (AI) workloads. Today, RDMA and RoCE are integrated into the mainstream code of popular AI/ML frameworks. Kubernetes pod's use of several additional high-performance network interfaces affects suitable network designs. One of way to scale-out a high-performance L2 network is to use a solution based on the Border Gateway Protocol (BGP) with EVPN and VXLAN overlays, which are used for network virtualization. VXLAN tunnels can satisfy this L2 adjacency requirement, and EVPN serves as a standard for scale-out L2 Ethernet fabrics. 

VXLAN can virtualize the data center network, enabling layer 2 segments to be extended over an IP core (the underlay).

EVPN is the control plane for modern VXLAN deployments, allowing VTEPs to discover each other via EVPN and exchange reachability information such as MAC and IPs across racks.

This RDG is based on RDG: Scale-Out fabric deployment with VXLAN-BGP-EVPN over NVIDIA Onyx and describes the deployment process of an additional Ethernet fabric for high-performance POD network interfaces that are suitable for: 

  • Red Hat OpenShift Container Platform 4.1 and above
  • Kubernetes cluster with version 1.10 and above

References

Components Overview

NVIDIA Spectrum® Open Ethernet Switches

The NVIDIA Spectrum® switch family provides the most efficient network solution for the ever-increasing performance demands of Data Center applications. The Spectrum product family includes a broad portfolio of Top-of-Rack (TOR) and aggregation switches that range from 16 to 128 physical ports, with Ethernet data rates of 1GbE, 10GbE, 25GbE, 40GbE, 50GbE, 100GbE, 200GbE and 400GbE per port. Spectrum Ethernet switches are ideal to build cost-effective and scalable data center network fabrics that can scale from a few nodes to tens-of-thousands of nodes.

LinkX® Ethernet Cables and Transceivers

NVIDIA LinkX cables and transceivers make 100Gb/s deployments as easy and as universal as 10Gb/s links. Because NVIDIA offers one of industry’s broadest portfolio of 10, 25, 40, 50,100, 200 and 400Gb/s Direct Attach Copper cables (DACs), Copper Splitter cables, Active Optical Cables (AOCs) and Transceivers, every data center reach from 0.5m to 10km is supported. To maximize system performance. NVIDIA tests every product in an end-to-end environment assuring a Bit Error Rate of less than 1E-15. A BER of 1E-15 is 1000x better than many competitors.

EVPN VXLAN: The Next Generation of Network Virtualization

VXLAN (Virtual Extensible LAN) has become mainstream for network virtualization. EVPN (Ethernet Virtual Private Networks) VXLAN – using BGP as the control plane – is becoming the preferred way to virtualize data center networks without dedicated controllers. BGP EVPN with VXLAN provides greater network efficiency and scalability through enhanced support for both L2 and L3 services. It provides administrators with fine-grained policy control to help boost efficient utilization of network resources.

Compute Platform

This solution is designed for multi-homing servers with 4 x 100 GbE ports like DGX-1 or HPE Apollo 6500.

Solution Overview

The solution is comprised of NVIDIA Onyx and NVIDIA Open Ethernet Spectrum switches. 

Only the Ethernet fabric configuration steps are detailed in this user guide. For Kubernetes cluster installation steps please refer to RDG: RoCE accelerated K8s cluster deployment for ML and HPC workloads. 

Logical Design

The following figure shows a high-speed Ethernet network diagram with the L2 network topology that is required to deploy a Kubernetes cluster with RoCE acceleration enabled. 

The diagram includes:

  • CLOS based network topology with BGP underlay routing protocol
  • Spine switch layer
  • Workload rack with one or more Leaf switches with independent connectivity to Spine switch layer
  • Service and storage rack with IPL connection between two Leaf switches that are connected to the Spine switch layer 

The diagram does not contain the Kubernetes Management network and does not affect it.


Below is the logical design of the Leaf switch with four wired SRIOV enabled physical interfaces from the Worker node:

Note that the Worker Nodes (servers like DGX-1 or HPE Apollo 6500) must be connected to the leaf switches without any bond, LAG or MLAG interface connectivity options.


Below is the logical design of the Leaf switches configuration with Service node:


Setup

Below is the ethernet fabric deployment and in the service node setup specifications.

NVIDIA SN2000 and SN3000 series ethernet switches can be deployed in the above network design.


Physical Design and Wiring

Below is an example of the physical design for high-speed back-end setup. The design can be customized to your use case and requirements.

Using different switch models may require different types of cables.  

Deployment Guide

Network / Fabric Deployment and Configuration

Prerequisites

This solution is based on NVIDIA Onyx switch operation system and supported only from NVIDIA Onyx version 3.8.1208 and above.

Below is a list of recommendations and prerequisites that are important for the configuration process:

Configuration

Before we start the configuration process, we recommend reading the Ethernet VPN User manual for NVIDIA Onyx to become familiar with EVPN deployment using NVIDIA Onyx.

Deployment configuration steps:

  1. Change the Leaf switch ports mode that are connected to the Worker nodes to switchport mode hybrid.
  2. Create an MLAG between the Leaf switches in the Service rack.
  3. Create VLANs on each Leaf switch and allow them on the hybrid ports.
  4. Create Loopback interface on each Leaf switch for HW VTEP.
  5. Choose and assign ASN for Spine switches( same ASN for ALL Spine switches).
  6. Choose and assign ASN for each Leaf switch(different for each Leaf switch).
  7. Configure BGP IPv4 underlay on Spine and Leaf switches.
  8. Advertise all Loopback network addresses on Leaf switches and MLAG tunnel IP address on both MLAG domain switches (in IPv4 address-family).
  9. Configure EVPN overlay on all switches.
  10. Configure NVE interface on each Leaf switch.
  11. Map VLANs to VNI's on all Leaf switches.

Example of our configuration files for the above physical solution design with the configuration steps implemented can be found here: https://github.com/Mellanox/roce_backend_at_scale.

for a Detailed .

Below are the switch CLI commands to configure the deployment of the spine switches, workload-rack leaf switches, and service-rack leaf switches (valid for NVIDIA Onyx version 3.8.1208).

The example shows mapping of four VLANs (111-114) to four VNIs (100111-100114):

Spine 1 switch
## Global configuration
hostname Spine1
ip routing vrf default
lldp
 
## Interfaces configuration: Spine to Leafs
interface ethernet 1/1-1/2 no switchport force
interface ethernet 1/31-1/32 no switchport force
interface ethernet 1/1 ip address 172.16.1.2/30 primary
interface ethernet 1/2 ip address 172.16.3.2/30 primary
interface ethernet 1/31 ip address 172.16.5.2/30 primary
interface ethernet 1/32 ip address 172.16.7.2/30 primary
 
## BGP configuration
protocol bgp
router bgp 65005 vrf default
router bgp 65005 vrf default neighbor evpn-peers peer-group
router bgp 65005 vrf default neighbor evpn-peers send-community
router bgp 65005 vrf default neighbor evpn-peers send-community extended
router bgp 65005 vrf default neighbor 172.16.1.1 remote-as 65001
router bgp 65005 vrf default neighbor 172.16.3.1 remote-as 65002
router bgp 65005 vrf default neighbor 172.16.5.1 remote-as 65003
router bgp 65005 vrf default neighbor 172.16.7.1 remote-as 65004
router bgp 65005 vrf default neighbor 172.16.2.1 peer-group evpn-peers
router bgp 65005 vrf default neighbor 172.16.4.1 peer-group evpn-peers
router bgp 65005 vrf default neighbor 172.16.5.1 peer-group evpn-peers
router bgp 65005 vrf default neighbor 172.16.7.1 peer-group evpn-peers
router bgp 65005 vrf default address-family l2vpn-evpn neighbor evpn-peers next-hop-unchanged
router bgp 65005 vrf default address-family l2vpn-evpn neighbor evpn-peers activate
 
## NTP configuration
no ntp server 192.114.62.250 disable
   ntp server 192.114.62.250 keyID 0
no ntp server 192.114.62.250 trusted-enable
   ntp server 192.114.62.250 version 4enable
   ntp server 192.114.62.250 version 4
Spine 2 switch
## Global configuration
hostname Spine2
ip routing vrf default
lldp
## Interfaces configuration: Spine to Leafs
interface ethernet 1/1-1/2 no switchport force
interface ethernet 1/31-1/32 no switchport force
interface ethernet 1/1 ip address 172.16.2.2/30 primary
interface ethernet 1/2 ip address 172.16.4.2/30 primary
interface ethernet 1/31 ip address 172.16.6.2/30 primary
interface ethernet 1/32 ip address 172.16.8.2/30 primary
 
## BGP configuration
protocol bgp
router bgp 65005 vrf default
router bgp 65005 vrf default neighbor evpn-peers peer-group
router bgp 65005 vrf default neighbor evpn-peers send-community
router bgp 65005 vrf default neighbor evpn-peers send-community extended
router bgp 65005 vrf default neighbor 172.16.1.1 remote-as 65001
router bgp 65005 vrf default neighbor 172.16.3.1 remote-as 65002
router bgp 65005 vrf default neighbor 172.16.6.1 remote-as 65003
router bgp 65005 vrf default neighbor 172.16.8.1 remote-as 65004
router bgp 65005 vrf default neighbor 172.16.1.1 peer-group evpn-peers
router bgp 65005 vrf default neighbor 172.16.3.1 peer-group evpn-peers
router bgp 65005 vrf default neighbor 172.16.6.1 peer-group evpn-peers
router bgp 65005 vrf default neighbor 172.16.8.1 peer-group evpn-peers
router bgp 65005 vrf default address-family l2vpn-evpn neighbor evpn-peers next-hop-unchanged
router bgp 65005 vrf default address-family l2vpn-evpn neighbor evpn-peers activate
 
## NTP configuration
no ntp server 192.114.62.250 disable
   ntp server 192.114.62.250 keyID 0
no ntp server 192.114.62.250 trusted-enable
   ntp server 192.114.62.250 version 4
Leaf switch Workload rack 1
## Global configuration
hostname R1L1
lldp
ip routing vrf default
vlan 111-114
 
## Interfaces configuration: Leaf to Nodes
interface ethernet 1/9-1/16 switchport mode hybrid
interface ethernet 1/9-1/16 switchport hybrid allowed-vlan all
 
## Interfaces configuration: Leaf to Spines
interface ethernet 1/1-1/2 no switchport force
interface ethernet 1/1 ip address 172.16.1.1/30 primary
interface ethernet 1/2 ip address 172.16.2.1/30 primary
 
## Interface configuration: for VXLAN VTEP
interface loopback 1
interface loopback 1 ip address 172.16.100.100/32 primary
 
## EVPN configuration
protocol nve
interface nve 1
interface nve 1 vxlan source interface loopback 1
interface nve 1 nve controller bgp
interface nve 1  nve vni 100111 vlan 111
interface nve 1  nve vni 100112 vlan 112
interface nve 1  nve vni 100113 vlan 113
interface nve 1  nve vni 100114 vlan 114
interface nve 1 nve neigh-suppression
 
## BGP configuration
protocol bgp
router bgp 65001 vrf default
router bgp 65001 vrf default bgp fast-external-fallover
router bgp 65001 vrf default maximum-paths 32
router bgp 65001 vrf default bestpath as-path multipath-relax force
router bgp 65001 vrf default neighbor evpn-peers peer-group
router bgp 65001 vrf default neighbor evpn-peers send-community
router bgp 65001 vrf default neighbor evpn-peers send-community extended
router bgp 65001 vrf default neighbor 172.16.1.2 remote-as 65005
router bgp 65001 vrf default neighbor 172.16.2.2 remote-as 65005
router bgp 65001 vrf default neighbor 172.16.1.2 peer-group evpn-peers
router bgp 65001 vrf default neighbor 172.16.2.2 peer-group evpn-peers
router bgp 65001 vrf default address-family l2vpn-evpn neighbor evpn-peers next-hop-unchanged
router bgp 65001 vrf default address-family l2vpn-evpn neighbor evpn-peers activate
router bgp 65001 vrf default network 172.16.100.100 /32
router bgp 65001 vrf default address-family l2vpn-evpn auto-create
 
## NTP configuration
no ntp server 192.114.62.250 disable
   ntp server 192.114.62.250 keyID 0
no ntp server 192.114.62.250 trusted-enable
   ntp server 192.114.62.250 version 4
Leaf switch Workload rack 2
## Global configuration
hostname R2L1
lldp
ip routing vrf default
vlan 111-114
 
## Interfaces configuration: Leaf to Nodes
interface ethernet 1/9-1/16 switchport mode hybrid
interface ethernet 1/9-1/16 switchport hybrid allowed-vlan all
 
## Interfaces configuration: Leaf to Spines
interface ethernet 1/1-1/2 no switchport force
interface ethernet 1/1 ip address 172.16.3.1/30 primary
interface ethernet 1/2 ip address 172.16.4.1/30 primary
 
## Interface configuration: for VXLAN VTEP
interface loopback 1
interface loopback 1 ip address 172.16.101.101/32 primary
 
## EVPN configuration
protocol nve
interface nve 1
interface nve 1 vxlan source interface loopback 1
interface nve 1 nve controller bgp
interface nve 1  nve vni 100111 vlan 111 
interface nve 1  nve vni 100112 vlan 112 
interface nve 1  nve vni 100113 vlan 113 
interface nve 1  nve vni 100114 vlan 114 
interface nve 1 nve neigh-suppression
 
## BGP configuration
protocol bgp
router bgp 65002 vrf default
router bgp 65002 vrf default bgp fast-external-fallover
router bgp 65002 vrf default maximum-paths 32
router bgp 65002 vrf default bestpath as-path multipath-relax force
router bgp 65002 vrf default neighbor evpn-peers peer-group
router bgp 65002 vrf default neighbor evpn-peers send-community
router bgp 65002 vrf default neighbor evpn-peers send-community extended
router bgp 65002 vrf default neighbor 172.16.3.2 remote-as 65005
router bgp 65002 vrf default neighbor 172.16.4.2 remote-as 65005
router bgp 65002 vrf default neighbor 172.16.3.2 peer-group evpn-peers
router bgp 65002 vrf default neighbor 172.16.4.2 peer-group evpn-peers
router bgp 65002 vrf default address-family l2vpn-evpn neighbor evpn-peers next-hop-unchanged
router bgp 65002 vrf default address-family l2vpn-evpn neighbor evpn-peers activate
router bgp 65002 vrf default network 172.16.101.101 /32
router bgp 65002 vrf default address-family l2vpn-evpn auto-create
 
## NTP configuration
no ntp server 192.114.62.250 disable
   ntp server 192.114.62.250 keyID 0
no ntp server 192.114.62.250 trusted-enable
   ntp server 192.114.62.250 version 4
Service rack Leaf 1 switch
## Global configuration
hostname SR1L1
ip routing vrf default
lldp
lacp
vlan 111-114
vlan 4094
 
## Interface configuration: Leaf to Nodes
interface ethernet 1/1-1/48 switchport mode hybrid
interface ethernet 1/1-1/48 switchport hybrid allowed-vlan all
 
## Interface configuration: Leaf to Spines
interface ethernet 1/49-1/50 no switchport force
interface ethernet 1/49 ip address 172.16.5.1/30 primary
interface ethernet 1/50 ip address 172.16.6.1/30 primary
 
## Interface configuration: for VXLAN VTEP
interface loopback 1
interface loopback 1 ip address 172.16.102.102/32 primary
 
## Interface configuration: IPL
protocol mlag
interface vlan 4094
interface port-channel 4094
interface ethernet 1/55-1/56 channel-group 4094 mode active
interface vlan 4094 ip address 123.123.123.2/30 primary
mlag-vip storage-mlag ip 1.1.1.1 /30 force
no mlag shutdown
interface port-channel 4094 ipl 1
interface vlan 4094 ipl 1 peer-address 123.123.123.1
 
## EVPN configuration
protocol nve
interface nve 1
interface nve 1 vxlan source interface loopback 1
interface nve 1 nve controller bgp
interface nve 1 vxlan mlag-tunnel-ip 172.16.104.104
interface nve 1  nve vni 100111 vlan 111
interface nve 1  nve vni 100112 vlan 112
interface nve 1  nve vni 100113 vlan 113
interface nve 1  nve vni 100114 vlan 114
interface nve 1 nve neigh-suppression
 
## BGP configuration
protocol bgp
router bgp 65003 vrf default
router bgp 65003 vrf default bgp fast-external-fallover
router bgp 65003 vrf default maximum-paths 32
router bgp 65003 vrf default bestpath as-path multipath-relax force
router bgp 65003 vrf default neighbor evpn-peers peer-group
router bgp 65003 vrf default neighbor evpn-peers send-community
router bgp 65003 vrf default neighbor evpn-peers send-community extended
router bgp 65003 vrf default neighbor 172.16.5.2 remote-as 65005
router bgp 65003 vrf default neighbor 172.16.6.2 remote-as 65005
router bgp 65003 vrf default neighbor 172.16.5.2 peer-group evpn-peers
router bgp 65003 vrf default neighbor 172.16.6.2 peer-group evpn-peers
router bgp 65003 vrf default address-family l2vpn-evpn neighbor evpn-peers next-hop-unchanged
router bgp 65003 vrf default address-family l2vpn-evpn neighbor evpn-peers activate
router bgp 65003 vrf default network 172.16.102.102 /32
router bgp 65003 vrf default network 172.16.104.104 /32
router bgp 65003 vrf default address-family l2vpn-evpn auto-create
 
## NTP configuration
no ntp server 192.114.62.250 disable
   ntp server 192.114.62.250 keyID 0
no ntp server 192.114.62.250 trusted-enable
   ntp server 192.114.62.250 version 4
Service rack Leaf 2 switch
## Global configuration
hostname SR1L2
ip routing vrf default
lldp
lacp
vlan 111-114
vlan 4094
## Interface configuration: Leaf to Nodes
interface ethernet 1/1-1/48 switchport mode hybrid
interface ethernet 1/1-1/48 switchport hybrid allowed-vlan all
 
## Interface configuration: Leaf to Spines
interface ethernet 1/49-1/50 no switchport force
interface ethernet 1/49 ip address 172.16.7.1/30 primary
interface ethernet 1/50 ip address 172.16.8.1/30 primary
 
## Interface configuration: for VXLAN VTEP
interface loopback 1
interface loopback 1 ip address 172.16.103.103/32 primary
 
## Interface configuration: IPL
protocol mlag
interface vlan 4094
interface port-channel 4094
interface vlan 4094 ip address 123.123.123.1/30 primary
mlag-vip storage-mlag ip 1.1.1.1 /30 force
no mlag shutdown
interface port-channel 4094 ipl 1
interface vlan 4094 ipl 1 peer-address 123.123.123.2
 
## EVPN configuration
protocol nve
interface nve 1
interface nve 1 vxlan source interface loopback 1
interface nve 1 nve controller bgp
interface nve 1 vxlan mlag-tunnel-ip 172.16.104.104
interface nve 1  nve vni 100111 vlan 111 
interface nve 1  nve vni 100112 vlan 112 
interface nve 1  nve vni 100113 vlan 113 
interface nve 1  nve vni 100114 vlan 114 
interface nve 1 nve neigh-suppression
 
## BGP configuration
protocol bgp
router bgp 65004 vrf default
router bgp 65004 vrf default bgp fast-external-fallover
router bgp 65004 vrf default maximum-paths 32
router bgp 65004 vrf default bestpath as-path multipath-relax force
router bgp 65004 vrf default neighbor evpn-peers peer-group
router bgp 65004 vrf default neighbor evpn-peers send-community
router bgp 65004 vrf default neighbor evpn-peers send-community extended
router bgp 65004 vrf default neighbor 172.16.7.2 remote-as 65005
router bgp 65004 vrf default neighbor 172.16.8.2 remote-as 65005
router bgp 65004 vrf default neighbor 172.16.7.2 peer-group evpn-peers
router bgp 65004 vrf default neighbor 172.16.8.2 peer-group evpn-peers
router bgp 65004 vrf default address-family l2vpn-evpn neighbor evpn-peers next-hop-unchanged
router bgp 65004 vrf default address-family l2vpn-evpn neighbor evpn-peers activate
router bgp 65004 vrf default network 172.16.103.103 /32
router bgp 65004 vrf default network 172.16.104.104 /32
router bgp 65004 vrf default address-family l2vpn-evpn auto-create
 
## NTP configuration
no ntp server 192.114.62.250 disable
   ntp server 192.114.62.250 keyID 0
no ntp server 192.114.62.250 trusted-enable
   ntp server 192.114.62.250 version 4

Deployment Verification

The below commands can verify the deployment in the Spine switch, Workload rack Leaf switch and Service rack Leaf switch.

Spine switch deployment verification:

show ip bgp evpn summary - displays the BGP peers participating in the layer 2 EVPN address-family and their state:

VRF name                  : default
BGP router identifier     : 172.16.2.2
local AS number           : 65005
BGP table version         : 24702
Main routing table version: 24702
IPV4 Prefixes             : 6
IPV6 Prefixes             : 0
L2VPN EVPN Prefixes       : 21

------------------------------------------------------------------------------------------------------------------
Neighbor          V    AS           MsgRcvd   MsgSent   TblVer    InQ    OutQ   Up/Down       State/PfxRcd
------------------------------------------------------------------------------------------------------------------
172.16.2.1        4    65001        80877     80910     24702     0      0      39:03:43:05   ESTABLISHED/4
172.16.4.1        4    65002        80826     80867     24702     0      0      39:03:43:02   ESTABLISHED/7
172.16.5.1        4    65003        78009     80864     24702     0      0      39:03:42:58   ESTABLISHED/5
172.16.7.1        4    65004        78073     80851     24702     0      0      39:03:42:55   ESTABLISHED/5


Leaf switch deployment verification:

Workload rack Leaf switch:

show interface nve 1 - displays the configured VTEP on a network device participating in BGP EVPN:

Interface NVE 1 status:
  Admin state: up
  Source interface: loopback 1 (ip 172.16.100.100)
  Controller mode: BGP
  Mlag tunnel IP: (not configured)
  Effective tunnel IP: 172.16.100.100
  Global Neigh-Suppression: Enable
  NVE member interfaces: (not configured)
  Counters
  12266                encapsulated (Tx) NVE packets
  29046                decapsulated (Rx) NVE packets
  0                    dropped NVE-encapsulated packets
  0                    NVE-encapsulated packets with errors

show interface nve 1 detail - displays the configured VNIs on a network device participating in BGP EVPN:

----------------------------------------------
Vlan         VNI          Neigh Suppression
----------------------------------------------
111          100111       Enable
112          100112       Enable
113          100113       Enable
114          100114       Enable

show ip bgp evpn summary:

VRF name                  : default
BGP router identifier     : 172.16.1.1
local AS number           : 65001
BGP table version         : 35287
Main routing table version: 35287
IPV4 Prefixes             : 8
IPV6 Prefixes             : 0
L2VPN EVPN Prefixes       : 24

------------------------------------------------------------------------------------------------------------------
Neighbor          V    AS           MsgRcvd   MsgSent   TblVer    InQ    OutQ   Up/Down       State/PfxRcd
------------------------------------------------------------------------------------------------------------------
172.16.1.2        4    65005        80848     80822     35287     0      0      39:03:42:25   ESTABLISHED/12
172.16.2.2        4    65005        80874     80834     35287     0      0      39:03:43:33   ESTABLISHED/12


Service rack Leaf switch

In the following command output "Mlag tunnel IP" must contain a value/parameter. The rest of the commands have the same output.

show interface nve 1 :

Interface NVE 1 status:
  Admin state: up
  Source interface: loopback 1 (ip 172.16.102.102)
  Controller mode: BGP
  Mlag tunnel IP: 172.16.104.104
  Effective tunnel IP: 172.16.104.104
  Global Neigh-Suppression: Enable
  NVE member interfaces: (not configured)
  Counters
  41283                encapsulated (Tx) NVE packets
  0                    decapsulated (Rx) NVE packets
  0                    dropped NVE-encapsulated packets
  0                    NVE-encapsulated packets with errors

Service Host Deployment and Configuration

We selected the Service Node to provide IP addresses for high-performance network adapters via DHCP service that was deployed in a docker container. This server has been deployed with Ubuntu 18.04 OS. For DHCP service we are using the docker image storytel/dnsmasq with the dnsmasq application.

Service Node deployment steps:

  1. Install the OS
  2. Install the required packages
  3. Configure the network interfaces
  4. Install Docker container
  5. Create a dnsmasq configuration file - dnsmasq.conf
  6. Run the docker image with dnsmasq application

Required packages:

# apt-get -y install ifenslave vlan


Interfaces configuration file:

Network interfaces configuration - /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eno1
iface eno1 inet dhcp

auto ens1f0
iface ens1f0 inet manual
bond-master bond0
# bond-primary ens1f0

auto ens1f1
iface ens1f1 inet manual
bond-master bond0

auto bond0
iface bond0 inet manual
        slaves ens1f0 ens1f1
        bond-primary ens1f0
        bond-mode active-backup
        bond-miimon 100

auto bond0.111
iface bond0.111 inet static
        vlan-raw-device bond0
        address 10.10.111.254
        netmask 255.255.255.0

auto bond0.112
iface bond0.112 inet static
        vlan-raw-device bond0
        address 10.10.112.254
        netmask 255.255.255.0

auto bond0.113
iface bond0.113 inet static
        vlan-raw-device bond0
        address 10.10.113.254
        netmask 255.255.255.0

auto bond0.114
iface bond0.114 inet static
        vlan-raw-device bond0
        address 10.10.114.254
        netmask 255.255.255.0

Install Docker:

# apt-get install docker.io

Configuration file for dnsmasq application - /etc/dnsmasq/dnsmasq.conf:

keep-in-foreground
log-queries
log-dhcp
interface=bond0.111,bond0.112,bond0.113,bond0.114
bind-interfaces
port=0
bogus-priv
dhcp-range=bond0.111,10.10.111.1,10.10.111.253,255.255.255.0,60m
dhcp-range=bond0.112,10.10.112.1,10.10.112.253,255.255.255.0,60m
dhcp-range=bond0.113,10.10.113.1,10.10.113.253,255.255.255.0,60m
dhcp-range=bond0.114,10.10.114.1,10.10.114.253,255.255.255.0,60m
dhcp-option=bond0.111,3
dhcp-option=bond0.112,3
dhcp-option=bond0.113,3
dhcp-option=bond0.114,3

Run docker container with customized dnsmasq application configuration file.

docker run --name dnsmasq --cap-add=NET_ADMIN --net=host -v /etc/dnsmasq:/etc/dnsmasq storytel/dnsmasq


Done!

About the Authors

Vitaliy Razinkov

Over the past few years, Vitaliy Razinkov has been working as a Solutions Architect on the NVIDIA Networking team, responsible for complex Kubernetes/OpenShift and Microsoft's leading solutions, research and design. He previously spent more than 25 years in senior positions at several companies. Vitaliy has written several reference designs guides on Microsoft technologies, RoCE/RDMA accelerated machine learning in Kubernetes/OpenShift, and container solutions, all of which are available on the NVIDIA Networking Documentation website.

Notice

This document is provided for information purposes only and shall not be regarded as a warranty of a certain functionality, condition, or quality of a product. Neither NVIDIA Corporation nor any of its direct or indirect subsidiaries and affiliates (collectively: “NVIDIA”) make any representations or warranties, expressed or implied, as to the accuracy or completeness of the information contained in this document and assumes no responsibility for any errors contained herein. NVIDIA shall have no liability for the consequences or use of such information or for any infringement of patents or other rights of third parties that may result from its use. This document is not a commitment to develop, release, or deliver any Material (defined below), code, or functionality.
NVIDIA reserves the right to make corrections, modifications, enhancements, improvements, and any other changes to this document, at any time without notice.
Customer should obtain the latest relevant information before placing orders and should verify that such information is current and complete.
NVIDIA products are sold subject to the NVIDIA standard terms and conditions of sale supplied at the time of order acknowledgement, unless otherwise agreed in an individual sales agreement signed by authorized representatives of NVIDIA and customer (“Terms of Sale”). NVIDIA hereby expressly objects to applying any customer general terms and conditions with regards to the purchase of the NVIDIA product referenced in this document. No contractual obligations are formed either directly or indirectly by this document.
NVIDIA products are not designed, authorized, or warranted to be suitable for use in medical, military, aircraft, space, or life support equipment, nor in applications where failure or malfunction of the NVIDIA product can reasonably be expected to result in personal injury, death, or property or environmental damage. NVIDIA accepts no liability for inclusion and/or use of NVIDIA products in such equipment or applications and therefore such inclusion and/or use is at customer’s own risk.
NVIDIA makes no representation or warranty that products based on this document will be suitable for any specified use. Testing of all parameters of each product is not necessarily performed by NVIDIA. It is customer’s sole responsibility to evaluate and determine the applicability of any information contained in this document, ensure the product is suitable and fit for the application planned by customer, and perform the necessary testing for the application in order to avoid a default of the application or the product. Weaknesses in customer’s product designs may affect the quality and reliability of the NVIDIA product and may result in additional or different conditions and/or requirements beyond those contained in this document. NVIDIA accepts no liability related to any default, damage, costs, or problem which may be based on or attributable to: (i) the use of the NVIDIA product in any manner that is contrary to this document or (ii) customer product designs.
No license, either expressed or implied, is granted under any NVIDIA patent right, copyright, or other NVIDIA intellectual property right under this document. Information published by NVIDIA regarding third-party products or services does not constitute a license from NVIDIA to use such products or services or a warranty or endorsement thereof. Use of such information may require a license from a third party under the patents or other intellectual property rights of the third party, or a license from NVIDIA under the patents or other intellectual property rights of NVIDIA.
Reproduction of information in this document is permissible only if approved in advance by NVIDIA in writing, reproduced without alteration and in full compliance with all applicable export laws and regulations, and accompanied by all associated conditions, limitations, and notices.
THIS DOCUMENT AND ALL NVIDIA DESIGN SPECIFICATIONS, REFERENCE BOARDS, FILES, DRAWINGS, DIAGNOSTICS, LISTS, AND OTHER DOCUMENTS (TOGETHER AND SEPARATELY, “MATERIALS”) ARE BEING PROVIDED “AS IS.” NVIDIA MAKES NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE. TO THE EXTENT NOT PROHIBITED BY LAW, IN NO EVENT WILL NVIDIA BE LIABLE FOR ANY DAMAGES, INCLUDING WITHOUT LIMITATION ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF ANY USE OF THIS DOCUMENT, EVEN IF NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. Notwithstanding any damages that customer might incur for any reason whatsoever, NVIDIA’s aggregate and cumulative liability towards customer for the products described herein shall be limited in accordance with the Terms of Sale for the product.

Trademarks
NVIDIA, the NVIDIA logo, and Mellanox are trademarks and/or registered trademarks of NVIDIA Corporation and/or Mellanox Technologies Ltd. in the U.S. and in other countries. Other company and product names may be trademarks of the respective companies with which they are associated.

Copyright
© 2022 NVIDIA Corporation & affiliates. All Rights Reserved.