1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 12:46:18 +01:00
Files
openshift-docs/modules/nw-multus-macvlan-object.adoc

75 lines
2.3 KiB
Plaintext

// Module included in the following assemblies:
//
// * networking/multiple_networks/configuring-additional-network.adoc
// * microshift_networking/microshift_multiple_networks/microshift_cni_multus.adoc
:_mod-docs-content-type: REFERENCE
[id="nw-multus-macvlan-object_{context}"]
= Configuration for a MACVLAN secondary network
The following object describes the configuration parameters for the MAC Virtual LAN (MACVLAN) Container Network Interface (CNI) plugin:
.MACVLAN CNI plugin JSON configuration object
[cols=".^2,.^2,.^6",options="header"]
|====
|Field|Type|Description
|`cniVersion`
|`string`
|The CNI specification version. The `0.3.1` value is required.
|`name`
|`string`
|The value for the `name` parameter you provided previously for the CNO configuration.
|`type`
|`string`
|The name of the CNI plugin to configure: `macvlan`.
|`ipam`
|`object`
|The configuration object for the IPAM CNI plugin. The plugin manages IP address assignment for the attachment definition.
|`mode`
|`string`
|Optional: Configures traffic visibility on the virtual network. Must be either `bridge`, `passthru`, `private`, or `vepa`. If a value is not provided, the default value is `bridge`.
|`master`
|`string`
|Optional: The host network interface to associate with the newly created macvlan interface. If a value is not specified, then the default route interface is used.
|`mtu`
|`integer`
|Optional: The maximum transmission unit (MTU) to the specified value. The default value is automatically set by the kernel.
|`linkInContainer`
|`boolean`
|Optional: Specifies whether the `master` interface is in the container network namespace or the main network namespace. Set the value to `true` to request the use of a container namespace `master` interface.
|====
[NOTE]
====
If you specify the `master` key for the plugin configuration, use a different physical network interface than the one that is associated with your primary network plugin to avoid possible conflicts.
====
[id="nw-multus-macvlan-config-example_{context}"]
== MACVLAN CNI plugin configuration example
The following example configures a secondary network named `macvlan-net`:
[source,json]
----
{
"cniVersion": "0.3.1",
"name": "macvlan-net",
"type": "macvlan",
"master": "eth1",
"linkInContainer": false,
"mode": "bridge",
"ipam": {
"type": "dhcp"
}
}
----