|
Viewed
Inside MCSE
|
IP RoutingOnce the host name or NetBIOS name is resolved to an IP address, the IP packet must be sent by the sending host to the resolved IP address. Routing is the process of forwarding a packet based on the destination IP address. Routing occurs at a sending TCP/IP host and at an IP router. A router is a device which forwards the packets from one network to another. Routers are also commonly referred to as gateways. In both cases, sending host and router, a decision has to be made about where the packet is forwarded. To make these decisions, the IP layer consults a routing table that is stored in memory. Routing table entries are created by default when TCP/IP initializes and additional entries are added either manually by a system administrator, or automatically through communication with routers. Direct and Indirect DeliveryForwarded IP packets use at least one of two types of delivery based on whether the IP packet is forwarded to the final destination or whether it is forwarded to an IP router. These two types of delivery are known as direct and indirect delivery. Direct delivery occurs when the IP node (either the sending node or an IP router) forwards a packet to the final destination on a directly attached network. The IP node encapsulates the IP datagram in a frame format for the Network Interface Layer (such as Ethernet or Token Ring) addressed to the destination's physical address. Indirect delivery occurs when the IP node (either the sending node or an IP router) forwards a packet to an intermediate node (an IP router) because the final destination is not on a directly attached network. The IP node encapsulates the IP datagram in a frame format, addressed to the IP router's physical address, for the Network Interface Layer (such as Ethernet or Token Ring). IP routing is a combination of direct and indirect deliveries. In the example in Figure 14, when sending packets to node B, node A will perform a direct delivery. When sending packets to node C, node A will perform an indirect delivery to Router 1. Router 1 will perform an indirect delivery to Router 2. Router 2 will perform a direct delivery to node C.
Figure 14 Direct and indirect deliveries The IP Routing TableA routing table is present on all IP nodes. The routing table stores information about IP networks and how they can be reached (either directly or indirectly). Since all IP nodes perform some form of IP routing, routing tables are not exclusive to IP routers. Any node loading the TCP/IP protocol will have a routing table. There are a series of default entries according to the configuration of the node and additional entries can be entered either manually through TCP/IP utilities or dynamically through interaction with routers. When an IP packet is to be forwarded, the routing table is used to determine:
IP Routing Table Entry TypesAn entry in the IP routing table contains the following information: [Network ID, Subnet Mask, Next Hop, Interface, Metric]
Routing table entries can be used to store the following types of routes:
The Route Determination ProcessTo determine which the routing table entry will be used for the forwarding decision, the following process is used:
The result of the route determination process is the choice of a single route in the routing table. The route chosen yields a forwarding IP address (the next hop IP address) and an interface (the port). If the route determination process fails to find a route, IP declares a routing error. For the sending host, an IP routing error is internally indicated to the upper layer protocol such as TCP or UDP. For a router, an ICMP Destination Unreachable-Network Unreachable message is sent to the source host. Example Routing Table for Windows NTTable 28 shows the default routing table for a Windows NT 4.0 host (not a router). The host has a single network interface card and has the IP address 157.55.27.90, subnet mask 255.255.240.0 (/20), and default gateway of 157.55.16.1. Table 28 The Windows NT routing table
To view the IP routing table on a Windows NT-based computer - type route print at a Windows NT command prompt. When determining the forwarding IP address from a route in the routing table:
For example, when traffic is sent to 157.55.16.48, the most specific route is the route for the directly attached network (157.55.16.0/20). The forwarding IP address is set to destination IP address (157.55.16.48) and the interface is the network interface card which has been assigned the IP address 157.55.27.90. When sending traffic to 157.20.0.79, the most specific route is the default route (0.0.0.0/0). The forwarding IP address is set to the gateway address (157.20.16.1) and the interface is the network interface card which has been assigned the IP address 157.55.27.90. Routing ProcessesIn this section, we examine the details of the IP routing processes on all nodes involved in the delivery of an IP packet: the sending host, the intermediate routers, and the destination host. IP on the Sending HostWhen a packet is sent by a sending host, the packet is handed from an upper layer protocol (TCP, UDP, or ICMP) to IP. IP on the sending host does the following: 1. Sets the Time-to-Live (TTL) value to either a default or application-specified value. 2. IP checks its routing table for the best route to the destination IP address.
3. Based on the most specific route, IP determines the forwarding IP address and the interface to be used for forwarding the packet. 4. IP hands the packet, the forwarding IP address, and the interface to ARP, and ARP resolves the forwarding IP address to its MAC address and forwards the packet. IP on the RouterWhen a packet is received at a router, the packet is passed up to IP. IP on the router does the following: 1. IP verifies the IP header checksum.
2. IP verifies whether the destination IP address in the IP datagram corresponds to an IP address assigned to a router interface.
3. If the destination IP address is not the router, IP decreases the TTL by 1.
4. If the TTL is 1 or greater, IP updates the TTL field and calculates a new IP header checksum. 5. IP checks its routing table for the best route to the destination IP address in the IP datagram.
6. Based on the best route found, IP determines the forwarding IP address and the interface to be used for the forwarding. 7. IP hands the packet, the forwarding IP address, and the interface to ARP, and ARP forwards the packet to the appropriate MAC address. This entire process is repeated at each router in the path between the source and destination host. IP on the Destination HostWhen a packet is received at the destination host, it is passed up to IP. IP on the destination host does the following: 1. IP verifies the IP header checksum.
2. IP verifies that the destination IP address in the IP datagram corresponds to an IP address assigned to the host.
3. Based on the IP protocol field, IP passes the IP datagram without the IP header to the appropriate upper-level protocol.
4. For TCP and UDP packets, the destination port is checked and TCP segment or UDP header is processed.
Static and Dynamic IP RoutersIn order for IP routing between routers to occur efficiently in the IP internetwork, routers must have explicit knowledge of remote network IDs or be properly configured with a default route. On large IP internetworks, one of the challenges faced by network administrators is how to maintain the routing tables on their IP routers so that IP traffic flow is traveling the best path and is fault-tolerant. There are two ways of maintaining routing table entries on IP routers:
Static routing relies on the manual administration of the routing table. Remote network IDs are not discovered by static routers and must be manually configured. Static routers are not fault tolerant. If a static router goes down, neighboring routers do not sense the fault and inform other routers.
|
| The MCP Logo is displayed on this web site in accordance with Microsoft Certified Professional Program and Logo Agreement. © Paramvir Likhari 1997 - 1999 |