The ptp udp-egress command sets the UDP encapsulation mode for PTP packets.
The undo ptp udp-egress source-ip command restores the encapsulation mode for PTP packets to MAC encapsulation mode.
Using the undo ptp udp-egress { destination-ip | destination-mac | dscp | vlan | priority } command, you can restore the default configuration of the UDP encapsulation mode.
By default, PTP packets are encapsulated in MAC multicast mode. If UDP encapsulation is configured, multicast UDP encapsulation is used by default.
ptp udp-egress source-ip source-ip [ destination-ip destination-ip ] [ dscp dscp ] [ vlan vlan-id [ priority priority ] ]
ptp udp-egress destination-mac destination-mac
undo ptp udp-egress { source-ip | destination-ip | destination-mac | dscp | vlan | priority }
Parameter |
Description |
Value |
---|---|---|
source-ip source-ip |
Indicates the source IP address of the UDP-encapsulated PTP packets. |
The value is in dotted decimal notation. |
destination-ip destination-ip |
Indicates the destination IP address of the UDP-encapsulated PTP packets. |
The value is in dotted decimal notation. |
destination-mac destination-mac |
Indicates the destination MAC address of the UDP-encapsulated PTP packets. |
The value is in the format of H-H-H. An H contains one to four hexadecimal numbers. |
dscp dscp |
Indicates the Differentiated Service Code Point (DSCP) priority carried in the UDP-encapsulated PTP packets. |
The value is an integer that ranges from 0 to 63. The default value is 56. |
vlan vlan-id |
Indicates the VLAN ID encapsulated in the PTP packets. |
The value is an integer that ranges from 1 to 4094. |
priority priority | Indicates the 802.1p priority carried in the VLAN-encapsulated packet. |
The value is an integer that ranges from 0 to 7. The default value is 7, indicating the highest priority. |
Usage scenario
By default, PTP packets are encapsulated in multicast MAC mode. You can use the ptp udp-egress command to change the encapsulation mode to UDP encapsulation to implement Layer 3 encapsulation.
Unicast encapsulation
In this encapsulation mode, you need to set the unicast destination IP address of PTP packets.
Multicast encapsulation
Precautions
Before using the ptp udp-egress destination-mac destination-mac command to configure the destination MAC address for UDP encapsulation, configure the source IP address for UDP encapsulation. The destination MAC address cannot be all 0s or a multicast address.
# Configure the PTP packet to be encapsulated in UDP unicast mode. Set the source IP address of the PTP packet to 192.168.2.2 and the destination IP address to 192.168.1.1.
<HUAWEI> system-view [HUAWEI] interface xgigabitethernet 0/0/1 [HUAWEI-XGigabitEthernet0/0/1] ptp udp-egress source-ip 192.168.2.2 destination-ip 192.168.1.1