1

I’m fairly new to Linux and networking and I’ve been playing with tcpdump but when ever I try to run tcpdump, it tells me eth0 has no IPv4 address which is true it has no inet whatsoever.

This is the ifconfig -a output:

eth0      Link encap:Ethernet  HWaddr 08:9e:01:21:5b:2a  
      UP BROADCAST MULTICAST  MTU:1500  Metric:1
      RX packets:0 errors:0 dropped:0 overruns:0 frame:0
      TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1000 
      RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
      Interrupt:44 

lo        Link encap:Local Loopback  
      inet addr:127.0.0.1  Mask:255.0.0.0
      inet6 addr: ::1/128 Scope:Host
      UP LOOPBACK RUNNING  MTU:16436  Metric:1
      RX packets:279 errors:0 dropped:0 overruns:0 frame:0
      TX packets:279 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:0 
      RX bytes:9469 (9.2 KiB)  TX bytes:9469 (9.2 KiB)

wlan0     Link encap:Ethernet  HWaddr 08:3e:8e:65:20:35  
      inet addr:10.1.3.37  Bcast:10.1.255.255  Mask:255.255.0.0
      inet6 addr: fe80::a3e:8eff:fe65:2035/64 Scope:Link
      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
      RX packets:9703 errors:0 dropped:0 overruns:0 frame:0
      TX packets:10686 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1000 
      RX bytes:5233812 (4.9 MiB)  TX bytes:1857593 (1.7 MiB)

I’m trying to see all the traffic on the LAN which is not possible if eth0 doesn’t work. Is there anyway I can get eth0 working?

2 Answers 2

1

Plug in an ethernet cable.

If you want to use tcpdump on a different interface, like wlan0, then you need to use the -i option, such as tcpdump -i wlan0. If you read the tcpdump documentation, this is clearly documented.

1
  • That first line would have sufficied, but I had to +1 for RITM.
    – DankyNanky
    Sep 2, 2022 at 8:24
1

From what you showed in your question I assume that your wired interface is not connected (no frames ("packets") at all).

You can run tcpdump on any interface - to let it listen on wlan0 (your wireless interface) you type sudo tcpdump -i wlan0

You must log in to answer this question.

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