Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

PTP / ESMC / CFM / R-APS / 802.3ah OAM (P2)

Status: draft

PTP (IEEE 1588-2008)、SyncE ESMC (ITU-T G.8264)、Ethernet CFM / OAM (IEEE 802.1Q 21 章 = 802.1ag、ITU-T Y.1731) と ERPS の R-APS メッセージ (ITU-T G.8032)、EFM OAM (IEEE 802.3 57 章 = 802.3ah) の補足 (M7)。定義は crates/wpg-protocols/src/{ptp,esmc,cfm,efm_oam}.rs、サンプルは templates/protocols/timing/ と templates/protocols/oam/ にあります。

スタックとサンプル

ethernet2 / ptp_*                         # EtherType 0x88f7 (IEEE 1588 附属書 F)
ethernet2 / ipv4|ipv6 / udp / ptp_*       # UDP 319 (イベントメッセージ)、320 (一般メッセージ)
ethernet2 / esmc                          # Slow Protocols 0x8809、サブタイプ 0x0a
ethernet2 [/ dot1q] / cfm_*               # EtherType 0x8902。802.1Q / 802.1ad タグの内側も可
ethernet2 / efm_oam_*                     # Slow Protocols 0x8809、サブタイプ 0x03

Slow Protocols の EtherType 0x8809 は先頭オクテット (サブタイプ) で振り分けます: 1 LACP、2 Marker、3 OAM、0x0a ESMC (l2control::slow_protocols_peek。その他のサブタイプは raw)。Marker PDU は lacp ではなく marker としてデコードされるようになりました。UDP の宛先ポートは自動ではありません。Sync / Delay_Req / Pdelay_Req / Pdelay_Resp は 319、その他は 320 を指定します。

サンプル内容
ptp-sync-two-step-l2Ethernet 上の 2 ステップ Sync (毎秒 8 回、シーケンス ID を加算)
ptp-follow-up-l2正確な送信時刻と補正値付きの Follow_Up
ptp-pdelay-req-l2 / ptp-pdelay-resp-l2 / ptp-pdelay-resp-follow-up-l201:80:c2:00:00:0e 宛ての IEEE 802.1AS (majorSdoId 1) ピア遅延測定
ptp-delay-req-udp / ptp-delay-resp-udpUDP/IPv4 (224.0.1.129) 上の遅延要求 / 応答
ptp-announce-udpGPS 同期のグランドマスタ (クロッククラス 6) の Announce
ptp-signaling-unicastユニキャストネゴシエーション: Announce と Sync の Request Unicast Transmission TLV
ptp-management-getDEFAULT_DATA_SET の Management GET
ptp-generic汎用レイアウトで書いた Sync
esmc-ql-prc / esmc-event-dnuESMC 情報 PDU (QL-PRC、拡張 QL TLV) / イベント PDU (QL-DNU)
cfm-ccmVLAN 100 上の CCM (MD レベル 5、MEP 10、ICC 形式 MEG ID、Port / Interface Status TLV)
cfm-lbm / cfm-lbrData TLV 付きのループバックメッセージ / 応答
cfm-ltm / cfm-ltrEgress Identifier / Reply Ingress TLV 付きのリンクトレースメッセージ / 応答
cfm-generic汎用レイアウトの G.8031 Linear APS (OpCode 39)
y1731-ais / y1731-lck / y1731-csfAIS、LCK、CSF 信号
y1731-tstTest TLV 付きのテスト信号
y1731-lmm / y1731-lmr / y1731-slm / y1731-slr / y1731-1slロス測定 (フレームカウンタ、合成ロス)
y1731-dmm / y1731-dmr / y1731-1dm遅延測定 (IEEE 1588 形式のタイムスタンプ)
erps-raps-nr-rb / erps-raps-sfRPL オーナーの R-APS(NR, RB) / 障害時の R-APS(SF)
efm-oam-information / efm-oam-genericInformation OAMPDU (Local / Remote Information TLV)
efm-oam-eventEvent Notification (Errored Frame と Errored Symbol Period イベント)
efm-oam-variable-request / efm-oam-variable-response変数の取得
efm-oam-loopbackLoopback Control (リモートループバックの有効化)
efm-oam-organization-specificOrganization Specific OAMPDU

汎用レイヤと専用メッセージ

PTP、CFM、802.3ah OAM は IS-IS と同じ方式です: メッセージタイプ (PTP)、OpCode (CFM)、コード (OAM) ごとに 1 プロトコルと、汎用レイヤ (ptp、cfm、efm_oam: 共通ヘッダと残りを data オクテット列で) があります。パーサーはまず汎用レイヤとしてデコードし、message_type / opcode / code から専用レイヤに読み直します。専用定義のない値 (CFM の Linear APS、MCC、EXM / VSM など) は汎用のままです。合成時は専用プロトコルを置くだけで EtherType / サブタイプが決まります。

プロトコルmessage_type本体
ptp_sync / ptp_delay_req0 / 1origin_timestamp_{seconds,nanoseconds}
ptp_pdelay_req2送信時刻、予約 10 オクテット
ptp_pdelay_resp3request_receipt_timestamp_*、requesting_port_{clock_identity,port_number}
ptp_follow_up8precise_origin_timestamp_*
ptp_delay_resp9receive_timestamp_*、requesting_port_*
ptp_pdelay_resp_follow_up10response_origin_timestamp_*、requesting_port_*
ptp_announce11送信時刻、current_utc_offset、grandmaster_priority1/2、grandmaster_clock_{class,accuracy}、grandmaster_offset_scaled_log_variance、grandmaster_identity、steps_removed、time_source
ptp_signaling12target_port_*
ptp_management13target_port_*、starting_boundary_hops、boundary_hops、action

PTP

34 オクテットの共通ヘッダは major_sdo_id (transportSpecific)、message_type、minor_version、version、message_length (自動)、domain_number、minor_sdo_id、flags (16 ビット: two_step はビット 9、unicast はビット 10、ptp_timescale はビット 3 など)、correction_field (符号付き、ナノ秒 × 2^16)、message_type_specific、送信元ポート ID (clock_identity、port_number)、sequence_id、control_field、log_message_interval (符号付き) です。control_field と log_message_interval の既定値はメッセージに合わせてあります (該当しない場合は 0x7f)。

各メッセージの最後は tlvs (16 ビット型、値の 16 ビット長、自動) です。TLV は message_length で終わるため、短い Ethernet フレームのゼロ詰めを TLV と誤読しません。

- protocol: ptp_signaling
  fields:
    flags: 0x0400 # unicast
    tlvs:
      - request_unicast_transmission: { message_type: announce, log_inter_message_period: 1, duration_field: 300 }
      - grant_unicast_transmission: { message_type: sync, log_inter_message_period: -4, duration_field: 300, renewal_invited: 1 }
タイプTLV (name)値のフィールド
0x0001managementmanagement_id、data_field (オクテット列)
0x0002management_error_statusmanagement_error_id、management_id、reserved、display_data
0x0003organization_extensionorganization_id、organization_sub_type、data_field
0x0004 / 0x0005request_unicast_transmission / grant_unicast_transmissionmessage_type、log_inter_message_period、duration_field (grant は renewal_invited も)
0x0006 / 0x0007cancel_unicast_transmission / acknowledge_cancel_unicast_transmissionmessage_type
0x0008path_tracepath_sequence (クロック ID のリスト)
0x0009alternate_time_offset_indicatorkey_field、current_offset、jump_seconds、time_of_next_jump、display_name (長さは自動)

ESMC

esmc は OSSP ヘッダ (subtype 0x0a、itu_oui 00-19-a7、itu_subtype 1)、version (1)、event_flag と TLV (8 ビット型、3 オクテットのヘッダを含む 16 ビット長、自動) です: ql (ssm_code: prc、ssu_a、ssu_b、sec、dnu とオプション 2 のコード)、extended_ql (enhanced_ssm_code、synce_clock_identity、flags (EEC / eEEC 混在、部分チェーン)、cascaded_eeecs、cascaded_eecs)。TLV の後の詰め物は 1 つの raw 項目としてデコードされます。

CFM / Y.1731 / R-APS

共通ヘッダは md_level、version、opcode、フラグ、first_tlv_offset です。フラグは OpCode ごとに分けてあります (CCM: rdi、period、LTM / LTR: use_fdb_only、fwd_yes、terminal_mep、AIS / LCK / CSF: period、CSF の type、その他: flags)。first_tlv_offset は OpCode ごとに一定です (変えると警告)。TLV は End TLV (end、タイプ 0) で終わり、その後の Ethernet の詰め物は End TLV の繰り返しではなく詰め物として扱います (wpg-core の Length::UntilTlv)。

OpCodeプロトコルフィールド
1cfm_ccmsequence_number、mep_id、maid (48 オクテット)、tx_fcf、rx_fcb、tx_fcb
2 / 3cfm_lbr / cfm_lbmtransaction_id
4cfm_ltrtransaction_id、reply_ttl、relay_action
5cfm_ltmtransaction_id、ttl、original_mac、target_mac
33 / 35cfm_ais / cfm_lck(周期のみ)
37cfm_tstsequence_number
40cfm_rapsrequest_state、sub_code、rb、dnf、bpr、node_id
42 / 43cfm_lmr / cfm_lmmtx_fcf、rx_fcf、tx_fcb
45cfm_1dmtx_timestamp_f_*、rx_timestamp_f_*
46 / 47cfm_dmr / cfm_dmmtx_timestamp_f_*、rx_timestamp_f_*、tx_timestamp_b_*、rx_timestamp_b_*
52cfm_csf(種類と周期)
53cfm_1slsource_mep_id、test_id、tx_fcf
54 / 55cfm_slr / cfm_slmsource_mep_id、responder_mep_id、test_id、tx_fcf、tx_fcb

TLV (8 ビット型、値の 16 ビット長、自動): end (0)、sender_id (1: chassis_id_length は自動、chassis_id_subtype、chassis_id、management_address オクテット列)、port_status (2)、data_tlv (3: value)、interface_status (4)、reply_ingress / reply_egress (5 / 6: 動作、MAC、ポート ID のオクテット列)、ltm_egress_identifier (7)、ltr_egress_identifier (8)、organization_specific (31)、test (32: pattern_type、test_pattern)。

R-APS (cfm_raps、OpCode 40) の既定はバージョン 1 (G.8032v2)、first_tlv_offset 32、R-APS(NR, RB) です。宛先は 01:19:a7:00:00:<リング ID>、通常は R-APS 用 VLAN 上の MEL 7 で送ります。

802.3ah OAM

OAMPDU は subtype (3)、flags (リンク障害、Dying Gasp、重大イベント、ローカル / リモートの評価中・安定。既定 0x0050)、code で始まります。

コードプロトコルフィールド
0x00efm_oam_informationtlvs: local_information / remote_information (oam_version、revision、multiplexer_action、parser_action、oam_configuration、max_oampdu_size、oui、vendor_specific_information)、organization_specific、end
0x01efm_oam_event_notificationsequence_number、tlvs: errored_symbol_period、errored_frame、errored_frame_period、errored_frame_seconds_summary (timestamp、window、threshold、errors、error_running_total、event_running_total)、organization_specific、end
0x02efm_oam_variable_requestvariable_descriptors (オクテット列: ブランチ、リーフ、…、0 のブランチ)
0x03efm_oam_variable_responsevariable_containers (オクテット列: ブランチ、リーフ、幅、値、…、0 のブランチ)
0x04efm_oam_loopback_controlremote_loopback_command (1 有効化、2 無効化)
0xfeefm_oam_organization_specificoui、data

Information / Event TLV の長さは 2 オクテットのヘッダを含み (自動)、リストは end で終わります。

対象外

  • PTP: 認証 / セキュリティ TLV (IEEE 1588-2019 附属書 P)、管理 ID ごとの Management TLV データの型付け、その他のトランスポート (附属書 C、E〜G のうち IPv6 / Ethernet 以外)、状態機械と送信時のタイムスタンプ付与。
  • CFM: MAID / MEG ID は送信される 48 オクテットのまま (名前形式ごとに分解しない)、Test TLV の CRC-32 は計算しない。Linear APS、MCC、EXM / EXR、VSM / VSR は専用定義なし (汎用 cfm)。
  • 802.3ah OAM: 変数記述子 / コンテナはオクテット列。OAM ディスカバリの状態機械。

自動生成リファレンス

このページのプロトコルのフィールドリファレンス (定義から自動生成):

lacp · marker · ptp · ptp_sync · ptp_delay_req · ptp_pdelay_req · ptp_pdelay_resp · ptp_follow_up · ptp_delay_resp · ptp_pdelay_resp_follow_up · ptp_announce · ptp_signaling · ptp_management · esmc · cfm · cfm_ccm · cfm_lbm · cfm_lbr · cfm_ltm · cfm_ltr · cfm_ais · cfm_lck · cfm_tst · cfm_raps · cfm_lmm · cfm_lmr · cfm_1dm · cfm_dmm · cfm_dmr · cfm_csf · cfm_slm · cfm_slr · cfm_1sl · efm_oam · efm_oam_information · efm_oam_event_notification · efm_oam_variable_request · efm_oam_variable_response · efm_oam_loopback_control · efm_oam_organization_specific · raw