TCP IP Illustrated

a matching host address is always used before a

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: efault 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. The routing done by IP, when it searches the routing table and decides which interface to send a packet out, is a routing mechanism. This differs from a routing policy, which is a set of rules that decides which routes go into the routing table. IP performs the routing mechanism while a routing daemon normally provides the routing policy. file:///D|/Documents%20and%20Settings/bigini/Docum...i/homenet2run/tcpip/tcp-ip-illustrated/ip_rout.htm (2 of 17) [12/09/2001 14.46.50] Chapter 9. IP Routing Simple Routing Table Let's start by looking at some typical host routing tables. On the host svr4 we execute the netstat command with the -r option to list the routing table and the -n option, which prints IP addresses in numeric format, rather than as names. (We do this because some of the entries in the routing table are for networks, not hosts. Without the -n option, the netstat command searches the file /etc/networks for the network names. This confuses the discussion by adding another set of names-network names in addition to hostnames.) svr4 % netstat rn Routing tables Gateway Flags Destination 140.252.13.65 140.252.13.35 UGH UH 127.0.0.1 127.0.0.1 default 140.252.13.33 UG 140.252.13.32 140.252.13.34 U Refcnt 0 1 0 4 Use 0 0 0 25043 Interface emd0 lo0 emd0 emd0 The first line says for destination 140.252.13.65 (host slip) the gateway (router) to send the packet to is 140.252.13.35 (bsdi). This is what we expect, since the host slip is connected to bsdi with a SLIP link, and bsdi is on the same Ethernet as this host. There are five different flags that can be printed for a given route. U The route is up. 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...
View Full Document

Ask a homework question - tutors are online