Re: Port numbers for echo and echo reply ....

Unanswered Question
Aug 18th, 2008
User Badges:

Hi,

I would like to know what are the port numbers for echo and echo reply ?


I have checked this on the iana website and it only says the following :-


> echo 7/tcp Echo

> echo 7/udp Echo


With this I presume that the echo and echo-reply are using port 7 ?



The reason for this question is that I am writing an ACL and would like to know the ports for echo and echo reply? I guess the best way to do this is to put both tcp and udp in the ACL ....


Pls advice,


- InternetB -

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (2 ratings)
Loading.
Richard Burts Mon, 08/18/2008 - 17:50
User Badges:
  • Super Silver, 17500 points or more
  • Hall of Fame,

    Founding Member

  • Cisco Designated VIP,

    2017 LAN, WAN

InternetB


I wonder if the question that you ask really represents what you want to know. I wonder if what you really want to know is how to permit (or perhaps deny) ping (which uses echo-request and echo-reply).


If that is what you really want to know then the answer is that ping uses ICMP and not UDP or TCP. Within ICMP there is a message type for echo-request and a message type for echo-reply. So if you want to have an access list statement for ping it might look something like this:

ip access-list 101 permit icmp any any eq echo-request

ip access-list 101 permit icmp any any eq echo-reply


There are packet types within TCP and UDP for echo and if that is what you are interested in then that is what you should permit.


HTH


Rick

InternetB Mon, 08/18/2008 - 19:09
User Badges:

Hi Rick,

Thank you for the post. Alright I am getting it. It looks like there are no ports defined for icmp from the iana url. I know some ping utilities do use tcp/udp.


So it looks like there are no ports defined for icmp right ? The reason for this is that I need to understand this to define my firewall rule set.


Thank you sir,


Cheers,

- InternetB -

Jon Marshall Mon, 08/18/2008 - 19:19
User Badges:
  • Super Blue, 32500 points or more
  • Hall of Fame,

    Founding Member

  • Cisco Designated VIP,

    2017 LAN, WAN

ICMP does not use ports in the way TCP/UDP does. Instead it uses types and codes. Attached is a link for ICMPv4 types and codes. Many stateful firewalls will allow you to use the type/code in their rulesets.


http://www.spirit.com/Resources/icmp.html


Jon

InternetB Mon, 08/18/2008 - 20:30
User Badges:

Thanks Jon. This is useful information .... :)


Cheers mate,


- InternetB -

Actions

This Discussion