Loop Detection in Pure L2 Mode
Juniper Cloud-Native Router supports Layer 2 loop detection mechanisms by detecting frequent MAC address movements between ports.
Juniper Cloud-Native Router supports Layer 2 loop detection mechanism in the vRouter data path. Frequent MAC address movements between ports, many a times resulting from incorrect wiring, can result in L2 loops, resulting in network instability, broadcast storms, and degragded performance. Traditional loop detection mechanisms such as Spanning Tree Protocol (STP) may not always be feasible in modern data center environments.
Cloud-Native Router implements a loop detection mechanism that identifies MAC address learning loops by monitoring the frequency of MAC address movements between ports. The vRouter uses the MAC-MOVE table to track these MAC movemements, including source MAC, VLAN tag, hit count, and timestamp. The vRouter detects high hit counts on the same MAC address entry in the MAC_MOVE table, indicating continuous movement of the MAC address between two ports within a short interval of time.
You can use the purel2cli --mac-move-table show
command on the vRouter shell to view the
MAC_MOVE table:
purel2cli --mac-move-table show ================================================== || MAC vlan hit_count timestamp|| ================================================== 00:01:01:01:01:03 1221 46 1731038878 Total Mac entries 1
The vRouter also logs the detected loop and shuts down affected ports.
2024-11-18 06:14:19,130 DPCORE: NOTIFICATION, CRIT, Purel2 Macmove Loop Detected, mac 00:01:01:01:01:03, vlan 1221, Current Port 5, Older Port 1, hitcount 52 2024-11-18 06:14:19,130 VROUTER: Func: dpdk_port_shutdown, Line 1296, Shutting Down Port 0 of Vif 5 2024-11-18 06:14:19,343 lcore 17 called tx_pkt_burst for not ready port ( 2024-11-18 06:14:23,242 VROUTER: Port ID: 4 Link Status: DOWN intf _name:0000:d8:00.0 drv_name:net_ixgbe 2024-11-18 06:14:23,242 VROUTER: Notifed Link status update to agent for interface 0000: d8:00.0 as 0 2024-11-18 06:14:36,299 DPCORE: vr_purel2_mac_move_table_req_process vr_purel2_mac_move_table_req 456 received OP 1 2024-11-18 06 14:38,133 DPCORE: vr_purel2_mac_move_table_req_process vr_purel2_mac_move_table_req 456 received OP 1
A Syslog notification is also generated when the loop is detected:
{"jcnr": {"header": {"sysUpTime": "40 days, 11 hours, 35 minutes, 45 seconds" 45 "program": "vrouter-dpdk", "notificationType": "DPCORE: ", "eventDate": "2024-12-02T21:32:23-08:00"} , "body": "NOTIFICATION, CRIT, Purel2 Macmove Loop Detected, mac 00:01:01:01:01:03, vlan 1221. Current Port 4, Older Port 2, hitcount 51"}}