Skip to content

Commit 3ef7163

Browse files
authored
Merge pull request #43988 from mgarrellRH/BZ2068245
BZ2068245: Updating process for VLAN configuration using NADs and NNCPs
2 parents eef36a1 + 713712b commit 3ef7163

File tree

4 files changed

+66
-8
lines changed

4 files changed

+66
-8
lines changed

modules/virt-creating-bridge-nad-cli.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ spec:
4141
<4> The actual name of the Container Network Interface (CNI) plug-in that provides the network for this network attachment definition. Do not change this field unless you want to use a different CNI.
4242
<5> The name of the Linux bridge configured on the node.
4343
<6> Optional: Flag to enable MAC spoof check. When set to `true`, you cannot change the MAC address of the pod or guest interface. This attribute provides security against a MAC spoofing attack by allowing only a single MAC address to exit the pod.
44-
<7> Optional: The VLAN tag.
44+
<7> Optional: The VLAN tag. No additional VLAN configuration is required on the node network configuration policy.
4545

4646
. Create the network attachment definition:
4747
+
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * virt/virtual_machines/vm_networking/virt-attaching-vm-multiple-networks.adoc
4+
5+
:_content-type: PROCEDURE
6+
[id="virt-configuring-linux-bridge-nncp_{context}"]
7+
= Creating a Linux bridge using a node network configuration policy
8+
9+
As a network administrator, you can create a Linux bridge interface on nodes in the cluster by applying a `NodeNetworkConfigurationPolicy` manifest to the cluster.
10+
11+
.Procedure
12+
13+
. Create the `NodeNetworkConfigurationPolicy` manifest. This YAML file is an example of a manifest for a Linux bridge interface.
14+
It includes samples values that you must replace with your own information.
15+
16+
[source,yaml]
17+
----
18+
apiVersion: nmstate.io/v1
19+
kind: NodeNetworkConfigurationPolicy
20+
metadata:
21+
name: br1-eth1-policy <1>
22+
spec:
23+
desiredState:
24+
interfaces:
25+
- name: br1 <2>
26+
description: Linux bridge with eth1 as a port <3>
27+
type: linux-bridge <4>
28+
state: up <5>
29+
ipv4:
30+
enabled: false <6>
31+
bridge:
32+
options:
33+
stp:
34+
enabled: false <7>
35+
port:
36+
- name: eth1 <8>
37+
----
38+
<1> Name of the policy.
39+
<2> Name of the interface.
40+
<3> Optional: Human-readable description of the interface.
41+
<4> The type of interface. This example creates a bridge.
42+
<5> The requested state for the interface after creation.
43+
<6> Disables ipv4 in this example.
44+
<7> Disables stp in this example.
45+
<8> The node NIC to which the bridge attaches.

modules/virt-networking-glossary.adoc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ Multus:: a "meta" CNI plug-in that allows multiple CNIs to exist so that a pod o
1919
Custom resource definition (CRD):: a link:https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/[Kubernetes]
2020
API resource that allows you to define custom resources, or an object defined by using the CRD API resource.
2121

22-
Network attachment definition:: a CRD introduced by the Multus project that allows you to attach pods, virtual machines, and virtual machine instances to one or more networks.
22+
Network attachment definition (NAD):: a CRD introduced by the Multus project that allows you to attach pods, virtual machines, and virtual machine instances to one or more networks.
23+
24+
Node network configuration policy (NNCP):: a description of the requested network configuration on nodes.
25+
You update the node network configuration, including adding and removing interfaces, by applying a `NodeNetworkConfigurationPolicy` manifest to the cluster.
2326

2427
Preboot eXecution Environment (PXE):: an interface that enables an administrator to boot a client machine from a server over the network.
2528
Network booting allows you to remotely load operating systems and other software onto the client.

virt/virtual_machines/vm_networking/virt-attaching-vm-multiple-networks.adoc

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ You can also import virtual machines with existing workloads that depend on acce
1111

1212
To attach a virtual machine to an additional network:
1313

14+
. Configure a Linux bridge.
1415
. Configure a bridge network attachment definition for a namespace in the web console or CLI.
1516
+
1617
[NOTE]
@@ -21,16 +22,25 @@ The network attachment definition must be in the same namespace as the pod or vi
2122
** In the web console, create a NIC for a new or existing virtual machine.
2223
** In the CLI, include the network information in the virtual machine configuration.
2324

25+
[NOTE]
26+
====
27+
There are multiple methods for configuring a VLAN, including network attachment definition and node network configuration policy.
28+
However, a network attachment definition provides a more efficient and more manageable configuration.
29+
====
30+
2431
include::modules/virt-networking-glossary.adoc[leveloffset=+1]
2532

26-
[id="virt-creating-network-attachment-definition"]
27-
== Creating a network attachment definition
33+
[id="virt-creating-linux-bridge"]
34+
== Configuring a Linux bridge
35+
36+
include::modules/virt-creating-linux-bridge-nncp.adoc[leveloffset=+2]
2837

29-
[id="{context}_prerequisites"]
30-
=== Prerequisites
38+
For more information about scheduling, interface types, and other node networking activities,
39+
see the xref:../../../virt/node_network/virt-updating-node-network-config.adoc#virt-about-nmstate_virt-updating-node-network-config[node networking]
40+
section.
3141

32-
* A Linux bridge must be configured and attached on every node.
33-
See the xref:../../../virt/node_network/virt-updating-node-network-config.adoc#virt-about-nmstate_virt-updating-node-network-config[node networking] section for more information.
42+
[id="virt-creating-network-attachment-definition"]
43+
== Creating a network attachment definition
3444

3545
[WARNING]
3646
====

0 commit comments

Comments
 (0)