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

adding a route to the default gateway

Posted on 2002-05-24
8
225 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
  • 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
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Ubuntu not booting - How get past GRUB? 3 57
Penetration Testing home based work 3 91
ifconfig 4 69
Upgraded from Debian 7 to 8.7 and got black screen 20 67
Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
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…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

791 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