127.0.0.1

workfrom925workfrom925 Member Posts: 196
On a PC, we ping 127.0.0.1 to make sure the PC's IP stack is installed correctly or not. I found I can also ping 127.0.0.2 or 127.254.255.255. They all work. The one IP address that I cannot ping is 127.255.255.255. Does pinging these addresses do the same thing? Is there a difference among these IP addresses? What's its range?

Comments

  • MickQMickQ Member Posts: 628 ■■■■□□□□□□
    The entire 127.0.0.0 /8 subnet is dedicated to loopback. I often give admins a static IP within the range and see if they realise what I'm telling them.

    Look at the 127.255.255.255 ( /8 ) address. Should there be anything special about it maybe?
  • lsud00dlsud00d Member Posts: 1,571
    127.0.0.0/8 is all loopback.

    127.255.255.255 is unassignable since it is reserved for broadcast, I believe.

    Edit: beat to it icon_wink.gif
  • workfrom925workfrom925 Member Posts: 196
    MickQ wrote: »
    The entire 127.0.0.0 /8 subnet is dedicated to loopback. I often give admins a static IP within the range and see if they realise what I'm telling them.

    Look at the 127.255.255.255 ( /8 ) address. Should there be anything special about it maybe?

    Isn't that a waste of IP addresses? If all of them do the same thing - to check to see if a host's own IP stack working or not, then one would be enough.
  • MickQMickQ Member Posts: 628 ■■■■□□□□□□
    Yep. That's why with IPv6 the loopback is ::1.

    :: is an abbreviation to denote consecutive 0s, e.g. 1234:0000:0000:4567:6789 would be 1234::4567:6789.
  • theodoxatheodoxa Member Posts: 1,340 ■■■■□□□□□□
    Isn't that a waste of IP addresses? If all of them do the same thing - to check to see if a host's own IP stack working or not, then one would be enough.

    IPv4 is horribly wasteful of addresses, though not nearly as bad as it was before CIDR/VLSM. IPv6 is even worse - Less than 12.5% of the IPv6 address space is globally routable. But, with 128 bits, even 12.5% is more addresses than will ever be used.

    1) Many companies still have ENTIRE Class A subnets [from the days before NAT and CIDR/VLSM] when they only need a handful of public IPs. They're just too lazy to renumber their networks and return those extra IPs to their RIR.

    2) 256 MILLION IP Addresses are locked up in Class D (Multicast).
    3) 256 MILLION IP addresses are locked up in Class E and Beyond (Experimental).

    As much as 25% of the IPv4 address space was literally squandered away. We could have gotten additional years if not a decade out of IPv4 if not for the epic level of waste caused by classful addressing [and corporations/governments unwillingness to do the right thing] and allocating such an insanely large chunk of the address space to Multicast and Experimental Use.

    Not to mention, had IPv4 allowed the use of Link Local (APIPA) addresses for next-hop like IPv6 does, even more addresses could have been preserved. For that matter, why should you even need an IP address on a Layer 2 (Frame Relay, HDLC, PPP) link. Frame Relay uses DLCIs once inside the cloud, HDLC has its own address field [which is largely useless since in is used on Point-to-Point Links], etc...
    R&S: CCENT CCNA CCNP CCIE [ ]
    Security: CCNA [ ]
    Virtualization: VCA-DCV [ ]
  • iamme4evaiamme4eva Member Posts: 272
    MickQ wrote: »
    Yep. That's why with IPv6 the loopback is ::1

    That, and geek humour. ::1 is 127 0's followed by a 1.
    Current objective: CCNA Security
    My blog: mybraindump.co.uk
  • Carpe PorcusCarpe Porcus Member Posts: 84 ■■□□□□□□□□
    I've had this table for a while now, helps for quick reference:


    1-126 Class A - Unicast 255.0.0.0
    128-191 Class B - Unicast 255.255.0.0
    192-223 Class C - Unicast 255.255.255.0
    224-239 Reserved Multicast
    240-255 Reserved Experimental

    Reservations
    10.0.0.0 – 10.255.255.255 Class A address non routable
    127.0.0.1 – 127.255.255.255 Reserved for loopback testing
    169.254.0.0 – 169.254.255.255 APIPA Automatic Private IP Addressing
    172.16.0.0 – 172.31.255.255 Class B address non routable
    192.168.0.0 – 192.168.255.255 Class C address non routable
    240.0.0.0 – 240.255.255.255 Class E address non routable

    You can see the entire octet of 127 is reserved with a few interesting addresses as well!
    “I'm always admitting I'm wrong. That's how I eventually get to right.”
  • lsud00dlsud00d Member Posts: 1,571
    @Carpe I think your Class C mask should be 255.255.255.0
  • Carpe PorcusCarpe Porcus Member Posts: 84 ■■□□□□□□□□
    It was and still is in the source document! No idea what happened there.

    I've changed it, thank you for pointing that out.
    “I'm always admitting I'm wrong. That's how I eventually get to right.”
  • HardDiskHardDisk Member Posts: 62 ■■□□□□□□□□
    I found this a little confusing so this is my attempt to clarify which private IP mask is associated with each range.

    For Class A network, 10.0.0.0 - 10.255.255.255 (10/8 prefix) range
    For Class B network, 172.16.0.0 - 172.31.255.255 (172.16/12 prefix)
    For Class C network, 192.168.0.0 - 192.168.255.255 (192.168/16 prefix)
Sign In or Register to comment.