JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle Solaris Administration: Network Interfaces and Network Virtualization     Oracle Solaris 11 Information Library
search filter icon
search icon

Document Information

Preface

1.  Overview of the Networking Stack

Network Configuration in This Oracle Solaris Release

The Network Stack in Oracle Solaris

Network Devices and Datalink Names

Administration of Other Link Types

Part I Network Auto-Magic

2.  Introduction to NWAM

3.  NWAM Configuration and Administration (Overview)

4.  NWAM Profile Configuration (Tasks)

5.  NWAM Profile Administration (Tasks)

6.  About the NWAM Graphical User Interface

Part II Datalink and Interface Configuration

7.  Using Datalink and Interface Configuration Commands on Profiles

8.  Datalink Configuration and Administration

9.  Configuring an IP Interface

10.  Configuring Wireless Interface Communications on Oracle Solaris

11.  Administering Bridges

12.  Administering Link Aggregations

13.  Administering VLANs

14.  Introducing IPMP

15.  Administering IPMP

16.  Exchanging Network Connectivity Information With LLDP

Part III Network Virtualization and Resource Management

17.  Introducing Network Virtualization and Resource Control (Overview)

18.  Planning for Network Virtualization and Resource Control

19.  Configuring Virtual Networks (Tasks)

Virtual Networks Task Map

Configuring Components of Network Virtualization in Oracle Solaris

How to Create a Virtual Network Interface

How to Create Etherstubs

Working With VNICs and Zones

Creating New Zones for Use With VNICs

How to Create and Configure the Exclusive IP Zone

Modifying the Configuration of Existing Zones to Use VNICs

How to Reconfigure a Zone to Use a VNIC

Creating a Private Virtual Network

How to Remove the Virtual Network Without Removing the Zones

20.  Using Link Protection in Virtualized Environments

21.  Managing Network Resources

22.  Monitoring Network Traffic and Resource Usage

Glossary

Index

Configuring Components of Network Virtualization in Oracle Solaris

This section contains tasks for configuring the building blocks of network virtualization in Oracle Solaris. The following comprise the basic components:

VNICs are pseudo interfaces that you create on top of datalinks. A VNIC has an automatically generated MAC address. Depending on the network interface in use, you can explicitly assign to a VNIC a MAC address other than the default address, as described in the dladm(1M) man page. You can create as many VNICs over a datalink as you require.

Etherstubs are pseudo Ethernet NICs which are managed by the system administrator. You can create VNICs over etherstubs instead of over physical links. VNICs over an etherstub become independent of the physical NICs in the system. With etherstubs, you can construct a private virtual network that is isolated both from the other virtual networks in the system and from the external network. For example, you want to create a network environment whose access is limited only to your company developers than to the network at large. Etherstubs can be used to create such an environment.

Etherstubs and VNICs are only a part of the virtualization features of Oracle Solaris. You typically use these components together with Oracle Solaris containers or zones. By assigning VNICs or etherstubs for use by zones, you can create a network within a single system.

How to Create a Virtual Network Interface

This procedure shows how to create a virtual network interface card (VNIC).

  1. Become an administrator.

    For more information, see How to Obtain Administrative Rights in Oracle Solaris Administration: Security Services.

  2. (Optional) To view information about the system's available physical interfaces, type the following command:
    # dladm show-phys

    This command displays the physical NICs on the system and their corresponding datalink names. Unless you create customized names for your datalinks, the datalink has the same name as the network interface device name. For example, the device e1000g0 uses the data link name e1000g0 until you replace the link name with another name. For more information about customized datalink names, see Network Devices and Datalink Names.

  3. (Optional) To view information about the system's datalinks, type the following command:
    # dladm show-link

    This command lists the datalinks and their current status. Make sure that a datalink's STATE field indicates that the datalink is up. You can configure VNICs only over datalinks whose status is up.

  4. (Optional) To view IP address information on configured interfaces, type the following command:
    # ipadm show-addr

    This command lists configured interfaces on your system including their corresponding IP addresses.

  5. Create a VNIC over a datalink.
    # dladm create-vnic -l link vnic
    • link is the name of the datalink over which the VNIC is configured.

    • vnic is the VNIC which you can label with a customized name as well.

  6. Create a VNIC IP interface over the link.
    # ipadm create-ip vnic
  7. Configure the VNIC with a valid IP address.

    If you are assigning a static IP address, use the following syntax:

    # ipadm create-addr -T static -a address addrobj

    where addrobj uses the naming format interface/user-defined-string, such as e1000g0/v4globalz. For other options when using this command, refer to the ipadm(1M) man page.

  8. If you are using static IP addresses, add the address information in the /etc/hosts file.
  9. (Optional) To display the VNIC's address configuration, type the following:
    # ipadm show-addr
  10. (Optional) To display VNIC information, type the following:
    # dladm show-vnic

Example 19-1 Creating Virtual Network Interfaces

This example contains the commands to create VNICs. You must log in to the system as superuser or the equivalent role to run the commands.

# dladm show-phys
LINK      MEDIA                STATE      SPEED DUPLEX   DEVICE
net0      Ethernet             up         1000 full      e1000g0
net1      Ethernet             unknown    0    half      e1000g1

# dladm show-link
LINK     CLASS    MTU    STATE    BRIDGE     OVER
net0     phys     1500   up       --         --
net1     phys     1500   unknown  --         --

# ipadm show-if
IFNAME   CLASS        STATE     ACTIVE     OVER
lo0      loopback     ok        yes        --
net0     ip           ok        yes        --

# ipadm show-addr
ADDROBJ        TYPE       STATE     ADDR
lo0/?          static     ok        127.0.0.1/8
net0/v4addr    static     ok        192.168.3.70/24

# dladm create-vnic -l net0 vnic0
# dladm create-vnic -l net0 vnic1

# dladm show-vnic
LINK        OVER          SPEED  MACADDRESS         MACADDRTYPE
vnic0       net0      1000 Mbps  2:8:20:c2:39:38    random
vnic1       net0      1000 Mbps  2:8:20:5f:84:ff    random
#
# ipadm create-ip vnic0
# ipadm create-ip vnic1

# ipadm create-addr -T static -a 192.168.3.80/24 vnic0/v4address
# ipadm create-addr -T static -a 192.168.3.85/24 vnic1/v4address
# ipadm show-addr
ADDROBJ            TYPE       STATE     ADDR
lo0/?              static     ok        127.0.0.1/8
net0/v4addr        static     ok        192.168.3.70/24
vnic0/v4address    static     ok        192.168.3.80/24
vnic1/v4address    static     ok        192.168.3.85/24

The system's /etc/hosts file would contain information similar to the following:

# cat /etc/hosts
#
::1             localhost
127.0.0.1       localhost
192.168.3.70    loghost   #For e1000g0
192.168.3.80    vnic1
192.168.3.85    vnic2

How to Create Etherstubs

You use etherstubs to isolate the virtual network from the rest of the virtual networks in the system as well as the external network to which the system is connected. You cannot use an etherstub just by itself. Instead, you use VNICs with an etherstub to create the private or isolated virtual networks. You can create as many etherstubs as you require. You can also create as many VNICs over each etherstub as required.

  1. Become an administrator.

    For more information, see How to Obtain Administrative Rights in Oracle Solaris Administration: Security Services.

  2. Create an etherstub
    # dladm create-etherstub etherstub
  3. Create a VNIC over the etherstub.
    # dladm create-vnic -l etherstub vnic
  4. Configure the VNIC with a private address.

    Note - To isolate the network for which you are configuring the VNIC over an etherstub, make sure to use a private IP address that cannot be forwarded by the default router of the external network. For example, suppose the physical interface has an address 192.168.3.0/24 that indicates that the system is on a 192.168.3.x network. You therefore assign another address that is not known to the default router, for example, 192.168.0.x.


  5. (Optional) To display information about VNICs, type the following command.
    # dladm show-vnic

    This command lists all the VNICs in the system and the datalinks or etherstubs over which the VNICs are created.

  6. (Optional) To display information about all the physical and virtual links on the system, type the following command.
    # dladm show-link

Example 19-2 Creating an Etherstub

The following example shows how to create an etherstub and then configure a VNIC over the etherstub. This example develops the previous example by adding a third VNIC that is configured over the etherstub.

You must log in to the system as superuser or equivalent role to run the next commands.

# dladm create-etherstub stub0
#
dladm show-vnic
LINK        OVER          SPEED  MACADDRESS         MACADDRTYPE
vnic1       net9      1000 Mbps  2:8:20:c2:39:38    random
vnic2       net0      1000 Mbps  2:8:20:5f:84:ff    random
#
# dladm create-vnic -l stub0 vnic3
# ipadm create-vnic vnic3
# ipadm create-addr -T static -a 192.168.0.10/24 vnic3/privaddr
#
# dladm show-vnic
LINK        OVER          SPEED  MACADDRESS         MACADDRTYPE
vnic1       net0      1000 Mbps  2:8:20:c2:39:38    random
vnic2       net0      1000 Mbps  2:8:20:5f:84:ff    random
vnic3       stub0        1000 Mbps  2:8:20:54:f4:74    random
#
# ipadm show-addr
ADDROBJ            TYPE       STATE     ADDR
lo0/?              static     ok        127.0.0.1/8
net0/v4addr        static     ok        192.168.3.70/24
vnic1/v4address    static     ok        192.168.3.80/24
vnic2/v4address    static     ok        192.168.3.85/24
vnic3/privaddr     static     ok        192.168.0.10/24

The system's /etc/hosts file would contain information similar to the following:

# cat /etc/hosts
#
::1             localhost
127.0.0.1       localhost
192.168.3.70    loghost   #For e1000g0
192.168.3.80    vnic1
192.168.3.85    vnic2
192.168.0.10    vnic3