public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* route problem
@ 2012-01-18  9:17 Prashant Batra (prbatra)
  2012-01-18  9:27 ` Eric Dumazet
  0 siblings, 1 reply; 7+ messages in thread
From: Prashant Batra (prbatra) @ 2012-01-18  9:17 UTC (permalink / raw)
  To: netdev

Hi,

I have added a route for an external ip via a gateway which is available
on the same machine.
I want to capture the packets going to this external IP using PF_PACKET
socket.

#route 
Destination     Gateway         Genmask         Flags Metric Ref    Use
Iface
192.168.101.0   *               255.255.255.0   U     0      0        0
eth1
172.16.60.0     192.168.101.10  255.255.255.0   UG    0      0        0
eth1

So, when a packet is sent to 172.16.60.*, kernel should send arp request
for this gw IP 192.168.101.10. As gw IP is locally reachable, 
It should send its mac address in arp-response and kernel should send
the packet via that interface.

But what I am seeing is that instead of asking the gateway IP, kernel
sends a arp request for destingation ip(172.16.60.*)

#tcpdump -I eth1
04:12:45.334966 arp who-has 172.16.60.2 tell 192.168.101.20
04:12:46.334839 arp who-has 172.16.60.2 tell 192.168.101.20
04:12:48.334584 arp who-has 172.16.60.2 tell 192.168.101.20
04:12:49.334457 arp who-has 172.16.60.2 tell 192.168.101.20
04:12:50.335329 arp who-has 172.16.60.2 tell 192.168.101.20
04:12:52.335075 arp who-has 172.16.60.2 tell 192.168.101.20
04:12:53.334947 arp who-has 172.16.60.2 tell 192.168.101.20
04:12:54.334821 arp who-has 172.16.60.2 tell 192.168.101.20


Is my understanding correct?

Regards,
Prashant

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-01-19  6:51 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-18  9:17 route problem Prashant Batra (prbatra)
2012-01-18  9:27 ` Eric Dumazet
2012-01-18 10:08   ` Prashant Batra (prbatra)
2012-01-18 10:15     ` Eric Dumazet
2012-01-19  1:29       ` Bill Fink
2012-01-19  5:53         ` Prashant Batra (prbatra)
2012-01-19  6:50         ` Eric Dumazet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox