AutoNegotiation 端口協商

 

一, 概念和原理

Autonegotiation,自協商,爲連接在線路兩端的端口的工作方式,使數據傳輸在最高效的線路上,包括協商速率和雙工等信息.

 

1.4.158 link pulse: Communication mechanism used in 10BASE-T and 100BASE-T networks to indicate

link status and (in Auto-Negotiation-equipped devices) to communicate information about abilities and

negotiate communication methods. 10BASE-T uses Normal Link Pulses (NLPs), which indicate link status

only. 10BASE-T and 100BASE-T nodes equipped with Auto-Negotiation exchange information using a Fast

Link Pulse (FLP) mechanism that is compatible with NLP. (See IEEE 802.3 Clauses 14 and 28.)

 

NLP: 

並非爲AutoNegotiation設計,鏈路完整性檢查脈衝,在鏈路空閒時(無數據發送或者接收)定期發送NLP, 若在一定時間內未收到NLP則將認爲鏈路故障,將端口狀態設置爲Down,並再連續收到2個NLP後則認爲鏈路恢復,將端口配置爲Up;

NLP中不含任何數據信息,即不包括任何Rate和Deplex信息;

10BASE-T Without AutoNegotiation sends NLP;

 

 

#These pulses are sent by a device when it is not sending or receiving any data. They are unipolar positive-only electrical pulses of a duration of 100 ns, generated at intervals of 16 ms (with a tolerance of 8 ms). These pulses were called link integrity test (LIT) pulses in the 10BASE-T terminology, and are referred to as normal link pulses (NLP) in the autonegotiation specification.

 

FLP: 

 Fast Link Pulse , 快速link脈衝;

 FLP中包含Rate和Duplex以及自協商標誌位;

 10BASE-T/100BASE-T With AutoNegotiation sends FLP;

 100BASE-T Without AutoNegotiation sends ? 

 

#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

 

 

 

 

二, 行爲

 

當開啓AN的100BASE-T收到NLP時,會停止發送FLP並轉而發送NLP; 

#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.

 

例子:

10BASE-T Full Forced ------  100BASE-T AutoNegotiation 

1, 分別發送NLP和FLP, 100BASE-T With AN收到NLP後,轉發NLP;

2, 10BASE-T Full Forced 收到NLP後,鏈路Linkup, 工作在強制的10M Full 模式下;

3, 100BASE-T 通過NLP感受到對端速率爲10M,但是無法感知對方的Deplex Mode(There is no different of NLP single between 10BASE-T Forced Full and 10BASE-T Forced Half.),所以將自己設定爲10M Half 模式下; 

4, 最終結果 10MFull-- 10MHalf

 

100BASE-T FULL Forced ---- 100BASE-T AutoNegotiation 

1, 

4, 最終結果 100MFull-- 100MHalf

 

 

三, 參考資料

IEEE 802.3 Clauses  28.

Wikipedia http://en.wikipedia.org/wiki/Autonegotiation

IOP http://www.iol.unh.edu/services/testing/ge/training/1000BASE-T/ANEG_brief.php

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章