Managing Network Virtualization and Network Resources in Oracle® Solaris 11.2

Exit Print View

Updated: September 2014
 
 

How to Configure a VXLAN

  1. Become an administrator.

    For more information, see Using Your Assigned Administrative Rights in Securing Users and Processes in Oracle Solaris 11.2 .

  2. Determine the IP addresses that are available on the system.
    # ipadm show-addr
  3. Create the VXLAN datalink by specifying the IP address or IP interface.
    • To create the VXLAN by specifying the IP address:
      # dladm create-vxlan -p prop=value VXLAN-LINK
      –p prop=value

      Specifies a comma-separated list of VXLAN datalink properties that can be set to the specified values on the VXLAN datalink that you create. You set the following properties:

      • addr – Specifies the IPv4 or IPv6 address for the VXLAN network. This address can be a specific address or a combination of address/prefix length.

      • vni – Specifies the network identifier of the VXLAN segment. You can specify a number between 0 and 16777215.

      • mgroup – (Optional) Specifies the multicast group name. You can specify this option only if the VXLAN segment has its own multicast group.

      VXLAN-LINK

      Name of the VXLAN.

    • To create the VXLAN by specifying the IP interface:
      # dladm create-vxlan -p prop=value
      –p prop=value

      Specifies a comma-separated list of VXLAN datalink properties that can be set to the specified values on the VXLAN datalink that you create. You set the following properties:

      • interface – Specifies the IP interface for the VXLAN network.

      • vni – Specifies the network identifier of the VXLAN segment. You can specify a number between 0 and 16777215.

      VXLAN

      Name of the VXLAN.

      When you specify the IP interface and the IP version, the VXLAN datalink is created over an available IP address of the version that is specified on that interface. For example, if you have an IP address 10.10.10.1 configured over net0, a VXLAN datalink is created over 10.10.10.1. By default, an IP version is an IPv4 address. However, if you need an IPv6 address, you must specify the version by using the ipvers property.


    Note -  You can create VXLAN datalinks on IP addresses that are hosted on physical aggregated links (trunk or DLMP aggregation) or IPoIB links. However, you cannot create VXLAN datalinks on IP addresses hosted on IPMP, a virtual network interface, or loopback interfaces.
  4. Verify the VXLAN that you created.
    # dladm show-vxlan
  5. Create a VNIC over the VXLAN datalink.
    # dladm create-vnic -l VXLAN-LINK VNIC

    You can create VLAN VNIC over a VXLAN datalink. To create a VLAN VNIC, you must specify the –f (force) option. For information, see How to Configure VNICs With VLAN IDs.

  6. Configure an IP interface over the VNIC directly or by assigning the VNIC to a zone first.
    • Configure an IP interface over the VNIC.
      # ipadm create-ip VNIC
      # ipadm create-addr -a address VNIC
    • Assign the VNIC to a zone and configure an IP interface over the VNIC within the zone.
      1. Assign the VNIC with the zone's interface.
        zonecfg:zone> add net
        zonecfg:zone:net> set physical=VNIC
        zonecfg:zone:net> end
      2. Verify and commit the changes that you have implemented and then exit the zone.
        zonecfg:zone> verify
        zonecfg:zone> commit
        zonecfg:zone> exit
      3. Reboot the zone.
        global# zoneadm -z zone reboot
      4. Log in to the zone.
        global# zlogin zone
      5. In the zone, create an IP interface over the VNIC that is now assigned to the zone.
        zone# ipadm create-ip interface
      6. Configure the VNIC with a valid IP address.

        If you are assigning a static address to the VNIC, you would type the following:

        zone# ipadm create-addr -a address interface
        –a address

        Specifies the IP address, which can be in CIDR notation.

      7. Exit the zone.

    For information about the dladm and ipadm commands, see the dladm(1M) and ipadm(1M) man pages.

Example 3-1  Creating a VXLAN and Configuring an IP Interface for the VNIC Created Over the VXLAN
  1. Check the available IP addresses on the system.

    # ipadm show-addr net4
    ADDROBJ   TYPE   STATE   ADDR 
    net4/v4   static ok      10.10.11.1/24
  2. Create a VXLAN datalink in VXLAN segment 10.

    # dladm create-vxlan -p addr=10.10.11.1,vni=10 vxlan1
  3. Verify the VXLAN link that you created.

    # dladm show-vxlan
    LINK   ADDR       VNI  MGROUP
    vxlan1 10.10.11.1 10   224.0.0.1

    Because you have not specified a multicast address, this VXLAN segment uses the All Host multicast address, which addresses all the hosts on the same network segment.

  4. Check the VXLAN link information.

    # dladm show-link vxlan1
    LINK   CLASS MTU  STATE OVER 
    vxlan1 vxlan 1440 up    -- 

    vxlan1 is created and the link state is up.

  5. Create a VNIC over vxlan1.

    # dladm create-vnic -l vxlan1 vnic1
  6. Verify the VNIC that you created.

    # dladm show-vnic
    LINK   OVER   SPEED  MACADDRESS      MACADDRTYPE  VIDS 
    vnic1  vxlan1 10000  2:8:20:fe:58:d4 random       0
  7. Configure an IP interface over the VNIC.

    # ipadm create-ip vnic1
    # ipadm create-addr -T static -a local=10.10.12.1/24 vnic1/v4
    # ipadm show-addr vnic1
    ADDROBJ  TYPE   STATE  ADDR 
    vnic1/v4 static ok     10.10.12.1/24

You have successfully created a VXLAN by specifying the IP address. You have created a VNIC over the VXLAN and configured the IP interface.

Example 3-2  Assigning the VNIC Created Over a VXLAN to a Zone and Configuring an IP Interface

This example assumes that you have completed steps 1 to 6 in Example 3–1.

After you create the VNIC, assign the VNIC to a zone and configure the IP interface.

global# zonecfg -z zone2
zonecfg:zone2> add net
zonecfg:zone2:net> set physical=vnic1
zonecfg:zone2:net> end
zonecfg:zone2> verify
zonecfg:zone2> commit
zonecfg:zone2> exit
global# zoneadm -z zone2 reboot

global# zlogin zone2
zone2# ipadm create-ip vnic1
zone2# ipadm create-addr -a 192.168.3.85/24 vnic1
ipadm: vnic1/v4

zone2# exit

You have assigned the VNIC to a zone and then configured the IP interface over the VNIC.