Sunday, 27 April 2014

CONFIGURE DNS SERVER ON CISCO ROUTER

How To Configure DNS Server On A Cisco Router?
The DNS protocol is used to resolve FQDN (Fully Qualified Domain Names) to IP addresses around the world. This allows us to successfully find and connect to Internet websites and services no matter where they are. Its usefulness, however, doesn't stop there: local company and private networks also rely on DNS to operate efficiently and correctly.

In many cases, where a local DNS server is not available, we are forced to either use our ISP's DNS servers or some public DNS server, however, this can sometimes prove troublesome. Today, small low-end routers have the ability to integrate DNS functionality, making life easier, but so do Cisco routers - they simply have to be setup and you're done.

We will show you how to configure your Cisco router to provide DNS services to your network, and make all clients use it as a DNS server. Our easy to follow step-by-step process ensures you'll understand the process and have it running within minutes.

Example Scenario
Consider the following network diagram. This is our example network, we'd like to enable the DNS Service so our workstations can properly resolve Internet domains but also local network names.

First step is to enable the DNS service and domain lookup on the router:
R1# configure terminal
R1(config)# ip dns server
R1(config)# ip domain-lookup

Next, we need to configure the router with a public name-server, this will force the router to perform recursive DNS lookups, in other words, for every request it receives from our workstations the router will try to find the answer by asking as many DNS servers it needs, and finally return with an answer:
R1(config)# ip name-server 4.2.2.5
R1(config)# ip name-server 4.2.2.6

The Cisco IOS will allow you to enter up to 6 different name servers (essentially DNS servers). Usually you would use your ISP's DNS server to ensure you have quick responses, then place a few free public DNS servers such as the ones above. This will ensure that you'll get a DNS response from either your ISP or public DNS servers.

Next step is to configure your DNS server with the host names of your local network, this way when Alan's PC trys to ping or connect to Wayne, the router will successfully resolve its netbios name to the appropriate IP address:
R1(config)# ip host alan 192.168.1.10
R1(config)# ip host john 192.168.1.11
R1(config)# ip host wayne 192.168.1.12

If you now try to ping 'wayne' directly from your router's CLI prompt, you should receive an answer:
R1# ping wayne

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.12, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/4 ms

DIFFERENCE BETWEEN TCP AND UDP

TCP vs UDP
The flow of traffic across the Internet is on the basis of protocols which are TCP (Transmission Control Protocol) and UDP (User Datagram Protocol).
While TCP is more popular across the Internet, the UDP cannot be rendered completely redundant. TCP allows error correction but UDP does not. In the case of TCP, there is a guarantee of the data delivery at the download or address point. This is made possible by ‘flow control’ which determines the requirement for resending data. Flow control also checks and stops the transmission of data unless previous packets have been successfully delivered. This is based on the process in which the client can request a resending of a particular packet from the server until the entire packet has been received as in its original form.

UDP is also common but it cannot be relied upon for sending important data like secure files, important webpages etc. It is used mostly for streaming media including audio and video. UDP is faster than TCP and media players work best with it. There is no flow control or error correction but the speed is far greater so despite streaming media not being of high quality, it can be viewed properly with UDP.

TCP is safer as compared to UDP as the latter serves as an adequate cover for viruses. TCP also has a complicated frame structure. In case of UDP, the operating system has to do very little work to translate the data.

UDP is connection less while TCP is connection-oriented which requires the latter protocol to establish full connection between the receiver and the sender. The connection needs to be closed after the transfer is complete to free up system resources that were being used by the protocol. UDP requires no authorization and is okay for free-floating dissemination of data.

DIFFERENCE BETWEEN IPV4 AND IPV6

Difference between IPV4 and IPV6





















IPv4
Defined in RFC 791
This is a 32 bit number to identify hosts. So the total address space is 232 which is nearly equal s to 4×109. IP is operated in classful and classless concepts to overcome the shortage of addresses. Classful network is an addressing plan to identify the network and the hosts of the networks. IPv4 has 5 classes A, B, C, D and E. In class A, first 8bits of 32 bits identifies the network and Class B it’s the first 16 bits and in class C it’s 24 bits. If you consider a class C address first 24 bits identify the network part and the last 8 bits to identify the hosts in that particular network. In theory, a class C network can contain only 28 which is 256 hosts.

Because of the limitation of address space, CIDR (Classless Inter-Domain Routing) is introduced in 1993. Rather having a fixed network part and host part, CIDR introduces variable length of network and host part with relevant subnet masks.

IPv6
Defined in RFC 2460
IPv6 is introduced to overcome the shortage of IP address space. IPv6 is a 128 bit number with address space of 2128 (about 3.4×1038). This gives the flexibility to overcome the addressing space issues and routing traffic.
Address Format:

Here in IPv6 first 64 bits defines the network part and the rest of the 64 bits is host address part. IPv4 is represented in 4 blocks of 8 bit binary whereas IPv6 is represented by 8 groups of 16 bit hexadecimal values separated by colons.
Example: 2607:f0d0:1002:0051:0000:0000:0202:0004

Further for easy use, it can be abbreviated with the following rules
(1) Leading zeroes within a 16-bit value may be omitted
(2) Single occurrence of consecutive groups of zeroes within an address may be replaced by a double colon
So 2607:f0d0:1002:0051:0000:0000:0202:0004 can be written as follows
2607:f0d0:1002:0051:0000:0000:0202:0004
2607:f0d0:1002:0051::202:4

Main features of IPv6
(1) Large address space, since it’s 128 bit
(2) Enhanced supports to Multicast
(3) Support for Network Layer Security
(4) Mobility Supported
(5) Extensible header if necessary
(6) Bigger Size payloads supported in IPv6 if network supports bigger MTU. 

Summary:
(1) IPv4 is 32bit address space where as IPv6 has 128bit address space.
(2) CIDR was introduced for optimized usage of IPv4
(3) IPv4 format is four Octect and IPv6 is 8 block Hexadecimal.
(4) Even though IPv4 supports limited multicast, IPv6 is extensively supporting Multicast
(5) IPv6 avoid triangular routing, since it supports Mobility
(6) IPv6 supports bigger payload than IPv4
(7) IP tunneling is used for IPv4 and IPv6 interconnection at the moment.