Link to home
Start Free TrialLog in
Avatar of MDarling
MDarling

asked on

adding a route to the default gateway

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.
Avatar of rprakasan
rprakasan

Are u using any proxy settings on this. Then I suggest set the manual proxy setting in the Opera browser.
Avatar of MDarling

ASKER

no proxy settings - just a straight workstation connecting to the web.

enable following in /etc/ppp/options

defaultroute

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.
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
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.
ASKER CERTIFIED SOLUTION
Avatar of ahoffmann
ahoffmann
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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.