Labmanual CN Cs602 A
Labmanual CN Cs602 A
LAB MANUAL
Computer Network - CS 602
6th Sem
Batch 2021-2022
Shri Ram Institute of Technology, Jabalpur (M.P.)
Near ITI, Madhotal , Jabalpur, M.P., 482001
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
INDEX
S.NO TOPIC Page No.
1. Course & Faculty details 1
2. Vision & Mission of the Institute 2
3. Vision & Mission of the Department 3
4. Program Outcomes (PO) 4
5. Program Specific Outcome (PSO) 5
6. Program Educational Objectives (PEOs) 6
7. Scheme 7
8. List of Experiments 8
9. Course Outcome (CO) 9
10. Mapping 10
11. Time Table 11
12. Date of Execution 12
13. Experiments 13-59
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
Faculty Details
Designation:
Course Details:
1
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
VISION
To provide quality education and to inculcate professional skills in students so that they
hold competitive edge in the healthy environment and excel in their profession with
sound ethical basis for betterment of the society.
MISSION
2
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
VISION
MISSION
M1. To provide qualitative education and generate new knowledge through effective
teaching learning methodologies, resulting in careers as computer and IT professionals
in the widely diversified fields of business, government and academia.
M2. To transform lives of the students by imparting ethical values, sustainable skills,
creativity, and uniqueness in them, allowing them to become entrepreneurs and start
businesses.
3
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
PROGRAM OUTCOMES
PO1 Engineering knowledge: Apply the knowledge of mathematics, science, engineering fund
amentals, and an engineering specialization
to the solution of complex engineering problems
PO2 Problem analysis: Identify, formulate review research literature and analyze
complex engineering problems reaching substantiated conclusions using first principle of
mathematics, natural science and engineering science.
PO3 Design/development of solutions: 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: Use research-based knowledge
and research methods including design of experiments, analysis and interpretation of data,
and synthesis of the information to provide valid conclusions
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
4
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
technological change.
PSO2 Successful Career and Entrepreneurship: Gain expertise in a variety of fields of computer
science and experience an environment that fosters the development of abilities for a
successful profession, entrepreneurship, and higher learning.
5
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
6
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
SCHEME
7
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
LIST OF EXPERIMENT
S.N List of Experiment CO PO PSO Page
o No.
01. Study of Different Type of LAN. 1 1,2,5 1, 2 14-17
02. Study and Verification of standard 1 1,2,3,4,5 1 18-21
Network topologies i.e. Star, Bus,
Ring etc.
03. LAN installations and 1, 2, 3 1,2,5 1, 2 22
Configurations.
04. Write a program to implement 4 1,2,3,4,5,1 1 23-26
various types of error correcting 2
techniques.
05. To Implement the data link layer 5 1,2,3,4,5,1 1 27-28
framing methods such as and bit 2
stuffing
06. Study of Tool Command Language 1, 5 1,5,12 1 29-30
(TCL).
07. Study and Installation of Standard 1, 2, 6 1,2,3,5,12 1, 2 31-32
Network Simulator: N.S-2,
N.S3.OpNet, QualNetetc .
08. Study & Installation of ONE 1, 2, 6 1,2,3,5,12 1, 2 33-34
(Opportunistic Network
Environment) Simulator for High
Mobility Networks.
09. Configure 802.11 WLAN. 1, 2, 5 1,2,5 1 35-37
10. Implement & simulate various 5, 6 1,2,3,4,5,1 1, 2 38-39
types of routing algorithm. 2
11. Study & Simulation of MAC 2, 5 1,2,3,4,5,1 1, 2 40-43
Protocols like Aloha, CSMA, 2
CSMA/CD and CSMA/CA using
Standard Network Simulators.
12. Study of Application layer 1, 2, 5 1,2,3,4,5,1 1, 2 44-45
protocols-DNS, HTTP, HTTPS, 2
FTP and TelNet.
8
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
13. Demonstrate the steps to configure 2, 5 1,2,3,4,5,1 1, 2 46-56
static NAT on Cisco devices 2
through CLI.
14. Demonstrate the uses of Omnet++. 1,2,5 1,2,3,5 1 57-59
CS602[P].1. Apply basic commands ipconig, ifconfig, netstat, ping, arp, telnet,ftp,finger,traceroute,
whois of LINUX platform.
CS602[P].2. Implement Client-Server Socket based programs using TCP,and UDP sockets
CS602[P].3. Evaluate the DNS client server for resolving the hostname.
CS602[P].4. Analyze packet filtering and capturing using raw sockets.
CS602[P].5. Implement sliding window protocol, Address Resolution Protocol for resolving MAC or
Physical address, border gateway protocol(BGP), RPC and Distance Vector Routing Algorithm
CS602[P].6. Implement open shortest path first for finding the shortest path between source and
destination.
9
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
Mapping
Mapping of Course Outcomes and Program Outcomes:
*H= High (3) *M= Medium (2) *L=Low (1)
COs PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 PO10 PO11 PO12
CS602[P]. 2 2 2 0 3 0 0 0 2 0 0 2
1
CS602[P]. 3 3 3 2 3 2 0 0 2 0 2 2
2
CS602[P]. 2 3 2 2 3 2 0 0 2 0 0 2
3
CS602[P]. 2 3 2 2 3 2 0 0 2 0 0 2
4
CS602[P]. 3 3 3 2 3 2 0 0 2 0 0 3
5
CS602[P]. 3 3 3 2 3 2 0 0 2 0 0 3
6
10
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
TIME TABLE
11
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
12
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
DATE OF EXECUTION
13
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
EXPERIMENT NO. 01
Theory:
LANs are classified as below according to the methods used for sharing data:
1. Ethernet
It is a network protocol that controls how data is transferred over a local area
network.
In this type of LAN, the user is able to transfer data at a rate of more than 10
megabits per second.
Firstly, the system checks the medium used for the transfer of data; if the medium
is available, then only the data transmission is done.
It is used in wired local area networks.
14
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
When a machine or machines want to communicate with each other on a network,
they detect the main wire connecting all the devices which will be used to carry the
data. If the main wire, which is referred to as the carrier, is available and free,
which means no other machine on the network is transmitting any data, then the
sender machine initiates sending the packets of data on the network.
Whenever a packet is transmitted, the sender has to wait if there is already a data
packet in the queue. After that, all the devices on the network check that packet to
see if they are the recipients of that packet. The actual recipient then receives the
packet.
2. Token Ring
It is a type of local area network in which all devices are connected in a ring
arrangement.
All the devices are connected in a circle, and they receive a token as per their
requirements. A token keeps on rotating in the circular ring.
A token is used to avoid collisions of data. It is of 3 bytes and keeps on traveling in
the ring of servers or workstations.
A station can send data frames only if it has a token. After the data frame is
received successfully, the tokens are made free or released.
The computers are connected by a ring or also called as a star topology.
15
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
The token is passed over the physical ring, which is formed by the circular
arrangement of stations and the coaxial cable network.
In this type of LAN, it is possible to calculate the maximum time for a token to
reach a station.
It was developed to solve a collision problem, i.e. when two stations transmit
simultaneously at the same time.
A newer version called Fast Token Ring has been developed, which can transfer
data up to a rate of 100Mbps.
3. Token Bus
16
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
In this protocol, the token or a small message which circulates among the devices
of a computer network is passed along the virtual ring of stations connected to a
LAN.
The topology which is used is a bus or tree type that connects the stations.
Each and every device is aware of the address of its preceding and succeeding
device to transmit token to.
Data transmission cannot be performed without a token.
In this type of LAN topology, it is not possible to calculate the time for the token
transfer. The working procedure of this token bus is the same as the token ring
topology.
These are used for industrial purposes like manufacturing etc.
17
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
It was displaced by fast Ethernet, which is cheaper and has a faster data transfer
rate.
It is used in a large geographical scenario with thousands of end-users.
18
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
EXPERIMENT NO. 02
Aim: Study and Verification of standard Network topologies i.e. Star, Bus, Ring etc.
Bus Topology:
19
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
Bus topology is a network type in which every computer and network device is
connected to a single cable. It transmits the data from one end to another in a single
direction. No bi-directional feature is in bus topology. It is a multi-point connection
and a non-robust topology because if the backbone fails the topology crashes. In
Bus Topology, various MAC (Media Access Control) protocols are followed by
LAN ethernet connections like TDMA, Pure Aloha, CDMA, Slotted Aloha, etc.
Figure: A bus topology with shared backbone cable. The nodes are connected to
the channel via drop lines.
Advantages of this topology:
If N devices are connected to each other in a bus topology, then the number
of cables required to connect them is 1, which is known as backbone cable, and
N drop lines are required.
Coaxial or twisted pair cables are mainly used in bus based networks that
support up to 10 Mbps.
The cost of the cable is less compared to other topologies, but it is used to
build small networks.
Bus topology is familiar technology as installation and troubleshooting
techniques are well known.
Ring Topology:
In this topology, it forms a ring connecting devices with exactly two neighboring
devices.
A number of repeaters are used for Ring topology with a large number of nodes,
because if someone wants to send some data to the last node in the ring topology
with 100 nodes, then the data will have to pass through 99 nodes to reach the 100th
node. Hence to prevent data loss repeaters are used in the network.
The data flows in one direction, i.e.., it is unidirectional, but it can be made
bidirectional by having 2 connections between each Network Node, it is called Dual
20
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
Ring Topology. In-Ring Topology, the Token Ring Passing protocol is used by the
workstations to transmit the data.
Figure: A ring topology comprises 4 stations connected with each forming a ring.
The most common access method of ring topology is token passing.
Token passing: It is network access method in which token is passed from
one node ton another node.
Token: It is a frame that circulates around network.
The following operations take place in ring topology are :
1. One station is known as a monitor station which takes all the responsibility
to perform the operations.
2. To transmit the data, the station has to hold the token. After the transmission
is done, the token is to be released for other stations to use.
3. When no station is transmitting the data, then the token will circulate in the
ring.
4. There are two types of token release techniques: Early token release releases
the token just after transmitting the data and Delay token release releases the
token after the acknowledgment is received from the receiver.
Advantages of this topology:
The data transmission is high-speed.
The possibility of collision is minimum in this type of topology.
Cheap to install and expand.
It is less costly than a star topology.
21
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
Problems with this topology:
The failure of a single node in the network can cause the entire network to
fail.
Troubleshooting is difficult in this topology.
The addition of stations in between or removal of stations can disturb the
whole topology.
Less secure.
22
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
EXPERIMENT NO. 03
Theory: A LAN topology demonstrates how the nodes are linked in a network. It
defines the physical configuration of devices in a geographical area or the logical
process by which the system is set up. In the LAN network, the type of topology
will decide how data is being transmitted through.
23
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
EXPERIMENT NO.4
Theory: Error Correction codes are used to detect and correct the errors when data is
transmitted from the sender to the receiver.
#include <math.h>
#include <stdio.h>
24
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
// If current boit is 1
if (code[j] == 1)
count++;
}
// Update i
i = i + 2 * position;
}
if (count % 2 == 0)
return 0;
else
return 1;
}
c_l = p_n + n;
j = k = 0;
// Driver Code
26
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
void main()
{
// Given input message Bit
input[0] = 0;
input[1] = 1;
input[2] = 1;
input[3] = 1;
int N = 4;
// Function Call
solve(input, N);
}
Output:
The generated Code Word is: 0001111
27
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
EXPERIMENT NO. 05
Aim: Implement the data link layer framing methods such as and bit stuffing.
Program Output:
Enter frame length:5
Enter input frame (0's & 1's only):
1
1
1
1
1
After stuffing the frame is:111110
29
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
EXPERIMENT NO. 06
Tcl interfaces with the C language. Arrays of values that describe command
arguments are passed to the command implementation functions. Digital logic
simulators also include a Tcl scripting interface for Verilog, VHSIC hardware
description language (VHDL) and SystemVerilog hardware language
simulation. Tools like Simplified Wrapper and Interface Generator (SWIG) and
ffidl automatically generate the code required to connect arbitrary C functions
and Tcl runtime. Tcl scripts house command invocations as a list of words
separated by whitespace and terminated by a newline or semicolon.
31
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
EXPERIMENT NO. 07
NS Simulator Preliminaries.
1. Initialization and termination aspects of the ns
simulator.
2. Definition of network nodes, links, queues and topology.
3. Definition of agents and of applications.
4. The nam visualization tool.
5. Tracing and random variables.
33
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
EXPERIMENT NO. 08
Aim: Study & Installation of ONE (Opportunistic Network
Environment) Simulator for High Mobility Networks.
34
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
routing messages between nodes with various DTN routing algorithms and
sender and receiver types
visualizing both mobility and message passing in real time in its graphical user
interface.
To be equipped with the skills to do hands-on development and research with the
ONE, it is mandatory for the reader to understand how the ONE works internally. The
ONE Simulator is a simulation tool widely used by researchers working on research
related to Delay-Tolerant Networks and Opportunistic Networks. The
default_settings.txt file is essential for running the simulation. It is provided as default
with the ONE source code folder and contains some parameters with default values
initially. The code starts with initModel() which does initializations for the ONE. It
runs completely to set up a lot of the parameters and events. After initModel(),
runSim() is run which handles the running of the simulation.
35
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
EXPERIMENT NO. 09
36
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
Communication Mode:
Select a communication mode for the 802.11b Interface Unit from the drop-down
menu.
Current SSID:
Shows the current SSID(Service Set ID).
This is called a Service Set ID and is used in the connection between the wireless
LAN client and the access point. Only a wireless LAN client and an access point that
have the same SSID can transmit to each other.
Selected SSID:
Input an SSID using alphanumeric characters. Up to 32 characters can be used.
37
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
If the SSID is not set and the transmission mode is "802.11 Ad hoc mode", the string
ASSID is used as the default SSID.
Channel:
If [Ad hoc mode] and [802.11 Ad hoc mode] is selected in the [Communication
Mode] list, select a communication channel from the drop-down menu.
The channel is a classification of radio frequency used for the wireless LAN.
Computers using the same channel can communicate with each other.
WEP Setting:
Drop Down Title that controls WEP Setting Status Either "Enable" or "Disable" is
displayed.
WEP is an encryption method that protects wireless data communication. To
communicate by encrypting data, both computers that are transmitting and receiving
the data must be set with the same WEP Key.
If you want to enable WEB encryption, select [Enable], and then make the [WEP
Key] settings as below.
64 bit Key:
To set 64 bit Key, entry of a 10-digit hexadecimal number required. Avoid
38
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
starting each WEP Key with "0x". The number entered will be shown like
"**********".
128 bit Key:
To set 64 bit Key, entry of a 26-digit hexadecimal number required. The
security is stronger than the security with 64 bit Key. Avoid starting each WEP
Key with "0x". The number entered will be shown like "**********".
EXPERIMENT NO. 10
Theory: - A routing algorithm is a procedure that lays down the route or path to
transfer data packets from source to the destination. They help in directing Internet
traffic efficiently. After a data packet leaves its source, it can choose among the many
different paths to reach its destination. Routing algorithm mathematically computes
the best path, i.e. “least – cost path” that the packet can be routed through.
Types of Routing Algorithms
Routing algorithms can be broadly categorized into two types, adaptive and
nonadaptive routing algorithms. They can be further categorized as shown in the
following diagram −
39
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
40
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
static routing table is constructed based upon the routing information stored in the
routers when the network is booted up.
The two types of non – adaptive routing algorithms are −
Flooding − In flooding, when a data packet arrives at a router, it is sent to all
the outgoing links except the one it has arrived on. Flooding may be
uncontrolled, controlled or selective flooding.
Random walks − This is a probabilistic algorithm where a data packet is sent
by the router to any one of its neighbours randomly.
EXPERIMENT NO. 11
Aim: - Simulation of MAC Protocols like Aloha, CSMA, CSMA/CD and CSMA/CA
using Standard Network Simulators.
Theory:- Data Link Layer
is used in a computer network to transmit the data between two devices or nodes. It
divides the layer into parts such as data link control and the multiple access
resolution/protocol. The upper layer has the responsibility to flow control and the
error control in the data link layer, and hence it is termed as logical of data link
41
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
control. Whereas the lower sub-layer is used to handle and reduce the collision or
multiple access on a channel. Hence it is termed as media access control
or the multiple access resolutions.
Data Link Control
A data link layer is a reliable channel for transmitting data over a dedicated link using
various techniques such as framing, error control and flow control of data packets in
the computer network.
When a sender and receiver have a dedicated link to transmit data packets, the data
link control is enough to handle the channel. Suppose there is no dedicated path to
communicate or transfer the data between two devices. In that case, multiple stations
access the channel and simultaneously transmits the data over the channel. It may
create collision and cross talk. Hence, the multiple access protocol is required to
reduce the collision and avoid crosstalk between the channels.
For example, suppose that there is a classroom full of students. When a teacher asks a
question, all the students (small channels) in the class start answering the question at
the same time (transferring the data simultaneously). All the students respond at the
same time due to which data is overlap or data lost. Therefore it is the responsibility
of a teacher (multiple access protocol) to manage the students and make them one
answer.
224.2K Vodafone has launches Pro II - The UK’s fastest WiFi tech
Following are the types of multiple access protocol that is subdivided into the
different process as:
42
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
In this protocol, all the station has the equal priority to send the data over a channel.
In random access protocol, one or more stations cannot depend on another station nor
any station control another station. Depending on the channel's state (idle or busy),
each station transmits the data frame. However, if more than one station sends the
data over a channel, there may be a collision or data conflict. Due to the collision, the
data frame packets may be lost or changed. And hence, it does not receive by the
receiver end.
o Aloha
o CSMA
o CSMA/CD
o CSMA/CA
It is designed for wireless LAN (Local Area Network) but can also be used in a
shared medium to transmit data. Using this method, any station can transmit data
across a network simultaneously when a data frameset is available for transmission.
43
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
Aloha Rules
Pure Aloha
Whenever data is available for sending over a channel at stations, we use Pure Aloha.
In pure Aloha, when each station transmits data to a channel without checking
whether the channel is idle or not, the chances of collision may occur, and the data
frame can be lost. When any station transmits the data frame to a channel, the pure
Aloha waits for the receiver's acknowledgment. If it does not acknowledge the
receiver end within the specified time, the station waits for a random amount of time,
called the backoff time (Tb). And the station may assume the frame has been lost or
destroyed. Therefore, it retransmits the frame until all the data are successfully
transmitted to the receiver.
44
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
EXPERIMENT NO. 12
Aim: - Study of Application layer protocols-DNS, HTTP, HTTPS, FTP and TelNet.
Theory:- Application layer protocols define how application processes (clients and
servers), running on different end systems, pass messages to each other. In particular,
an application layer is an abstract layer that handles the sharing protocol of the
45
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
TCP/IP and OSI model.
The application layer protocols used to make communication between sender and
receiver faster, more efficient, reliable, and secure. These protocols will be discussed
further below.
SMTP
TELNET
FTP
MIME
POP
HTTP
DNS
Terminal Network(TELNET)
FTP is the standard mechanism provided by TCP/IP for copying a file from one host
to another. FTP differs from other client-server applications because it establishes 2
connections between hosts. Two connections are Data Connection and Control
Connection.
In Domain Name System(DNS), TCP/IP protocol uses the IP address that uniquely
identifies a host's connection to the Internet to identify an entity. DNS is a hierarchical
system based on a distributed database that uses a hierarchy of Name Servers to
resolve Internet host names into the corresponding IP addresses required for packet
routing by issuing a DNS query to a name server.
DNS in the Internet: DNS is a protocol that can be used on different platforms.
47
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
Country Domain: The country domain section follows the same format as the
generic domain but uses 2 characters of country abbreviations (e.g., the US for
the United States) instead of 3 characters.
Inverse Domain: The inverse domain maps an address to a name.
EXPERIMENT NO. 13
Aim: - Demonstrate the steps to configure static NAT on Cisco devices through CLI.
This tutorial explains Static NAT configuration in detail. Learn how configure static NAT, map
address (inside local address, outside local address, inside global address and outside global
address), debug and verify Static NAT translation step by step with practical examples in packet
tracer.
48
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
In order to configure NAT we have to understand four basic terms; inside local, inside global,
outside local and outside global. These terms define which address will be mapped with which
address.
Term Description
Inside Local IP Address Before translation source IP address located inside the local network.
Inside Global IP Address After translation source IP address located outside the local network.
Outside Global IP Address Before translation destination IP address located outside the remote network.
Outside Local IP Address After translation destination IP address located inside the remote network.
Create a practice lab as shown in following figure or download this pre-created practice lab and load
in packet tracer
If require, you can download the latest as well as earlier version of Packet Tracer from here. Download Packet Tracer
Initial IP Configuration
Device / Interface IP Address Connected With
Laotop0 10.0.0.10/8 Fa0/0 of R0
Laptop1 10.0.0.20/8 Fa0/0 of R0
Laptop2 10.0.0.30/8 Fa0/0 of R0
Server0 192.168.1.10/24 Fa0/0 of R1
49
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
Device / Interface IP Address Connected With
Serial 0/0/0 of R1 100.0.0.1/8 Serial 0/0/0 of R2
Serial 0/0/0 of R2 100.0.0.2/8 Serial 0/0/0 of R2
To assign IP address in Laptop click Laptop and click Desktop and IP configuration and
Select Static and set IP address as given in above table.
50
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
To configure IP address in Router1 click Router1 and select CLI and press Enter key.
Two interfaces of Router1 are used in topology; FastEthernet0/0 and Serial 0/0/0.
By default interfaces on router are remain administratively down during the start up. We need to
configure IP address and other parameters on interfaces before we could actually use them for
routing. Interface mode is used to assign the IP address and other parameters. Interface mode can be
accessed from global configuration mode. Following commands are used to access the global
configuration mode.
Router>enable
Router# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#
Before we configure IP address in interfaces let’s assign a unique descriptive name to router.
Router(config)#hostname R1
51
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
R1#
Now execute the following commands to set IP address in FastEthernet 0/0 interface.
R1(config)#interface FastEthernet0/0
R1(config-if)#ip address 10.0.0.1 255.0.0.0
R1(config-if)#no shutdown
R1(config-if)#exit
interface FastEthernet 0/0 command is used to enter in interface mode.
Serial interface needs two additional parameters clock rate and bandwidth. Every serial cable has
two ends DTE and DCE. These parameters are always configured at DCE end.
We can use show controllers interface command from privilege mode to check the cable’s end.
R1(config)#exit
R1#show controllers serial 0/0/0
Interface Serial0/0/0
Hardware is PowerQUICC MPC860
DCE V.35, clock rate 2000000
[Output omitted]
Fourth line of output confirms that DCE end of serial cable is attached. If you see DTE here instead
of DCE skip these parameters.
R1#configure terminal
R1(config)#interface Serial0/0/0
R1(config-if)#ip address 100.0.0.1 255.0.0.0
R1(config-if)#clock rate 64000
R1(config-if)#bandwidth 64
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#
Router#configure terminal Command is used to enter in global configuration mode.
52
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
Router(config-if)#clock rate 64000
In real life environment this parameter controls the data flow between serial links and need to be set
at service provider’s end. In lab environment we need not to worry about this value. We can use any
valid rate here.
Router(config-if)#bandwidth 64
Bandwidth works as an influencer. It is used to influence the metric calculation of EIGRP or any
other routing protocol which uses bandwidth parameter in route selection process.
We will use same commands to assign IP addresses on interfaces of Router2. We need to provided
clock rate and bandwidth only on DCE side of serial interface. Following command will assign IP
addresses on interface of Router2.
Initial IP configuration in R2
Router>enable
Router#configure terminal
Router(config)#hostname R2
R2(config)#interface FastEthernet0/0
R2(config-if)#ip address 192.168.1.1 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#interface Serial0/0/0
R2(config-if)#ip address 100.0.0.2 255.0.0.0
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#
That’s all initial IP configuration we need. Now this topology is ready for the practice of static nat.
Since static NAT use manual translation, we have to map each inside local IP address (which needs
a translation) with inside global IP address. Following command is used to map the inside local IP
address with inside global IP address.
53
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
Router(config)#ip nat inside source static [inside local ip address] [inside global IP address]
For example in our lab Laptop1 is configured with IP address 10.0.0.10. To map it with 50.0.0.10 IP
address we will use following command
Let’s implement all these commands together and configure the static NAT.
55
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
First command verifies that we are testing from correct NAT device.
Second command checks whether we are able to access the remote device or not. A ping reply
confirms that we are able to connect with remote device on this IP address.
Third command checks whether we are able to access the remote device on its actual IP address or
not. A ping error confirms that we are not able to connect with remote device on this IP address.
Let’s do one more testing. Click Laptop0 and click Desktop and click Web Browser and access
200.0.0.10.
56
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
Above figure confirms that host 10.0.0.10 is able to access the 200.0.0.10.
Why we are not able to connect with the remote device from this host?
Because we configured NAT only for one host (Laptop0) which IP address is 10.0.0.10. So only the
host 10.0.0.10 will be able to access the remote device.
To confirm it again, let’s try to access web service from this host.
57
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
If you followed this tutorial step by step, you should get the same output of testing. Although it’s
very rare but some time you may get different output. To figure out what went wrong you can use my
practice topology with all above configuration. Download my practice topology
We can also verify this translation on router with show ip nat translation command.
Pay a little bit extra attention on outside local address filed. Have you noticed one interesting
feature of NAT in above output? Why actual outside local IP address is not listed in this filed?
58
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
The actual IP address is not listed here because router is receiving packets after the translation. From
R1’s point of view remote device’s IP address is 200.0.0.10 while from R2’s point of view end
device’s IP address is 50.0.0.10.
This way if NAT is enabled we would not be able to trace the actual end device.
59
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
EXPERIMENT NO. 14
61
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
$ ./configure
$ make cleanall
$ make
Note: In general, if you would like to run parallel simulations, we recommend that you use
Linux, macOS, or another unix-like platform.
2.8. Portability Issues 5
Installation Guide, Release 6.0
2.9.2 Akaroa
Akaroa 2.7.9, which is the latest version at the time of writing, does not support Windows.
You may try to port it using the porting guide from the Akaroa distribution.
6
62