TechSpot

How do you know these two IP addresses are on the same network?

By Jskid
Oct 31, 2012
Post New Reply
  1. How do you know these two IP addresses are on the same network?

    IP 127 . 1 . 1 . 8 and IP 127 . 10 . 1 . 8
     
  2. St1ckM4n

    St1ckM4n TS Evangelist Posts: 3,475   +624

    If one can ping the other, then they are same.

    If not, then chances are very high that it's not same.
     
  3. tipstir

    tipstir TS Ambassador Posts: 4,715   +89

    What's your subnet mask and default gateway for these two addresses..
     
  4. jobeard

    jobeard TS Ambassador Posts: 13,474   +329

    Tipstir is asking for the subnet mask and that is required to properly answer your question.

    The default mask is 255.255.255.0 and that says that only the last digit {8 in both cases} is used for systems.
    The subnet (ie the network} is then 127.1.1 or 127.10.1 and they are NOT in the same network and could not ping on another (unless you knew how to create a pair of ROUTEs).

    Rather bizarre as typically we see windows using only the 127.0.0.1 and that's for the localhost name
     
  5. LookinAround

    LookinAround TechSpot Chancellor Posts: 8,398   +169

    The block of addresses that start 127. are an "exception" case because Internet protocol reserves that block of addresses for local loopback. (Though as jobeard mentions, it's unusual to see other then 127.0.0.1 being used).

    For the specific case of reserved special addresses 127.x.x.x , the subnet mask and ping test don't apply.

    I can ping any address in the 127.x.x.x range and interestingly, at least my machine, says it's 127.0.0.1 replying
    Code:
    Pinging 127.10.1.8 with 32 bytes of data:
     
    Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
    Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
    Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
    Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
     
    Ping statistics for 127.10.1.8:
        Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
    Approximate round trip times in milli-seconds:
        Minimum = 0ms, Maximum = 0ms, Average = 0ms
    And because I couldn't resist, I'll also add this

    [​IMG]
    [​IMG]
     
    Coodu and B00kWyrm like this.
  6. jobeard

    jobeard TS Ambassador Posts: 13,474   +329

    Well now, isn't that interesting. On my Win/7 Pro, the reply looks like it came from the requested device, while LookinAround gets the reply from the base 127.0.0.1 device - -
    Code:
    C:\Users\Jeff>ping 127.3.2.1
     
    Pinging 127.3.2.1 with 32 bytes of data:
    Reply from 127.3.2.1: bytes=32 time<1ms TTL=128
    Reply from 127.3.2.1: bytes=32 time<1ms TTL=128
    Reply from 127.3.2.1: bytes=32 time<1ms TTL=128
    Reply from 127.3.2.1: bytes=32 time<1ms TTL=128
    and there's no such device !
     
  7. Mamut0o1

    Mamut0o1 TS Rookie Posts: 79

    127.x.x.x is reserve for loopback. You will be able to ping it because you are pinging yourself.

    IPv4 Route Table
    ===========================================================================
    Active Routes:
    Network Destination Netmask Gateway Interface Metric
    0.0.0.0 0.0.0.0 192.168.140.1 192.168.140.3 25
    127.0.0.0 255.0.0.0 On-link 127.0.0.1 306
    127.0.0.1 255.255.255.255 On-link 127.0.0.1 306
    127.255.255.255 255.255.255.255 On-link 127.0.0.1 306
     
  8. jobeard

    jobeard TS Ambassador Posts: 13,474   +329

    Yes, the last three show why 127.x.x.x is classed as all three Class A, B & C networks.
     
  9. tipstir

    tipstir TS Ambassador Posts: 4,715   +89

    This post from OP looks more like a question he was trying to find answer too like maybe a test or a question that was asked him?

    As for the exception is part of the process of IE yes that is also another process use for proxy under business domain that can be use to grant access or denies access to employee.
     
  10. jobeard

    jobeard TS Ambassador Posts: 13,474   +329

    Avast! runs its email & weblink scanners with a proxy on 127.0.0.1 :grin:
     
  11. Jskid

    Jskid TS Enthusiast Topic Starter Posts: 433

    Hold on before everyone hijacks this thread. I was told the way to tell if two IPs are on the same network is that the range for class A (0.0.0.0-127.255.255.255) only needs the first octet to be the same. For example 126.xxx.xxx.xxx is on the same network as 125.yyy.yyy.yyy. For class B the first two octets must be the same if it's on the same network and for class C the first 3 octets must be on the same network. For example 192.168.2.1 and 192.168.3.2 are on different networks but 192.168.2.1 and 192.168.2.2 are on the same network. Is this true?
     
     
  12. jobeard

    jobeard TS Ambassador Posts: 13,474   +329

    The class A example has a typo; 127.x.x.x is class A but distinct from 126.y.y.y.y;

    The interesting anomaly is the routing masks shown in post seven make 127.a.b.c operate on all three classes
     
  13. St1ckM4n

    St1ckM4n TS Evangelist Posts: 3,475   +624

    192.168.0.xxx and 192.168.1.xxx can be on the same network too..
     
  14. jobeard

    jobeard TS Ambassador Posts: 13,474   +329

    NOT with a mask of 255.255.255.0 - the mask would need to be 255.255.254.0 :)
     
  15. St1ckM4n

    St1ckM4n TS Evangelist Posts: 3,475   +624

    Indeed. It's not part of his OP though. :(
     


Add New Comment

TechSpot Members
Login or sign up for free,
it takes about 30 seconds.
You may also...


Get complete access to the TechSpot community. Join thousands of technology enthusiasts that contribute and share knowledge in our forum. Get a private inbox, upload your own photo gallery and more.