i have a machine with two NIC .
One has 192.168.2.52 ip with gateway 192.168.2.1
Other has 172.16.16.45 ip with gateway 172.16.16.150
how can i configure my route such that my network traffic is routed
to the concerned gateway.
I am using Fedora Core 3.
The utility to edit the routing table is "route". You can check it's syntax through "man route". For the specific occasion, you would execute something like the following (using the appropriate network masks):
[code:1]route add -net 192.168.0.0 netmask 255.255.0.0 gw 192.168.2.1[/code:1]
[code:1]route add -net 172.16.0.0 netmask 255.255.0.0 gw 172.16.16.150[/code:1]
Keep in mind that routing table lies in memory, so the above need to be executed after every system boot. Redhat/Fedora provide a facility specifically to automate this, which should lie somewhere under /etc/sysconfig, or if no boot services rely on communicating with remote networks, you could just add the commands to /etc/rc.local (which is executed in the very end of al init scripts).