Question about interfaces on Linux machines

Proxy

Pumpkin Ghost
Joined
Apr 24, 2005
Messages
4,307
What would be a good way, or command to use to see if a given interface (say eth0 for example) has something connected to the other end or is talking? I used <tcpdump -i eth0> but it still showed some traffic when I don't think there should have been. Line noise maybe?
 
tshark (CLI wireshark) and look at the output. Might be broadcast traffic from something on the same ethernet segment.
 
Okay, outside of looking at MAC addresses, would there be anyway from the box itself to dertmine if there was anything sitting on the otherside? There is an interface that I think is unused but I don't want to bring it down and cause a disruption if there is something on the other end that is only used once in a blue moon but I don't know about it.
 
iftop

syntax would be:

iftop -i eth0

Does so can I append the tcpdump counter to that to automate it?

#!bin/bash

mkdir /home/admin/ifscounters

iftop -c 20 -e -i eth0 >> /ifscounters/ifs.txt
iftop -c 20 -e -i eth1 >> /ifscounters/ifs.txt
iftop -c 20 -e -i eth2 >> /ifscounters/ifs.txt
 
Back
Top