This is a simple script which allows to discover the VLAN enabled on one network card.
It assumes you are connected to a CISCO switch because it uses CDP protocol.
It also assumes you have installed the cdpr RPM.
It assumes you are connected to a CISCO switch because it uses CDP protocol.
It also assumes you have installed the cdpr RPM.
#!/bin/bash
# $Id: vlan 22 2011-02-07 15:54:28Z mdaltin $
# $URL: file:///SVN/repositories/scripts/network/vlan $
echo VLAN grabber by morenji 2011
cdpr -d $1 -v|grep -A1 VLAN|tail -1|awk --non-decimal-data '{print("0x"$2 $3)+0}'
Cut the RED cable ... |
No comments:
Post a Comment