7. Communication

To communicate, the following are some commands used:

  1. Remote connect
    1. rlogin (i.e. rlogin [host name of computer you want to connect to] –l [user name you want to use on host computer], i.e. rlogin mycomputer –l paul)
    2. rcp (remote copy protocol) rcp [host name of computer you want to connect to]:[source path of file you want to copy] [destination of file you copy] i.e. rcp mycomputer: /etc/hostname /export/home/mine
  2. FTP (File Transfer Protocol) – get or put are two commands used with FTP
  3. Telnet

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

  1. ifconfig
  2. ping
  3. 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 don’t 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:

  1. Activate port (i.e. ifconfig hme0)
  2. Edit /etc/hostname.[port] (i.e. /etc/hostname.hme0:2) there you will put the name you want for the port (i.e. joe, station1, etc)
  3. Edit /etc/inet.host (put the ip address and the name of what you named your port above)
  4. Edit /etc/resolv.conf (there you will put the domain and nameserver information) 9 you put what your provider is, and the router to get on the net)
  5. Edit /etc/nsswitch.conf (put hosts: nis+ dns) (you edit the “host” record to show that the computer looks to a DNS entry to find host)
  6. Edit /etc/defaultrouter (put the name of router that you put in /etc/inet/host)
  7. To make it apply do an add route

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