For When You Can't Have The Real Thing
[ start | index | login ]
start > macwatch


Created by dave. Last edited by dave, 3 years and 212 days ago. Viewed 1,167 times. #1
[edit] [rdf]

Watching For Changes In The Mac Forwarding Table


touch .macwatch while [ -e .macwatch ] ; do sleep 10 NOW=`date '+%s'` echo $NOW for i in 251 252 253 ; do ~/ -c public sg250-$i | egrep '08:5b:0e:43:29:7c|00:0c:29:eb:14:c8' > $NOW.ssg250-$i diff $NOW.ssg250-$i ref.ssg250-$i if [ $? == 0 ]; then rm $NOW.ssg250-$i fi done done


  • obviously you need the script I've never released anywhere because I'm embarrassed by it.
  • this loops over a fragment of switch names; change to suit.
  • change the mac address(es) you want to watch accordingly.
  • ...and you'll have to set up the .ref files.
  • You can make the script stop by removing the .macwatch file.
no comments | post comment
This is a collection of techical information, much of it learned the hard way. Consider it a lab book or a /info directory. I doubt much of it will be of use to anyone else.

Useful: | Copyright 2000-2002 Matthias L. Jugel and Stephan J. Schmidt