-   Linux - Networking (
-   -   I am not able to add a new route to my route table using route command (

prashanth s j 09-02-2005 07:24 AM

I am not able to add a new route to my route table using route command
Hi friends!
I wanted to add routes to the routing table.
At the $ prompt i typed the command route add -net netmask dev eth0. But the command is not recognized and the message, " command not found " is displayed.
My system is connected via interface eth0 to a proxy server.
The system with address is also connected to the proxy server via eth0.
After trying to add route from the $ prompt , as i was not successful, I tried to include the instruction : route add -net netmask dev eth0 in a socket program. But I got the compile time errors , as perhaps route is not an instruction.
I want to add routes (in my routing table) to the other systems on our LAN
because, we are developing RIP1 and we want to add a few routes statically to the routing table.
So friends I would be grateful to U if you could tell me how to add routes to the routing table and what is the reason that I am not able to add routes using the route command.
Also friends please tell me if their is any way to manipulate the entries of the routing table while executing the program, for example : say changing the metric values only (This we need to do if the metric for a route changes.)
Thank U

scowles 09-02-2005 08:03 AM

1) You say your are at the $ prompt. This usually means you have user level priviledges, not root. I believe root is the only user that can manipulate the routing tables. So either login as root, or su to root.

2) If after logging in as root -or- su'ing to root, you still get the command not found, specify the full path to the route command:

/sbin/route add -net .....

peter_robb 09-03-2005 04:34 AM

Please do not post the same thread in more than one forum. Picking the most relevant forum and posting it once there makes it easier for other members to help you and keeps the discussion all in one place.

The thread continues here..

All times are GMT -5. The time now is 02:02 AM.