News: This forum is now permanently frozen.
Pages: [1]
Topic: Bug in <media> and/or <mediaopt> REDUX (now with extra data :-)  (Read 4595 times)
« on: August 31, 2009, 04:42:29 »
andrabr *
Posts: 1

This (or very similar) problem has been mentioned before by Greg here: http://forum.m0n0.ch/index.php/topic,886.0.html and then moved to "Bogus" WITHOUT any explanation.

Since I cannot find any relevant documentation/thread, I am resurrecting the issue.

I have done some poking and here is the extra data that should be helpful:

Configuration: Soekris net4521, bios b4501_133.bin, m0n0wall 1.3b18

Stating:

      <wan>
         <if>sis1</if>
         <media>10baseT/UTP</media>
         <mediaopt>full-duplex</mediaopt>
         <ipaddr>192.168.1.8</ipaddr>
         <subnet>24</subnet>
         <gateway>192.168.1.1</gateway>
         <spoofmac/>
      </wan>

in the <interfaces> section of the configuration file has no affect. The system defaults to 100baseTX.

The capabilities of the interface are:
Code:
$ ifconfig -m sis1 
sis1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
options=8<VLAN_MTU>
capabilities=48<VLAN_MTU,POLLING>
inet 192.168.1.8 netmask 0xffffff00 broadcast 192.168.1.255
inet6 fe80::200:24ff:fec5:27e9%sis1 prefixlen 64 scopeid 0x3
ether 00:00:24:c5:27:e9
media: Ethernet 100baseTX
status: active
supported media:
media autoselect
media 100baseTX mediaopt full-duplex
media 100baseTX
media 10baseT/UTP mediaopt full-duplex
media 10baseT/UTP
media none
media 100baseTX mediaopt hw-loopback


Observations:

1) Running ifconfig sis1 media autoselect puts the interface into 100baseTX full-duplex mode.

2) BUT running ifconfig sis1 media 100baseTX mediaopt full-duplex has the same effect as ifconfig sis1 media 100baseTX : 100baseTX half-duplex.

3) Running $ ifconfig sis1 media 10baseT/UTP mediaopt full-duplex
has the same effect as $ ifconfig sis1 media 10baseT/UTP
: puts the interface into 10baseT half-duplex mode.

4) If I reboot the system and issue  $ ifconfig sis1 media 10baseT/UTP mediaopt full-duplex
or $ ifconfig sis1 media 10baseT/UTP
it is accepted as a valid command but produces NO EFFECT WHATSOEVER.

5) If I reboot the system, once I issue ifconfig sis1 media autoselect from then on  $ ifconfig sis1 media 10baseT/UTP mediaopt full-duplex
or $ ifconfig sis1 media 10baseT/UTP
works (mediaopt is simply quietly ignored).

6) putting <earlyshellcmd>ifconfig sis1 media autoselect</earlyshellcmd> into the <system> section of the configuration file does NOT produce the desired result of "shaking up" the interface into the proper behavior. Too early in the process?

7) putting <shellcmd>ifconfig sis1 media 10baseT/UTP mediaopt full-duplex</shellcmd> into the <system> section of the configuration file does NOT  force the desired result either...

Cool Finally, the workaround that actually kinda worked was:
Code:
<shellcmd>ifconfig sis1 media autoselect</shellcmd>
<shellcmd>ifconfig sis1 media 10baseT/UTP mediaopt full-duplex</shellcmd>

This brings sis1 in 10baseT, although it still sticks to half-duplex.


Conclusion: most likely there is something funky going on with the  sis(4) driver...       
<shellcmd>ifconfig sis1 media 10baseT/UTP mediaopt full-duplex</shellcmd> command called for by     
Code:
<media>10baseT/UTP</media>
<mediaopt>full-duplex</mediaopt>
is ignored until the first          <shellcmd>ifconfig sis1 media autoselect</shellcmd>   is issued.

mediaopt is ignored altogether Sad
Ouch!
« Reply #1 on: September 12, 2009, 18:20:03 »
Manuel Kasper
Administrator
*****
Posts: 364

Now you know precisely why the media type cannot be set via the webGUI - because it doesn't work properly with some NIC drivers in FreeBSD.

Perhaps this has been fixed in FreeBSD in the meantime (7.2+), in which case it will start working properly when m0n0wall moves to FreeBSD 7.x. If not, then nothing will happen, as the media/mediaopt are unsupported options anyway... Unless someone submits a kernel patch of course.
 
Pages: [1]
 
 
Powered by SMF 1.1.20 | SMF © 2013, Simple Machines