LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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


Reply
  Search this Thread
Old 03-04-2002, 09:13 AM   #1
magnakuz
LQ Newbie
 
Registered: Mar 2002
Posts: 5

Rep: Reputation: 0
Question Possible to have 2 gateways at once in routing table?


I have slackware version 7 and I am trying to convert my internet connection from dialup to DSL. I want both dialup and DSL working at the same time, so when my domain name gets re-associated with my new IP address, there will be no interruption in connectivity.

background data:
slackware box = 192.168.1.1 = eth0
192.168.1.100 = Linksys router

Everything works just fine for my dial up static IP connection. This box was my primary gateway for my LAN. I just bought a linksys router to connect to my DSL and now I have that setup for my default gateway for my LAN. I have already begun forwarding ports from my linksys router to my slackware box (for web pages and ftp etc..). Internally, I can either type in my old static IP / domain name OR my new static IP and the router will forward my requests to the slackware box. However, externally if I type in my old static IP / domain name nothing answers. But if I type in my new IP address the slackware box answers. I'm thinking it might be a routing gateway problem, because in my /etc/ppp/ip-up script which originally looked like:

#!/bin/bash
#
# Script which handles the routing issues as necessary for pppd
# Only the link to Newman requires this handling.
#
# When the ppp link comes up, this script is called with the following
# parameters
# $1 the interface name used by pppd (e.g. ppp3)
# $2 the tty device name
# $3 the tty device speed
# $4 the local IP address for the interface
# $5 the remote IP address
# $6 the parameter specified by the 'ipparam' option to pppd
#
/sbin/route add -net 0.0.0.0 gw $5 dev $1
exit 0

I added a new line for another gateway:

#!/bin/bash
#
# Script which handles the routing issues as necessary for pppd
# Only the link to Newman requires this handling.
#
# When the ppp link comes up, this script is called with the following
# parameters
# $1 the interface name used by pppd (e.g. ppp3)
# $2 the tty device name
# $3 the tty device speed
# $4 the local IP address for the interface
# $5 the remote IP address
# $6 the parameter specified by the 'ipparam' option to pppd
#
/sbin/route add -net 0.0.0.0 gw $5 dev $1
/sbin/route add -net 0.0.0.0 gw 192.168.1.100 dev eth0
exit 0

But then the first connection via dialup doesn't work when I externally ping the dialup's IP.

Any suggestions on how I can get the slackware box to accept connections either from the linksys router OR the dialup connection? It seems I can either have one or the other.

Thanks!
 
Old 03-04-2002, 09:54 AM   #2
magnakuz
LQ Newbie
 
Registered: Mar 2002
Posts: 5

Original Poster
Rep: Reputation: 0
I think I figured it out... I changed my /etc/ppp/ip-up file to:

#!/bin/bash
#
# Script which handles the routing issues as necessary for pppd
# Only the link to Newman requires this handling.
#
# When the ppp link comes up, this script is called with the following
# parameters
# $1 the interface name used by pppd (e.g. ppp3)
# $2 the tty device name
# $3 the tty device speed
# $4 the local IP address for the interface
# $5 the remote IP address
# $6 the parameter specified by the 'ipparam' option to pppd
#
/sbin/route add -net 0.0.0.0 gw $5 dev $1
/sbin/route add -host 0.0.0.0 gw 192.168.1.100 eth0
exit 0

Basically I added the line with the -host option. But I don't really understand why it works... If anyone can help me out, I'd appreciate it!
 
  


Reply



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
Routing to multiple gateways The Jesus Linux - Networking 6 09-20-2012 01:58 AM
On-demand PPP, routing, gateways, and iptables godofpumpkins Linux - Networking 1 10-10-2005 10:46 AM
routing table arvind kumar Linux - Networking 2 06-08-2005 11:59 PM
Routing question on RH9, two gateways tscman Linux - Networking 2 11-25-2004 06:39 AM
Advanced Networking - Multiple gateways, routing question/shorewall micaheli Linux - Networking 2 09-30-2004 12:05 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 11:20 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration