1

I have small issue on my network

I have two NIC,

NIC 1 Connected to the internet and local network, NIC 2 Connected to Sip Trunk Circuit (No Internet)

Each one of them has different Gateway.

My problem that when I ping google.com or any other public IP , sometimes it chooses Gateway in SIP gateway, and I get timeout..

How I can route HTTP requests to NIC 1 and never goes to the second NIC card?

Thanks

1 Answer 1

0

This is related to the fact that you may have different default gateways, depending on how your interfaces come up. The correct way to deal with this is to tell your system that the gateway for NIC1 is your default gateway, and it must be so forever:

  route delete 0.0.0.0 

this removes the current gateway;

  route -p add 0.0.0.0 mask 0.0.0.0 x.x.x.x 

where x.x.x.x is the gateway of NIC1. The -p option makes this your permanent hoice.

1
  • Thanks but because I have 2 gateways I need to use: route delete 0.0.0.0 x.x.x.x where the x.x.x.x the default gateway of the NIC 1 after that I use what you mention route -p add 0.0.0.0 mask 0.0.0.0 x.x.x.x Thanks :)
    – AZUZ
    Jan 2, 2014 at 5:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .