From: Nikola Novak on
Hello,

What happens if a router receives and ICMP Echo request, but the source
address in the IP packet it is contained in doesn't match any entries in
its routing table, and the default gateway isn't set?

Thanks,
Nikola
From: Moe Trin on
On Thu, 14 Jan 2010, in the Usenet newsgroup comp.os.linux.networking, in
article <1lp850idw5sg.15tb7yx3ssl8u$.dlg(a)40tude.net>, Nikola Novak wrote:

>What happens if a router receives and ICMP Echo request, but the
>source address in the IP packet it is contained in doesn't match any
>entries in its routing table, and the default gateway isn't set?

It forwards the packet to the destination host. If that destination
is itself and the ping function is not disabled, it can't reply - so
drop the packet. Originally, it would not try to send an ICMP
error (requirement - no ICMP error to ICMP), but that's now been
re-written as "no ICMP error to an ICMP _error_ packet" and a ping
isn't an error. None the less, who would it try to send the error
to? You can't get there from here.

Old guy
From: Pascal Hambourg on
Hello,

Nikola Novak a �crit :
>
> What happens if a router receives and ICMP Echo request, but the source
> address in the IP packet it is contained in doesn't match any entries in
> its routing table, and the default gateway isn't set?

As this is a Linux networking group, I'll assume that your question is
about a Linux-based router.

If source address filtering by reverse path (rp_filter) is enabled on
the incoming interface, then the packet is discarded. The packet is also
discarded if the output interface for the source address in the routing
table does not match the incoming interface of the packet. Otherwise,
the packet is forwarded.
From: Nikola Novak on
On Thu, 14 Jan 2010 21:17:59 +0100, Pascal Hambourg wrote:

> Hello,
>
> Nikola Novak a �crit :
>>
>> What happens if a router receives and ICMP Echo request, but the source
>> address in the IP packet it is contained in doesn't match any entries in
>> its routing table, and the default gateway isn't set?
>
> As this is a Linux networking group, I'll assume that your question is
> about a Linux-based router.
>
> If source address filtering by reverse path (rp_filter) is enabled on
> the incoming interface, then the packet is discarded. The packet is also
> discarded if the output interface for the source address in the routing
> table does not match the incoming interface of the packet. Otherwise,
> the packet is forwarded.

Sorry, I thought I made it clear that the ICMP Echo request was sent to the
address of the router in question (the one that received it), and wasn't
meant to be forwarded. Therefore, the router needs to send back the ICMP
Echo Reply packet (assuming this is enabled), but the source address from
the IP packet it received doesn't match any of the entries in its routing
tables, and it doesn't use the default gateway. What happens?

Assume that rp_filter is disabled and the packet arrived on the proper
interface according to the routing table.

Thanks,
Nikola
From: Pascal Hambourg on
Nikola Novak a �crit :
> On Thu, 14 Jan 2010 21:17:59 +0100, Pascal Hambourg wrote:
>
>> Nikola Novak a �crit :
>>> What happens if a router receives and ICMP Echo request, but the source
>>> address in the IP packet it is contained in doesn't match any entries in
>>> its routing table, and the default gateway isn't set?
>>
>> As this is a Linux networking group, I'll assume that your question is
>> about a Linux-based router.
>>
>> If source address filtering by reverse path (rp_filter) is enabled on
>> the incoming interface, then the packet is discarded. The packet is also
>> discarded if the output interface for the source address in the routing
>> table does not match the incoming interface of the packet. Otherwise,
>> the packet is forwarded.
>
> Sorry, I thought I made it clear that the ICMP Echo request was sent to the
> address of the router in question (the one that received it), and wasn't
> meant to be forwarded.

Then just replace "forwarded" by "locally delivered" in my previous
reply. Sorry but it was not clear to me. Why a router and not a host ?

> Therefore, the router needs to send back the ICMP
> Echo Reply packet (assuming this is enabled), but the source address from
> the IP packet it received doesn't match any of the entries in its routing
> tables, and it doesn't use the default gateway. What happens?

Nothing. As Moe wrote, there is no route so the ICMP echo reply cannot
be sent, end of the story. Maybe the kernel sends a "network
unreachable" error to itself, but this is rather pointless IMHO.

> Assume that rp_filter is disabled and the packet arrived on the proper
> interface according to the routing table.

If there is no route for the source address, then there is no proper
interface either. Anyway when rp_filter is disabled, it does not matter
whether there is a route or not.
 |  Next  |  Last
Pages: 1 2 3
Prev: FIOS?
Next: remote access to desktops