Implement the Domain name system or DNS system using wireshark.



Name of the Experiment: Implement the Domain name system( DNS) using wireshark.

Introduction:
The Domain Name System (DNS ) is a hierarchical decentralized naming system for computers, services, or other resources connected to the
Internet or a private network. It associates various information with domain names assigned to each of the participating entities. Most prominently, it translates more readily memorized domain names to the numerical IP addresses needed for locating and identifying computer services and devices with the underlying network protocols. By providing a worldwide, distributed directory service, the Domain Name System is an essential component of the functionality on the Internet, that has been in use since 1985.



Objectives:
Our primary goal is to deeply understand the IP Addressing & Sub-netting concepts and prepare ourselves to create an IP addressing plan for our network. The main objectives of this project can be summarized as:




·       1.  A general understanding of IP addressing and sub-netting.
·       2. General IP addressing guidance while redesigning an existing network.
·       3.  An understanding of DNS (Domain Name System).
·       4.  Guidance on how to add new services to an existing network.
·       5. To create a virtual network architecture of IP addressing and sub-netting using cisco simulator.
·       6. To provide a DNS server for IP addressing and sub-netting.
·      7. To show the connection between every node using mininet on Linux.

·    8.The Domain Name System delegates the responsibility of assigning domain names and mapping those names to Internet resources by designating authoritative name servers for each domain. Network administrators may delegate authority over sub-domains of their allocated name space to other name servers. This mechanism provides distributed and fault tolerant service and was designed to avoid a single large central database.

·      9.The Domain Name System also specifies the technical functionality of the database service that is at its core. It defines the DNS protocol, a detailed specification of the data structures and data communication exchanges used in the DNS, as part of the Internet Protocol Suite . Historically, other directory services preceding DNS were not scalable to large or global directories as they were originally based on text files, prominently the hosts file.

·       10.The Internet maintains two principal namespaces,   the domain name hierarchy [1] and the Internet Protocol (IP) address spaces . [2] The Domain Name System System maintains the domain name hierarchy and provides translation services between it and the address spaces.



      Methodology:
     As for our resource limitations we have confined our project to simulation rather than implementing the real network. The real implementation may worth it. As the real server & client PC, router is very costly & can’t be resolved for testing we used Cisco simulator which is all free & easy to understand as well as to use.
     In cisco we have constructed a virtual network architecture of IP addressing and subnet concepts. A DNS (Domain number Server) is used to provide the functionality of Domain Name to IP addressing mapping sub-netting. Another web server is used for sub-netting concepts. We have used a switch to provide the connectivity between all nodes. A router is used for routing between client to server or vice versa. The two servers (one DNS other Web) , client PC,router are connected together using some kind of copper cabling. The DNS server, web server , client PC and router has given IP addresses as 192.168.10.254 , 192.168.10.5 , 192.168.10.2 , 192.168.10.0. The subnet mask is 255.255.255.0. The default gateway is 192.168.1.1. The DNS server is given a Domain Name named www.dns.com & the web server named www.web.com. The DNS server maps Domain Name to IP address to route to the correct destination. The page can be visited from client Pc by using both IP address and corresponding Domain Name.
      Now when the virtual network creation is done it’s time for moving to next stage. The virtual network now is created using virtual network creator mininet in Linux. The network is now created using terminal of Linux & commands. The commands are as follows:


Mininet Installation:
·         Process Step 1: $ sudo apt-get install git 
·         Step 2: $ git clone git://github.com/mininet/mininet 
·         Step 3: $ cd mininet 
·         Step 4: $ git tag 
·         Step 5: $ git checkout -b 2.2.0b3 
·         Step 6: $ ~/mininet/util/install.sh -a 
·         Step 7: $ sudo mn --test pingall
Wireshark Installation
·         Process Step 1: $ sudo apt-add-repository universe
·         Step 2: $ sudo apt-get update
·         Step 3: $ sudo apt-get install wireshark
Virtual network creation
·         sudo mn –c
·         sudo mn
·         xterm h1 h2
·         h2 : iperf -s -p 5566 -i 1
·         h1: iperf -c 10.0.0.2 -p 5566 -t 15
Now once the virtual network is created we need see whether the packet is passing or not. For this purpose we used wireshark as mentioned earlier is a packet analyzer software which is very efficient and magnificent piece of software. Mininet is connected with wireshark then the status is observed. It has showed that many packet is passing through several protocol including source , destination addresses.
 

 
·        

·       

     Input:
     We are capturing traffic by wiershark from the Ethernet port.



Figure:Wireshark input


 
     Output:
      We filtered the output by DNS.The following figure is showing the expected output.




Figure:Wireshark output


Figure: Wireshark IO graph



Result & Discussion:

From the output we can see the result of filtered DNS. From the wiewshark IO graph we can observe the packet passing filtered by DNS. The source and destination address is also documented as we have seen in the output. In cisco simulator we successfully browsed web server using both IP address and their corresponding Domain Name. We have tested several live websites well as our own virtual network topology using the command lookup. We observed that it returns the web servers corresponding IP address by requesting several DNS server.
 

Figure: Web browsing using Domain Name

 

 



Conclusion:
All the nodes were connected successfully and launched in simulator successfully. The DNS server has successfully mapped Domain Name to IP addressing and the virtual sub-netting was constructed .The network topology is created in mininet using terminal of Linux and some sort of commands as we have seen in methodology. The packet passing is observed using wireshark and graph as well created. Finally we can say that the project is successfully launched and all the module is tested properly. 



--------------------------------------------*******************-----------------------------------------------------
Python Code for Domain Name System----


from mininet.cli import CLI
from mininet.log import setLogLevel
from mininet.net import Mininet
from mininet.topo import Topo

def runMultiLink():
    "Create and run multiple link network"
    topo = simpleMultiLinkTopo( n=1 )
    net = Mininet( topo=topo )
    net.start()
    CLI( net )
    net.stop()

class simpleMultiLinkTopo( Topo ):
    "Simple topology with multiple links"

    def __init__( self, n, **kwargs ):
        Topo.__init__( self, **kwargs )

        h1, h2, h3 = self.addHost( 'h1' ), self.addHost( 'h2' ), self.addHost( 'h3' )       
    s1 = self.addSwitch( 's1' )
    s2 = self.addSwitch( 's2' )
   
          for _ in range( 1 ):

            self.addLink( s1, h1 )
            self.addLink( s1, h2 )
        self.addLink( s1, h3 )
     

        self.addLink( s2, h1 )
            self.addLink( s2, h2 )
        self.addLink( s2, h3 )
     

if __name__ == '__main__':
    setLogLevel( 'info' )
    runMultiLink()

No comments:

Post a Comment