Subject: Re: kern/29629
To: None <gnats-bugs@NetBSD.org>
From: Florence HENRY <florence.henry@obspm.fr>
List: netbsd-bugs
Date: 03/10/2005 12:27:08
On Thu, Mar 10, 2005, Manuel Bouyer <bouyer@antioche.lip6.fr> wrote:

>  > stge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
>  >         capabilities=7<IP4CSUM,TCP4CSUM,UDP4CSUM>
>  >         enabled=0
>  >         address: 00:0f:3d:cd:e9:26
>  >         media: Ethernet 100baseTX full-duplex (1000baseT full-duplex)
> 
>  
>  Hum, it looks like you selected 100baseTX full-duplex, but the adapter
>  thinks it's in 1000baseT full-duplex mode. I don't know if it's the
>  real cause of your problem, or just that the driver doesn't update the
>  values passed to ifconfig properly.
>  What happens if you use 'media autoselect' ?

I tried to force it in 100baseTX because the man page says :
<< The stge driver does not yet function properly with 1000BASE-T fitted
      boards.  Currently, only 1000BASE-SX boards work >>


# /root # ifconfig stge0 media autoselect
# /root # ifconfig stge0
stge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
         capabilities=7<IP4CSUM,TCP4CSUM,UDP4CSUM>
         enabled=0
         address: 00:0f:3d:cd:e9:26
         media: Ethernet autoselect (1000baseT full-duplex)
         status: active
         inet 10.0.3.1 netmask 0xffffff00 broadcast 10.0.3.255
         inet6 fe80::20f:3dff:fecd:e926%stge0 prefixlen 64 scopeid 0x1


A "ping 10.0.3.3" from the netbsd box gives :

# /root # tcpdump -i stge0
tcpdump: listening on stge0
11:13:45.774716 10.0.3.1 > 10.0.3.3: icmp: echo request seq 0
11:13:46.778739 10.0.3.1 > 10.0.3.3: icmp: echo request seq 1
11:13:47.788749 10.0.3.1 > 10.0.3.3: icmp: echo request seq 2
11:13:48.788770 10.0.3.1 > 10.0.3.3: icmp: echo request seq 3
11:13:49.788778 10.0.3.1 > 10.0.3.3: icmp: echo request seq 4
11:13:50.788806 10.0.3.1 > 10.0.3.3: icmp: echo request seq 5

A "ping 10.0.3.1" from the other machine gives :

# /root # tcpdump -i stge0
tcpdump: listening on stge0
11:15:43.648699 arp who-has 10.0.3.1 tell 10.0.3.3
11:15:43.648707 arp reply 10.0.3.1 is-at 0:f:3d:cd:e9:26
11:15:48.867245 arp who-has 10.0.3.1 tell 10.0.3.3
11:15:48.867252 arp reply 10.0.3.1 is-at 0:f:3d:cd:e9:26
11:15:54.367078 arp who-has 10.0.3.1 tell 10.0.3.3
11:15:54.367085 arp reply 10.0.3.1 is-at 0:f:3d:cd:e9:26


Something strange happens when I switched to media autoselect.

Each time I made a "tcpdump -i stge0", the interface was broken for a 
small amount of time (a fraction of a second).

The 10.0.3.1 machine is a WinXP box, and each time the tcpdump command 
was executed, it was complaining that the cable was unplugged. After a 
fraction of a second, it was saying that the cable was plugged again, 
and that the box was connected at 1Gb/s.

This phenomenon does not accur when I switch to 100baseTX.

>  What does 'netstat -i' show on the stge0 interface ?

# /root # netstat -i 

Name  Mtu   Network    Address             Ipkts Ierrs Opkts Oerrs Colls
stge0 1500  <Link>     00:0f:3d:cd:e9:26     309     0     0     0     0
stge0 1500  10.0.3/24  10.0.3.1              309     0     0     0     0
stge0 1500  fe80::     fe80::20f:3dff:fe     309     0     0     0     0
wm0   1500  <Link>     00:0c:f1:72:85:ae 5200474     0 688763    0     0
wm0   1500  145.238/16 localhost         5200474     0 688763    0     0
wm0   1500  fe80::     fe80::20c:f1ff:fe 5200474     0 688763    0     0

The wm0 interface is the one that works.

-- 
Florence Henry
florence.henry@obspm.fr