Advanced IP Configuration


A segment is a section of a network that is bounded by a bridge or other Layer 2 device. A network segment is a section of a network that is bounded by a router or other Layer 3 device. A network (or internetwork) is two or more TCP/IP network segments that are interconnected by routers. A router is a device that forwards IP packets from one network segment (also known as a subnet) to another. The router might be a dedicated hardware device built for that purpose or routing software running on a computer.

Understanding Internetwork Routing Strategy

Routing is the forwarding of packets based on the contents of a local routing table.

In the context of internetworking, the terms routed protocol and routing protocol are often confused. Routed protocols are protocols, such as IP, that support addressing for multiple network segments in an internetwork. Routing protocols are used by routers to communicate network segment reachability information.

Routing protocols are typically not of concern to a user of a Windows XP Professional client connected to a network. A general awareness of routing on the internetwork, however, can be helpful, as described in the following sections.

IP Packet Transmission

When IP prepares to send a packet, it inserts the source IP address and the destination IP address of the packet in the IP header. Next, it examines the destination address, compares it to a locally maintained routing table, and takes appropriate action based on what it finds. There are three possible actions:

  • IP can pass the packet up to a protocol layer above IP on the local host.

  • The packet can be forwarded through one of the locally attached network adapters.

  • The packet can be discarded.

IP looks for a match of the destination address in the routing table from the most specific to the most general in the following order:

  • The destination address (host route).

  • A portion of the destination address (subnet route).

  • No part of the destination address (default route).

IP always finds the route(s) that is closest to the destination address of the packet being forwarded.

If a default gateway is not specified and no other match is found, the packet is discarded.

The default gateway forwards the packet to other routers until the packet is eventually delivered to a router connected to the subnet of the destination. This example of routing is shown in Figure 21-1.


Figure 21-1: IP packet routing

For each Windows XP Professional based computer on a TCP/IP network, you can maintain a routing table with an entry for every subnet with which the local computer communicates. For a limited number of subnets, this method can be used for network connectivity. But for most networks, this is not a practical solution due to the large number of subnets that must be listed and maintained in the routing table. Therefore, in most cases, rather than configuring the Windows XP Professional-based computer with routes for every subnet, a default gateway is configured.

Configuring the Local IP Routing Table

A Windows XP Professional based computer uses its local IP routing table to determine how to forward an IP packet to reach a specified destination. The local routing table can be configured in the following ways:

Determining Methods for Identifying Gateways and Managing Routing Paths

In an enterprise with multiple subnets, a route to remote destinations must exist to enable communication with hosts on other networks. Windows XP Professional supports manual entry of the default gateways, as well as the use of ICMP Router Discovery to find and specify default gateways. Routing table maintenance is supported by means of manual configuration of the routing table and a Routing Information Protocol (RIP) Listener for automated maintenance of the routing table. Select the methods that reflect your network configuration.

Manually Configuring Default Gateways

If a specific route for the destination does not exist in the routing table, the packet is directed to the default gateway. Windows XP Professional allows you to specify multiple default gateways. You can list them in order, based on availability, load balancing, or other criteria.

You can also assign a value to each gateway, known as the cost metric, which determines the cost of forwarding an IP packet to the specific router. For multiple routes to the same destination, the route with the lowest cost metric is the most preferred entry in the routing table. You can either manually assign the cost metric of the gateway or have Windows XP Professional automatically determine the metric based on the speed of the networking interface.

To specify default gateways

  1. In Control Panel, click Network and Internet Connections (default view).

  2. Click Network Connections.

  3. In Network Connections, right-click the local area connection you want to modify, and then click Properties.

  4. Select Internet Protocol (TCP/IP), click Properties, and then click Advanced.

  5. Verify that the Automatic metric check box is selected (it is selected by default) to enable automatic determination of interface-based metrics.

  6. In the Default gateways box, click Add.

  7. Type the IP address and metric for the default gateway.

    This interface provides automatic determination for the default gateway. The metric is the cost of using a specified route. The gateway with the lowest metric is used first. The default metric value for each gateway is Automatic metric.

  8. Click Add.

  9. Click OK when you have specified all the default gateways for the connection.

Alternately, default gateway addresses and metrics can be provided by a DHCP server. However, gateway configuration information specified in connection properties override addresses provided through DHCP. For more information about configuring DHCP, see Configuring IP Addressing and Name Resolution in this book.

Configuring ICMP Router Discovery

ICMP Router Discovery automates the discovery and configuration of the default gateways for a Windows XP Professional based client. If ICMP Router Discovery-enabled routers are used on your network, you can use this method of configuring default gateways.

ICMP Router Discovery provides an effective method of detecting and configuring default gateways. Instead of configuring a default gateway manually or by using DHCP, Windows XP Professional based computers can dynamically discover the best default gateway to use on a subnet and can automatically switch to another default gateway if the first default gateway fails or the network administrator changes router preferences.

The ICMP Router Discovery messages are called Router Advertisements. The Router Advertisement parameter can be controlled by any router that is compliant with RFC 1256. Windows 2000 Server with the Routing and Remote Access service supports ICMP Router Discovery.

When a Windows XP Professional based computer configured for ICMP Router Discovery initializes, it joins the all-hosts IP multicast group (224.0.0.1) and listens for ICMP Router Advertisement messages. ICMP Router Discovery-enabled routers periodically send ICMP Router Advertisements containing their IP address, a preference level, and a period of time after which they can be considered down. Each host in the IP multicast group (224.0.0.1) receives the ICMP Router Advertisements and selects the router with the highest preference level as its default gateway.

A Windows XP Professional based computer can also send ICMP Router Solicitation messages to the all-routers IP multicast address (224.0.0.2) at initialization, or at a point when it has not received a ICMP Router Advertisement for the current default gateway within the advertised lifetime of the default gateway router. Windows XP Professional based hosts send a maximum of three solicitations at intervals of approximately 600 milliseconds.

The use of ICMP Router Discovery is determined by the value of a registry entry. If the value of PerformRouterDiscovery is 1, ICMP Router Discovery is enabled.

The value of another registry entry will allow you to send ICMP Router Discovery Solicitation messages as limited broadcasts instead of multicasts.

Windows XP Professional does not add this entry to the registry. You can add it by editing the registry or by using a program that edits the registry. This entry is used only when router discovery is enabled, that is, when the value of PerformRouterDiscovery is 1.

Caution 

Do not edit the registry unless you have no alternative. The registry editor bypasses standard safeguards, allowing settings that can damage your system, or even require you to reinstall Windows. If you must edit the registry, back it up first and see the Registry Reference in the Microsoft Windows 2000 Server Resource Kit at http://www.microsoft.com/reskit

Manually Editing the Routing Table

There are several instances when you might need to manually edit the local routing table for your Windows XP Professional based computer:

You can display the current routing table to determine whether any changes are required. To see the routing table for your computer, at the command prompt type:

route print 

The route print command produces a routing table display such as the following:

========================================================================
Interface List
0x1 ........................... MS TCP Loopback interface
0x2000002 ...00 c0 4f 49 f3 b2 ...... 3Com EtherLink PCI (QoS Packet Scheduler)
========================================================================
========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 172.16.0.1 172.16.4.120 30
127.0.0.0 255.0.0.0 127.0.0.1 127.0.0.1 1
172.16.0.0 255.255.248.0 172.16.4.120 172.16.4.120 30
172.16.4.120 255.255.255.255 127.0.0.1 127.0.0.1 30
172.16.255.255 255.255.255.255 172.16.4.120 172.16.4.120 30
224.0.0.0 240.0.0.0 172.16.4.120 172.16.4.120 1
255.255.255.255 255.255.255.255 127.0.0.1 127.0.0.1 1
Default Gateway: 172.16.4.1

The routing table shows a computer with the IP address 172.16.4.120, subnet mask of 255.255.248.0, and a default gateway of 172.16.4.1. The routing table contains the following seven entries:

  1. The default route, used when forwarding packets to all locations off the local subnet.

  2. The loopback route, the route a host uses when sending packets to itself.

  3. A subnet route for the locally attached subnet.

  4. A host route for the local host (the route for packets sent to this host computer).

  5. A host route for a special type of IP broadcast address called the all-subnets directed broadcast.

  6. The IP multicast route, the route used when the computer sends packets to an IP multicast group.

  7. A host route for the limited broadcast address.

Network Destination

The network address in the routing table is the destination address. The network destination column can have three different types of entries, as listed here in order from most to least specific:

  1. Host address (a route to a single, specific destination IP address).

  2. Subnet address (a route to a subnet).

  3. Default route of 0.0.0.0 (a route used when there is no other match).

If no match is found, the packets are discarded.

Netmask

The netmask defines which part of the destination must match the network address in order for that route to be considered a match with the destination address of the packet being forwarded. When the mask is written in binary, a 1 indicates a bit that must match, and a 0 indicates a bit that does not have to match.

For example, the mask of all 1s (255.255.255.255) means that the destination address of the packet to be forwarded must exactly match the entire host address for this route to be considered a match. For another example, if the network address 192.168.232.0 has a netmask of 255.255.255.0, then the first three octets must match exactly, but the last octet need not match.

Gateway Address

The gateway address in the routing table is used to determine the forwarding IP address. This will be either the host s own IP address or the address of a router on the local attached subnet. If the gateway address of the route is the host IP address, then the forwarding IP address is set to the destination IP address in the IP datagram, that is the IP address of the host you are attempting to contact whether that host is on the local subnet or on a remote subnet. If the gateway address of the route is not the host IP address, then the forwarding IP address is set to the gateway address, which is typically the address of a router on the local subnet.

Interface

The interface is the IP address of the network adapter from which the packet must be sent. 127.0.0.1 is the software loopback address.

Metric

The metric indicates the cost of the route. In the case of RIP routes, the cost is determined by the number of hops (routers to cross) to the destination. Anything on the local subnet is one hop, and each router crossed after that is an additional hop. The metric is used to decide which route to use when there are multiple closest matching routes with the destination address.

To add static routes, use the following format:

Route add subnet mask netmask gateway metric metric if interface 

The following is an example route:

Route add 172.20.255.0 mask 255.255.255.0 172.20.234.232 metric 2 if 33554434 

The route in this example demonstrates that to reach the subnet 172.20.255.0 with a mask of 255.255.255.0, use gateway 172.20.234.232, and that the route has a cost metric of 2 (for example, the subnet is 2 hops away), using interface 33554434.

Note 

The interface number used in the route print command is the decimal version. The interface number, as it appears in the route print display is the hexadecimal version. For example, 0x200002 is the hexadecimal version of 33554434 decimal.

Limitations of Manual Maintenance

The creation of static routes and the manual maintenance of routing tables has several major limitations:

Configure RIP Listening Support

Routing Information Protocol (RIP) can be used to address the challenges of supporting routing in an enterprise environment. If one or more of the routers on your subnet uses RIP to send routing information, your Windows XP Professional based computer can be configured to listen to RIP messages. By configuring your computer to listen in, it can learn other routes on the network and then add the appropriate routes to the IP routing table. This process is called RIP listening or silent RIP.

Network administrators can use RIP listening on multihomed hosts to solve the problem of multiple default gateways without manually adding routes to the routing table. Figure 21-2 shows an example of a multihomed host that uses RIP listening.

click to expand
Figure 21-2: Host using RIP listening

In Figure 21-2, Both Router 1 and Router 2 are RIP routers. The Windows XP Professional based computer is enabled as a RIP listener. It adds routes to both subnets. The Windows XP Professional based computer is not configured with a default gateway.

Windows XP Professional supports routers using either RIP version 1 or RIP version 2 as long as the RIP messages are sent as subnet-level broadcasts. RIP version 2 messages sent as multicasts are not received by the RIP listener.

RIP listening support is installed as an optional service to Windows XP Professional.

To install RIP listening support

  1. In Control Panel, double-click Add or Remove Programs.

  2. Select Add/Remove Windows Components.

  3. In the Windows Components Wizard, click Networking Services.

  4. Click Details.

  5. Select the RIP Listener check box.

  6. Click OK, and then click Next.




Microsoft Windows XP Professional Resource Kit 2003
Microsoft Windows XP Professional Resource Kit 2003
ISBN: N/A
EAN: N/A
Year: 2005
Pages: 338
BUY ON AMAZON

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net