When a router needs to forward a packet to another router for delivery to a remote network, it consults a database of information known as the routing table. This database is stored in the router's random access memory (RAM) to ensure that this lookup process can be performed quickly. As the packet travels across the network toward its destination, each router along the way makes a decision about where to forward the packet by consulting its routing table. When a destination host sends a reply packet, it is possible that the same path may not be used to reach the original sender. This depends on the metrics of each path along the route. In other words, the way to the destination host may not be the best path back. The following sections discuss the two types of routing: static and dynamic. Static RoutingObjective: Manage TCP/IP routing.
Manually configuring the routing table of a host with the routes for each destination network is known as static routing. Static routing is best suited to small environments where the amount of information to configure is small and the overhead of generating the routing information is unacceptable. Static routers do not scale well to large or frequently changing internetworks because of their manual administration. Using the route Command to Configure Static RoutesThe route command is primarily used to configure static routes within a network. It can also be used to troubleshoot by listing all the routes that the computer knows about. The syntax of the route command is as follows: ROUTE [-f] [-p] [command [destination] [MASK netmask] [gateway] [METRIC metric] [IF interface] Table 7.1 describes the parameters that can be used with the route command.
Note: The mask Parameter The mask parameter defines what portion of the destination address must match for the route to be used. When the mask is written in binary, a 1 is significant (that is, must match), and a 0 need not match. For example, say that a 255.255.255.255 mask is used for a host entry. The mask of all 255s (that is, all 1s) means that the destination address of the packet to be routed must exactly match the network address for this route to be used. As another example, say the network address 157.57.8.0 has a netmask of 255.255.248.0. This netmask means that both of the first two octets must match, the first 5 bits of the third octet must match (that is, 248 must equal 11111000), and the last octet does not matter. Thus, any address of 157.57 and the third octet of 8 through 15 (that is, 15=00001111) will use this route. The gateway parameter specifies where the packet needs to be sent. This can be the local NIC or a router on the local subnet. The meTRic parameter specifies a cost that is to be associated with the route. This cost is used in the decision about how packets should be routed. Packets are routed through the route that has the lowest cost. Step by Step 7.3 shows how to add a static route for the network 10.100.10.0. Step By Step7.3. Adding a Static Route to Windows Server 2003
Dynamic RoutingGenerating routing table information by learning the routes from information on the network is called dynamic routing. This is done by using a dynamic routing protocol such as RIP or OSPF. Let's examine what a routing protocol is: A general definition of protocol is "an agreed-on method for exchanging data between two devices." A routing protocol defines the method for exchanging routing information between two routing devices. A dynamic routing protocol is used to exchange routing information that is built and maintained automatically. When you are using a dynamic routing protocol, routing information is exchanged between routers to update the information kept in their routing tables. This can be done either periodically (at scheduled intervals) or on demand. If they are set up correctly at the outset, dynamic routers require little administration after they have been configured. Because they learn routing information dynamically, and have the ability to route around failures when the network architecture will support it, dynamic routers are generally used in large network environments where it would not be practical to use static routing. The two dynamic routing protocols that are supported by Windows Server 2003 are RIP and OSPF. |