Skip to content

Commit 4f414dc

Browse files
author
Bob Gaydos
committed
CNV-13982: Add conceptual info on network bridges
1 parent 6df5abe commit 4f414dc

13 files changed

+84
-116
lines changed

_topic_maps/_topic_map.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3219,13 +3219,13 @@ Topics:
32193219
- Name: Virtual machine networking
32203220
Dir: vm_networking
32213221
Topics:
3222-
- Name: Using the default pod network with OpenShift Virtualization
3222+
- Name: Configuring the virtual machine for the default pod network
32233223
File: virt-using-the-default-pod-network-with-virt
32243224
Distros: openshift-enterprise
3225-
- Name: Using the default pod network with OKD Virtualization
3225+
- Name: Configuring the virtual machine for the default pod network with OKD Virtualization
32263226
File: virt-using-the-default-pod-network-with-virt
32273227
Distros: openshift-origin
3228-
- Name: Attaching a virtual machine to multiple networks
3228+
- Name: Attaching a virtual machine to a Linux bridge network
32293229
File: virt-attaching-vm-multiple-networks
32303230
- Name: Configuring IP addresses for virtual machines
32313231
File: virt-configuring-ip-for-vms
@@ -3311,7 +3311,7 @@ Topics:
33113311
File: virt-live-migration-limits
33123312
- Name: Migrating a virtual machine instance to another node
33133313
File: virt-migrate-vmi
3314-
- Name: Migrating a virtual machine over a dedicated secondary network
3314+
- Name: Migrating a virtual machine over a dedicated additional network
33153315
File: virt-migrating-vm-on-secondary-network
33163316
- Name: Monitoring live migration of a virtual machine instance
33173317
File: virt-monitor-vmi-migration

modules/virt-attaching-vm-secondary-network-cli.adoc

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
// Module included in the following assemblies:
22
//
3-
// * virt/virtual_machines/vm_networking/virt-attaching-vm-multiple-networks.adoc
3+
// * virt/virtual_machines/vm_networking/virt-attaching-vm-external-network.adoc
44

55
:_content-type: PROCEDURE
6-
[id="virt-attaching-vm-secondary-network-cli_{context}"]
7-
= Attaching a virtual machine to a secondary network in the CLI
6+
[id="virt-attaching-vm-additional-network-cli_{context}"]
7+
= Attaching a virtual machine to an additional network in the CLI
88

9-
Attach a virtual machine to a secondary network by adding a bridge interface and specifying a network attachment definition in the virtual machine configuration.
9+
Attach a virtual machine to an additional network by adding a bridge interface and specifying a network attachment definition in the virtual machine configuration.
1010

1111
This procedure uses a YAML file to demonstrate editing the configuration and applying the updated file to the cluster. You can alternatively use the `oc edit <object> <name>` command to edit an existing virtual machine.
1212

@@ -16,36 +16,37 @@ This procedure uses a YAML file to demonstrate editing the configuration and app
1616
1717
.Procedure
1818

19-
. Create or edit a virtual machine configuration that you want to connect to the bridge network. Add the bridge interface to the `spec.template.spec.domain.devices.interfaces` list and the network attachment definition to the `spec.template.spec.networks` list. The name of the `interfaces` entry must be the same as the `networks` entry. The following example adds a bridge interface called `bridge-net` that connects to the `a-bridge-network` network attachment definition:
19+
. Create or edit a configuration of a virtual machine that you want to connect to the bridge network.
20+
. Add the bridge interface to the `spec.template.spec.domain.devices.interfaces` list and the network attachment definition to the `spec.template.spec.networks` list. This example adds a bridge interface called `bridge-net` that connects to the `a-bridge-network` network attachment definition:
2021
+
2122
[source,yaml]
2223
----
2324
apiVersion: kubevirt.io/v1
2425
kind: VirtualMachine
2526
metadata:
26-
name: example-vm
27+
name: <example-vm>
2728
spec:
2829
template:
2930
spec:
3031
domain:
3132
devices:
3233
interfaces:
3334
- masquerade: {}
34-
name: default
35+
name: <default>
3536
- bridge: {}
36-
name: bridge-net <1>
37+
name: <bridge-net> <1>
3738
...
3839
networks:
39-
- name: default
40+
- name: <default>
4041
pod: {}
41-
- name: bridge-net <2>
42+
- name: <bridge-net> <2>
4243
multus:
4344
networkName: <network-namespace>/<a-bridge-network> <3>
4445
...
4546
----
4647
<1> The name of the bridge interface.
4748
<2> The name of the network. This value must match the `name` value of the corresponding `spec.template.spec.domain.devices.interfaces` entry.
48-
<3> The name of the network attachment definition, prefixed by the namespace where it exists. The namespace must be either the `default` namespace or the same namespace where the VM is to be created.
49+
<3> The name of the network attachment definition, prefixed by the namespace where it exists. The namespace must be either the `default` namespace or the same namespace where the VM is to be created. In this case, `multus` is used. Multus is a cloud network interface (CNI) plug-in that allows multiple CNIs to exist so that a pod or virtual machine can use the interfaces it needs.
4950

5051
. Apply the configuration:
5152
+

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

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,32 +3,33 @@
33
// * virt/virtual_machines/vm_networking/virt-attaching-vm-multiple-networks.adoc
44

55
:_content-type: PROCEDURE
6-
[id="virt-creating-bridge-nad-cli_{context}"]
6+
[id="virt-creating-linux-bridge-nad-cli_{context}"]
77
= Creating a Linux bridge network attachment definition in the CLI
88

9-
As a network administrator, you can configure a network attachment definition of type `cnv-bridge` to provide Layer-2 networking to pods and virtual machines.
9+
As a network administrator, you can configure a network attachment definition of type `cnv-bridge` to provide layer-2 networking to pods and virtual machines.
1010

1111
.Prerequisites
1212

1313
* The node must support nftables and the `nft` binary must be deployed to enable MAC spoof check.
1414
1515
.Procedure
1616

17-
. Create a network attachment definition manifest.
18-
The manifest must have the following contents, modified to match your configuration:
17+
. Create a network attachment definition in the same namespace as the virtual machine.
18+
19+
. Add the virtual machine to the network attachment definition, as in the following example:
1920
+
2021
[source,yaml]
2122
----
2223
apiVersion: "k8s.cni.cncf.io/v1"
2324
kind: NetworkAttachmentDefinition
2425
metadata:
25-
name: <a-bridge-network> <1>
26+
name: <bridge-network> <1>
2627
annotations:
2728
k8s.v1.cni.cncf.io/resourceName: bridge.network.kubevirt.io/<bridge-interface> <2>
2829
spec:
2930
config: '{
3031
"cniVersion": "0.3.1",
31-
"name": "<a-bridge-network>", <3>
32+
"name": "<bridge-network>", <3>
3233
"type": "cnv-bridge", <4>
3334
"bridge": "<bridge-interface>", <5>
3435
"macspoofchk": true, <6>
@@ -42,6 +43,11 @@ spec:
4243
<5> The name of the Linux bridge configured on the node.
4344
<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.
4445
<7> Optional: The VLAN tag. No additional VLAN configuration is required on the node network configuration policy.
46+
+
47+
[NOTE]
48+
====
49+
A Linux bridge network attachment definition is the most efficient method for connecting a virtual machine to a VLAN.
50+
====
4551

4652
. Create the network attachment definition:
4753
+
@@ -53,10 +59,9 @@ $ oc create -f <network-attachment-definition.yaml> <1>
5359

5460
.Verification
5561

56-
* Verify that the network attachment definition is created by running either `oc get network-attachment-definition <name>` or `oc get net-attach-def <name>`. For example:
62+
* Verify that the network attachment definition was created by running the following command:
5763
+
5864
[source,terminal]
5965
----
60-
$ oc get network-attachment-definition <a-bridge-network> <1>
66+
$ oc get network-attachment-definition <bridge-network>
6167
----
62-
<1> Where `<a-bridge-network>` is the name specified in the network attachment definition config.
Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,32 @@
11
// Module included in the following assemblies:
22
//
33
// * virt/virtual_machines/vm_networking/virt-attaching-vm-multiple-networks.adoc
4-
54
//This file contains UI elements and/or package names that need to be updated.
65

76
:_content-type: PROCEDURE
8-
[id="virt-creating-bridge-nad-web_{context}"]
7+
[id="virt-creating-linux-bridge-nad-web_{context}"]
98
= Creating a Linux bridge network attachment definition in the web console
109

1110
Network administrators can create network attachment definitions to provide layer-2 networking to pods and virtual machines.
1211

1312
.Procedure
1413

1514
. In the web console, click *Networking* -> *Network Attachment Definitions*.
16-
. Click *Create Network Attachment Definition* .
15+
. Click *Create Network Attachment Definition*.
16+
+
17+
[NOTE]
18+
====
19+
The network attachment definition must be in the same namespace as the pod or virtual machine.
20+
====
21+
+
1722
. Enter a unique *Name* and optional *Description*.
1823
. Click the *Network Type* list and select *CNV Linux bridge*.
1924
. Enter the name of the bridge in the *Bridge Name* field.
2025
. Optional: If the resource has VLAN IDs configured, enter the ID numbers in the *VLAN Tag Number* field.
21-
. Optional: Select the *MAC Spoof Check* checkbox to enable MAC spoof filtering. This feature provides security against a MAC spoofing attack by allowing only a single MAC address to exit the pod.
26+
. Optional: Select *MAC Spoof Check* to enable MAC spoof filtering. This feature provides security against a MAC spoofing attack by allowing only a single MAC address to exit the pod.
2227
. Click *Create*.
28+
+
29+
[NOTE]
30+
====
31+
A Linux bridge network attachment definition is the most efficient method for connecting a virtual machine to a VLAN.
32+
====

modules/virt-creating-linux-bridge-nncp.adoc

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@
33
// * virt/virtual_machines/vm_networking/virt-attaching-vm-multiple-networks.adoc
44

55
:_content-type: PROCEDURE
6-
[id="virt-configuring-linux-bridge-nncp_{context}"]
7-
= Creating a Linux bridge using a node network configuration policy
6+
[id="virt-creating-linux-bridge-nncp_{context}"]
87

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.
8+
= Creating a Linux bridge node network configuration policy
109

11-
.Procedure
10+
Use a `NodeNetworkConfigurationPolicy` manifest YAML file to create the Linux bridge.
1211

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.
12+
.Procedure
1513

14+
* Create the `NodeNetworkConfigurationPolicy` manifest. This example includes sample values that you must replace with your own information.
15+
+
1616
[source,yaml]
1717
----
1818
apiVersion: nmstate.io/v1
@@ -40,6 +40,6 @@ spec:
4040
<3> Optional: Human-readable description of the interface.
4141
<4> The type of interface. This example creates a bridge.
4242
<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.
43+
<6> Disables IPv4 in this example.
44+
<7> Disables STP in this example.
45+
<8> The node NIC to which the bridge is attached.

modules/virt-template-vm-config.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// * virt/virtual_machines/vm_networking/virt-using-the-default-pod-network-with-virt.adoc
44

55
[id="virt-template-vm-config_{context}"]
6-
= Template: Virtual machine configuration file
6+
= Virtual machine configuration file
77

88
[source,yaml]
99
----

modules/virt-template-windows-vm.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// * virt/virtual_machines/vm_networking/virt-using-the-default-pod-network-with-virt.adoc
44

55
[id="virt-template-windows-vm_{context}"]
6-
= Template: Windows virtual machine configuration file
6+
= Windows virtual machine configuration file
77

88
[source,yaml]
99
----

virt/live_migration/virt-migrating-vm-on-secondary-network.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
:_content-type: ASSEMBLY
22
[id="virt-migrating-vm-on-secondary-network"]
3-
= Migrating a virtual machine over a dedicated secondary network
3+
= Migrating a virtual machine over a dedicated additional network
44
include::_attributes/common-attributes.adoc[]
55
:context: virt-migrating-vm-on-secondary-network
66

77
toc::[]
88

9-
You can configure a dedicated xref:../../virt/virtual_machines/vm_networking/virt-attaching-vm-multiple-networks.adoc#attaching-to-multiple-networks[secondary Multus network] for live migration. A dedicated network minimizes disruption to tenant workloads due to network saturation when virtual machine live migration is triggered.
9+
You can configure a dedicated xref:../../virt/virtual_machines/vm_networking/virt-attaching-vm-multiple-networks.adoc#virt-attaching-vm-multiple-networks[Multus network] for live migration. A dedicated network minimizes the effects of network saturation on tenant workloads during live migration.
1010

1111

1212
include::modules/virt-configuring-secondary-network-vm-live-migration.adoc[leveloffset=+1]

virt/virt-learn-more-about-openshift-virtualization.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Use the following tables to find content to help you learn about and use {VirtPr
4646
|Learn |Deploy |Manage |Use
4747

4848
| xref:../virt/about-virt.adoc#about-virt[Learn about {VirtProductName}]
49-
| Connecting virtual machines to the xref:../virt/virtual_machines/vm_networking/virt-using-the-default-pod-network-with-virt.adoc#virt-using-the-default-pod-network-with-virt[default pod network for virtual machines] and xref:../virt/virtual_machines/vm_networking/virt-attaching-vm-multiple-networks.adoc#attaching-to-multiple-networks[multiple networks]
49+
| Connecting virtual machines to the xref:../virt/virtual_machines/vm_networking/virt-using-the-default-pod-network-with-virt.adoc#virt-using-the-default-pod-network-with-virt[default pod network for virtual machines] and xref:../virt/virtual_machines/vm_networking/virt-attaching-vm-multiple-networks.adoc#virt-attaching-vm-multiple-networks[external networks]
5050
| xref:../virt/install/virt-enabling-virtctl.adoc#virt-enabling-virtctl[Enabling the `virtctl` client]
5151
| xref:../migration_toolkit_for_containers/about-mtc.adoc#about-mtc[Importing virtual machines with the Migration Toolkit for containers]
5252

virt/virtual_machines/advanced_vm_management/virt-configuring-pxe-booting.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ image from a PXE server when deploying a new host.
1414

1515
== Prerequisites
1616

17-
* A Linux bridge must be xref:../../../virt/virtual_machines/vm_networking/virt-attaching-vm-multiple-networks.adoc#attaching-to-multiple-networks[connected].
17+
* A Linux bridge must be xref:../../../virt/virtual_machines/vm_networking/virt-attaching-vm-multiple-networks.adoc#virt-attaching-vm-multiple-networks[connected].
1818

1919
* The PXE server must be connected to the same VLAN as the bridge.
2020

21-
include::modules/virt-networking-glossary.adoc[leveloffset=+1]
22-
2321
include::modules/virt-pxe-booting-with-mac-address.adoc[leveloffset=+1]
2422

2523
include::modules/virt-template-vm-pxe-config.adoc[leveloffset=+1]
24+
25+
include::modules/virt-networking-glossary.adoc[leveloffset=+1]

0 commit comments

Comments
 (0)