Ping problem

By jbzeigler
Feb 21, 2011
Post New Reply
  1. I have two machines located on two different networks. I would like to ping from PC1 (network A) to PC2 (network B). I assume that this would fail using only the computer name and that an IP address would be required since anyone can name their computer almost anything.

    PC1 is in a network that has a DNS server though. How does the whole name resolution/routing work for pinging using only an IP address?
  2. jobeard

    jobeard TS Ambassador Posts: 9,144   +597

    The subject is really about Routing Tables.
    Route Table
    Interface List
    0x1 ........................... MS TCP Loopback interface
    0x2 ...00 0f b0 3d bc 1d ...... Realtek RTL8139 Family PCI Fast Ethernet NIC - P
    acket Scheduler Miniport
    Active Routes:
    Network Destination        Netmask          Gateway       Interface  Metric
              [B] [/B]      20
       20       20
         20       1
    Default Gateway:
    Persistent Routes:
    Notice the first line;
    That's the default routing; everything that is unknown, goes to the gateoway ( using the interface ( the pc nic address assigned).

    The easy part is that anything on the same subnet (in this case 192.168.0.x) is routed without any actions on our part.

    Sites unknown (locally eg just flow out the gateway.

    Consider this layout:
    modem===router#1(lan) ----- local subnet ---
                 +---- (wan)secondary router#2(Lan) - - - other systems
    give router#1 the address address [ matching the table shown above]
    and router#2 the address
    Q? how the heck can we get to something on

    A: router#2 (Wan) side address will be an address on the router#1subnet (eg

    to pass data (ping or otherwise) to anything on 192.168.1.x, we need to add an entry to the route table that says
    which says anything on 192.168.1.* goes to the router using our local interface (the wan side of router#2).

    or worse, duplicates!
    The computer names supported by Windows are:
    • * Name service for name registration and resolution (port: 137)
    • * Datagram distribution service for connectionless communication (port: 138)
    • * Session service for connection-oriented communication (port: 139)
    The Internet DNS is a port 53 request which returns the IP address associated with the name (which requires a domain name resgistration; quite different than port 137,137,139).

    So if we PING GOOGLE.COM, we really make two network transactions:
    1. ask the DNS for -->
    2. which replies with the real ip-address thereof <--
    3. and that is used to perform PING reply-ip-address -->
    which explains why PING router#1.systemA name fails just as readily as
    PING router#2.systemA; nether has a DNS entery on the Internet.

    For those that have systems attached to a Domain Controller, your DNS requests flow to
    the DC, not the Internet, and it can deal with Router#1.SystemA locally.

Similar Topics

Add New Comment

You need to be a member to leave a comment. Join thousands of tech enthusiasts and participate.
TechSpot Account You may also...