跳转到内容

PTP

此内容尚不支持你的语言。

This chapter provides examples on how to use Netconf to manage PTP configurations on AsterNOS devices.

Request example to get ptp configuration via get-config.

<filter type="subtree">
<top>
<ptp/>
</top>
</filter>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:136148a7-0ff4-488b-9d5e-1cf55fcd5414">
<data>
<top>
<ptp xmlns="http://asterfusion.com/ns/yang/asternos-ptp">
<global>
<enabled>false</enabled>
<log-level>notice</log-level>
</global>
<instances>
<instance>
<instance-number>0</instance-number>
<default-ds>
<two-step-flag>false</two-step-flag>
<clock-identity>000fe2.fffe.ff0000</clock-identity>
<priority1>64</priority1>
<priority2>64</priority2>
<instance-type>oc</instance-type>
<network-transport>ethernet</network-transport>
<profile>1588v2</profile>
<delay-mechanism>e2e</delay-mechanism>
<clock-quality>
<clock-class>64</clock-class>
<clock-accuracy>0xfe</clock-accuracy>
</clock-quality>
</default-ds>
<ports>
<port>
<port>Ethernet1</port>
<port-ds>
<log-announce-interval>2</log-announce-interval>
<announce-receipt-timeout>3</announce-receipt-timeout>
<log-sync-interval>1</log-sync-interval>
<log-min-delay-req-interval>2</log-min-delay-req-interval>
<log-min-pdelay-req-interval>2</log-min-pdelay-req-interval>
<port-state>master</port-state>
<port-enable>true</port-enable>
</port-ds>
</port>
<port>
<port>Ethernet2</port>
<port-ds>
<log-announce-interval>0</log-announce-interval>
<announce-receipt-timeout>3</announce-receipt-timeout>
<log-sync-interval>-3</log-sync-interval>
<log-min-delay-req-interval>-3</log-min-delay-req-interval>
<log-min-pdelay-req-interval>-3</log-min-pdelay-req-interval>
<asymmetry-correction>10000</asymmetry-correction>
<port-enable>false</port-enable>
</port-ds>
</port>
</ports>
</instance>
</instances>
</ptp>
</top>
</data>
</rpc-reply>

Request example to get ptp global configuration via get-config.

<filter type="subtree">
<top>
<ptp>
<global/>
</ptp>
</top>
</filter>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:2593d066-983a-4d37-8aec-16ac6a88a525">
<data>
<top>
<ptp xmlns="http://asterfusion.com/ns/yang/asternos-ptp">
<global>
<enabled>false</enabled>
<log-level>notice</log-level>
</global>
</ptp>
</top>
</data>
</rpc-reply>

hint{type=“warning”} NOTE: This example shows how to create ptp instances. The device supports up to 2 PTP instances, except for the CX102S device which supports 4; Profile is the mandatory field; When clock-type is bc or tc (include t-bc, t-tc-p …), ptp clock needs at least two ports; Default values differ across profiles and can be viewed via the get-config operation.

Request example to create ptp instance via edit-config.

<config><top>
<interfaces operation="merge">
<interface>
<name>Ethernet1</name>
<ipv4>
<address>
<ip-prefix>10.1.1.1/24</ip-prefix>
</address>
</ipv4>
</interface>
</interfaces>
<ptp>
<instances operation="create">
<instance>
<instance-number>0</instance-number>
<default-ds>
<profile>1588v2</profile>
<clock-quality>
<clock-class>64</clock-class>
<clock-accuracy>0xFE</clock-accuracy>
</clock-quality>
<instance-type>bc</instance-type>
<source-ip-address>10.1.1.1</source-ip-address>
</default-ds>
<ports>
<port>
<port>Ethernet1</port>
<port-ds>
<port-enable>true</port-enable>
</port-ds>
</port>
<port>
<port>Ethernet2</port>
<port-ds>
<port-enable>true</port-enable>
</port-ds>
</port>
</ports>
</instance>
<instance>
<instance-number>127</instance-number>
<default-ds>
<profile>smpte-2059-2</profile>
<instance-type>oc</instance-type>
<smpte>
<sm-tlv-enable>true</sm-tlv-enable>
<frame-rate-numerator>1000</frame-rate-numerator>
<frame-rate-denominator>1</frame-rate-denominator>
<sm-tlv-drop-frame>true</sm-tlv-drop-frame>
<sm-tlv-color-frame>true</sm-tlv-color-frame>
</smpte>
</default-ds>
<ports>
<port>
<port>Ethernet3</port>
<port-ds>
<port-enable>true</port-enable>
</port-ds>
</port>
</ports>
</instance>
</instances>
</ptp>
</top></config>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:e3b7e0a2-a83e-4ca4-8727-c4011fc0d8c6">
<ok/>
</rpc-reply>

Request example to modify ptp instance via edit-config.

<config><top>
<ptp>
<instances operation="merge">
<instance>
<instance-number>0</instance-number>
<default-ds>
<profile>1588v2</profile>
<delay-mechanism>e2e</delay-mechanism>
<two-step-flag>false</two-step-flag>
<clock-identity>000FE2.FFFE.FF0000</clock-identity>
<clock-quality>
<clock-class>64</clock-class>
<clock-accuracy>0xFE</clock-accuracy>
</clock-quality>
<priority1>64</priority1>
<priority2>64</priority2>
<network-transport>ethernet</network-transport>
<instance-type>oc</instance-type>
</default-ds>
<ports>
<port>
<port>Ethernet1</port>
<port-ds>
<log-announce-interval>2</log-announce-interval>
<announce-receipt-timeout>3</announce-receipt-timeout>
<port-state>master</port-state>
<log-min-delay-req-interval>2</log-min-delay-req-interval>
<log-min-pdelay-req-interval>2</log-min-pdelay-req-interval>
<log-sync-interval>1</log-sync-interval>
<port-enable>true</port-enable>
</port-ds>
</port>
<port>
<port>Ethernet2</port>
<port-ds>
<log-announce-interval>0</log-announce-interval>
<announce-receipt-timeout>3</announce-receipt-timeout>
<log-min-delay-req-interval>-3</log-min-delay-req-interval>
<log-min-pdelay-req-interval>-3</log-min-pdelay-req-interval>
<log-sync-interval>-3</log-sync-interval>
<port-enable>false</port-enable>
<asymmetry-correction>10000</asymmetry-correction>
</port-ds>
</port>
</ports>
</instance>
</instances>
</ptp>
</top></config>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:6ae48054-a79c-4de4-af4a-a60ca24b2976">
<ok/>
</rpc-reply>

Request example to add port to ptp instance via edit-config.

<config><top>
<ptp>
<instances>
<instance>
<instance-number>127</instance-number>
<ports operation="create">
<port>
<port>Ethernet5</port>
<port-ds>
<log-announce-interval>0</log-announce-interval>
<announce-receipt-timeout>3</announce-receipt-timeout>
<port-state>master</port-state>
<log-min-delay-req-interval>-3</log-min-delay-req-interval>
<log-min-pdelay-req-interval>-3</log-min-pdelay-req-interval>
<log-sync-interval>-3</log-sync-interval>
<port-enable>true</port-enable>
<asymmetry-correction>10000</asymmetry-correction>
<dscp>32</dscp>
</port-ds>
</port>
</ports>
</instance>
</instances>
</ptp>
</top></config>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:e3b7e0a2-a83e-4ca4-8727-c4011fc0d8c6">
<ok/>
</rpc-reply>

Request example to delete port from ptp instance via edit-config.

<config><top>
<ptp>
<instances>
<instance>
<instance-number>127</instance-number>
<ports>
<port operation="delete">
<port>Ethernet5</port>
</port>
</ports>
</instance>
</instances>
</ptp>
</top></config>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:31f57a0b-569c-4152-aa11-f938aeecda31">
<ok/>
</rpc-reply>

Request example to delete ptp instance via edit-config.

<config><top>
<ptp>
<instances>
<instance operation="delete">
<instance-number>127</instance-number>
</instance>
</instances>
</ptp>
</top></config>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:253c59fb-a240-4dce-b6ac-230b880793cb">
<ok/>
</rpc-reply>

Request example to delete all ptp instances via edit-config.

<config><top>
<ptp>
<instances operation="delete"/>
</ptp>
</top></config>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:ea052cdc-dcc9-4b1a-9f0b-bf1265358143">
<ok/>
</rpc-reply>

Request example to reset all ptp configurations via rpc ptp-reset.

<ptp-reset/>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:819c836d-4789-4208-a2c6-e688d0a6cb96">
<status xmlns="http://asterfusion.com/ns/yang/asternos-ptp">PTP configurations reset successfully</status>
</rpc-reply>

Request example to show all ptp clocks via rpc show-ptp-clock.

<show-ptp-clock/>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:57d1c5f8-9a7f-4644-82ce-d9c898e1d9a2">
<data xmlns="http://asterfusion.com/ns/yang/asternos-ptp">
Domain: 0
Profile: 1588v2
Clock Type: bc
Clock Step: one_step
Delay Mode: E2E
Local Clock Identity: 000fe2.fffe.ff0000
Local Clock Accuracy: 0xfe
Local Clock Class: 64
Local Clock Priority1: 128
Local Clock Priority2: 128
Grandmaster Clock Identity: 000fe2.fffe.ff0000
Grandmaster Clock Accuracy: 0xfe
Grandmaster Clock Class: 64
Grandmaster Clock Priority1: 64
Grandmaster Clock Priority2: 64
Parent Port Identity: 0
Servo State: unlocked
Offset To Master: 0
Path Delay: 0
Max Steps Removed: 255
Local Time: 0
Domain: 127
Profile: smpte-2059-2
Clock Type: oc
Clock Step: one_step
Delay Mode: E2E
Local Clock Identity: 000000.0000.000000
Local Clock Accuracy: 0xFE
Local Clock Class: 248
Local Clock Priority1: 128
Local Clock Priority2: 128
</data>
</rpc-reply>

Request example to show ptp clock sm tlv via rpc.

<show-ptp-clock-sm-tlv>
<instance-number>0</instance-number>
</show-ptp-clock-sm-tlv>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:a37ff7ca-c08c-4a09-9494-238dbc141710">
<data xmlns="http://asterfusion.com/ns/yang/asternos-ptp">
Default Frame Rate: 0/0
GM Lock Status: 0
Time Address Flags: 3
Current Local Offset: 0
Jump Seconds: 0
Time of Next Jump: 0
Time of Next Jam: 0
Time of Previous Jam: 0
Previous Jam Local Offset: 0
Daylight Saving: 0
Leap Second Jump: 0
</data>
</rpc-reply>

Request example to show ptp counters via rpc show-ptp-counters.

<show-ptp-counters/>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:1f7882f2-3997-4b77-8e64-dfb0c8085e9e">
<data xmlns="http://asterfusion.com/ns/yang/asternos-ptp">
Interface: Ethernet2
Recv Packets Send Packets
---------------------------------------------------------------------------------
Announce 0 0
Sync 0 0
FollowUp 0 0
DelayReq 0 0
DelayResp 0 0
PdelayReq 0 0
PdelayResp 0 0
PdelayRespFollowUp 0 0
Signaling 0 0
Managment 0 0
Interface: Ethernet1
Recv Packets Send Packets
---------------------------------------------------------------------------------
Announce 39 39
Sync 77 77
FollowUp 0 0
DelayReq 0 0
DelayResp 0 0
PdelayReq 0 0
PdelayResp 0 0
PdelayRespFollowUp 0 0
Signaling 0 0
Managment 0 0
Interface: Ethernet3
Recv Packets Send Packets
---------------------------------------------------------------------------------
Announce 74 74
Sync 590 590
FollowUp 0 0
DelayReq 0 0
DelayResp 0 0
PdelayReq 0 0
PdelayResp 0 0
PdelayRespFollowUp 0 0
Signaling 0 0
Managment 73 73
</data>
</rpc-reply>

Request example to show ptp interfaces via rpc show-ptp-interface.

<show-ptp-interface/>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:69232687-6bbb-41d1-b869-0fc943cf7ee8">
<data xmlns="http://asterfusion.com/ns/yang/asternos-ptp">
Ethernet: Ethernet1
Enable: True
Domain: 0
Index: 2
Announce Interval: 1
Announce Receipt Timeout: 3
Delay Request Interval: 0
Pdelay Request Interval: 0
Sync Interval: 0
Mode: master
Delay Mode: E2E
Unicast Master Table: []
Ethernet: Ethernet2
Enable: True
Domain: 0
Index: 1
Announce Interval: 1
Announce Receipt Timeout: 3
Delay Request Interval: 0
Pdelay Request Interval: 0
Sync Interval: 0
Mode: none
Delay Mode: E2E
Unicast Master Table: []
Ethernet: Ethernet3
Enable: True
Domain: 127
Index: 1
Announce Interval: 0
Announce Receipt Timeout: 3
Delay Request Interval: -3
Pdelay Request Interval: -3
Sync Interval: -3
Mode: master
Delay Mode: E2E
Unicast Master Table: []
</data>
</rpc-reply>