1. For the host which is not configured as router, datagrams received through the network interfaces that are not ours are dropped.
2. the steps that IP performs when it searches its routing table.
1) Search for a matching host address.
2) Search for a matching network address.
3) Search for a default entry. (The default entry is normally specified in the routing table as a network entry, with a network ID of 0.)
A matching host address is always used before a matching network address.
先匹配主机地址,然后匹配网络地址
3. netstat -rn
for a given route, the flag is like following,
4. indirect route VS. direct route
A packet going out a direct route has both the IP address and the link-layer address specifying the destination (without G flag);
When a packet is sent out an indirect route, the IP address specifies the final destination but the link-layer address specifies the gateway (that is, the next-hop router).
5. The H flag, however, specifies that the destination address (the first column of netstat output) is a complete host address. The absence of the H flag means the destination address is a network address (the host ID portion will be 0).
如果没有H,说明是一个网络号,例如3中的最后一条
6. The ICMP "host unreachable" error message is sent by a router when it receives an IP datagram that it cannot deliver or forward.
for example,
7. ICMP Redirect Errors
ICMP redirects allow TCP/IP hosts to be dumb when it comes to routing, with all the intelligence in the routers