Re: Default route doesn't change to wireless device (ath0)

From: Jochen Gensch <incmc_at_gmx.de>
Date: Wed, 7 Sep 2005 21:28:04 +0200
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.


Jochen
Received on Wed Sep 07 2005 - 17:29:02 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:43 UTC