# Data Networking/Fall 2014/Linux
## Team

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

## Motivation

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
### Domain Name System

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

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

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
### DHCP

Step1: Install DHCP server package Command:
Step2: Edit the isc-dhcp-server file Command:
On line 11 change: INTERFACES=”eth0” Save and Exit
Step3: Editing file /etc/dhcp/dhcpd.conf create backup /etc/dhcp/dhcpd.conf Command:
Login as root
Create configuration file dhcpd.conf:
Step4: Restart the DHCP server Command:

### Webserver

Step 1: Install Apache2 Webserver
Command:
Step 2: Check whether the web server is able to listen on port 80
Command:
Step 3: Restart the web server
Command:
Step 4: Develop a webpage for the server
Command: