- 论坛徽章:
- 0
|
How to configure a system to run on a network:
1. /etc/hosts
This file is used to resolve host name into IP
addresses. This file must be updated if no
naming service is being used.
This file should contain the IP and host name
of each system on the local network, including
any gateways or routers.
Example:
127.0.0.1 localhost
129.145.71.109 kishori loghost #this is the IP and host
#name for the local machine
129.145.71.110 sage #this is the IP and host
#name for a host on the network
2. #ifconfig -a
Be sure that both the loopback and network interface
are up and running.
Example:
lo0: flags=849<UP,LOOPBACK,RUNNING,MULTICAST>; mtu 8232
inet 127.0.0.1 netmask ff000000
le0: flags=863<UP,BROADCAST,NOTRAILERS,RUNNING,MULTICAST>; mtu 1500
inet 129.145.71.109 netmask ffffff00 broadcast 129.145.71.255
If the interface to the network is not up and running do the following:
#ifconfig le0 plumb
NOTE: The default may be hme0 (for most Ultra machines)
3. /etc/netmasks
This file should contain the netmasks. If you are using the
default netmasks and it appears in ifconfig -a, this file is
not necessary.
Example:
# The netmasks file associates Internet Protocol (IP) address
# masks with IP network numbers.
#
# network-number netmask
#
# Both the network-number and the netmasks are specified in
# "decimal dot" notation, e.g:
#
# 128.32.0.0 255.255.255.0
#
129.145.0.0 255.255.255.0
4. /etc/defaultrouter
If you want to define a default router include the router name in this
file.
5. /etc/hostname.le0 or /etc/hostname.hme0 (depending on you interface type)
This file should contain the name of the local host.
6. /etc/resolv.conf
If you are using dns this file should contain the
name of the domain and the IP address of the nameserver.
It is acceptable to list more than one nameserver (up to 4).
The nameservers will be consulted in the order listed.
Be careful this file is very sensitive to extra spaces and tabs.
Example:
domain support.Corp.Sun.Com
nameserver 129.150.254.2
7. /etc/nsswitch.conf
Check this file for the appropriate entries. If a naming
service is being used this file should reflect that.
8. It is a good idea to reboot the system at this point.
Check to see if the network is working by pinging other
machines both inside and outside of your network. |
|