JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Connecting Systems Using Fixed Network Configuration in Oracle Solaris 11.1     Oracle Solaris 11.1 Information Library
search filter icon
search icon

Document Information

Preface

1.  Overview of Fixed Network Configuration

2.  Configuring a System for the Network

Configuring the Network (Task Map)

SPARC: How to Ensure That the MAC Address of Each Interface Is Unique

How to Change the Active NCP On the System

How to Configure an IP Interface

Other Network Configuration and Administration Tasks

3.  Working With Datalinks

4.  Working With IP Interfaces

5.  Configuring Wireless Networking on Laptops Running Oracle Solaris

A.  Comparison Map: ifconfig and ipadm Commands

B.  Comparison Map: ndd and ipadm Commands

Index

Configuring the Network (Task Map)

This section describes basic configuration procedures for an IP interface. The following table describes configuration tasks and maps these tasks to their corresponding procedures.

Task
Description
For Instructions
Configure a system to support unique MAC addresses.
Configures a SPARC based system to allow unique MAC addresses for interfaces.
Determine which NCP is active on the system
Displays the active NCP on the system and enables DefaultFixed.
Perform basic IP interface configuration by using the ipadm command.
Creates an IP interface and assigns valid IP addresses, either static or DHCP, to the interface.
Customize datalinks.
Customize datalinks further by setting link properties.
Customize IP interfaces.
Customizes IP interfaces further by setting interface properties.
Customize IP addresses.
Customizes IP addresses further by setting address properties.
Customize protocols.
Customizes protocols further by setting protocol properties.
Configure a wireless network.
Connect a laptop to the network using wireless networking.

SPARC: How to Ensure That the MAC Address of Each Interface Is Unique

Every SPARC based system has a system-wide MAC address, which by default is used by all interfaces. However, some applications require every interface on a host to have a unique MAC address. Certain types of interface configuration such as link aggregations and IP multipathing (IPMP) similarly require that interfaces must have their own MAC addresses.

The EEPROM parameter local-mac-address? determines whether all interfaces on a SPARC based system use the system-wide MAC address or their unique MAC address. The next procedure explains how to use the eeprom command to check the current value of local-mac-address? and change it, if necessary.

  1. Become an administrator.

    For more information, see How to Use Your Assigned Administrative Rights in Oracle Solaris 11.1 Administration: Security Services.

  2. Determine whether all interfaces on the system currently use the system-wide MAC address.
    # eeprom local-mac-address?
    local-mac-address?=false

    In the example, the response to the eeprom command, local-mac-address?=false, indicates that all interfaces do use the system-wide MAC address. The value of local-mac-address?=false must be changed to local-mac-address?=true before the interfaces can become members of an IPMP group. You should also make this change for link aggregations.

  3. If necessary, change the value of local-mac-address? as follows:
    # eeprom local-mac-address?=true

    When you reboot the system in Step 6, the interfaces with factory-installed MAC addresses will use these factory settings, rather than the system-wide MAC address. Interfaces without factory-installed MAC addresses will continue to use the system-wide MAC address.

  4. Check the MAC addresses of all the interfaces on the system.

    Look for cases where multiple interfaces have the same MAC address. In this example, two interfaces use the system-wide MAC address 8:0:20:0:0:1.

    # dladm show-linkprop -p mac-address
    LINK   PROPERTY       PERM VALUE             DEFAULT           POSSIBLE
    net0   mac-address    rw   8:0:20:0:0:1      8:0:20:0:0:1      --
    net1   mac-address    rw   8:0:20:0:0:1      8:0:20:0:0:1      --
    net3   mac-address    rw   0:14:4f:45:c:2d   0:14:4f:45:c:2d   --

    Note - Continue to the next step only if two or more network interfaces have the same MAC address. Otherwise, proceed to the final step.


  5. If necessary, manually configure the remaining interfaces so that all interfaces have unique MAC addresses.
    # dladm set-linkprop -p mac-address=mac-address interface
     

    In the example in the previous step, you would need to configure net0 and net1 with locally administered MAC addresses. For example, to reconfigure net0 with the locally administered MAC address 06:05:04:03:02, you would type the following command:

    # dladm set-linkprop -p mac-address=06:05:04:03:02 net0
     

    Refer to the dladm(1M) man page for details about this command.

  6. Reboot the system.

How to Change the Active NCP On the System

The type of NCP enabled on the system determines whether the system's network configuration is reactive or fixed. The system with reactive configuration behaves differently than with fixed network configuration. All the procedures in this book create persistent configurations which are applied to the active NCP. Therefore, before performing any procedure, you must know which NCP is active to apply the configuration to the correct profile. Thus, the system's network configuration behaves as you expect after completing the procedures.

  1. List the profiles on the system.
    # netadm list
    TYPE        PROFILE        STATE
    ncp         DefaultFixed   online
    ncp         Automatic      disabled
    loc         Automatic      offline
    loc         NoNet          offline
    loc         User           offline
    loc         DefaultFixed   online

    The profile whose status is listed as online is the active NCP on the system.

    For more detailed information about the NCPs on the system, use the -x option with the netadm command.

    netadm list -x
    TYPE        PROFILE        STATE          AUXILIARY STATE
    ncp         DefaultFixed   online         active
    ncp         Automatic      disabled       disabled by administrator
    loc         Automatic      offline        conditions for activation are unmet
    loc         NoNet          offline        conditions for activation are unmet
    loc         User           offline        conditions for activation are unmet
    loc         DefaultFixed   online         active
  2. To switch between profile types, for example from a reactive profile to a fixed profile, type the following command:
    # netadm enable -p ncp NCP-name

    where NCP-name is the name of a type of NCP.

    For example, suppose that your system's network configuration is reactive. If you want the configurations that are created by the procedures in this book to apply to the DefaultFixed NCP, you would type the following:

    # netadm enable -p ncp defaultfixed

    Caution

    Caution - When you switch active profiles, the existing network configuration is removed, and a new configuration is created. Any persistent configurations that were implemented on a previously active NCP are excluded in the new active NCP.


How to Configure an IP Interface

The following procedure provides the basic steps that you use to configure a system's IP interface.

Before You Begin

Check which NCP is active on the system to make sure that you are applying the configuration to the correct profile.

  1. Become an administrator.

    For more information, see How to Use Your Assigned Administrative Rights in Oracle Solaris 11.1 Administration: Security Services.

  2. Create the interface.
    # ipadm create-interface-class interface
    interface-class

    Refers to one of three classes of interfaces that you can create:

    • IP interface. This interface class is the most common that you create when you perform network configuration. To create this interface class, use the create-ip subcommand.

    • STREAMS virtual network interface driver (VNI interface). To create this interface class, use the create-vni subcommand. For more information about VNI devices or interfaces, see the vni(7d) man page.

    • IPMP interface. This interface is used when you configure IPMP groups. To create this interface class, use the create-ipmp subcommand. For more information about IPMP groups, see Chapter 5, Introduction to IPMP, in Managing Oracle Solaris 11.1 Network Performance.

    interface

    Refers to the name of the interface. The name is identical to the name of the datalink over which the interface is being created. To know the datalinks on the system, use the dladm show-link command.

  3. Configure the IP interface with a valid IP address by choosing one of the following commands.
    • To configure a static address, type the following:

      # ipadm create-addr -a address [interface | addrobj]
      -a address

      Specifies the IP address to configure on the interface.


      Note - Tunnel configuration typically requires two addresses for the tunnel interface: a local address and a remote address. For information about local and remote addresses, as well as tunnel configuration, see Chapter 6, Configuring IP Tunnels, in Configuring and Administering Oracle Solaris 11.1 Networks.


      For a numeric IP address, use CIDR notation. If you do not use CIDR notation, the netmask is computed according to the sequence listed for netmask in the name-service/switch service or by using classful address semantics.

      Optionally, you can specify a host name instead of a numeric IP address. Using a host name is valid if a corresponding numeric IP address is defined for that host name in the /etc/hosts file. If no numeric IP address is defined in the file, then the numeric value is uniquely obtained by using the resolver order that is specified for host in the name-service/switch service. If multiple entries exist for a given host name, an error is generated.


      Note - During the boot process, the creation of IP addresses precedes naming services being brought online. Therefore, you must ensure that any host name that is used in the network configuration must be defined in the /etc/hosts file.


      [interface | addrobj]

      In Oracle Solaris, each address is identified by a corresponding address object and represented in the command by addrobj. For any subsequent configuration on the address, you would refer to the address object instead of the actual IP address. For example, you would type ipadm show-addr addrobj or ipadm delete-addr addrobj. To create the address object name automatically, specify the interface name for interface. Otherwise, provide the address object name directly.

      • If you specify the interface name, then an address object is automatically named with the format interface/address-family. Address family is either v4 for an IPv4 address or v6 for an IPv6 address. Multiple addresses on the same interface have alphabetic letters appended to the address object names, such as net0/v4, net0/v4a, net0/v4b, net0/v6, net0/v6a, and so on.

      • If you manually name the address object for addrobj, you must use the format interface/user-specified-string. User-specified-string refers to a string of alphanumeric characters that begins with an alphabetic letter and has a maximum length of 32 characters. For example, you can name address objects net0/static, net0/static1, net1/private, and so on.

    • To configure a non-static address, type the following:

      # ipadm create-addr -T address-type [interface | addrobj]

      where address-type is either dhcp or addrconf. Addrconf refers to automatically generated IPv6 addresses.

      For a fuller explanation about [interface | addrobj], refer to the previous description for creating static addresses.

  4. (Optional) Display information about the newly configured IP interface.

    You can use the following commands, depending on the information that you want to check:

    # ipadm [interface]

    If you do not specify interface, information for all interfaces on the system is displayed.

    For more information about the output of the ipadm show-* subcommand, see Monitoring IP Interfaces and Addresses.

  5. If you are configuring a static IP address that uses a hostname, add entries for the IP address in the /etc/hosts file.

    The entries in this file consist of IP addresses and their corresponding host names.


    Note - If you are configuring a DHCP address, you do not need to update the /etc/hosts file.


  6. Define the default route.
    # route -p add default address

    You can verify the contents of the routing table with the netstat -r command.

    For more information about managing routes, see route(1M) and routeadm(1M) man pages. See also Routing Tables and Routing Types in Configuring and Administering Oracle Solaris 11.1 Networks.

Example 2-1 Configuring a Network Interface With a Static IP Address

This example explains how to configure an interface with a static IP address. The example begins with enabling the DefaultFixed NCP on the system to allow you to use the dladm and ipadm commands for fixed network configuration.

# netadm enable -p ncp DefaultFixed

# dladm show-phys
LINK     MEDIA        STATE     SPEED     DUPLEX     DEVICE
net3     Ethernet     up        100Mb     full       bge3

# dladm show-link
LINK     CLASS     MTU     STATE     BRIDGE   OVER
net3     phys      1500    up        --       --

# ipadm create-ip net3
# ipadm create-addr -a 192.168.84.3/24 net3
ipadm: net3/v4

# ipadm
NAME      CLASS/TYPE     STATE     UNDER     ADDR
lo0       loopback       ok        --        --
   l0/v4       static    ok        --        127.0.0.1/8
net3      ip             ok        --        --
   net3/v4     static    ok        --        192.168.84.3/24

# vi /etc/hosts
# Internet host table
# 127.0.0.1       localhost
10.0.0.14       myhost
192.168.84.3    campus01

# route -p add default 192.168.84.1
# netstat -r
Routing Table: IPv4
  Destination           Gateway           Flags  Ref     Use      Interface
-------------------- -------------------- ----- ----- ---------- ---------
default              some.machine.com          UG       2       10466
192.168.84.0         192.168.84.3         U        3        1810  net3
localhost            localhost            UH       2          12  lo0

Routing Table: IPv6
  Destination/Mask            Gateway                 Flags Ref   Use    If
--------------------------- ------------------------- ----- --- ------- -----
solaris                       solaris                 UH      2     156  lo0

Note that if campus01 is already defined in the /etc/hosts file, you can use that host name when assigning the following address:

# ipadm create-addr -a campus01 net3
ipadm: net3/v4

Example 2-2 Automatically Configuring a Network Interface With an IP Address

In this example, the IP interface is configured to receive its address from a DHCP server.

# dladm show-phys 
LINK     MEDIA        STATE     SPEED     DUPLEX     DEVICE
net3     Ethernet     up        100Mb     full       bge3

# dladm show-link
LINK     CLASS     MTU     STATE     BRIDGE   OVER
net3     phys      1500    up        --       --

# ipadm create-ip net3
# ipadm create-addr -T dhcp net3
ipadm: net3v4

# ipadm
NAME      CLASS/TYPE     STATE     UNDER     ADDR
lo0       loopback       ok        --        --
   l0/v4       static    ok        --        127.0.0.1/8
net3      ip             ok        --        --
   net3/v4     dhcp      ok        --        10.0.1.13/24