Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I was reading the manpage for traceroute, and I noticed it accepts a port argument.

I thought traceroute worked only with ICMP. What does it do with the port?

share|improve this question
ICMP does not use a port since it does not have a place for a port. It is encapsulated with an IP datagram only. You will find the port option only on UDP and TCP datagrams. To block ICMP echo, you would explicitly block the type and code. – djshortbus Jul 27 '10 at 0:55
up vote 1 down vote accepted

Traceroute (classical mode) works by sending UDP packets to a high, theoretically unused UDP port, changing the time to live (TTL) for each packet so that routers along the way notice that it has timed out and return ICMP time exceeded messages. Traceroute then prints those messages out until it gets a message from the destination host denying the connection.

You can change the port in case the default port is in use (thus preventing that last hop from working because the packet is silently accepted).

There is a wealth of information in the man page for traceroute on your standard Linux distro.

share|improve this answer

That's in case ICMP is blocked somewhere along the way.

You could for example use port 80 (http) because almost any firewall will allow it to pass through.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .