M01: Introduction to Operating Systems
TU1: Installing, configuring and exploiting a computer system
ASIX1-DAW1
Practical Exercise 3: Basic network configuration
26-10-2021

BASIC NETWORK CONFIGURATION

GENERAL CONDITIONS
1-
Deadline: 7-11-2021
2- Send your report attached to an e-mail with the following specifications:
     a) E-mail address:
cf(at)collados.org or jordi.binefa(at)fje.edu depending who is your teacher
    
b) File Name:
         b.1)
ASIX1: asix1_surname_name_m01tu01pr03.pdf and asix1_surname_name_m01tu01pr03.odt
         b.2) DAW1: daw1_surname_name_m01tu01pr03.pdf and daw1_surname_name_m01tu01pr03.odt
    
c) Subject:
         c.1)
ASIX1: asix1_surname_name_m01tu01pr03
         c.2) DAW1: daw1_surname_name_m01tu01pr03
3- Make this report individually.
4- Left, right, top and bottom margins: 2cm.
5- Character format: a) Font:Arial, b) Size: 10, c) Questions typeface: Bold, d) Answers typeface: Regular

DOCUMENTATION
1- Basic network concepts: https://www.dipolnet.com/what_is_the_ip_address_network_mask_gateway__bib538.htm
2- Private vs Public IP addresses: https://www.avast.com/c-ip-address-public-vs-private#gref
3- MAC (or hardware) address: https://slts.osu.edu/articles/whats-a-mac-address-and-how-do-i-find-it/

4- Linux ip command examples: https://www.cyberciti.biz/faq/linux-ip-command-examples-usage-syntax/

PRACTICAL EXERCISE


FIRST PART

1.- Explain the meaning of the following network parameters:
    a) MAC (or hardware) address
    a)
IP address
    b) Gateway/Router
    c) Primary and secondary DNS
    d) Interface. Interface identifiers and types.
    e) Configuration Method: Automatic (DHCP) vs Manual
2
.- Check and show clearly the following network parameters of the ethernet interface with Network Manager:
    a) Network Interface identifier
    b)
MAC
(or hardware) address of your network card
    c)
IP address of your computer
    d) IP address of your Gateway/Router
    e) IP addresses of your primary and secondary DNS
3.- Check the network configuration Method of your computer with Network Manager.
4.-
Check  the list of your system network interfaces identifiers and types.  Identify clearly the ethernet interface features and particularly the ethernet interface identifier. 
5.- Check the MAC (or hardware) address of your ethernet interface with ip command.
6.-
Check the IP address of your computer with ip
command.0
7.- Check the IP address of your Gateway/Router with ip command.
8.- Check the IP address of your DNS servers showing the contents of /etc/resolv.conf.
9.- Test your connectivity to:
    a)
Your system
    b) The Gateway/Router
    c) The primary and secondary DNS
    d)  www.google.com and www.collados.org.
    e) Explain the process for testing your connectivity. How do you know if you can get connection to a host?!!!!.
10.- Find out the IP address of www.google.com. How did you find out this information?
 

SECOND PART
1.- Disable the networking system  using Network Manager. Explain the process for disabling the networking system. Check if you are able to surf on Internet. What is the state of the network manager icon?
2.- Enable again your networking system using Network Manager. Explain the process for enabling again the networking system. Check if you are able to surf on Internet. What is the state of the network manager icon?
3.- Configure (take screenshots of each step) your ethernet interface using Network Manager, with the following specifications:
    a) Configuration method: Manual
    b) IP address: from 192.168.1.40 to 192.168.75 (A different IP for each student's computer. IP addresses will be assigned assigned by the teacher) and netmask /20 (or 255.255.240.0).
    c) IP address of your Router: 192.168.1.10
    d) Primary DNS: 80.58.0.33
    e) Secondary DNS: 8.8.8.8
4.- Show the network configuration of the ethernet interface with Network Manager.  
5.- Check 
the network configuration of the ethernet interface with  ip  and  showing the contents of /etc/resolv.conf.
6.-
Check your connectivity to www.google.com. Have you experienced any problem?. Why?
7.- Configure
(take screenshots of each step)  your  network interface using Network Manager with the Automatic (DHCP) configuration method again.
8.- Check again the network configuration of the ethernet interface with  ip  and  showing the contents of /etc/resolv.conf.
9.- Check your connectivity to www.google.com. Have you experienced any problem?. Why?

THIRD PART

1.- Log in the system as a root user. Install on your computer the following packages of sotfware: openssh-server, openssh-client and net-tools. Log out of your root account and become again a regular user.
2.-
Run the following command: systemctl  status  ssh. Check if the ssh server has been loaded and is running on your system.
3.- Check the IP address of your virtual machine with command ip.

4.-
Check connectivity with the virtual machine of a classmate.
5.- Connect your virtual machine to the virtual machine of the cIassmate using the ssh client. Follow these steps:

    a) Run the command:  ssh  username@ip_addres -p 22 where username is the username of the classmate in his/her virtual computer and ip_address is the ip address of his/her virtual machine.
    b) Answer yes to the question Are you sure you want to continue connecting (yes/no)?.
    c) Password --> Write your  username password
    d) Check that you have gained access to the classmate virtual machine.
6.- Ask to the classmate that he/she gains access to your virtual computer via ssh.
7.- Open a new terminal. Resize your terminal to full screen.
Log in the system as a root user. Run the command:  netstat  -atupn. Take and screenshot and show clearly:
     a) The connection established from your virtual computer to the classmate virtual computer
     b)
The connection established from the classmate virtual computer to your virtual computer
     c) State of your ssh server
8.- Close the connection to the classmate virtual machine running the command exit or logout.
Ask to your classmate that he/she logs out from your virtual computer via ssh.    
9.- Check that your connection with the virtual machine has been closed. Run the command:  netstat  -atupn. Take and screenshot and show clearly that the formerly established connections do not exist any longer.