LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   tcpdump not listening on any other interface (https://www.linuxquestions.org/questions/linux-networking-3/tcpdump-not-listening-on-any-other-interface-948617/)

ajo8 06-05-2012 07:52 AM

tcpdump not listening on any other interface
 
Hi! On Fedora, I'm trying to get tcpdump to listen on other interfaces, besides eth0. I have a total of 6 (eth0-eth5). Whenever I specify an interface to listen on (e.g. tcpdump -i eth4), it will only listen on eth0 every time. Listening on 'any' interface yields the same results.

grim76 06-05-2012 09:24 AM

How are you determining that only eth0 is being used?

Code:

# tcpdump -i eth3
Excerpt from my /var/log/messages

Code:

kernel: device eth3 entered promiscuous mode
kernel: device eth3 left promiscuous mode

Please post exact commands used and output from logs. (Make sure to use code tags)

ajo8 06-05-2012 10:12 AM

command being used:
Code:

# tcpdump -i eth4
output:
Code:

tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes

messages:
Code:

kernel: device eth0 entered promiscuous mode
kernel: device eth0 left promiscuous mode


grim76 06-05-2012 11:37 AM

Looks like there might be an alias at play. Try entering the full path to tcpdump.

Code:

/usr/sbin/tcpdump -i eth4

ajo8 06-05-2012 11:54 AM

That worked. Hm, where would this alias be defined? I checked /etc/profile and /etc/bashrc, as well as the local logins', but there's nothing referencing it.

grim76 06-05-2012 12:33 PM

alias -p should list your aliases. You might also check .bash_profile .bash_rc.

ajo8 06-05-2012 01:33 PM

Thanks so much! That solved it.

KinnowGrower 06-05-2012 09:19 PM

ajo8,

Can you please "show" What was alias ? and in which file it was defined?. It will help others as well.

Thanks


All times are GMT -5. The time now is 03:14 PM.