0

Here is the output of the ip addr command:

Screenshot of the ip addr command

I tried out this command for showing network traffic:

 sudo tcpdump -n host google.com  

But it's giving output like this:

tcpdump: WARNING: eth0: no IPv4 address assigned  
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode  
listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes  

I also pinged google.com, but it is still showing no packets.

7
  • If tcpdump says that there's no IPv4 address assigned to eth0 then you might have a bad network configuration. What does ip addr say?
    – aventurin
    Commented Sep 17, 2016 at 22:00
  • ip addr, is showing all 3 interfaces i.e lo, eth0, wlan0 Commented Sep 17, 2016 at 22:01
  • Nothing more? What about IP addresses?
    – aventurin
    Commented Sep 17, 2016 at 22:06
  • Yes, it also showing the ip addresses .. Commented Sep 17, 2016 at 22:09
  • i tried tcpdump -D, it showing bluetooth0 - is it beacuse of bluetooth device problem ? Commented Sep 17, 2016 at 22:11

1 Answer 1

2

You haven't assigned an IP address to your eth0. So tcpdump and ping cannot work via eth0.

So either assign one if you are connected to a wired network or use your wlan0 interface instead.

E.g. ping -I wlan0 www.google.com or tcpdump -i wlan0 -n host google.com.

3
  • okay i got it, but after using wlan0 interface in ping, should i do any change in tcpdump command Commented Sep 17, 2016 at 22:44
  • You can also try to specify the interface (see the edit above).
    – aventurin
    Commented Sep 17, 2016 at 22:51
  • Thanks alot, i got i and assigned tcpdump to wlan0 interface also, now it can listen on wlan0 and packets are capturing. Commented Sep 17, 2016 at 22:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .