Nexus 9000v LACP

Nexus 9000v LACP

Last Updated: Oct 5, 2018 @ 9:38 am (UTC)

The Problem

If you’ve used the 9000v image in VIRL (or other simulators for that matter), you may have noticed that it has problems with LACP. It won’t negotiate with other devices.

The 9000v device will use the 00:01:02:03:04:05 MAC address as the destination. However, the MAC that should be used is 01:80:C2:00:00:02.

These details are set in the /isan/bin/lacp file in the underlying Linux OS.


The Solution

While looking around for a solution to this problem, I found a thread on reddit (link at the bottom of this article). It’s a simple script that sends shell commands to the Linux OS.

This will run on startup, and whenever configuration changes are made. Once you add this in, you should restart the node.

Startup Script
feature bash-shell
event manager applet PATCH
  description "PATCH"
  event syslog pattern "Configured from vty by root"
  action 1.0 cli run bash sudo -u root cp /isan/bin/lacp /isan/bin/lacp2
  action 2.0 cli run bash sudo -u root echo -e "00098830: 8c5f f7ff 85c0 7442 c685 9cfe ffff 01c6\n00098840: 859d feff ff80 c685 9efe ffff c2c6 859f\n00098850: feff ff00 c685 a0fe ffff 00c6 85a1 feff\n00098860: ff02 8b83 90fe ffff 8d95 9cfe ffff 8b0a" | sudo xxd -r - /isan/bin/lacp2
  action 3.0 cli run bash sudo rm /isan/bin/lacp
  action 4.0 cli run bash sudo mv /isan/bin/lacp2  /isan/bin/lacp
  action 5.0 cli run bash sudo killall -9 lacp
  action 6.0 event-default
event manager applet PATCH2
  description "PATCH"
  event syslog pattern "Supervisor 1 is active"
  action 1.0 cli run bash sudo -u root cp /isan/bin/lacp /isan/bin/lacp2
  action 2.0 cli run bash sudo -u root echo -e "00098830: 8c5f f7ff 85c0 7442 c685 9cfe ffff 01c6\n00098840: 859d feff ff80 c685 9efe ffff c2c6 859f\n00098850: feff ff00 c685 a0fe ffff 00c6 85a1 feff\n00098860: ff02 8b83 90fe ffff 8d95 9cfe ffff 8b0a" | sudo xxd -r - /isan/bin/lacp2
  action 3.0 cli run bash sudo rm /isan/bin/lacp
  action 4.0 cli run bash sudo mv /isan/bin/lacp2  /isan/bin/lacp
  action 5.0 cli run bash sudo sleep 30
  action 6.0 cli run bash sudo killall -9 lacp
  action 7.0 event-default

Roughly speaking, the script:

  1. Creates a copy of the LACP file
  2. Adds a few hex strings, which allow LACP to use the correct destination address
  3. Replaces the original lacp file with the updated one
  4. Kills the LACP process

References

Reddit – LACP Nexus 9000v – IOSv Bug fix

 

Leave a Reply