Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Table of Contents

Overview

MAC Trace function shows L2 path trace based on MAC address, which is similar to the IP layer Traceroute. It is used to detect the Ethernet link connection fault, providing an effective method for Ethernet fault detection and location.

The device determines the path by using the MAC address tables of the switches in the path.

The packets are based on CFM (IEEE802.1ag), CFM is a connection checking mechanism that uses its own Ethernet frames (its Ethernet type is 0x8902 and has its own MAC address) to verify the operational status of the service instance.

The TTL (time to live) value is 64, which specifies the lifetime of the packet and sets the maximum number of hops that the packet will go through.

Info
titleNOTEs:
  • To make MAC trace function work, you need to enable MAC trace function on both ends of the link under test and the intermediate devices; only after this, the devices can reply to the received MAC trace messages.
  • MAC trace function supports only unicast destination MAC addresses.

Configuring MAC Trace

Step 1          Enable MAC trace function.

...

run tracemac destination <mac-address> vlan <vlan-id>

Configuration Example

Networking Requirements

Figure 1. MAC Trace Configuration Example

Image Added

As shown in Figure 1, Department A (belonging to VLAN 100, 200, 300) and Department B (belonging to VLAN 100) of a company are connected by multiple switches. This example uses command run tracemac destination <mac-address> vlan <vlan-id> to check the connectivity between the current device and the destination device, which is called a MAC Trace.

Procedure

Switch A

Step 1          Configure VLAN and port mode.

Code Block
admin@SwitchA# set interface gigabit-ethernet te-1/1/1 family ethernet-switching native-vlan-id 100
admin@SwitchA# set interface gigabit-ethernet te-1/1/1 family ethernet-switching port-mode trunk
admin@SwitchA# set interface gigabit-ethernet te-1/1/1 family ethernet-switching vlan members 200, 300
admin@SwitchA# set interface gigabit-ethernet te-1/1/3 family ethernet-switching native-vlan-id 100
admin@SwitchA# set interface gigabit-ethernet te-1/1/3 family ethernet-switching port-mode trunk
admin@SwitchA# set interface gigabit-ethernet te-1/1/3 family ethernet-switching vlan members 200, 300

Step 2          Enable MAC trace function.       

Code Block
admin@SwitchA# set tracemac disable false

Step 3          Commit the configurations.

Code Block
admin@SwitchA# commit

Switch B

Step 1          Configure VLAN and port mode.

Code Block
admin@SwitchB# set interface gigabit-ethernet te-1/1/5 family ethernet-switching native-vlan-id 100
admin@SwitchB# set interface gigabit-ethernet te-1/1/5 family ethernet-switching port-mode trunk
admin@SwitchB# set interface gigabit-ethernet te-1/1/5 family ethernet-switching vlan members 200, 300
admin@SwitchB# set interface gigabit-ethernet xe-1/1/1 family ethernet-switching native-vlan-id 100
admin@SwitchB# set interface gigabit-ethernet xe-1/1/1 family ethernet-switching port-mode trunk
admin@SwitchB# set interface gigabit-ethernet xe-1/1/1 family ethernet-switching vlan members 200, 300

Step 2          Enable MAC trace function.         

Code Block
admin@SwitchB# set tracemac disable false

Step 3          Commit the configurations.

Code Block
admin@SwitchB# commit

Switch C

Step 1          Configure VLAN and port mode.

Code Block
admin@SwitchC# set interface gigabit-ethernet xe-1/1/1 family ethernet-switching native-vlan-id 100
admin@SwitchC# set interface gigabit-ethernet xe-1/1/1 family ethernet-switching port-mode trunk
admin@SwitchC# set interface gigabit-ethernet xe-1/1/1 family ethernet-switching vlan members 200, 300
admin@SwitchC# set interface gigabit-ethernet te-1/1/1 family ethernet-switching native-vlan-id 100

Step 2          Enable MAC trace function.         

Code Block
admin@SwitchC# set tracemac disable false

Step 3          Commit the configurations.

Code Block
admin@SwitchC# commit

Verification

  • Run command run show mac-address table to check the MAC address table.
    • On Switch A:

 Image Added

    • On Switch B:

Image Added

    • On Switch C:

Image Added

  • On Switch C, trace MAC destination device with MAC address 20:11:11:11:11:11:11 and belonging to VLAN 100.
Code Block
admin@PICOS#admin@SwitchC# run tracemac destination 22:11:11:11:11:11 vlan 100
Hop   Hostname    Ingress port     Ingress mac        Egress port   port Egress mac
-----  ----------- --------------   ------------       -       -----------   ------------
1     PICOS      SwitchB       xe-1/1/1.1     70     70:72:cf:b7:65:45  te-1/1/5       70:72:cf:b7:65:45
2     PICOS      SwitchA       te-1/1/3       04:f8:f8:20:6c:7b  te-1/1/1       04:f8:f8:20:6c:7b