# Data Networking/Fall 2016/APSS
## Team Members

1. Akshay Mahajan 2. Praveen Prakash 3. Sagar Raikar 4. Siddesh Shenoy

## Objective

To create a secure, reliable and dynamic network that can support multiple hosts.

## Behaviour of Protocols
### Domain Name System

DNS(Domain name system) server also called as name server, which implements network services for providing responses to queries against directory services i.e. It translates user supplied host name (web site) to IP addresses and vice versa and which contains a databases of network names and IP address. DNS process flow: DNS client running on the user host, request a server page, at first it needs a IP address of that web server which is processed by the DNS Server.
1)First the client sends a query with the given hostname to the DNS server 2)The DNS server receives the query from the client and maps it with the IP address 3)The DNS server sends the IP address to the DNS client operating at the user machine 4)Once the Host user receives the IP address, it can access the web server.

### Dynamic Host Configuration Protocol

DHCP referred to as Dynamic host configuration protocol. It is a client server protocol which assigns host with an IP address through a DHCP server. In general, DHCP automatically assigns IP address to new devices or to devices when moved from one subnet to another. DHCP server has as a pool of IP address and leases an address when it start up in the network and also has TCP/IP configuration parameters for all hosts on the network,that received IP address Assigning IP addresses to the networking component can be done in the following ways. Types of DHCP Allocation: 1) Automatic allocation - DHCP server assign permanent IP address to the client.
2) Dynamic allocation -DHCP server assigns IP address to the client only for a limited period of time. Automatic reuse of IP address is allowed.
3) Manual allocation -IP address Assigned by the network administrator and DHCP is used simply to convey the messages to the client.

### Webserver & Firewall

A Web server is a software responsible for accepting HTTP request from the client, which are know as web browser and serving them the HTTP responses We are using apache 2 webserver to host our website, we are using a firewall for providing security to the website.

### Backup

Backup is done to the webserver file to add redundancy to the fle and make it robust . All the files in the webserver are sent to the backup in a zipped format at a scheduled time Backup for the webserver data is achieved by using rsync and ssh protocols. Rsync is used to synchronize files between the webserver and the backup. Therefore whenever changes are made at the webserver the backup gets updated at the scheduled time. Ssh provides a secure channel to send and receive files by using end to end encryption and decryption. .

## Installation Steps
### DNS

Step 1: Update the package list(
Command:
Step 2: Install Bind9 for DNS server configuration
Command:
Step 3: Make virtual machine interface as static Command:
Add For IPv4 configuraiton
For IPv6 configuration face eth0 inet6 static address 2001:aaaa:1000:0000:0000:0000:0000:0007 netmask 64 gateway 2001:aaaa:1000:0000:0000:0000:0000:0001
Step 4: Configuring the forwarding addresses Command:
Step 5: Add ZONES TO THE ROOT FILES OF bind9 Command: sudo nano /etc/bind/named.conf.local
Step 6: Creating DNS forward Zone file
Command:
Step 7: Creating DNS reverse zone file
Command: sudo nano /etc/bind/db.192
Step 8: Adding name server in resolv.conf file Command: sudo nano /etc/resolv.conf
Step 9: Adding server addresses in hosts file Command: sudo nano /etc/hosts
Step 10: Commands to start/ restart/stop the DNS server
Command:
Step 11: Configuring named.conf.local file on slave
Command:
Step 12: Adding server addresses in hosts file for slave
Command: sudo nano /etc/hosts

### DHCP

Step1: Install ISC-DHCP server for DHCP configuration Command:
Step2: Configuring static address for IPv4 DHCP Command:
Step3: Setting range for IPv4 Command:
Step4: Setting up the interface Command:
Step4: Restart to set the configuration Command: sudo service networking restart sudo service isc-dhcp-server restart sudo ifdown eth0 sudo ifup eth0 Step5: Setting static IP address for IPv6 Command: sudo nano /etc/network/interfaces
Step6: Setting range for IPv6 address Command: sudo nano /etc/dhcp/dhcpd6.conf
Step7: Creating empty dhcpd6.lease file Command: sudo nano/var/lib/dhcp/dhcpd6.leases
Step8: Verifying the configuration Command: /usr/sbin/dhcpd -6 –d –cf /etc/dhcp/dhcpd6.conf eth0
Step9: Restarting to set the configuration Command: sudo service networking restart sudo service isc-dhcp-server restart sudo ifdown eth0 sudo ifup eth0

### Webserver

Step 1: Install Apache2 Webserver
Command:
Step 2: To create a HTML page for the Web server
Command:
Step 3: Restart the web server
Command:
Step 4: To test web server
Command:

### Backup

Step 1: Install rsync on both web server and backup machine
Step 2: Copy files from webserver to backup machine
Step 3: Generate a public and a private key for security
Step 4: Share the private and public key with the backup machine
Step 5: Zipping the .HTML file and sending the file automatically using crontab