[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
In this section, we'll review some terms that are commonly used in
networking, but have a specific meaning in ns-3
.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
In Internet jargon, a computing device that connects to a network is called
a host or sometimes an end system. Because ns-3
is a
network simulator, not specifically an Internet simulator, we
intentionally do not use the term host since it is closely associated with
the Internet and its protocols. Instead, we use a more generic term also
used by other simulators that originates in Graph Theory — the node.
In ns-3
the basic computing device abstraction is called the
node. This abstraction is represented in C++ by the class Node
. The
Node
class provides methods for managing the representations of
computing devices in simulations.
You should think of a Node
as a computer to which you will add
functionality. One adds things like applications, protocol stacks and
peripheral cards with their associated drivers to enable the computer to do
useful work. We use the same basic model in ns-3
.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Typically, computer software is divided into two broad classes. System Software organizes various computer resources such as memory, processor cycles, disk, network, etc., according to some computing model. System software usually does not use those resources to complete tasks that directly benefit a user. A user would typically run an application that acquires and uses the resources controlled by the system software to accomplish some goal.
Often, the line of separation between system and application software is made
at the privilege level change that happens in operating system traps.
In ns-3
there is no real concept of operating system and especially
no concept of privilege levels or system calls. We do, however, have the
idea of an application. Just as software applications run on computers to
perform tasks in the “real world,” ns-3
applications run on
ns-3
Nodes
to drive simulations in the simulated world.
In ns-3
the basic abstraction for a user program that generates some
activity to be simulated is the application. This abstraction is represented
in C++ by the class Application
. The Application
class provides
methods for managing the representations of our version of user-level
applications in simulations. Developers are expected to specialize the
Application
class in the object-oriented programming sense to create new
applications. In this tutorial, we will use specializations of class
Application
called UdpEchoClientApplication
and
UdpEchoServerApplication
. As you might expect, these applications
compose a client/server application set used to generate and echo simulated
network packets
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
In the real world, one can connect a computer to a network. Often the media
over which data flows in these netowrks are called channels. When
you connect your Ethernet cable to the plug in the wall, you are connecting
your computer to an Ethernet communication channel. In the simulated world
of ns-3
, one connects a Node
to an object representing a
communication channel. Here the basic communication subnetwork abstraction
is called the channel and is represented in C++ by the class Channel
.
The Channel
class provides methods for managing communication
subnetwork objects and connecting nodes to them. Channels
may also be
specialized by developers in the object oriented programming sense. A
Channel
specialization may model something as simple as a wire. The
specialized Channel
can also model things as complicated as a large
Ethernet switch, or three-dimensional space full of obstructions in the case
of wireless networks.
We will use specialized versions of the Channel
called
CsmaChannel
, PointToPointChannel
and WifiChannel
in this
tutorial. The CsmaChannel
, for example, models a version of a
communication subnetwork that implements a carrier sense multiple
access communication medium. This gives us Ethernet-like functionality.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
It used to be the case that if you wanted to connect a computers to a network, you had to buy a specific kind of network cable and a hardware device called (in PC terminology) a peripheral card that needed to be installed in your computer. If the peripheral card implemented some networking function, theys were called Network Interface Cards, or NICs. Today most computers come with the network interface hardware built in and users don't see these building blocks.
A NIC will not work without a software driver to control the hardware. In Unix (or Linux), a piece of peripheral hardware is classified as a device. Devices are controlled using device drivers, and network devices (NICs) are controlled using network device drivers collectively known as net devices. In Unix and Linux you refer to these net devices by names such as eth0.
In ns-3
the net device abstraction covers both the software
driver and the simulated hardware. A net device is “installed” in a
Node
in order to enable the Node
to communicate with other
Nodes
in the simulation via Channels
. Just as in a real
computer, a Node
may be connected to more than one Channel
via
multiple NetDevices
.
The net device abstraction is represented in C++ by the class NetDevice
.
The NetDevice
class provides methods for managing connections to
Node
and Channel
objects; and may be specialized by developers
in the object-oriented programming sense. We will use the several specialized
versions of the NetDevice
called CsmaNetDevice
,
PointToPointNetDevice
, and WifiNetDevice
in this tutorial.
Just as an Ethernet NIC is designed to work with an Ethernet network, the
CsmaNetDevice
is designed to work with a CsmaChannel
; the
PointToPointNetDevice
is designed to work with a
PointToPointChannel
and a WifiNetNevice
is designed to work with
a WifiChannel
.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
In a real network, you will find host computers with added (or built-in)
NICs. In ns-3
we would say that you will find Nodes
with
attached NetDevices
. In a large simulated network you will need to
arrange many connections between Nodes
, NetDevices
and
Channels
.
Since connecting NetDevices
to Nodes
, NetDevices
to Channels
, assigning IP addresses, etc., are such common tasks
in ns-3
, we provide what we call topology helpers to make
this as easy as possible. For example, it may take many distinct
ns-3
core operations to create a NetDevice, add a MAC address,
install that net device on a Node
, configure the node's protocol stack,
and then connect the NetDevice
to a Channel
. Even more
operations would be required to connect multiple devices onto multipoint
channels and then to connect individual networks together into internetworks.
We provide topology helper objects that combine those many distinct operations
into an easy to use model for your convenience.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] |
This document was generated on December, 19 2008 using texi2html 1.78.