This preview shows page 1. Sign up to view the full content.
Unformatted text preview: ard
We've mentioned a few times that hosts are not supposed to forward IP datagrams unless file:///D|/Documents%20and%20Settings/bigini/Docum...i/homenet2run/tcpip/tcp-ip-illustrated/ip_rout.htm (9 of 17) [12/09/2001 14.46.51] Chapter 9. IP Routing they have been specifically configured as a router. How is this configuration done?
Most Berkeley-derived implementations have a kernel variable named ipforwarding, or
some similar name. (See Appendix E.) Some systems (BSD/386 and SVR4, for example)
only forward datagrams if this variable is nonzero. SunOS 4.1.x allows three values for the
variable: -1 means never forward and never change the value of the variable, 0 means don't
forward by default but set this variable to 1 when two or more interfaces are up, and 1
means always forward. Solaris 2.x changes the three values to be 0 (never forward), 1
(always forward), and 2 (only forward when two or more interfaces are up).
Older 4.2BSD hosts forwarded datagrams by default, which caused lots of problems for
systems configured improperly. That's why this kernel option must always default to "never
forward" unless the system administrator specifically enables forwarding. 9.5 ICMP Redirect Errors
The ICMP redirect error is sent by a router to the sender of an IP datagram when the
datagram should have been sent to a different router. The concept is simple, as we show in
the three steps in Figure 9.3. The only time we'll see an ICMP redirect is when the host has
a choice of routers to send the packet to. (Recall the earlier example of this we saw in
Figure 7.6.) Figure 9.3 Example of an ICMP redirect.
1. We assume that the host sends an IP datagram to Rl. This routing decision is often
made because Rl is the default router for the host.
2. Rl receives the datagram and performs a lookup in its routing table and determines
that R2 is the correct next-hop router to send the datagram to. When it sends the
datagram to R2, Rl detects that it is sending it out the same interface on which the
View Full Document
This test prep was uploaded on 04/04/2014 for the course ECE EL5373 taught by Professor Guoyang during the Spring '12 term at NYU Poly.
- Spring '12