Chinaunix首页 | 论坛 | 博客
  • 博客访问: 504171
  • 博文数量: 118
  • 博客积分: 2575
  • 博客等级: 大尉
  • 技术积分: 1263
  • 用 户 组: 普通用户
  • 注册时间: 2009-09-27 09:37
文章分类

全部博文(118)

文章存档

2017年(11)

2016年(8)

2015年(1)

2014年(9)

2013年(7)

2012年(38)

2011年(14)

2010年(18)

2009年(12)

分类: 系统运维

2010-11-16 10:28:43

在看lacp的协议时,对于synchronization一直没有很好的理解,决定好好整理一下思路。

关于自身的actor.synchroniziation的设置及其意义。首先看定义(43.4.2.2, m):
Synchronization is encoded in bit 3. If TRUE (encoded as a 1), the System considers this link to be IN_SYNC; i.e., it has been allocated to the correct Link Aggregation Group, the group has been associated with a compatible Aggregator, and the identity of the Link Aggregation Group is consistent with the System ID and operational Key information transmitted. If FALSE (encoded as a 0), then this link is currently OUT_OF_SYNC; i.e., it is not in the right Aggregation.

看起来比较明了,即link已经被分配到一个LAG,LAG已经与aggregator关联,并且LAG与发送的sys-id及oper-key信息一致。

关于partner-oper-port-state.synchronziation的设置在recordPDU中定义,如下:

Partner_Oper_Port_State.Synchronization is set to TRUE if all of these parameters match, Actor_State.Synchronization in the received PDU is set to TRUE, and LACP will actively maintain the link in the aggregation. 

Partner_Oper_Port_State.Synchronization is also set to TRUE if the value of Actor_State.Aggregation in the received PDU is set to FALSE (i.e., indicates an Individual link), Actor_State.Synchronization in the received PDU is set to TRUE, and LACP will actively maintain the link.
看这意思说的,就是,如果对方端口,首先发生自己认为自己已经处于synchronization状态,并且对方对自己的了解也是正确的(matched)的。

终上所述,自己的synchronization是一种声明,表示自己自己已经同步了,而对方的synchronization则更是一种判断,表示对方是否是真的处于synchronization状态(对方所知道的内容是正确的)。在receive machine(43.4.13)中有这样一段文字描述default状态下的synchronization值:
Since all operational parameters are now set to locally administered values, there can be no disagreement as to the Link Aggregation Group, so the Partner_Oper_Port_State.Synchronization variable is set to TRUE.
也就是说使用default值(partner admin)时,对方(partner)的内容是我们自己写的,这种情况可以认为partner已经处于synchronization态了。
但是这样赋值是否有意义呢?至少我看到有些系统的代码,就没有按照协议来设置synchronziation的值,而且我觉得协议在这一块,是有些不一致的。既然在default状态下,recordDefault会导致synchronization被置,那么,其它情况下使用recordDefault也一样要置位。

自己的syncrhonization状态发送到对端是为了让对方判断自己是否同步。那将自己认为对端的synchronization状态发送回去起到什么作用呢?从文档上来看,只有在update_NTT时用来设置NTT,含义为如果你认为我不处于synchronization状态,那么我就要赶紧更新信息。

在mux的状态机中,当接口进入attached状态时,acotr.synchr<=true,表明了自己已经in-sync。而partner.sync为true则会使状态机从attached状态进入到collecting-distributing或者collecting状态。设置parnter.sync是在recordPDU中实现的。

本端系统在mux使用partner.sync时,决定是否使能collecting。那说明default状态下置synchronizaiton会影响到mux状态机,但是有一个条件:LAG-ID信息不能变。在LAG-ID信息不变的情况下,清除synchronization会导致mux状态机最终回退到attached状态,而不是再enable collecting。
阅读(5073) | 评论(0) | 转发(0) |
0

上一篇:光棍节的故事

下一篇:可颂面包-croissant

给主人留下些什么吧!~~