Sun Microsystems Logo
Products and Services
 
Support and Training
 
 

Previous Previous     Contents     Index     Next Next

ProcedureHow 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.

Configuring Standard TCP/IP Services

Services such as telnet, ftp, and rlogin are started by the inetd daemon, which runs automatically at boot time. Refer to the inetd(1M) and inetd.conf(4) man pages.

In addition to the service definitions in the /etc/inetd.conf file, you can configure inetd by using the /etc/default/inetd file. For example, you can configure the logging of all incoming connections. You can also configure the use of the TCP Wrappers facility for access control.

ProcedureHow to Log the IP Addresses of All Incoming TCP Connections

  1. Become superuser.

  2. Turn logging on by editing the /etc/default/inetd file by adding the following line:

    ENABLE_CONNECTION_LOGGING=YES


    Note - If the previous line already exists with a comment symbol, then you can just delete the comment symbol.


  3. Kill the inetd daemon.

  4. Restart the inetd daemon.

See System Administration Guide: Naming and Directory Services (DNS, NIS, and LDAP) and System Administration Guide: Naming and Directory Services (FNS and NIS+) for further information on name services.

ProcedureHow to Use TCP Wrappers to Control Access to TCP Services

  1. Become superuser.

  2. Turn TCP Wrappers on by editing the /etc/default/inetd file by adding the following line.

    ENABLE_TCPWRAPPERS=YES


    Note - If the previous line already exists with a comment symbol, then you can just delete the comment symbol.


  3. Kill the inetd daemon.

  4. Restart the inetd daemon.

  5. Configure the TCP Wrappers access control policy as described in the hosts_access(4) man page.

Configuring Routers

TCP/IP's first requirement for a router is that the machine must have at least two network interfaces installed. If one of the network interfaces is not disabled, the router automatically "talks" to the RDISC and RIP protocols. These protocols monitor routers on the network and advertise the router to the hosts on the network.

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 Host for Local Files Mode. This configuration ensures that routers boot if the network configuration server is down. Remember that, unlike a host, a router has a minimum of two interfaces to configure.

Configuring Routers Task Map

Table 4-4 Configuring Routers Task Map

Task

Description

For Instructions, Go To ...

Configure a machine as a router

Involves creating hostname and hosts file and adding addresses

How to Configure a Machine as a Router

Select static routing on a host that is a network client

Involves adding an entry into the defaultrouter file

How to Select Static Routing on a Host That Is a Network Client

Select dynamic routing on a host that is a network client

Involves editing entries in the defaultrouter file

How to Select Dynamic Routing on a Host That Is a Network Client

Force a machine to be a router

Involves creating a gateways file

How to Force a Machine to Be a Router

Configuring Both Router Network Interfaces

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

ProcedureHow to Configure a Machine as a Router

  1. Become superuser on the machine to be configured as a router.

  2. Create an /etc/hostname.interface file for each network interface that is installed.

    For example, create hostname.ie0 and hostname.ie1. See /etc/hostname.interfaceFile for more information. If you are using IPv6, see IPv6 Network Interface Configuration File.

  3. In each file, type the host name you have selected for that interface.

    For example, you could type the name timbuktu in the file hostname.ie0, then type the name timbuktu-201 in the file hostname.ie1. Both interfaces would be located on the same machine.

  4. Type the host name and IP address of each interface into /etc/inet/hosts.

    For example:
    192.9.200.20     timbuktu       #interface for network 192.9.200
    192.9.201.20     timbuktu-201   #interface for network 192.9.201
    192.9.200.9      gobi
    192.9.200.10     mojave
    192.9.200.110    saltlake
    192.9.200.12     chilean

    The interfaces timbuktu and timbuktu-201 are on the same machine. Notice that the network address for timbuktu-201 is different from that of timbuktu. The difference exists because the medium for network 192.9.201 is connected to the timbuktu-201 network interface while the media for network 192.9.200 is connected to the timbuktu interface. If you are using IPv6, see /etc/inet/ipnodes File.

  5. If the router is connected to any subnetted network, edit /etc/inet/netmasks and type the local network number (129.9.0.0, for example) and associated netmask number (255.255.255.0, for example).

The startup script determines whether to start up a routing protocol (RIP or RDISC) on the machine or use static routing.

ProcedureHow to Select Static Routing on a Host That Is a Network Client

  1. Become superuser on the host.

  2. Add an entry for a router on the network into the /etc/defaultrouter file.

See /etc/defaultrouter File. A single static default route is then installed in the routing table. Under this condition, the host does not run any dynamic routing protocol (such as RIP and RDISC).

Previous Previous     Contents     Index     Next Next