Skip to main content

Posts

Showing posts with the label computer-network lab

Network packet analysis using tools like Wireshark, tcpdump

  How do Packet Sniffers work? Every network has various components like workstations and servers, which are called nodes in networking terminology. The data is transferred in the form of packets between these nodes. Every packet has actual data and control information. This control information helps the packet to reach the destination for the source. This control information includes various details like IP addresses of sender and receiver, packet sequencing information, etc. When the data packets are transmitted through the network, they pass through several nodes in the network. These packet’s control information will get checked by each network adapter and the connected device. It is checked for the node it is headed toward. For the normal circumstances, the packet gets ignored if it is addressed for another node. Packet sniffing programs make some nodes to collect all or a defined sample of packets regardless of their destination address. Packet Sniffers analyze the network by...

Applications using TCP and UDP Sockets like d. DNS e. SNMP f. File Transfer

Applications using TCP and UDP Sockets like d. DNS e. SNMP f. File Transfer Aim To write a java program for DNS application Algorithm 1.Start the program. 2.Get the frame size from the user 3.To create the frame based on the user request. 4.To send frames to server from the client side. 5.If your frames reach the server it will send ACK signal to client otherwise it will send NACK signal to client. 6.Stop the program Program / UDP DNS Server Udpdnsserver . java import java.io.*;   import java.net.*; public class udpdnsserver { private static int indexOf(String[] array, String str) { str = str.trim(); for (int i=0; i < array.length; i++) { if (array[i].equals(str)) return i; } return -1; } public static void main(String arg[])throws IOException { String[] hosts = {"yahoo.com", "gmail.com","cricinfo.com", "facebook.com"}; String[] ip = {"68.180.206.184", "209.85.148.19","80.168.92.140", "69.63.189.16"}; Sy...

Study of Network simulator (NS)

  Simulators  Most of the commercial simulators are Graphical User Interface (GUI) driven, while some network simulators are Command-Line Interface (CLI). The design of the network describes the state of the network (nodes, routers, switches and links) and the events (data transfer, transmission delay, packet error etc.). The major output of simulation is the trace files which log every packet and event that occurred during simulation and is used for analysis. Also provides other tools to facilitate visual analysis of trends and potential trouble spots. Most of the network simulators are discrete event, in which the list of pending "events" are stored and processed in order. Some events triggers the future events (i.e.) the event of the arrival of a packet at one node triggering the event of the arrival of that packet at a downstream node. Simulation of networks is a very difficult task. For example, if blocking is high, then evaluation of the average occupancy is challenging...