//module included in the following assembly:
//
// *networking/multiple_networks/understanding-user-defined-networks.adoc

:_mod-docs-content-type: REFERENCE
[id="support-matrix-for-udn-nad_{context}"]
= UserDefinedNetwork and NetworkAttachmentDefinition support matrix

[role="_abstract"]
You can use user defined networks and network attachment definitions to define and configure customized networks for your needs.

By creating `UserDefinedNetwork` and `NetworkAttachmentDefinition` custom resources (CRs), cluster administrators can complete the following tasks:

* Create customizable network configurations
* Define their own network topologies
* Ensure network isolation
* Manage IP addressing for workloads
* Configure advanced network features

By creating a `ClusterUserDefinedNetwork` CR, administrators can create and define secondary networks that span multiple namespaces at the cluster level.

User-defined networks and network attachment definitions can serve as both the primary and secondary network interface, and each support `layer2` and `layer3` topologies.

[NOTE]
====
As of {product-title} 4.19, the use of the `Localnet` topology by `ClusterUserDefinedNetwork` CRs is generally available. This configuration is the preferred method for connecting physical networks to virtual networks. Or, you can use the `NetworkAttachmentDefinition` CR to create secondary networks with `Localnet` topologies.
====

The following section highlights the supported features of the `UserDefinedNetwork` and `NetworkAttachmentDefinition` CRs when used as either the primary or secondary network. A separate table for the `ClusterUserDefinedNetwork` CR is also included.

.Primary network support matrix for `UserDefinedNetwork` and `NetworkAttachmentDefinition` CRs
[cols="1a,1a,1a, options="header"]
|===
^| Network feature ^| Layer2 topology ^|Layer3 topology

^| east-west traffic
^| &#10003;
^| &#10003;

^| north-south traffic
^| &#10003;
^| &#10003;

^| Persistent IPs
^| &#10003;
^| X

^| Services
^| &#10003;
^| &#10003;

^| Routes
^| X
^| X

^| `EgressIP` resource
^| &#10003;
^| &#10003;

^| Multicast
^| X
^| &#10003;

^| `NetworkPolicy` resource
^| &#10003;
^| &#10003;

^| `MultinetworkPolicy` resource
^| X
^| X

|===
where:

Multicast:: Must be enabled in the namespace, and it is only available between OVN-Kubernetes network pods. For more information, see "About multicast".
+
`NetworkPolicy` resource:: When creating a `ClusterUserDefinedNetwork` CR with a primary network type, network policies must be created _after_ the `UserDefinedNetwork` CR.

.Secondary network support matrix for `UserDefinedNetwork` and `NetworkAttachmentDefinition` CRs
[cols="1a,1a,1a,1a, options="header"]
|===
^| Network feature ^| Layer2 topology ^|Layer3 topology ^|Localnet topology

^| east-west traffic
^| &#10003;
^| &#10003;
^| &#10003; (`NetworkAttachmentDefinition` CR only)

^| north-south traffic
^| X
^| X
^| &#10003; (`NetworkAttachmentDefinition` CR only)

^| Persistent IPs
^| &#10003;
^| X
^| &#10003; (`NetworkAttachmentDefinition` CR only)

^| Services
^| X
^| X
^| X

^| Routes
^| X
^| X
^| X

^| `EgressIP` resource
^| X
^| X
^| X

^| Multicast
^| X
^| X
^| X

^| `NetworkPolicy` resource
^| X
^| X
^| X

^| `MultinetworkPolicy` resource
^| &#10003;
^| &#10003;
^| &#10003; (`NetworkAttachmentDefinition` CR only)

|===
The Localnet topology is unavailable for use with the `UserDefinedNetwork` CR. It is only supported on secondary networks for `NetworkAttachmentDefinition` CRs.

.Support matrix for `ClusterUserDefinedNetwork` CRs
[cols="1a,1a,1a,1a, options="header"]
|===
^| Network feature ^| Layer2 topology ^|Layer3 topology ^|Localnet topology

^| east-west traffic
^| &#10003;
^| &#10003;
^| &#10003;

^| north-south traffic
^| &#10003;
^| &#10003;
^| &#10003;

^| Persistent IPs
^| &#10003;
^| X
^| &#10003;

^| Services
^| &#10003;
^| &#10003;
^|

^| Routes
^| X
^| X
^|

^| `EgressIP` resource
^| &#10003;
^| &#10003;
^|

^| Multicast
^| X
^| &#10003;
^|

^| `MultinetworkPolicy` resource
^| X
^| X
^| &#10003;

^| `NetworkPolicy` resource
^| &#10003;
^| &#10003;
^|

|===
where:

Multicast:: must be enabled in the namespace, and it is only available between OVN-Kubernetes network pods. For more information, see "About multicast".
+
`NetworkPolicy` resource:: When creating a `ClusterUserDefinedNetwork` CR with a primary network type, network policies must be created _after_ the `UserDefinedNetwork` CR.
