Networking
CT320: Network and Systems Administration
                
Purpose
The purpose of this assignment is to experiment with the setup of
networking and network-based programs.
                
Part 1 — Clean Up
Make sure that your system has a manually configured IP address,
as described in the configuration lab.
                
Part 2 — Test Networking
Make sure you can access the Internet and Domain Name Service (DNS) with
these commands:
                
dig google.com
wget -qO- https://cs.colostate.edu/~ct320/alphabet.txt
If they don’t work, fix things.
                
Part 3 — Network File System (NFS)
Installation
Install the NFS server package:
                
sudo apt install nfs-kernel-server
Server
- Create a directory
/export
and populate it with
several directories and files.
- Export the file system by adding an entry to
/etc/exports
,
like this:
/export ip-address-of-neighbor(rw)
- Make sure that the
appropriate daemons are running and document their names.
- Restart the NFS service:
sudo systemctl restart nfs-server
- Verify that your neighbors can access the exported file system.
- Alter the
/etc/exports
line to look like this:
/export not-the-ip-address-of-neighbor(rw)
- Restart the NFS service.
- Verify that your neighbor cannot mount the driver,
then restore access.
Client
- Create a directory with the path name
/import
- Mount /
export
from their system to yours:
mount ip-address:/export /import
- Make sure you can browse the imported file system.
- Add an entry to
/etc/fstab
to automate the mounting of your
neighbor’s exported file system.
- Reboot and verify that you still have access to their files.
At this point you should be able to access your neighbor’s exported
file system and they should be able access to yours.
Part 4 — Secure Shell (SSH)
- Make sure that the
sshd
daemon is installed
on your neighbor’s computer:
sudo apt install openssh-server
- Use the
ssh
command to gain access to the ct320
account
on your neighbor system and have them do the same.
ssh neighbor-ip-address hostname
- Get out of ssh by typing
exit
.
- Don’t expect a name like
ct320-1
to work, since we have no DNS
server or /etc/hosts
translating those names into IP addresses.
- Use the
scp
command to copy files between the
systems, in each direction (push & pull).
- Create the file
/etc/ssh-warning
that contains a message
telling users to behave themselves.
- Use the
Banner
directive in the sshd
config file
to display /etc/ssh-warning
to remote users,
restart sshd
, and show that it works.
- Is
ssh
access equivalent functionality to the NFS exercise
in Part 3?
- What are the advantages or disadvantages or each method?
- How can you control
ssh
access,
without disabling the sshd
daemon?
Part 5 — Dynamic Host Configuration Protocol (DHCP)
See https://askubuntu.com/questions/140126/how-do-i-install-and-configure-a-dhcp-server
                
This is a group exercise for the entire recitation.
                
- Install the DHCP server on one system in the lab using this command:
sudo apt install isc-dhcp-server
- Edit
/etc/default/isc-dhcp-server
and set INTERFACES="eno0"
- The name of the interface varies—it may be
eno0
,
or sometimes eth0
.
- The first line of the
ip route
command should show your
gateway and interface name.
- Configure that DHCP server to allocate addresses starting with
192.168.110.85
.
- Comment out all the existing lines in
/etc/dhcp/dhcpd.conf
using #
and edit the configuration file as follows:
subnet 192.168.110.0 netmask 255.255.255.0 {
range 192.168.110.85 192.168.110.99; #the range of IP addresses that will be assigned
option routers 192.168.110.1; #the default gateway
option domain-name-servers 129.82.45.181; #the DNS server
option subnet-mask 255.255.255.0;
}
- Restart the DHCP server using this command:
sudo service isc-dhcp-server restart
- Bring up the DHCP server on this system
- On all the other systems, configure to use DHCP.
- Reboot all the other systems.
- Observe that an address of the form 192.168.110.85–99 is obtained.
- Restore the systems to their original static IP addresses
- Disable the DHCP server.
Part 6 — Credit
Show your work to the TA for credit.
                
Part 7 — Clean Up Again
- Restore
/etc/fstab
to its state before the lab.
- Restore
/etc/exports
to its state before the lab.
sudo apt remove openssh-server nfs-kernel-server