What happens when I plug in a Ethernet cable?

I want to be able to see what's happening on the Level 2/3 (I believe the protocols I'm trying to watch is Ethernet, IP (v4 and v6) and DHCP for IP connections).

So, when I plug a cable and the connection is refused, can I try again seeing/debugging what really happen?

  • 1
    Could you clarify what you're looking for—while I'm pretty sure you don't want to know about the low-level electrical stuff, are you interested in what happens in the kernel? Or in userspace? Or is your network not working, and you want help troubleshooting it?
    – derobert
    Jan 30, 2013 at 15:29
  • 1
    @derobert I just edit the question. Thanks for your interest.
    – RSFalcon7
    Jan 30, 2013 at 15:55

2 Answers 2


Bonsi Scott mentioned wireshark, which will allow you to observe ethernet packets, and all the protocol headers going up. It has a nice GUI interface too (the console version is 'tshark'). Wireshark is build on libpcap, which is fairly well documented and easy to use if you are into programming. Libpcap is also the basis of tcpdump which is similiar in purpose to wireshark.

  • Just make sure you start capturing packages before plugging the cable in, and stop once you've got the network OK icon (or whatever). Then you can look at the traffic collected.
    – vonbrand
    Jan 30, 2013 at 21:31

I think it depends on your configuration.

  • You can watch logs of your linux-distribution with less +F logfilename, for example less +F /var/log/messages
  • You can use dmesg to look for infos (for example watch -n 1 "dmesg | tail -n 50" is help there as well.)

And you could use a progralm like Wireshark to monitor the packets on the network cable.

  • There won't be much to observe in the system logs WRT ethernet packets, except perhaps ones that are rejected by a firewall such as iptables.
    – goldilocks
    Jan 30, 2013 at 16:38

You must log in to answer this question.

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