Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 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?


share|improve this question
up vote 0 down vote accepted

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 

this removes the current gateway;

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

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

share|improve this answer
Thanks but because I have 2 gateways I need to use: route delete 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 mask x.x.x.x Thanks :) – AZUZ Jan 2 '14 at 5:22

You must log in to answer this question.

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