The ptp mac-egress command configures the MAC encapsulation mode for the PTP packets.
The undo ptp mac-egress command restores the default MAC encapsulation mode.
By default, PTP packets are encapsulated in MAC multicast mode and do not carry any VLAN tag.
ptp mac-egress { destination-mac destination-mac | vlan vlan-id [ priority priority-value ] }
undo ptp mac-egress { destination-mac | vlan [ priority ] }
In G.8275.1 mode, only the destination-mac destination-mac parameter is supported.
Parameter |
Description |
Value |
---|---|---|
destination-mac destination-mac |
Indicates the destination MAC address of the PTP packet. If the destination MAC address is not configured, the PTP packet is encapsulated in multicast mode by default and does not carry any VLAN tag. |
The value is in the format of H-H-H. An H contains one to four hexadecimal numbers. |
vlan vlan-id |
Specifies the VLAN ID of PTP messages. |
The value is an integer that ranges from 1 to 4094. |
priority priority-value |
Specifies the priority of VLAN packets. |
The value is an integer that ranges from 0 to 7. The default value is 7, indicating the highest priority. |
Usage scenario
You can configure the encapsulation mode for packets based on the Layer 2 network types of devices. If a device resides on a Layer 2 unicast network, configure a MAC address for the device. If a device resides on a multicast network, no MAC address needs to be configured for the device because a default multicast MAC address is defined.
Packet Type | MAC Address |
---|---|
All except peer delay measurement mechanisms |
011B-1900-0000 |
Peer delay measurement mechanism |
0180-C200-000E |
Precautions
The MAC address cannot be 0000-0000-0000.
Before configuring MAC encapsulation, delete the UDP encapsulation configuration if UDP encapsulation has been configured.
MAC encapsulation is required when the VLAN ID to be encapsulated to sent or received packets is configured.
After G.8275.1 is configured, only the default multicast MAC addresses 011B-1900-0000 and 0180-C200-000E can be configured.
# Configure the unicast MAC encapsulation for the PTP packet.
<HUAWEI> system-view [HUAWEI] interface xgigabitethernet 0/0/1 [HUAWEI-XGigabitEthernet0/0/1] ptp mac-egress destination-mac 001B-1911-1100
# Configure the multicast MAC encapsulation for the PTP packet.
<HUAWEI> system-view [HUAWEI] interface xgigabitethernet 0/0/1 [HUAWEI-XGigabitEthernet0/0/1] ptp mac-egress vlan 2 priority 2