Subject: Re: i386 stuff and defaultroute wierdness
To: Jasper Wallace <jasper@ivision.co.uk>
From: Jeff Thieleke <thieleke@ix.netcom.com>
List: port-i386
Date: 01/14/1998 01:15:49
> Firstly I want to thank everyone that was invilved in producing 1.3 - the
> isapnp stuff clears up some major headaches  and it's nice to be able to
> run the same os on a Risc PC, SS1 and a 486.

What is a Risc PC?  An ARM based system?

> fish# ./pppd.connect
> [ppp connects]
> fish# netstat -rn
> Routing tables
> 
> Internet:
> Destination        Gateway            Flags     Refs     Use    Mtu  Interface
> default            158.43.121.20      UG          0        1      -  ppp0
> 10/24              link#2             UC          0        0      -  ne2
> 10.0.0.40          00:00:a4:10:3a:b0  UHL         0        9      -  ne2
> 10.0.0.41          00:20:18:70:b5:13  UHL         0       24      -  lo0
> 10.0.0.255         link#2             UHL         1       40      -  ne2
> 127.0.0.1          127.0.0.1          UH          1       16      -  lo0
> 158.43.121.20      193.130.251.89     UH          1        0      -  ppp0
> 
> [other protocols snipped]
> fish# traceroute 194.154.62.72
> traceroute: Warning: Multiple interfaces found; using 10.0.0.41 @ ne2
  ^^^^^^^^^^           ^^^^^^^^^^^^^^^^^^^              ^^^^^^^^^^^^^^^

This is the critical piece of information.  traceroute used to default to
the default route, but as of the current version, if multiple interfaces
are found, it uses the first configured interface.  And since you
configured ne2 before ppp0, traceroute uses ne2, as you can see from the
message above.  And of course it won't be able to reach 194.154.62.72
through your internal net. 


> traceroute to 194.154.62.72 (194.154.62.72), 30 hops max, 40 byte packets
>  1  *^C
> fish# ifconfig -a
> ne0: flags=8822<BROADCAST,NOTRAILERS,SIMPLEX,MULTICAST> mtu 1500
>         address: 00:20:18:70:b5:13
>         media: manual
> ne2: flags=8863<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST> mtu 1500
>         address: 00:20:18:70:b5:13
>         media: manual
>         inet 10.0.0.41 netmask 0xffffff00 broadcast 10.0.0.255
> lo0: flags=8009<UP,LOOPBACK,MULTICAST> mtu 32976
>         inet 127.0.0.1 netmask 0xff000000 
> ppp0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1500
>         inet 193.130.251.89 --> 158.43.121.20 netmask 0xffffff00 
> ppp1: flags=8010<POINTOPOINT,MULTICAST> mtu 1500
> [...]
> fish# ifconfig ne2 down
> fish# !net
> netstat -rn
> Routing tables
> 
> Internet:
> Destination        Gateway            Flags     Refs     Use    Mtu  Interface
> default            158.43.121.20      UG          0        3      -  ppp0
> 10/24              link#2             UC          0        0      -  ne2
> 10.0.0.40          00:00:a4:10:3a:b0  UHL         0        9      -  ne2
> 10.0.0.41          00:20:18:70:b5:13  UHL         0       24      -  lo0
> 10.0.0.255         link#2             UHL         1       40      -  ne2
> 127.0.0.1          127.0.0.1          UH          1       16      -  lo0
> 158.43.121.20      193.130.251.89     UH          1        0      -  ppp0
> [...]
> fish# !tra
> traceroute 194.154.62.72
> traceroute to 194.154.62.72 (194.154.62.72), 30 hops max, 40 byte packets
>  1  vp20.lon.dial.pipex.net (158.43.121.20)  266.072 ms  257.409 ms  257.063 ms
> 
> so even tho the routing tables point the default route out of the ppp
> connection the packets try to go out of the ethernet...


When you took down ne2, ppp0 becomes the first configured interface -
actually in your case, the only external interface, so traceroute uses it
and succeeds.  It isn't that your network wasn't working while ne2 was up,
it was that traceroute was being stupid.  The simple workaround is to
force traceroute to use ppp0: you do this by using the -i flag, as in
'traceroute -i ppp0 194.154.62.72'. 

Note that only traceroute seems to ignore the default route.  If you pinged
194.154.62.72, I know that it would work (I have a similar setup at home).


This traceroute weirdness isn't unique to NetBSD - I have heard similar 
problems from Linux l^Husers when their distribution upgraded to the latest
version of traceroute.  



Jeff Thieleke