System Administration Guide: IP Services

Network Configuration Procedures

Network software installation occurs along with the installation of the operating system software. At that time, certain IP configuration parameters must be stored in appropriate files so they can be read at boot time.

The procedure is a matter of creating or editing the network configuration files. How configuration information is made available to a machine's kernel is conditional. The availability depends on whether these files are stored locally (local files mode) or acquired from the network configuration server (network client mode).

The parameters that are supplied during network configuration follow:

This chapter contains information on creating and editing local configuration files. See System Administration Guide: Naming and Directory Services (DNS, NIS, and LDAP) and System Administration Guide: Naming and Directory Services (FNS and NIS+) for information on working with name service databases.

Network Configuration Task Map

Table 4–3 Network Configuration Task Map

Task 

Description 

For Instructions, Go To ... 

Configure a host for local files mode 

Involves editing the nodename, hostname, hosts, defaultdomain, defaultrouter, and netmasks files

How to Configure a Host for Local Files Mode

Set up a network configuration server 

Involves turning on the in.tftp daemon, and editing the inetd.conf, hosts, ethers, and bootparams files

How to Set Up a Network Configuration Server

Configure a host for network client mode 

Involves creating the hostname file, editing the hosts file, and deleting the nodename and defaultdomain files, if they exist

How to Configure Hosts for Network Client Mode

Specify a router for the network client 

Involves editing the defaultrouter and hosts files

How to Specify a Router for the Network Client

How to Configure a Host for Local Files Mode

Use this procedure for configuring TCP/IP on a machine that runs in local files mode.

  1. Become superuser and change directories to /etc.

  2. Type the host name of the machine in the file /etc/nodename.

    For example, if the name of the host is tenere, type tenere in the file.

  3. Create a file that is named /etc/hostname.interface for each network interface.

    The Solaris installation program automatically creates this file for the primary network interface. Refer to /etc/hostname.interface File for details. If you are using IPv6, see IPv6 Network Interface Configuration File.

  4. Type either the interface IP address or the interface name in each /etc/hostname.interface file.

    For example, create a file that is named hostname.ie1, and type either the IP address of the host's interface or the host's name.

  5. Edit the /etc/inet/hosts file to add the following:

    1. IP addresses that you have assigned to any additional network interfaces in the local machine, along with the corresponding host name for each interface.

      The Solaris installation program has already created entries for the primary network interface and loopback address.

    2. IP address or addresses of the file server, if the /usr file system is NFS mounted.


      Note –

      The Solaris installation program creates the default /etc/inet/hosts for the local machine. If the file does not exist, create the file as shown in hosts Database. Also, if you are using IPv6, see /etc/inet/ipnodes File.


  6. Type the host's fully qualified domain name in the /etc/defaultdomain file.

    For example, suppose host tenere was part of the domain deserts.worldwide.com. Therefore, you would type deserts.worldwide.com in /etc/defaultdomain. See /etc/defaultdomain File for more information.

  7. Type the router's name in /etc/defaultrouter.

    See /etc/defaultrouter File for information about this file.

  8. Type the name of the default router and its IP addresses in /etc/inet/hosts.

    Additional routing options are available. Refer to the discussion on routing options in How to Configure Hosts for Network Client Mode. You can apply these options to a local files mode configuration.

  9. If your network is subnetted, type the network number and the netmask in the file /etc/inet/netmasks.

    If you have set up an NIS or NIS+ server, you can type netmask information in the appropriate database on the server if server and clients are on the same network.

  10. Reboot each machine on the network.

How to Set Up a Network Configuration Server

  1. Become superuser and change to the root directory of the prospective network configuration server.

  2. Turn on the in.tftpd daemon by creating the directory /tftpboot:


    # mkdir /tftpboot
    

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

  3. Create a symbolic link to the directory.


    # ln -s /tftpboot/. /tftpboot/tftpboot
    
  4. Enable the tftp line in inetd.conf.

    Check that the /etc/inetd.conf entry reads as follows:


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

    This line prevents inettftpd() from retrieving any file other than the file that is located in /tftpboot.

  5. Edit the hosts database, and add the host names and IP addresses for every client on the network.

  6. Edit the ethers database, and create entries for every host on the network to run in network client mode.

  7. Edit the bootparams database.

    See bootparams Database. Use the wildcard entry or create an entry for every host that runs in network client mode.

  8. On a command line, type the following command.


    # pkill -HUP inetd

Information for setting up install servers and boot servers is found in Solaris 9 Installation Guide.

Configuring Network Clients

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

How to Configure Hosts for Network Client Mode

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

  1. Become superuser.

  2. Check the directory for the existence of an /etc/nodename file. If such a file exists, delete it.

    Eliminating /etc/nodename causes the system to use the hostconfig program to obtain the host name, domain name, and router addresses from the network configuration server. See Network Configuration Procedures.

  3. Create the file /etc/hostname.interface, if this file does not exist.

    Ensure that the file is empty. An empty /etc/hostname.interface file causes the system to acquire the IP address from the network configuration server. If you are using IPv6, see IPv6 Network Interface Configuration File.

  4. Ensure that the /etc/inet/hosts file contains only the host name and IP address of the loopback network interface.

    For more information, see Loopback Address. The file should not contain the IP address and host name for the local machine (primary network interface). If you are using IPv6, see /etc/inet/ipnodes File.

  5. Check for the existence of an /etc/defaultdomain file. If such a file exists, delete it.

    The hostconfig program sets the domain name automatically. If you are overriding the domain name that is set by hostconfig, type the substitute domain name in the file /etc/defaultdomain.

  6. Ensure that the search paths in the client's /etc/nsswitch.conf reflect the name service requirements for your network.

How to Specify a Router for the Network Client

  1. If only one router is on the network and the network configuration server is to specify its name automatically, ensure that no /etc/defaultrouter file exists on the network client.

  2. To override the name of the default router that is provided by the network configuration server, do the following:

    1. Create /etc/defaultrouter on the network client.

    2. Type the host name and IP address of the machine you have designated as the default router.

    3. Add the host name and IP address of the designated default router to the network client's /etc/inet/hosts.

  3. If you have multiple routers on the network, create /etc/defaultrouter on the network client, but leave this file empty.

Creating /etc/defaultrouter and leaving this file empty causes one of the two dynamic routing protocols to run: ICMP Router Discovery Protocol (RDISC), or Routing Information Protocol (RIP). The system first runs the program in.rdisc, which looks for routers that are running the router discovery protocol. If in.rdisc finds one such router, in.rdisc continues to run and monitors the routers that are running the RDISC protocol.

If the system discovers that routers are not responding to the RDISC protocol, the system uses RIP and runs the in.routed daemon to monitor the routers.