Sun Microsystems, Inc.
spacerspacer
spacer www.sun.com docs.sun.com |
spacer
black dot
 
 
  Previous   Contents   Next 
   
 
Chapter 5

TCP/IP (Reference)

This chapter provides TCP/IP network reference information about TCP/IP configuration files, including the types, their purpose, and the format of the file entries. The existing network databases are also described in detail.

The chapter also shows how the structure of IPv4 addresses are derived, based on defined network classifications and subnet numbers.

For additional information about Internet Transmission Control Protocol (TCP), see the tcp(7P) man page.

This chapter contains the following information:

TCP/IP Configuration Files

Each machine on the network obtains its TCP/IP configuration information from the following TCP/IP configuration files and network databases:

  • /etc/hostname.interface file

  • /etc/nodename file

  • /etc/defaultdomain file

  • /etc/defaultrouter file (optional)

  • hosts database

  • ipnodes database

  • netmasks database (optional)

The Solaris installation program creates these files as part of the installation process. You can also edit the files manually, as explained in this section. The hosts and netmasks databases are two of the network databases read by the name services available on Solaris networks. "Network Databases and nsswitch.conf File" describes the concept of network databases in detail. For information on the ipnodes file, see "/etc/inet/ipnodes File".

/etc/hostname.interface File

This file defines the network interfaces on the local host for IPv4. A minimum of one /etc/hostname.interface file should exist on the local machine. The Solaris installation program creates this file for you. In the file name, interface is replaced by the device name of the primary network interface.


Note - If you add a new network interface to your system after the initial Solaris software installation, you must create an /etc/hostname.interface file for that interface, add the interface's IP address to the /etc/inet/hosts file, and reboot the system with the -r option. See substeps within "How to Configure a Host for Local Files Mode" for instructions. Also, in order for the Solaris software to recognize and use the new network interface, you need to load the interface's device driver into the appropriate directory. Refer to the documentation that comes with the new network interface for the appropriate interface name and device driver instructions.


The file contains only one entry: the host name or IPv4 address that is associated with the network interface. For example, suppose smc0 is the primary network interface for a machine that is called tenere. The /etc/hostname.interface file would have the name /etc/hostname.smc0. The file would contain the entry tenere.

Files for Multiple Network Interfaces

If a machine contains more than one network interface, you must create additional /etc/hostname.interface files for the additional network interfaces. You must create these files with a text editor. The Solaris installation program does not create them for you.

For example, consider the machine timbuktu, which is shown in Figure 4-1. This machine has two network interfaces and functions as a router. The primary network interface le0 is connected to network 192.9.200. The IP address is 192.9.200.70, and its host name is timbuktu. The Solaris installation program creates the file /etc/hostname.le0 for the primary network interface and enters the host name timbuktu in the file.

The second network interface is le1. This interface is connected to network 192.9.201. Although this interface is physically installed on machine timbuktu, the interface must have a separate IPv4 address. Therefore, you have to manually create the /etc/hostname.le1 file for this interface. The entry in the file would be the router`s name, timbuktu-201.

/etc/hostname6.interface File

IPv6 uses the file /etc/hostname6.interface at start up to automatically define network interfaces in the same way IPv4 uses /etc/hostname.interface. A minimum of one /etc/hostname. or /etc/hostname6. file should exist on the local machine. The Solaris installation program creates these files for you. In the file name, replace interface with the device name of the primary network interface. For more information about the /etc/hostname6.interface file, see "IPv6 Network Interface Configuration File".

/etc/nodename File

This file should contain one entry: the host name of the local machine. For example, on machine timbuktu, the file /etc/nodename would contain the entry timbuktu.

/etc/defaultdomain File

This file should contain one entry, the fully qualified domain name of the administrative domain to which the local host's network belongs. You can supply this name to the Solaris installation program or edit the file at a later date.

In Figure 4-1, the networks are part of the domain deserts.worldwide, which was classified as a .com domain. Therefore, /etc/defaultdomain should contain the entry deserts.worldwide.com. For more information on network domains, refer to System Administration Guide: Naming and Directory Services (DNS, NIS, and LDAP).

/etc/defaultrouter File

This file should contain an entry for each router that is directly connected to the network. The entry should be the name for the network interface that functions as a router between networks.

In Figure 4-1, the network interface le1 connects machine timbuktu with network 192.9.201. This interface has the unique name timbuktu-201. Thus, the machines on network 192.9.200 that are configured in local files mode have the name timbuktu-201 as the entry in /etc/defaultrouter.

hosts Database

The hosts database contains the IPv4 addresses and host names of machines on your network. If you use the NIS, NIS+, or DNS name services (or LDAP as a name service), the hosts database is maintained in a database that is designated for host information. For example, on a network that runs NIS+, the hosts database is maintained in the host table.

If you use local files for the name service, the hosts database is maintained in the /etc/inet/hosts file. This file contains the host names and IPv4 addresses of the primary network interface, other network interfaces that are attached to the machine, and any other network addresses that the machine must check for.


Note - For compatibility with BSD-based operating systems, the file /etc/hosts is a symbolic link to /etc/inet/hosts.


/etc/inet/hosts File Format

The /etc/inet/hosts file uses the basic syntax that follows. Refer to the hosts(4) man page for complete syntax information.

IPv4-address hostname [nicknames] [#comment]

IPv4-address contains the IPv4 address for each interface that the local host must recognize.

hostname contains the host name that is assigned to the machine at setup, plus the host names that are assigned to additional network interfaces that the local host must recognize.

[nickname] is an optional field that contains a nickname for the host.

[# comment] is an optional field for a comment.

 
 
 
  Previous   Contents   Next