LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Closed Thread
 
Search this Thread
Old 09-02-2005, 07:24 AM   #1
prashanth s j
LQ Newbie
 
Registered: Sep 2005
Posts: 4

Rep: Reputation: 0
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
 
Old 09-02-2005, 08:03 AM   #2
scowles
Member
 
Registered: Sep 2004
Location: Texas, USA
Distribution: Fedora
Posts: 620

Rep: Reputation: 31
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 .....
 
Old 09-03-2005, 04:34 AM   #3
peter_robb
Senior Member
 
Registered: Feb 2002
Location: Szczecin, Poland
Distribution: Gentoo, Debian
Posts: 2,458

Rep: Reputation: 47
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.

http://www.linuxquestions.org/rules.php

The thread continues here.. http://www.linuxquestions.org/questi...hreadid=359736
 
  


Closed Thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to add a route table for eth1 and make it the default banner Linux - General 3 05-08-2005 11:14 AM
ADSL as a Alternate route or backup route bhagat2000 Linux - Networking 0 05-27-2004 03:17 PM
Help with Route Add command? graystarr Linux - Networking 4 01-13-2004 04:12 PM
Add Simple Route Table dwpondscum Linux - Networking 1 08-17-2003 02:26 AM
Working with 'route' and unwanted route entries pioniere Linux - Networking 6 02-05-2003 12:14 PM


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

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration