Low-level Network Routing Question - Network

This is a discussion on Low-level Network Routing Question - Network ; Hi I have a question about packet routing over the internet. I have browsed on the web looking for an answer but have not found any docs that answer the following questions! Let me explain a setup first and then ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: Low-level Network Routing Question

  1. Low-level Network Routing Question

    Hi

    I have a question about packet routing over the internet. I have
    browsed on the web looking for an answer but have not found any docs
    that answer the following questions!

    Let me explain a setup first and then ask the questions accordingly
    (IP's below are made up!):

    Assume we a have a PC with IP 192.168.4.5 (call it PC A) that belongs
    to a LAN. This LAN is connected to the internet via a router. The
    router's IP is 192.168.0.1. The LAN is used by a company that has a
    static IP of 82.123.100.7

    Okay so the PC above wants to communicate with PC (call it PC B) in
    another country that is similary setup but with the following
    addresses:
    PC B IP 192.168.4.10
    Routers IP: 192.168.0.1
    Company's static IP: 83.45.100.2

    When PC A transmits to PC B, it passes the packet to it's router,
    which then network translates the source IP and then routes that
    packet to the destination over the internet.

    I am confused about which IP's will be used as the destination. When
    PC A transmits to B, is the destination IP of the packet the companies
    static IP (83.45.100.2) or PC B's IP?

    To me, it makes more sense for the dest IP to be the company's static
    IP as PC B's IP is not registered and there could be millions of other
    PC's on the internet with the same IP. So the router wouldn't know
    which one to route it to.

    Okay, so assuming the dest IP is the company's static IP, on the
    receiver side, the router then receives this packet transmitted from
    PC A. What does the router do with this packet now as the destination
    IP was the company's itself? How does the router know to then pass the
    packet onto PC B? Am I missing out a step here of have the wrong
    address' in place?

    If anyone can help sort out my confusion it would be greatly
    appreciated!

    Many thanks
    Ryan

  2. Re: Low-level Network Routing Question

    You are describing a network using some type of Tunnel between the two
    networks. What you are asking is a 1-to-1 mapping. But with a basic
    1-to-1 mapping you don't need to worry about a local subnet, However,
    in your case you want to have secured LAN behind the routers (which is
    good), so to get this to work you will need a VPN connection between
    the two networks. All this does is encrypt, NAT, and Route.


  3. Re: Low-level Network Routing Question

    In this situation, you would need to know the port(s) used by the OS or
    application and enable port forwarding within the router to the IP of
    the computer behind the firewall/router/NAT box.

    PC A would connect to the router IP of PC B's subnet or vise - versa.


  4. Re: Low-level Network Routing Question

    You are right, the destination IP will be that of the company's IP. A
    simple explanation is that when your computer sends out a packet to be
    routed over the internet, your router will change the source IP address
    to the address of the interface that the packet is going out of (NAT).
    The receiving router will do the same thing. That is, it will take the
    packet and route it to the internal host you are looking for, agian
    using NAT. When that host responds, the process repeats. Hope that
    helps

    -Joe


+ Reply to Thread