|
| 1 | +// Module included in the following assemblies: |
| 2 | +// |
| 3 | +// * networking/multiple_networks/configuring-additional-network.adoc |
| 4 | + |
| 5 | +//37.1. VLAN overview |
| 6 | +// |
| 7 | +:_content-type: REFERENCE |
| 8 | +[id="nw-multus-vlan-object_{context}"] |
| 9 | += Configuration for an VLAN additional network |
| 10 | + |
| 11 | +The following object describes the configuration parameters for the VLAN CNI plugin: |
| 12 | + |
| 13 | +.VLAN CNI plugin JSON configuration object |
| 14 | +[cols=".^2,.^2,.^6",options="header"] |
| 15 | +|==== |
| 16 | +|Field|Type|Description |
| 17 | + |
| 18 | +|`cniVersion` |
| 19 | +|`string` |
| 20 | +|The CNI specification version. The `0.3.1` value is required. |
| 21 | + |
| 22 | +|`name` |
| 23 | +|`string` |
| 24 | +|The value for the `name` parameter you provided previously for the CNO configuration. |
| 25 | + |
| 26 | +|`type` |
| 27 | +|`string` |
| 28 | +|The name of the CNI plugin to configure: `vlan`. |
| 29 | + |
| 30 | +|`master` |
| 31 | +|`string` |
| 32 | +|The Ethernet interface to associate with the network attachment. If a `master` is not specified, the interface for the default network route is used. |
| 33 | + |
| 34 | +|`vlanId` |
| 35 | +|`integer` |
| 36 | +|Set the id of the vlan. |
| 37 | + |
| 38 | +|`ipam` |
| 39 | +|`object` |
| 40 | +|The configuration object for the IPAM CNI plugin. The plugin manages IP address assignment for the attachment definition. |
| 41 | + |
| 42 | +|`mtu` |
| 43 | +|`integer` |
| 44 | +|Optional: Set the maximum transmission unit (MTU) to the specified value. The default value is automatically set by the kernel. |
| 45 | + |
| 46 | +|`dns` |
| 47 | +|`integer` |
| 48 | +|Optional: DNS information to return, for example, a priority-ordered list of DNS nameservers. |
| 49 | + |
| 50 | +|`linkInContainer` |
| 51 | +|`boolean` |
| 52 | +|Optional: Specifies if the master interface is in the container network namespace or the main network namespace. |
| 53 | + |
| 54 | +|==== |
| 55 | + |
| 56 | +[id="nw-multus-vlan-config-example_{context}"] |
| 57 | +== vlan configuration example |
| 58 | + |
| 59 | +The following example configures an additional network named `vlan-net`: |
| 60 | + |
| 61 | +[source,json] |
| 62 | +---- |
| 63 | +{ |
| 64 | + "name": "vlan-net", |
| 65 | + "cniVersion": "0.3.1", |
| 66 | + "type": "vlan", |
| 67 | + "master": "eth0", |
| 68 | + "mtu": 1500, |
| 69 | + "vlanId": 5, |
| 70 | + "linkInContainer": false, |
| 71 | + "ipam": { |
| 72 | + "type": "host-local", |
| 73 | + "subnet": "10.1.1.0/24" |
| 74 | + }, |
| 75 | + "dns": { |
| 76 | + "nameservers": [ "10.1.1.1", "8.8.8.8" ] |
| 77 | + } |
| 78 | +} |
| 79 | +---- |
0 commit comments