Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

routing

Posted on 2000-05-07
7
210 Views
Last Modified: 2010-04-20
I set up two modems on a different networks. On the dialin server I created the user ppp with ppplogin script as his shell. Everything works fine except the command I implemented in ppplogin script: "route add -net ???.???.???.??? gw ???.???.???.???" never executes.
When I telnet from a comp that dials the modem and issue route command I am able to telnet from one network to the other. Is there any solution to this?
0
Comment
Question by:Malensek
7 Comments
 
LVL 2

Expert Comment

by:mzehner
ID: 2786799
I know if you don't type the command exactly as route likes it, it will ignore it.  Try:
route add -net xxx.xxx.xxx.xxx netmask 255.255.255.255.0 gw xxx.xxx.xxx.xxx
Or whatever your correct netmask is.
Also check your routes with the route command after entering them to be sure it worked.  I think the command is "route -a".
0
 

Expert Comment

by:eureeka
ID: 2786981
Are you putting the full path to the route binary? I believe its:

/sbin/route add -net etc...

Also, make sure this script is owned by root.

eureeka
0
 

Author Comment

by:Malensek
ID: 2787650
I appologize for typing mistake my command is as follows : "/sbin/route add -net ???.???.???.??? netmask 255.255.255.0 gw ???.???.???.???" I am sure there is a problem with the ppp user. I have also issue "chmod +s /sbin/route" to give the process a root privilege, but it doesnt work (just with ppp user that has ppplogin script as his shell).
0
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 
LVL 2

Expert Comment

by:ksemat
ID: 2787651
I think they've pretty much summed it all up make sure you're using the full path to the route command that is what I also thinkmis the problem
make sure you have no misspellings in your command
0
 
LVL 4

Accepted Solution

by:
kiffney earned 30 total points
ID: 2788416
Try putting the command in the /etc/ppp/ip-up script.  Something like:

if [ "$5" = "128.1.2.2" ] ; then
        route add -net 128.1.2.0 netmask 255.255.255.0 dev $1

where 128.1.2.2 is the number you're giving the dialing-in machine, and dev $1 will be replaced with ppp0 or whatever number the ppp device is automagically assigned.  This script executes with pppd's privileges and works with the default permissions on my RedHat distribution.  
0
 

Expert Comment

by:suguinha
ID: 2790746
Try "/sbin/route add -net ???.???.???.??? netmask 255.255.255.0 gw ???.???.???.??? dev pppX"
0
 

Author Comment

by:Malensek
ID: 2804619
I have just put the command in /etc/ppp/ip_up and it worked.
0

Featured Post

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question