Default route doesn't change to wireless device (ath0)
Brooks Davis
brooks at one-eyed-alien.net
Wed Sep 7 12:41:32 PDT 2005
On Wed, Sep 07, 2005 at 09:28:04PM +0200, Jochen Gensch wrote:
> Am Freitag 02 September 2005 18:49 schrieben Sie:
>
> > > 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.
>
>
> > 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.)
>
> Sorry for getting back that late, wasn't home. Ok, here we got:
>
>
> System freshly booted, no wireless nic pluged in -> System runs on internal
> fxp0.
>
> 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
>
>
> 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=0 ttl=53 time=25.936 ms
> 64 bytes from 213.203.199.12: icmp_seq=1 ttl=53 time=25.890 ms
> 64 bytes from 213.203.199.12: icmp_seq=2 ttl=53 time=25.771 ms
> ^C
> --- 213.203.199.12 ping statistics ---
> 3 packets transmitted, 3 packets received, 0% packet loss
> round-trip min/avg/max/stddev = 25.771/25.866/25.936/0.070 ms
>
>
> Unplugging network cable from fxp0
>
>
> 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
>
>
> 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
>
>
> Pluging in wireless nic ath0 (No start_if.X scripts in etc)
>
>
> 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
>
> As you can see, the default route is back on fxp0, even though I deleted it
> before and there is no cable attached.
>
>
> 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
>
>
> 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
>
> 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
>
> I cannot kill the default route on fxp0. However the kernel is complaing about
> arp things, which I don't understand. The ath0 and fxp0 card share the same
> subnet, since I cannot set up two different ones in my hardware router. But
> that shouldn't be the problem since fxp0 shouldn't be active anyway... here
> is the kernel output for the above procedure:
>
> 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-0xc021ffff
> 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
> 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
> 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
--
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20050907/e900e526/attachment.bin
More information about the freebsd-current
mailing list