NETWORKING
TCP/IP: Classes 1st Octet Default Subnet Mask
A 1-126 255.0.0.0
B 128-191 255.255.0.0
C 192-223 255.255.255.0
(localhost 127.0.0.1)
TCP/IP Config Files:
/etc/inet/hosts contains hostnames & their IP addresses, must contain at least a localhost entry,
symbolically linked to /etc/hosts
/etc/nodename only one entry…the default hostname of the local system
/etc/hostname.interface only one entry….the hostname or IP address, this file exists for each type
interface installed on the system (hostname must exist in /etc/hosts to resolve to
an IP address)
hosts & services files in the /etc/net/ticlts, /etc/net/ticots, /etc/net/ticotsord
(Note: If you were going to change a hostname, all of the files noted above would require changes.)
Commands:
ifconfig –a to determine settings of all configured interfaces
snoop hostname hostname
shows network traffic between specified systems, can be used to hack passwords since
passwords display unencrypted in many cases (NIS+ uses encryption)
ping arg [hostname|ip_address]
sends ECHO_REQUEST datagrams to verify connectivity
example: ping –s host15 100 12
-s arg allows packet size (100) & count (12) to be specified
spray arg [hostname|ip_address]
sends User Data Packets to a host using RPC to verify connectivity
the remote system must be running sprayd for this command to work
-c count numb of packets to send (default = packets totaling up to 100K)
-d delay numb of miroseconds to pause btwn packets
-l length length of the Ethernet packet (default = 86)
-t type class of transport (default = UDP)
telnet {hostname|ip_address}
used to remotely log in to a system via the network, must provide userid
& password, interactive if no hostname or IP address is specified
rlogin [hostname|ip_address]
remotely log in to a system via the network, if authenticated – no
userid & password required, otherwise must provide userid & password,
Hostname or IP address is required
rcp filename host:path remote copy, copies file from the local system to the remote system
rsh command host remote shell, runs specified command on remote system
who displays information about users currently logged in
Username, Terminal, Login Time, Remote Hostname
finger arg {username username …| @hostname}
displays information about users currently logged in
Username, User’s Full Name, Terminal, Idle Time, Login Time, Remote Hostname
Can specify multiple users, or @hostname for users on a remote system
-l provides long listing, more detailed information
-H provides column headings
rusers arg hostname
displays users logged into the specified system
-l provides info like the who or finger commands
Used by rlogin, rsh, & rcp
/etc/host.equiv applies to system, lists hostnames preceded by + (trusted) or – (untrusted)
a single + makes all remote hosts trusted.
hostnames can be followed by a user account, in which case the user has access
as any user (will be prompted for userid if not provided with remote command)
$HOME/.rhosts applies to user accounts, lists hostnames preceded by + (trusted) or – (untrusted)
Step 1: When using rlogin, rsh, or rcp, the /etc/hosts.equiv file is checked to determine if the remote
host is trusted.
Ø If trusted (+hostname): the authentication continues
Ø If untrusted (-hostname): user is denied access
Ø If not listed: the user is prompted for a userid & password
Ø If trusted (+hostname userid): prompted for any userid
Step 2: Checks the user’s home directory to see if the remote host is listed and trusted.
Ø If trusted: user is granted access without provided userid & password
Ø If untrusted: user is denied access
Ø If not listed: the user is prompted for a userid & password
inetd listens on for requests for services that are not started at boot time, starts the processes
when the service is requested
/etc/services lists ‘well known ports’ (ports 0-255 are ‘well known’) that are reserved for a service
example: telnet 23/tcp
shows that the service telnet uses port 23 & TCP protocol
rpcbind registers port numbers with each RPC service listed in /etc/rpc file
receives client RPC-based requests and sends the client the server port number
rpcinfo -p hostname list registered programs in /etc/rpc file
-d programname version# unregisters the RPC program (stops the service)
pkill –HUP inetd sends Hangup signal to inetd to register RPC network services