I am reading TCP/IP Illustrated recently, and I am confused about the IP Routing.
Here is the routing table in that text:
Flags:
G: The route is to a gateway (router). If this flag is not set, the destination is directly connected.
H: The route is to a host, that is, the destination is a complete host address. If this flag is not set, the route is to a network, and the destination is a network address: a net ID, or a combination of a net ID and a subnet ID.
The author gives some examples about that, one of them is:
Assume the destination address is the host sun, 140.252.13.33. A search is first made for a matching host entry. The two host entries in the table (slip and localhost) don't match, so a search is made through the routing table again for a matching network address. A match is found with the entry 140.252.13.32 (the network IDs and subnet IDs match), so the emd0 interface is used. This is a direct route, so the link-layer address will be the destination address.
That's what makes me confused. The destination address should be the host sun 140.252.13.33
, but as he said, it matches the entry 140.252.13.32
(the network IDs and subnet IDs match), and the flag of this entry is U
, no G
, no H
, the packet will directly send to him, so the packet whose destination address is sun (140.252.13.33
) finally be send to 140.252.13.32
? That doesn't make sense.
Sorry for my bad English; I hope you guys could get what I am talking about.