Data Networking/Fall 2014/Linux

Team

edit

1. Anirudh Mittal
2. Raghav Surianarayanan
3. Shaurya Katiyar
4. Subramaniam Veerabahu

Motivation

edit

Linux Operating system has developed into a force in almost each and every networking application, which gives us the much required motivation to play around with the OS. Linux is one of the powerful open-source operating system. Linux OS is a key skill-set to possess for a successful career in networking. Hoping to develop a good proficiency in Linux, we have decided to approach this project.

Behavior of Protocols

edit

Domain Name System

edit

The main understanding involved in DNS is that it is used to resolve host name into IP address. When a particular website is typed in the address bar of the browser, DNS server finds out the corresponding IP address of the website and returns it to the user. Initially, a DNS query is made to the servers and the server replies back with a response about the IP address of the website. After the IP address is obtained, the host can be reachable to retrieve data from them. In order to reduce the latency, BIND9 server with caching can be used. The main advantage is that whenever a response is received for a DNS query, it is cached in the server. As a result, the time taken to load the previous cached page is considerably reduced, thereby decreasing the waiting time of the user to obtain the data from the webpage.

Dynamic Host Configuration Protocol

edit

Assigning IP addresses to the networking component can be done in the following ways.
i) Static Allocation: In this method, IP addresses to networking components like computers, routers etc. are assigned statically and remain constant until changed by the network administrator.
ii) Automatic Allocation: In this method, same IP addresses are allocated to the systems whenever it connects to a particular network.
iii) Dynamic Allocation: In this method, a DHCP server is used to allocate IP addresses to the devices, from a selected pool of addresses as specified in the DHCP server. Both IPv4 and IPv6 addressing can be provided using the DHCP server. A suitable subnet mask needs to be provided for correct allocation of IP addresses, to prevent the wastage of IP’s.

Webserver & Firewall

edit

In order to host a website, we need a webserver to run on the Linux OS. Apache2 is the most popularly used webserver. In addition, firewall is used to provide a layer of security to control the incoming and outgoing traffic in a network. All traffic other than the allowed set of rules made in the IP tables are denied by the firewall at the gateway router (router in between the private network and the public network). Requirements The main requirement is a Linux based OS. This project is being implemented using Ubuntu 14.04. In addition to this, BIND9 for implementing DNS caching, DHCP server for implement dynamic IP allocation and Apache2 server for hosting a website are required.

Installation Steps

edit

DHCP

edit

Step1: Install DHCP server package
Command:

               sudo apt-get install isc-dhcp-server

Step2: Edit the isc-dhcp-server file
Command:

               sudo nano /etc/default/isc-dhcp-server

On line 11 change:
INTERFACES=”eth0”
Save and Exit

Step3: Editing file /etc/dhcp/dhcpd.conf
create backup /etc/dhcp/dhcpd.conf
Command:

               sudo mv /etc/dhcp/dhcpd.conf /etc/dhcp/dhcpd.conf.original

Login as root

               sudo -i

Create configuration file dhcpd.conf:

                cat > /etc/dhcp/dhcpd.conf <<-EOF
option domain-name "linux.abc";
option domain-name-servers ns1.linux.abc,ns2.linux.abc;
default-lease-time 600;
max-lease-time 7200;
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.10 192.168.1.30,192.168.1.60 192.168.1.80 ;
option domain-name-servers 192.168.1.5, 192.168.1.6 ;
option domain-name "serv.linux.abc";
option routers 192.168.1.1;
option broadcast-address 192.168.1.255;

Step4: Restart the DHCP server
Command:

                sudo service isc-dhcp-server restart

Webserver

edit

Step 1: Install Apache2 Webserver
Command:

                sudo apt-get install apache2 

Step 2: Check whether the web server is able to listen on port 80
Command:

                netstat -a | more 

Step 3: Restart the web server
Command:

                sudo /etc/init.d/apache2 stop
sudo /etc/init.d/apache2 start

Step 4: Develop a webpage for the server
Command:

                cd /var/www
sudo nano index.html