| [Expand][PDF]
MOVING AROUND
Initially you will be in the top-level (/).
1 |
FInd out who you are with the who
am i command. |
| |
Who
are you, and what is your connection?
|
2 |
List the directory with the ls
command. |
| |
What
directories are avialable?
|
3 |
List the directory with the
ls -l command. |
| |
Outline
the attributes for some of the files?
|
4 |
Change the current directory to /bin
the cd bin command. |
| |
List
some of the programs in this directory.
|
5 |
Move back to the top-level with cd
.. or cd /. |
6 |
Move into other directories using the cd
command, and list their contents with ls. |
The key directories are /bin (where many of the
commands are stored), /etc (where many of the configuration
files are stored), /sbin (where extra networking
commands are stored), /usr (where the user files
are stored) and /dev (where the device drivers are
stored).
LOCATING IMPORTANT NETWORKING FILES
Search the directories and find the following files:
ifconfig, dhcpinfo,
inetd.conf, ls,
cd, mnttab, network,
services, hosts
and protocols.
CONFIGURING THE INTERFACE
The ifconfig command can be used
to view the network settings on the interface card.
1 |
Enter the ifconfig
command, and view the help page. |
2 |
Enter the ifconfig -a
command, and determine the network configuration |
| |
List
the network settings.
|
3 |
Enter the ping 110.11.2.3
command, and determine if the network is responding. |
3 |
Enter the ifconfig release eth0
command, and to release the IP address from
the interface. |
3 |
Enter the ping 110.11.2.3
command, and determine if the network is responding. |
4 |
Enter the ifconfig start eth0
command, and to re-gain the IP address for
the interface. |
4 |
Enter the ping 110.11.2.3
command, and determine if the network is responding. |
SHOWING THE ARP CACHE
The ARP table contains the mapping of IP addresses
to MAC addresses, on the local network.
1 |
Enter the arp
command, and determine the options used with
arp. |
2 |
Enter the arp -a command,
to show the current arp table |
| |
List
some of the MAC addresses and IP mappings.
|
SHOWING PROCESSES
The ps command can be used to
show currently running processes.
1 |
Enter the ps
command, and determine the currently running
processes for the user. |
2 |
Enter the ps -al command,
and all the running processes |
| |
List
some of the processes.
|
3 |
Enter the ps -ef command,
for a more complete list of running processes |
| |
List
some of the processes.
|
LISTING KEY NETWORK FILES
Many of the key network configuration files are
in the /etc directory.
1 |
Go to the /etc
directory. |
2 |
Enter the cat hosts command,
and determine its contents. |
| |
List
some the contents.
|
3 |
Enter the cat passwd command,
and determine its contents. |
| |
List
some the contents.
|
4 |
Enter the cat protocols
command, and determine its contents. |
| |
List
some the contents.
|
5 |
Enter the cat rpc command,
and determine its contents. |
| |
List
some the contents.
|
6 |
Enter the cat services
command, and determine its contents. |
| |
List
some the contents.
|
7 |
Enter the cat aliases
command, and determine its contents. |
| |
List
some the contents.
|
8 |
Enter the cat inetd.conf
command, and determine the Internet servers
which are started. |
| |
List
some the contents.
|
9 |
Enter the cat inittab
command, and determine the system initiatisation
events. |
| |
List
some the contents.
|
Showing open connections
As with Microsoft Windows, the netstat command
can be used to view the currently open ports.
1 |
Enter the netstat
command. |
| |
List
some of the open ports, for both the source
and the destination.
|
2 |
Enter the netstat -i command
to list information on the interfaces. |
| |
List
the information given.
|
3 |
Enter the netstat -nr
command to list the routing table. |
| |
List
the information given.
|
4 |
Enter the netstat -m command
to show the buffers. |
| |
List
the information given.
|
5 |
Enter the netstat -s command
to show protocol summaries. |
| |
List
the information given.
|
6 |
Enter the rpcinfo command
to show RPC information. |
| |
List
the information given.
|
6 |
Enter the rpcinfo -p command
to show RPC information. |
| |
List
the information given.
|
/usr/sbin
Many important commands are located in /usr/sbin
1 |
Go to the /usr/sbin
directory. |
2 |
Enter the ls command,
and determine its contents. |
| |
List
some the contents.
|
NDS configuration
Novell NDS is used in many large organisation networks,
and will often require to be linked with UNIX.
1 |
Go to the /etc
directory. |
2 |
Enter the cat nds.conf
command, and determine its contents. |
| |
List
some the contents.
|
File type display
The file command can be used to
determine the type of a file.
1 |
Go to the /etc
directory. |
2 |
Enter the file * command,
and determine the listing |
| |
List
some of the file types.
|
Netmasks and networks
The netmasks command can be used to setup the default
netmask
1 |
Go to the /etc
directory. |
2 |
Enter the cat netmasks
command, and determine the listing |
3 |
Enter the cat networks
command, and determine the listing |
FTP server
The inetd.conf file is used to start the FTP daemon
(in.ftpd).
1 |
Go into the /etc
directory, and list the inetd.conf
file.
Identify the line which runs the FTP server.
|
2 |
List the services file,
and determine the port which the FTP server
uses.
|
3 |
List the passwd file,
and identify that the ftp user exists (as
this allows anonymous FTP). |
4 |
List the ftpusers file.
This file contains the users who are not allowed
to FTP into the server. |
5 |
Change directory to the top-level, then
go into /usr and then into
the sbin directory.
Locate the tcpd and in.ftpd
programs (these are the FTP internet services). |
4 |
Use ps -ef, and identify
the FTP server daemon. |
6 |
Using cd ~ftp, go to
the default FTP directory.
List some of the folders and directories using
in this folder. |
TELNET server
The inetd.conf file is used to start the TELNET
daemon (in.telnetd).
1 |
Go into the /etc
directory, and list the inetd.conf
file.
Identify the line which runs the TELNET server.
|
2 |
List the services file,
and determine the port which the TELNET server
uses.
|
3 |
List the ftpusers file.
This file contains the users who are not allowed
to FTP into the server. |
4 |
Change directory to the top-level, then
go into /usr and then into
the sbin directory.
Locate the tcpd and in.telnetd
programs (these are the TELNET internet services). |
5 |
Use ps -ef, and identify
the TELNET server daemon. |
Drives mounted
UNIX allows drives to be mounted onto the local
file system.
6 |
Enter the nfsstat command
to show NFS information. |
| |
List
the information given.
|
6 |
Enter the df command to
show mounted systems. |
| |
List
the information given.
|
6 |
Enter the mount command
to show mounted systems. |
| |
List
the information given.
|
8 |
Go to /etc, and enter
the cat mnttab command, to
show the drives which were mounted automatically. |
| |
List
some the contents.
|
DHCP files
DHCP allows nodes to be allocated IP addresses
based on their MAC address. In a DHCP system, the
node broadcasts for a DHCP server. The server then
returns back:
- Client IP address (such as 152.10.6.1)
- Subnet mask (such as 255.255.255.0)
- Default router (such as 152.10.8.254)
- DNS domain name (such as mydomain.com)
- NIS domain name (such as fred.mydomain.com)
These are defined in the dhcptab file, such as:
mydomain m \
:Broadcst=152.10.7.255:Subnet=255.255.255.0:MTU=1500:
\
:Router=152.10.7.254:NISdmain=mydomain:NISservs=152.10.6.234:
\
:Timeserv=152.10.6.234:UTCoffst=0: \
:Message=Sample Message:Hostname: \
:SMTPserv=152.10.6.234:POP3serv=152.10.6.234: \
:DNSdmain=mydomain.com: \
:DNSserv=152.10.6.33 152.10.6.90
and the IP address is defined in the associated
network file (152_10_6_0), such
as:
03040014cc6184 01 152.10.6.1 152.10.6.30 -1 mydomain
fred
03040189b45004 01 152.10.6.2 152.10.6.30 -1 mydomain
bert
0304007c112fe3 01 152.10.6.3 152.10.6.30 -1 mydomain
martin
which will assign an address in the range 152.10.6.1
to 152.10.6.30 to the MAC addresses of 03040014cc6184,
03040189b45004 and 0304007c112fe3.
1 |
Go into the /var folder with
cd /var |
2 |
Go into the /var/dhcp folder with cd
dhcp |
| |
List
the files in this folder.
|
3 |
Enter the cat dhcptab
command, to list the contents of dhcptab |
| |
Outline
its contents
|
4 |
Enter the cat 152_10_6_0
command, to list the contents of 152_10_6_0.
This relates to the 152.10.6.0 subnet. |
| |
Outline
its contents. Which MAC addresses have been
registered?
|
5 |
Run dhcpconfig to start
the dhcp server. |
6 |
Enter the ps -ef command,
to list the running processes |
| |
Is
the in.dhcpd process running?
|
Other supported commands:
cat release
cat printers.conf
cat resolv.conf
cat vfstab
echo text
set - Show shell variables.
time
|