docs/doc/source/datanet/kubernetes/adding-data-networks-using-the-cli.rst
Elisamara Aoki Goncalves b70bc13076 Document how to set VF MTU (r5, r6, dsR6)
Added example to show how to create SR-IOV network with MTU of 1950.
Added ref of the example in note.

Signed-off-by: Elisamara Aoki Goncalves <elisamaraaoki.goncalves@windriver.com>
Change-Id: I2e43559165ce3e34b72e45027df5ba44db0eb5c1
2022-05-03 14:31:12 -03:00

3.2 KiB

Add Data Networks Using the CLI

You can add data networks using the CLI. You can set up flat, VLAN and VXLAN data networks over physical networks using the command-line interface. The data networks model the L2 networks that are attached to node data, pci-sriov and pci-passthrough interface.

  • To create a data network using the CLI, use the following command.

    ~(keystone_admin)$ system datanetwork-add -d <description> -m <mtu> -p <port> -g <group> -t <ttl> -M <mode> <name> <type>

    where

    <description>

    A description of the data network.

    <mtu>

    The of the data network.

    Note

    To attach to the data network, data interfaces must be configured with an equal or larger .

    This is not used by the Kubernetes plugin. In order to address the in Kubernetes, the network attached definiition needs to use the tuning plugin. For more details, see the examples in Create Network Attachment Definitions <creating-network-attachment-definitions>.

    <port>

    The port of the data network.

    <group>

    The multicast group of the data network.

    <ttl>

    The time-to-live of the data network.

    <mode>

    For networks of <type> vxlan only, mode can be either dynamic or static.

    If set to dynamic, <group> must also be specified.

    <name>

    The name assigned to the data network.

    <type>

    The type of data network to be created (flat, vlan, or vxlan)

    Note

    vxlan is only applicable to .

    For example, to add a VLAN data network named datanet-a:

    ~(keystone_admin)$ system datanetwork-add datanet-a vlan
    +--------------+--------------------------------------+
    | Property     | Value                                |
    +--------------+--------------------------------------+
    | id           | 2                                    |
    | uuid         | 104071a4-1c26-4383-ba07-72e05316d540 |
    | name         | datanet-a                            |
    | network_type | vlan                                 |
    | mtu          | 1500                                 |
    | description  | None                                 |
    +--------------+--------------------------------------+

For the application, after creating a data network of the VLAN or VXLAN type, you can assign one or more segmentation ranges consisting of a set of consecutive VLAN IDs (for VLANs) or VNIs (for VXLANs) using the openstack network segment range create command. Segmentation ranges are required in order to set up project networks.

Note

Segmentation ranges are not required in order to attach interfaces and unlock openstack-compute labeled worker nodes.