{"id":24589182,"url":"https://github.com/devprabal/cnlabassignment1-solutions","last_synced_at":"2026-01-04T12:03:07.328Z","repository":{"id":121718534,"uuid":"145293088","full_name":"devprabal/CNLabAssignment1-solutions","owner":"devprabal","description":null,"archived":false,"fork":false,"pushed_at":"2018-08-19T19:22:21.000Z","size":351,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-24T08:14:15.654Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devprabal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2018-08-19T10:24:51.000Z","updated_at":"2018-08-19T19:22:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"45a75245-c184-4177-8e82-d21c338fa4f0","html_url":"https://github.com/devprabal/CNLabAssignment1-solutions","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devprabal%2FCNLabAssignment1-solutions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devprabal%2FCNLabAssignment1-solutions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devprabal%2FCNLabAssignment1-solutions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devprabal%2FCNLabAssignment1-solutions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devprabal","download_url":"https://codeload.github.com/devprabal/CNLabAssignment1-solutions/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244117526,"owners_count":20400742,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-24T08:14:15.953Z","updated_at":"2026-01-04T12:03:07.244Z","avatar_url":"https://github.com/devprabal.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003e**Instructions**\n\u003e\n\u003e  This markdown file is prepared using [Online Markdown Editor](https://dillinger.io/). It requires certain files to display images within it. It is therefore advised to view this markdown here on github repo or clone the entire repo to your local machine.\n\u003e \n\u003e The source codes and related csv/spreadsheet files which were used in the making of this assignment are included in a seperate repo. It is recommended to have a view on this [repo](https://github.com/devprabal/CNLabAssignment1-source).\n\u003e\n\u003e The answers are provided below.\n## Q1\n\n### information about 5 hosts selected \n|  | www.facebook.com | ligben.io | https://distrotest.net/ | www.gmail.com | www.github.com |\n| --- | --- | --- | --- | --- | --- |\n| 0 | edge-star-mini-shv-01-frt3.facebook.com | no-reverse-dns-configured.com | 77-64-170-23.dynamic.primacom.net | fra15s17-in-f5.1e100.net | lb-192-30-253-113-iad.github.com |\n\n### host1 stats\n\n|  | time of day | rtt avg |\n| --- | --- | --- |\n| 0 | 16 | 97.56775 |\n| 1 | 23 | 85.71065 |\n| 2 | 0 | 85.69140 |\n\n#### host1 packet loss \u003e 0% stats \nnone\n### host2 stats\n\n|  | time of day | rtt avg |\n| --- | --- | --- |\n| 0 | 16 | 478.12775 |\n| 1 | 23 | 475.36325 |\n| 2 | 0 | 59.20005 |\n\n#### host2 packet loss \u003e 0% stats \n\n|  | name | IP address | % packet loss | rtt min | rtt avg | rtt max | rtt mdev | time of day | packet_size |\n| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |\n| 0 | no-reverse-dns-configured.com | 81.171.22.7 | 60% | 644.095 | 673.385 | 701.591 | 24.476 | 16 | 64 |\n| 4 | no-reverse-dns-configured.com | 81.171.22.7 | 40% | 605.473 | 677.117 | 806.046 | 71.284 | 16 | 64 |\n| 5 | no-reverse-dns-configured.com | 81.171.22.7 | 30% | 545.013 | 637.961 | 746.901 | 60.038 | 16 | 64 |\n| 6 | no-reverse-dns-configured.com | 207.244.67.218 | 10% | 518.437 | 608.082 | 692.761 | 60.912 | 16 | 64 |\n| 10 | no-reverse-dns-configured.com | 207.244.67.218 | 10% | 549.187 | 590.188 | 642.977 | 29.260 | 16 | 64 |\n| 13 | no-reverse-dns-configured.com | 64.32.8.68 | 60% | 70.726 | 70.760 | 70.797 | 0.025 | 16 | 64 |\n| 14 | no-reverse-dns-configured.com | 207.244.67.218 | 30% | 711.798 | 816.819 | 1002.714 | 88.342 | 16 | 64 |\n| 16 | no-reverse-dns-configured.com | 64.32.8.68 | 50% | 70.683 | 70.769 | 70.814 | 0.295 | 16 | 64 |\n\n### host3 stats\n\n|  | time of day | rtt avg |\n| --- | --- | --- |\n| 0 | 16 | 130.02690 |\n| 1 | 23 | 131.12605 |\n| 2 | 0 | 130.91160 |\n\n#### host3 packet loss \u003e 0% stats \nnone\n\n### host4 stats \n|  | time of day | rtt avg |\n| --- | --- | --- |\n| 0 | 16 | 60.43605 |\n| 1 | 23 | 53.49640 |\n| 2 | 0 | 32.09665 |\n\n#### host4 packet loss \u003e 0% stats \nnone\n\n### host5 stats \n\n|  | time of day | rtt avg |\n| --- | --- | --- |\n| 0 | 16 | 597.88420 |\n| 1 | 23 | 32.00675 |\n| 2 | 0 | 31.17940 |\n\n#### host5 packet loss \u003e 0% stats \n\n|  | name | IP address | % packet loss | rtt min | rtt avg | rtt max | rtt mdev | time of day | packet_size |\n| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |\n| 1 | lb-192-30-253-113-iad.github.com | 192.30.253.113 | 10% | 543.271 | 596.078 | 646.322 | 37.860 | 16 | 64 |\n| 5 | lb-192-30-253-113-iad.github.com | 192.30.253.113 | 10% | 515.742 | 563.243 | 611.480 | 29.173 | 16 | 64 |\n| 10 | lb-192-30-253-113-iad.github.com | 192.30.253.113 | 10% | 545.990 | 626.497 | 688.748 | 40.341 | 16 | 64 |\n\n**Four Causes of Packet Loss**\n\n1. Link Congestion\nYour data must travel through multiple devices and links during its trip across your network. If one of these links is at full capacity when your data arrives, then it must wait its turn before being sent across the wire (this is known as queuing).\n\n2. Device (Router/Switch/Firewall/etc.) Performance\nIf your bandwidth is adequate, you can still face an issue if your router/switch/firewall is not able to keep up with the traffic.The traffic is reaching the device, but the device's CPU or memory is maxed out and not able to handle extra traffic.\n\n3. Software issues (bugs) on a network device\nYou must upgrade the software on the affected device(s).\n\n4. Faulty Hardware or Cabling\nThe faulty hardware must be replaced, or the fault link must be repaired.\n\n### geographical distance affects avg rtt\n\nThere is a positive correlation between distance and RTT. There are a number of reasons for this. For example, an increased hop count. The packets have to go through more routers, at each router there may be a delay, therefore more routers, the longer the RTT.\nAs can be seen from the stats that the server of host2 (libgen.io) is farther than the rest.\n\n### time of day affects avg rtt \n\n![Fig1.1](output_35_0.png \"time of day affects avg rtt\")\n\n### change in packet size affects avg rtt \n\n|  | name | IP address | % packet loss | rtt min | rtt avg | rtt max | rtt mdev | time of day | packet_size |\n| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |\n| 0 | lb-192-30-253-113-iad.github.com | 192.30.253.113 | 0% | 31.115 | 31.203 | 31.249 | 0.226 | 1 | 64 |\n| 1 | lb-192-30-253-113-iad.github.com | 192.30.253.113 | 0% | 30.915 | 31.516 | 31.696 | 0.317 | 1 | 128 |\n| 2 | lb-192-30-253-113-iad.github.com | 192.30.253.113 | 0% | 32.287 | 32.405 | 32.591 | 0.231 | 1 | 256 |\n| 3 | lb-192-30-253-113-iad.github.com | 192.30.253.113 | 0% | 33.686 | 33.775 | 33.886 | 0.239 | 1 | 512 |\n| 4 | lb-192-30-253-113-iad.github.com | 192.30.253.113 | 0% | 36.792 | 36.897 | 37.199 | 0.140 | 1 | 1024 |\n\n|  | packet_size | rtt avg |\n| --- | --- | --- |\n| 0 | 64 | 31.203 |\n| 1 | 128 | 31.516 |\n| 2 | 256 | 32.405 |\n| 3 | 512 | 33.775 |\n| 4 | 1024 | 36.897 |\n\n![Fig1.2](output_39_0.png \"change in packet size affects avg rtt\")\n\n_________________\n\n## Q2 \n```\nifconfig - configure a network interface\nifconfig [interface]\nifconfig interface [aftype] options | address ...\n```\n\nIfconfig is used to configure the kernel-resident network interfaces. It is used at boot time to set up interfaces as necessary. After that, it is usually only needed when debugging or when system tuning is needed. If no arguments are given, ifconfig displays the status of the currently active interfaces. If a single interface argument is given, it displays the status of the given interface only; if a single -a argument is given, it displays the status of all interfaces, even those that are down.\n\n![Fig2.1](ifconfig.png \"ifconfig\")\n\n_________________\n\n## Q3\n\nNetstat command displays various network related information such as network connections, routing tables, interface statistics, masquerade connections, multicast memberships etc.,\n\nThis program is mostly obsolete.  Replacement for netstat is ss.  Replacement  for  netstat  -r  is  ip route. Replacement for netstat -i is ip -s link.  Replacement for netstat -g is ip maddr.\n\nNetstat prints information about the Linux networking subsystem.  The type of information printed is controlled by the first argument, as follows:\n\n(none)\n       By default, netstat displays a list of open sockets.  If you don't specify\n       any address families, then the active sockets of  all  configured  address\n       families will be printed.\n\n--route, -r\n       Display  the  kernel  routing  tables. See the description in route(8) for\n       details.  netstat -r and route -e produce the same output.\n\n--groups, -g\n       Display multicast group membership information for IPv4 and IPv6.\n\n--interfaces, -i\n       Display a table of all network interfaces.\n\n--masquerade, -M\n       Display a list of masqueraded connections.\n\n--statistics, -s\n       Display summary statistics for each protocol.\n\n`netstat -tn`\n\n![Fig3.1](netstat_tcp_established.png)\n\nLocal address : It is the IP address of the local computer (your device) and the port number being used. This address is assigned to you by your router DHCP servers.\n\nForeign address : It is the IP address and port number of the remote computer to which the socket is connected.\n\n`netstat -r : To get the kernel routing information.`\n\n![Fig3.2](netstat-r.png)\n\n`netstat -i : To get the list of network interfaces.`\n\n![Fig3.3](netstat-i.png)\n\n**loopback**  `lo`\n\nThe loopback device is a special, virtual network interface that your computer uses to communicate with itself. It is used mainly for diagnostics and troubleshooting, and to connect to servers running on the local machine.\n\nThe loopback interface does not represent any actual hardware, but exists so applications running on your computer can always connect to servers on the same machine.\n\nFor example, if you run a web server, you have all your web documents and could examine them file by file. You may be able to load the files in your browser too.\n\n_________________\n\n## Q4 \n\n### information about hosts\n\n|  | registered domain | IP |\n| --- | --- | --- |\n| 0 | github.com | 192.30.253.113 |\n| 1 | 1e100.net | 216.239.36.5 |\n| 2 | primacom.net | 77.64.170.23 |\n| 3 | NaN | 207.244.67.218 |\n| 4 | facebook.com | 31.13.92.36 |\n\n\n### hop counts for each host in each time slot \n\n|  | Input | Registered Domain | Time of day | Hop count |\n| --- | --- | --- | --- | --- |\n| 0 | 192.30.253.113 | github.com | 19 | 10 |\n| 10 | 192.30.253.113 | github.com | 22 | 10 |\n| 20 | 192.30.253.113 | github.com | 23 | 10 |\n| 30 | 216.239.36.5 | 1e100.net | 19 | 5 |\n| 35 | 216.239.36.5 | 1e100.net | 22 | 5 |\n| 40 | 216.239.36.5 | 1e100.net | 23 | 5 |\n| 45 | 77.64.170.23 | primacom.net | 19 | 20 |\n| 65 | 77.64.170.23 | primacom.net | 22 | 20 |\n| 85 | 77.64.170.23 | primacom.net | 23 | 20 |\n| 105 | 207.244.67.218 | NaN | 19 | 10 |\n| 115 | 207.244.67.218 | NaN | 22 | 10 |\n| 125 | 207.244.67.218 | NaN | 23 | 10 |\n| 135 | 31.13.92.36 | facebook.com | 19 | 13 |\n| 148 | 31.13.92.36 | facebook.com | 22 | 13 |\n| 161 | 31.13.92.36 | facebook.com | 23 | 13 |\n\nTime of day is in 24 hours. [19 means 7:00 pm] (with least count of 60 minutes)\n\n### common hops between two routes\n\n|  | Input | Registered Domain | Host name |\n| --- | --- | --- | --- |\n| 49 | 77.64.170.23 | primacom.net | 100ge5-1.core2.ash1.he.net |\n| 138 | 31.13.92.36 | facebook.com | 100ge5-1.core2.ash1.he.net |\n| 48 | 77.64.170.23 | primacom.net | 100ge8-1.core1.ash1.he.net |\n| 137 | 31.13.92.36 | facebook.com | 100ge8-1.core1.ash1.he.net |\n| 47 | 77.64.170.23 | primacom.net | 100ge8-1.core1.atl1.he.net |\n| 136 | 31.13.92.36 | facebook.com | 100ge8-1.core1.atl1.he.net |\n| 50 | 77.64.170.23 | primacom.net | 100ge8-1.core1.nyc5.he.net |\n| 139 | 31.13.92.36 | facebook.com | 100ge8-1.core1.nyc5.he.net |\n| 46 | 77.64.170.23 | primacom.net | v509.core1.dal1.he.net |\n| 135 | 31.13.92.36 | facebook.com | v509.core1.dal1.he.net |\n| 1 | 192.30.253.113 | github.com | vb2000d1.rar3.dallas-tx.us.xo.net |\n| 106 | 207.244.67.218 | NaN | vb2000d1.rar3.dallas-tx.us.xo.net |\n\n_________________\n\n## Q5\n\n**ARP** _Address Resolution Protocol_ is a communication protocol used for discovering physical address associated with given network address. Typically, ARP is a network layer to data link layer mapping process, which is used to discover MAC address for given Internet Protocol Address.\nIn order to send the data to destination, having IP address is necessary but not sufficient; we also need the physical address of the destination machine. ARP is used to get the physical address (MAC address) of destination machine.\nARP is  used  to  find  the media  access control  address  of  a  network neighbour for a given IPv4 Address.\n\n`arp`  manipulates or displays the kernel's IPv4 network neighbour cache. It can add entries to the table, delete one or display the current content.\n\n![Fig3.3](arp-add-del.png)\n\n\nEntries in the ARP table can be static; created by manual configuration or dynamic; created automatically by the normal operation of the protocol. Static entries remain in the table forever and are not timed out.\n\nThe default timeout timer for is 4 hours for Cisco devices, this means that a dynamic ARP entry will remain for 4 hours in the cache table before the router attempt to refresh the entry. If the entry is no longer needed it will be removed.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevprabal%2Fcnlabassignment1-solutions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevprabal%2Fcnlabassignment1-solutions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevprabal%2Fcnlabassignment1-solutions/lists"}