
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://www.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
/exportand 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/exportsline 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 /
exportfrom their system to yours:
mount ip-address:/export /import
- Make sure you can browse the imported file system.
- Add an entry to
/etc/fstabto 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
sshddaemon is installed on your neighbor’s computer:
sudo apt install openssh-server
- Use the
sshcommand to gain access to thect320account 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-1to work, since we have no DNS server or/etc/hoststranslating those names into IP addresses.
- Don’t expect a name like
- Use the
scpcommand to copy files between the systems, in each direction (push & pull). - Create the file
/etc/ssh-warningthat contains a message telling users to behave themselves. - Use the
Bannerdirective in thesshdconfig file to display/etc/ssh-warningto remote users, restartsshd, and show that it works. - Is
sshaccess equivalent functionality to the NFS exercise in Part 3? - What are the advantages or disadvantages or each method?
- How can you control
sshaccess, without disabling thesshddaemon?
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-serverand setINTERFACES="eno0"- The name of the interface varies—it may be
eno0, or sometimeseth0. - The first line of the
ip routecommand should show your gateway and interface name.
- The name of the interface varies—it may be
- Configure that DHCP server to allocate addresses starting with
192.168.110.85. - Comment out all the existing lines in
/etc/dhcp/dhcpd.confusing#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/fstabto its state before the lab. - Restore
/etc/exportsto its state before the lab. sudo apt remove openssh-server nfs-kernel-server