Solved

adding a route to the default gateway

Posted on 2002-05-24
8
227 Views
Last Modified: 2013-12-16
Hi,

I have Redhat 7.3 installed and I'm using KPPP to dial up my ISP.  The ISP uses dynamic IP and so I get a new IP address when I connect.

The problem is opera/mail etc can't communicate with the internet until I open a console and type

route add default gw <ipaddress>

where ipaddress is the one given to me by the ISP.

I'm obviously doing something wrong.

Can anyone tell me how to set this up so it all happens automatically and correctly.

Thanks,
Mike.
0
Comment
Question by:MDarling
[X]
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
  • 4
  • 3
8 Comments
 

Expert Comment

by:rprakasan
ID: 7031759
Are u using any proxy settings on this. Then I suggest set the manual proxy setting in the Opera browser.
0
 
LVL 3

Author Comment

by:MDarling
ID: 7031793
no proxy settings - just a straight workstation connecting to the web.

0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 7032974
enable following in /etc/ppp/options

defaultroute

0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 3

Author Comment

by:MDarling
ID: 7033398
Hi ahoffman,

I tried this without success.

I tried adding it to the pppd arguments in the KPPP connection and I also tried editing /etc/ppp/options and adding it in there.

Neither seems to work, am I doing something wrong?

Regards,
Mike.
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 7034179
please post /etc/ppp/options
You also may have n options.* file there for your named connection, check it too.
And there should be a ip-up script, it should contain something like:

    /sbin/route add default gw $REMOTEIP dev $INTERFACE
0
 
LVL 3

Author Comment

by:MDarling
ID: 7035831
Hi ahoffman

/etc/ppp/options

>>>>
lock
defaultroute
<<<<

/etc/ppp/ip-up

>>>>
#!/bin/bash

# This file should not be modified -- make local changes to
# /etc/ppp/ip-up.local instead

LOGDEVICE=$6
REALDEVICE=$1

export PATH=/sbin:/usr/sbin:/bin:/usr/bin

[ -f /etc/sysconfig/network-scripts/ifcfg-${LOGDEVICE} ] && /etc/sysconfig/network-scripts/ifup-post ifcfg-${LOGDEVICE}

[ -x /etc/ppp/ip-up.local ] && /etc/ppp/ip-up.local "$@"

exit 0
<<<<


I don't have an ip-up.local.

Regards,
Mike.
0
 
LVL 51

Accepted Solution

by:
ahoffmann earned 100 total points
ID: 7036690
ip-up does not setup the required route, try with following:

  INTERFACE=$1
  REMOTEIP=$5
  /sbin/route add default gw $REMOTEIP dev $INTERFACE
0
 
LVL 3

Author Comment

by:MDarling
ID: 7037739
Hi ahoffman,

Thanks for your help, your solution worked with the exception I needed to use REMOTEIP=$4 rather than $5.

Thanks, a lot.
Regards,
Mike.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

rdate is a Linux command and the network time protocol for immediate date and time setup from another machine. The clocks are synchronized by entering rdate with the -s switch (command without switch just checks the time but does not set anything). …
Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

696 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