现在的位置: 首页 > 综合 > 正文

AutoNegotiation 端口协商

2018年06月08日 ⁄ 综合 ⁄ 共 4759字 ⁄ 字号 评论关闭

 

一, 概念和原理

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

 

抱歉!评论已关闭.