15.4 Link Speed and Auto-Negotiation

     

15.4 Link Speed and Auto-Negotiation

If we have a Fast Ethernet (10/100 Mbits per second) interface card, we have the option of specifying the speed and mode (full or half duplex) of the connection. The switch we are using will determine the speed and mode that is possible. If we refer to the example we used previously, the configuration file was /etc/rc.config.d/hpbtlanconf :

 

 root@hpeos004[]  more /etc/rc.config.d/hpbtlanconf  ##################################################################### # @(#)B.11.11_LR hpbtlanconf $Revision: 1.1.119.1 $ $Date: 97/04/10 15:49:13 $ # hpbase100conf: contains configuration values for HP PCI/HSC 100BASE-T # interfaces # # HP_BTLAN_INTERFACE_NAME   Name of interface (lan0, lan1...) # HP_BTLAN_STATION_ADDRESS  Station address of interface # HP_BTLAN_SPEED            Speed and duplex mode #                           Can be one of : 10HD, 10FD, 100HD, 100FD and #                           AUTO_ON. # # The interface name, major number, card instance and ppa may be # obtained from the lanscan(1m) command. # # The station address and duplex are set through the lanadmin(1m) command. # ##################################################################### HP_BTLAN_INTERFACE_NAME[0]="lan1" HP_BTLAN_STATION_ADDRESS[0]="0x080009bbbbbb" HP_BTLAN_SPEED[0]= ########################################################################### #  The HP_BTLAN_INIT_ARGS are reserved by HP. They are NOT user changable. ########################################################################### HP_BTLAN_INIT_ARGS="HP_BTLAN_STATION_ADDRESS HP_BTLAN_SPEED" # End of hpbtlanconf configuration file root@hpeos004[] 

As we can see, the HP_BTLAN_SPEED configuration parameter has been left at the default value, which is AUTO_ON . This is the option to specify auto-negotiation. If we want to specify a particular speed and mode, we have two jobs to do:

  1. Configure the speed and mode in the appropriate HP-UX configuration file.

  2. Set the speed and mode on the individual switch port.

We can check the current speed and mode of an interface with the lanadmin command:

 

 root@hpeos004[]  lanadmin -s 1  Speed                           = 10000000 root@hpeos004[] 

This is simply the speed. To view other driver settings, we use the “x option:

 

 root@hpeos004[]  lanadmin -x 1  Current Config                   = 10 Half-Duplex AUTONEG root@hpeos004[] 

From here, we can see that the speed and mode have auto-negotiated to 10 Mbits/second half duplex. This may be due to the fact that the switch port can only support this speed and mode. It may also be due to a disparity in the configuration of either the LAN interface or the switch port.

15.4.1 The truth about auto-negotiation

Auto-negotiation between Fast Ethernet devices is defined in the ANSI/IEEE 802.3u standard. It provides a mechanism known as Parallel Detection for multi-speed devices to configure appropriate settings. I won't bore you with the details. If you are interested, there is a good article on this that you can find on the Web (http://docs.hp.com/hpux/onlinedocs/netom/ autonegotiation .pdf). I have also included it in Appendix D. The upshot is this: Either use a fixed, manual configuration, or use auto-negotiation at both ends of the link. When two multi-speed devices are using auto-negotiation, they can auto-negotiate speed, mode, and standard settings for the given connection. If one port is auto-negotiating while the other is using a fixed configuration, the mode setting will go undetected and could cause serious performance problems. If you want to get the most out of your LAN interface and switch port, you will have to perform some level of manual configuration. Let's assume that we have a LAN interface card and a switch port both capable of 100 MB/s full duplex. Table 15-3 describes the resulting speed and mode settings for various combinations of configuration settings.

Table 15-3. When Auto-Negotiation Works

Server LAN interface

Switch Port setting

Result

AUTO

AUTO

100FD

10HD

10HD

10HD

10FD

10FD

10FD

100HD

100HD

100HD

100FD

100FD

100FD

AUTO

10HD

10HD

AUTO

10FD

10HD [1]

AUTO

100HD

100HD

AUTO

100FD

100HD [1]


[1] In this case, the LAN interface card does not receive FLPs (fast link pulses ) from the switch because the switch port is set to a specific speed/duplex setting and is not auto-negotiating. Since the LAN interface card is auto-negotiating, it will parallel detect the 10/100Base-T signals from the switch and set the speed correctly. However, parallel detection cannot detect the duplex mode, so the duplex mode will default to half duplex. The resulting link configuration will be able to send and receive frames, but performance will be poor because the full duplex MAC disables the carrier sense and collision-detect circuitry. So when it has frames to transmit, it will transmit irrespective of what the half duplex MAC is doing. This will cause collisions with the full duplex MAC not backing off. At low traffic levels, the administrator may not detect any performance issues. At high traffic levels, the device configured for full duplex mode will be experiencing a high number of CRC and alignment errors because its collision detect circuitry has been disabled. This is commonly reported as a "bad cable" problem, which is somewhat confusing. The degradation in performance can be considerable, even to the point where you start to wonder why you invested in a Fast Ethernet card in the first place.

By the time we got around to Gigabit Ethernet, the 802.3z standard that controls this link technology realized this problem and does not allow the link to come up when we have one side of the link auto-negotiating while the other is using a fixed configuration.

Remember: Either auto-negotiate or set a fixed manual configuration at both ends of the link.

These are the entries I would add to the startup configuration file:

 

 HP_BTLAN_INTERFACE_NAME[0]=  "lan1"  HP_BTLAN_STATION_ADDRESS[0]=  "0x080009bbbbbb"  HP_BTLAN_SPEED[0]=  100FD  

Here are the associated commands to set these values (in this example, we have included changing the MAC address by specifying the HP_BTLAN_STATION_ADDRESS[0]="0x080009bbbbbb" parameter):

 

 root@hpeos004[]  lanadmin -A 0x080009bbbbbb 1  Old Station Address                 = 0x00306e46996c New Station Address                 = 0x080009bbbbbb root@hpeos004[]  lanadmin -X 100FD 1  WARNING: an incorrect setting could cause serious network problems! Driver is attempting to set the new speed Reset will take approximately 11 seconds root@hpeos004[] 



HP-UX CSE(c) Official Study Guide and Desk Reference
HP-UX CSE(c) Official Study Guide and Desk Reference
ISBN: N/A
EAN: N/A
Year: 2006
Pages: 434

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net