JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Configuring and Administering Oracle Solaris 11.1 Networks     Oracle Solaris 11.1 Information Library
search filter icon
search icon

Document Information

Preface

1.  Planning the Network Deployment

2.  Considerations When Using IPv6 Addresses

3.  Configuring an IPv4 Network

Network Configuration (Task Map)

Before You Begin Network Configuration

Configuring Component Systems on the Network

IPv4 Autonomous System Topology

Setting Up System Configuration Modes

How to Configure a System for Local Files Mode

How to Configure a System for Network Client Mode

How to Set Up a Network Configuration Server

Configuring an IPv4 Router

How to Configure an IPv4 Router

Routing Tables and Routing Types

How to Add a Static Route to the Routing Table

Configuring Multihomed Hosts

How to Create a Multihomed Host

Configuring Routing for Single-Interface Systems

How to Enable Static Routing on a Single-Interface Host

How to Enable Dynamic Routing on a Single-Interface System

Adding a Subnet to a Network

How to Change the IPv4 Address and Other Network Configuration Parameters

Monitoring and Modifying Transport Layer Services

How to Log the IP Addresses of All Incoming TCP Connections

How to Add Services That Use the SCTP Protocol

How to Use TCP Wrappers to Control Access to TCP Services

4.  Enabling IPv6 on the Network

5.  Administering a TCP/IP Network

6.  Configuring IP Tunnels

7.  IPv4 Reference

8.  IPv6 Reference

Index

Configuring Component Systems on the Network

When you configure network systems, you need the following configuration information:


Note - You can configure the network while you are installing Oracle Solaris. For instructions, see Installing Oracle Solaris 11.1 Systems.

In this documentation, the procedures assume that you are configuring the network after you have installed the OS.


Use Figure 3-1 in the following section as reference to configure the component systems of the network.

IPv4 Autonomous System Topology

Sites with multiple routers and networks typically administer their network topology as a single routing domain, or autonomous system (AS).

Figure 3-1 Autonomous System With Multiple IPv4 Routers

image:This topology diagram of an autonomous system is explained in the following context.

Figure 3-1shows an AS that is divided into three local networks, 10.0.5.0, 172.16.1.0, and 192.168.5.0. The network is comprised of the following types of systems:

Setting Up System Configuration Modes

This section describes procedures to set up a system to run either in local files mode or network client mode. When running in local files mode, a system obtains all TCP/IP configuration information from files that are located in the local directory. In network client mode, the configuration information is provided to all the systems in the network by a remote network configuration server.

Typically, servers in the network run in local files mode, such as the following:

Clients can run in either mode. Thus, in the network you can have a combination of these modes with which different systems are configured, as shown in the following figure.

Figure 3-2 Systems in an IPv4 Network Topology Scenario

image:Diagram shows a sample network with one network server that serves four systems.

Figure 3-2 shows the systems in a 192.9.200 network.

How to Configure a System for Local Files Mode

Use this procedure to configure any system to run in local files mode.

  1. Configure the system's IP interfaces with the assigned IP addresses.

    Refer to How to Configure an IP Interface in Connecting Systems Using Fixed Network Configuration in Oracle Solaris 11.1 for the procedure.

  2. Verify that the correct host name is set in the /etc/nodename file.
  3. Verify that the entries in the /etc/inet/hosts file are current.

    The Oracle Solaris installation program creates entries for the primary network interface, loopback address, and, if applicable, any additional interfaces that were configured during installation.

    This file must also include the name of the default router and the router's IP address.

    1. (Optional) Add the IP addresses and corresponding names for any network interfaces that were added to the system after installation.
    2. (Optional) If the /usr file system is NFS mounted, add the IP address or addresses of the file server.
  4. Specify the system's fully qualified domain as a property of the nis/domain SMF service.

    For example, you would specify deserts.worldwide.com as the value for the domainname property of the nis/domain SMF service as follows:

    # domainname domainname

    This step effects a persistent change.

  5. Type the router's name in the /etc/defaultrouter file.
  6. Add the netmask information, if applicable.

    Note - If you are using DHCP services, skip this step.


    1. Type the network number and the netmask in the /etc/inet/netmasks file.

      To create entries, use the format network-number netmask. For example, for the Class C network number 192.168.83, you would type:

      192.168.83.0    255.255.255.0

      For CIDR addresses, convert the network prefix into the equivalent dotted decimal representation. Network prefixes and their dotted decimal equivalents can be found in Table 1-1. For example, use the following to express the CIDR network prefix 192.168.3.0/22.

      192.168.3.0     255.255.252.0
    2. Change the lookup order for netmasks in the SMF property of the switch so that local files are searched first, then refresh the instance.
      # svccfg -s name-service/switch setprop config/host = astring: '"files nis"'
      # svccfg -s name-service/switch:default refresh
  7. Reboot the system.

How to Configure a System for Network Client Mode

Do the following procedure on each host to be configured in network client mode.

Before You Begin

Network clients receive their configuration information from network configuration servers. Therefore, before you configure a system as a network client you must ensure that at least one network configuration server is set up for the network.

  1. Become an administrator.

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

  2. Configure the system's IP interfaces with the assigned IP addresses.

    Refer to How to Configure an IP Interface in Connecting Systems Using Fixed Network Configuration in Oracle Solaris 11.1 for the procedure.

  3. Ensure that the /etc/inet/hosts file contains only the localhost name and IP address of the loopback network interface.
    # cat /etc/inet/hosts
    # Internet host table
    #
    127.0.0.1       localhost
  4. Remove any value that is assigned to the domainname property of the nis/domain SMF service.
    # domainname "

    This step effects a persistent change.

  5. Ensure that the search paths in the client's name-service/switch service reflect the same service requirements for your network.

How to Set Up a Network Configuration Server

Information for setting up installation servers and boot servers is found in Installing Oracle Solaris 11.1 Systems.

  1. Become an administrator.

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

  2. Turn on the in.tftpd daemon as follows:
    1. Navigate to the root (/) directory of the designated network configuration server.
    2. Create the /tftpboot directory:
      # mkdir /tftpboot

      This command configures the system as a TFTP, bootparams, and RARP server.

    3. Create a symbolic link to the directory.
      # ln -s /tftpboot/. /tftpboot/tftpboot
  3. Add the tftp line in the /etc/inetd.conf file.

    The line should read as follows:

    tftp dgram udp6 wait root /usr/sbin/in.tftpd in.tftpd -s /tftpboot

    This line prevents in.tftpd from retrieving any file other than the files that are located in /tftpboot.

  4. On the /etc/hosts database, add the host names and IP addresses of all the clients on the network.
  5. On the /etc/ethers database, create entries for every system on the network that runs in network client mode.

    Entries in this database use the following format:

    MAC Address     host name      #comment

    For more information, see the ethers(4) man page.

  6. On the /etc/bootparams database, create an entry for every system on the network that runs in network client mode.

    For information about editing this database, see the bootparams(4) man page.

  7. Convert the /etc/inetd.conf entry into a Service Management Facility (SMF) service manifest, and enable the resulting service.
    # /usr/sbin/inetconv
  8. Verify that in.tftpd is working correctly.
    # svcs network/tftp/udp6

    You should receive output resembling the following:

    STATE          STIME    FMRI
    online         18:22:21 svc:/network/tftp/udp6:default
Administering the in.tftpd Daemon

The in.tftpd daemon is managed by the Service Management Facility. Administrative actions on in.tftpd, such as enabling, disabling, or restarting, can be performed using the svcadm command. Responsibility for initiating and restarting this service is delegated to inetd. Use the inetadm command to make configuration changes and to view configuration information for in.tftpd. You can query the service's status by using the svcs command. For an overview of the Service Management Facility, refer to Chapter 1, Managing Services (Overview), in Managing Services and Faults in Oracle Solaris 11.1.

Configuring an IPv4 Router

A router provides the interface between two or more networks. Therefore, you must assign a unique name and IP address to each of the router's physical network interfaces. Thus, each router has a host name and an IP address that are associated with its primary network interface, in addition to a minimum of one more unique name and IP address for each additional network interface.

You can also use the following procedure to configure a system with only one physical interface (by default, a host) to be a router. You might configure a single interface system as a router if the system serves as one endpoint on a PPP link, as explained in Planning a Dial-up PPP Link in Managing Serial Networks Using UUCP and PPP in Oracle Solaris 11.1.

How to Configure an IPv4 Router

The following instructions assume that you are configuring interfaces for the router after installation.

Before You Begin

After the router is physically installed on the network, configure the router to operate in local files mode, as described in How to Configure a System for Local Files Mode. This configuration ensures that routers boot if the network configuration server is down.

  1. Become an administrator.

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

  2. Configure the IP interfaces on the NICs on the system.

    For detailed steps to configure IP interfaces, refer to How to Configure an IP Interface in Connecting Systems Using Fixed Network Configuration in Oracle Solaris 11.1.

    Make sure that each IP interface is configured with the IP address of the network for which the system will route packets. Thus, if the system serves the 192.168.5.0 and 10.0.5.0 networks, then one NIC must be configured for each network.


    Caution

    Caution - If you want to configure an IPv4 routers to use DHCP, you must be thoroughly knowledgeable with DHCP administration.


  3. Add the host name and IP address of each interface to the /etc/inet/hosts file.

    For example, assume that the names you assigned for the Router 1's two interfaces are krakatoa and krakatoa-1, respectively. The entries in the /etc/inet/hosts file would be as follows:

    192.168.5.1      krakatoa        #interface for network 192.168.5.0
    10.0.5.1         krakatoa-1      #interface for network 10.0.5.0
  4. Perform the rest of the steps to configure this router to run in local files mode.

    See How to Configure a System for Local Files Mode.

  5. If the router is connected to any subnetted network, add the network number and the netmask to the /etc/inet/netmasks file.

    For example, for traditional IPv4 address notation, such as 192.168.5.0, you would type:

    192.168.5.0    255.255.255.0
  6. Enable IPv4 packet forwarding on the router.
    # ipadm set-prop -p forwarding=on ipv4
  7. (Optional) Start a routing protocol.

    Use one of the following command syntaxes:

    • # routeadm -e ipv4-routing -u

    • # svcadm enable route:default

      The SMF FMRI associated with the in.routed daemon is svc:/network/routing/route.

    When you start a routing protocol, the routing daemon /usr/sbin/in.routed automatically updates the routing table, a process that is known as dynamic routing. For more information about the types of routing, see Routing Tables and Routing Types. For information about the routeadm command, see the routeadm(1M) man page.

Example 3-1 Configuring the Default Router for a Network

This example is based on Figure 3-1. Router 2 contains two wired network connections, one connection to network 172.16.1.0 and one to network 10.0.5.0. The example shows how to configure Router 2 to become the default router of the 172.16.1.0 network. The example also assumes that Router 2 has been configured to operate in local files mode, as described in How to Configure a System for Local Files Mode.

After becoming superuser or assuming an equivalent role, you would determine out the status of the system's interfaces.

# dladm show-link
LINK     CLASS     MTU     STATE   BRIDGE   OVER
net0     phys      1500    up      --       --
net1     phys      1500    up      --       --
net2     phys      1500    up      --       --
# ipadm show-addr
ADDROBJ           TYPE     STATE        ADDR
lo0/v4            static   ok           127.0.0.1/8
net0/v4           static   ok           172.16.1.10/24

Only net0 has been configured with an IP address. To make Router 2 the default router, you would physically connect the net1 interface to the 10.0.5.0 network.

# ipadm create-ip net1
# ipadm create-addr -a 10.0.5.10/24 net1
# ipadm show-addr
ADDROBJ           TYPE     STATE        ADDR
lo0/v4            static   ok           127.0.0.1/8
net0/v4           static   ok           172.16.1.10/24
net1/v4           static   ok           10.0.5.10/24

Next, you would update the following network databases with information about the newly configured interface and the network to which it is connected:

# vi /etc/inet/hosts
127.0.0.1       localhost
172.16.1.10        router2        #interface for network 172.16.1
10.0.5.10          router2-out    #interface for network 10.0.5
# vi /etc/inet/netmasks
172.16.1.0    255.255.255.0 
10.0.5.0      255.255.255.0

Finally, enable packet forwarding as well as the in.routed routing daemon.

# ipadm set-prop -p forwarding=on ipv4
# svcadm enable route:default

Now IPv4 packet forwarding and dynamic routing through RIP are enabled on Router 2. However, the default router configuration for network 172.16.1.0 is not yet complete. You would need to do the following:

Routing Tables and Routing Types

Both routers and hosts maintain a routing table. The routing table lists the IP addresses of networks that the system knows about, including the system's local, default network. The table also lists the IP address of a gateway system for each known network. The gateway is a system that can receive outgoing packets and forward them one hop beyond the local network.

The following is a simple routing table for a system on an IPv4-only network:

Routing Table: IPv4
  Destination           Gateway           Flags  Ref   Use   Interface
-------------------- -------------------- ----- ----- ------ ---------
default              172.16.1.10          UG       1    532   net0
224.0.0.0            10.0.5.100           U        1      0   net1
10.0.0.0             10.0.5.100           U        1      0   net1
127.0.0.1            127.0.0.1            UH       1     57   lo0

You can configure two types of routing on an Oracle Solaris system: static and dynamic. You can configure either or both routing types on a single system. A system that implements dynamic routing relies on routing protocols, such as RIP for IPv4 networks, and RIPng for IPv6 networks, to route network traffic as well as to update routing information in the table. With static routing, routing information is maintained manually by the use of the route command. For complete details, refer to the route(1M) man page.

When you configure routing for the local network or autonomous system, consider which type of routing to support on particular routers and hosts.

The following table shows the different types of routing and the networking scenarios to which each routing type is best applied.

Routing Type
Best Used on
Static
Small networks, hosts that get their routes from a default router, and default routers that only need to know about one or two routers on the next few hops.
Dynamic
Larger internetworks, routers on local networks with many hosts, and hosts on large autonomous systems. Dynamic routing is the best choice for systems on most networks.
Combined static and dynamic
Routers that connect a statically routed network and a dynamically routed network, and border routers that connect an interior autonomous system with external networks. Combining both static and dynamic routing on a system is a common practice.

The AS that is shown is Figure 3-1 combines both static and dynamic routing.


Note - Two routes to the same destination does not automatically cause the system to do load balancing or failover. If you need these capabilities, use IPMP, as explained in Chapter 5, Introduction to IPMP, in Managing Oracle Solaris 11.1 Network Performance.


How to Add a Static Route to the Routing Table

  1. View the current state of the routing table.

    Use your regular user account to run the following form of the netstat command:

    % netstat -rn

    Your output would resemble the following:

    Routing Table: IPv4
      Destination           Gateway           Flags  Ref   Use   Interface
    -------------------- -------------------- ----- ----- ------ ---------
    192.168.5.125        192.168.5.10          U      1   5879   net0
    224.0.0.0            198.168.5.10          U      1  0       net0
    default              192.168.5.10          UG     1  91908
    127.0.0.1            127.0.0.1             UH     1  811302   lo0
  2. Become an administrator.

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

  3. (Optional) Flush the existing entries in the routing table.
    # route flush
  4. Add a route that persists across system reboots.
    # route -p add -net network-address -gateway gateway-address
    -p

    Creates a route that must persist across system reboots. If you want the route to prevail only for the current session, do not use the -p option.

    -net network-address

    Specifies that the route goes to the network with the address in network-address.

    -gateway gateway-address

    Indicates that the gateway system for the specified route has the IP address gateway-address.

Example 3-2 Adding a Static Route to the Routing Table

The following example shows how to add a static route to Router 2 of Figure 3-1. The static route is needed for the AS's border router, 10.0.5.150.

To view the routing table on Router 2, you would do the following:

# netstat -rn
Routing Table: IPv4
  Destination           Gateway           Flags  Ref   Use   Interface
-------------------- -------------------- ----- ----- ------ ---------
default              172.16.1.10          UG        1    249 ce0
224.0.0.0            172.16.1.10          U         1      0 ce0
10.0.5.0             10.0.5.20            U         1     78 bge0
127.0.0.1            127.0.0.1            UH        1     57 lo0

The routing table indicates two routes that Router 2 knows about. The default route uses Router 2's 172.16.1.10 interface as its gateway. The second route, 10.0.5.0, was discovered by the in.routed daemon running on Router 2. The gateway for this route is Router 1, with the IP address 10.0.5.20.

To add a second route to network 10.0.5.0, which has its gateway as the border router, you would do the following:

# route -p add -net 10.0.5.0/24 -gateway 10.0.5.150
add net 10.0.5.0: gateway 10.0.5.150

Now the routing table has a route for the border router, which has the IP address 10.0.5.150/24.

# netstat -rn
Routing Table: IPv4
  Destination           Gateway           Flags  Ref   Use   Interface
-------------------- -------------------- ----- ----- ------ ---------
default              172.16.1.10          UG        1    249 ce0
224.0.0.0            172.16.1.10          U         1      0 ce0
10.0.5.0             10.0.5.20            U         1     78 bge0
10.0.5.0             10.0.5.150           U         1    375 bge0
127.0.0.1            127.0.0.1            UH        1     57 lo0

Configuring Multihomed Hosts

In Oracle Solaris, a system with more than one interface is considered a multihomed host. The interfaces of a multihomed host connect to different subnets, either on different physical networks, or on the same physical network.

On a system whose multiple interfaces connect to the same subnet, you must configure the interfaces into an IPMP group first. Otherwise, the system cannot be a multihomed host. For more information about IPMP, see Chapter 5, Introduction to IPMP, in Managing Oracle Solaris 11.1 Network Performance.

A multihomed host does not forward IP packets, but can be configured to run routing protocols. You typically configure the following types of systems as multihomed hosts:

How to Create a Multihomed Host

  1. Become an administrator.

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

  2. Configure each additional network interface that was not configured as part of the Oracle Solaris installation.

    Refer to How to Configure an IP Interface in Connecting Systems Using Fixed Network Configuration in Oracle Solaris 11.1.

  3. If packet forwarding is enabled, disable this service.
    # ipadm show-prop -p forwarding ipv4
    PROTO PROPERTY     PERM CURRENT      PERSISTENT   DEFAULT      POSSIBLE
    ipv4  forwarding   rw   on           --           off          on,off
    
    ipadm set-prop -p forwarding=off ipv4
  4. (Optional) Turn on dynamic routing for the multihomed host.

    Use one of the following command syntaxes:

    • # routeadm -e ipv4-routing -u

    • # svcadm enable route:default

      The SMF FMRI associated with the in.routed daemon is svc:/network/routing/route.

Example 3-3 Configuring a Multihomed Host

The following example shows how to configure the multihomed host that is shown in Figure 3-1. In the example, the system has the host name hostc. This host has two interfaces, which are both connected to network 192.168.5.0.

To begin, you would display the status of the system's interfaces.

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

# ipadm show-addr
ADDROBJ        TYPE     STATE        ADDR
lo0/v4         static   ok           127.0.0.1/8
net0/v4        static   ok           192.168.5.82/24
 

The dladm show-link command reports that hostc has two datalinks. However, only net0 has been configured with an IP address. To configure hostc as a multihomed host, you would configure net1 with an IP address in the same 192.168.5.0 network. Ensure that the underlying physical NIC of net1 is physically connected to the network.

# ipadm create-ip net1
# ipadm create-addr static -a 192.168.5.85/24 net1
# ipadm show-addr
ADDROBJ        TYPE     STATE        ADDR
lo0/v4         static   ok           127.0.0.1/8
net0/v4        static   ok           192.168.5.82/24
net1/v4        static   ok           192.168.5.85/24

Next, you would add the net1 interface to the /etc/hosts database:

# vi /etc/inet/hosts
127.0.0.1           localhost
192.168.5.82        hostc    #primary network interface for host3
192.168.5.85        hostc-2  #second interface

Next, you would turn off packet forwarding if this service is running on the hostc:

# ipadm show-prop -p forwarding ipv4
PROTO PROPERTY     PERM CURRENT   PERSISTENT   DEFAULT      POSSIBLE
ipv4  forwarding   rw   on        --           off          on,off

# ipadm set-prop -p forwarding=off ipv4

# routeadm
              Configuration   Current              Current
                     Option   Configuration        System State
---------------------------------------------------------------
               IPv4 routing   enabled              enabled
               IPv6 routing   disabled             disabled

           Routing services   "route:default ripng:default"

The routeadm command reports that dynamic routing through the in.routed daemon is currently enabled.

Configuring Routing for Single-Interface Systems

Single-interface systems can be configured with either static or dynamic routing. With static routing, the host must rely on the services of a default router for routing information. The following procedures contain the instructions for enabling both routing types.

How to Enable Static Routing on a Single-Interface Host

You can also use the following procedure to configure static routing on a multihomed host.

  1. Become an administrator.

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

  2. Configure the system's IP interface with an IP address for the network to which the system belongs.

    For instructions, see How to Configure an IP Interface in Connecting Systems Using Fixed Network Configuration in Oracle Solaris 11.1.

  3. With a text editor, create or modify the /etc/defaultrouter file by adding the IP address of the router the system will use.
  4. Add an entry for the default router in the local /etc/inet/hosts file.
  5. Ensure that routing is turned off.
    # routeadm
       Configuration   Current              Current
                         Option   Configuration        System State
    ---------------------------------------------------------------
                   IPv4 routing   enabled             disabled
                   IPv6 routing   disabled             disabled
    
               Routing services   "route:default ripng:default"
    
    # svcadm disable route:default
  6. Ensure that packet forwarding is turned off.
    # # ipadm show-prop -p forwarding ipv4
    PROTO PROPERTY     PERM CURRENT   PERSISTENT   DEFAULT      POSSIBLE
    ipv4  forwarding   rw   on        --           off          on,off
    
    # ipadm set-prop -p forwarding=off ipv4

Example 3-4 Configuring Static Routing on a Single-Interface System

The following example shows how to configure static routing for hostb, a single-interface system on the 172.16.1.0 network as shown in Figure 3-1. hostb needs to use Router 2 as its default router. The example assumes that you have already configured the system's IP interface.

First, you would log in to hostb with administrator rights. Next, you would determine whether the /etc/defaultrouter file is present on the system:

# cd /etc
# ls | grep defaultrouter

# vi /etc/defaultrouter
172.16.1.10

The IP address 172.16.1.10 belongs to Router 2.

# vi /etc/inet/hosts
127.0.0.1           localhost
172.16.1.18         host2    #primary network interface for host2
172.16.1.10         router2  #default router for host2

# ipadm show-prop -p forwarding ipv4
PROTO PROPERTY     PERM CURRENT   PERSISTENT   DEFAULT      POSSIBLE
ipv4  forwarding   rw   on         --           off          on,off

# ipadm set-prop -p forwarding=off ipv4

# routeadm
   Configuration   Current              Current
                     Option   Configuration        System State
---------------------------------------------------------------
               IPv4 routing   enabled             disabled
               IPv6 routing   disabled             disabled

           Routing services   "route:default ripng:default"

# svcadm disable route:default

How to Enable Dynamic Routing on a Single-Interface System

Dynamic routing that uses a routing protocol is the easiest way to manage routing on a system.

  1. Become an administrator.

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

  2. Configure the system's IP interface with an IP address for the network to which the system belongs.

    For instructions, see How to Configure an IP Interface in Connecting Systems Using Fixed Network Configuration in Oracle Solaris 11.1.

  3. Delete any entry in the /etc/defaultrouter file.

    An empty /etc/defaultrouter file forces the system to use dynamic routing.

  4. Ensure that packet forwarding is disabled.
    # ipadm set-prop -p forwarding=off ipv4
  5. Enable routing protocols on the system.

    Use either of the following commands:

    • # routeadm -e ipv4-routing -u

    • # svcadm enable route:default

Example 3-5 Running Dynamic Routing on a Single-Interface System

The following example shows how to configure dynamic routing for hosta, a single-interface system on the network 192.168.5.0 that is shown in Figure 3-1. The system uses Router 1 as its default router. The example assumes that you have already configured the system's IP interface.

First, you would log in to hosta with administrator rights. Then, you would remove the /etc/defaultrouter file if it is exists on the system:

# cd /etc
# ls | grep defaultrouter
defaultrouter

# rm defaultrouter
# routeadm   Configuration   Current              Current
                     Option   Configuration        System State
---------------------------------------------------------------
               IPv4 routing   disabled             disabled
               IPv6 routing   disabled             disabled

           Routing services   "route:default ripng:default"

# svcadm enable route:default

# ipadm show-prop -p forwarding ipv4
PROTO PROPERTY     PERM CURRENT   PERSISTENT   DEFAULT      POSSIBLE
ipv4  forwarding   rw   on         --           off          on,off

# ipadm set-prop -p forwarding=off ipv4

Adding a Subnet to a Network

If you are changing from a network that does not use a subnet to a network that does use a subnet, perform the tasks in the following list. The list assumes that you have already prepared a subnet schema.

The following procedure is closely connected to subnets. If you implement subnetting much later after you have originally configured the network without subnetting, perform the following procedure to implement the changes.

How to Change the IPv4 Address and Other Network Configuration Parameters

This procedure explains how to modify the IPv4 address, host name, and other network parameters on a previously installed system. Use the procedure for modifying the IP address of a server or networked standalone system. The procedure does not apply to network clients or appliances. The steps create a configuration that persists across reboots.


Note - The instructions apply specifically to changing the IPv4 address of the primary network interface. To add another interface to the system, refer to How to Configure an IP Interface in Connecting Systems Using Fixed Network Configuration in Oracle Solaris 11.1.


In almost all cases, the following steps use traditional IPv4 dotted decimal notation to specify the IPv4 address and subnet mask. Alternatively, you can use CIDR notation to specify the IPv4 address in all the applicable files in this procedure.

  1. Become an administrator.

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

  2. Modify the IP address by using the ipadm command.

    With the ipadm command, you cannot modify an IP address directly. You first delete the address object that represents the IP address you want to modify. Then you assign a new address by using the same address object name.

    # ipadm delete-addr addrobj
    # ipadm create-addr -a IP-address interface
  3. If applicable, modify the host name entry in the system/identity:node SMF service:
    # hostname newhostname

    This step effects a persistent change.

  4. If the subnet mask has changed, modify the subnet entries in the /etc/netmasks file.
  5. If the subnet address has changed, change the IP address of the default router in /etc/defaultrouter to that of the new subnet's default router.
  6. Reboot the system.
    # reboot -- -r

Example 3-6 Changing the IP Address and Host Name

This example shows how to change a host's name, IP address of the primary network interface, and subnet mask. The IP address for the primary network interface net0 changes from 10.0.0.14 to 192.168.34.100.

# ipadm show-addr
ADDROBJ      TYPE     STATE   ADDR
lo0/v4       static   ok      127.0.0.1/8
net0/v4      static   ok      10.0.0.14/24

# ipadm delete-addr net0/v4
# ipadm create-addr -a 192.168.34.100/24 net0
# hostname mynewhostname

# ipadm show-addr
ADDROBJ         TYPE     STATE   ADDR
lo0/v4          static   ok      127.0.0.1/8
net0/v4         static   ok      192.168.34.100/24

# hostname
mynewhostname

See Also

To change the IP address of an interface other than the primary network interface, refer to How to Configure an IP Interface in Connecting Systems Using Fixed Network Configuration in Oracle Solaris 11.1.