LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-05-2007, 10:44 AM   #1
uncle-c
Member
 
Registered: Oct 2006
Location: The Ether
Distribution: Fedora 14, Ubuntu , Slax 5.1.8, OpenSolaris, Centos 4.8
Posts: 296

Rep: Reputation: 30
Prob involving tcpdump + ping on liveCD


Hi,
Just mucking about on the Slax 5.1.8 live CD but perhaps this prob may apply to any live CD.

I want to look at some tcpdump output when I ping the local host. The machine is not connected to the Internet it is just a regular standalone with NIC at eth0.

I open up two terminals. In the first one I run :

Code:
bash # tcpdump -i eth0 icmp
and in the second one :

Code:
bash # ping -c 2 127.0.0.1
Now the "ping" command works fine, but there is no response from the tcpdump terminal. It remains speechless. I have tried using the -v argument but to no avail.
No firewall/IPTables running and ipconfig indicates NIC is at eth0. If took the liberty of issuing the

Code:
ipconfig lo 127.0.0.1
prior to running both tcpdump and ping.
Any clues ?

Cheers,
Uncle.

Last edited by uncle-c; 03-05-2007 at 10:46 AM.
 
Old 03-05-2007, 11:45 AM   #2
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
uncle-c,

Do you see the problem here? You're telling it to listen on eth0, then you're pinging the loopback device...
 
Old 03-05-2007, 02:48 PM   #3
uncle-c
Member
 
Registered: Oct 2006
Location: The Ether
Distribution: Fedora 14, Ubuntu , Slax 5.1.8, OpenSolaris, Centos 4.8
Posts: 296

Original Poster
Rep: Reputation: 30
I altered the command to tcpdump -i 127.0.0.1 icmp ( ping 127.0.0.1) but get adaptor error.
Also tcpdump -i 192.168.0.2 icmp ( the IP address) and ping 192.168.0.2 to no effect. I'm flumoxed, only the solution will help me understand where I'm going wrong !!
 
Old 03-05-2007, 03:19 PM   #4
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
Try tcpdump -i lo to listen on the loopback device.

If that doesn't work check the results of ifconfig for the proper name.
 
Old 03-05-2007, 05:30 PM   #5
uncle-c
Member
 
Registered: Oct 2006
Location: The Ether
Distribution: Fedora 14, Ubuntu , Slax 5.1.8, OpenSolaris, Centos 4.8
Posts: 296

Original Poster
Rep: Reputation: 30
tcpdump -i lo worked fine when i entered ping 127.0.0.1

but why does it not work when I enter tcpdump -i 127.0.0.1 and ping 127.0.0.1 ?

Thanks again.
Uncle-c

Last edited by uncle-c; 03-05-2007 at 05:31 PM.
 
Old 03-05-2007, 05:39 PM   #6
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
uncle-c, it's a good time to dig into the manpages. It's all there in tcpdump(8).

127.0.0.1 is an IP address, not an interface.

And here is an example for proof:
Code:
[hector@centos1 ~]$ sudo /usr/sbin/tcpdump -D
1.eth0
2.any (Pseudo-device that captures on all interfaces)
3.lo
Next task - look up the -D option in those manpages.
 
Old 03-05-2007, 06:03 PM   #7
uncle-c
Member
 
Registered: Oct 2006
Location: The Ether
Distribution: Fedora 14, Ubuntu , Slax 5.1.8, OpenSolaris, Centos 4.8
Posts: 296

Original Poster
Rep: Reputation: 30
Anomie, thanks for directing me onto the correct learning curve ! Much appreciated.
all good wishes
uncle-c
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Strange Ping Issue - Can't ping localhost but can ping others on LAN code_slinger Linux - Networking 15 03-30-2015 02:39 PM
Puppy on Compaq Presario 5286, LiveCD boot prob. skruffyhound Puppy 6 02-05-2007 08:35 PM
Problems involving installation Visual Basic Imp Linux - Newbie 2 04-25-2006 04:14 PM
have livecd of 'Linux Gentoo' how do i get past the "livecd root #" command line? randell6564 Linux - Distributions 11 11-20-2005 12:31 PM
network and ping prob imagineaxion General 5 09-04-2004 02:45 PM


All times are GMT -5. The time now is 11:11 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration