Public v private IP address?

chickenlicken09chickenlicken09 Member Posts: 537 ■■■■□□□□□□
As an example, 193.168.2.1 Public or private IP address?
Am I right in saying it falls within both, how do I distinguish?

Comments

  • DyasisDyasis Member Posts: 97 ■■□□□□□□□□
    Your IPv4 Private addresses are:
    10.0.0.0 - 10.255.255.255
    172.16.0.0 - 172.31.255.255
    192.168.0.0 - 192.168.255.255
  • chickenlicken09chickenlicken09 Member Posts: 537 ■■■■□□□□□□
    Ok but my public IP address range is 192-223
  • silverp1silverp1 Member Posts: 124
    192.X.X.X can still be a public address - just not 192.168.X.X. 192.1.1.1 is a valid public address, but 192.168.1.10 is not.
    Certs: CCENT, CCNA:R&S
    Working on: MCITP:SA
    Goals: CCENT (ICND1) [Done], CCNA (ICND2) [Done], MCITP:SA
  • JeanMJeanM Member Posts: 1,117
    eddo1 wrote: »
    Ok but my public IP address range is 192-223


    How so? The specific ranges within A/B/C classes are NOT routable over the internet, and so they aren't public.

    Do you possibly use NAT/PAT....or better yet explain the issue.
    2015 goals - ccna voice / vmware vcp.
  • boredgameladboredgamelad Member Posts: 365 ■■■■□□□□□□
    It sounds like your confusion comes from the fact that the class ranges are as follows:

    0.0.0.0 - 127.255.255.255 - Class A
    128.0.0.0 - 191.255.255.255 - Class B
    192.0.0.0 - 223.255.255.255 - Class C

    ...but you're construing this to mean that all those addresses are public (they aren't).

    Classes encompass all IPs within their range regardless of whether the IPs are private or public. There is another table that determines whether addresses are public or private, and that's the one Dyasis posted:

    10.0.0.0 - 10.255.255.255
    172.16.0.0 - 172.31.255.255
    192.168.0.0 - 192.168.255.255

    When you say "my public IP range is 192 - 223", you're technically incorrect. What you really mean to say is "the first octet in class C addresses can range from 192 to 223".

    For the purposes of this discussion, an IP address essentially has two attributes. It belongs to a class (A/B/C), AND it's either public or private. You have to use both tables above to determine each of these attributes separately:

    1.) Does the IP address fall into one of the three ranges in the first table? If yes, that is the address's class.
    2.) Does the IP address also fall into one of the three ranges in the second talbe? If yes, it's a private address. If no, it's public.

    193.168.2.1 falls in the range of 192.0.0.0 - 223.255.255.254, so it's a Class C address. It does not fall into the range of 192.168.0.0 - 192.168.255.255, which means it is a public class C address.

    This table might help you understand a little more:

    Class A____________________________
    0.0.0.0 - 9.255.255.255 - Public
    10.0.0.0 - 10.255.255.255 - Private
    11.0.0.0 - 127.255.255.255 - Public
    ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
    Class B____________________________
    128.0.0.0 - 172.15.255.255 - Public
    172.16.0.0 - 172.31.255.255 - Private
    172.32.0.0 - 191.255.255.255 - Public
    ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
    Class C____________________________
    192.0.0.0 - 192.167.255.255 - Public
    192.168.0.0 - 192.168.255.255 - Private
    192.169.0.0 - 223.255.255.255 - Public
    ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

    I don't recommend trying to memorize this table, though. It's easier to remember 0-127 = Class A, 128-191 = Class B, 192-223 = Class C, and then simply memorize the private IP ranges.
  • mgmguy1mgmguy1 Member Posts: 485 ■■■■□□□□□□
    Boredgamelad has the right idea.
    I keep writing out the following on a paid of paper or on an Excel spreadsheet

    Class A 1-126 255.0.0.0
    Class B 128-191 255.255.0.0
    Class C 192 -223 255.255.255.0
    Class D 224-239 Reserved for Multicasting
    Class E 240-255 Reserved for future use.

    Private address
    10.0.0.0 - 10.255.255.255
    172.16.0.0 - 172.31.255.255
    192.168.0.0 - 192.168.255.255


    169.254.0.0-169.254.255.255 for Automatic Private IP Addressing
    This address range is due to a built in function of windows called automatic private IP address(APIPA).

    When your computer is configured to get an IP address from a DHCP server, but is unable to find a DHCP server the APIPA service will assign itself a 169.x.x.x IP address, and checks for a DHCP server periodically.
    "A lot of fellows nowadays have a B.A., M.D., or Ph.D. Unfortunately, they don't have a J.O.B."

    Fats Domino
Sign In or Register to comment.