in
IEOC CCIE Forums

IEOC - INE's Online Community

Welcome to INE's Online Community - IEOC - a place for CCIE and CCENT candidates to connect, share, and learn. Our Online Community features CCIE forums and discussions for all tracks including Routing & Switching, Voice, Security, Service Provider, Wireless,, and Storage. Through these online communities you can discuss your questions with thousands of your peers, hundreds of CCIE's and INE's own team of world renowned CCIE instructors and authors, Brian Dennis - Quintuple CCIE #2210, Brian McGahan – Triple CCIE #8593, Petr Lapukhov - Quad CCIE #16379, and Mark Snow - Dual CCIE #14073.
Latest post 03-19-2017 8:03 PM by Martinl. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 03-17-2017 10:18 PM

    Ping and subnetting

    Hello INE, thank you for your videos on YouTube. Pls, I have a question and I would be very grateful if you can give me some clarifications.
    Question 1.
    If I have two routers or hosts with the same ip address but different subnet masks and if I am pinging the ip address which host would  respond? Supposed that the network is connected by layer 3 switches.
    Host A: Ip address 192.168.1.2  255.255.255.0 default gateway   192.168.1.1  255.255.255.0
    Host B: Ip address 192.168.1.2  255.255.0.0 default gateway    192.168.1.1  255.255.0.0
    If I have a pc in the first network (192.168.1.0/24) and if I ping 192.168.1.2, which of the hosts (A or B) is going to respond? Also what if the PC sending the ping is on a different subnet from host A or host B?
    Also, why is it that when we ping public addresses on the internet, we don't put a subnet mask? How can someone determine what class that ip address on the internet is or are the addresses given by IANA across all classes for that particular ip?
    Thank you very much.
    Stan.

    • Post Points: 35
  • 03-19-2017 8:02 PM In reply to

    • peety
    • Top 25 Contributor
    • Joined on 02-22-2011
    • Redmond, WA, USA
    • Elite
    • Points 19,700

    Re: Ping and subnetting

    Your scenario isn't going to work. Your L3 switch won't allow you to put the same IP address, or even overlapping IP addresses, on two different interfaces, nor would it allow you to put two overlapping addresses/subnets onto the same interface with secondary addresses.

    As far as public IP addresses on the Internet, I think you're over-thinking this puzzle of subnetting and definitely too addicted to the (outdated) concept of classful addresses. An IP address is an IP address, period, and it comes down to this:

    1) Your PC has an IP address with a subnet mask. That subnet mask basically says "out of the entire IPv4 address space, this much of it is local to my segment", and that's about all that your PC can talk to, directly. The default gateway has to live within that subnet, or it's essentially non-functional.

    2) Your default gateway corresponds to a router. It has (at least) two interfaces (your LAN, and perhaps a WAN port), which means it has at least two routing entries (one for each interface), plus at least one more routing entry that is probably a "default route", which means "if you don't have any better information on where a particular IP address lives, send it to this address on one of your interfaces and hope that it can get it to where it's going".

    3) This process repeats on every router between here and there: routing entries are created for interfaces, a default route is probably in place, and other routes might get learned from a dynamic routing protocol to fill in the gaps. Sometimes those routes learned from dynamic routing protocol(s) correspond to the particular subnets in place, and other times it may correspond to a larger "aggregate" / "summary" / "supernet" network that represents lots of smaller networks.

    4) The actual subnet mask only matters on the routers and hosts that sit on it, and the routers that live within the larger aggregate routes that make up the Internet. Otherwise, the larger aggregate route is sufficient information to get the packet close enough to a point where the specific route matters.

    As an analogy, think of the postal service. It's a little different at the beginning, but the rest is fairly similar:

    1) The mail vehicle drives up to your mailbox, and picks up any outgoing mail (we'll ignore incoming mail for a moment). In this case, the routing table is rather simple: no matter what the envelope says, bring it back to the post office.

    2) At the post office, the stamp is cancelled so it can't be used again. Then, a very simple routing process takes place: if the destination zip code is <self>, the mail is routed to the correct route and sorted into the correct order for easy delivery. Else, send the mail to the regional sorting facility.

    3) Mail sent to the regional sorting facility is pre-sorted by zip code, most likely using the first three digits. Anything in the same three digits as the regional sorting facility is sorted by which post office it goes to, whereas anything else is sorted into huge contiguous ranges of zip codes for transfer to the correct regional (or intermediate) sorting facility to get it to or closer to the correct regional sorting facility.

    4) Mail leaving the regional sort facility for a particular post office is then routed to the correct route and sorted into the correct order for easy delivery.

    5) The driver picks up the mail for their route, and drives along the route, depositing the outgoing mail into the correct mailbox.

    Notice that the regional sorting facilities don't care what the street address is, and the local post office only cares about the street address if the destination zip code is the same as its own zip code.

    CCIE R&S #34583

    Now based in Redmond, WA

    • Post Points: 5
  • 03-19-2017 8:03 PM In reply to

    Re: Ping and subnetting

    Unique IP public is assigned on internet. In case of different masks, longest one wins. 

    • Post Points: 5
Page 1 of 1 (3 items)
IEOC CCIE Forums Internetwork Expert CCIE Training
About IEOC | Terms of Use | RSS | Privacy Policy
© 2010 Internetwork Expert, Inc. All Rights Reserved