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-vlan-object.adoc

84 lines
2.3 KiB
Plaintext

// Module included in the following assemblies:
//
// * networking/multiple_networks/configuring-additional-network.adoc
//37.1. VLAN overview
//
:_mod-docs-content-type: REFERENCE
[id="nw-multus-vlan-object_{context}"]
= Configuration for a VLAN additional network
The following object describes the configuration parameters for the VLAN, `vlan`, CNI plugin:
.VLAN 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: `vlan`.
|`master`
|`string`
|The Ethernet interface to associate with the network attachment. If a `master` is not specified, the interface for the default network route is used.
|`vlanId`
|`integer`
|Set the ID of the `vlan`.
|`ipam`
|`object`
|The configuration object for the IPAM CNI plugin. The plugin manages IP address assignment for the attachment definition.
|`mtu`
|`integer`
|Optional: Set the maximum transmission unit (MTU) to the specified value. The default value is automatically set by the kernel.
|`dns`
|`integer`
|Optional: DNS information to return. For example, a priority-ordered list of DNS nameservers.
|`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.
|====
[IMPORTANT]
====
A `NetworkAttachmentDefinition` custom resource definition (CRD) with a `vlan` configuration can be used only on a single pod in a node because the CNI plugin cannot create multiple `vlan` subinterfaces with the same `vlanId` on the same `master` interface.
====
[id="nw-multus-vlan-config-example_{context}"]
== VLAN configuration example
The following example demonstrates a `vlan` configuration with an additional network that is named `vlan-net`:
[source,json]
----
{
"name": "vlan-net",
"cniVersion": "0.3.1",
"type": "vlan",
"master": "eth0",
"mtu": 1500,
"vlanId": 5,
"linkInContainer": false,
"ipam": {
"type": "host-local",
"subnet": "10.1.1.0/24"
},
"dns": {
"nameservers": [ "10.1.1.1", "8.8.8.8" ]
}
}
----