Skip to content

Instantly share code, notes, and snippets.

@jasonnyberg
Last active March 15, 2017 19:16
Show Gist options
  • Select an option

  • Save jasonnyberg/7da567514ac79c8e2572c116f54d2a06 to your computer and use it in GitHub Desktop.

Select an option

Save jasonnyberg/7da567514ac79c8e2572c116f54d2a06 to your computer and use it in GitHub Desktop.
test snippets
#mlag test traffic detection filters
for x in `seq 1 12`; do csub "{del,filter,entry,\"acl-Test-$x\"}"; done #remove
for x in `seq 1 12`; do acl allow Test-$x InPorts=$x SrcMac=0,3,1,0,0,0 SrcMacMask=255,255,255,0,0,0 ; done #add
watch -d 'showLacp; psh show filter | grep Test' #watch
bcm l2 cache show #find index of entry with "mac=01:80:c2:00:00:02"
#for instance: index -> 5 : mac=01:80:c2:00:00:02 vlan=0/0x000 modid=0 port=134217728/cpu0 prio=7 BPDU CPU ReplacePriority lookup_class =0
psh bcm l2 cache del cacheindex=5 # <- cache index from "bcm l2 cache show" # delete the entry to break lacp
psh csub "{add,l2_entry,bpdu,[1,128,194,0,0,2],7,none,[]}" # reinstall entry to restore lacp
while sleep 20; do psh bcm l2 cache del ci=7; sleep 20; psh csub "{add,l2_entry,bpdu,[1,128,194,0,0,2],7,none,[]}"; done #remove/add l2 cache entry
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment