Results 1 to 15 of 15
  1. #1
    Join Date
    Feb 2001
    Posts
    1,227

    How do I find a Subnet Mask from an IP address?

    anyone?

  2. #2
    Join Date
    Dec 2001
    Location
    Ponchatoula, LA
    Posts
    497
    I'm not sure exactly what you are asking. If all you have is an IP address the only thing you can tell is the DEFAULT subnet mask. Look at the first octet.

    1-126 = Class A = 255.0.0.0
    128-191 = Class B = 255.255.0.0
    192-223 = Class C = 255.255.255.0

    Richard
    Enigma Hosting
    "I wasn't speeding, I was qualifying!"

  3. #3
    Join Date
    Apr 2001
    Location
    St. Louis, MO
    Posts
    2,508
    You should ask your provider. Just by the IP address, it is impossible to determine the subnet mask.
    Mike @ Xiolink.com
    http://www.xiolink.com 1-877-4-XIOLINK
    Advanced Managed Microsoft Hosting
    "Your data... always within reach"

  4. #4
    Noldar,

    What you are talking about is really exint now a days.

    Just because an IP Addrss like 64.56.29.10 and it in now way means the subnet mask will be 255.0.0.X. One way is to do a whois on it such as:

    whois -h whois.arin.net 64.56.29.10

    The output I got is:
    OrgName: InterSurf Online, Inc.
    OrgID: IOSI

    NetRange: 64.56.0.0 - 64.56.31.255
    CIDR: 64.56.0.0/19
    NetName: INTERSURF-NETBLK-2
    NetHandle: NET-64-56-0-0-1
    Parent: NET-64-0-0-0-0
    NetType: Direct Allocation
    NameServer: NS1.INTERSURF.NET
    NameServer: NS2.INTERSURF.NET
    NameServer: NS1.ISPC.ORG
    Comment: ADDRESSES WITHIN THIS BLOCK ARE NON-PORTABLE

    Subnet information for this netblock may be found at:
    rwhois.intersurf.net 4321

    Since it's using rwhois, I need to go to http://www.rwhois.net/rwhois/prwhois.html and type rwhois.intersurf.net into the Host and 64.56.29.10 into the Query.

    There it will tell me ip-network 64.56.29.0/24

    That would make the subnet mask 255.255.255.0

    You can't be sure if the company that block is assigned to will subnet it again as so often happens.
    Walter Landman
    Simplicato - Email Hosting

  5. #5
    Join Date
    Apr 2001
    Location
    St. Louis, MO
    Posts
    2,508
    Looking up the IP space at ARIN will probably not help becuase the host who owns the space will probably break it up even more.
    Mike @ Xiolink.com
    http://www.xiolink.com 1-877-4-XIOLINK
    Advanced Managed Microsoft Hosting
    "Your data... always within reach"

  6. #6
    definetely, you will need to ask this to your IP address provider (ISP, webhost etc)

  7. #7
    Join Date
    Dec 2001
    Location
    Ponchatoula, LA
    Posts
    497
    Originally posted by wlandman
    Noldar,

    What you are talking about is really exint now a days.

    Just because an IP Addrss like 64.56.29.10 and it in now way means the subnet mask will be 255.0.0.X.
    Although default netmasks may be rarely used on any device that is connected to the Internet, it is hardly extinct. RIPv1 still exists and RIPv2, IGRP, and EIGRP auto-summarize at classful network boundaries.

    I also never said that's what the subnet mask would be. I said if all you had was the IP the only thing that you could determine from it was the DEFAULT netmask.
    Enigma Hosting
    "I wasn't speeding, I was qualifying!"

  8. #8
    Join Date
    Nov 2001
    Location
    Ann Arbor, MI
    Posts
    2,978
    I just wouldn't call it a netmask or subnet mask. You can determine the address class and the network number.

    Anyway, RFC 950 (STD 5) says how a host can get it's address mask given it's IP address or not.
    -Mark Adams
    www.bitserve.com - Secure Michigan web hosting for your business.
    Only host still offering a full money back uptime guarantee and prorated refunds.
    Offering advanced server management and security incident response!

  9. #9
    Join Date
    Apr 2001
    Location
    St. Louis, MO
    Posts
    2,508
    Anyway, RFC 950 (STD 5) says how a host can get it's address mask given it's IP address or not.
    Care to share?
    Mike @ Xiolink.com
    http://www.xiolink.com 1-877-4-XIOLINK
    Advanced Managed Microsoft Hosting
    "Your data... always within reach"

  10. #10
    Join Date
    Dec 2001
    Location
    Ponchatoula, LA
    Posts
    497
    Originally posted by bitserve
    I just wouldn't call it a netmask or subnet mask.
    But, it is a netmask. If you configure an IP address of 192.168.0.1 on a device and do not specify a netmask it will have a netmask of 255.255.255.0
    Originally posted by bitserve
    Anyway, RFC 950 (STD 5) says how a host can get it's address mask given it's IP address or not.
    Interesting reading, but it appears to be just a proposal for an additional ICMP packet that will return netmask information in conjunction with bootp. Looks like still the only option is to ask your ISP

    Richard
    Enigma Hosting
    "I wasn't speeding, I was qualifying!"

  11. #11
    Join Date
    Jun 2001
    Location
    Chicago, IL
    Posts
    1,953
    If you were given a block of em you could figure it out ) assuming they subnet the ip's then give em to you that way, which is the only way to go

    Personally, I would just ask
    Chicago Electronic Cigarettes: Tobacco Free, Smoke Free. 3 E-Cig Models, 11 flavors, and accessories.
    http://www.chicago-ecigs.com

  12. #12
    Join Date
    Nov 2001
    Location
    Ann Arbor, MI
    Posts
    2,978
    Originally posted by Noldar
    But, it is a netmask. If you configure an IP address of 192.168.0.1 on a device and do not specify a netmask it will have a netmask of 255.255.255.0
    Tomato, tomato. I just don't think I'd ever used the term netmask or subnect mask when talking about classful networking.

    Interesting reading, but it appears to be just a proposal for an additional ICMP packet that will return netmask information in conjunction with bootp. Looks like still the only option is to ask your ISP
    You found what I was talking about, hanh? It is interesting, and I was just being silly, but supposedly that's the way to do it. That RFC is actually one of the few that are an approved standard. So in theory, that's the way to get your netmask. But yeah, ask your ISP.
    -Mark Adams
    www.bitserve.com - Secure Michigan web hosting for your business.
    Only host still offering a full money back uptime guarantee and prorated refunds.
    Offering advanced server management and security incident response!

  13. #13
    Join Date
    Dec 2001
    Location
    Ponchatoula, LA
    Posts
    497
    Tomato, tomato. I just don't think I'd ever used the term netmask or subnect mask when talking about classful networking.
    OK, fair enough. How about Internet Mask or Prefix Mask?
    Enigma Hosting
    "I wasn't speeding, I was qualifying!"

  14. #14
    Join Date
    Nov 2001
    Location
    Ann Arbor, MI
    Posts
    2,978
    Originally posted by Noldar
    OK, fair enough. How about Internet Mask or Prefix Mask?
    Even I often use the wrong terminology. I've always said "You can determine what class this IP address is in based on it's address". But actually class would probably just be a, b, or c. To be technically correct, I don't know how to describe that without saying that you can determine both the address class and the network number. For classful routing (a term backdated because of classess routing) it's hard to use the newer netmask term, because what do you call the first 1-3 bits that determines the class? So when someone says netmask, I automatically assume that they're talking about CIDR.

    Some cisco guy wrote an RFC (not a standard yet, but on the standards track) that says for CIDR we should now be using the term "network prefix", which indicates the number of network bits, and that "netmask" and "subnet mask" is outdated. So when you have /24, this is a "network prefix of 24". I still call it a "24 bit netmask". But what do I know?
    -Mark Adams
    www.bitserve.com - Secure Michigan web hosting for your business.
    Only host still offering a full money back uptime guarantee and prorated refunds.
    Offering advanced server management and security incident response!

  15. #15
    Join Date
    Dec 2001
    Location
    Ponchatoula, LA
    Posts
    497
    Even I often use the wrong terminology. I've always said "You can determine what class this IP address is in based on it's address". But actually class would probably just be a, b, or c. To be technically correct, I don't know how to describe that without saying that you can determine both the address class and the network number. For classful routing (a term backdated because of classess routing) it's hard to use the newer netmask term, because what do you call the first 1-3 bits that determines the class?
    I've always heard it referred to as the first octet rule, although you really only need the first 4 bits to determine the class (can't forget class D & E).
    So when someone says netmask, I automatically assume that they're talking about CIDR.
    CIDR is when you take blocks of multiple class C addresses and combine them, so CIDR is the opposite of subnetting and is sometimes referred to as supernetting.
    Some cisco guy wrote an RFC (not a standard yet, but on the standards track) that says for CIDR we should now be using the term "network prefix", which indicates the number of network bits, and that "netmask" and "subnet mask" is outdated. So when you have /24, this is a "network prefix of 24". I still call it a "24 bit netmask". But what do I know?
    Just out of curiosity I looked through one of my Cisco course books to see what term they used. They seemed to be pretty consistent in calling it a subnet mask when it was in decimal notation (255.255.255.0) even when they were dealing with classless routing protocols like OSPF or EIGRP and they would call it a prefix mask or just prefix when using the slash notation (/24).

    So I guess if we want to be hip it should be a network prefix or prefix mask or, if you're really cool, just prefix

    Richard
    Enigma Hosting
    "I wasn't speeding, I was qualifying!"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •