Using the Network Interface
Configuring Your SPARCbook for a TCP/IP Network
8-12
SPARCbook Portable Workstation User Guide
#
# Name Server Lookup
domain anyco.com
nameserver 192.3.4.10
The file could contain a list of several name servers, if required.
The
/etc/hosts
file is much simpler for the DNS client and need only
contain the hostname and IP address of your own system and the name
server. For example, the
/etc/hosts
for a machine attached to the
network in Figure 8-4 would be similar to the following:
#
# Internet host table
#
127.0.0.1 localhost
192.3.4.56
medoc loghost # my new SPARCbook
#
192.3.4.1
champagne
# DNS name server
Setting up a default router
Your SPARCbook is configured to use a router by creating the file
/etc/defaultrouter
containing the IP address of the router. For
example, the
/etc/defaultrouter
file for a machine attached to the
network in Figure 8-4 where champagne is the router would be similar
to the following:
# defaultrouter
192.3.4.10
Testing Your network connection
When all the necessary configuration files have been created and
correctly edited, your SPARCbook should be rebooted in order for the
changes to take effect and the network connection tested.
The simplest way to test connections is with the
ping
command. This
is a simple utility that will indicate if the connection is working and
whether or not the basic configuration is correct. The command syntax
is as follows:
# ping hostname
To use ping, you must be logged in as root. For example, to test
communications with a machine connected to the local network in
Figure 8-4, you might use the following command:
S3UG4_Book Page 12 Friday, August 8, 1997 11:37 am