Understand The Working of Basic Networking Commands
Understand The Working of Basic Networking Commands
route print: In order to view the entire contents of the IP routing table.
route delete: In order to delete all routes in the IP routing table.
route add: In order to add a static TCP/IP route to the IP routing table.
Ver 13.1 1
26.2 Network setup
Open NetSim and click Examples > Experiments > Basic-networking-commands-Ping-
Route-Add/Delete/Print-and-ACL > Sample-1 as shown below Figure 26-1.
26.3 Procedure
The following set of procedures were done to generate this sample:
Ver 13.1 2
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 26-3.
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 remaining 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 26-4, Interactive Simulation is set to True.
Ver 13.1 3
Figure 26-4: Runtime Interaction window
NOTE: 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 the Simulation ends.
Simulation (NetSimCore.exe) will start running and will display a message “waiting for
first client to connect” as shown below Figure 26-5
Ver 13.1 4
Figure 26-6: Select NetSim Console
Now Client (NetSimCLI.exe) will start running and it will try to establish a
connection with NetSimCore.exe. After the connection is established, the following
will be displayed Figure 26-7.
Ver 13.1 5
Figure 26-8: Pinging Wired_Node_2
route print
Ver 13.1 6
So, to delete the route with destination network 11.5.1.2, all we’d have to do is type this
command.
To check whether route has been deleted or not check again using route print command.
To add a static route to the table, you will type a command using the following syntax.
So, for example, if you wanted to add a route specifying that all traffic bound for the
11.5.1.2 subnet went to a gateway at 11.5.1.1
If you were to use the route print command to look at the table now, you’d see your new
static route.
Ver 13.1 7
NOTE: Entry added in IP table by routing protocol continuously gets updated. If a user tries to remove a
route via route delete command, there is always a chance that routing protocol will re-enter this entry again.
Users can use ACL / Static route to override the routing protocol entry if required.
[PERMIT, DENY] [INBOUND, OUTBOUND, BOTH] PROTO SRC DEST SPORT DPORT IFID
Ver 13.1 8
Figure 26-11: Application properties window
Use the command as follows Figure 26-12.
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
Ver 13.1 9
ROUTER_3/ACLCONFIG>DENY BOTH UDP ANY ANY 0 0 2
OK!
OK!
ROUTER_3/ACLCONFIG>print
ROUTER_3/ACLCONFIG>exit
NetSim>acl disable
ACL is disable
NetSim>
Ver 13.1 10
Figure 26-13: Packet Trace - ICMP Control Packets
In Wireshark, apply filter as ICMP. we can see the ping request and reply packets in Wireshark
as shown Figure 26-14.
Ver 13.1 11
Figure 26-15: IP Metrics Table in result window
NOTE: Number of packets blocked may vary based on the time at which ACL is configured.
Users can also observe this in Packet Animation before and after the Packets are blocked as
shown below Figure 26-16/Figure 26-17.
Figure 26-16: In Animation Window before applying ACL rules see the packet flow
Ver 13.1 12
Figure 26-17: In Animation Window after applying ACL rules see the packet flow
Check Packet animation window whether packets has been blocked in Router_3 or not
after entering ACL command to deny UDP traffic.
Before applying ACL rule there is packet flow from Wired_Node_1 to Wired_Node_2
Ver 13.1 13