Solución Del Capítlo 1 de Fibra Óptica
Solución Del Capítlo 1 de Fibra Óptica
Solución Del Capítlo 1 de Fibra Óptica
Anbao Wang
School of Computer and Information, Shanghai Second Polytechnic University, Shanghai 201209 China
e-mail: [email protected]
Abstract—Due to the complexity of network, the original results under a network environment of high degree of
teaching method cannot meet the needs of development of complexity.
network. Network simulation is an effective means of b) Forecast function of network simulation is unmatched
researching in network protocols and a new kind of network by any other method.
design and optimization technique, it can provide reliable c) Wide range of use, both optimization and expansion
network planning design of quantitative basis, also can test of the existing networks and design of the new network can
plan, or compare different design schemes. This paper be used, and particularly applicable for design and
introduces the principle and characteristic of ns3, proposes
optimization of Medium and large network.
using open source software ns3 as an assistant means to
d) Low initial application cost, only very few funds will
improve the teaching quality, and also discusses the
application of ns3 in network education as well. An example is
be able to provide practical network design and operating
provided at the end of this paper. environment for large number of students, furthermore, the
constructed network model can continue to use so that the
Keywords- teaching; PPP network; ns3, network simulator; latter investment will still decline continuously.
e) It is flexible, vivid and visual to use simulator for
teaching. To teach via network simulator, students can
I. SHORTCOMING OF TEACHING IN CURRENT NETWORK visually see the dealing of the network protocol and
COURSE
understand the effect of various environmental or other
factors on the network, can also demonstrate the advantages
A. Shortcoming and disadvantages of various strategies through comparison.
Modern Information Network courses are mainly related f) The simulation results can be reproduced and easily
to a variety of network protocols, which teaching contents analysis. In this platform, the experimenter can obtain
are mostly based on the five-layer reference model of "ideal" network environment via configuring environmental
TCP/IP. Due to the limited analyze for the theory of protocol parameters and can real-time track and record important
in the teaching, students often feel dry and abstract in the information of key node so as to gain the first-hand
learning process. information about network performance evaluation.
Most people feel it is difficult to understand in the end of Moreover, certain special circumstances can be reproduced
the course. Most of the existing teaching means are the at any time, which is difficult to do in the real network.
principle course plus the experiment course. Principle course
basically adopt such teaching methods as writing on II. INTRODUCTION TO NETWORK SIMULATOR NS3
blackboard, using multimedia and so on. Multimedia mostly The ns3 simulator is a discrete-event network simulator
use PowerPoint slides, just simply move books onto the targeted primarily for research and educational use. In ns3,
computer screen, so enhancing the role of teaching the simulator is written entirely in C++, with optional
performance is little; In addition, because of the complexity Python bindings. Simulation scripts can therefore be written
of the network, school cannot buy a lot of network in C++ or in Python. The results of some simulations can be
equipment; Furthermore, network development is fast, visualized by nam, but new animators are under
various new protocols and equipment are updated constantly, development. Since ns3 generates pcap packet trace files,
it is difficult to build an environment of network to practice other utilities such as Wireshark can be used to analyze
teaching, so the experiment method cannot be used to allow traces as well [8-9].
students access to perceptual knowledge. Even if there is a ns3 is a free software simulation platform which aims at
real experiment environment, facing to huge and complex network technology and whose source code is open.
network environment, students will likewise not gain the Researchers can use it easily to develop network technology.
upper hand, and are difficult to understand the real effect ns3 contains an abundance of modules, almost relating to all
brought about by a variety of factors. So a lot of methods are the aspects of network technology. A large number of
researched to get good teaching results. [14] people are using or attempt to use ns3 in the education sector
B. The advantages of using the network simulator and academic community at present [1-7].
Network simulation technology has the following
characteristics [6]:
a) The entirely new simulation experiment mechanism
makes it have the characteristics of gaining high reliability
7
At time 2.00737s client received 1024 bytes from 10.1.1.2 port 9 Figure 2 shows that there is a point to point connection
By explaining the message above, it can tell the students between node n0 (ip address 10.1.1.1) and node n1 (ip
when and where the package is sent or received on the PPP address 10.1.1.2), we run this simulation about 200 seconds,
peer layer. It can be used to explain the operation mode of the following is the analysis of the result in this experiment
the Client/Server as well. for node n0, and firstly, this simulation result tells the
We want to tell the students the network performance students how the Point to Point network acts step by step
parameters in different parameters, so we change some over time. There are 196 packages which are sent or
parameters for the simulation showed in table2, the others received in n0, we can scan every packets to learn the details,
are remains unchanged as table1. for example, the first packet, the data’s length is 1024 bytes,
the UDP (User Datagram Protocol) is used to encapsulate
TABLE II. THE PARAMETERS FOR THE SIMULATION
the data from the upper layer in the transport layer, the Src
Name value port is 49153, and the Dst port is 9. The ipv4 is used in
Device DataRate 1Mbps network layer, and then the PPP is used in second layer. We
Channel Delay 1ms can also get the protocol hierarchy using the Wireshark
Client MaxPackets 200
Client Interval 1s(Seconds)
which is show in Figure 3, and it is clearer than the Figure 2.
Client PacketSize 1024
Server Start 1.0s(Seconds)
Server Stop 100.0s(Seconds)
Client Start 2.0s (Seconds)
Client Stop 100.0 s (Seconds)
The pcap files are the output when the simulation stops,
and they can be used to help the students to learn the data
transfer between the two nodes between the client (node n0) Figure 3. protocol hierarchy
and the server (node n1). When the command “tcpdump” is
used to display the pcap file for node n0, the output is as Figure 2 and Figure 3 is the simulation procedures of the
follows. selected node in this simulation, it presents packets transfer
reading from file ppp-0-0.pcap, link-type PPP (PPP) between the client and the server in a manner of easy way to
2.000000 IP 10.1.1.1.49153 > 10.1.1.2.9: UDP, length 1024 understand for students, and also it is convenient to use
2.018864 IP 10.1.1.2.9 > 10.1.1.1.49153: UDP, length 1024 some kind of the tools to get the statistics data of this node
3.000000 IP 10.1.1.1.49153 > 10.1.1.2.9: UDP, length 1024 which is showed in Table 3.
3.018864 IP 10.1.1.2.9 > 10.1.1.1.49153: UDP, length 1024
4.000000 IP 10.1.1.1.49153 > 10.1.1.2.9: UDP, length 1024 In Table 3, it shows that in 100 seconds 196 packets
4.018864 IP 10.1.1.2.9 > 10.1.1.1.49153: UDP, length 1024 were transmitted, there are 97.017 seconds between first and
5.000000 IP 10.1.1.1.49153 > 10.1.1.2.9: UDP, length 1024 last packet, it is accordance with our estimate, the average
The first line of the output indicates that the link type is packets/sec is 2.020, and the average packet size is about
PPP (point-to-point) which we expect. You then see the 1054.000 bytes. From these statistics data it provides extra
echo packet leaving node n0 at 2 seconds via the device help for students to master the PPP network procedure with
associated with IP address 10.1.1.1, node n0 headed for IP accurate statistic information.
address 10.1.1.2, node n1. This packet will move over the
point-to-point link and be received by the point-to-point net TABLE III. THE STATISTICS DATA IN NODE N0
device on node n1. Name value
The second line of the output indicates that the reply Packets 196
packet leaving node n1 at 2.018864 seconds via the device Between first and last packet 97.017 sec
associated with IP address 10.1.1.2, node n1 headed for IP Avg. packets/sec 2.020
address 10.1.1.1 node n0. This packet will move over the Avg packet size 1054.000 bytes
point-to-point link and be received by the point-to-point net Bytes 206584
Avg bytes/sec 2129.357
device on node n0.
Avg Mbit/sec 0.017
After the simulation, the tool of Wireshark is used to
From the analysis of the work procedure in the point to
display the simulation procedure; it is very useful and vivid
point network between the node n0 and n1, the students can
to find how the packet is sent and received. The result for n0
easily understand the real process and the details of the point
is display in figure 2.
to point network, it can tell the student the time when the
package is send or received; where the package is send or
received. The size and protocol type of the packet is present
to the student obviously as well.
In the rest of the experiment, one of parameters is
changed in PPP network, the Client Interval is changed
between 0.1s to 2ms, and we want to tell the students how it
can affect the performance in node n0 of PPP network. The
Figure 2. Procedure of the packets sent and received.
result are showed in Figure 4, Figure 5, and Figure 6.
8
those files, the protocol working procedure can also be
easily lay out lively.
IV. CONCLUSION
Teaching practice indicates that the teaching of computer
network course not only needs the content of theory teaching
modernization as well as that of practical teaching in the
time when the development of computer network becomes
complexity more and more, but also needs to continuously
explore and research advanced teaching ideas and methods
and means to stimulate students’ interests in this course and
improve teaching quality. Here, the network simulation tool
Figure 4. Packets transfer according to the Client Interval ns3 as a teaching aid to construct a virtual network
simulation teaching environment, which has positive
significance in improving teaching effect and level of
computer network course and can make up for the
shortcoming of current computer network course teaching to
a certain extent. This is an entirely new exploration in the
teaching of computer network course.
REFERENCES
[1] Larry L. Peterson, Bruce S. Davie. Computer Networks A Systems
Approach(Second Edition) [M], Machinery Industry Press,
2001:468-482
[2] Kinsner, W., & Pear, J. J. (1988). Computer-aided personalized
system of instruction for the virtual classroom. Canadian Journal of
Educational Communication, 17, 21–36.
[3] Kinsner, W., & Pear, J. J. (1990). Dynamic educational system for
Figure 5. Duraition between first and last packet according to the Client the virtual campus. In Studies in technological innovation and human
Interval resources. In U. E. Gattiker (Ed.). End-user training (Vol. 2, pp. 201–
228). Berlin: Walter de Gruyter.
[4] R.C.T. Ellis, I. Dickinson, M. Green, M. Smith, The implementation
and evaluation of an undergraduate virtual reality surveying
application, in: Proceedings of the Built Environment Education
Conference (BEECON 2006), September 12–13, 2006, London, UK.
[5] C.M. Li, I.C. Yeh, S.F. Cheng, T.Y. Chiang and L.C. Lien, Virtual
reality learning system for digital terrain model surveying practice,
Audio–Visual Education Bimonthly 48 (5) (2007), pp. 1–18 (in
Chinese). Full Text via CrossRef
[6] Lin Huaiqing, Wang Bin, Qi Yuhua, Research of Teaching on
Modem Information Network Curriculum Based on NS2, Ship
Electronic Engineering, 2006:102-105
[7] KE Zong-wu, HONG Jia-ping, TONG Yu, CHEN Nian-sheng,
DONG Wu-shi, the research of NS2-based network education,
Journal of Hubei Normal University (Natural Science), 2005:65-69
[8] ns3 project ns3 Tutorial[EB/OL]. http://www.nsnam.org/, 2015-4-30
Figure 6. Avg. packets/sec and Avg bytes/sec according to the Client [9] ns3 project ns3 Reference Manual[EB/OL]. http://www.nsnam.org/,
Interval 2015-4-30
[10] Fall K, Varadhan K1 The NSManual[EB/OL].
Figure 4 shows that packets count decreases when the http://www.isi.edu/nsnam/ns, 2015-4-30
client interval increases, Figure 5 shows that duration [11] Kevin Fal, Kannan Varadhan. The ns Manual ( formerly ns Notes
and Documentation) [OL]. http://www. isi. edu/nsnam/
increases when the client interval increases, Figure 6 tells ns/nsdocumentation.html, 2005, 11, 25
that the average bytes/sec and packets/sec decrease when the [12] Perkins, D., "Requirements for an Internet Standard Point-to-Point
client interval increases. We can use Figure 4, Figure 5, and Protocol", RFC 1547, Carnegie Mellon University, December 1993.
Figure 6 to help students to do some research works, to help [13] W. Simpson, "Request for Comments", RFC 1661, July 1994.
students to learn scientific research methods and techniques. [14] Anbao WANG; Wenrong JIANG , Research of Teaching on Network
After this experiment the students will extend the Course Based on NS-3, First International Workshop on Education
knowledge of the theory in the textbook, if students want to Technology and Computer Science vol 2: 629-632, 2009.
further understand the protocol stacks we can design the [15] Xinghui, Zhang; Anbao Wang The Study of Wireless Radio
simulation environment to get more trace files, more Interference Based on OPNET, 2nd International Symposium on
protocol details and its construction are got by analyzing Information Engineering and Electronic Commerce (IEEC), 1-3,
2010.