| 1 |
From: Marek Michalkiewicz <[email protected]> |
| 2 |
To: Debian Bug Tracking System <[email protected]> |
| 3 |
Subject: Bug#85426: default route uses wrong interface with the same IP address |
| 4 |
|
| 5 |
Package: ppp |
| 6 |
Version: 2.4.0f-1 |
| 7 |
Severity: wishlist |
| 8 |
|
| 9 |
The pppd "defaultroute" option, when the ppp0 interface comes up, seems |
| 10 |
to do the equivalent of "route add default gw $ip_address", and I think |
| 11 |
it should do the equivalent of "route add default dev ppp0" instead. |
| 12 |
|
| 13 |
In most normal cases this shouldn't matter (because each interface has |
| 14 |
its own unique IP address), but specifying the interface by name (not |
| 15 |
by its IP address) may be preferable if there is more than one interface |
| 16 |
with the same IP address. |
| 17 |
|
| 18 |
I have a dummy0 interface with the same IP address as that of ppp0. |
| 19 |
This makes it possible to connect to the box from the internal LAN |
| 20 |
using its normal hostname (even if ppp0 is down at the moment), and |
| 21 |
to run named (possibly started before ppp0 comes up) as non-root. |
| 22 |
|
| 23 |
Using the "defaultroute" option causes pppd to set up the default route |
| 24 |
via dummy0 (first device found with matching IP address), not ppp0. |
| 25 |
I've worked around this by disabling the pppd defaultroute option and |
| 26 |
creating a small shell script called /etc/ppp/ip-up.d/000defaultroute |
| 27 |
(run before 00ipmasq) with the following contents: |
| 28 |
|
| 29 |
#! /bin/sh |
| 30 |
set -e |
| 31 |
/sbin/route add default dev $PPP_IFACE |
| 32 |
|
| 33 |
This gets the default route right (no corresponding ip-down script is |
| 34 |
necessary - when ppp0 goes down, the route is removed automatically). |
| 35 |
Please consider at least documenting this workaround, as I think it |
| 36 |
may be useful to someone. |
| 37 |
|
| 38 |
Thanks, |
| 39 |
Marek |
| 40 |
|
| 41 |
-- System Information |
| 42 |
Debian Release: testing/unstable |
| 43 |
Architecture: i386 |
| 44 |
Kernel: Linux alf 2.2.19pre7 #1 Sat Jan 27 15:26:41 CET 2001 i586 |
| 45 |
|
| 46 |
Versions of packages ppp depends on: |
| 47 |
ii libc6 2.2.1-1 GNU C Library: Shared libraries an |
| 48 |
ii libpam-modules 0.72-12 Pluggable Authentication Modules f |
| 49 |
ii libpam0g 0.72-12 Pluggable Authentication Modules l |
| 50 |
ii netbase 4.05 Basic TCP/IP networking system |
| 51 |
ii sysvinit 2.78-4 System-V like init. |