































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
lab manual for network lab for 7th sem ISE and CSE students
Typology: Exams
1 / 39
This page cannot be seen from the preview
Don't miss anything!
































1Km before Electronic City, Hosur Road, Bangalore-560100.
PES School
Note: Student is required to solve one problem from PART-A and one problem from PART- B. Both the parts have equal weightage.
PART A – Simulation Exercises
The following experiments shall be conducted using either NS228/OPNET or any other simulators.
The following experiments shall be conducted using C/C++.
PES - 1
PE
The Network Simulator can design and simulate a network with SNMP, TL1, TFTF, FTP, Telnet and IOS devices, in four simple steps:
Network Emulation
Network emulation refers to actual network traffic passing through some software which might do some analysis or perhaps modify the traffic in some way. The Emulation Network in the WAND group is used for testing and evaluation of networking software and hardware. The scale is limited; it is made up 24 emulation machines and one central controlling computer. Setup of such a network is time consuming and expensive: in addition to the aforementioned 25 computers, a Cisco 2950 switch and a Cyclades 32 port terminal server are included in the network. Each emulation machine also has a 4 port network interface controller. The controlling machine includes special capture cards (known as DAG [6] cards) to allow easier capture and processing of network traffic. This network has no easy way of adding latency and bandwidth bottlenecks, which means creating adverse conditions on the network is difficult. It is possible to use Dummynet to
add latency, but this is a lot of work. There is a project to solve this issue; a non blocking crossbar Ethernet switch is being created for the network, but the cost involved is large.
Other network emulation done in the WAND group include validating the WAND simulator. This was done by setting up a physical network with FreeBSD machines using Dummynet to add latency. Dummynet is one example of network emulation software, NIST Net is another, it claims to “allow controlled, reproducible experiments with network performance sensitive/adaptive applications and control protocols in a simple laboratory setting”.
NS-2 also provides some network emulation functionality, it is able to capture packets from the live network and drop, delay, re-order, or duplicate them. Emulation, especially in the case of a network simulator like NS-2, is interesting because it is using real world data from real world network stacks. Emulation offers something simulation never can: it is performed on a real network, using actual equipment and real software. However, it is very limited compared to simulation in other areas; for example scale. The WAND Emulation Network described earlier requires a lot of setup and is expensive, yet only contains 24 emulation machines. There is no theoretical limit to the number of nodes a simulator can handle, and increasing the size of a simulation does not cost anything. The factors to consider are RAM, disk space and the small amount of time taken to change a simulation script. In general, changing the simulation is a simple step, though it would be complex in the case a huge amount of nodes being required (a million, for example).
Also, network emulation must of course be run in real time, where simulation can sometimes simulate large time periods in a small amount of time. In the case of a million nodes, the simulation might run in greater than real time because the hardware it is run on would limit performance.
Introduction to Network Simulators
Network simulators implemented in software are valuable tools for researchers to develop, test, and diagnose network protocols. Simulation is economical because it can
carry out experiments without the actual hardware. It is flexible because it can, for example, simulate a link with any bandwidth and propagation delay. Simulation results
are easier to analyze than experimental results because important information at critical points can be easily logged to help researchers diagnose network protocols.
Network simulators, however, have their limitations. A complete network simulator needs to simulate networking devices (e.g., hosts and routers) and application programs that generate network traffic. It also needs to provide network utility programs to configure, monitor, and gather statistics about a simulated network. Therefore, developing a complete network simulator is a large effort. Due to limited development resources, traditional network simulators usually have the following drawbacks:
The description of the network topology, protocols workload and control parameters are transmitted to the server using a simple ASCII representation called NetLanguage where the network is modeled as a graph. This latest release now includes a GUI written in Java.
Implementation of the simulator
The NEST code has been rewritten to make it less general, cleaner and faster. REAL is still implemented as a client-server program. The code is freely available to anyone willing to modify it. Node functions implement computation at each node in the network whereas queue management and routing functions manage buffers in nodes and packet switching. Routing is static and is based on Dijkstras's shortest path algorithm. A node could be a source, a router or a sink. Source nodes implement TCP-like transport layer functionality. Routers implement the scheduling disciplines, while the sinks are universal receivers that only acknowledge packets.
Since NEST didn't not allow for timers, REAL sends out a timer packet from a source back to itself to return after some specified time, but timers cannot be reset using this method.
NCTUns
Introduction
NCTUns is open source, high quality, and supports many types of networks.The NCTUns is a high-fidelity and extensible network simulator and emulator capable of simulating various protocols used in both wired and wireless IP networks. Its core technology is based on the novel kernel re-entering methodology invented by Prof. S.Y. Wang [1, 2] when he was pursuing his Ph.D. degree at Harvard University. Due to this novel methodology, NCTUns provides many unique advantages that cannot be easily achieved by traditional network simulators such as ns-2 [3] and OPNET [4].
After obtaining his Ph.D. degree from Harvard University in September 1999, Prof. S.Y. Wang returned to Taiwan and became an assistant professor in the Department of Computer Science and Information Engineering, National Chiao Tung University (NCTU), Taiwan, where he founded his “Network and System Laboratory.” Since that time, Prof. S.Y. Wang has been leading and working with his students to design and implement NCTUns (the NCTU Network Simulator) for more than five years.
Salient features of NCTUns
The NCTUns network simulator and emulator has many useful features listed as follows:
(b) CSMA/CA MAC, learning bridge protocol, spanning tree protocol, IP, Mobile IP, Diffserv (QoS), RIP, OSPF, UDP, TCP, RTP/RTCP/SDP, HTTP, FTP, Telnet, etc.
Setting up the environment
A user using the NCTUns in single machine mode, needs to do the following steps before he/she starts the GUI program:
Before the user can run up the dispatcher, coordinator, or NCTUns GUI program he/she must set up the NCTUNSHOME environment variable.
After the above steps are followed, the starting screen of NCTUns disappears and the user is presented with the working window as shown below:
Drawing a Network Topology
To draw a new network topology, a user can perform the following steps:
Choose Menu->File->Operating Mode-> and make sure that the “Draw Topology” mode is checked. This is the default mode of NCTUns when it is launched. It is only in this mode that a user can draw a new network topology or change an existing simulation topology. When a user
switches the mode to the next mode “ Edit Property”, the simulation network topology can no longer be changed.
Editing Node's Properties
P
Post Analysis
Simulation Commands
The following explains the meaning of each job control command:
Run: Start to run the simulation.
Pause: Pause the currently -running simulation.
Continue: Continue the simulation that was just paused.
Stop: Stop the currently -running simulation
Abort: Abort the currently running simulation. The difference between “stop” and “abort” is that a stopped simulation job's partial results will be transferred back to GUI files.
Reconnect: The Reconnect command can be executed to reconnect to a simulation job that was previously disconnected. All disconnected jobs that have not finished their simulations or have finished their simulations but the results have not been retrieved back to be a GUI program by the user will appear in a session table next to the “Reconnect” command. When executing the reconnect command, a user can choose a disconnected job to reconnect from this session table.
Disconnect: Disconnect the GUI from the currently running simulation job. The GUI now can be used to service another simulation job. A disconnected simulation will be given a session name and stored in a session table. 0 - 12
Simulate a three-node point-to-point network with a duplex link between them. Set the queue size and vary the bandwidth and find the number of packets dropped.
Step1: Select the hub icon on the toolbar and drag it onto the working window.
Step2: Select the host icon on the toolbar and drag it onto the working window. Repeat this for another host icon.
Step3: Select the link icon on the toolbar and drag it on the screen from host (node 1) to the hub and again from host(node 2) to the hub. Here the hub acts as node 3 in the point-to-point network. This leads to the creation of the 3-node point-to-point network topology. Save this topology as a .tpl file.
Step4:Double-click on host(node 1), a host dialog box will open up. Click on Node editor and you can see the different layers- interface, ARP, FIFO, MAC, TCPDUMP, Physical layers. Select MAC and then select full-duplex for switches and routers and half duplex for hubs, and in log Statistics, select Number of Drop Packets, Number of Collisions, Throughput of incoming packets and Throughput of outgoing packets. Select FIFO and set the queue size to 50 and press OK. Then click on Add. Another dialog box pops up. Click on the Command box and type the Command according to the following syntax:
stg [-t duration(sec)] [-p port number]HostIPaddr
and click OK.
Step 5: Double-click on host (node 2), and follow the same step as above with only change in command according to the following syntax: rtg [-t] [-w log] [-p port number] and click OK.
Step 6: Double click on the link between node 1 and the hub to set the bandwidth to some initial value say, 10 Mbps. Repeat the same for the other node.
Step 7: Click on the E button (Edit Property) present on the toolbar in order to save the changes made to the topology. Now click on the R button (RunSimulation). By doing so a user can run/pause/continue/stop/abort/disconnect/reconnect/submit a simulation. No simulation settings can be changed in this mode.
Step 8: Now go to Menu->Simulation->Run. Executing this command will submit he current simulation job to one available simulation server managed by the dispatcher. When the simulation
Simulate a four-node point-to-point network and connect the link as follows: Apply a TCP agent between n0 to n3 and apply a UDP agent between n1 and n3. Apply relevant applications over TCP and UDP agents changing the parameters and determine the number of packets sent by two agents.
Step 1: Create the topology as specified in the question, in the draw mode of the simulator.
Step 2: Go to edit mode and save the topology.
Step 3: Setup a TCP connection between node 1 and node 3 using the following commands:
stcp [-p port] [-l writesize] hostIPaddr rtcp [-p port] [-l readsize]
Step 4: Setup a UDP connection between node 2 and node 3 using the following commands:
stg [-u payload size duration] [Host address] rtg [-u] [-w log]
Step 5:Set the output throughput log to determine the number of packets sent by TCP/UDP as described in experiment 1.
Step 6:To view the results, go to the filename.results folder.
PESIT-BSC BE VII Sem CSE 10CSL
The screenshot of the topology is shown below:
/ IS 06CSL77 - 19
The screenshot of the topology is shown below:
Simulate an Ethernet LAN using N nodes (6-10), change error rate and data rate and compare throughput.
Step 1: Connect one set of hosts with a hub and another set of hosts also through a hub and connect these two hubs through a switch. This forms an Ethernet LAN.
Step 2: Setup a TCP connection between a host on one hub and host on another hub using the following command:
stcp [-p port] [-l writesize] hostIPaddr rtcp [-p port] [-l readsize]
Step 3: Setup the error rate, data rate in the physical layer, input and output throughput in the mac layer as described above.
Step 4: Change error rate and data rate and compare the
throughputs. Step 5: View the results in the filename.results.