in ppp1, out ppp0? 2 default routes?

in ppp1, out ppp0? 2 default routes?

Post by Clifford Kit » Sat, 07 Oct 2000 04:00:00




> The traffic goes out the interface that it came in on.  This is
> what I want but the question is, is it ok to have 2 default routes
> or is there a better way?

You have two default routes but only the last one created is active.
Nothing will go out the other default route.

Quote:> The next question is how do I configure pppd to create the 2 default
> routes, if 2 defaults is ok?  Or, if the 2 default routes is not
> the best way to go, how do I configure pppd to stop the, in ppp1
> out ppp0 behaviour?

Just having two default routes doesn't buy you anything except a backup
default route if the active one goes down for some reason.  There's
load balancing of some sort floating around in *space but I can't
speak to that.  Maybe someone else will.

--

/* Better is the enemy of good enough. */

 
 
 

in ppp1, out ppp0? 2 default routes?

Post by BOBONLO » Tue, 10 Oct 2000 04:00:00


Phil...

I have a similar problem, I have two default gateways on my network, I have
a stand alone router (dsl) as THE default network gateway and I also have a
Linux computer running as a backup gateway thru a ppp connection. I also
have a different LINUX computer running DNS, MAIL, and FTP servers using THE
default router, (and a few Windows 9X and NT on the network also) so here it
is...
How do I get the DNS server to go to the second backup gateway when the main
gateway goes down, I have to change it manually now I want it change
automatically.

If you need more info let me know ill do all I can

Quote:> > I've been investigating advanced routing and I'm recompiling my kernel.
> > I selected the policy routing[1] which should let me create 2 routing
> > tables, and select which table to use based on incoming interface.  That
> > should do the trick, I hope :)   Lot's more learning to go, I love it!

> :)  I did it! lol.   Here's the story:

> Recompiled 2.2.16 + LIDS patch selecting advanced routing and policy
> routing.  Installed iproute-2.2.4-2.i386.rpm package.  Read and followed
> http://www.compendium.com.ar/policy-routing.txt

> Nightmare!  Kept getting 'RTNETLINK answers: Operation not permitted'
> using the ip utility and I couldn't find that string anywhere on
> dejanews.com or altavista.com, so I figured I had some rare glitch or
> something, whatever, perfect time to upgrade to 2.4.0test9 ;)

> Upgraded the kernel and selected the same advanced routing settings in
> menuconfig.  Reboot, now the ip util works good.  Next I spent hours
> trying to figure out how to do a simple little task, nothing new for me
> though.  Read through Adv-Routing HOWTO but had no luck.  Next I printed
> the ip-cref.ps manual that came in the iproute rpm and read that, then
> tinkered with the ip tool again, but still no luck.  Finally after
> rereading the manual I reread, no, I understood the following section:

> Section 8.1
> Arguments:
> -iif NAME
>       select incoming device to match. If the interface is loopback, the
> rule matches only packets originated by this host. It means that you may
> create separate routing tables for forwarded and local packets and,
> hence, completely segregate them.

> All I wanted to do was have packets go out the interface that they came
> in on.  That's it.  But packets would come in on ppp0(staticIP,isp1) and
> go out eth0(DHCP,isp2),  eth0 being the default gateway interface.

> I used the following ip rule and ip route commands to finally get that
> simple little task done :)

> ip route add default via 207.194.170.1 dev ppp0 table 2
> ip rule add from 207.194.170.0/24 iif lo table 2 priority 100

> The first command creates a default route to the 207.194.170.1
> gateway/router using the ppp0 interface in a new routing table #2.

> The next line creates a rule that says "any packet from within the
> 207.194.170.0/24 range (my static PPPoe IPs range) originating from this
> host should use the route table #2 to lookup the route".

> *Now* any traffic coming in ppp0 goes out ppp0 and any traffic coming in
> eth0 goes out eth0.  So far so good.  Now only time will tell if this
> hold together :)  I wrote all this for others that might be trying to do
> the same thing as I did and are as lost as I was, of course in a few
> days I'll find out that there is a simple route command that'll do what
> I stressed out over for hours/days ;)  Such is life...

> Phil.


 
 
 

1. routing problem with ppp0 and ppp1

Hi there,

Situations:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use
Iface
gateway1        *               255.255.255.255 UH    0      0        0 ppp1
gateway         *               255.255.255.255 UH    0      0        0 ppp0
203.xxx.xxx.xxx   gateway1 255.255.255.192 UG    0      0        0 ppp1
localnet        *               255.255.255.0   U     0      0        0 eth0
default         gateway         0.0.0.0         UG    0      0        0 ppp0

gateway is  172.xxx.xxx.xxx and is an ADSL connection over ethenet on
interfaces ppp0 and eth1
gateway1 is 139.xxx.xxx.xxx and is a static ip over a normal dialup
connection on interface ppp1

Problem:
All traffics from the local net are routed to the ADSL interface which is
fine but the gateway1 ip is not visible to the outside world at all(I want
to be able to access that static ip on that connection). I turned on
ipchains logging and when do a ping(or telnet) to ppp1's ip I can see
packets arriving at interface ppp1 but don't know where the packets gone
afterwards. Have checked all other chains(output, forward and MASQ) and they
are empty. I suspect the routed has drop all the ppp1 packets.

I try changed the default route to gateway1 from gateway and the situation
is the opposite, now the ppp1 ip is visible(can ping and telnet from
outside) but the ppp0 ip is dead. So basically the ppp1 and ppp0 are
fighting each other.

Thanks for any info

2. DIR/NEW

3. diald routing problem, no default route for ppp0 with correct gateway

4. C-Shell Question

5. Routed, default routes and ppp0 interfaces ?

6. ncftp+term

7. ppp0 on startup and default route

8. compress -d problems

9. More page outs than page ins?

10. Setting up *non-default* routes through ppp0

11. Two default routes (ppp0 and sl0): Normal?

12. eth0 hoses ppp0 on RH5.1 box, and new default route doesn't help.

13. ppp0 default route after upgrading RH6.0->RH6.1