ping failed but tcpdump captured echo request/reply packets

aldebran

New Member


Messages: 2

hi,
I'm configuring a network card on freebsd 7.0 which is
intalled on a laptop(Tinkpad T61) and encounter a problem.

My card is em0, media is 100baseTX(full-duplex). I
use the following command to assign an ipv4 adrress
# ifconfig em0 192.168.10.221/24

After ifconfig, I ping the gateway 192.168.10.1, but ping
replied with no answers. I use tcpdump to capture the
packets, and do see the gateway 192.168.10.1 replies.
The route table is also right.
Destination Gateway interface
192.168.10.0/24 link#1 em0

Why the ping failed? Has anyone encoutered this problem
before and could you share your solution with me?
 

DutchDaemon

Administrator
Staff member
Administrator
Moderator
Developer

Reaction score: 3,051
Messages: 11,380

Try

Code:
route add default gw 192.168.10.1


to make sure.

The output of netstat -rn should really show default 192.168.10.1 on the first line.
 
OP
A

aldebran

New Member


Messages: 2

Thanks. This problem is due to the gateway.

When the gateway send ICMP echo-replies,
it use an old MAC address. The tcpdump can capture the ICMP echo request/reply packets because the NIC has been put into promiscuous mode. However, the NIC now has a new MAC address, and it will not deliver
the packets with the old MAC address to the IP layer. The consequence is
that: ping failed but tcpdump captured echo request/reply packets.

I'm ashamed that when capturing packets I usually don't turn on the -e
option. After pondering for a long while, I guessed out the above cause.
I'm so sorry for wasting your valuable time.
 

honk

Active Member

Reaction score: 19
Messages: 147

I guess the ping should work as long as tcpdump is running.
 
Top