The following procedure assumes that the zones are already created on the system. For information about zone configuration, seeChapter 2, Setting Up a Non-Global Zone inCreating and Using Oracle Solaris Zones.
Before You Begin
Ensure that your role has the appropriate rights profile to perform this procedure. SeeUsing Rights Profiles to Perform Network Configuration.
$ipadm show-addr
$dladm create-vxlan -pprop=valuevxlan-link
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.
If the multicast address is not specified, the VXLAN segment uses theAll Host multicast address, which addresses all the hosts on the same network segment.
Name of the VXLAN.
$dladm create-vxlan -pprop=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.
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 address203.0.113.1 configured overnet0, a VXLAN datalink is created over203.0.113.1. By default, an IP version is an IPv4 address. However, if you need an IPv6 address, you must specify the version by using theipvers property.
$dladm show-vxlan
$dladm create-vnic -lvxlan-linkvnic
You can create VLAN VNIC over a VXLAN datalink. To create a VLAN VNIC, you must specify the–f (force) option. For information, seeHow to Configure VNICs as VLANs.
$ipadm create-ipvnic
$ipadm create-addr -aaddressvnic
zonecfg:zone>add netzonecfg:zone:net>set physical=vniczonecfg:zone:net>end
zonecfg:zone>verifyzonecfg:zone>commitzonecfg:zone>exit
global$zoneadm -zzone reboot
global$zloginzone
zone$ipadm create-ipinterface
If you are assigning a static address to the VNIC, you would type the following:
zone$ipadm create-addr -aaddressinterface
Specifies the IP address, which can be in CIDR notation.
For information about thedladm andipadm commands, see thedladm(8) andipadm(8) man pages.
This example shows the entire process of configuring a VXLAN. It includes displaying the information so you can see the progress of the configuration process.
$ipadm show-addr net4ADDROBJ TYPE STATE ADDR net4/v4 static ok 203.0.113.1/27$dladm create-vxlan -p addr=203.0.113.1/27,vni=10 vxlan1$dladm show-vxlanLINK ADDR VNI MGROUPvxlan1 203.0.113.1/27 10 224.0.0.1$dladm show-link vxlan1LINK CLASS MTU STATE OVER vxlan1 vxlan 1440 up -- $dladm create-vnic -l vxlan1 vnic1$dladm show-vnicLINK OVER SPEED MACADDRESS MACADDRTYPE IDS vnic1 vxlan1 10000 2:8:20:fe:58:d4 random VID:0$ipadm create-ip vnic1$ipadm create-addr -T static -a local=203.0.113.34/27 vnic1/v4$ipadm show-addr vnic1ADDROBJ TYPE STATE ADDR vnic1/v4 static ok 203.0.113.34/27Example 45 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 inExample 44, Creating a VXLAN and Configuring an IP Interface for the VNIC Created Over the VXLAN.
After you create the VNIC, assign the VNIC to a zone and configure the IP interface.
global$zonecfg -z zone2zonecfg:zone2>add netzonecfg:zone2:net>set physical=vnic1zonecfg:zone2:net>endzonecfg:zone2>verifyzonecfg:zone2>commitzonecfg:zone2>exitglobal$zoneadm -z zone2 rebootglobal$zlogin zone2zone2$ipadm create-ip vnic1zone2$ipadm create-addr -a 192.0.2.85/24 vnic1ipadm: vnic1/v4zone2$exit
You have assigned the VNIC to a zone and then configured the IP interface over the VNIC.