Sun Microsystems, Inc.
spacerspacer
spacer www.sun.com docs.sun.com |
spacer
black dot
 
 
5.  TCP/IP (Reference) Network Databases and nsswitch.conf File Other Network Databases networks database  Previous   Contents   Next 
   
 

protocols Database

The protocols database lists the TCP/IP protocols that are installed on your system and their numbers. The Solaris installation program automatically creates the database. This file seldom requires any administration.

The protocols database contains the names of the TCP/IP protocols that are installed on the system. The protocols(4) man page describes the syntax of this database. An example of the /etc/inet/protocols file follows.


Example 5-9 /etc/inet/protocols File

#
# Internet (IP) protocols
#
ip    0   IP    # internet protocol, pseudo protocol number
icmp  1   ICMP  # internet control message protocol
tcp   6   TCP   # transmission control protocol
udp  17   UDP   # user datagram protocol

services Database

The services database lists the names of TCP and UDP services and their well-known port numbers. This database is used by programs that call network services. The Solaris installation automatically creates the services database. Generally, this database does not require any administration.

The services(4) man page contains complete syntax information. An excerpt from a typical /etc/inet/services file follows.


Example 5-10 /etc/inet/services File

#
# Network services
#
echo      7/udp
echo      7/tcp
discard   9/udp     sink null
discard   11/tcp
daytime   13/udp
daytime   13/tcp
netstat   15/tcp
ftp-data  20/tcp
ftp       21/tcp
telnet    23/tcp
time      37/tcp    timeserver
time      37/udp    timeserver
name      42/udp    nameserver
whois     43/tcp    nickname

Booting Processes


Note - The names of startup scripts might change from one release to another.


  1. You start the operating system on a host.

  2. The kernel runs /sbin/init, as part of the booting process.

  3. /sbin/init runs the /etc/rcS.d/S30rootusr.sh. startup script.

  4. The script runs a number of system startup tasks, including the establishment of the minimum host and network configurations for diskless and dataless operations. /etc/rcS.d/S30rootusr.sh also mounts the /usr file system.

    1. If the local database files contain the required configuration information (host name and IP address), the script uses it.

    2. If the information is not available in local host configuration files, /etc/rcS.d/S30rootusr.sh uses RARP to acquire the host's IP address.

  5. If the local files contain domain name, host name, and default router address, the machine uses them. If the configuration information is not in local files, then the system uses the Bootparams protocol to acquire the host name, domain name, and default router address. Note that the required information must be available on a network configuration server that is located on the same network as the host. This requirement is necessary because no internetwork communications exist at this point.

  6. After /etc/rcS/S30rootusr.sh completes its tasks and several other boot procedures have executed, /etc/rc2.d/S69inet runs. This script executes startup tasks that must be completed before the name services (NIS, NIS+, or DNS) can start. These tasks include configuring the IP routing and setting the domain name.

  7. At completion of the S69inet tasks, /etc/rc2.d/S71rpc runs. This script starts the NIS, NIS+, or DNS name service.

  8. After /etc/rc2.d/S71 runs, /etc/rc2.d/S72inetsvc runs. This script starts up services that depend on the presence of the name services. S72inetsvc also starts the daemon inetd, which manages user services such as telnet.

See System Administration Guide: Basic Administration for a complete description of the booting process.

Routing Protocols

Solaris system software supports two routing protocols: Routing Information Protocol (RIP) and ICMP Router Discovery (RDISC). RIP and RDISC are both standard TCP/IP protocols.

Routing Information Protocol (RIP)

RIP is implemented by in.routed, the routing daemon, which automatically starts when the machine boots. When run on a router with the s option specified, in.routed fills the kernel routing table with a route to every reachable network and advertises "reachability" through all network interfaces.

When run on a host with the q option specified, in.routed extracts routing information but does not advertise reachability. On hosts, routing information can be extracted in two ways:

  • Do not specify the S flag (capital "S": "Space-saving mode"). in.routed builds a full routing table exactly as it does on a router.

  • Specify the S flag. in.routed creates a minimal kernel table, containing a single default route for each available router.

ICMP Router Discovery (RDISC) Protocol

Hosts use RDISC to obtain routing information from routers. Thus, when hosts are running RDISC, routers must also run another protocol, such as RIP, in order to exchange router information.

RDISC is implemented by in.rdisc, which should run on both routers and hosts. Normally, when in.rdisc runs on a host, in.rdisc enters a default route for each router that is also running in.rdisc. A host that is running in.rdisc cannot discover routers that are running only RIP. Furthermore, when routers are running in.rdisc (rather than in.routed), they can be configured to have a different preference, which causes hosts to select a better router. See the rdisc(1M) man page.

How a Machine Determines if It Is a Router

The /etc/rc2.d/S69inet startup script, which runs when the machine boots, determines whether a machine is a router or a host. This decision also determines whether the routing protocols (RIP and RDISC) should run in router mode or host mode.

The /etc/rc2.d/S69inet script concludes that a machine is a router if the following two conditions exist:

  • More than one /etc/hostname.interface file exists.

  • More than one interface was configured "up" by the ifconfig command. See the ifconfig(1M) man page.

If only one interface is found, the script concludes that the machine is a host. See "Configuring Both Router Network Interfaces". An interface that is configured by any means other than an /etc/hostname.interface file is not considered.

 
 
 
  Previous   Contents   Next