I am not able to add a new route to my route table using route command
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
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 192.168.100.22 netmask 255.255.255.0 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 192.168.100.22 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 192.168.100.22 netmask 255.255.255.0 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
Prashanth
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:
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.