CN Lab File-1
CN Lab File-1
CN Lab File-1
MANAGEMENT
LUCKNOW,UTTAR PRADESH
Theory: Ethernet cable Color-coded wiring sequences exist as a cabling industry standard. It allows
cabling technicians to reliably predict how Ethernet cable is terminated on both ends so they can follow
other technicians' work without having to guess or spend time deciphering the function and connections
of each wire pair. Ethernet cable jack wiring follows the T568A and T568B standards.
There are two kinds of Ethernet cables you can make, Straight Through and Crossover.
Standard Cabling:
1. 10BaseT and 100BaseT are most common mode of LAN. You can use UTP category-5 cable for
both modes.
2. A straight cable is used to connect a computer to a hub
CROSSOVER CABLES - The purpose of a Crossover Ethernet cable is to directly connect one
computer to another computer (or device) without going through a router, switch or hub.
Bulk RJ45 Crimpable Connectors for CAT-6
A crimping tool is a device used to conjoin two pieces of metal by deforming one or both of them in a
way that causes them to hold each other. The result of the tool's work is called a crimp. A good
example of crimping is the process of affixing a connector to the end of a cable. For instance, network
cables and phone cables are created using a crimping tool (shown below) to join the RJ-45 and RJ-
11 connectors to the both ends of either phone
At one end, cut the wire to length leaving enough length to work, but not too much excess.
Strip off about 2 inches of the Ethernet cable sheath.
Align each of the colored wires according to the layout of the jack.
Use the punch down tool to insert each wire into the jack.
Repeat the above steps for the second RJ45 jack.
Cable Crimping, Standard Cabling and Cross Cabling, IO connector crimping and testing the crimped
cable using a cable tester are done successfully
EXPERIMENT-2
Objective: Configuration of router, hub, switch etc. (using real devices or
simulators)
2. Hub: An Ethernet hub, active hub, network hub, repeater hub, hub or concentrator
is a device for connecting multiple twisted pair or fiber optic Ethernet devices together and making
them act as a single network segment. Hubs work at the physical layer (layer 1) of the OSI model. The
device is a form of multiport repeater. Repeater hubs also participate in collision detection, forwarding
a jam signal to all ports if it detects a collision.
3. Switch: A network switch or switching hub is a computer networking device that connects
network segments. The term commonly refers to a network bridge that processes and routes data at the
data link layer (layer 2) of the OSI model. Switches that additionally process data at the network layer
(layer 3 and above) are often referred to as Layer 3 switches or multilayer switches.
4. Bridge: A network bridge connects multiple network segments at the data link layer (Layer
2) of the OSI model. In Ethernet networks, the term bridge formally means a device that behaves
according to the IEEE 802.1D standard. A bridge and switch are very much alike; a switch being a
bridge with numerous ports. Switch or Layer 2 switch is often used interchangeably with bridge
.Bridges can analyze incoming data packets to determine if the bridge is able to send the given packet
to another segment of the network.
5. Router: A router is an electronic device that interconnects two or more computer networks,
and selectively interchanges packets of data between them. Each data packet contains address
information that a router can use to determine if the source and destination are on the same network, or
if the data packet must be transferred from one network to another. Where multiple routers are used in a
large collection of interconnected networks, the routers exchange information about target system
addresses, so that each router can build up a table showing the preferred paths between any two systems
on the interconnected networks.
6. Gate Way: In a communications network, a network node equipped for interfacing with
another network that uses different protocols.
• A gateway may contain devices such as protocol translators, impedance matching devices, rate
converters, fault isolators, or signal translators as necessary to provide system interoperability. It also
requires the establishment of mutually acceptable administrative procedures between both networks.
• A protocol translation/mapping gateway interconnects networks with different network protocol
technologies by performing the required protocol conversions.
EXPERIMENT-3
Objective: Implementation of Stop and Wait Protocol and Sliding Window
Protocol.
Theory: It is the simplest flow control method in which the sender will send the packet and then wait
for the acknowledgement by the receiver that it has received the packet then it will send the next
packet. Stop and wait protocol is very easy to implement.
Total time taken to send is,
Ttotal = Tt(data) + Tp + Tq + Tprocess + Tt(ack) + Tp
( since, Tq and Tprocess = 0)
Ttotal = Tt(data) + 2Tp + Tt(ack)
Ttotal = Tt(data) + 2Tp
(when Tt(ack) is negligible)
Efficiency
= useful time / total cycle time
= Tt / (Tt+2Tp)
= 1 / (1+2a) [a = Tp/Tt]
Design
Sender Site: The data link layer in the sender site waits for the network layer for a data
packet. It then checks whether it can send the frame. If it receives a positive notification from
the physical layer, it makes frames out of the data and sends it. It then waits for an
acknowledgement before sending the next frame.
Receiver Site: The data link layer in the receiver site waits for a frame to arrive. When it
arrives, the receiver processes it and delivers it to the network layer. It then sends an
acknowledgement back to the sender.
Algorithm: Sender Site Algorithm of Simplex Stop – and – Wait Protocol for Noiseless Channel
begin
canSend = True; //Allow the first frame to be sent
while (true) //check repeatedly
do
Wait_For_Event(); //wait for availability of packet
if ( Event(Request_For_Transfer) AND canSend) then
Get_Data_From_Network_Layer();
Make_Frame();
Send_Frame_To_Physical_Layer();
canSend = False;
else if ( Event(Acknowledgement_Arrival)) then
Receive_ACK();
canSend = True;
end if
end while
end
Algorithm: Receiver Site Algorithm of Simplex Stop – and – Wait Protocol for Noiseless Channel
begin
while (true) //check repeatedly
do
Wait_For_Event(); //wait for arrival of frame
if ( Event(Frame_Arrival) then
Receive_Frame_From_Physical_Layer();
Extract_Data();
Deliver_Data_To_Network_Layer();
Send_ACK();
end if
end while
end
In computer networks sliding window protocol is a method to transmit data on a network. Sliding
window protocol is applied on the Data Link Layer of OSI model. At data link layer data is in the
form of frames. In Networking, Window simply means a buffer which has data frames that needs to
be transmitted.
Both sender and receiver agrees on some window size. If window size=w then after sending w frames
sender waits for the acknowledgement (ack) of the first frame.
As soon as sender receives the acknowledgement of a frame it is replaced by the next frames to be
transmitted by the sender. If receiver sends a collective or cumulative acknowledgement to sender
then it understands that more than one frames are properly received, for eg:- if ack of frame 3 is
received it understands that frame 1 and frame 2 are received properly.
In sliding window protocol the receiver has to have some memory to compensate any loss in
transmission or if the frames are received unordered .
int main()
{
int w,i,f,frames[50];
for(i=1;i<=f;i++)
scanf("%d",&frames[i]);
printf("\nWith sliding window protocol the frames will be sent in the following manner (assuming no
corruption of frames)\n\n");
printf("After sending %d frames at each stage sender waits for acknowledgement sent by the receiver\n\n",w);
for(i=1;i<=f;i++)
{
if(i%w==0)
{
printf("%d\n",frames[i]);
printf("Acknowledgement of above frames sent is received by sender\n\n");
}
else
printf("%d ",frames[i]);
}
if(f%w!=0)
printf("\nAcknowledgement of above frames sent is received by sender\n");
return 0;
}
Output
Objective: Create a socket for HTTP for web page upload and download
Concept:
Concurrent Server: The server can be iterative, i.e. it iterates through each client and serves one
request at a time. Alternatively, a server can handle multiple clients at the same time in parallel,
and this type of a server is called a concurrent server.
Algorithm:
Server
Step 1: Create a socket and bind to the address. Leave socket unconnected.
Step 2 : Leave socket in passive mode, making it ready for use by a server.
Step 3: Repeatedly call accept to receive the next request from a client to handle the response with
the through socket.
Client
Step 1: Begin with a connection passed from the server (i.e., a socket for the connection).
Step 2: Use input streams; get the message from user to be given to the server.
Step 3: Use input streams read message given by server and print it.
Step 4: Use output streams to write message to the server.
Step 5: Close the connection and exit, i.e., slave terminates after handling all requests from one
client.
Sample Program:
ConServer.java
/*… Register service on port 8020…*/
ServerSocketss=new ServerSocket(8500);
System.out.println("Waiting for client...");
while(true)
/*... ServerSocket in order to listen for and accept connections from clients...*/
{Socket s=ss.accept();
/*…getInputStream()-This method take the permission to write the data from client program to
server program and server program to client program…*/
BufferedReader br=new BufferedReader(new InputStreamReader(s.getInputStream()));
cli_name=br.readLine();
System.out.println("\nCLIENT NAME: "+cli_name);
no=Integer.parseInt(br.readLine());
sq=no*no;
PrintWriter pw=new PrintWriter(s.getOutputStream(),true);
pw.println(sq);
System.out.println("OUTPUT - The square of "+no+" is "+sq);}}}
ConClient1.java
int num=Integer.parseInt(br.readLine());
/* …getOutputStream()-This method is used to take the permission to read data from client
system by the server or from the server system by the client…*/
PrintWriterpw=new PrintWriter(s.getOutputStream(),true);
pw.println("Client 1");
pw.println(num);
BufferedReader br1=new BufferedReader(new InputStreamReader(s.getInputStream()));
intsqu=Integer.parseInt(br1.readLine());
System.out.println("Square of "+num+" is "+squ+"\n");
ConClient2.java
Socket s=new Socket("localhost",8500);
BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); System.out.println("\
nCLIENT 2:\nEnter the number to find square: "); intnum=Integer.parseInt(br.readLine());
PrintWriter pw=new PrintWriter(s.getOutputStream(),true);
pw.println("Client 2");
pw.println(num);
BufferedReader br1=new BufferedReader(new InputStreamReader(s.getInputStream()));
intsqu=Integer.parseInt(br1.readLine());
System.out.println("Square of "+num+" is "+squ+"\n"); s.close();
Sample Output:
Viva questions:
Algorithm:
Step1: Get the input from the user by using scanner method.
Step 2: Read the input by using nextLine() and store it.
Step 3: Split the string based on string by using
split(“\\”) Step4 : Convert it into binary.
Step 5: calculating the network mask by using math and logarithmic
Step 6: get the first address by ANDding the last n bits with 0.
Step7 : get the last address by ANDding the last n bits with 1.
Sample Coding:
//…Calculation of mask…//
Viva questions:
EXPERIMENT-6(a)
Objective: Applications using TCP Sockets like Chat
A server program to establish the socket connection with the client for performing chat.
A client program which on establishing a connection with the server for performing chat.
Concept:
It uses TCP socket communication .We have a server as well as a client.
Both can be run in the same machine or different machines. If both are running in the machine, the
address to be given at the client side is local host address.
If both are running in different machines, then in the client side we need to specify the ip address of
machine in which server application is running.
Algorithm:
Server
Step1: Start the program and create server and client sockets.
Step2: Use input streams to get the message from user.
Step3: Use output streams to send message to the client.
Step4: Wait for client to display this message and write a new one to be displayed by the server.
Step5: Display message given at client using input streams read from socket.
Step6: Stop the program.
Client
Step1: Start the program and create a client socket that connects to the required host and port.
Step2: Use input streams read message given by server and print it.
Step3: Use input streams; get the message from user to be given to the server.
Step4: Use output streams to write message to the server.
Step5: Stop the program.
GossipClient.java
Socket sock = new Socket("127.0.0.1", 3000);
OutputStreamostream = sock.getOutputStream();
EXPERIMENT-6(b)
Objective: Applications using TCP Sockets like file Transfer
Algorithm
Server
Step1: Import java packages and create class file server.
Step2: Create a new server socket and bind it to the port.
Step3: Accept the client connection
Step4: Get the file name and stored into the BufferedReader.
Step5: Create a new object class file and realine.
Step6: If file is exists then FileReader read the content until EOF is reached.
Step7: Stop the program.
Client
Sample Output:
Viva questions:
EXPERIMENT-7
Objective: Perform a case study about the different routing algorithms to select the
network path with its optimum and economical during data transfer. i. Link State
routing ii. Flooding iii. Distance vector
b) FLOODING
Flooding is a simple routing algorithm in which every incoming packet is sent through every
outgoing link except the one it arrived on Flooding is used in bridging and in systems such as
Usenet and peer-to-peer file sharing and as part of some routing protocols, including OSPF,
DVMRP, and those used in ad-hoc wireless networks. There are generally two types of flooding
available, Uncontrolled Flooding and Controlled Flooding. Uncontrolled Flooding is the fatal law
of flooding. All nodes have neighbors and route packets indefinitely. More than two neighbors
create a broadcast storm. Controlled Flooding has its own two algorithms to make it reliable,
SNCF (Sequence Number Controlled Flooding) and RPF (Reverse Path Flooding). In SNCF, the
node attaches its own address and sequence number to the packet, since every node has a memory
of addresses and sequence numbers. If it receives a packet in memory, it drops it immediately
while in RPF, the node will only send the packet forward. If it is received from the next node, it
sends it back to the sender.
Algorithm
There are several variants of flooding algorithm. Most work roughly as follows:
1. Each node acts as both a transmitter and a receiver.
2. Each node tries to forward every message to every one of its neighbours except the source node.
This results in every message eventually being delivered to all reachable parts of the network.
Algorithms may need to be more complex than this, since, in some case, precautions have to be
taken to avoid wasted duplicate deliveries and infinite loops, and to allow messages to eventually
expire from the system. A variant of flooding called selective flooding partially addresses these
issues by only sending packets to routers in the same direction. In selective flooding the routers
don't send every incoming packet on every line but only on those lines which are going
approximately in the right direction.
Advantages
packet can be delivered, it will (probably multiple times).
Since flooding naturally utilizes every path through the network, it will also use the shortest path.
This algorithm is very simple to implement.
Disadvantages
Flooding can be costly in terms of wasted bandwidth. While a message may only have one
destination it has to be sent to every host. In the case of a ping flood or a denial of service attack, it
can be harmful to the reliability of a computer network. Messages can become duplicated in the
network further increasing the load on the networks bandwidth as well as requiring an increase in
processing complexity to disregard duplicate messages. Duplicate packets may circulate forever,
unless certain precautions are taken: Use a hop count or a time to live count and include it with
each packet. This value should take into account the number of nodes that a packet may have to
pass through on the way to its destination.
c)DISTANCE VECTOR ROUTING PROTOCOL USING NS2
In computer communication theory relating to packet-switched networks, a distance vector
routing protocol is one of the two major classes of routing protocols, the other major class being
the link-state protocol. Distance-vector routing protocols use the Bellman–Ford algorithm, Ford–
Fulkerson algorithm, or DUAL FSM (in the case of Cisco Systems protocols) to calculate paths.
A distance-vector routing protocol requires that a router informs its neighbours of topology changes
periodically. Compared to link-state protocols, which require a router to inform all the nodes in a
network of topology changes, distance-vector routing protocols have less computational complexity
and message overhead. The term distance vector refers to the fact that the protocol manipulates
vectors (arrays) of distances to other nodes in the network. The vector distance algorithm was the
original ARPANET routing algorithm and was also used in the internet under the name of RIP
(Routing Information Protocol). Examples of distance-vector routing protocols include RIPv1 and
RIPv2 and IGRP.
Method:
Routers using distance-vector protocol do not have knowledge of the entire path to a
destination. Instead they use two methods:
1. Direction in which router or exit interface a packet should be forwarded.
Distance-vector protocols are based on calculating the direction and distance to any link in a
network. "Direction" usually means the next hop address and the exit interface. "Distance" is a
measure of the cost to reach a certain node. The least cost route between any two nodes is the route
with minimum distance. Each node maintains a vector (table) of minimum distance to every
node. The cost of reaching a destination is calculated using various route metrics. RIP uses the hop
count of the destination whereas IGRP takes into account other information such as node delay and
available bandwidth. Updates are performed periodically in a distance-vector protocol where all or
part of a router's routing table is sent to all its neighbors that are configured to use the same
distance-vector routing protocol. RIP supports cross-platform distance vector routing whereas
IGRP is a Cisco Systems proprietary distance vector routing protocol. Once a router has this
information it is able to amend its own routing table to reflect the changes and then inform its
neighbors of the changes. This process has been described as routing by rumor‘ because routers are
relying on the information they receive from other routers and cannot determine if the
information is actually valid and true. There are a number of features which can be used to help
with instability and inaccurate routing information.
EGP and BGP are not pure distance-vector routing protocols because a distance-vector protocol
calculates routes based only on link costs whereas in BGP, for example, the local route preference
value takes priority over the link cost.
Count-to-infinity problem
The Bellman–Ford algorithm does not prevent routing loops from happening and suffers from the
count to infinity problem. The core of the count-to-infinity problem is that if A tells B that it has a
path somewhere, there is no way for B to know if the path has B as a part of it. To see the problem
clearly, imagine a subnet connected like A–B–C–D–E–F, and let the metric between the routers be
"number of jumps". Now suppose that A is taken offline. In the vector-update-process B notices
that the route to A, which was distance 1, is down – B does not receive the vector update from A.
The problem is, B also gets an update from C, and C is still not aware of the fact that A is down –
so it tells B that A is only two jumps from C (C to B to A), which is false. This slowly propagates
through the network until it reaches infinity (in which case the algorithm corrects itself, due to the
relaxation property of Bellman–Ford).
EXPERIMENT-8
Objective: Running and using services/commands like ping, traceroute, arp, telnet,
etc
Tracert / traceroute
Tracert: Determines the path taken to a destination by sending Internet Control Message Protocol
(ICMP) Echo Request messages to the destination with incrementally increasing Time to Live (TTL)
field values. The path displayed is the list of near-side router interfaces of the routers in the path
between a source host and a destination. The near-side interface is the interface of the router that is
closest to the sending host in the path. Used without parameters, tracert displays help.
This diagnostic tool determines the path taken to a destination by sending ICMP Echo Request
messages with varying Time to Live (TTL) values to the destination. Each router along the path is
required to decrement the TTL in an IP packet by at least 1 before forwarding it.
Effectively, the TTL is a maximum link counter. When the TTL on a packet reaches 0, the router is
expected to return an ICMP Time Exceeded message to the source computer. Tracert determines the
path by sending the first Echo Request message with a TTL of 1 and incrementing the TTL by 1 on
each subsequent transmission until the target responds or the maximum number of hops is reached. The
maximum number of hops is 30 by default and can be specified using the -h parameter.
The path is determined by examining the ICMP Time Exceeded messages returned by intermediate
routers and the Echo Reply message returned by the destination. However, some routers do not return
Time Exceeded messages for packets with expired TTL values and are invisible to the tracert
command. In this case, a row of asterisks (*) is displayed for that hop.
Examples:
To trace the path to the host named www.google.co.in use following command
tracert www.google.co.in
To trace the path to the host named www.google.com and prevent the resolution of each IP
address to its name, type:
tracert -d www.google.com
To trace the path to the host named www.google.com and use the loose source route
10.12.0.1-10.29.3.1-10.1.44.1, type:
tracert -j 10.12.0.1 10.29.3.1 10.1.44.1 www.google.com
Syntax
Parameters
-d Prevents tracert from attempting to resolve the IP addresses of intermediate routers to their names.
This can speed up the display of tracert results.
-h Maximum Hops Specifies the maximum number of hops in the path to search for the target (destination).
The default is 30 hops.
-j HostList Specifies that Echo Request messages use the Loose Source Route option in the IP header with
the set of intermediate destinations specified in HostList. With loose source routing, successive
intermediate destinations can be separated by one or multiple routers. The maximum number of addresses
or names in the host list is 9. The HostList is a series of IP addresses (in dotted decimal notation) separated
by spaces.
-w Timeout Specifies the amount of time in milliseconds to wait for the ICMP Time Exceeded or Echo
Reply message corresponding to a given Echo Request message to be received. If not received within
the time-out, an asterisk (*) is displayed. The default time-out is 4000 (4 seconds).
Ping
Verifies IP-level connectivity to another TCP/IP computer by sending Internet Control Message
Protocol (ICMP) Echo Request messages. The receipt of corresponding Echo Reply messages are
displayed, along with round-trip times. Ping is the primary TCP/IP command used to troubleshoot
connectivity, reachability, and name resolution.
You can use ping to test both the computer name and the IP address of the computer. If pinging the IP
address is successful, but pinging the computer name is not, you might have a name resolution
problem. In this case, ensure that the computer name you are specifying can be resolved through the
local Hosts file, by using Domain Name System (DNS) queries, or through NetBIOS name resolution
techniques.
To quickly obtain the TCP/IP configuration of a computer, open Command Prompt, and then
type ipconfig . From the display of the ipconfig command, ensure that the network adapter for
the TCP/IP configuration you are testing is not in a Media disconnected state.
At the command prompt, ping the loopback address by typing ping 127.0.0.1
Ping the IP address of the computer.
Ping the IP address of the default gateway. If the ping command fails, verify that the default
gateway IP address is correct and that the gateway (router) is operational.
Ping the IP address of a remote host (a host that is on a different subnet). If the ping command
fails, verify that the remote host IP address is correct, that the remote host is operational, and
that all of the gateways (routers) between this computer and the remote host are operational.
Ping the IP address of the DNS server. If the ping command fails, verify that the DNS server IP
address is correct, that the DNS server is operational, and that all of the gateways (routers)
between this computer and the DNS server are operational.
ARP
Displays and modifies entries in the Address Resolution Protocol (ARP) cache, which contains one or
more tables that are used to store IP addresses and their resolved Ethernet or Token Ring physical
addresses. There is a separate table for each Ethernet or Token Ring network adapter installed on your
computer.
Syntax
arp [-a [InetAddr] [-N IfaceAddr]] [-g [InetAddr] [-N IfaceAddr]] [-d InetAddr [IfaceAddr]]
[-s InetAddr EtherAddr [IfaceAddr]]
Parameters
Examples:
To display the ARP cache tables for all interfaces use following command
arp -a
To display the ARP cache table for the interface that is assigned the IP address 192.168.42.171
TELNET
The telnet command is used for connection and communication with a remote or local host via the
Telnet TCP/IP protocol.
You can enter a domain or IP address and try connecting to it via the chosen port. In case the port is
not specified, telnet utility tries to connect via the default port 23.
The command is really useful in cases when you need to check whether the needed port is open on
your computer and on the side of the remote host.
How to use Telnet
For Windows
4. Scroll down the list available in the Windows Features window > check Telnet Client option
> press OK > wait a few moments for the changes to be applied
5. Telnet is enabled now, so we can run it in the same way as other commands:
for example:
telnet namecheap.com 80
If you see the blank output after that, you have connected successfully. To quit you can press CTRL +
C or any key:
As a result of successful telnet, we can conclude, that the entered domain or IP exists, and the chosen
port is open on your computer and on the side of the target host.
If connection has not been established, the following error will appear:
Theory:
Simulation is a very important technology in modern time. Computer assisted simulation can model
hypothetical and real-life objects or activities on a computer to study the well-designed structure. A network
simulator is a system of implementing the network on the computer through which the performance of the
network is calculated. The computer assisted simulation technologies are applied in the simulation of
networking algorithms. The functional network field is narrower than general simulation and it is natural that
more specific requirements will be placed on network simulations.
Network simulator allows the researchers to test the scenarios that are difficult or expensive to
simulate in real world. Design of various network topologies using nodes, hosts, hubs, bridges, routers and
mobile units etc. is possible. The network simulators are of various types which can be compared on the basis
of: range (simple to the complex), specification of nodes, links and traffic between the nodes. Specifying
about the protocols used to handle traffic in a network, user friendly applications (allow users to easily
visualize the simulated environment.), text-based applications (permit more advanced forms of
customization) and programming-oriented tools (providing a programming framework that customizes to
create an application that simulates the networking environment to be tested).
Network simulators are used by people from different areas such as academic researchers,
industrialized sectors and Quality Assurance (QA) to design, simulate and analyze the performance of
different network protocols. They can also be used to evaluate the outcome of the different parameters of the
protocols being studied. Normally a network simulator comprises of wide range of networking technologies
and protocols that help users to build complex networks from basic building blocks like clusters of nodes and
links. With their help, different network topologies can be designed using various types of nodes such as end-
hosts, network bridges, routers, hubs, optical link-layer devices and mobile units.
Generally, network simulators try to represent the real world networks and it is a useful technique, given that
the activities of a network can be modeled by calculating the interaction between the different network
components (they can be end-host or network entities such as routers, packets or physical links) using
mathematical formulas. They can also be modeled by actually or virtually capturing and playing back
experimental observations from real networks. Upon receipt of the observation data from simulation
experiments, the behavior of the network and protocols supported are analyzed in a series of offline test
experiments. All types of attributes can also be modified in a controlled manner to assess how the network can
behave under different parameter combinations. Another feature of network simulation worth noticing is that
the simulation program can be used and analyzed together with various strategy, links, applications etc.
Typically, users can then adapt the simulator to fulfill their exact needs. Simulators support the most popular
protocols and networks such as WLAN, TCP and WSN.
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 because of high variance. To evaluate the probability of buffer overflow in a
network, the time required for a precise answer can be enormously large. Techniques like "control variants"
and “sampling" have been developed to speed simulation.
A typical simulator encompasses a wide range of networking technologies and can help the users to
build complex networks from basic building blocks such as selection of nodes and links. Various types of
nodes in Hierarchical networks resembling computers, hubs, bridges, routers, links, switches mobile units etc
can be designed with the help of simulators.
Various types of Wide Area Network (WAN) technologies like TCP, ATM, IP etc. and Local Area
Network (LAN) technologies like Ethernet, token rings etc., can be imitated with a simulator and the user can
examine various standard results apart from devising some novel protocol or routing strategy. Network
simulators are widely used to simulate battlefield networks in Network-centric warfare.
There are ample varieties of simulators, ranging from simple to complex. A simple simulator must
enable a user to represent network topology, to specify nodes on the network, the links and the traffic between
the nodes. More complex systems may permit the user to specify everything about the protocols used to
handle traffic in a network. User friendly applications permit users to envision easily the working mechanism
of their simulated situation. Text-based applications offer a less sensitive interface, but permits more advanced
forms of customization.
Overview of Network Simulators
Currently there are many network simulators that have different features in different aspects. Short
lists of the current network simulators include NS-2, NS-3, OPNET, OMNeT++, NETSIM, QualNet, and J-
Sim. These network simulators are selected for discussion regarding their features, advantages and
restrictions.
NS2
The Ns2 is a discrete event simulator targeted at packet level networking research and
provides substantial support to simulate group of protocols like TCP, UDP, FTP and HTTP. It
comprises of two simulation tools. Ns-2 is primarily UNIX based and fully simulates a layered wire
or wireless network from the physical radio transmission channel to high-level applications. The
simulator is written in C++ and a script language called OTcl.
C++: C++ is fast to run but slower to change, making it suitable for detailed protocol implementation.
Otcl: OTcl runs much slower but can be changed very quickly (and interactively), making it
ideal for simulation configuration. Ns provides glue to make objects and variables appear on both
languages.
NS2 uses an OTcl interpreter by which the user writes an OTcl script that defines the
network, (number of nodes and links) the transaction in the network (sources destinations, type of
traffic) and the type of protocols used. The outcome of the simulation is a trace file that can be used
for data processing (calculate delay, throughput etc). To visualize the simulation, a program called
Network Animator (NAM) is used. It visualizes the packets as they propagate throughout the
network. The ns- 2 simulator has numerous features that make it suitable for our simulations.
Limitations:
1. NS2 needs to be recompilation every time if there is a change in the user code.
2. Real system is too complex to model i.e. complicated infrastructure.
NS3
The ns-3 simulator is a discrete-event network simulator for Internet systems, targeted
primarily for research and learning purpose. The ns-3 project, started in 2006, is open-source free
software, licensed under the GNU GPLv2 license. It will rely on the current contributions of the
community to develop new models, debug or maintain the existing ones, and share the results. Ns3 is
mainly used on LINUX systems and not limited to internet based systems alone.
C++: implementation of simulation and core model.Ns-3 is built as a library which may be
statically or dynamically linked to a C++ main program. These libraries describe the beginning of
simulation and their topology.
Python: C++ wrapped by Python. Python programs to import an “ns3” module. The features of NS3
simulator are given below.
Limitations:
1. NS3 still suffers from lack of credibility.
2. NS3 is intended to replicate the successful mode of NS2 in which various organizations
contributed to the models and components based on the framework of NS2.
3. NS3 needs a lot of specialized maintainers in order to avail the merits of NS3 as the
commercial OPNET network simulators.
4. Active maintainers are required to respond to the user questions, bug reports and help to Test
& validate the system.
OMNET++
It is a component-based, modular and open architecture discrete event simulator framework.
The most common use of OMNeT++ is for simulation of networks, but it is also used for queuing
network simulations and other areas as well. It is licensed under its own Academic Public License,
which permits GNU Public License like freedom but only in noncommercial settings. It provides
component architecture for models.
C++: The C++ class library comprises of simulation kernel and utility classes (for random
number generation, statistics collection, topology discovery etc) -- this one is used to create
simulation components (simple modules and channels); infrastructure to assemble simulations from
these components and configure (NED language, ini files); runtime user interfaces or environments
for simulations (Tkenv, Cmdenv); an Eclipse-based simulation IDE for designing, running and
evaluating simulations; extension interfaces for real-time simulation, emulation, MRIP, parallel
distributed simulation, database connectivity and so on.
NETSIM
NetSim is a discrete event simulator developed by Tetcos in 1997, in association with Indian
Institute of Science. It has also been featured with Computer Networks and Internets V edition by
Dr. Douglas Comer, published by Prentice Hall. It has an object-oriented system simulating
environment to support simulation and analysis of voice and data communication scenarios for High
Frequency Global Communication Systems (HFGCS).
Java: It creating fast, platform independent software that could be used in simple, consumer
electronic products. Java designed for simple, efficient, platform-independent program for creating
WWW-based programs. Using Java one can create small programs called applets that are entrenched
into an HTML document and viewable on any Java-compatible browser. Java applets are compiled
into a set of byte-codes, or machine-independent processing instructions.
Features:
NetSim modeling and simulation are supported for Aloha, Slotted Aloha, Token Ring/Bus,
Ethernet CSMA/CD, Fast Ethernet, WLAN - IEEE 802.11 a/b/g/n and e, X.25, Frame Relay,
TCP, UDP, IPv4 and IPv6, Routing - RIP, OSPF, BGP,MPLS, MANET, GSM, CDMA,
Wire-less Sensor Network, Zigbee, Cognitive radio)[5].
It simulates a wide variety of Cisco routers, including 2500 series, 2600 series, 2800 series,
and 3600 series, as well as the Cisco Catalyst 1900 series, 2900 series, and 3500 series
switches. Protocol libraries are available as open C code for user modification. This can help
to avoid the time consuming process such as encoding, customization and configuring
commercial simulators to meet customer specific needs. Along with the Boson Virtual Packet
Technology engine NetSim utilizes Boson’s proprietary Router & Simulator EROUTER
software technologies, to produce individual packets. These packets are routed and switched
through the simulated network, allowing the simulator to build an appropriate virtual routing
table and simulate proper networking. Other simulation products on the market do not
support this level of functionality.
It can be used to create a simulation of the topology of corporate network and help practice
trouble-shooting without using devices on the production network.
Advantages:
1. NetSim has a GUI which features drag and drop functionality for devices, links etc. i.e.
Modeling in NetSim is simple and user friendly.
2. It has a built in analysis framework that provides intra and inter-protocol performance
comparison with graphical options.
3. Data packet and control packet flow can be visual-ized through NetSim built-in packet
animator.
4. It is easy to learn all about NetSim.
Limitations:
1. NetSim is a single process discrete event simulator. A single event queue is used for the
simulation which at any given time contains one entry for each station on the network.
2. Free version of NetSim is not available.
Packet Tracer supplements physical equipment in the classroom by allowing students to create a
network with an almost unlimited number of devices, encouraging practice, discovery, and
troubleshooting. The simulation-based learning environment helps students develop 21st century
skills such as decision making, creative and critical thinking, and problem solving. Packet Tracer
complements the Networking Academy curricula, allowing instructors to easily teach and
demonstrate complex technical concepts and networking systems design. Instructors can customize
individual or multiuser activities, providing hands-on lessons for students that offer value and
relevance in their classrooms. Students can build, configure, and troubleshoot networks using virtual
equipment and simulated connections, alone or in collaboration with other students. Packet Tracer
offers an effective, interactive environment for learning networking concepts and protocols. Most
importantly, Packet Tracer helps students and instructors create their own virtual “network worlds”
for exploration, experimentation, and explanation of networking concepts and technologies.
Packet Tracer’s drag-and-drop interface allows students to configure and validate system
architecture
Cisco Packet Tracer has two workspaces—logical and physical. The logical workspace allows users
to build logical network topologies by placing, connecting, and clustering virtual network devices.
The physical workspace provides a graphical physical dimension of the logical network, giving a
sense of scale and placement in how network devices such as routers, switches, and hosts would look
in a real environment. The physical view also provides geographic representations of networks,
including multiple cities, buildings, and wiring closets.
Packet Tracer Modes:
Cisco Packet Tracer provides two operating modes to visualize the behavior of a network—real-time
mode and simulation mode. In real-time mode the network behaves as real devices do, with
immediate real-time response for all network activities. The real-time mode gives students a viable
alternative to real equipment and allows them to gain configuration practice before working with real
equipment.
In simulation mode the user can see and control time intervals, the inner workings of data transfer, and
the propagation of data across a network. This helps students understand the fundamental concepts
behind network operations.
Network • BGP, IPv4, ICMP, ARP, IPv6, ICMPv6, IPsec, RIPv1/ v2/ng, Multi-Area OSPF,
EIGRP, Static Routing, Route Redistribution, Multilayer Switching, L3 QoS, NAT, CBAL, ,
Zone-based policy firewall and Intrusion Protection, System on the ISR, GRE VPN, IPsec
VPN
Network Access/ • Ethernet (802.3), 802.11, HDLC, Frame Relay, PPP, PPPoE, STP, RSTP, VTP, DTP,
Interface CDP, 802.1q, PAgP, L2 QoS, SLARP, Simple WEP, WPA, EAP