You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/virt-creating-layer2-nad-cli.adoc
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,13 +4,14 @@
4
4
5
5
:_mod-docs-content-type: PROCEDURE
6
6
[id="virt-creating-layer2-nad-cli_{context}"]
7
-
= Creating a NAD for layer 2 topology using the CLI
7
+
= Creating a NAD for layer 2 topology by using the CLI
8
8
9
9
You can create a network attachment definition (NAD) which describes how to attach a pod to the layer 2 overlay network.
10
10
11
11
.Prerequisites
12
+
12
13
* You have access to the cluster as a user with `cluster-admin` privileges.
13
-
* You have installed the OpenShift CLI (`oc`).
14
+
* You have installed the {oc-first}.
14
15
15
16
.Procedure
16
17
@@ -30,26 +31,25 @@ spec:
30
31
"name": "my-namespace-l2-network", <2>
31
32
"type": "ovn-k8s-cni-overlay", <3>
32
33
"topology":"layer2", <4>
33
-
"mtu": 1300, <5>
34
+
"mtu": 1400, <5>
34
35
"netAttachDefName": "my-namespace/l2-network" <6>
35
36
}
36
37
----
37
-
<1> The CNI specification version. The required value is `0.3.1`.
38
+
<1> The Container Network Interface (CNI) specification version. The required value is `0.3.1`.
38
39
<2> The name of the network. This attribute is not namespaced. For example, you can have a network named `l2-network` referenced from two different `NetworkAttachmentDefinition` objects that exist in two different namespaces. This feature is useful to connect VMs in different namespaces.
39
-
<3> The name of the CNI plug-in to be configured. The required value is `ovn-k8s-cni-overlay`.
40
+
<3> The name of the CNI plugin. The required value is `ovn-k8s-cni-overlay`.
40
41
<4> The topological configuration for the network. The required value is `layer2`.
41
42
<5> Optional: The maximum transmission unit (MTU) value. If you do not set a value, the Cluster Network Operator (CNO) sets a default MTU value by calculating the difference among the underlay MTU of the primary network interface, the overlay MTU of the pod network, such as the Geneve (Generic Network Virtualization Encapsulation), and byte capacity of any enabled features, such as IPsec.
42
43
<6> The value of the `namespace` and `name` fields in the `metadata` stanza of the `NetworkAttachmentDefinition` object.
43
44
+
44
45
[NOTE]
45
46
====
46
-
The above example configures a cluster-wide overlay without a subnet defined. This means that the logical switch implementing the network only provides layer 2 communication. You must configure an IP address when you create the virtual machine by either setting a static IP address or by deploying a DHCP server on the network for a dynamic IP address.
47
+
The previous example configures a cluster-wide overlay without a subnet defined. This means that the logical switch implementing the network only provides layer 2 communication. You must configure an IP address when you create the virtual machine by either setting a static IP address or by deploying a DHCP server on the network for a dynamic IP address.
47
48
====
48
49
49
-
. Apply the manifest:
50
+
. Apply the manifest by running the following command:
0 commit comments