# capturing packets export HOST=`ifconfig | awk -F"-" '/^.+-eth0/ {print $1}'` echo "this is host ${HOST}" # to see it in the screen ## tcpdump -XX -n -e -i ${HOST}-eth0 # capture to a file tcpdump -w /vagrant/resources/mininet/${HOST}.pcap -s0 -vvv -e -n -c 100 -i ${HOST}-eth0