Re: ICMP REDIRECTs

really kuznet@ms2.inr.ac.ru (inr-linux-kernel@ms2.inr.ac.ru)
16 Apr 1996 14:45:15 +0400


Madhusudana Rao (madhur@sasi.ernet.IN) wrote:
: In the file net/ipv4/ip_forward.c, it says that you do not have to forward
: a frame on the interface that it arrived upon.

No, we MUST (and we DO) forward any frame. But if it has been forwarded
to the same interface that it arrived upon, we send the advice (redirect)
to the host sending it.

Is it okay if someone
: wants to forward a frame on the same interface and disable the ICMP
: REDIRECTs ?

It is not OK. You should not disable redirects in this situation.
But if you really desire to spend your network bandwidth and
routers CPU cycles, you may tell
#define CONFIG_IP_NO_ICMP_REDIRECT
in ip_forward.c

: 1. It may be needed when you have more than one router on the same cable
: and you want to set the default routes to only one router. One can,
: though, argue against such a situation, but it can happen.

It is redirects that solve this problem!
You set up one default router, and all the packets are sent inittially to it,
then the network is automatically tuned by redirects.

: 2. The situation may arise where one may want to set up default routes to
: a single host, IP masquerade and let all the connection to appear
: from this host.
:
Agree. It may be serious reason to disable redirects.

: 3. Is it okay, if I define CONFIG_IP_NO_ICMP_REDIRECT in the file
: /usr/src/linux/include/net/ip_masq.h as

: #ifndef CONFIG_IP_NO_ICMP_REDIRECT
: #define CONFIG_IP_NO_ICMP_REDIRECT
: #endif

: to accomplish the desired effect for the point 2 ?

You are right.

Alexey Kuznetsov