CN Lab Manual PDF
CN Lab Manual PDF
Tech II SEM
List of Experiments:
Equipment Required:
1. PC with Omnet++ Software Installed
References:
1. Behrouz A. Forouzan, ―Data Communications and Networking‖, Tata McGraw-Hill, 4th Ed
2. Online learning resources/virtual labs: https://doc.omnetpp.org/omnetpp/manual
LABORATORY INSTRUCTIONS
1. While entering the Laboratory, the students should follow the dress code. (Wear shoes and
White apron, Female Students should tie their hair back).
2. The students should bring their observation book, record, calculator, necessary stationery items
and graph sheets if any for the lab classes without which the students will not be allowed for
doing the experiment.
3. All the equipment and components should be handled with utmost care. Any breakage or
damage will be charged.
5. The theoretical calculations and the updated register values should be noted down in the
observation book and should be corrected by the lab in-charge on the same day of the
laboratory session.
6. Each experiment should be written in the record note book only after getting signature from the
lab in-charge in the observation notebook.
7. Record book must be submitted in the successive lab session after completion of experiment.
To be a center of excellence focusing on high quality technical education, research and technical services
with global leadership competence to succeed in employment and higher education with ethical, social,
entrepreneurial aspects updating to the real time requirements
M1: To impart high quality technical education by providing the state of the art infrastructure, core
instruction.
M2: Advanced research and technical consultancy services with qualified and senior faculty.
M3: To prepare the students professionally deft and intellectually adept possessing excellent skill,
knowledge and behavior with global competence.
To be a focal centre for academic excellence in competing global standards and dynamics in the field of
Electronics and Communication Engineering with research and services focusing on effective
communication skills, entrepreneurial, ethical and social concern.
M1: To impart quality technical education in Electronics and Communication Engineering with well-
established infrastructure, state-of-the art laboratories, core instructions and cognizant faculty.
M2: To prepare the young and dynamic Electronics and Communication Engineers professionally deft and
intellectually adept with knowledge, behavior and information competency.
M3: To enable the learners for changing trends in the field of Electronics and Communication Engineering
with a focus on career guidance, placements and higher education by Industry-Institute relationship.
PEO1: Graduates should be cognizant in basic science, fundamental engineering stream along with core
related domains in ECE and Allied fields.
PEO2: Graduates should understand issues related to design, problem solving, and intellectually adept
with knowledge, behavior and information competency.
PEO3: Graduates should demonstrate their technical, communication, research, aptitudes along with
leadership skills in professional environment to empower employability, higher education and
entrepreneurs successfully through industry-institute interaction.
PEO4: Graduates should be motivated with high ethical, human values and team work towards
development of the society.
PSO1: An ability to get an employment in Electronics and Communication Engineering field and related
industries and to participate & succeed in competitive examinations like GRE, GATE,TOEFL, PSUs, etc.
PSO2: Should be able to design and test various electronic systems that perform analog and digital
processing functions.
PROGRAM OUTCOMES
PO1. Engineering Knowledge: An ability to apply the knowledge of mathematics, science, engineering
fundamentals, and an engineering specialization to the solution of complex engineering problems as
appropriate to the field of electronics & communication engineering practice.
PO2. Problem Analysis: Ability to Identify, formulates, review research literature, and analyze complex
Engineering problems reaching substantiated conclusions using first principles of mathematics, natural
sciences, and engineering sciences.
PO3. Design/development of solutions: Ability to Design solutions for complex engineering problems and
design system components or processes that meet the specified needs with appropriate consideration for
the public health and safety, and the cultural, societal, and environmental considerations.
PO4. Conduct investigations of complex problems: Apply research-based knowledge and research
methods including design of experiments, analysis and interpretation of data pertaining to Electronics &
Communication Engineering problems and arrive valid conclusions.
PO5. Modern tool usage: An ability to use the techniques, resources and modern engineering tools
necessary for modeling the complex system design in Electronics and Communication Engineering.
PO6. The engineer and society: Apply reasoning informed by the contextual knowledge to assess societal,
health, safety, legal and cultural issues and the consequent responsibilities relevant to the professional
engineering practice.
PO7. Environment and sustainability: An Ability to understand the impact of the professional engineering
solutions in societal and environmental contexts, and demonstrate the knowledge of need for sustainable
development.
PO8. Ethics: Apply ethical principles and commit to professional ethics and responsibilities and norms of
the engineering practice.
PO9. Individual and team work: Function effectively as an individual, and as a member or leader in
diverse teams, and in multidisciplinary settings.
PO10. Communication: Communicate effectively in both verbal and written forms such as, being able to
comprehend and write effective reports and design documentation, make effective presentations, and give
and receive clear instructions.
PO11. Project management and finance: Demonstrate knowledge and understanding of the engineering and
management principles and apply these to one’s own work, as a member or a leader in a team, to manage
projects in multidisciplinary environments.
PO12. Life-long learning: Recognize the need for, and have the preparation and ability to engage in
independent and life-long learning in the broadest context of technological change.
EXP. NO. 1 SIMULATE TELNET AND FTP BETWEEN N SOURCES & N SINKS
Aim
To Simulate telnet and ftp between N sources - N sinks (N = 1, 2, 3) and to evaluate the effect of
increasing data rate on congestion.
Apparatus
Programs:
network TelnetTutorialStep
{
@display("bgb=400,200");
submodules:
client: TelnetClientTraffic {
@display("p=100,100");
}
server: TelnetServerTraffic {
@display("p=300,100");
}
connections:
client.out --> server.in;
client.in <-- server.out;
}
module TelnetClientTraffic
{
parameters:
@display("i=block/app");
gates:
input in;
output out;
submodules:
characterProducer: <default("ActivePacketSource")> like IActivePacketSource {
parameters:
packetLength = 1B;
packetData = intuniform(97, 122); // lower case ASCII characters
productionInterval = uniform(0.1s, 0.2s); // typing speed between 5 and 10 characters per
second
@display("p=100,100");
}
enterProducer: <default("ActivePacketSource")> like IActivePacketSource {
parameters:
packetLength = 1B;
packetData = 13; // enter character
productionInterval = 0.1s;
@display("p=300,100");
}
emptyProducer: <default("EmptyPacketSource")> like IActivePacketSource {
parameters:
@display("p=500,100");
}
scheduler: <default("MarkovScheduler")> like IPacketScheduler {
parameters:
transitionProbabilities = "0 1 0 0 0 1 1 0 0"; // character -> enter -> wait -> character
waitIntervals = "uniform(0,3) 0 uniform(10,30)";
@display("p=300,200");
}
consumer: <default("PassivePacketSink")> like IPassivePacketSink {
parameters:
@display("p=100,200");
}
connections:
characterProducer.out --> scheduler.in++;
enterProducer.out --> scheduler.in++;
emptyProducer.out --> scheduler.in++;
scheduler.out --> { @display("m=s"); } --> out;
in --> { @display("m=s"); } --> consumer.in;
}
module TelnetServerTraffic
{
parameters:
@display("i=block/app");
gates:
input in;
output out;
submodules:
cloner: PacketCloner {
parameters:
@display("p=300,225");
}
Procedure
Thus the simulation of Telnet and ftp on links established between source and sink nodes is performed
using Omnet++ IDE.
Viva Questions
Reference: https://inet.omnetpp.org/docs/tutorials/queueing/doc/Telnet.html
Aim
Queue Management is defined as the algorithm that manage the length of the packet queues by
dropping packets when necessary. From the point of packet dropping, Queue management can be
classified into 2 types
1. Passive Queue Management: In Passive Queue Management the packet drop occurs only
when the buffer gets full. Ex: Drop Tail.
2. Active Queue Management: Active Queue Management employs preventive packet drops. It
provides implicit feedback mechanism to notify senders of the onset of congestion. Arriving
packets are randomly dropped. Ex: RED.
Drop Tail: In this packets are dropped from the tail of the queue. Once buffer gets full, all arriving
packets are discarded. Packets already in the queue are not affected.
Random Early Detection: RED accepts all packets until the queue reaches minth, after which it
drops a packet with a linear probability distribution function. When the queue length reaches maxth
all packets are dropped with probability of one.
For example, a queue may have lower thresholds for lower priority packet. A queue buildup will
cause the lower priority packets to be dropped, hence protecting the higher priority packets in the
same queue. In this way quality of service prioritization is made possible for important packets from a
pool of packets using the same buffer.
It is more likely that standard traffic will be dropped instead of higher prioritized traffic.
WRED proceeds in this order when a packet arrives:
● Automatic setting of maximum threshold (maxth). It is set depending on the value of minth.
● Automatic setting of wq. It is set as a function of the link capacity (C).
● The adaptive setting of maxp. It is adapted according to the current average queue length.
Department of ECE Page 14
Communication Networks Laboratory III B. Tech II SEM
Fifo.ned File:
network FifoNet
{
submodules:
gen: Source {
parameters:
@display("p=89,100");
}
fifo: Fifo {
parameters:
@display("p=209,100");
}
sink: Sink {
parameters:
@display("p=329,100");
}
connections:
gen.out --> fifo.in;
fifo.out --> sink.in;
}
Omnetpp.ini:
[General]
network = FifoNet
sim-time-limit = 100h
cpu-time-limit = 300s
#debug-on-errors = true
#record-eventlog = true
[Config Fifo1]
description = "low job arrival rate"
**.gen.sendIaTime = exponential(0.2s)
**.fifo.serviceTime = 0.01s
[Config Fifo2]
description = "high job arrival rate"
**.gen.sendIaTime = exponential(0.01s)
**.fifo.serviceTime = 0.01s
Procedure
Result
Viva Questions
1. What is RED?
2. What is adaptive RED ?
3. What is weighted RED ?
4. What is the difference between RED, Adaptive and Weighted RED ?
Aim
Apparatus
HTTP:
Features of HTTP:
o Connectionless protocol: HTTP is a connectionless protocol. HTTP client initiates a request
and waits for a response from the server. When the server receives the request, the server
processes the request and sends back the response to the HTTP client after which the client
disconnects the connection. The connection between client and server exist only during the
current request and response time only.
o Media independent: HTTP protocol is a media independent as data can be sent as long as
both the client and server know how to handle the data content. It is required for both the
client and server to specify the content type in MIME-type header.
o Stateless: HTTP is a stateless protocol as both the client and server know each other only
Department of ECE Page 17
Communication Networks Laboratory III B. Tech II SEM
during the current request. Due to this nature of the protocol, both the client and server do not
retain the information between various requests of the web pages.
HTTP Transactions
FTP
Objectives of FTP
Although transferring files from one system to another is very simple and straightforward, but
sometimes it can cause problems. For example, two systems may have different file conventions.
Two systems may have different ways to represent text and data. Two systems may have different
directory structures. FTP protocol overcomes these problems by establishing two connections
between hosts. One connection is used for data transfer, and another connection is used for the control
connection.
Mechanism of FTP
The above figure shows the basic model of the FTP. The FTP client has three components: the user
interface, control process, and data transfer process. The server has two components: the server
control process and the server data transfer process.
Control Connection: The control connection uses very simple rules for communication. Through
control connection, we can transfer a line of command or line of response at a time. The control
connection is made between the control processes. The control connection remains connected during
the entire interactive FTP session.
Data Connection: The Data Connection uses very complex rules as data types may vary. The data
connection is made between data transfer processes. The data connection opens when a command
comes for transferring the files and closes when the file is transferred.
FTP Clients
o FTP client is a program that implements a file transfer protocol which allows you to transfer
files between two hosts on the internet.
o It allows a user to connect to a remote host and upload or download the files.
o It has a set of commands that we can use to connect to a host, transfer the files between you
and your host and close the connection.
o The FTP program is also available as a built-in component in a Web browser. This GUI based
FTP client makes the file transfer very easy and also does not require to remember the FTP
commands.
DBMS:
Data is the cornerstone of any modern software application, and databases are the most
common way to store and manage data used by applications. With the explosion of web and cloud
technologies, databases have evolved from traditional relational databases to more advanced types of
databases such as NoSQL, columnar, key-value, hierarchical, and distributed databases. Each type
has the ability to handle structured, semi-structured, and even unstructured data.
On top of that, databases are continuously handling mission-critical and sensitive data. When this is
coupled with compliance requirements and the distributed nature of most data sets, managing
databases has become highly complex. As a result, organizations require robust, secure, and user-
friendly tools to maintain these databases. This is where database management systems come into
play—by offering a platform to manage databases. Let’s take a look.
A database management system (DBMS) is a software tool that enables users to manage a
database easily. It allows users to access and interact with the underlying data in the database. These
actions can range from simply querying data to defining database schemas that fundamentally affect
the database structure. Furthermore, DBMS allow users to interact with a database securely and
concurrently without interfering with each user and while maintaining data integrity.
Performance tuning.
DBMS can monitor the performance of databases using integrated tools and enable users to tune
databases by creating optimized indexes. It reduces I/O usage to optimize SQL queries, enabling
the best performance from the database.
Data recovery.
In a recovery operation, DBMS provides a recovery platform with the necessary tools to fully or
partially restore databases to their previous state—effortlessly.
All these administrative tasks are facilitated using a single management interface. Most modern
DBMS support handling multiple database workloads from a centralized DBMS software, even in a
distributed database scenario. Furthermore, they allow organizations to have a governable top- down
view of all the data, users, groups, locations, etc., in an organized manner. The following diagram
illustrates the schematic of a DBMS system:
All DBMS comes with various integrated components and tools necessary to carry out almost
all database management tasks. Some DBMS software even provides the ability to extend beyond the
core functionality by integrating with third-party tools and services, directly or via plugins.
In this section, we will look at the common components that are universal across all DBMS software,
including:
Storage engine
Query language
Query processor
Optimization engine
Metadata catalog
Log manager
Reporting and monitoring tools
Data utilities
Storage engine
The storage engine is the core component of the DBMS that interacts with the file system at an OS
level to store data. All SQL queries which interact with the underlying data go through the storage
engine.
Query language
A database access language is required for interacting with a database, from creating databases to
simply inserting or retrieving data. A proper DBMS must support one or multiple query languages
and language dialects. Structured query language (SQL) and MongoDB Query Language (MQL) are
two query languages that are used to interact with the databases.
In many query languages, the query language functionality can be further categorized according to
specific tasks:
Data Definition Language (DDL). This consists of commands that can be used to define
database schemas or modify the structure of database objects.
Data Manipulation Language (DML). Commands that directly deal with the data in the
database. All CRUD operations come under DML.
Data Control Language (DCL). This deals with the permissions and other access controls of
the database.
Transaction Control Language (TCL). Command which deals with internal database
transactions.
Query processor
This is the intermediary between the user queries and the database. The query processor interprets the
queries of users and makes them actionable commands that can be understood by the database to
perform the appropriate functionality.
Optimization engine
The optimization Engine allows the DBMS to provide insights into the performance of the database
in terms of optimizing the database itself and queries. When coupled with database monitoring tools,
it can provide a powerful toolset to gain the best performance out of the database.
Metadata catalog
This is the centralized catalog of all the objects within the database. When an object is created, the
DBMS keeps a record of that object with some metadata about it using the metadata catalog. Then,
this record can be used to:
Log manager
This component will keep all the logs of the DBMS. These logs will consist of user logins and
activity, database functions, backups and restore functions, etc. The log manager ensures all these
logs are properly recorded and easily accessible.
Data utilities
In addition to all the above, most DBMS software comes with additional inbuilt utilities to provide
functionality such as:
Source Code:
Httpnet.ned File:
network HTTPNet
{
parameters:
int numClients @prompt("Number of clients:") = default(3);
submodules:
server: HTTPServer {
parameters:
@display("p=426,178");
}
cloud: Cloud {
parameters:
@display("p=274,182");
gates:
g[numClients+2];
}
extClient: ExtHTTPClient {
parameters:
addr = 1;
srvAddr = 0;
@display("p=102,92;t=Run the simulation\\, then\nenter into your
browser:\nhttp://localhost:4242");
}
client[numClients]: HTTPClient {
parameters:
addr = 2+index;
srvAddr = 0;
@display("p=102,162,col");
}
connections:
server.g <--> cloud.g[0];
extClient.g <--> cloud.g[1];
client[i].g <--> cloud.g[i+2] for i=0..numClients-1;
}
Omnetpp.ini File:
[General]
scheduler-class = "cSocketRTScheduler"
[Config HTTPExample]
description = "HTTP model"
network = HTTPNet
**.numClients = 5
**.cloud.propDelay = 0.1s
**.server.serviceTime = 0.1s
**.client[*].sendIaTime = exponential(15s)
[Config TelnetExample]
description = "Telnet model"
network = TelnetNet
**.numClients = 5
**.cloud.propDelay = 0.1s
**.server.serviceTime = 0.1s
**.client[*].sendIaTime = exponential(3s)
Procedure
Result
Thus the simulation of HTTP, FTP and DBMS access in networks is performed.
Viva Questions
Aim
To determine the effect of VLAN on network performance –i) multiple VLANs and single router ii)
multiple VLANs with separate multiple routers.
.
Apparatus
VLAN is a custom network which is created from one or more local area networks. It enables a group of
devices available in multiple networks to be combined into one logical network. The result becomes a
virtual LAN that is administered like a physical LAN. The full form of VLAN is defined as Virtual
Local Area Network.
The below topology depicts a network having all hosts inside the same virtual LAN:
Without VLANs, a broadcast sent from a host can easily reach all network devices. Each and every
device will process broadcast received frames. It can increase the CPU overhead on each device and
reduce the overall network security.
In case if you place interfaces on both switches into separate VLAN, a broadcast from host A can
reach only devices available inside the same VLAN. Hosts of VLANs will not even be aware that the
communication took place. This is shown in the below picture:
VLAN in networking is a virtual extension of LAN. A LAN is a group of computer and peripheral
devices which are connected in a limited area such as school, laboratory, home, and office building. It
is a widely useful network for sharing resources like files, printers, games, and other applications.
In LAN, the network packet is advertised to In VLAN, the network packet is sent to only a
each and every device. specific broadcast domain.
A VLAN is a logical grouping of devices on a network. VLANs are used to segment a network into
smaller, more manageable pieces. VLANs are created by configuring a router or switch to divide a
physical network into multiple logical networks.
Creating a VLAN is a two-step process. First, you must create the VLAN itself. This is done by
configuring a router or switch to create a new logical network. Second, you must add devices to the
VLAN. This is done by configuring the router or switch to add devices to the VLAN.
Adding devices to a VLAN is a simple process. First, you must determine which devices you want to
add to the VLAN. Second, you must configure the router or switch to add those devices to the VLAN.
Switches generate a VLAN as a broadcast domain. You, the administrator, set up some switch ports
in a different VLAN than the default VLAN for the sake of convenience. VLANs are enabled in
Cisco switches by default, and ALL devices are already connected to VLAN 1. If there were no
additional configuration required, these devices would be unable to communicate. All devices on a
switch can communicate with one another using the same ports as a single switch. Consider using
VLANs if you’re having difficulty connecting to the Internet. A trunk port is one that is shared by
multiple switches or routers and is used to route traffic between them.
VLANs can be configured in a variety of Cisco switches, even if they are in different models. To
communicate with other trunks, a trunk port must use a special trunk trunk protocol. Because VLANs
limit the number of broadcasts, they provide a higher level of performance to large and medium
LANs. As a result, they also provide security because you effectively have one group of devices
connected to a VLAN.
It is possible to use multi-VLAN ports to conduct networking. These switches and routers can be used
to separate groups of users, departments, and functions from one another without the need for
separate switches or routers. There is a significant cost savings, improved network security and
performance, and simplified management associated with this model.
Procedure
Result
Thus the simulation of VLANs with single and multiple routers are performed.
Viva Questions
Aim
Types of IP address
An internet protocol (IP) address allows computers to send and receive information. There
are four types of IP addresses: Static and Dynamic.
Static IP addressing:
We assign a specific IP address to any system manually. Static IP addresses remain in effect
until you modify or remove them or you change the method of IP addressing for the
Ethernet port to DHCP.
Source Code:
ConfiguratorA.ned File
package inet.examples.inet.configurator;
import inet.networklayer.configurator.ipv4.IPv4NetworkConfigurator;
import inet.node.ethernet.Eth100M;
import inet.node.ethernet.Eth10M;
import inet.node.ethernet.EtherSwitch;
import inet.node.inet.Router;
import inet.node.inet.StandardHost;
import inet.visualizer.integrated.IntegratedCanvasVisualizer;
network ConfiguratorA
{
@display("bgb=1610.5125,874.96497");
submodules:
configurator: IPv4NetworkConfigurator {
@display("p=100,100");
}
host0: StandardHost {
@display("p=268.32748,417.6225");
}
host1: StandardHost {
@display("p=227.9775,542.7075");
}
host2: StandardHost {
@display("p=268.32748,736.3875");
}
host3: StandardHost {
@display("p=667.7925,98.8575");
}
router0: Router {
@display("p=667.7925,574.9875");
}
router2: Router {
@display("p=972.435,574.9875");
}
router1: Router {
@display("p=821.1225,369.20248");
}
host4: StandardHost {
@display("p=843.315,70.612495");
}
host5: StandardHost {
@display("p=972.435,98.8575");
}
host6: StandardHost {
@display("p=1430.4075,417.6225");
}
host7: StandardHost {
@display("p=1472.775,542.7075");
}
host8: StandardHost {
@display("p=1430.4075,736.3875");
}
switch0: EtherSwitch {
@display("p=518.4975,574.9875");
}
switch2: EtherSwitch {
@display("p=1162.08,574.9875");
}
switch1: EtherSwitch {
@display("p=821.1225,225.95999");
}
visualizer: IntegratedCanvasVisualizer {
@display("p=98.8575,209.81999");
}
connections:
host2.ethg++ <--> Eth100M <--> switch0.ethg++;
host1.ethg++ <--> Eth100M <--> switch0.ethg++;
host0.ethg++ <--> Eth100M <--> switch0.ethg++;
switch0.ethg++ <--> Eth100M <--> router0.ethg++;
router0.ethg++ <--> Eth100M <--> router1.ethg++;
router1.ethg++ <--> Eth100M <--> switch1.ethg++;
switch1.ethg++ <--> Eth100M <--> host3.ethg++;
switch1.ethg++ <--> Eth100M <--> host4.ethg++;
switch1.ethg++ <--> Eth100M <--> host5.ethg++;
router1.ethg++ <--> Eth100M <--> router2.ethg++;
router2.ethg++ <--> Eth100M <--> switch2.ethg++;
switch2.ethg++ <--> Eth100M <--> host6.ethg++;
switch2.ethg++ <--> Eth100M <--> host7.ethg++;
switch2.ethg++ <--> Eth100M <--> host8.ethg++;
router0.ethg++ <--> Eth10M <--> router2.ethg++;
}
Omnetpp.ini File
[General]
description = "(abstract)"
# Configurator settings
*.configurator.dumpAddresses = true
*.configurator.dumpTopology = true
*.configurator.dumpLinks = true
*.configurator.dumpRoutes = true
# Routing settings
*.*.ipv4.arp.typename = "GlobalArp"
#*.*.ipv4.routingTable.netmaskRoutes = ""
# Visualizer settings
#*.visualizer.interfaceTableVisualizer.displayInterfaceTables = true
#*.visualizer.interfaceTableVisualizer.nodeFilter = "not (*switch* or *Switch* or *AP*)"
[Config Step1]
network = ConfiguratorA
description = "Fully automatic IP address assignment"
[Config Step2]
network = ConfiguratorA
description = "Manually overriding individual IP addresses"
# Using inline XML configuration
*.configurator.config = xml("<config> \
<interface hosts='host3' names='eth0' address='10.0.0.100'/> \
<interface hosts='host1' names='eth0' address='10.0.0.50'/> \
<interface hosts='**' address='10.x.x.x' netmask='255.x.x.x'/> \
Department of ECE Page 35
Communication Networks Laboratory III B. Tech II SEM
</config>")
[Config Step3]
network = ConfiguratorA
description = "Automatically assigning IP addresses to a subnet from a given range"
*.configurator.config = xmldoc("step3.xml")
##############################################################################
########################
[Config Step4]
network = ConfiguratorA
description = "Fully automatic static routing table configuration"
#*.host1.numApps = 1
*.host1.app[0].typename = "PingApp"
#*.host1.app[0].destAddr = "host7"
.destinationFilter = "host7"
[Config Step5A]
extends = Step4
description = "Manually overriding individual routes - route to a specific host"
*.configurator.config = xml("<config> \
<interface hosts='**' address='10.x.x.x' netmask='255.x.x.x'/> \
<route hosts='router0' destination='10.0.0.35' netmask='255.255.255.255'
gateway='10.0.0.18' interface='eth1' metric='0'/> \
</config>")
#*.host0.numApps = 1
*.host0.app[0].typename = "PingApp"
#*.host0.app[*].destAddr = "host6"
#*.host0.app[*].startTime = 0.6s
[Config Step5B]
extends = Step4
description = "Manually overriding individual routes - route to a set of hosts"
*.configurator.config = xml("<config> \
<interface hosts='**' address='10.x.x.x' netmask='255.x.x.x'/> \
<route hosts='router0' destination='10.0.0.32' netmask='255.255.255.248'
gateway='10.0.0.18' interface='eth1'/> \
</config>")
*.configurator.optimizeRoutes = false #! TODO: this shouldn't be here, it's here because
of an error in the optimizer
#*.host0.numApps = 1
*.host0.app[0].typename = "PingApp"
#*.host0.app[*].destAddr = "host6"
#*.host0.app[*].startTime = 0.6s
[Config Step6A]
extends = Step4
description = "Setting different metric for automatic routing table configuration - using dataRate
metric"
*.configurator.config = xml("<config> \
<interface hosts='**' address='10.x.x.x' netmask='255.x.x.x'/> \
<autoroute sourceHosts='**' metric='dataRate'/> \
</config>")
#*.visualizer.routingTableVisualizer.destinationFilter = "host1"
[Config Step6B]
extends = Step4
description = "Setting different metric for automatic routing table configuration - manually
specifying link cost"
*.configurator.config = xml("<config> \
<interface hosts='**' address='10.x.x.x' netmask='255.x.x.x'/> \
<autoroute metric='hopCount'> \
<link interfaces='*.router0.eth2' cost='infinite'/> \
</autoroute> \
</config>")
#*.visualizer.routingTableVisualizer.destinationFilter = "host1"
Step 1 Output:
Step 2 Output:
Step 3 Output:
Step3.xml File:
<config>
<interface hosts="host0" address="10.0.0.x"/>
<interface hosts="host3" address="10.0.1.x"/>
<interface hosts="host6" address="10.0.2.x"/>
<interface among="router*" address="10.1.x.x"/>
<interface hosts='**' address='10.x.x.x' netmask='255.x.x.x'/>
</config>
Procedure
Result
Hence successfully assigned the IP addresses for the given network configuration.
Viva Questions
1. What is IP address?
2. How many bits are used for IPv4 and IPv6?
3. What are the advantages of using IPv6.
4. What is super netting and sub netting?
5. What is the range of addresses in Class A address?
6. What is the range of addresses in Class B address?
7. What is the range of addresses in Class C address?
8. What is broadcasting address?
9. What are the different mechanisms used for ip addressing?
10. What is the difference between MAC address and IP address?
Aim
To create scenario and study the performance of network with CSMA / CA protocol and
compare with CSMA/CD protocols.
Apparatus
CSMA is a mechanism that senses the state of the shared channel to prevent or recover data
packets from a collision. It is also used to control the flow of data packets over the network
so that the packets are not get lost, and data integrity is maintained. In CSMA, when two or
more data packets are sent at the same time on a shared channel, the chances of collision
occurred. Due to the collision, the receiver does not get any information regarding the
sender's data packets. And the lost information needs to be resented so that the receiver can
get it. Therefore we need to sense the channel before transmitting data packets on a network.
It is divided into two parts, CSMA CA (Collision Avoidance) and CSMA CD (Collision
Detection).
CSMA/CD
CSMA/CD stands for Carrier Sense Multiple Access / Collision Detection is a network
protocol for carrier transmission. It is operated in the medium access control layer. It senses
of the shared channel is busy for broadcasting and interrupts the broadcast until the channel
is free. In CSMA/CD collision is detected by broadcast sensing from the other stations.
Upon collision detection in CSMA/CD, the transmission is stopped and a jam signal is sent
by the stations and then the station waits for a random time context before retransmission.
Disadvantage of CSMA CD
1. It is not suitable for long-distance networks because as the distance increases,
CSMA CD' efficiency decreases.
2. It can detect collision only up to 2500 meters, and beyond this range, it cannot detect
collisions.
3. When multiple devices are added to a CSMA CD, collision detection performance is
reduced.
CSMA/CA
CSMA/CA stands for Carrier Sense Multiple Access / Collision Avoidance is a network
protocol for carrier transmission. Like CSMA/CD it is also operated in the medium access
control layer. Unlike CSMA/CD (that is effective after a collision) CSMA / CA is effective
before a collision.
Carrier Sense Multiple Access with Collision Avoidance means that it is a network
protocol that uses to avoid a collision rather than allowing it to occur, and it does not deal
with the recovery of packets after a collision. It is similar to the CSMA/CD protocol that
operates in the media access control layer. In CSMA CA, whenever a station sends a data
frame to a channel, it checks whether it is in use. If the shared channel is busy, the station
waits until the channel enters idle mode. Hence, we can say that it reduces the chances of
collisions and makes better use of the medium to send data packets more efficiently.
1. It is the type of CSMA to detect the It is the type of CSMA to avoid collision
collision on a shared channel. on a shared channel.
6. Whenever a data packet conflicts in Whereas the CSMA CA waits until the
a shared channel, it resends the data channel is busy and does not recover after
frame. a collision.
9. It is more popular than the CSMA/ It is less popular than CSMA/ CD.
CA protocol.
Source Code:
Aloha.ned File:
network Aloha
{
parameters:
int numHosts; // number of hosts
double txRate @unit(bps); // transmission rate
double slotTime @unit(ms); // zero means no slots (pure Aloha)
@display("bgi=background/terrain,s");
submodules:
server: Server;
host[numHosts]: Host {
txRate = txRate;
slotTime = slotTime;
}
}
Omnetpp.ini File:
[General]
network = Aloha
#debug-on-errors = true
#record-eventlog = true
Aloha.numHosts = 20
Aloha.slotTime = 0 # no slots
Aloha.txRate = 9.6kbps
Aloha.host[*].pkLenBits = 952b #=119 bytes, so that (with +1 byte guard) slotTime is a nice
round number
Aloha.host[*].radioDelay = 10ms
[Config PureAloha1]
description = "pure Aloha, overloaded"
# too frequent transmissions result in high collision rate and low channel utilization
Aloha.host[*].iaTime = exponential(2s)
[Config PureAloha2]
description = "pure Aloha, optimal load"
# near optimal load, channel utilization is near theoretical maximum 1/2e
Aloha.host[*].iaTime = exponential(6s)
[Config PureAloha3]
description = "pure Aloha, low traffic"
# very low traffic results in channel being idle most of the time
Aloha.host[*].iaTime = exponential(30s)
[Config PureAlohaExperiment]
description = "Channel utilization in the function of packet generation frequency"
repeat = 2
sim-time-limit = 90min
**.vector-recording = false
Aloha.numHosts = ${numHosts=10,15,20}
Aloha.host[*].iaTime = exponential(${mean=1,2,3,4,5..9 step 2}s)
[Config SlottedAloha1]
description = "slotted Aloha, overloaded"
# slotTime = pkLen/txRate = 960/9600 = 0.1s
Aloha.slotTime = 100ms
# too frequent transmissions result in high collision rate and low channel utilization
Aloha.host[*].iaTime = exponential(0.5s)
[Config SlottedAloha2]
description = "slotted Aloha, optimal load"
# slotTime = pkLen/txRate = 960/9600 = 0.1s
Aloha.slotTime = 100ms
# near optimal load, channel utilization is near theoretical maximum 1/e
Aloha.host[*].iaTime = exponential(2s)
[Config SlottedAloha3]
description = "slotted Aloha, low traffic"
# slotTime = pkLen/txRate = 960/9600 = 0.1s
Aloha.slotTime = 100ms
# very low traffic results in channel being idle most of the time
Aloha.host[*].iaTime = exponential(20s)
Procedure
Viva Questions
1. What is CSMA/CA?
2. What is CSMA/CD?
Aim
Apparatus
Source Code:
SimpleTest.ned File:
package inet.examples.ospfv2.simpletest;
import inet.common.lifecycle.LifecycleController;
import inet.common.misc.ThruputMeteringChannel;
import inet.common.scenario.ScenarioManager;
import inet.linklayer.ethernet.EtherHub;
import inet.networklayer.configurator.ipv4.IPv4NetworkConfigurator;
import inet.node.inet.StandardHost;
import inet.node.ospfv2.OSPFRouter;
network SimpleTest
{
parameters:
@display("p=10,10;b=712,152");
types:
channel C extends ThruputMeteringChannel
{
delay = 0.1us;
datarate = 100Mbps;
thruputDisplayFormat = "#N";
}
submodules:
H1: StandardHost {
parameters:
@display("p=56,92;i=device/laptop");
Department of ECE Page 46
Communication Networks Laboratory III B. Tech II SEM
gates:
ethg[1];
}
N1: EtherHub {
parameters:
@display("p=184,92");
gates:
ethg[2];
}
R1: OSPFRouter {
parameters:
@display("p=296,92");
hasStatus = true;
gates:
ethg[2];
}
R2: OSPFRouter {
parameters:
@display("p=416,92");
hasStatus = true;
gates:
ethg[2];
}
N2: EtherHub {
parameters:
@display("p=532,92");
gates:
ethg[2];
}
H2: StandardHost {
parameters:
@display("p=660,92;i=device/laptop");
gates:
ethg[1];
}
configurator: IPv4NetworkConfigurator {
parameters:
config = xml("<config>"+
"<interface among='H1 R1' address='192.168.1.x' netmask='255.255.255.0'
/>"+
"<interface among='H2 R2' address='192.168.2.x' netmask='255.255.255.0'
/>"+
"<interface among='R1 R2' address='192.168.60.x' netmask='255.255.255.0'
/>"+
"<route hosts='H1 H2' destination='*' netmask='0.0.0.0' interface='eth0' />"+
"</config>");
addStaticRoutes = false;
addDefaultRoutes = false;
@display("p=75,43");
}
scenarioManager: ScenarioManager {
@display("p=75,43");
}
lifecycleController: LifecycleController {
@display("p=208,43");
}
connections:
H1.ethg[0] <--> C <--> N1.ethg[0];
N1.ethg[1] <--> C <--> R1.ethg[0];
R1.ethg[1] <--> C <--> R2.ethg[0];
R2.ethg[1] <--> C <--> N2.ethg[0];
N2.ethg[1] <--> C <--> H2.ethg[0];
}
Omnetpp.ini File:
[General]
network = SimpleTest
tkenv-plugin-path = ../../../etc/plugins
**.ospf.ospfConfig = xmldoc("ASConfig.xml")
**.numUdpApps = 2
**.udpApp[0].typename = "UDPBasicApp"
**.udpApp[0].destPort = 1234
**.udpApp[0].messageLength = 32 bytes
**.udpApp[0].sendInterval = 0.1s
**.udpApp[0].startTime = 4s
**.H2.udpApp[0].destAddresses = "H1"
**.H1.udpApp[0].destAddresses = "H2"
**.udpApp[1].typename = "UDPEchoApp"
**.udpApp[1].localPort = 1234
**.arp.cacheTimeout = 1s
[Config AlwaysUp]
**.scenarioManager.script = xml("<empty/>")
[Config ShutdownAndRestart]
**.scenarioManager.script = xml( \
"<script>\n" + \
[Config CrashAndReboot]
**.scenarioManager.script = xml( \
"<script>\n" + \
"<at t='3s'><tell module='lifecycleController' operation='NodeCrashOperation'
target='R1'/></at>\n" + \
"<at t='6s'><tell module='lifecycleController' operation='NodeStartOperation'
target='R1'/></at>\n" + \
"<at t='10s'><tell module='lifecycleController' operation='NodeCrashOperation'
target='R1'/></at>\n" + \
"<at t='11'><tell module='lifecycleController' operation='NodeCrashOperation'
target='R2'/></at>\n" + \
"<at t='20s'><tell module='lifecycleController' operation='NodeStartOperation'
target='R1'/></at>\n" + \
"<at t='21s'><tell module='lifecycleController' operation='NodeStartOperation'
target='R2'/></at>\n" + \
"</script>")
Procedure
Result
Viva Questions
Aim
The main concept of the leaky bucket algorithm is that the output data flow
remains constant despite the variant input traffic, such as the water flow in a bucket
with a small hole at the bottom. In case the bucket contains water (or packets) then the
output flow follows a constant rate, while if the bucket is full any additional load will
be lost because of spillover. In a similar way if the bucket is empty the output will be
zero. From network perspective, leaky bucket consists of a finite queue (bucket)
where all the incoming packets are stored in case there is space in the queue,
otherwise the packets are discarded. In order to regulate the output flow, leaky bucket
transmits one packet from the queue in a fixed time (e.g. at every clock tick). In the
following figure we can notice the main rationale of leaky bucket algorithm, for both
the two approaches (e.g. leaky bucket with water (a) and with packets (b)).
While leaky bucket eliminates completely bursty traffic by regulating the incoming data
flow its main drawback is that it drops packets if the bucket is full. Also, it doesn’t take
into account the idle process of the sender which means that if the host doesn’t transmit
data for some time the bucket becomes empty without permitting the transmission of
any packet.
Procedure
Viva Questions
Aim
Apparatus
Source Code:
DiffServnetwork.ned File:
package inet.examples.diffserv.simple_;
import inet.networklayer.configurator.ipv4.IPv4NetworkConfigurator;
import inet.node.ethernet.EtherSwitch;
import inet.node.inet.Router;
import inet.node.inet.StandardHost;
import ned.DatarateChannel;
{
delay = 0.1us;
datarate = 10Mbps;
}
submodules:
router: Router {
@display("p=318,108");
}
client[numClients]: StandardHost;
server: StandardHost {
@display("p=436,108");
}
configurator: IPv4NetworkConfigurator {
@display("p=181,21");
}
etherSwitch: EtherSwitch {
@display("p=198,107");
}
connections:
router.pppg++ <--> dialup <--> server.pppg++;
etherSwitch.ethg++ <--> ethernetline <--> router.ethg++;
for i=0..numClients-1 {
client[i].ethg++ <--> ethernetline <--> etherSwitch.ethg++;
}
}
Omnetpp.ini File:
[General]
network = DiffservNetwork
sim-time-limit = 50s
# client applications
**.numClients = 1
**.client[*].numUdpApps = 2
**.client[*].udpApp[*].typename = "UDPBasicApp"
**.client[*].udpApp[*].destAddresses = "server"
**.client[*].udpApp[*].messageLength = 1000B
**.client[*].udpApp[*].startTime = uniform(0s,0.1s)
**.client[*].udpApp[*].sendInterval = 100ms
**.client[*].udpApp[0].destPort = 5001
**.client[*].udpApp[1].destPort = 5002
# server applications
**.server.numUdpApps = 2
Department of ECE Page 54
Communication Networks Laboratory III B. Tech II SEM
**.server.udpApp[0].typename = "UDPSink"
**.server.udpApp[0].localPort = 5001
**.server.udpApp[1].typename = "UDPSink"
**.server.udpApp[1].localPort = 5002
[Config VoIP]
description = "client[0] executes a VoIP application"
**.numClients = 2
**.client[0].numUdpApps = 1
**.client[0].udpApp[0].typename = "VoIPStreamSender"
**.client[0].udpApp[0].packetTimeLength = 20ms
**.client[0].udpApp[0].voipHeaderSize = 4B
**.client[0].udpApp[0].voipSilenceThreshold = 100
**.client[0].udpApp[0].repeatCount = 1
**.client[0].udpApp[0].soundFile = "../../voipstream/soundFiles/ria_44100_stereo.mp3"
**.client[0].udpApp[0].codec = "pcm_mulaw"
**.client[0].udpApp[0].bitsPerSample = 8
**.client[0].udpApp[0].samplingRate = 8000Hz
**.client[0].udpApp[0].compressedBitRate = 64000bps
**.client[0].udpApp[0].localPort = 1000
**.client[0].udpApp[0].destPort = 1000
**.client[0].udpApp[0].srcAddress = ""
**.client[0].udpApp[0].destAddress = "server"
**.server.numUdpApps = 3
**.server.udpApp[2].typename = "VoIPStreamReceiver"
**.server.udpApp[2].localPort = 1000
**.server.udpApp[2].resultFile = "results/${configname}_results.wav"
[Config WithoutQoS]
description = "Diffserv traffic conditioning and queueing is turn off"
[Config WithPolicing]
description = "Diffserv traffic conditioning is turned on in the ppp[0] interface of the router"
**.router.ppp[0].egressTCType = "TrafficConditioner"
**.efMeter.cir = "70%"
**.efMeter.cbs = 50KiB
**.defaultMeter.cir = "30%"
**.defaultMeter.cbs = 2KiB
**.defaultMeter.ebs = 4KiB
[Config WithQueueing]
description = "A DiffservQueue is added to the ppp[0] interface of the router"
**.router.ppp[*].queueType = "DiffservQueue"
**.router.ppp[*].queue.efMeter.cir = "70%" # reserved bandwith for EF packets
**.router.ppp[*].queue.efMeter.cbs = 5000B
[Config VoIP_WithoutQoS]
description = "VoIP application, without QoS"
extends = VoIP, WithoutQoS
[Config VoIP_WithPolicing]
description = "VoIP application, traffic policing at the router allocates bandwidth for voice
packets"
extends = VoIP, WithPolicing
[Config VoIP_WithPolicingAndQueueing]
description = "VoIP application, traffic policing at the router allocates bandwidth for voice
packets, and voice packets are prioritized in router's queue"
extends = VoIP, WithPolicing, WithQueueing
Procedure
Result
Viva Questions
Aim
Apparatus
A wireless network is type of computer network that uses wireless data connections for
connecting network nodes. Wireless networking is a method by which homes,
telecommunications networks and enterprise installations avoid the costly process of
introducing cables and other networking devices into building.
A wireless ad hoc network is decentralized type of wireless network. The network is ad-hoc
because it does not rely on preexisting infrastructure, such as routers in wired networks or
access points in managed wireless networks. In ad hoc wireless network each node
participates in routing by forwarding data for other nodes. Determination of which nodes
forward data is made dynamically on the basis of network connectivity. In addition to the
classic routing, ad hoc networks can use flooding for forwarding data. The physical size of
the network is determined by the maximum reliable propagation range of the radio signals.
Ad-hoc wireless network are suited for temporary situations such as meetings and
correctness.
A wireless network adapter allows a computing device to join a wireless LAN. Wireless
network adapter Contain a built- in radio transmitter and receiver. Each adapter supports
one or more of the Wi-Fi standards.
A wireless access point is a device that allows wireless devices to connect to a wired
network using Wi-Fi or related standards. The Wireless access point usually connects to a
router (via a wired network) as a standalone device. It can also be an integral component of
the router itself. The access point (AP) can also act as a repeater for wireless nodes,
effectively doubling the maximum possible distance between nodes.
Source Code:
Omnetpp.ini file
[General]
network = Lan80211
#cmdenv-output-file = omnetpp.log
#debug-on-errors = true
tkenv-plugin-path = ../../../etc/plugins
#record-eventlog = true
**.constraintAreaMinX = 0m
**.constraintAreaMinY = 0m
**.constraintAreaMinZ = 0m
**.constraintAreaMaxX = 600m
**.constraintAreaMaxY = 400m
**.constraintAreaMaxZ = 0m
# access point
**.ap.wlan[*].mac.address = "10:00:00:00:00:00"
**.host[*].**.mgmt.accessPointAddress = "10:00:00:00:00:00"
**.mgmt.frameCapacity = 10
# mobility
**.host[*].mobilityType = "MassMobility"
**.host[*].mobility.changeInterval = truncnormal(2ms, 0.5ms)
**.host[*].mobility.changeAngleBy = normal(0deg, 30deg)
**.host[*].mobility.speed = truncnormal(20mps, 8mps)
**.host[*].mobility.updateInterval = 100ms
# nic settings
**.wlan*.bitrate = 2Mbps
**.mac.address = "auto"
**.mac.maxQueueSize = 14
**.mac.rtsThresholdBytes = 3000B
**.wlan[*].mac.retryLimit = 7
**.wlan[*].mac.cwMinData = 7
**.wlan[*].mac.cwMinBroadcast = 31
**.wlan[*].radio.transmitter.power = 2mW
**.wlan[*].radio.transmitter.bitrate = 2Mbps
**.wlan[*].radio.transmitter.headerBitLength = 100b
**.wlan[*].radio.transmitter.carrierFrequency = 2.4GHz
**.wlan[*].radio.transmitter.bandwidth = 2MHz
**.wlan[*].radio.receiver.sensitivity = -85dBm
**.wlan[*].radio.receiver.snirThreshold = 4dB
[Config Ping1]
description = "host1 pinging host0"
*.numHosts = 2
Lan80211.ned file
package inet.examples.wireless.lan80211;
import inet.networklayer.configurator.ipv4.IPv4NetworkConfigurator;
import inet.node.inet.WirelessHost;
import inet.node.wireless.AccessPoint;
import inet.physicallayer.ieee80211.packetlevel.Ieee80211ScalarRadioMedium;
import inet.visualizer.integrated.IntegratedCanvasVisualizer;
network Lan80211
{
parameters:
int numHosts;
**.mgmt.numChannels = 2;
submodules:
visualizer: IntegratedCanvasVisualizer {
parameters:
@display("p=100,50");
}
configurator: IPv4NetworkConfigurator {
parameters:
@display("p=100,150");
config = xml("<config><interface hosts='*' address='145.236.x.x'
netmask='255.255.0.0'/></config>");
}
radioMedium: Ieee80211ScalarRadioMedium {
parameters:
@display("p=100,250");
}
host[numHosts]: WirelessHost {
@display("r=,,#707070");
wlan[*].mgmtType = "Ieee80211MgmtSTASimplified";
}
ap: AccessPoint {
@display("p=213,174;r=,,#707070");
wlan[*].mgmtType = "Ieee80211MgmtAPSimplified";
}
}
Procedure
Result
Viva Questions
Aim
To Design and Implement LAN with various Topologies and evaluate the network performance
parameters.
Apparatus
Topology types:
Following are different types of topology which mainly used to connect computers with each
other to form a network.
Bus topology:
❖ A bus topology consists of main System Bus with a terminator at each end in
which all computers (node) are connected to the cable.
❖ A signal from the source travels in both directions to all computers connected on the bus
cable until it finds the intended recipient. If the computer address does not match the
intended address for the data, the computer ignores the data.
Concept structure:
Ring topology:
❖ In this all the computers (nodes) are connected to each-other in such a way that they
make a closed loop.
❖ Each computer is connected to two other components on either side, and it
communicated with these two adjacent neighbors. Data is sent around the ring until it
reaches its final destination.
Concept structure:
Mesh topology :
❖ This topology employs either or two schemes, called full mesh and partial mesh.
❖ In the full mesh topology, each computer is connected directly to each of the others. In
the partial mesh topology. some computers are connected to all the others, and some are
connected only to those other nodes with which they exchange the most data.
❖ If there are n computers, there will be (n x (n-1)) ¸ 2 cables in the network. For examples,
if you have five computers in a mesh network, it will use 5 x (5 - 1) ¸ 2, which equals 10
cables.
Concept structure:
Star topology:
❖ In this every node (computer workstation or any other peripheral) is connected to central
node or device called hub or switch)
❖ All the data on the star topology passes through the central device before reaching the
intended destination.
❖ A hub forwards data packets to all the ports. A switch is more intelligent. It recognizes
which computer is connected to which port based on the MAC address and saves this
information in a table. When a switch receives a data packet, it determines the recipient
and forwards the packet to the correct computer.
❖ An advantage of the star topology is the simplicity of adding additional nodes. The
primary disadvantage of the star topology is that the hub/switch represents a single
point of failure.
❖ Extended Star topology uses the star topology to be created. It links individual stars
together by linking the hubs/switches. This will extend the length of the network.
Concept structure:
Bus.ini File:
[General]
sim-time-limit = 120s
tkenv-plugin-path = ../../../etc/plugins
**.vector-recording = false
[Config BusLAN]
network = BusLAN
**.hostA.cli.destAddress = ""
**.cli.destAddress = "hostA"
**.cli.sendInterval = exponential(1s)
**.host*.mac.duplexMode = false
include defaults.ini
switch.ini File:
[General]
#sim-time-limit = 120s
tkenv-plugin-path = ../../../etc/plugins
**.vector-recording = false
[Config SwitchedLAN1]
network = SwitchedLAN
**.hostA.cli.destAddress = ""
**.cli.destAddress = "hostA"
**.cli.sendInterval = exponential(1s)
include defaults.ini
Procedure
Hence successfully implemented LAN with Various Topologies and evaluated the network
performance parameters.
Viva Questions
Aim
Apparatus
Hub:
A Hub is just a connector that connects the wires coming from different sides.
There is no signal processing or regeneration. It is an electronic device that
operates only on physical layers of the OSI model.
It is also known as a repeater as it transmits signal to every port except the port
from where signal is received. Also, hubs are not that intelligent in communication
and processing information for 2nd and 3rd layer.
Switch:
Switch is a point to point communication device. It operates at the data link layer of
OSI model. It uses switching table to find out the correct destination.
Router:
Hub.ini File:
[General]
network = HubLAN
sim-time-limit = 120s
Department of ECE Page 70
Communication Networks Laboratory III B. Tech II SEM
tkenv-plugin-path = ../../../etc/plugins
**.vector-recording = false
[Config Hub1]
**.hostA.cli.destAddress = ""
**.cli.destAddress = "hostA"
**.cli.sendInterval = exponential(1s)
[Config Hub2]
# bigger load, frequent collisions
**.hostA.cli.destAddress = ""
**.cli.destAddress = "hostA"
**.cli.sendInterval = exponential(2ms)
[Config Hub3]
# manual address assignment
**.hostA.mac.address = "001122334455"
**.hostA.cli.destAddress = ""
**.cli.destAddress = "001122334455"
**.cli.sendInterval = exponential(1s)
[Config Hub4]
# one station can only support 10Mb/s
**.hostC.mac.txrate = 10Mbps
**.hostA.cli.destAddress = ""
**.cli.destAddress = "hostA"
**.cli.sendInterval = exponential(1s)
include defaults.ini
switch.ini File:
[General]
#sim-time-limit = 120s
tkenv-plugin-path = ../../../etc/plugins
**.vector-recording = false
[Config SwitchedLAN1]
network = SwitchedLAN
**.hostA.cli.destAddress = ""
**.cli.destAddress = "hostA"
**.cli.sendInterval = exponential(1s)
include defaults.ini
Procedure
NS3 [14] is another simulator available for less than a decade and it
supports network components of recent developments, unlike NS2, the
architecture of ns3 is simpler and one can simulate a network using either C++ or
python scripts. NS3 is evolving these days to a greater extent and will come with
new protocols, new networks, etc in each of their releases. NS3 is completely
open source and free.
OMNeT++
OPNET
There are various other simulators too in the market that solves the
purpose of narrow network research. So, the developers once identified a
network, there are choices available for them to select the perfect simulator for
their research. The following table will list some of the key comparisons between
the simulators
Usually network simulations carried out either in time driven or event driven.
Each of them have their own pros and cons. This topic will show you the
difference between these simulations.
Time driven simulation is also called as discrete time simulation. The simulation
is carried out on a fixed time interval. The time interval in which a task is
running is assumed to be running before the end of the interval though the task
would have arrived at the beginning of the interval.
Example:
hostname with no options displays the
machines host name hostname –d displays
the domain name the machine belongs to
hostname –f displays the fully qualified host
and domain name hostname –i displays the IP
address for the current machine
1.2 ifconfig
This command will display the assigned IP address of ETHERNET adapter.
Ubuntu :
ifconfig |
grep inet
Windows :
ipconfig
1.3 ping
This command is used for checking the network connectivity. Ping verifies IP-
level connectivity to another TCP/IP device by sending Internet Control Message
Protocol (ICMP) Echo Request messages. If received, the corresponding Echo
Reply messages are displayed, along with round- trip times. Otherwise, a timed-
out request or an ICMP unreachable message is displayed. (i.e. You can “ping”
an IP address to see if a machine is alive. If there is no response, you know
something is wrong)
1.4 host
1.5 telnet
This command is used for connecting to a host on a particular port. Example:
telnet osou.ac.in telnet command is also used to make a connection to a remote
machine and execute programs as if one were physically present. telnet (data are
travelled without encryption; not secured)
1.6 ftp
This command allows you to send and receive files between two computers.
1.7 net
net command is used for checking/starting/stopping networking services, users,
messaging, configuration and so on... ?
1.8 arp
This command is used for displaying or manipulating the ARP (Address
Resolution Protocol) information on a network device or computer.
1.9 Winipcg
This command is used to know the IP configuration of the PC in a graphical
form. It shows the following in the windows command prompt.
IP Address
Subnet Mask
Type of H/W used for communication & it’s address
1.10 nslookup
This command displays information from Domain Name System (DNS)
name servers. NOTE: If you write the command as above it shows as
default your pc's server name firstly.
1.11 netstat
This command is used for finding connection to and from the host. Netstat is a
common command line TCP/IP networking utility available in most versions of
Windows, Linux, UNIX and
Example:
netstat nap| grep port will display process id of application which
is using that port netstat a or netstat –all will display all
connections including TCP and UDP netstat tcp or netstat –t will
display only TCP connection
1.12 tracert
The tracert command is a Command Prompt command that's used to show
several details about the path that a packet takes from the computer or device
you're on to whatever destination you specify. It will list all the routers it passes
through until it reaches its destination, or fails to and is discarded.