Directing Incoming Traffic Through a Specific Gateway


  • I am stuck in a networking soup. My client has recently got MPLS installed for connecting his two offices. He has asked me to connect the two networks, so that the server is accessibe from the spoke location.

    I shall first describe the two networks (Hub & Spoke). The Hub location has two segments working out on the same physical network i.e 192.168.0.X and 192.162.1.X. The internet router /gateway ( is also connected to the same physical network. The MPLS gateway ( also terminates in the same switch. Server in theis location have two network cards each, one catering to the LAN nodes on 192.168.0.x and one for access via the internet on 192.168.1.x. The ip config on 1 server for eg would be:
    NIC1 - 
    SubNet :

    NIC2 -

    The other office has just the MPLS gateway ( terminating into a switch, and connected to machines on the segment : 192.168.16.x with a subnet mask and gateway :

    We tried pinging one computer at spoke location from the hub location with a machine having a single lan card configured to subnet and gateway and it was successful.

    We also tried vice versa from the spoke location with a computer (, subnet and gateway to the hub computer (the same parameters as mentioned above i.e192.168.0.207, subnet : and gateway192.168.0.1) and that too was a success.
    However when we try pinging from the spoke location to the server on (with 1 Nic for LAN: & the other NIc connected to the internet: and gateway:, it is unsuccessful ( which is logical because the gateway for the machine is I cannot change the setup at the hub location, because there are other issues.The servers also require internet access for users to connect from outside .Is there any way, I can get this working , so that a ping from goes to I also understand that we cannot have two gateways on the same machine since these are disjoint networks.. Is there any way that the traffic for goes right to that machine even if the gateway is on the 192.168.1.x segment? Or any other aternate option? Please help"

    One more Question: Is there any kind of "route" like command which can direct incoming traffic to a specific gateway? I know Port Forwarding can be done when there is one gateway, but in the situation explained above, any possibility, or  can I use a machine with muliple NICs to solve this issue?

    Saturday, June 22, 2013 3:43 PM


All replies

  • Maybe this diagram will explain my situation better.

    I want PC3 & PC4 to access servers 1 &2. (at least server2)

    With the present ip, PC2 can access PC3 & PC4.
    PC1 & the Servers cannot access PC3 & 4 till a static route is added.
    PC3 & PC4 can access PC2 but not PC1 & the servers
    Routers 2 & 3 can access each other but not router 1.

    Please let me know.

    Sunday, June 23, 2013 9:13 AM
  • Hi,

    It seems the server1 has no route information to 192.168.16.x subnet, you can try to add it by manual.

    For example, to add a static route to the network that uses a subnet mask of, a gateway of, and a cost metric of 2, you type the following at a command prompt:

    route add mask metric 2

    Quote from:

    Add a static IP route

    Hope this helps

    Alex Lv

    Thursday, June 27, 2013 5:57 AM