|
network_manual_setup(7)
Contents
|
network_manual_setup - Describes how to manually set up
the network
Setting up the network manually includes the following
tasks: Configuring the network interfaces Optionally,
enabling the following network daemons: rwhod routed gated
writesrv Optionally, setting up a router Optionally, setting
up static routes Adding hosts to the /etc/hosts file
Optionally, adding hosts to the /etc/hosts.equiv file
Optionally, adding network names to the /etc/networks file
Starting the network
CONFIGURING NETWORK INTERFACES [Toc] [Back] Use the following procedure to configure the network
interfaces on your system: Check to see if the host name
is set for your system by entering the following command:
# /sbin/hostname
If your system does not have a host name, set it by
using the rcmgr command to modify the HOSTNAME in
the /etc/rc.config file. For example, to set your
host name to zzanny, you would enter the following
command:
# /usr/sbin/rcmgr set HOSTNAME zzanny Set the number
of network interfaces you want to configure on
your system by using the rcmgr command to modify
the NUM_NETCONFIG in the /etc/rc.config file. For
example, if you wanted to configure two interfaces
on your system, you would enter the following command:
# /usr/sbin/rcmgr set NUM_NETCONFIG 2 The maximum
number of network devices you can have in your
hardware configuration is system dependent. Set
the value of MAX_NETDEVS to this maximum in the
/etc/rc.config file by using the rcmgr command. For
example, if your hardware can support a maximum of
24 network devices, enter the following command:
# /usr/sbin/rcmgr set MAX_NETDEVS 24
Note
The maximum number of network devices currently
supported by netsetup is 24. There is one NETDEV_n
entry in the /etc/rc.config file for each network
device you want to configure on your system. Set
the name of the network device you want to configure
by using the rcmgr command to modify the NETDEV_n
entry in the /etc/rc.config file. This command
has the following syntax: /usr/sbin/rcmgr set
NETDEV_n device
The value of n can be from 0 to 1 less than the
value of MAX_NETDEVS. The device parameter specifies
the name of the network device on your system
(for example ln0, fza0). The /etc/rc.config file
contains a pair of NETDEV_n and IFCONFIG_n entries
for each network device that you configure on your
system.
The IFCONFIG_n entry defines the ifconfig command
parameters for the corresponding NETDEV_n device.
Set the ifconfig command parameters for the corresponding
NETDEV_n device by using the rcmgr command
to modify IFCONFIG_n in the /etc/rc.config file.
Enclose the parameters in double quotation marks
and separate each field with a space. The syntax
of this command varies depending on the type of
network device you are configuring: If you are configuring
an Ethernet device, the syntax is as follows:
/usr/sbin/rcmgr set IFCONFIG_n "address netmask
mask parameters"
The parameters are as follows: Is a number from 0
to 1 less than the value of MAX_NETDEVS. For example,
set IFCONFIG_0 to the ifconfig parameters for
device NETDEV_0. Is the IP address of the NETDEV_n
device. The address parameter can alternatively be
the host name. Is a keyword indicating that the
following string identifies the network mask. Is
the network mask. Are optional, additional ifconfig
parameters. For example, you might want to
specify no trailers or a different broadcast
address. Additional parameters that you specify are
dependent on your network configuration. If you
have no additional parameters, omit them from the
rcmgr command that sets IFCONFIG_n. If you are
configuring a SLIP device, the syntax is as follows:
/usr/sbin/rcmgr set IFCONFIG_n "address rem_address
netmask mask parameters"
The parameters are the same as the Ethernet device
with the addition of the rem_address parameter,
which is the IP address of the remote SLIP interface.
If you are configuring a Token Ring device,
the syntax is as follows:
/usr/sbin/rcmgr set IFCONFIG_n "address netmask
mask speed number parameters"
The parameters are the same as the Ethernet device
with the addition of the speed and number parameters:
Is a keyword indicating that the following
number defines the speed of the Token Ring adapter.
Is the speed of the Token Ring adapter. The speed
can be either 4Mb or 16Mb. The default speed is
16Mb.
See the ifconfig(8) reference page for more information.
If your system has more than one network interface,
repeat steps 4 and 5 for the other network interfaces
on your system. For SLIP interfaces, there
is a SLIPTTY_n in the /etc/rc.config file for each
NETDEV_n SLIP device entry that you configure on
your system.
The SLIPTTY_n entry defines the slattach command
parameters for the corresponding NETDEV_n and
IFCONFIG_n entries. Set the slattach command
parameters by using the rcmgr command to modify
SLIPTTY_n in the /etc/rc.config file. This command
has the following syntax:
/usr/sbin/rcmgr set SLIPTTY_n "flags ttyname baudrate"
The parameters are as follows: Is a number from 0
to 1 less than the value MAX_NETDEVS. For example,
set SLIPTTY_2 to the slattach parameters for SLIP
device NETDEV_2. Are optional slattach parameters.
For example, you might want to enable TCP header
compression. If you do not want any flags, omit
them from the rcmgr command that sets SLIPTTY_n.
Is the name of any valid terminal device in the
/dev directory. This can be either the full path
name (for example, /dev/tty01) or the name in the
/dev directory (for example, tty01). Is the speed
of the connection. The default speed is 9600 baud.
See slattach(8) for more information. Add an entry
in the /etc/hosts file for your host, using the
procedure in the Network Administration: Connections
manual.
If your system has more than one network interface,
each interface might or might not have a name. Add
an entry to the /etc/hosts file for each interface
on your system that has a name, using the procedure
in the Adding Hosts to the /etc/hosts File section
in this reference page. Optionally, enable network
daemons, set up a router, add static routes, or add
entries to network configuration files by using the
procedures in the corresponding sections of this
reference page. Start the network, using the procedure
in the Starting the Network section in this
reference page.
See the Related Information section in this reference
page for more network configuration information.
ENABLING AND DISABLING NETWORK DAEMONS [Toc] [Back] This section explains how to enable and disable the following
network daemons: rwhod routed gated writesrv
You can choose to run either the routed or the gated daemon;
however, you cannot run both.
Running the rwhod Daemon [Toc] [Back]
The rwhod daemon maintains the database used by the rwho
and ruptime commands. Running the rwhod daemon is
optional; however, it must be running to use these commands.
Starting and Enabling the rwhod Daemon [Toc] [Back]
To start the rwhod daemon, perform the following steps: If
the network is started, check to see if the rwhod daemon
is running by issuing the following command:
# /bin/ps ax | grep rwhod If the network is started
and the rwhod daemon is not running, enter the following
command to start the rwhod daemon in the
background:
# /usr/sbin/rwhod
If you enable the rwhod daemon, it is started automatically
by the /sbin/init.d/rwho script each time the network
is restarted or the system is rebooted. Use the rcmgr
command to modify the entry for the rwhod daemon in the
/etc/rc.config file:
# /usr/sbin/rcmgr set RWHOD yes
Stopping and Disabling the rwhod Daemon [Toc] [Back]
To stop the rwhod daemon, perform the following steps:
Check to see if the rwhod daemon is running by issuing the
following command:
# /bin/ps ax | grep rwhod If the rwhod daemon is
running, kill the process by issuing the /bin/kill
command with the process ID (PID) for the daemon
obtained by using the /bin/ps command.
If you disable the rwhod daemon, it is not started automatically
by the /sbin/init.d/rwho script each time you
restart the network or reboot the system. Use the following
rcmgr command to disable the rwhod daemon in the
/etc/rc.config file:
# /usr/sbin/rcmgr set RWHOD no
For more information, see rwhod(8).
Running the routed Daemon [Toc] [Back]
The routed daemon automatically updates the internal routing
tables in your host. It does this by using the Routing
Information Protocol (RIP). Running the routed daemon
is optional.
Note
You cannot run both the routed daemon and the gated daemon
on your system.
Starting and Enabling the routed Daemon [Toc] [Back]
To start the routed daemon on your system, perform the
following steps: If the network is started, check to see
whether the routed daemon is running by issuing the following
command:
# /bin/ps ax | grep routed If you want to add
static routes, use the procedure in the Adding
Static Routes section in this reference page. If
the network is started and the routed daemon is not
running, you can start the routed daemon with or
without flags.
To start the routed daemon without flags, enter the
following command:
# /usr/sbin/routed
To start the routed daemon with flags, include the
flags in the command line, separating each flag
with a space. For example, the following command
starts the routed daemon with the -s flag, which
causes the routed daemon to supply RIP information
even if it is not functioning as an Internet
router:
# /usr/sbin/routed -s
For more information, see routed(8).
If you enable the routed daemon, it is started automatically
by the /sbin/init.d/route script each time the network
is restarted or the system is rebooted. To enable the
routed daemon, perform the following steps: Use the following
rcmgr command to enable the routed daemon:
# /usr/sbin/rcmgr set ROUTED yes Check to see if
the routed daemon flags are set in /etc/rc.config,
by using the following rcmgr command:
# /usr/sbin/rcmgr get ROUTED_FLAGS
If flags are set and you do not want any routed
daemon flags, reset the flags in /etc/rc.config, by
using the following rcmgr command:
# /usr/sbin/rcmgr set ROUTED_FLAGS
If you want to change the routed daemon flags,
reset the flags in /etc/rc.config, by using the
rcmgr command. Enclose the flags in double quotation
marks and separate each flag with a space.
See the routed(8) reference page for more information.
Stopping and Disabling the routed Daemon [Toc] [Back]
To stop the routed daemon, perform the following steps:
Check to see if the routed daemon is running by issuing
the following command:
# /bin/ps ax | grep routed If the routed daemon is
running, kill the process by issuing the /bin/kill
command with the process ID (PID) for the daemon
obtained by using the /bin/ps command.
If you disable the routed daemon, it is not started automatically
by the /sbin/init.d/route script each time you
restart the network or reboot the system. To disable the
routed daemon, perform the following steps: Use the following
rcmgr command to disable the routed daemon:
# /usr/sbin/rcmgr set ROUTED no If the routed daemon
flags are set, you can reset the flags in the
/etc/rc.config file by issuing the following rcmgr
command:
# /usr/sbin/rcmgr set ROUTED_FLAGS
See the routed(8) reference page for more information.
Running the gated Daemon [Toc] [Back]
The gated daemon automatically updates the internal routing
tables in your host. It can do this using multiple
routing protocols. Running the gated daemon is optional.
Note
You cannot run both the routed daemon and the gated daemon
on your system.
Starting and Enabling the gated Daemon [Toc] [Back]
To start the gated daemon, perform the following steps: If
the network is started, check to see whether the gated
daemon is running by issuing the following command:
# /bin/ps ax | grep gated The /etc/gated.conf file
contains configuration information that is read by
the gated daemon. If the /etc/gated.conf file does
not exist, set it up in the format specified in the
gated.conf(4) reference page.
If the /etc/gated.conf file exists, you can modify
it if needed.
If the gated daemon is running when you modify the
/etc/gated.conf file, the gated daemon detects the
changes and they take effect immediately. Otherwise,
the changes take effect when you manually
start the gated daemon. If you want to add static
routes, use the procedure in the Adding Static
Routes section in this reference page. If the network
is started and the gated daemon is not running,
you can start it with or without flags.
To start the gated daemon without flags, issue the
following command:
# /usr/sbin/gated
To start the gated daemon with flags, include the
flags in the command line, separating each flag
with a space. For example, the following command
starts the gated daemon with the -r flag, which
causes the gated daemon to log all routing changes:
# /usr/sbin/gated -r
For more information, see the gated(8) reference
page.
If you enable the gated daemon, it is started automatically
by the /sbin/init.d/gateway script each time the
network is restarted or the system is rebooted. To enable
the gated daemon, perform the following steps: Use the
following rcmgr command to enable the gated daemon:
# /usr/sbin/rcmgr set GATED yes Check to see if the
gated daemon flags are set in the /etc/rc.config
file by using the following rcmgr command:
# /usr/sbin/rcmgr get GATED_FLAGS
If flags are set and you do not want any gated daemon
flags, reset the flags in the /etc/rc.config
file by using the following rcmgr command:
# /usr/sbin/rcmgr set GATED_FLAGS
If you want to change the gated daemon flags, reset
the flags in the /etc/rc.config file by using the
rcmgr command. Enclose the flags in double quotation
marks and separate each flag with a space.
See the gated(8) reference page for more information.
Stopping and Disabling the gated Daemon [Toc] [Back]
To stop the gated daemon, perform the following steps:
Check to see if the gated daemon is running by issuing the
following command:
# /bin/ps ax | grep gated If the gated daemon is
running, kill the process by issuing the /bin/kill
command with the process ID (PID) for the daemon
obtained by using the /bin/ps command.
If you disable the gated daemon, it is not started automatically
by the /sbin/init.d/gateway script each time you
restart the network or reboot the system. To disable the
gated daemon, perform the following steps: Use the following
rcmgr command to disable the gated daemon:
# /usr/sbin/rcmgr set GATED no If gated daemon
flags are set, you can reset the flags in the
/etc/rc.config file by using the following rcmgr
command:
# /usr/sbin/rcmgr set GATED_FLAGS
See the gated(8) reference page for more information.
Running the writesrv Daemon [Toc] [Back]
The writesrv daemon receives remote write command
requests. Running writesrv is optional; however, it must
be running to use the following options with the write
command: -h -q -r
Starting and Enabling the writesrv Daemon [Toc] [Back]
To start the writesrv daemon, perform the following steps:
If the network is started, check to see if the writesrv
daemon is running by issuing the following command:
# /bin/ps ax | grep writesrv If the network is
started and the writesrv daemon is not running,
enter the following command to start the writesrv
daemon in the background:
# /usr/sbin/writesrv
If you enable the writesrv daemon, it is started automatically
by the /sbin/init.d/write script each time the network
is restarted or the system is rebooted. Use the rcmgr
command to modify the entry for the writesrv daemon in the
/etc/rc.config file:
# /usr/sbin/rcmgr set WRITESRV yes
Stopping and Disabling the writesrv Daemon [Toc] [Back]
To stop the writesrv daemon, perform the following steps:
Check to see if the writesrv daemon is running by issuing
the following command:
# /bin/ps ax | grep writesrv If the writesrv daemon
is running, kill the process by issuing the
/bin/kill command with the process ID (PID) for the
daemon obtained by using the /bin/ps command.
If you disable the writesrv daemon, it is not started
automatically by the /sbin/init.d/write script each time
you restart the network or reboot the system. Use the following
rcmgr command to disable the writesrv daemon in the
/etc/rc.config file:
# /usr/sbin/rcmgr set WRITESRV no
For more information, see the writesrv(8) reference page.
SETTING UP AN IP ROUTER [Toc] [Back] An IP router (also called a gateway) connects two or more
local area networks (LANs). A router allows data to be
transferred between systems on the networks to which it is
connected.
To set up an IP router, perform the following steps: Configure
the network interfaces on your system by using the
procedure in the Configuring Network Interfaces section in
this reference page. Set the global variables ipforwarding
and ipgateway in the running kernel by issuing the
following command:
# /usr/sbin/iprsetup -s Set the value of ROUTER in
the /etc/rc.config file to indicate that your system
is set up as an IP router by issuing the following
rcmgr command:
# /usr/sbin/rcmgr set ROUTER yes
If the network is started, you can use the /usr/sbin/route
command to add a route immediately. The format of the
/usr/sbin/route command is as follows:
/usr/sbin/route add {--net | --host destination --interface
gateway
Specifies the destination is a network. Specifies the
destination is a host. Specifies the name or IP address
of the destination host or network. Specifies the keyword
default when adding a default gateway. Optionally, specifies
that the route is through an interface. Specifies
the name or IP address of the gateway or interface.
See the route(8) reference page for more information.
A route that you add with the /usr/sbin/route command is
in effect until you reboot the system, restart the network,
or issue the /usr/sbin/route flush command. If you
want the route to be established each time you reboot the
system or restart the network, you must add an entry to
the /etc/routes file. When the network restarts, the
/sbin/init.d/route script runs and executes the
/usr/sbin/route add command for each entry in the
/etc/routes file.
The format for an entry in the /etc/routes file is
described in routes(4).
ADDING HOSTS TO THE /ETC/HOSTS FILE
The /etc/hosts file contains the names and addresses of
other hosts on your network to which you want to connect.
If your network currently uses or will be set up to use
either the Network Information Service (NIS, formerly YP)
or the Berkeley Internet Name Domain (BIND) service to
distribute host information, you do not need a complete
listing of all hosts on your network in your /etc/hosts
file. However, you should include the names and addresses
of hosts that are (or will be) designated as servers for
those services.
The format of an entry in the /etc/hosts file is as follows:
IP_address host1 alias_1 ... alias_n # comment
The following is a sample /etc/hosts file:
# @(#n)hosts 1.0 # # Description: The hosts file associates
host names with # IP addresses. # #
Syntax: nnn.nnn.nnn.nnn hostname.domain.name
[alias_1,...,\ # alias_n] [#comments] # #
nnn.nnn.nnn.nnn The IP address of the host. # hostname.domain.name
The fully qualified host name, including
# the domain name. # alias_n
Other names or abbreviations for this host. # #comments
Text following the comment character (#) #
is ignored. # 127.0.0.1 localhost 120.105.5.1
host1.cities.dec.com h1 120.105.5.2 host2.cities.dec.com
h2 120.105.5.3 host3.cities.dec.com h3 #BIND server
120.105.5.4 host4.cities.dec.com h4 #BIND server
120.105.5.5 host5.cities.dec.com h5
See the hosts(4) reference page for more information.
Note
If you change the IP address or host name in the
/etc/hosts file associated with any network interfaces you
have configured, you might need to change the IP address
or host name on the corresponding IFCONFIG_n line in the
/etc/rc.config file.
ADDING HOSTS TO THE /ETC/HOSTS.EQUIV FILE
Users on a host specified in the /etc/hosts.equiv file can
log in to your system without password verification, if
they have a valid account on your system. You can restrict
access to your system without password verification to
specific users by specifying a host and a user name in the
/etc/hosts.equiv file.
The format of the /etc/hosts.equiv file is as follows:
host1 host2 user1
The following is a sample /etc/hosts.equiv file:
# @(#)hosts.equiv 1.0 # # Description: The hosts.equiv
file contains a list of # trusted hosts. #
# Warning: Listing hosts in this file can compromise system
# security. Include host names and user
names in # this file with caution. # # Syntax:
host1 [username] # # host1 Name of a host considered
trusted by the # local system. #
[username] Individual user who can log in to the local
# system without supplying a password. #
host1 host2 diane host2 charlotte host2 kate
In the preceding example, all users with accounts on host1
can log in to the local system without specifying a password.
Users diane, charlotte, and kate on host2 can log in
to the local system without specifying a password. For
more information on the /etc/hosts.equiv file, see the
hosts.equiv(4) reference page.
ADDING NETWORK NAMES TO THE /ETC/NETWORKS FILE
The /etc/networks file allows the netstat command to
translate network numbers into network names. If you do
not enter network names into the /etc/networks file, the
netstat command displays network numbers instead of network
names. Entries in the /etc/networks file have the
following format:
name number alias_1 ... alias_n # comment
The following is a sample /etc/networks file:
# @(#)networks 1.0 # # Description: The networks file
lists the known networks in the # Internet. # #
Syntax: network_name network_number [ alias_1 ... alias_n
] [ #comment ] # # network_name Name of the network supplied
by the network # administrator. # network_number
Network number assigned to the network by the
NIC. # alias_n One or more other names or abbreviations
for this network. # #comments Text following the
comment character (#) is ignored. # loop 127 loopback
ethernet1 98 doconet ethernet2 100 devonet
See the networks(4) reference page for more information.
Note
If your network is running NIS, the networks database is
distributed. If the networks database is distributed, you
must edit the master copy of the networks database in the
/var/yp/src directory on the NIS master servers and remake
the maps for it. For information about updating and remaking
NIS maps, see the Network Administration: Services
manual.
After you set up the network, you can start the network by
using the rcinet command.
If the network is stopped, start the network by entering
the following command:
# /usr/sbin/rcinet start
If the network is already started, warn the network users
on your system in advance that the network on your system
is being restarted. File systems that were not mounted
using the /etc/fstab file or the automount command must be
unmounted with the unmount command (see the mount(8) reference
page). You must remount these file systems after
the network is restarted.
Restart the network by entering the following command:
# /usr/sbin/rcinet restart
See the rcinet(8) reference page for more information.
Alternatively, you can start the network by rebooting the
system with the following command:
# shutdown -r now
The -r option specifies an automatic reboot.
gated(8), ifconfig(8), netconfig(8), netstat(1), slattach(8), routes(4), and routed(8)
Network Administration: Connections, Network Administration:
Services
network_manual_setup(7)
[ Back ] |