System Administration Guide: IP Services

Administering Interfaces in Solaris 10 3/05

This section contains the following tasks for administering physical interfaces:

What's New in This Section

This section contains information on configuring interfaces for users of the Solaris 10 3/05 OS only. If you are using an update to the Oracle Solaris 10, refer to Chapter 6, Administering Network Interfaces (Tasks). For a complete listing of new Oracle Solaris features and a description of Oracle Solaris releases, refer to Oracle Solaris 10 9/10 What’s New.

Configuring Physical Interfaces in Solaris 10 3/05

An Oracle Solaris-based system usually has two types of interfaces, physical and logical. Physical interfaces consist of a driver and a connector into which you plug network media, such as an Ethernet cable. Logical interfaces are logically configured onto existing physical interfaces, such as interfaces that are configured for tunnels or configured with IPv6 addresses. This section describes how to configure physical interfaces after installation. Instructions for configuring logical interfaces are included with tasks for features that require logical interfaces, for example, How to Manually Configure IPv6 Over IPv4 Tunnels.

Types of physical interfaces include interfaces that are built into the system and separately purchased interfaces. Each interface resides on a network interface card (NIC).

Built-in NICs are present on the system when it is purchased. An example of an interface on a built-in NIC is the primary network interface, such as eri0 or hme0. You must configure the system's primary network interface at installation time.

NICs such as eri and hme have only one interface. However, many brands of NICs have multiple interfaces. A multiple interface NIC such as the qfe card has four interfaces, qfe0qfe3. The Oracle Solaris installation program detects all interfaces present at installation and asks if you want to configure the interfaces. You can configure these interfaces at boot time or at a later date.


Note –

NICs are also referred to as network adapters.


In addition to the built-in NICs, you can add separately purchased NICs to a system. You physically install a separately purchased NIC according to the manufacturer's instructions. Then, you need to configure the interfaces on the NIC so that the interfaces can be used for passing data traffic.

The following are reasons to configure additional interfaces on a system after installation:

ProcedureHow to Add a Physical Interface After Installation in Solaris 10 3/05 ONLY

Before You Begin

Determine the IPv4 addresses that you want to use for the additional interfaces.

The physical interface to be configured must be present on the system. For information on installing separately purchased NIC hardware, refer to the manufacturers instructions that accompany the NIC.

The next procedure assumes that you have performed a reconfiguration boot after physically installing a new interface.


Note –

The next procedure contains applies to users of the Solaris 10 3/05 OS only. If you are using an update to Oracle Solaris 10, refer to How to Configure a Physical Interface After System Installation.


  1. On the system with the interfaces to be configured, assume the Primary Administrator role or become superuser.

    The Primary Administrator role includes the Primary Administrator profile. To create the role and assign the role to a user, see Chapter 2, Working With the Solaris Management Console (Tasks), in System Administration Guide: Basic Administration.

  2. Configure and plumb each interface.


    # ifconfig interface plumb up
    

    For example, for qfe0 you would type:


    # ifconfig qfe0 plumb up
    

    Note –

    Interfaces that are explicitly configured with the ifconfig command do not persist across a reboot.


  3. Assign an IPv4 address and netmask to the interface.


    # ifconfig interface IPv4-address netmask+netmask
    

    For example, for qfe0 you would type:


    # ifconfig qfe0 10.0.0.32 netmask + 255.255.255.0
    
  4. Verify that the newly configured interfaces are plumbed and configured, or “UP.”


    # ifconfig -a
    

    Check the status line for each interface that is displayed. Ensure that the output contains an UP flag on the status line, for example:


    qfe0: flags=1000843 <UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
  5. (Optional) To make the interface configuration persist across reboots, perform the following steps:

    1. Create an /etc/hostname.interface file for each interface to be configured.

      For example, to add a qfe0 interface, you would create the following file:


      # vi /etc/hostname.qfe0
      
    2. Edit the /etc/hostname.interface file.

      At a minimum, add the IPv4 address of the interface to the file. You can also add a netmask and other configuration information to the file.


      Note –

      To add an IPv6 address to an interface, refer to Modifying an IPv6 Interface Configuration for Hosts and Servers


    3. Add entries for the new interfaces into the /etc/inet/hosts file.

    4. Perform a reconfiguration boot.


      # reboot -- -r
      
    5. Verify that the interface you created in the /etc/hostname.interface file has been configured.


      # ifconfig -a
      

Example 5–10 Configuring an Interface After System Installation

The following example shows how to add two interfaces, qfe0 and qfe1. These interfaces are attached to the same network as the primary network interface, hme0. Note that this interface configuration exists until you reboot the system. For an example that shows how to make interface configurations persist across reboots, see Example 6–2. However, the dladm command that is used in that example is only available starting with the Solaris 10 1/06 OS.


# ifconfig qfe0 plumb up
# ifconfig qfe1 plumb up
# ifconfig qfe0 10.0.0.32 netmask 255.0.0.0
# ifconfig qfe1 10.0.0.33 netmask 255.0.0.0

# ifconfig -a
lo0: flags=1000849 <UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000 
hme0: flags=1000843 <UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
        inet 10.0.0.14 netmask ff000000 broadcast 10.255.255.255
        ether 8:0:20:c1:8b:c3 
qfe0: flags=1000843 <UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3
        inet 10.0.0.32 netmask ff000000 broadcast 10.255.255.255
        ether 8:0:20:c8:f4:1d 
qfe1: flags=1000843 <UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 4
        inet 10.0.0.33 netmask ff000000 broadcast 10.255.255.255
        ether 8:0:20:c8:f4:1e 

See Also

ProcedureHow to Remove a Physical Interface in Solaris 10 3/05 ONLY


Note –

The next procedure contains applies to users of the Solaris 10 3/05 OS only. If you are using an update to Oracle Solaris 10, refer to How to Remove a Physical Interface.


  1. On the system with the interface to be removed, assume the Primary Administrator role, or become superuser.

    The Primary Administrator role includes the Primary Administrator profile. To create the role and assign the role to a user, see Chapter 2, Working With the Solaris Management Console (Tasks), in System Administration Guide: Basic Administration.

  2. Remove the physical interface.

    Use the following form of the ifconfig command:


    # ifconfig interfacedown unplumb
    

    For example, you would remove the interface eri1 as follows:


    # ifconfig eri1 down unplumb
    

Configuring VLANs in Solaris 10 3/05 ONLY


Note –

This section contains information on configuring VLANs for users of the Solaris 10 3/05 OS only. If you are using an update to Oracle Solaris 10, refer to Administering Virtual Local Area Networks.


Virtual local area networks (VLANs) are commonly used to split up groups of network users into manageable broadcast domains, to create logical segmentation of work groups, and to enforce security policies among each logical segment. With multiple VLANs on an adapter, a server with a single adapter can have a logical presence on multiple IP subnets. By default, 512 VLANs can be defined for each VLAN-aware adapter on your server.

If your network does not require multiple VLANs, you can use the default configuration, in which case no further configuration is necessary.

For an overview of VLANs, refer to Overview of VLAN Topology.

VLANs can be created according to various criteria, but each VLAN must be assigned a VLAN tag or VLAN ID (VID). The VID is a 12-bit identifier between 1 and 4094 that identifies a unique VLAN. For each network interface (for example, ce0, ce1, ce2, and so on) 512 possible VLANs can be created. Because IP subnets are commonly used, use IP subnets when setting up a VLAN network interface. This means that each VID assigned to a VLAN interface of a physical network interface belongs to different subnets.

Tagging an Ethernet frame requires the addition of a tag header to the frame. The header is inserted immediately following the destination MAC address and the source MAC address. The tag header consists of two bytes of the Ethernet Tag Protocol Identifier (TPID, 0x8100) and two bytes of Tag Control Information (TCI). The following figure shows the Ethernet Tag Header format.

Figure 5–4 Ethernet Tag Header Format

The figure shows the layout of the Ethernet tag header,
as described in the previous context.

ProcedureHow To Configure Static VLANs in Solaris 10 3/05 ONLY


Note –

This procedure contains information on configuring VLANs for users of the Solaris 10 3/05 OS only. If you are using an update to Oracle Solaris 10, refer to How to Configure a VLAN


  1. Assume the Primary Administrator role, or become superuser.

    The Primary Administrator role includes the Primary Administrator profile. To create the role and assign the role to a user, see Chapter 2, Working With the Solaris Management Console (Tasks), in System Administration Guide: Basic Administration.

  2. Determine the type of interfaces in use on your system.

    The network adapter on your system might not be referred to by the letters ce, which is required for a VLAN.


    # ifconfig -a
    lo0: flags=1000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4>
    mtu 8232 index 1
            inet 127.0.0.1 netmask ff000000 
    hme0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4>
    mtu 1500 index 2
            inet 129.156.200.77 netmask ffffff00 broadcast
    129.156.200.255
  3. Create one hostname.cenum file (hostname6.cenum file for IPv6) for each VLAN that will be configured for each adapter on the server.

    Use the following naming format that includes both the VID and the physical point of attachment (PPA):

    VLAN logical PPA = 1000 * VID + Device PPA ce123000 = 1000*123 + 0

    For example: hostname.ce123000

    VLAN logical PPA = 1000 * VID + Device PPA ce11000 = 1000*11 + 0

    For example: hostname.ce11000

    This format limits the maximum number of PPAs (instances) you can configure to 1000 in the /etc/path_to_inst file.

    For example, on a server with the Sun Gigabit Ethernet/P 3.0 adapter having an instance of 0, that belongs to two VLANs with VIDs 123 and 224, you would use ce123000 and ce224000, respectively, as the two VLAN PPAs.

  4. Configure a VLAN virtual device:

    For example, you could use the following examples of ifconfig:


    # ifconfig ce123000 plumb up
    # ifconfig ce224000 plumb up
    

    The output of ifconfig -a on a system with VLAN devices ce123000 and ce224000 should resemble the following:


    # ifconfig -a
    lo0: flags=1000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1
            inet 127.0.0.1 netmask ff000000 
    hme0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
            inet 129.144.131.91 netmask ffffff00 broadcast 129.144.131.255
            ether 8:0:20:a4:4f:b8 
    ce123000: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3
            inet 199.199.123.3 netmask ffffff00 broadcast 199.199.123.255
            ether 8:0:20:a4:4f:b8 
    ce224000: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 4
            inet 199.199.224.3 netmask ffffff00 broadcast 199.199.224.255
            ether 8:0:20:a4:4f:b8 
  5. On the switch, set VLAN tagging and VLAN ports to coincide with the VLANs you have set up on the server.

    Using the examples in Step 4, you would set up VLAN ports 123 and 224 on the switch or VLAN ports 10 and 11.

    Refer to the documentation that came with your switch for specific instructions for setting VLAN tagging and ports.