Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

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

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 -

4 REPLIES
Hall of Fame Super Silver

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

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

New Member

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

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 -

Hall of Fame Super Blue

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

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

New Member

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

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

Cheers mate,

- InternetB -

11198
Views
10
Helpful
4
Replies