LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Using tcpdump on a sub-interface vlan (https://www.linuxquestions.org/questions/linux-networking-3/using-tcpdump-on-a-sub-interface-vlan-669552/)

mikeotieno 09-12-2008 03:53 PM

Using tcpdump on a sub-interface vlan
 
Hi Guys
I have been using the tcpdump tool on a physical interface but when i activate the vlan sub-interface i cant execute the command and use the tool.
Here is the error am getting, is there a way i can use this tool on the virtual interface i created.

[root@mikey@kdn ~]# tcpdump -v -s 255 -i etho port not telnet
tcpdump: SIOCGIFHWADDR: No such device

[root@mikey@kdn ~]# tcpdump -v -s 255 -i ifcfg-vlan3542 port not telnet
tcpdump: SIOCGIFHWADDR: No such device
[root@mikey@kdn ~]#

Mr. C. 09-13-2008 03:51 AM

I presume your -i etho was a typo, and you meant -i eth0.

Have you tried -i eth0 vlan ?

estabroo 09-14-2008 05:30 PM

just specify the interface with base.vlanid

for example if you have vlan 3542 setup on eth0 do tcpdump -i eth0.3542

mikeotieno 09-24-2008 01:32 PM

Thanx guys this worked for me.
root@mike ~]# tcpdump -i eth1 vlan 3542


All times are GMT -5. The time now is 01:41 PM.