Link to home
Start Free TrialLog in
Avatar of sqlguy29
sqlguy29

asked on

How to configure a static route with multiple nic cards (CentOS / unix)

Hello,
I have a remote office with an Asterisks PBX server.  It has two NIC cards in it.  We just got a dedicated SIP Trunk that comes in on a dedicated line from our provider.  I need to setup the server so that the default gateway points to our LAN so that local phones and apps can connect to the server and then I think I need to setup a static route so that all traffic too and from the SIP trunk goes out eth1.
The server runs CentOS, a flavor of unix.
Its a Trixbox/Free PBX Server.

My LAN IP and subnet is 192.168.6.X/255.255.255.0
Eth0 is 192.168.6.40, Gateway is 192.168.6.41 Subnet 255.255.255.0
Eth1 is 64.201.174.253 Subnet 255.255.255.254

My current route table looks like this:
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
64.201.174.252  *               255.255.255.252 U     0      0        0 eth1
192.168.6.0     *               255.255.255.0   U     0      0        0 eth0
169.254.0.0     *               255.255.0.0     U     0      0        0 eth0
default         192.168.6.1     0.0.0.0         UG    0      0        0 eth0

Our SIP Proxy Server is 208.68.17.144
Im told the Gateway for the dedicated line should be 64.201.174.254

Inbound seems to work fine.  Its the outbound that I am having problems with.
I think I need to have all traffice bound for 208.68.17.144 routed out Eth1

I know I need to use the route add function but I cant seem to get it right.  It either doesnt work or I get a syntax error.  I'm not sure why 64.201.174.252 shows up on here as the IP address on eth1 is set to .253
I know just enough about networking to be dangerous.
Thanks
Jeremy

ASKER CERTIFIED SOLUTION
Avatar of pmasotta
pmasotta

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sqlguy29
sqlguy29

ASKER

The problem is when I specify the default gateway then all traffic is sent out via that gateway.
I currently have it on eth0.  Is it not true that if you have more than one gateway you have problems?
If I specify eth1 as the gateway then LAN and internet traffic will go out that nic.  
maybe I am miss understanding something.
Thanks
Jeremy