X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=README;h=a75d495d6c793cba12937da52144f28d3f099156;hb=a4a87859802d4aa4c96218015b659756ed950e75;hp=30ea7e8eacd3d303d71aa4b7e5cd5313b5216757;hpb=b0d7a2e05c5dfe0f85b3836ef52085d95e74ed8a;p=dell-switch diff --git a/README b/README index 30ea7e8..a75d495 100644 --- a/README +++ b/README @@ -18,3 +18,39 @@ To use fans script first pull show system from all switches: ./ips | xargs -i ./dell-switch.pl {} "show system" + +Backup switch configuration to tftp server: + +./ips 1,2 | awk '{ print "./dell-switch.pl "$1" \"copy startup-config tftp://10.20.0.253/backups/"$2".config\"" }' | NO_LOG=1 sh -x + + +To use snmp* utils, create snmp.conf with: + +COMMUNITY=my-comminity-or-public + + +# Find mac address on network + +collect all mac addresses using snmp + +dpavlin@black:~/dell-switch$ ./sw-mac-port.sh + +find interesting mac + +dpavlin@black:~/dell-switch$ ./find-port-for-mac 00:1e:8c:0a:49:3c # eeepy eth0 +sw-e300 1 00:1e:8c:0a:49:3c 23 +sw-e300-2 1 00:1e:8c:0a:49:3c 21 +# mac 00:1e:8c:0a:49:3c on 41 switches + +dpavlin@black:~/dell-switch$ ./find-port-for-mac 00:80:c8:37:6d:76 # eeepy eth3 +sw-e300 1 00:80:c8:37:6d:76 17 +# mac 00:80:c8:37:6d:76 on 41 switches + + + +# switch configuration helpers + +ssh-switch-port-vlan sw port vlan +ssh-switch-port-shutdown sw port [no] +ssh-snmp-server-rw sw +