On 4/1/06, Sven Köhler <[EMAIL PROTECTED]> wrote:
> Hi,
>
> does anybody use ifplugd successfully?

I have had it working with my last 3 laptops.

Probably what is happening is that the interface needs to be "up" in
order for mii-tool (or ethtool) to work correctly.

Try adding the following to /etc/conf.d/net:

postdown() {
        test "${IFACE}" = "eth0" && /sbin/ifconfig eth0 0.0.0.0 up
        return 0
}

This will make sure that when the interface is brought down by the
init script, that it is really kept up, but with no address.

> I may have found a bug in the network-driver (bcm4400).

I have this same driver, although I prefer ethtool:

>
> Can you perform those three steps with your network card?
> - ifconfig eth0 up
> - ifconfig eth0 down
> - mii-tool eth0

No, the interface needs to be up for mii stuff to work.

But as proof that it works:

Without cable:
carcharias rjf # ifconfig eth0 ; ethtool eth0
eth0      Link encap:Ethernet  HWaddr 00:14:22:EA:37:60
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:89 errors:1 dropped:0 overruns:0 frame:0
          TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:6756 (6.5 Kb)  TX bytes:948 (948.0 b)
          Interrupt:177

Settings for eth0:
        Supported ports: [ MII ]
        Supported link modes:   10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
        Supports auto-negotiation: Yes
        Advertised link modes:  10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
        Advertised auto-negotiation: No
        Speed: 10Mb/s
        Duplex: Half
        Port: Twisted Pair
        PHYAD: 1
        Transceiver: internal
        Auto-negotiation: on
        Current message level: 0x000000ff (255)
        Link detected: no

Plugging in a cable:
carcharias rjf # ifconfig eth0 ; ethtool eth0
eth0      Link encap:Ethernet  HWaddr 00:14:22:EA:37:60
          inet addr:192.168.2.101  Bcast:192.168.2.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:96 errors:1 dropped:0 overruns:0 frame:0
          TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:8264 (8.0 Kb)  TX bytes:1896 (1.8 Kb)
          Interrupt:177

Settings for eth0:
        Supported ports: [ MII ]
        Supported link modes:   10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
        Supports auto-negotiation: Yes
        Advertised link modes:  10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
        Advertised auto-negotiation: No
        Speed: 100Mb/s
        Duplex: Full
        Port: Twisted Pair
        PHYAD: 1
        Transceiver: internal
        Auto-negotiation: on
        Current message level: 0x000000ff (255)
        Link detected: yes

Removing the cable:
carcharias rjf # ifconfig eth0 ; ethtool eth0
eth0      Link encap:Ethernet  HWaddr 00:14:22:EA:37:60
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:98 errors:1 dropped:0 overruns:0 frame:0
          TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:8392 (8.1 Kb)  TX bytes:1896 (1.8 Kb)
          Interrupt:177

Settings for eth0:
        Supported ports: [ MII ]
        Supported link modes:   10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
        Supports auto-negotiation: Yes
        Advertised link modes:  10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
        Advertised auto-negotiation: No
        Speed: 10Mb/s
        Duplex: Half
        Port: Twisted Pair
        PHYAD: 1
        Transceiver: internal
        Auto-negotiation: on
        Current message level: 0x000000ff (255)
        Link detected: no

-Richard

-- 
gentoo-user@gentoo.org mailing list

Reply via email to