From: Eric Dumazet <eric.dumazet@gmail.com>
To: "Prashant Batra (prbatra)" <prbatra@cisco.com>
Cc: netdev@vger.kernel.org
Subject: RE: route problem
Date: Wed, 18 Jan 2012 11:15:23 +0100 [thread overview]
Message-ID: <1326881723.2316.2.camel@edumazet-HP-Compaq-6005-Pro-SFF-PC> (raw)
In-Reply-To: <B97B134FACB2024DB45F524AB0A7B7F2058B020A@XMB-BGL-419.cisco.com>
Le mercredi 18 janvier 2012 à 15:38 +0530, Prashant Batra (prbatra) a
écrit :
> 2.6.18 kernel.
>
Please dont top post on netdev mailing list
> -----Original Message-----
> From: Eric Dumazet [mailto:eric.dumazet@gmail.com]
> Sent: Wednesday, January 18, 2012 2:58 PM
> To: Prashant Batra (prbatra)
> Cc: netdev@vger.kernel.org
> Subject: Re: route problem
>
> Le mercredi 18 janvier 2012 à 14:47 +0530, Prashant Batra (prbatra) a
> écrit :
> > 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
> >
This comes from another machine, since your eth1 addr is 192.168.101.10
next prev parent reply other threads:[~2012-01-18 10:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2012-01-19 1:29 ` Bill Fink
2012-01-19 5:53 ` Prashant Batra (prbatra)
2012-01-19 6:50 ` Eric Dumazet
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1326881723.2316.2.camel@edumazet-HP-Compaq-6005-Pro-SFF-PC \
--to=eric.dumazet@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=prbatra@cisco.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox