mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-07 09:46:53 +01:00
57 lines
1.6 KiB
Plaintext
57 lines
1.6 KiB
Plaintext
// Module included in the following assemblies:
|
|
//
|
|
// * networking/multiple-networks/configuring-macvlan.adoc
|
|
|
|
[id="nw-multus-macvlan-object_{context}"]
|
|
= Configuration for macvlan CNI plug-in
|
|
|
|
The following YAML describes the configuration parameters for the macvlan
|
|
Container Network Interface (CNI) plug-in:
|
|
|
|
.macvlan YAML configuration
|
|
[source,yaml]
|
|
----
|
|
name: <name> <1>
|
|
namespace: <namespace> <2>
|
|
type: SimpleMacvlan
|
|
simpleMacvlanConfig:
|
|
master: <master> <3>
|
|
mode: <mode> <4>
|
|
mtu: <mtu> <5>
|
|
ipamConfig: <6>
|
|
...
|
|
----
|
|
<1> Specify a name for the additional network attachment that you are
|
|
creating. The name must be unique within the specified `namespace`.
|
|
|
|
<2> Specify the namespace to create the network attachment in. If
|
|
a value is not specified, the `default` namespace is used.
|
|
|
|
<3> The ethernet interface to associate with the virtual interface. If
|
|
a value for `master` is not specified, then the host system's primary ethernet
|
|
interface is used.
|
|
|
|
<4> Configures traffic visibility on the virtual network. Must be either
|
|
`bridge`, `passthru`, `private`, or `vepa`. If a value for `mode` is not
|
|
provided, the default value is `bridge`.
|
|
|
|
<5> Set the maximum transmission unit (MTU) to the specified value. The
|
|
default value is automatically set by the kernel.
|
|
|
|
<6> Specify a configuration object for the ipam CNI plug-in. The
|
|
plug-in manages IP address assignment for the attachment definition.
|
|
|
|
[id="nw-multus-macvlan-config-example_{context}"]
|
|
== macvlan configuration example
|
|
|
|
The following example configures an additional network named `macvlan-net`:
|
|
|
|
[source,yaml]
|
|
----
|
|
name: macvlan-net
|
|
type: SimpleMacvlan
|
|
simpleMacvlanConfig:
|
|
ipamConfig:
|
|
type: DHCP
|
|
----
|