// Module included in the following assemblies:
//
// * networking/multiple_networks/primary_networks/about-primary-nwt-nad.adoc

:_mod-docs-content-type: PROCEDURE
[id="nw-multus-create-network_{context}"]
= Creating a primary network attachment with the Cluster Network Operator

[role="_abstract"]
When you specify a primary network to create by using the Cluster Network Operator (CNO), the (CNO) creates the `NetworkAttachmentDefinition` custom resource definition (CRD) automatically and manages it.

[IMPORTANT]
====
Do not edit the `NetworkAttachmentDefinition` CRDs that the Cluster Network Operator manages. Doing so might disrupt network traffic on your primary network.
====

.Prerequisites

* Install the OpenShift CLI (`oc`).
* Log in as a user with `cluster-admin` privileges.

.Procedure

. Optional: Create the namespace for the primary networks:
+
[source,terminal]
----
$ oc create namespace <namespace_name>
----

. To edit the CNO configuration, enter the following command:
+
[source,terminal]
----
$ oc edit networks.operator.openshift.io cluster
----

. Modify the CR that you are creating by adding the configuration for the primary network that you are creating, as in the following example CR.
+
[source,yaml,subs="attributes+"]
----
apiVersion: operator.openshift.io/v1
kind: Network
metadata:
  name: cluster
spec:
  # ...
  additionalNetworks:
  - name: tertiary-net
    namespace: namespace2
    type: Raw
    rawCNIConfig: |-
      {
        "cniVersion": "0.3.1",
        "name": "tertiary-net",
        "type": "ipvlan",
        "master": "eth1",
        "mode": "l2",
        "ipam": {
          "type": "static",
          "addresses": [
            {
              "address": "192.168.1.23/24"
            }
          ]
        }
      }
----

. Save your changes and quit the text editor to commit your changes.

.Verification

* Confirm that the CNO created the `NetworkAttachmentDefinition` CRD by running the following command. A delay might exist before the CNO creates the CRD. The expected output shows the name of the NAD CRD and the creation age in minutes.
+
[source,terminal]
----
$ oc get network-attachment-definitions -n <namespace>
----
+
--
where:

`<namespace>`:: Specifies the namespace for the network attachment that you added to the CNO configuration.
--
