7. Communication
To communicate, the following are some commands used:
Here is how the computer does a telnet (default port of 23), starting with the first action is goes to.
Telnet Process for UNIX |
||
Process for telneting | If there is a problem, UNIX will show | Possible reason |
Find /usr/bin/telnet | telnet:not found | Check your path, or command |
mycomputer is 192.168.0.24 | unknown host | Possible bad host database, or spelling |
I am 192.168.0.24 | not route to host | Try ifconfig or ping host |
Same network, no router needed | ||
Establish connection | Connection refused | Service may not be available on remote host |
Communicate |
There are 3 tools to assist in network administration
- ifconfig
- ping
- snoop
ifconfig is to interface configuration (change the settings of the configuration). ifconfig a shows all interfaces
lo0 puts you in a loop (loop interface). To make a virtual (make believe) network do an ifconfig [interface]:1 [ip address] up (i.e. ifconfig hme0:1 192.168.0.23 up) the : (colon) after the interface makes a virtual interface, can be any number you want
The ping command allows you to check the connection to an IP address. To ping type the command then the IP address (ping also works with other protocols). i.e. ping 192.168.0.24.
The snoop command allows you to monitor anything, such as pings. To see all pings going through your system, type snoop icmp, then you will see all pings.
To make your interface come up use the above way (except dont use the : (colon), use the interface name) -or- edit /etc/hostname.[configname] (i.e. /etc/hostname.hme0) In the hostname file you will give the interface a name, just put the name in the file. (i.e. mycomputer-2) And edit /etc/inet/hosts to include that name with the IP address of that interface (i.e. 192.168.0.25 mycomputer-2) Editing these files will cause the interface to come up.
To make sure that you are not a router (because if you have two interfaces up you become a router, even if they are virtual interfaces) create the file /etc/notrouter. A default router allows you to tell UNIX the way out of the network and how to get to the Internet. If you have one router on your network do edit /etc/default router, and put the name of the router in that file. (The name of the router needs to be in the host table, and the name of the router should be on your side of the router. This change will work on next reboot. To make the router work right away, do route add default [name of router] 1 + use dns.
These are the steps for setting up a node for connection to the network:
last gives who logged on last
who gives who is presently logged on to the system
Go to Chapter 6
Go to Index
Go to Chapter 8