Home / Best Practices / Networking / Prepare kube-ovn underlay physical networks

Prepare kube-ovn underlay physical networks

Kube-OVN Underlay container network relies on the support of the physical network for transmission. Before deploying the Kube-OVN Underlay network, please collaborate with the network administrator to plan and configure the physical network in advance to ensure network connectivity.

Instructions for use

Kube-OVN Underlay requires a multi-NIC deployment, and the Underlay subnet must have exclusive access to a NIC. This NIC should not have any other type of traffic, such as SSH, which needs to use a different NIC.

Before using, please make sure that the node server has at least a dual NIC environment, and the recommended NIC speed is at least 10 Gbps or higher (e.g. 10 Gbps, 25 Gbps, 40 Gbps).

Explanation of nouns

VLAN (Virtual Local Area Network) is a data exchange technology that logically divides a local area network into segments (or smaller LANs) to achieve virtual workgroup.

The emergence of VLAN technology allows administrators to logically divide different users within the same physical LAN into different broadcast domains based on actual application requirements. Each VLAN consists of a group of computer workstations with similar needs and has the same attributes as a physically formed LAN. Since it is divided logically rather than physically, the workstations within the same VLAN are not restricted to the same physical range, meaning that these workstations can be in different physical LAN segments.

The main advantages of VLAN are:

Environment requirements

In Underlay mode, Kube-OVN bridges a physical network card to OVS and sends packets directly through this physical network card. The forwarding capabilities at the L2/L3 level depend on the underlying network devices. It is necessary to configure the corresponding gateway, VLAN, and security policies on the underlying network devices in advance.

Configuration examples

The node server in this example is a physical machine with dual network cards. Network card 1 is the default route network card, while network card 2 is the non-default route network card and does not have an IP address configured. It is exclusively used for the Underlay subnet. Network card 2 is connected to the external switch interface.

Switch configuration

Configure VLAN Interface:

#
interface Vlan-interface74
  ip address 192.168.74.254 255.255.255.0   //IPv4 Gateway Address
  ipv6 address 2074::192:168:74:254/64  //IPv6 Gateway Address
#

Interface connected to the configuration and network card:

#
interface Ten-GigabitEthernet1/0/19
  port link mode bridge
  port link-type trunk  //Interface configuration Trunk Mode
  undo port trunk permit vlan 1
  port trunk permit vlan 74  //Allow configuration for VLAN Through
#

Checking network connectivity

Test whether NIC2 can communicate with the gateway address:

ip link add ens224.74 link ens224 type vlan id 74  //Network card name is ens224,VLAN IDis 74
ip link set ens224.74 up
ip addr add 192.168.74.200/24 dev ens224.74  //in Underlay Choose a test address within the subnet,This example uses 192.168.74.200/24
ping 192.168.74.254  //If possible Ping If you can ping the gateway, it means the physical environment meets the deployment requirements
ip addr del 192.168.74.200/24 dev ens224.74  //After the test is completed, the test address needs to be deleted
ip link del ens224.74  //After the test is completed, the sub-interface needs to be deleted

Platform configuration

In the left navigation bar, click Clusters > Clusters, and then click Create cluster. For specific configuration steps, please refer to the Create a Cluster document. The configuration of the container network is shown in the following figure.

Note: The Join subnet has no practical significance in the Underlay environment. It is mainly used to create the Overlay subnet later on, providing the IP address range required for communication between nodes and Pods.