6 Replies Latest reply: Jun 20, 2010 3:53 PM by Scott Morris - CCDE/4xCCIE/2xJNCIE RSS

    How to determine the subnet mask of a public IP address?

    ciscohardhat

      After determining the public IP address of a website via a DNS request, how can I further determine the subnet mask of the IP address?

        • 1. Re: How to determine the subnet mask of a public IP address?
          Angela

          Hi,

           

            I would like to know why do you need to know the subnet mask of a public IP address? Is it needed for ARP? I don't think so. Is it needed for any other protocol (except routing protocol)? I don't think so either. Also, because public IP address are ALWAYS unique, why do you really need the subnet mask for?

           

            I can only think of subnet mask when I need to assign IP addresses (static or via DHCP) and using 'network' statement.

           

           

          Regards

           

          Message was edited by: Angela

          • 2. Re: How to determine the subnet mask of a public IP address?
            ciscohardhat

            ling20125 wrote:

             

            I would like to know why do you need to know the subnet mask of a public IP address? Is it needed for ARP? I don't think so. Is it needed for any other protocol (except routing protocol)? I don't think so either. Also, because public IP address are ALWAYS unique, why do you really need the subnet mask for?

             

            I can only think of subnet mask when I need to assign IP addresses (static or via DHCP) and using 'network' statement.

             

            I'm a curious fella. I know that my public IP address has a subnet mask, so now how would someone on the outside go about figuring it out?

            • 3. Re: How to determine the subnet mask of a public IP address?
              Angela

              Being curious is certainly good, knowing more can't hurt. However, I don't think there is a way excepting calling your ISP to find out about it, cuz the Internet routing table can contain just about anything and people love VLSM these days. Still, I don't think there is any reason to look for the subnet mask.

               

              Regards

              • 4. Re: How to determine the subnet mask of a public IP address?
                ciscohardhat

                ling20125 wrote:

                 

                Being curious is certainly good, knowing more can't hurt. However, I don't think there is a way excepting calling your ISP to find out about it, cuz the Internet routing table can contain just about anything and people love VLSM these days. Still, I don't think there is any reason to look for the subnet mask.

                 

                Haha. Sorry, but it sounds like this line of inquiry is taboo for you. It certainly seems to be difficult to determine the subnet mask of a public IP address on the Internet. Routing protocols do advertise the subnet masks of a subnet when they are directly connected to the subnet, and after that auto and manual summarization begin to hide the subnet masks. It would have to be a routing table very close to the IP address, before summarization hid the subnet mask. I'm guessing that is not an easy thing to do on the Internet.

                 

                So I guess my question becomes, is it known that determining the subnet mask of a public IP address is a difficult thing to do, and in some cases impossible? Are there maybe a select few highly technical methods of determining the subnet mask of a public IP address that network engineers know about?

                • 5. Re: How to determine the subnet mask of a public IP address?
                  Keith Barker - CCIE RS/Security, CISSP

                  An ICMP type 17 message, is a mask request.   An ICMP type 18 is an ICMP mask reply.

                   

                  IOS, by default, will not respond to one of these requests.

                   

                  Best wishes,

                   

                  Keith

                  • 6. Re: How to determine the subnet mask of a public IP address?
                    Scott Morris - CCDE/4xCCIE/2xJNCIE

                    You could do a "whois" on the IP address, but that will just tell you the mask allocated to the company, which is not necessarily equal to the mask used on whatever subnet(s) they created with them!

                     

                    Scott