Define a topology with two nodes that are connected by a link and consider the listed...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Define a topology with two nodes that are connected by a link and consider the listed ns-3 code (page 4): (a) Create two nodes and connect these two nodes with a link having bandwidth of 5 Megabits per second as the data rate and a delay of 5 milliseconds. Insert your code in lines 20, 23, and 24. (b) Under the UdpEcho ClientHelper subject, create a traffic source. The packet size is set to 1,024 bytes and the packet will be sent every 1 second. The maximum number of packets that a client is allowed to send during the simulation is set to 5. Insert your code in lines 44-46. (c) Schedule the events client application to start at 2 seconds and end at 15 seconds. Insert your code in lines 49-50. (d) Describe the difference between the methods used in lines 40-41 and lines 49-50. (e) List the command to run ns-3 scripts. List and describe two functions used to collect and to read simulation results. 1#include "as3/core-module.h #include "as3/network-module.h #include "ns3/internet-module.h" 4 #include "as3/point-to-point-module.h #include "as3/applications-module.h 7 using namespace ns3; 8NSLOG COMPONENT DEFINE (midterm.exam 2018"); 9 int 10 main (int arge, char sargy []) 11( 12 CommandLine cmd; 13 14 15 Time::Set Resolution (Time:: NS); 16 17 18 19 20 21 22 23 24 25 26 27 28 29 InternetStackHelper stack; stack.Install (nodes); 30 31 32 33 34 35 36 emd.Parse (arge, argv); 42 43 44 45 46 47 48 49 Log Component Enable ("UdpEchoClient Application". LOG LEVEL.INFO); Log Component Enable ("UdpEchoServer Application", LOG.LEVEL.INFO): NodeContainer nodes; Point ToPoint Helper pointToPoint; Net Device Container devices; devices pointToPoint Install (nodes); Ipv4AddressHelper address; address.Set Base ("10.1.1.0", "255.255.255.0"); Ipv 4Interface Container interfaces= address. Assign (devices); 37 UdpEchoServerHelper echoServer (9): 38 39 Application Container server Apps echoServer.Install odes.Get (1)); 40 serverApps.Start (Seconds (1.0)); serverApps.Stop (Seconds (20.0)); #fill in here for part (a) #fill in here for part (a) fill in here for part (a) UdpEchoClientHelper echoClient (interfaces.GetAddress (1), 9); #fill in here for part (b) #fill in here for part (b) #fill in here for part (b) 50 51 52 53 return 0; 54} Application Container client Apps = echoClient. Install (nodes.Get (0)); #fill in here for part (e) #fill in here for part (e) Simulator:: Run (): Define a topology with two nodes that are connected by a link and consider the listed ns-3 code (page 4): (a) Create two nodes and connect these two nodes with a link having bandwidth of 5 Megabits per second as the data rate and a delay of 5 milliseconds. Insert your code in lines 20, 23, and 24. (b) Under the UdpEcho ClientHelper subject, create a traffic source. The packet size is set to 1,024 bytes and the packet will be sent every 1 second. The maximum number of packets that a client is allowed to send during the simulation is set to 5. Insert your code in lines 44-46. (c) Schedule the events client application to start at 2 seconds and end at 15 seconds. Insert your code in lines 49-50. (d) Describe the difference between the methods used in lines 40-41 and lines 49-50. (e) List the command to run ns-3 scripts. List and describe two functions used to collect and to read simulation results. 1#include "as3/core-module.h #include "as3/network-module.h #include "ns3/internet-module.h" 4 #include "as3/point-to-point-module.h #include "as3/applications-module.h 7 using namespace ns3; 8NSLOG COMPONENT DEFINE (midterm.exam 2018"); 9 int 10 main (int arge, char sargy []) 11( 12 CommandLine cmd; 13 14 15 Time::Set Resolution (Time:: NS); 16 17 18 19 20 21 22 23 24 25 26 27 28 29 InternetStackHelper stack; stack.Install (nodes); 30 31 32 33 34 35 36 emd.Parse (arge, argv); 42 43 44 45 46 47 48 49 Log Component Enable ("UdpEchoClient Application". LOG LEVEL.INFO); Log Component Enable ("UdpEchoServer Application", LOG.LEVEL.INFO): NodeContainer nodes; Point ToPoint Helper pointToPoint; Net Device Container devices; devices pointToPoint Install (nodes); Ipv4AddressHelper address; address.Set Base ("10.1.1.0", "255.255.255.0"); Ipv 4Interface Container interfaces= address. Assign (devices); 37 UdpEchoServerHelper echoServer (9): 38 39 Application Container server Apps echoServer.Install odes.Get (1)); 40 serverApps.Start (Seconds (1.0)); serverApps.Stop (Seconds (20.0)); #fill in here for part (a) #fill in here for part (a) fill in here for part (a) UdpEchoClientHelper echoClient (interfaces.GetAddress (1), 9); #fill in here for part (b) #fill in here for part (b) #fill in here for part (b) 50 51 52 53 return 0; 54} Application Container client Apps = echoClient. Install (nodes.Get (0)); #fill in here for part (e) #fill in here for part (e) Simulator:: Run ():
Expert Answer:
Answer rating: 100% (QA)
a Create two nodes Ptr node1 CreateObject Ptr node2 CreateObject Create a pointtopoint link between the two nodes with specified properties PointToPointHelper pointToPoint pointToPointSetDeviceAttribu... View the full answer
Related Book For
Smith and Roberson Business Law
ISBN: 978-0538473637
15th Edition
Authors: Richard A. Mann, Barry S. Roberts
Posted Date:
Students also viewed these computer network questions
-
A 29-year bond pays a quarterly coupon of 7% (compounded quarterly), on a face value of $2000. The bond's yield is 5% compounded quarterly. (a) Determine the price of the bond. Express your answer in...
-
The following additional information is available for the Dr. Ivan and Irene Incisor family from Chapters 1-5. Ivan's grandfather died and left a portfolio of municipal bonds. In 2012, they pay Ivan...
-
Managing Scope Changes Case Study Scope changes on a project can occur regardless of how well the project is planned or executed. Scope changes can be the result of something that was omitted during...
-
X H H H HCZO HONH HO HN. HOC H A variety of electrophiles (EY) will react with benzene, and derivatives of benzene, to yield substitution products. Halogenation of OH benzene rings is an reaction...
-
One of the hazards of prolonged weightlessness on long space missions is bone and muscle loss. To combat this problem, NASA is studying a human-powered centrifuge, like the one shown in FIGURE 6-61....
-
Summary financial information for Rapture Limited is as follows. ________________ December 31, 2017 _______December 31, 2016 Plant assets ................ 821,000 ............... 750,000 Current...
-
Which of the following is least likely to be a reason why the career paths available to information systems auditors are often limited? a. Many organizations have only a few information systems audit...
-
Macro Data Corporation's three divisions had the following operating data during the year: Required: 1. Compute the contribution margin for each division. 2. Compute the segment margin for each...
-
Provide a summary of the article below. (explain how expanding roads will be better) https://www.sciencedirect.com/science/article/abs/pii/S1369847806000817
-
Portions of the payroll register for Barney's Bagels for the week ended July 15 are shown below. The SUTA tax rate is 5.4%, and the FUTA tax rate is 0.8%, both of which are levied on the first $7,000...
-
Let be the relation defined on the set Nof natural numbers for x.y EN by xRy if and only if x +y is divisible by 3. Then: Ris symmetric Men's Zone Performance Polo - T...
-
What do you observe and understand about the history of abnormal psychology and the research relating to respective theories and treatment modalities? Textbook: Comer, R.J. Abnormal Psychology ,...
-
Prepare journal entries to record transactions a through h a. Raw materials purchased on credit, $98,000. b. Direct materials used, $41,500. Indirect materials used, $18,800. c. Direct labor used,...
-
Mickey Limited acquired a 15% interest in the only issued capital which carries voting rights in Mouse Pty Ltd on 1 January 2020. On 15 September 2020 it acquired an additional 45% interest, and on...
-
Write code to: -Step 1: Ask the user to enter company information: business registration number, company name, website, contact email, contact phone number. -Step 2: Construct a Company object with...
-
Describe the essential features of a cost volume profit income statement. Explain in detail with the help of suitable examples.
-
Write these decimals as fractions in lowest terms, and determine the prime factorization of the denominator in each case. (a) 3.28 (b) 0.18 (a) Write 3.28 as a fraction in lowest terms. 3.28 = 82 25...
-
Which of the following gives the range of y = 4 - 2 -x ? (A) (- , ) (B) (- , 4) (C) [- 4, ) (D) (- , 4] (E) All reals
-
Plaintiff (Ken Rea), as personal representative of his mothers estate, brought this action to set aside a deed from his mother to defendant Paulson (Larry), a son of decedent by a second marriage,...
-
Discuss contractual liability, warranty liability, and liability for conversion.
-
On February 26, 2011, William Stem purchased a used BMW from Gary Braden for $26,600. Stems primary purpose for buying the car was to use it to transport his child. Braden indicated to Stem that the...
-
Name and briefly describe the two direct labor variances.
-
Wong Lee used 1,200 direct labor hours at an average wage rate of \($8.70\) to manufacture products that should have used 1,300 direct labor hours at an average wage rate of \($8.50\) per hour. What...
-
The variable overhead rate is \($5\) per direct labor hour; 31,000 direct labor hours were used to produce 7,500 units of product. The standard is 4 direct labor hours per unit. Actual, variable...
Study smarter with the SolutionInn App