Routing with two network cards

Hello there, thanks for taking your time to help others.

I have a machine with two network cards.

eth0 has the following settings:
address = 10.242.28.27
netmask = 255.255.255.0

eth1 has the following settings:
address = 192.168.100.11
netmask = 255.255.255.0

the current default gateway for the system is 10.242.28.1

my problem is this. The 192 subnet is connected to the internet. The 10 subnet is connected to my VOIP Vendor. in the current configuration my phones work but my machine can not see the internet. this is problematic because when i connect to my FPX server from outside the office the packets make it to the server, but then instead of routing back, they go out the 10 interface. What I would like to accomplish is the following:

all traffic on 10 network route through 10.242.28.1
all trafic on 192 network route through 192.168.100.1

this would enable the phone traffic to route over the 10 network and all other traffic to route over the 192 network which is where the internet is located.

if i change the default route to the 10 network the phones work but no internet. if I change the default route to the 192 network i have internet and no phones. I have searched hi and low to find an answer and I have been out of luck so far. I am going to update the /etc/sysconfig/network and /etc/sysconfig/network-scripts/route-eth0 and eth1 files to make this permanant.

any help you can offer with the commands and or advice would be greatly appreciated.

thanks,

Rob

What about it?

I am a fan myself in some scenarios

MOD EDIT
FIXED OP
MOD EDIT

You only need to update the route-eth0 if it is connected to the 10 network.

You were very close. While searching high and low did you see static routes?

You want your default route to be the Internet. Then gather a list of the networks that you need to connect to on your VoIP network.

Express them as networks IE:

10.1.0.0/24 (a 24 bit classic network IE: subnet mask 255.255.255.0)
10.1.3.4/32 (A single host)

Add an entry for each network you need to reach via the gateway 10.242.28.1

Don’t forget to increment counter in route-ethx file

Do a ‘service network restart’ to initialize your changes (best done from LAN)

The ‘route’ command will display the fruits of your labor.

I also deleted your duplicate post. 1 per topic per customer please.

looks like it was under “summary” and not “body” so it wasn’t showing. So now that is fixed I truncated this post

Will that survive a reboot James?

From the command line I do (example here is SIP server at 5.5.5.5)

route add -host 5.5.5.5 gw 10.x.x.x (your provider interface)

Then you need to add to /etc/sysconfig/network-config/route-eth0 (where x is the Ethernet interface index)

ADDRESS0=10.242.28.1 (or whatever the gateway is)
NETMASK0=255.255.255.255
GATEWAY0=10.242.28.1

If you need more addresses routed to that gateway repeat the same lines and increment the integer at the end of the keywords.

Thanks for deleting the duplicate. Ha Ha

I did see static routes and thats where I am having my problem. Its easy to change the default gateway to the 192 address and then internet works fine. I cant seem to formulate the route command to allow the addition of the static route for the sip traffic? Can you help me out with correct syntax?

thanks in advance for you time and assistance.

Rob

Set 192 as default
then
ip route add {provider IP}/32 dev eth0

Thank you both I will work on this and report back (hopefully with a SOLVED!).

Thanks again for taking time to assist you guys really make a difference.

Rob