ERPS(G.8032)网络协议帧
ERPS(Ethernet Ring Protection Switching)是一个用于以太网链路层破除环路的协议,通过阻塞指定的端口,达到消除环路的目的。ERPS是ITU-T发布的破环标准协议,标准编号为ITU-T G.8032/Y.1344。ERPS工作在数据链路层,Ethernet Type = 0x8902。ERPS协议的报文只有一种,即R-APS(Ring Auto Protection Switching)PDU报文,R-APS PDU报文包含ERPS环信息,在ERPS环上传递以实现各设备端口信息的互通。
一、R-APS PDU基本格式
+---------------------------------------------------------------+
1 |8|7|6|5|4|3|2|1|8|7|6|5|4|3|2|1|8|7|6|5|4|3|2|1|8|7|6|5|4|3|2|1|
+---------------------------------------------------------------+
| |
| DMAC+SMAC |
| |
13 +---------------------------------------------------------------+
| TPID | VLANID |
17 +---------------------------------------------------------------+
| ETYPE | MEL | Version | OpCode |
21 +---------------------------------------------------------------+
| Flags(0) | TLV Offset(32)| R-APS Specific Information |
| |
| |
| |
52 +---------------------------------------------------------------+
| | [optional TLV |
| |
| | End TLV(0) |
last+---------------------------------------------------------------+
二、R-APS PDU字段含义
字段 |
长度 |
说明 |
---|---|---|
DMAC |
6字节 |
目的MAC地址,该字段标识帧的接收者。 |
SMAC |
6字节 |
源MAC地址,该字段标识帧的发送者。 |
TPID |
2字节 |
固定值为0x8100。 |
VLANID |
2字节 |
VLAN标识。 |
ETYPE |
2字节 |
Ethernet类型标识。 |
MEL |
3比特 |
MEL(Maintenance Entity Group Level),标识维护实例等级。 |
Version |
5比特 |
|
OpCode |
8比特 |
固定值0x28,标识该PDU是R-APS PDU。 |
Flags |
8比特 |
固定值0x00,该字段在接收的过程中会被忽略。 |
TLV Offset |
8比特 |
固定值0x20。 |
R-APS Specific Information |
32x8比特 |
该字段携带R-APS环信息,是R-APS PDU的核心字段。对于该字段,ERPSv1版本和ERPSv2版本在某些子字段的定义上存在一定的差异。后面图2描述ERPSv1版本该字段具体包含的各子字段,后面图3描述ERPSv2版本该字段具体包含的各子字段。后面表2解释了ERPSv1版本和ERPSv2版本的各子字段的含义。 |
TLV(type-length-value) |
无限制 |
描述报文中需要加载的信息,由一个或多个TLV组成。 |
End TLV |
8比特 |
End TLV是固定值0x00,是R-APS PDU的最后一个TLV。 |
三、R-APS Specific Information格式
图2 ERPSv1版本R-APS Specific Information格式
+-------------------------------------------------------------------------------------------------------------------------------+
| 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 |
+-------------------------------------------------------------------------------------------------------------------------------+
| |
| DMAC+SMAC |
| |
+-------------------------------------------------------------------------------------------------------------------------------+
| TPID | VLANID |
+-------------------------------------------------------------------------------------------------------------------------------+
| ETYPE | Request/State | Reserved1 | Status |
+-------------------------------------------------------------------------------------------------------------------------------+
| Node ID(6 octes) |
| | Reserved 2(24 octets) |
|-------------------------------------------------------------------------------------------------------------------------------+
| |
+-------------------------------------------------------------------------------------------------------------------------------+
图三 ERPSv2版本R-APS Specific Information格式
+-------------------------------------------------------------------------------------------------------------------------------+
| 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 |
+-------------------------------------------------------------------------------------------------------------------------------+
| |
| DMAC+SMAC |
| |
+-------------------------------------------------------------------------------------------------------------------------------+
| TPID | VLANID |
+-------------------------------------------------------------------------------------------------------------------------------+
| ETYPE | Request/State | Sub-code | Status |
+-------------------------------------------------------------------------------------------------------------------------------+
| Node ID(6 octes) |
| | Reserved 2(24 octets) |
|-------------------------------------------------------------------------------------------------------------------------------+
| |
+-------------------------------------------------------------------------------------------------------------------------------+
表2 R-APS Specific Information各子字段含义
字段 |
长度 |
说明 |
---|---|---|
Request/State |
4比特 |
标识该信息是请求信息或当前状态信息:
|
Reserved 1 |
4比特 |
对于ERPSv1,该字段是“Reserved 1”,表示保留字段,留作以后报文应答或是保护类型标识。 对于ERPSv2,该字段是“Sub-code”:
|
Sub-code |
||
Status |
8比特 |
标识状态信息:
|
Node ID |
6x8比特 |
标识R-APS环节点的MAC地址,该字段属于提示信息,不影响R-APS环的保护切换操作。 |
Reserved 2 |
24x8比特 |
保留字段,在发送过程中,此字段全置为0,且在接收的过程中会被忽略。 |
四、ERPS(G.8032)报文示例
Frame 1: 68 bytes on wire (544 bits), 68 bytes captured (544 bits)
Encapsulation type: Ethernet (1)
Arrival Time: Jan 1, 1970 08:00:00.227743000
[Time shift for this packet: 0.000000000 seconds]
Epoch Time: 0.227743000 seconds
[Time delta from previous captured frame: 0.000000000 seconds]
[Time delta from previous displayed frame: 0.000000000 seconds]
[Time since reference or first frame: 0.000000000 seconds]
Frame Number: 1
Frame Length: 68 bytes (544 bits)
Capture Length: 68 bytes (544 bits)
[Frame is marked: False]
[Frame is ignored: False]
[Protocols in frame: eth:ethertype:vlan:ethertype:cfm]
[Coloring Rule Name: Broadcast]
[Coloring Rule String: eth[0] & 1]
Ethernet II, Src: BbnWasIn_11:f8:72 (00:00:02:11:f8:72), Dst: Itu-T_00:00:01 (01:19:a7:00:00:01)
Destination: Itu-T_00:00:01 (01:19:a7:00:00:01)
Address: Itu-T_00:00:01 (01:19:a7:00:00:01)
.... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
.... ...1 .... .... .... .... = IG bit: Group address (multicast/broadcast)
Source: BbnWasIn_11:f8:72 (00:00:02:11:f8:72)
Address: BbnWasIn_11:f8:72 (00:00:02:11:f8:72)
.... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
.... ...0 .... .... .... .... = IG bit: Individual address (unicast)
Type: 802.1Q Virtual LAN (0x8100)
802.1Q Virtual LAN, PRI: 7, DEI: 0, ID: 1000
111. .... .... .... = Priority: Network Control (7)
...0 .... .... .... = DEI: Ineligible
.... 0011 1110 1000 = ID: 1000
Type: IEEE 802.1ag Connectivity Fault Management (CFM) protocol (0x8902)
CFM EOAM 802.1ag/ITU Protocol, Type Ring-Automatic Protection Switching (R-APS)
111. .... = CFM MD Level: 7
...0 0000 = CFM Version: 0
CFM OpCode: Ring-Automatic Protection Switching (R-APS) (40)
CFM R-APS PDU
Flags: 0x00
Reserved: 0
First TLV Offset: 32
0000 .... = Request/State: No Request (0x0)
R-APS Flags: 0x00
0... .... = RPL Blocked: Not Blocked
.0.. .... = Do Not Flush: May Flush DB
R-APS Node ID: BbnWasIn_11:f8:72 (00:00:02:11:f8:72)
R-APS Reserved: 000000000000000000000000000000000000000000000000
CFM TLVs
TLV: End TLV (t=0,l=0)
TLV Type: End TLV (0)
五、ERPS(G.8032)报文参考标准
标准 |
描述 |
---|---|
ITU-T G.8032/Y.1344 |
Ethernet ring protection switching |
发表评论