lunes, 18 de mayo de 2009

Autonegociación tarjetas de red

sitio en : http://sites.google.com/site/jmpproyecto/hardware/ethernet-red/protocolos-cables-y-otras-cosas
http://en.wikipedia.org/wiki/NWay
http://www.iol.unh.edu/services/testing/ge/training/1000BASE-T/ANEG_brief.php

Que es la Auto-Negotiation?
Auto-Negociación es el proceso desarrollado por el IEEE para permitir que dispositivos con diferentes tecnologías se comuniquen información entre si para conseguir inter-operar entre ellos.

La Auto-Negotiación está definida en la sección 28 of the IEEE 802.3 standard. The technologies currently supported by auto-negotiation are: 10BASE-T Half Duplex, 10BASE-T Full Duplex, 100BASE-TX Half Duplex, 100BASE-TX Full Duplex, 100BASE-T4, 100BASE-T2 Half Duplex, 100BASE-T2 Full Duplex, 1000BASE-T Half Duplex, 1000BASE-T Full Duplex, and 10GBASE-T.

FLP Bursts

The basis for all of Auto-Negotiation's functionality is the Fast Link Pulse (FLP) burst. An FLP burst is simply a sequence of 10BASE-T Normal Link Pulses (NLPs, also known as Link Test Pulses in 10Base-T world) that come together to form a message, or "word." Each FLP is composed of 33 pulse positions, with the 17 odd numbered positions corresponding to clock pulses and the 16 even numbered positions corresponding to data pulses. The time between pulse positions is 62.5µs +/- 7µs, and therefore 125µs +/- 14µs between each clock pulse.
All clock positions are required to contain a link pulse. However, data positions are not. If there is a link pulse present in a data position, it is representative of a logic one, whereas the lack of a link pulse is representative of a logic zero.

The amount of time between FLP bursts is 16ms +/- 8ms (8ms to 8.5ms for 10GBASE-T exchange), which corresponds to the time between consecutive link test pulses produced by a 10BASE-T device. This was done to allow a fixed speed 10BASE-T device to see FLP bursts and remain in the LINK TEST PASS state. For 10GBASE-T it was shortened to 8ms to 8.5ms in an effort to speed up the exchange of data.

Link Code Words (Base Pages)

The 16 data positions in an FLP burst come together to form one 16 bit word. The most important message sent in auto-negotiation is a device's Link Code Word (or Base Page). The breakdown of the bit positions in the link code word is shown in Figure 1:


Figure 1: Link Code Word

Selector Field: The first five bits of the link code word comprise the Selector Field. The Selector Field contains one of 32 possible combinations, only 2 of which are allowed to be sent, which follow:

1 0 0 0 0 = IEEE 802.3
0 1 0 0 0 = IEEE 802.9

The other 30 combinations are reserved for later use by the IEEE and should not be transmitted.

Technology Ability Field: The next 7 bits make up the Technology Ability Field. This is where a device advertises its abilities. The seven bits in this field represent the following technologies:

Bit Technology
A0 10BASE-T
A1 10BASE-T Full Duplex
A2 100BASE-TX
A3 100BASE-TX Full Duplex
A4 100BASE-T4
A5 PAUSE operation for full duplex links
A6 Asymmetric PAUSE operation for full duplex Links
A logic one in any of these positions symbolizes that the device holds that technology. The device should advertise only the technologies that it supports.

Extended Next Page: This bit is set when a station wishes to participate in an Extended Next Page Exchange. This function will be discussed in further detail later

Remote Fault: This bit can be set to inform a station that a remote fault has occurred.

Acknowledge: This bit is set to confirm the receipt of at least 3 complete, consecutive and consistent FLP bursts from a station. This functionality will be discussed in detail later.

Next Page: This bit is set when a station wishes to participate in a Next Page exchange, a concept to be discussed later.

Figure 2: Sample Link Code Word

Priority Resolution Function

Once a device is aware of its link partner's abilities, it must decide what type of link to establish. In order to ensure that all devices will choose the same Highest Common Denominator (HCD) technology, they must implement the Priority Resolution Function. This function simply ranks the possible technologies and requires a device to choose the highest one supported. The ranking is as follows:
10GBASE-T Full Duplex
1000BASE-T Full Duplex
1000BASE-T
100BASE-T2 Full Duplex
100BASE-TX Full Duplex
100BASE-T2
100BASE-T4
100BASE-TX
10BASE-T Full Duplex
10BASE-T

The Process

Now that you have all the pieces, it's time to assemble the puzzle. Here is the process by which a successful negotiation should take place:
The two link partners transmit their FLP bursts containing their link code words without the Acknowledge bit set.
The stations identify one another as auto-negotiation able within 6 to 17 (inclusive) pulses of the first received FLP burst.
Following auto-negotiation able identification, the station waits for the reception of at least 3 complete, consecutive and consistent FLP bursts (ignoring the acknowledge bit of the FLPs), the stations enter the Acknowledge Detect state, and begin transmitting FLP bursts containing their link code word with the Acknowledge bit set.
After reception of 3 more complete, consecutive and consistent FLP bursts containing a set Acknowledge bit, the stations enter the Complete Acknowledge state, and transmit 6 to 8 (inclusive) more FLP bursts containing their link code words with the Acknowledge bit set.
After transmitting the 6 to 8 (inclusive) more FLP bursts the stations will participate in Next Page or Extended Next Page exchange, if either is selected.
Upon completion of the optional Next Page or Extended Next Page exchange, the stations should resolve a HCD technology and negotiate to that link, if supported. If no common technologies are shared, no link is established.

Parallel Detection Function

The Parallel Detection Function is an auto-negotiating device's means to establish links with non-negotiating, fixed speed devices. If an auto-negotiating device receives either 10BASE-T or T4 Link Test Pulses or the idle stream of a TX device, it should do one of two things: either enable that PMA if it supports it, or refuse to establish a link. No FLPs necessary. A device can never parallel detect to a full duplex link, however. Also because 1000BASE-T, 100BASE-T2, and 10GBASE-T have a Master/Slave configuration, parallel detection of these abilities are not allowed.

Next Page Function

An optional additional feature to the auto-negotiation capability is the Next Page function. Next Pages are a means by which devices can transmit additional information beyond their link code words. Some common uses for a device to use Next Page exchanges are to advertise the abilities of 1000BASE-T, and 100ASE-T2. A Next Page exchange occurs immediately after the Base Page Exchange. If both stations advertise the Next Page ability, then they are required to transmit at least one Next Page each. There are four types of Next Pages: Message pages, Unformatted pages, extended Message Pages, and extended Unformatted Pages. The encoding for the Message Page and Unformatted Message page is shown in Figure 3 and Figure 4. The encoding and description of the extended Message Page and extended Unformatted Message Page will be defined later on.


Figure 3: Message Page Encoding



Figure 4: Unformatted Page Encoding

Message Code Field: This is an 11-bit wide field that can contain one of 2048 possible Message Codes. However, all but 9 are reserved for future use by the IEEE which can be seen in Table 28C-1.



Unformatted Code Field: This is an 11-bit wide field whose contents vary. Unformatted Pages are preceded by a Message Page that defines what information is to be carried in their code field.

Toggle (T): This bit simply "toggles" between logic one and zero in consecutive Next Pages. It's purpose is to give a station assurance that it is receiving Next Pages in the proper order and has not missed any. The initial value of the Toggle bit is the opposite of bit 11 in the station's Link Code Word.

Acknowledge 2 (Ack2): This bit simply tells a station's link partner whether or not it is able to comply with a message. This bit is set to logic one if a station can comply with a message or zero if it can't. It should be noted that this bit is rarely, if ever used.

Message Page (MP): This bit is used to differentiate between the two types of Next Pages: a logic zero indicates that it is an Unformatted Page, where a logic one indicates a Message Page.

Acknowledge (Ack): This bit is set to indicate that a device has recieved its Link Partner's Link Codeword.

Next Page (NP): This bit simply indicates whether or not there are more Next Pages to come. When set to logic one, it indicates that additional pages will follow, whereas a logic zero indicates that there are no remaining pages.

The Next Page exchange concludes once both stations have set their Next Page bits to zero.

A typical Next Page Exchange to establish a 1000BASE-T Full or Half duplex link can be seen in figure 5.




Extended Next Page Function

Another optional additional feature to the auto-negotiation capability is the Extended Next Page function. Extended Next Pages are an extension of the Next Page fuction which was described earlier. When both devices advertise Next Page and Extended Next Page abilities they will then use Extended Message Pages and Extended Unformatted Message Pages to transmit additional information beyond their link code words. Extended Next Pages are similar to a regular Next Page except that they are 48-bit pages and not 16. The encoding for the Extended Message Page and Extended Unformatted Message Page is shown in Figures 28-13 and 28-14.




Message Code Field: This is an 11-bit wide field that can contain one of 2048 possible Message Codes which we have defined earlier in the Next Page Exchange process and can be seen in table 28C-1.

Toggle (T): This bit simply "toggles" between logic one and zero in consecutive Next Pages. It's purpose is to give a station assurance that it is receiving Next Pages in the proper order and has not missed any. The initial value of the Toggle bit is the opposite of bit 11 in the station's Link Code Word.

Acknowledge 2 (Ack2): This bit simply tells a station's link partner whether or not it is able to comply with a message. This bit is set to logic one if a station can comply with a message or zero if it can't. It should be noted that this bit is rarely, if ever used.

Message Page (MP): This bit is used to differentiate between the two types of Next Pages: a logic zero indicates that it is an Unformatted Page, where a logic one indicates a Message Page.

Acknowledge (Ack): This bit is set to indicate that a device has recieved its Link Partner's Link Codeword.

Next Page (NP): This bit simply indicates whether or not there are more Next Pages to come. When set to logic one, it indicates that additional pages will follow, whereas a logic zero indicates that there are no remaining pages.

Extended Unformatted Code Field: This is a 32-bit or 43-bit wide field, which may contain arbitrary value depending on the preceding Message Code. This field is 32-bits wide in an Extended Message Page and 43-bits wide in an Extended Unformatted Page.

The Extended Next Page exchange concludes once both stations have transmitted all the information that they wish and both have begun to transmit Null Message Codes.

A typical Extended Next Page Exchange to establish a 10GBase-T link can be seen in figure 6. (This Figure does not illustrate that the Extended Next Page is 48 bits long)

No hay comentarios: