From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,66342aa41b0ad9a6 X-Google-Attributes: gidfee84,public From: Nikola Milutinovic Subject: Re: how to prevent ICMP redirects Date: 1998/04/02 Message-ID: <3523AB55.DE89BB7C@EUnet.yu>#1/1 X-Deja-AN: 340215932 Content-Transfer-Encoding: 7bit References: <6fqvnl$mo6$1@nnrp1.dejanews.com> Content-Type: text/plain; charset=us-ascii Organization: Me organized? Not here! Mime-Version: 1.0 Newsgroups: comp.unix.osf.osf1 stefan.osterman@upnet.se wrote: > > Systems with two interfaces each--one fddi and one ethernet--are growing > huge route tables over time. Flags indicate routes are being learned > via ICMP redirect. Systems are not running any dynamic routing protocol > (routed or gated). Is there a way to prevent routes learned by ICMP > redirect from being written into the routing table? ICMP redirect is generated in the following case: 1. you have two routers on the same LAN 2. ROUTER_1 handles (among other) LAN_1 and ROUTER_2 handles LAN_2 3. your host has only a default route to ROUTER_1 4. your hosts has to send a packet to a host HOST_2 on network LAN_2 5. ROUTER_1 receives a packet for LAN_2, which it is not supposed to forward further. Instead, it forwards packet to ROUTER_2. Then it informs your host that ROUTER_2 handles HOST_2 via ICMP redirect. This is all normal, but it can get your routing table very large, because it stores host forwarding information, instead of network ones. The only way out, is to use some of the routing protocols, like RIP. A very good choice for a simple host on a LAN is Routing Daemon - routed. Now, if I understand correctly, your machine has TWO interfaces??? So, it is (some kind of) a ROUTER, then??? (If it's not a router, than what is it?) Well, in Gods name, why don't you have some routing protocol daemon running on it? Now, mind you, routed or gated can't stop ICMP redirect. Nobody can. ICMP is built deep inside IP and it is almost obligatory. It is handled directly by the kernel. The only thing that can be done (GateD only) is to react on ICMP redirect and guess what the change was and than to change it back. Well, I hope this helps. Cheers, Nix.