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 Code:
bash # ping -c 2 127.0.0.1 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 Any clues ? Cheers, Uncle. |
uncle-c,
Do you see the problem here? You're telling it to listen on eth0, then you're pinging the loopback device... |
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 !! |
Try tcpdump -i lo to listen on the loopback device.
If that doesn't work check the results of ifconfig for the proper name. |
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 |
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 |
Anomie, thanks for directing me onto the correct learning curve ! Much appreciated.
all good wishes uncle-c |
All times are GMT -5. The time now is 01:28 PM. |