Configuration of the Linux network card rate and duplex mode(2012-09-06 14:39:57)
reproduced
Tags: technology network Interface Negotiation Network card tool it |
Category: Linux |
tools to change the speed of network interfaces and Negotiate methods
Miitool
and the
EthtoolThrough the Mii-tool and Ethtool tools to adjust the speed of the network card, duplex, etc., this can improve the efficiency of the network card;
Mii-tool
Tools for configuring network device negotiation Methods
Mii-tool
IntroductionMii-tool-view, manipulate Media-independent interface status (Mii-tool is the status of the network interface to view, manage media) Sometimes the NIC needs to be configured for negotiation, such as 10/100/ 1000M Nic Half-duplex, full-duplex, auto-negotiated configuration. But most network devices do not need us to modify the negotiation, because most of the network settings when access, the use of automatic negotiation to solve the problem of mutual communication. However, in some cases, we need to manually set the network card negotiation mode, Mii-tool is able to specify the network card negotiation. Note: When I use the Mii-tool tool to modify the negotiation mode, the prompt is wrong, because it is done in the virtual machine, but the network card in the virtual machine I look to support full-duplex mode, but the prompt error siocgmiiphy on ' eth0 ' failed:operation not Supported, the problem is not clear there, with Google, found a lot of people are such a mistake, also did not explain the reason, but most of the tips can use the Ethtool tool to modify, I tested the next, OK! Another way is to modify the/etc/modules.conf configuration file; #ethtool-s eth0 Autoneg off #ethtool-s eth0 Duplex full in/etc/modules.conf add content alias ETH 0 bcm5700 line_speed=100 full_duplex=1 options bcm5700 line_speed=100 full_duplex=1 re-up!
Mii-tool
change the method of network interface negotiation;[Email protected]]# mii-tool--help usage:mii-tool [-VVRRWL] [-A Media,... |-F media] [interface ...] -V,--version display version information-v,--verbose more verbose output Note: Displays information about the network interface;-R,--reset reset MII to PowerOn State Note: Reset Mii to ON,-R,--restart restart Autonegotiation Note: Restart auto-negotiation mode;-W,--watch Monitor for link status Changes Note: View the status change of the network interface connection;-L,--log with-w, write events to Syslog Note: Write event to System log;-A,--advertise=media,... advertis E only specified media note: Instruction-specific network interface;-F,--force=media force specified media technology Note: Change network interface negotiation mode; MEDIA:100BASET4, 1 00BASETX-FD, 100BASETX-HD, 10BASET-FD, 10BASET-HD, (to advertise both HD and FD) 100baseTx, 10baseT
to view the negotiation status of a network interface[Email protected]]# mii-tool-v eth0 eth0:negotiated 100basetx-fd, link OK product Info:vendor 00:00:00, model 0 Rev 0 Basic Mode:autonegotiation enabled Basic status:autonegotiation complete, link OK capabilities:100basetx-fd 100basetx-h D 10baset-fd 10baset-hd advertising:100basetx-fd 100basetx-hd 10baset-fd 10baset-hd link partner:100basetx-fd 100baseTx -HD 10BASET-FD 10BASET-HD Flow-control
Note:The above example, we can see is auto-negotiation. Pay attention to the Scarlet Letter part;
Change the network interface negotiation method;To change the negotiation method of network interface, we need to use the-f option, which can be followed by 100baset4, 100BASETX-FD, 100BASETX-HD, 10BASET-FD, 10BASET-HD and other parameters; Change the network interface eth0 to 1000mb/ s full duplex mode [[email protected]]# mii-tool-f 100BASETX-FD
[[email protected]] #mii-tool-v eth0 eth0:100 Mbit, full duplex, link OK product Info:vendor 00:00:00, model 0 Rev 0 Bas IC mode:100 Mbit, full duplex basic status:link OK capabilities:100basetx-fd 100basetx-hd 10baset-fd 10baset-hd adver TISING:100BASETX-FD 100BASETX-HD 10BASET-FD 10BASET-HD
You can also use
Ethtool
Tool Modification:[Email protected]]# ethtool-s eth0 Speed-duplex full
Ethtool
Tools about network negotiation feature introductionEthtool-display or change Ethernet card settings (Ethtool is the tool for displaying and changing network card settings); This tool is more complex and has many functions;
Ethtool
Display the network Port Settings feature[[Email protected]]# ethtool eth0 Settings for eth0:supported ports: [TP MII] Supported link modes:10baset/half 10 Baset/full 100baset/half 100baset/full Supports auto-negotiation:yes advertised link Modes:10bas Et/half 10baset/full 100baset/half 100baset/full advertised Auto-negotiation:no Note: Auto negotiate off speed:100 MB/s Note: Speed 100Mb duplex:full Note: Full duplex port:mii phyad:32 transceiver:internal Auto-negotiation:off Supports WAKE-ON:PUMBG wake-on:d Current Message level:0x00000007 (7) Link Detected:yes Note: eth0 has been activated;
Ethtool
set up the negotiation mode of network card; Ethtool-s devname\ [speed 10|100|1000]\ [Duplex half |full]\ [Port Tp|aui|bnc|mii|fibre]\ [Autoneg on|off]\ the network card Eth0 speed changed to 10mb/s, half duplex; [[email protected]]# ethtool-s eth1 speeds duplex half [[email protected]]# Ethtool et H1 Settings for eth1: Supported ports: [TP MII] Supported link modes: 10baset/half 10baset/full &NB Sp 100baset/half 100baset/full Supports auto-negotiation:yes Advertised link modes:10baset/half 10baset/full 100BASET/HALF 100 Baset/full Advertised Auto-negotiation:no speed:10mb/s Note: Speed 10m/s duplex:half Note: half duplex PORT:M II phyad:32 transceiver:internal Auto-negotiation:off Supports WAKE-ON:PUMBG WAKE-ON:D   Current Message level:0x00000007 (7) Link detected:no Note: eth1 not activated; Change the network card eth0 speed to 100mb/s, use full duplex; [[Emai l protected]]# ethtool-s eth1 Speed (duplex full) [[email protected]]# ethtool eth1 Settings for eth1: Supported ports: [TP MII] Supported link modes: 10baset/half 10baset/full &NB Sp 100baset/half 100baset/full Supports auto-negotiation:yes advertised Lin K modes:10baset/half 10baset/full 100baset/half 100baset/full &NB Sp Advertised Auto-negotiation:no speed:100mb/s Note: Speed 100m/s duplex:full Note: Full duplex port:mii phyad:32 transceiver:internal auto-negotiation:off Supports WAKE-ON:PUMBG wake-on: D Current message level:0x00000007 (7) Link detected:no Note: eth1 NIC is not activated;