0% found this document useful (0 votes)
31 views7 pages

Netcom Mid-Term Nupoor Raj 19BCE2145 Slot:L1+L2 Faculty:Abdul Gaffar H

The traceroute command identifies the network hops between two systems. It works by sending packets with increasing TTL values, causing routers to discard packets when the TTL reaches zero and return ICMP error messages. This allows traceroute to map the route and measure transit delays across each hop. The tool is useful for determining where network issues may lie by checking hop times and patterns in the traceroute output. High latency, timeouts, or increasing delays could indicate problems starting at specific hops.

Uploaded by

nupoor raj
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views7 pages

Netcom Mid-Term Nupoor Raj 19BCE2145 Slot:L1+L2 Faculty:Abdul Gaffar H

The traceroute command identifies the network hops between two systems. It works by sending packets with increasing TTL values, causing routers to discard packets when the TTL reaches zero and return ICMP error messages. This allows traceroute to map the route and measure transit delays across each hop. The tool is useful for determining where network issues may lie by checking hop times and patterns in the traceroute output. High latency, timeouts, or increasing delays could indicate problems starting at specific hops.

Uploaded by

nupoor raj
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Netcom Mid-Term

Nupoor Raj
19BCE2145
Slot:L1+L2
Faculty:Abdul Gaffar H

2. A) AIM: Write a program to implement Link state routing Protocol.

Algorithm:
● Step-1: The node is taken and chosen as a root node of the tree, this creates the tree
with a single node, and now set the total cost of each node to some value based on the
information in Link State Database
● Step-2: Now the node selects one node, among all the nodes not in the tree like
structure, which is nearest to the root, and adds this to the tree.The shape of the tree
gets changed .
● Step-3: After this node is added to the tree, the cost of all the nodes not in the tree
needs to be updated because the paths may have been changed.
● Step-4: The node repeats Step 2. and Step 3. until all the nodes are added in the tree

Code:

#include <stdio.h>

#include <string.h>

int main()

int count,src_router,i,j,k,w,v,min;

int cost_matrix[100][100],dist[100],last[100];

int flag[100];

printf("\n Enter the no of routers");

scanf("%d",&count);

printf("\n Enter the cost matrix values:");

for(i=0;i<count;i++)
{

for(j=0;j<count;j++)

printf("\n%d->%d:",i,j);

scanf("%d",&cost_matrix[i][j]);

if(cost_matrix[i][j]<0)cost_matrix[i][j]=1000;

printf("\n Enter the source router:");

scanf("%d",&src_router);

for(v=0;v<count;v++)

flag[v]=0;

last[v]=src_router;

dist[v]=cost_matrix[src_router][v];

flag[src_router]=1;

for(i=0;i<count;i++)

min=1000;

for(w=0;w<count;w++)

if(!flag[w])

if(dist[w]<min)

{
v=w;

min=dist[w];

flag[v]=1;

for(w=0;w<count;w++)

if(!flag[w])

if(min+cost_matrix[v][w]<dist[w])

dist[w]=min+cost_matrix[v][w];

last[w]=v;

for(i=0;i<count;i++)

printf("\n%d==>%d:Path taken:%d",src_router,i,i);

w=i;

while(w!=src_router)

printf("\n<--%d",last[w]);w=last[w];

printf("\n Shortest path cost:%d",dist[i]);

}
Output:
B) AIM: Identify the tool that provides a list of network hops between two
systems? Run the identify command and highlight the output of the command
with an appropriate result and discussion.

Answer:

ALGORITHM:

Traceroute sends packets with TTL values that gradually increase from packet to packet,
starting with TTL value of one. Routers decrement TTL values of packets by one when routing
and discard packets whose TTL value has reached zero, returning the ICMP error message ICMP
Time Exceeded.

Traceroute is a computer network diagnostic tool for displaying the route (path), and measuring
transit delays, of packets across an Internet Protocol (IP) network.The first column corresponds
to the hop count. The second column represents the address of that hop and after that, you see
three space-separated time in milliseconds. The traceroute command sends three packets to the
hop and each of the time refers to the time taken by the packet to reach the hop.

● -m max_ttl Option: Set the max number of hops for the packet to reach the
destination.Default value is 30.
Syntax:
$traceroute -m 5 google.com

● -f first_ttl Option: Start from the first_ttl hop (instead from 1).
Syntax:
$ traceroute -f 10 google.com

● -p port Option: Set the destination port to use. Default is 33434.


Syntax:
$traceroute -p 20292 google.com

● packetlen Option: The full packet length. Default len is 60 byte packets.
Syntax:
$traceroute google.com 100

● –help: Display help messages and exit.


Syntax:
$traceroute --help
Discussion:
The Traceroute tool is used to map the hops between the end user and the destination server.
This can help determine where any issues may lie on the network. The examples below were
collected after tracing a route to server 192.168.1.8, over a maximum of 30 hops. They show a
good traceroute, then two bad traceroutes; one a failed hop, and one a routing loop.
Checking the hop times
The times listed in the RTT columns are the main thing you want to look at when evaluating a
traceroute. Consistent times are what you are looking for. There may be specific hops with
increased latency times but they may not indicate that there is an issue. You need to look at a
pattern over the whole report. Times above 150ms are considered to be long for a trip within the
continental United States. (Times over 150ms may be normal if the signal crosses an ocean,
however.) but issues may show up with very large numbers.
Increasing latency towards the target
If you see a sudden increase in a hop and it keeps increasing to the destination (if it even gets
there), then this indicates an issue starting at the hop with the increase. This may well cause
packet loss where you will even see asterisks (*) in the report.
High latency in the beginning hops
Seeing reported latency in the first few hops indicates a possible issue on the local network level.
You will want to work with your local network administrator to verify and fix it.
Timeouts at the beginning of the report
If you have timeouts at the very beginning of the report, say within the first one or two hops, but
the rest of the report runs, do not worry. This is perfectly normal as the device responsible likely
does not respond to traceroute requests.
Timeouts at the very end of the report
Timeouts at the end may occur for a number of reasons. Not all of them indicate an issue,
however.The target's firewall may be blocking requests. The target is still most probably
reachable with a normal HTTP request, however. This should not affect normal connection.The
return path may have an issue from the destination point. This would mean the signal is still
reaching, but just not getting the return signal back to your computer. This should not affect
normal connection.Possible connection problem at the target. This will affect the connection.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy