Month: July 2011

cisco cli – interface status speed duplex

To get a short overview of all connected devices on a cisco switch and how they are connected just try: sh int status The output will similar to this: Port      Name               Status       Vlan       Duplex  Speed Type Gi1/0/1 *** Workstations *…

Get external IP via bash

To get your external IP via a small bash script #!/bin/bash # Define parameters LOGFILE=”/tmp/extip.log” DATE=$(date “+%Y%m%d-%H%M”) GETIP=$(wget -q -O – checkip.dyndns.org | sed -e ‘s/[^[:digit:]|.]//g’) test -f $LOGFILE || echo “no LOGFILE” touch $LOGFILE GETLOGIP=$(tail -n 1 $LOGFILE |…

Ping – Host Check

A short script to perform a continuous ping to check the availability of a certain server / host. execute: ./pingscript.sh <ping count> <target> <additional delay> ./pingscript 5 192.168.0.1 25   #!/bin/bash # set varables COUNT=$1 TARGET=$2 DELAY=$3 COUNT=0 LOGFILE=”./host_check.log” #…

show hidden devices on windows

Sometimes it is necessary to delete or get information about former connected devices. To see theses devices in Windows computer management you just need to stat an administrator shell and enter: set devmgr_show_nonpresent_devices=1 compmgmt.msc Now the Computer Management Windows starts…

generate strong passwords with Unix

If you wanna generate strong passwords with linux board tools. If you are using Ubuntu or Debian the following package is required: sudo apt-get install sharutils Generate password head -n 2 /dev/urandom | uuencode -m – Output: begin-base64 644 -…

manual DHCP renewal

DHCP renewal. It is sometimes necessary to renew an IP address on a Linux Operating System: On Ubuntu / Debian the following command works: sudo dhclient3 eth0