Linux change the speed and duplex settings of an Ethernet card

阅读更多
Task: Install mii-tool and ethtool tools
de># ethtool eth0
Settings for eth0:
        Supported ports: [ TP 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: Yes
        Speed: 100Mb/s
        Duplex: Half
        Port: MII
        PHYAD: 0
        Transceiver: internal
        Auto-negotiation: on
        Supports Wake-on: pumbg
        Wake-on: g
        Current message level: 0x00000033 (51)
        Link detected: yes
#mii-tool eth0
eth0: 100 Mbit, full duplex, link ok
de>
Change the speed and duplex settings
de># mii-tool -F 100baseTx-FD
# mii-tool -F 10baseT-HDde>

de># ethtool -s eth0 speed 100 duplex full
# ethtool -s eth0 speed 10 duplex half

mii-tool
de>de>usage: mii-tool [-VvRrwl] [-A media,... | -F media] [interface ...]
       -V, --version               display version information
       -v, --verbose               more verbose output
       -R, --reset                 reset MII to poweron state
       -r, --restart               restart autonegotiation
       -w, --watch                 monitor for link status changes
       -l, --log                   with -w, write events to syslog
       -A, --advertise=media,...   advertise only specified media
       -F, --force=media           force specified media technology
de>

你可能感兴趣的:(CentOS)