So you are not sure are connected and iither your router or ethernet card are not working.

sudo tcpdump -i eth0 -n port 67 and 68
You don't need this command often and there are other ways to test output but if you want to be sure if your router and ethernet card are working this is one way.
Sample Output
12:30:25.973064 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:24:2b:60:33:8d, length 302
12:30:25.979560 IP 192.168.1.1.67 > 255.255.255.255.68: BOOTP/DHCP, Reply, length 303
12:30:48.928099 IP 192.168.1.131.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:24:2b:60:33:8d, length 300


0
By: wsv123456
2010-08-18 19:36:06

What Others Think

nice, +1 for you For all newbies (like me) out there, please note you should request a new IP to a DHCP server, with either dhclient or dhcpd or whatever equivalent.
vlan7 · 804 weeks and 6 days ago
That's IF you're using dynamically-assigned IPs...some people prefer static IP assignment (including newbs).
unixmonkey11373 · 804 weeks and 6 days ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands



Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: