Cs349 Networks Lab - Assignment 1: Roopansh Bansal (150101053)
Cs349 Networks Lab - Assignment 1: Roopansh Bansal (150101053)
Cs349 Networks Lab - Assignment 1: Roopansh Bansal (150101053)
2 PING EXPERIMENT
The readings are taken at 1.00pm, 7.00pm and 1.00am (IST) respectively.
Test PC was connected to DIGITALOCEAN VPN (Bangalore,India) while performing the experiment.
‘justpakit.com’ is chosen for experimenting with packets of size from 64 bytes to 2048 bytes.
DESTINATION IP ADDRESS GEOGRAPHIC LOCATION Avg. RTT 1 Avg. RTT 2 Avg. RTT 3 Total Avg.
HOST ADDRESS (ms) (ms) (ms) RTT (ms)
digitalocean.com 104.16.109.208 Arizona, United States 76.061 91.875 85.680 84.539
iitg.ac.in 14.139.196.22 Guwahati, India 114.658 127.167 121.000 120.942
Justpakit.com 139.59.87.253 Bangalore, India 61.091 70.817 60.193 64.034
Seedr.cc 95.211.185.133 Amsterdam, Netherlands 331.955 358.695 247.127 312.592
Youtube.com 172.217.31.206 California, United States 68.653 90.701 75.473 78.276
Table 1: Round Trip Times of 5 Hosts
Size (Bytes) 64 256 512 768 1024 1280 1536 1792 2048
Avg. RTT 1 (ms) 62.097 56.879 61.477 56.938 58.868 61.406 111.777 112.239 116.622
Avg. RTT 2 (ms) 83.886 70.155 84.152 79.518 79.684 74.881 166.073 131.965 141.431
Avg. RTT 3 (ms) 64.798 59.951 60.219 60.438 65.219 62.550 132.313 120.825 119.195
Table 2: Round Trip Time vs Packet Size
RTT V/S DISTANCE : From the
above table, we can conclude that
there exists weekly positive
correlation between the
Geographic distance and Round
Trip Time (RTT). They are
correlated because of reasons like
increased number of hops and
increased propagation delay.
Larger the distance, longer it takes
for a packets to
propogate(Propagation delay).
Also, the packets have to go
through more number of nodes
and at each nodes there may be a
delay(processing delay). Hence,
more the routers, the longer is the
RTT. It’s a week relation because
Figure 1: Round Trip Time of 5 Hosts
there are many other factors on which it depends like network traffic and the server
capacities. PACKET LOSS : In my experiment, no cases of packet loss greater than 0% was found. But, in general packet loss can be
greater than 0% because of network congestion and traffic. Some packets may collide with other packets in the network and result
1| P a g e
in packet loss. The ICMP Packets have lower priority. So they might take longer time to process in some destination server’s queue.
Sometimes, there may be 100% packet loss. In such cases, generally the destination server drops all the ping ICMP packets. RTT
V/S DAY OF TIME: From both the above tables, we observe that RTT’s vary with time of the day. At different times, the congestion
in network is different. From the observations, we can say that RTT is least at 1:00 am and maximum at 7:00pm. Around 1:00pm,
RTT is little less than that at 7:00pm. Hence,
we can conclude that the network traffic is
high around 7:00pm.
2|Page
Firstly, no attempt will be made to lookup symbolic names for host addresses when using ‘-n’, hence it will be faster. So, the mean
Latency is higher in second case than the mean latency in the first case. Secondly, ‘-p ff00’ will cause the sent packet to be filled
with the pattern 11111100000000 which is useful for diagnosing data-dependent problems in a network. This will cause problems
with the synchronisation of the clocks because only one transition is present in the padding, from 1 to 0. Hence, the clocks are
more likely to go out of synchronisation in second case and we observe that the packet loss is higher in the second case.
3|Page
network due to network congestion. RX bytes, TX bytes indicates the total amount of data that has passed through the interface
either way. Txqueuelen denotes the length of the transmit queue of the device.
5 NETSTAT
‘netstat’ (network statistics) is a command line tool for
monitoring network connections both incoming and
outgoing as well as viewing routing tables, interface
statistics etc. It is one of the most basic network service
debugging tools, which tells us which ports are open
and whether any programs are listening on ports.
4|Page
destination. The Flags column displays the flags that describe the route - G(route uses a gateway), U(interface is up), H(Only a
single host can be reached through the route), D(route is dynamically created), M(route is set if the table entry was modified by an
ICMP redirect message), !(route is a reject route and datagrams will be dropped). The next three columns show the MSS, Window
and irtt that will be applied to TCP connections established via this route. The MSS(Maximum Segment Size) is the size of the
largest datagram the kernel will construct for transmission via this route. The Window is the maximum amount of data the system
will accept in a single burst from a remote host. The acronym irtt is the initial round trip time. The Iface column tells which network
interface should be used for sending packets that match the destination.
My machine has 3
interfaces, which are eno1
(Wired Ethernet), lo
(loopback device), wlo1
Figure 9: Kernel Interface Table (Wireless Ethernet).
The MTU and Met fields show the current MTU and metric values for that interface.
The RX and TX columns show how many packets have been received or transmitted error-free(RX-OK/TX-OK), damaged(RX-
ERR/TX-ERR), dropped(RX-DRP/TX-DRP) and lost because of an overrun (RX-OVR/TX-OVR). The last column shows the flags that
have been set for this interface- B(broadcast address has been set), L(it is a loopback device), M(all packets are received, i.e.
promiscuous mode), O(ARP is turned off for this interface), P(This is a point-to-point connection), R(Interface is running),
U(Interface is up).
The loopback device is a special, virtual network interface that the computer uses to communicate with itself. It is used mainly
for diagnostics and troubleshooting, and to connect to servers running on the local machine. When a network interface is
disconnected, no communication on that interface is possible, not even communication between the computer and itself. The
loopback interface does not represent any actual hardware, but exists so applications running on the computer can always connect
to servers on the same machine. For example, if you run a web server, you have all your web documents and could examine them
file by file on the local machine. For IPv4, the loopback interface is assigned all the IPs in the 127.0.0.0/8 address block
(i.e.127.0.0.1 through 127.255.255.254).
6 TRACEROUTE
The readings are taken at 1.00pm, 7.00pm and 1.00am (IST) respectively.
Test PC was connected to DIGITALOCEAN VPN (Bangalore,India) while performing the experiment.
The route to the hosts changes at different times of the day in the experiments because of network congestion. The packets are
redirected by the nodes to take a route having less traffic. The load balancing is done to reduce the load of congested path.
Sometimes, traceroute might not find a complete path to some host. Some servers/hosts along the path may have not been
configured to respond to the ICMP Traffic or may have set up firewalls which block the ICMP Traffic. However, they still send the
data to the next hop as there are results that follow. Many network providers disable ICMP traffic if their network is under heavy
load.
It is possible to find the route to certain hosts which fail to respond with ping experiment. The ping and traceroute both use the
ICMP Packets but there working is different. Ping is straight ICMP from point A to point B, that traverses networks via routing rules
and expects a ICMP Reply from the host. Most probably the server is blocking the reply. On the other hand, Traceroute sends
packets with TTL values that gradually increase from packet to packet. Routers decrement TTL values of packets by one and discard
packets whose TTL value has reached zero, returning the ICMP error (ICMP Time Exceeded). Traceroute looks for the ICMP Time
exceeded packet and not the ICMP Reply Packet, and that is why it might be possible.
5|Page
7 ARP
ARP stands for Address Resolution Protocol. $
arp –a shows the complete ARP Table of the
machine. It shows the IP-Address, the
corresponding MAC Address and the Network
Interface. When we try to ping an IP address on
our local network, say 10.0.0.1, the system has
to turn the IP address 10.0.0.1 into a MAC
address. This involves using ARP Table to
resolve it. An entry for the IP address can be
deleted from the ARP table using the
command “$ arp –d <address>”. If you want to
make a specific MAC address be used for an IP,
use the command: “$ arp -s <ip_addr>
<MAC_addr>”. You need to run it as a root
user(use sudo).
The scenario where two IP’s can map to same Ethernet Address is when a router or a gateway connects two or more subnet
ranges. When communicating with machines on the same subnet range, MAC address is used for directing the packages. In the
ARP Table, the IP’s of the devices which are connected in the other subnet range have the ethernet address/MAC address as that
of the Router or Gateway which connects the two subnet ranges. ARP table is referred to convert these IP addresses to the MAC
address and packets are sent to it(router/gateway). The router then uses it’s routing table and sends the packet further to the
correct device.
8 NMAP
The following command is used for this question. The IP’s analysed are that of Dihing Hostel.
From the above graph, one can easily notice that the number of hosts are low in the early morning around 11.00 AM and steadily
increase till the afternoon (around 4.00PM). After that there is slight decrease or almost same number of hosts online till evening
around 11:00PM. The number of hosts online starts to decrease after that.
6|Page