This preview shows page 1. Sign up to view the full content.
Unformatted text preview: queue.
In all four cases the packet is sent to the loopback driver, but two different routing
decisions are made.
Initializing a Routing Table
We never said how these routing table entries are created. Whenever an interface is
initialized (normally when the interface's address is set by the ifconfig command) a
direct route is automatically created for that interface. For point-to-point links and the
loopback interface, the route is to a host (i.e., the H flag is set). For broadcast interfaces
such as an Ethernet, the route is to that network.
Routes to hosts or networks that are not directly connected must be entered into the routing
table somehow. One common way is to execute the route command explicitly from the
initialization files when the system is bootstrapped. On the host svr4 the following two
commands were executed to add the entries that we showed earlier:
route add default sun 1
route add slip bsdi 1
The third arguments (default and slip) are the destinations, the fourth argument is the
gateway (router), and the final argument is a routing metric. All that the route command
does with this metric is install the route with the G flag set if the metric is greater than 0, or
without the G flag if the metric is 0. file:///D|/Documents%20and%20Settings/bigini/Docum...i/homenet2run/tcpip/tcp-ip-illustrated/ip_rout.htm (6 of 17) [12/09/2001 14.46.50] Chapter 9. IP Routing Unfortunately, few systems agree on which start-up file contains the route commands. Under 4.4BSD and
BSD/386 it is /etc/netstart, under SVR4 it is /etc/inet/rc.inet, under Solaris 2.x it is
/etc/rc2.d/S69inet, SunOS 4.1.x uses /etc/rc.local, and AIX 3.2.2 uses /etc/rc.net. Some systems allow a default router to be specified in a file such as
/etc/defaultrouter, and this default is added to the routing table on every reboot.
Other ways to initialize a routing table are to run a routing daemon (Chapter 10) or to use
the newer router discovery protocol (Section 9.6).
A More Complex Routing Table
The host sun is the default router for all the hosts on our subnet...
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