New User Special Price Expires in

Let's log you in.

Sign in with Facebook


Don't have a StudySoup account? Create one here!


Create a StudySoup account

Be part of our community, it's free to join!

Sign up with Facebook


Create your account
By creating an account you agree to StudySoup's terms and conditions and privacy policy

Already have a StudySoup account? Login here

Computer Networks

by: Furman Breitenberg

Computer Networks EEC 173A

Furman Breitenberg
GPA 3.93


Almost Ready


These notes were just uploaded, and will be ready to view shortly.

Purchase these notes here, or revisit this page.

Either way, we'll remind you when they're ready :)

Preview These Notes for FREE

Get a free preview of these Notes, just enter your email below.

Unlock Preview
Unlock Preview

Preview these materials now for free

Why put in your email? Get access to more of this material and other relevant free materials for your school

View Preview

About this Document

Class Notes
25 ?




Popular in Course

Popular in Engineering Electrical & Compu

This 4 page Class Notes was uploaded by Furman Breitenberg on Wednesday September 9, 2015. The Class Notes belongs to EEC 173A at University of California - Davis taught by Staff in Fall. Since its upload, it has received 32 views. For similar materials see /class/191948/eec-173a-university-of-california-davis in Engineering Electrical & Compu at University of California - Davis.

Similar to EEC 173A at UCD

Popular in Engineering Electrical & Compu


Reviews for Computer Networks


Report this Material


What is Karma?


Karma is the currency of StudySoup.

You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!

Date Created: 09/09/15
Marc Greis Tutorial for the UCBLBNLVINT Network Simulator quotnsquot Page 1 of 4 IV The rst Tcl scrlpt Brexismssectjon Nextsesliou Backmhejndex In this section you are going to develop a Tcl script for ns which simulates a simple topology You are going to learn how to set up nodes and links how to send data from one node to another how to monitor a queue and how to start nam from your simulation script to visualize your simulation IV1 How to stalt Now we are going to write a 39template that you can use for all of the first Tcl scripts You can write your Tcl scripts in any text editor like joe or emacs I suggest that you call this rst example example1tcl39 First of all you need to create a simulator object This is done with the command set ns new Simulator Now we open a le for writing that is going to be used for the nam trace data set nf open outnam w ns namtraceall nf The rst line opens the le outnam39 for writing and gives it the le handle 39nf In the second line we tell the simulator object that we created above to write all simulation data that is going to be relevant for nam into this le The next step is to add a 39 nish procedure that closes the trace le and starts nam proc finish 1 1 global ns nf ns flushtrace close nf exec nam outnam amp exit 0 1 You don t really have to understand all of the above code yet It will get clearer to you once you see what the code does The next line tells the simulator object to execute the 39 nish procedure after 50 seconds of simulation time ns at 50 quotfinishquot You probably understand what this line does just by looking at it ns provides you with a very simple way to schedule events with the 39at39 command The last line nally starts the simulation ns run You can actually save the le now and try to run it with ns example1tcl You are going to get an error message like nam empty trace le outnam though because until now we haven t de ned any objects nodes links etc or events We are going to de ne the objects in section and the events in segjon 3 httpwwwisiedunsnamnstutorialnsscript1html 11162003 Mare Grels Tutorlal for the UCBLBN LV39INT Network slrnulator ns Page 2 of4 You wlll have to use the eode from thls seeuon as stamng polnt m the other seetlons You ean download rt here Ivz Twn nudes nne link e e lmk Note hefnre the hne sns run or even better before the hne sns at 5 0 nlsh Se nu sns nude sex n1 ns nude snsnode asslgns them to the handles ho and n1 The nexthne eonneets the two nodes ns duplexrhnk snu snr 11m l ms DerTall 1Megabrt a delay of lorns and a DropTall queue and you should see an output that resembles the preture below D made a rnlstake IV3 Sending data Ofcou se butquot my aetually happens so the next step ls to send some data from node n to node n1 1n ns datars always belng sent from one agent to another So the next step ls to ereate an agent object that sends data from node no and another agent object that reeeryes the data on node n1 Create a nap eeene and neenen 1 re nude nu Se uunu new AgencUDP sns attachragen 6 creaee a can craft suuree and areaeh 1 re udnu http www lsl edunsnamnstutona1nsscnpt1html 11162003 Mare Grels Tutorlal for the UCBLBN LV39INT Network slmulator ns Page 3 of4 see chrEI new AppllcaclunTraiilcCER senru see packec lzei sun senru see ncervali uuu5 senru attachragen suunu UDP agent 3BR stands for constant brt rate Llne 7 and 8 shouldbe selfrexplalnlng The paeketSrze ls no You ean nd the relevant parameters for eaeh agent type m the ns manual page see nullu new AgentNull 115 attachragen snl snullu Now the two agents have to be eonneeted wth eaeh other 115 eunneee suupu snullu It or b bl 2 best to put the followlng llnes just before the llne sns at 5 0 flnlsh 115 a u senr scar 115 a 45 quotchr scanquot Thls eoole shouldbe selfrexplalnlng agaln play button m the nam 1 wrndow You mrght want to slow nam down then wrth the Step sllder 9 stausues 1 also suggest that you try to ehange the paeketsrzeg and lnterval parameters m the Tel senptto see whathappens You ean download the full example here example flies m the tclex duectory wlule Ileameol wlueh CBR agent arguments packetSlzei rnterval Ihaolto set from the ns manual page http www lsl edunsnamnstutona1nsscnptlhtml 11162003


Buy Material

Are you sure you want to buy this material for

25 Karma

Buy Material

BOOM! Enjoy Your Free Notes!

We've added these Notes to your profile, click here to view them now.


You're already Subscribed!

Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'

Why people love StudySoup

Steve Martinelli UC Los Angeles

"There's no way I would have passed my Organic Chemistry class this semester without the notes and study guides I got from StudySoup."

Amaris Trozzo George Washington University

"I made $350 in just two days after posting my first study guide."

Jim McGreen Ohio University

"Knowing I can count on the Elite Notetaker in my class allows me to focus on what the professor is saying instead of just scribbling notes the whole time and falling behind."

Parker Thompson 500 Startups

"It's a great way for students to improve their educational experience and it seemed like a product that everybody wants, so all the people participating are winning."

Become an Elite Notetaker and start selling your notes online!

Refund Policy


All subscriptions to StudySoup are paid in full at the time of subscribing. To change your credit card information or to cancel your subscription, go to "Edit Settings". All credit card information will be available there. If you should decide to cancel your subscription, it will continue to be valid until the next payment period, as all payments for the current period were made in advance. For special circumstances, please email


StudySoup has more than 1 million course-specific study resources to help students study smarter. If you’re having trouble finding what you’re looking for, our customer support team can help you find what you need! Feel free to contact them here:

Recurring Subscriptions: If you have canceled your recurring subscription on the day of renewal and have not downloaded any documents, you may request a refund by submitting an email to

Satisfaction Guarantee: If you’re not satisfied with your subscription, you can contact us for further help. Contact must be made within 3 business days of your subscription purchase and your refund request will be subject for review.

Please Note: Refunds can never be provided more than 30 days after the initial purchase date regardless of your activity on the site.