0% found this document useful (0 votes)
16 views11 pages

Expt 4

Download as docx, pdf, or txt
Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1/ 11

Experiment 4

Name : <Write your Name>


Reg. No : <Write your Reg.No>
Faculty Name : <Write your Faculty name>

AIM:

Task 4a) Use Netsim Interactive Simulation mode and apply the basic networking
commands such as ping, route print, acl

SOFTWARE USED:
Netsim v13.1 Academic version or higher.

NetSim Interactive Simulation Theory:


NetSim allows users to interact with the simulation at runtime via a socket. User Interactions make
simulation more realistic by allowing command execution to view/modify certain device parameters
during runtime.

This section will demonstrate how to perform Interactive simulation for a simple network scenario. Let
us consider Internetworks. To create a new scenario, go to New à Internetworks. Click & drop Wired
Nodes and Router onto the Simulation Environment and link them as shown below

Figure 1: Network Topology

Procedure

The following set of procedures were done to generate this sample:

Step 1: A network scenario is designed in NetSim GUI comprising of 2 Wired Nodes and 3
Routers in the “Internetworks” Network Library.

Step 2: In the Network Layer properties of Wired Node 1, “ICMP Status” is set as TRUE.
Similarly, ICMP Status is set as TRUE for all the devices as shown Figure 2

Step 3: In the General properties of Wired Node 1, Wireshark Capture is set as Online.

Step 4: Right click on the Application Flow App1 CBR and select Properties or click on the
Application icon present in the top ribbon/toolbar.

A CBR Application is generated from Wired Node 1 i.e., Source to Wired Node 2 i.e.,
Destination with Packet Size remaining 1460Bytes and Inter Arrival Time 233.6μs. Transport
Protocol is set to UDP.

Additionally, the “Start Time(s)” parameter is set to 30, while configuring the application.
This time is usually set to be greater than the time taken for OSPF Convergence (i.e.,
Exchange of OSPF information between all the routers), and it increases as the size of the
network increases.

Step 5: Packet Trace is enabled in NetSim GUI. At the end of the simulation, a very large .csv
file is containing all the packet information is available for the users to perform packet level
analysis. Plots are enabled in NetSim GUI.

Step 6: Click on Run Simulation. Simulation Time is set to 300 Seconds and in the Runtime
Interaction tab Figure 3, Interactive Simulation is set to True
Figure 2: Run time Interaction tab set Interactive Simulation as True

 You can even set the Simulation Time as 500 sec instead (It is recommended to specify a
longer simulation time to ensure that there is sufficient time for the user to execute the
various commands and see the effect of that before Simulation ends) and click OK.
 Simulation (NetSimCore.exe) will start running and will display a message "waiting for first
client to connect" as shown below Figure.

Figure: Waiting for first client to connect

After Simulation window opens, goto Network scenario and right clickon Router_3 or any other
node and select NetSim Console option as shown
Figure: Select NetSim Console option

 Now client (NetSimCLI.exe) will start running and it will try to establish connection
with NetSimCore.exe. After connection is established, the window will look similar like
this shown below Figure

Figure : Connection is established

 After this the command line interface can be used to execute the supported
commands

[Note: Commands are not a case sensitive]

Simulation specific
 Pause
 PauseAt
 Continue
 Stop
 Exit
 Reconnect
Pause: To pause the currently running simulation

PauseAt: To pause the currently running simulation with respect to particular time (Ex: To
Pause simulation at 70.2 sec use command as PauseAt 70.2)

Continue: To start the currently paused simulation

Stop: To stop the currently running simulation (NetSimCore.exe)

Exit: To exit from the client (NetSimCLI.exe)

Reconnect: To reconnect client (NetSimCLI.exe) to simulation (NetSimCore.exe) when we


rerun simulation again

Ping Command#

 The ping command is one of the most often used networking utilities for
troubleshooting network problems.
 You can use the ping command to test the availability of a networking device (usually
a computer) on a network.
 When you ping a device, you send that device a short message, which it then sends
back (the echo)
 If you receive a reply then the device is in Network, if you don't then the device is
faulty, disconnected, switched off, incorrectly configured.
 You can use the ping cmd with an IP address or Device name.
 ICMP_Status should be set as True in all nodes (Wired_Node and Router)

 Right click on Wired_Node_1 and go to properties. Under General > properties


enable Wireshark Capture option as "Online"
Perform the following tasks and observe the results

ping <IP address> e.g. ping 11.4.1.2

ping <NodeName> e.g. ping Wired_Node_2

and try ping to all devices

 Paste the screenshot of the ping command results

 After simulation Open packet trace and filter ICMP_EchoRequest and


ICMP_EchoReply from CONTROL_PACKET_TYPE/APP_NAME column
 Paste the screenshot of the excel packet trace and trace the ICMP control
packets

 Open Wireshark and apply filter ICMP. We can see the ping request and reply packets
in Wireshark.
 Paste the screenshot of the Wireshark layer wise and trace the ICMP control
packets

Route Commands

 route print

 route delete

 route add

In order to view the entire contents of the IP routing table, use following commands route
print.

 Paste the screenshot of the Routing Table


 You will see the routing table entries with network destinations and the gateways to which packets
are forwarded when they are headed to that destination. Unless you've already added static routes
to the table, everything you see here will be dynamically generated.

ACL Configuration
Routers provide basic traffic filtering capabilities, such as blocking Internet traffic, with access control
lists (ACLs). An ACL is a sequential list of permit or deny statements that apply to addresses or upper-
layer protocols. These lists tell the router what types of packets to: permit or deny. When using an
access-list to filter traffic, a permit statement is used to "allow" traffic, while a deny statement is used
to "block" traffic.
ACL Commands

 To view ACL syntax use: acl print.

 Before using ACL's, we must first verify that acl option enabled.

 A common way to enable ACL use command: acl enable.

 Enters configuration mode of ACL using: aclconfig

 To view ACL Table: Print

 To exit from ACL configuration use command: exit

 To disable ACL use command: acl disable (use this command > after exit from acl
configuration)

To view ACL usage syntax use: acl print

[PERMIT, DENY] [INBOUND, OUTBOUND, BOTH] PROTO SRC DEST SPORT DPORT
IFID

Step to Configure ACL#

 Create Network scenario as shown in below figure.

Figure: Network Scenario


 To create a new rule in the ACL use command as shown below to block UDP
packet in Interface_3 of the Router_3.
 Click on the Application icon present in the top ribbon/toolbar.
 CBR Application from Wired Node 1 to Wired Node 2 with 10 MbpsGeneration
Rate (Packet Size: 1460, Inter Arrival Time: 1168µs).
 Set Transport Protocol to UDP.
 Set Start Time as 30 Sec
 Click on run simulation option and In the Run time Interaction tab set Interactive
Simulation as True and click on Accept.
 Set the Simulation Time as 200sec or more. Click Ok.
 Right click on Router_3 and select NetSim Console. Use the command as follows:

NetSim>acl enable

ACL is enable

NetSim>aclconfig

ROUTER_3/ACLCONFIG>acl print

Usage: [PERMIT, DENY] [INBOUND, OUTBOUND, BOTH] PROTO SRC DEST


SPORT DPORT IFID

ROUTER_3/ACLCONFIG\>DENY BOTH UDP ANY ANY 0 0 3

OK!

ROUTER_3/ACLCONFIG\>print

DENY BOTH UDP ANY/0 ANY/0 0 0 3

ROUTER_3/ACLCONFIG\>exit

NetSim>acl disable

ACL is disable

NetSim>

Results
The impact of ACL rule applied over the simulation traffic can be observed in the
IP_Metrics_Table in the simulation results window, In Router_3 number of packets
blocked by firewall can be seen in the table.

 [Note: Results will vary based on time of ACL command are executed]. Paste
the screenshot of the IP_Metrics_Table

The impact of ACL rule applied over the simulation traffic can be observed in the
Application throughput plot. Throughput graph will show a drop after ACL is set. If ACL
is disabled after a while, application packets will start flowing across the router. The
Application throughput plot will show a drop and increase in throughput after setting
ACL and disabling ACL respectively.
When did you see the drop in throughput in the graph, since router blocks UDP
packets in the plot?.

What time you see the increase in throughput when router permitted packets ?

Task 4b) Study of Basic Linux Commands

Name : <Write your Name>


Reg. No : <Write your Reg.No>
Faculty Name : <Write your Faculty name>

Aim:

To study and understand the basic Linux commands.

Theory:

Linux is the oft-ignored third wheel to Windows and Mac. Yes, over the past decade, the
open source operating system has gained a lot of traction, but it’s still a far cry from being
considered popular. Yet though that may be true, Linux still earns new converts every day. It can be
a traumatic experience having to go from a GUI-based operating system like Windows or Mac to one
that requires command line fiddling. But if you can get over that initial hump of difficulty, you may
find that Linux is surprisingly robust.

Linux has origins in the command line, and there can be many times when you will not be
running a GUI. On some systems, such as a dedicated server, you may not have a GUI installed at all.
Linux provides you with many command line tools to manipulate files.

COMMANDS

1) pwd:

Description of the Command: <Write the function of the command>

Example: < should keep the screenshot>

2) ls:

Description of the Command: <Write the function of the command>

Example: < should keep the screenshot>

3) man:

Description of the Command: <Write the function of the command>


Example: < should keep the screenshot>

4) mkdir:

Description of the Command: <Write the function of the command>

Example: < should keep the screenshot>

5) cd:

Description of the Command: <Write the function of the command>

Example: < should keep the screenshot>

6) cd ..

Description of the Command: <Write the function of the command>

Example: < should keep the screenshot>

7) cd ~:

Description of the Command: <Write the function of the command>

Example: < should keep the screenshot>

8) cat :

Description of the Command: <Write the function of the command>

Example: < should keep the screenshot>

9) gedit <filename>:

Description of the Command: <Write the function of the command>

Example: < should keep the screenshot>

10)gedit <filename> &:

Description of the Command: <Write the function of the command>

Example: < should keep the screenshot>

Result:
Thus a few basic linux commands are studied and practiced successfully.

You might also like