How to Create a Datalink in Non-Global Zone from the Global Zone in Solaris 11
Network virtualization is the process of combining hardware network resources and software network resources into a single administrative unit. The goal of network virtualization is to provide systems and users with efficient, controlled, and secure sharing of the networking resources. The end product of network virtualization is the virtual network.
Starting from Oracle Solaris 11.2, you can create datalinks in nonglobal zones from the global zone. This feature enables administrators to dynamically create VNICs, VLANs, and IP-over- InfiniBand partitions directly in the nonglobal zone’s namespace from the global zone. Link names are specified as [zonename]/[linkname] and the links are created directly in the specified nonglobal zone.
The example below shows how to create a VNIC v1 in nonglobal zones zone1 and zone2 from the global zone. The zone1/net0 and zone2/net0 are automatically created VNICs for zone1 and zone2, respectively.
# dladm create-vnic -t -l net1 zone1/v1 # dladm create-vnic -t -l net1 zone2/v1
# dladm show-link -Z LINK ZONE CLASS MTU STATE OVER net1 global phys 1500 unknown -- net0 global phys 1500 up -- zone1/net0 zone1 vnic 1500 up net0 zone2/net0 zone2 vnic 1500 up net0 zone1/v1 zone1 vnic 1500 up net1 zone2/v1 zone2 vnic 1500 up net1
Accessing a Virtual Network Configuration
Shown below are useful commands for accessing your virtual network configuration. The first command (dladm show-link) shows you how to list all the links configured in your system. This includes VNICs and etherstubs. The next command (dladm show-vnic) shows you how to list the VNIC links. The last command (dladm show-etherstub) shows you how to list the etherstubs.
# dladm show-link LINK CLASS MTU STATE OVER net1 phys 1500 unknown -- net2 phys 1500 unknown -- net0 phys 1500 up -- net3 phys 1500 unknown -- stub0 etherstub 9000 unknown -- vnic0 vnic 9000 up stub0 vnic1 vnic 9000 up stub0 vnic2 vnic 9000 up stub0
# dladm show-vnic LINK OVER SPEED MACADDRESS MACADDRTYPE VIDS vnic0 stub0 40000 2:8:20:61:47:f6 random 0 vnic1 stub0 40000 2:8:20:81:e5:95 random 0 vnic2 stub0 40000 2:8:20:e9:10:18 random 0
# dladm show-etherstub LINK stub0
No comments:
Post a Comment