Using the Network Interface
Configuring Your SPARCbook for a TCP/IP Network
8-10
SPARCbook Portable Workstation User Guide
configured as a router. A router controls the passage of data
packets between network segments and ensures the efficient
flow of data.
•
Reboot and test the system.
Assigning a hostname and IP address
Although you may have already assigned a hostname and IP address to
your system during initial system configuration, as discussed in Chapter
2, “Initial System Configuration”, you may need to change these details
from time to time because your SPARCbook is a mobile system and
may be connected to different networks at different locations. If this is
the case, you will need to consult the network administrator responsible
for all networks you wish to connect to.
ò
Simple Configuration Using ifconfig
The
ifconfig
command can be used to set the basic characteristics of
the network interface, the most important of which is to associate an IP
address with the interface. For example:
ifconfig le0 192.3.4.56 netmask 255.255.255.0 broadcast
192.3.4.255
ò
Configuring Your SPARCbook by Editing the Hosts Files
The
/etc/hosts
file traditionally contains the name-to-address
mapping for every host on the network, including the local host itself.
Whenever a new machine is added to the network, its own
/etc/hosts
file and the
/etc/hosts
file on each host already connected to the
network must be updated to allow them to communicate.
The initial configuration you carried out when you first powered your
SPARCbook on will have created an
/etc/hosts
file similar to the
following:
#
# Internet host table
#
127.0.0.1
localhost
192.3.4.56
medoc loghost
S3UG4_Book Page 10 Friday, August 8, 1997 11:37 am