Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 Sep 2005 12:41:30 -0700
From:      Brooks Davis <brooks@one-eyed-alien.net>
To:        Jochen Gensch <incmc@gmx.de>
Cc:        freebsd-current@freebsd.org
Subject:   Re: Default route doesn't change to wireless device (ath0)
Message-ID:  <20050907194130.GA2436@odin.ac.hmc.edu>
In-Reply-To: <200509072128.04819.incmc@gmx.de>
References:  <20050901225346.0923E16A41F@hub.freebsd.org> <200509021003.39863.incmc@gmx.de> <20050902164957.GA22097@odin.ac.hmc.edu> <200509072128.04819.incmc@gmx.de>

next in thread | previous in thread | raw e-mail | index | archive | help

--1yeeQ81UyVL57Vl7
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, Sep 07, 2005 at 09:28:04PM +0200, Jochen Gensch wrote:
> Am Freitag 02 September 2005 18:49 schrieben Sie:
>=20
> > > SU NB /:route -n flush -inet
> > > default              10.0.0.1             done
> > > 10.0.0.104           127.0.0.1            done
> > > [REMOVED network cable from fxp0]
> > > [Pluged in wireless nic ath0]
> > > SU NB /:ping i-mc.de
> > > PING i-mc.de (213.203.199.12): 56 data bytes
> > > ping: sendto: No route to host
> > > ^C
> > > --- i-mc.de ping statistics ---
> > > 2 packets transmitted, 0 packets received, 100% packet loss
> > > [OK, routes have not been corrected yet]
> > > SU NB /:route add default 10.0.0.1
> > > route: writing to routing socket: File exists
> > > add net default: gateway 10.0.0.1: File exists
> > > [Why does that route sitll exist, it has been deleted above]
> > > SU NB /:ping i-mc.de
> > > ^C
> > > SU NB /:route delete default
> > > delete net default
> > > SU NB /:route add default 10.0.0.1
> > > add net default: gateway 10.0.0.1
> > > SU NB /:ping i-mc.de
> > > ^C
> > >
> > > I cannot set the routes to ath0 once fxp0 was active. I guess I must
> > > still be misunderstandung what you guys are saying / doing.
>=20
>=20
> > I need to see the IPv4 routing table before and after each step to
> > understand what's going.  Please send the results of "netstat -rnf inet"
> > at each stage.  Also, please, please, please, ping by IP address so
> > we're not testing your resolver (which is dependent on your routing
> > configuration.)
>=20
> Sorry for getting back that late, wasn't home. Ok, here we got:
>=20
>=20
> System freshly booted, no wireless nic pluged in -> System runs on intern=
al=20
> fxp0.
>=20
> netstat -r
> -----------------------------------------------------------------------
> Destination        Gateway            Flags    Refs      Use  Netif Expire
> default                               UGS         0     5333   fxp0
> 10/24              link#2             UC          0        0   fxp0
>                    00:30:f1:e1:4b:4e  UHLW        2     1224   fxp0    718
> 10.0.0.104         localhost          UGHS        0        0    lo0
> localhost          localhost          UH          1       22    lo0
>=20
>=20
> ping 213.203.199.12
> -----------------------------------------------------------------------
> ping 213.203.199.12
> PING 213.203.199.12 (213.203.199.12): 56 data bytes
> 64 bytes from 213.203.199.12: icmp_seq=3D0 ttl=3D53 time=3D25.936 ms
> 64 bytes from 213.203.199.12: icmp_seq=3D1 ttl=3D53 time=3D25.890 ms
> 64 bytes from 213.203.199.12: icmp_seq=3D2 ttl=3D53 time=3D25.771 ms
> ^C
> --- 213.203.199.12 ping statistics ---
> 3 packets transmitted, 3 packets received, 0% packet loss
> round-trip min/avg/max/stddev =3D 25.771/25.866/25.936/0.070 ms
>=20
>=20
> Unplugging network cable from fxp0
>=20
>=20
> Doing a "route -n flush -inet " to get rid off default routes etc.
> -----------------------------------------------------------------------
> route -n flush -inet
> default              10.0.0.1             done
> 10.0.0.104           127.0.0.1            done
>=20
>=20
> netstart -r
> -----------------------------------------------------------------------
> Destination        Gateway            Flags    Refs      Use  Netif Expire
> 10/24              link#2             UC          0        0   fxp0
> 10.0.0.1           00:30:f1:e1:4b:4e  UHLW        1     1287   fxp0    182
> localhost          localhost          UH          0       22    lo0
>=20
>=20
> Pluging in wireless nic ath0 (No start_if.X scripts in etc)
>=20
>=20
> netstat -r
> -----------------------------------------------------------------------
> Destination        Gateway            Flags    Refs      Use  Netif Expire
> default            10.0.0.1           UGS         0        0   fxp0
> 10/24              link#2             UC          0        0   fxp0
> 10.0.0.1           link#2             UHRLW       2     1383   fxp0      8
> 10.0.0.103         localhost          UGHS        0        0    lo0
> localhost          localhost          UH          1       22    lo0
>=20
> As you can see, the default route is back on fxp0, even though I deleted =
it=20
> before and there is no cable attached.
>=20
>=20
> ping 213.203.199.12 (obvious result)
> -----------------------------------------------------------------------
> ping 213.203.199.12
> PING 213.203.199.12 (213.203.199.12): 56 data bytes
> ^C
> --- 213.203.199.12 ping statistics ---
> 4 packets transmitted, 0 packets received, 100% packet loss
>=20
>=20
> Trying something else
> -------------------------------------------------------------
> ifconfig fxp0 down
> SU NB ~:route delete default
> delete net default
> SU NB ~:route add default 10.0.0.1
> add net default: gateway 10.0.0.1
> SU NB ~:netstat -r
> Routing tables
>=20
> Internet:
> Destination        Gateway            Flags    Refs      Use  Netif Expire
> default                               UGS         0        0   fxp0
> 10/24              link#5             UC          0        0   ath0
>                    00:30:f1:e1:4b:4e  UHLW        2        9   ath0   1171
> 10.0.0.103         localhost          UGHS        0        0    lo0
> localhost          localhost          UH          1       22    lo0
>=20
> I cannot kill the default route on fxp0. However the kernel is complaing =
about=20
> arp things, which I don't understand. The ath0 and fxp0 card share the sa=
me=20
> subnet, since I cannot set up two different ones in my hardware router. B=
ut=20
> that shouldn't be the problem since fxp0 shouldn't be active anyway... he=
re=20
> is the kernel output for the above procedure:
>=20
> Sep  7 20:52:38 incmc kernel: fxp0: link state changed to DOWN
> Sep  7 21:09:48 incmc kernel: ath0: <Atheros 5212> mem 0xc0210000-0xc021f=
fff=20
> irq 9 at device 0.0 on cardbus0
> Sep  7 21:09:48 incmc kernel: ath0: Ethernet address: 00:05:5d:9f:c5:0e
> Sep  7 21:09:48 incmc kernel: ath0: mac 5.9 phy 4.3 radio 3.6
> Sep  7 21:09:55 incmc kernel: ath0: link state changed to UP
> Sep  7 21:10:13 incmc kernel: arp: 10.0.0.1 is on fxp0 but got reply from=
=20
> 00:30:f1:e1:4b:4e on ath0
> Sep  7 21:10:16 incmc last message repeated 7 times
> Sep  7 21:10:16 incmc dhclient: New IP Address (ath0): 10.0.0.103
> Sep  7 21:10:16 incmc dhclient: New Subnet Mask (ath0): 255.255.255.0
> Sep  7 21:10:16 incmc dhclient: New Broadcast Address (ath0): 10.0.0.255
> Sep  7 21:10:16 incmc dhclient: New Routers (ath0): 10.0.0.1
> Sep  7 21:14:48 incmc kernel: arp: 10.0.0.1 is on fxp0 but got reply from=
=20
> 00:30:f1:e1:4b:4e on ath0
> Sep  7 21:20:27 incmc dhclient[204]: connection closed
> Sep  7 21:20:27 incmc dhclient[204]: exiting.

I think I see what's going on.  Your arp cache is posioning your routing
table.  Try doing an "arp -a -d" after flushing the routes and before
inserting the nic.  It looks like we should add support to the arp(8)
command so -i can be used with -d and consider flushing cache entries
realted to an interface when it goes down.

-- Brooks

--=20
Any statement of the form "X is the one, true Y" is FALSE.
PGP fingerprint 655D 519C 26A7 82E7 2529  9BF0 5D8E 8BE9 F238 1AD4

--1yeeQ81UyVL57Vl7
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQFDH0JpXY6L6fI4GtQRAuYBAJ9BOYNLR6u1b9joC+m6TnxEA6Q3IgCeKi7Z
dX10mN2A5XfOpTKL2Tr/8Wk=
=FGT1
-----END PGP SIGNATURE-----

--1yeeQ81UyVL57Vl7--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050907194130.GA2436>