The Windows Routing Table
The Windows Routing Table
The routing table contains route entries. The different types of routes in the routing are:
Host route: A host route provides a route to either of the following destinations:
Specific destination host
Broadcast address
Network routes are identified in the routing table by a subnet mask between 0.0.0.0 and
255.255.255.255.
Default route: Each routing table includes one default route. When a packet is received that has a
destination address that does not correspond to any address in the routing table, the default route
is used to forward this packet. The default route is identified in the routing table by a 0.0.0.0
address and a 0.0.0.0 network mask.
Command line
1. Open a command line window
2. Enter
route print
With static routing, administrators have to manually create and modify the routing table entries. Each
time a change occurs in the network configuration, the entries in the routing table have to be modified
to reflect these changes. Static routing works well in a small network where it is easier to configure a
small number of static routes than it is to configure dynamic routing.
With dynamic routing, routing protocols enable IP routers to communicate with each other. The
routing protocols also enable routers to share the information they have in their routing tables. A
router that is configured to use dynamic routing forwards its routing table’s content to the other
routers configured for dynamic routing at regular time periods or intervals.
Netmask: This is the ask used to associate the destination address with the network destination.
The Netmask value basically specifies what element of the destination address of the packet is
matched to the Network Destination entries. The largest match determines the route that will be
applied to a specific IP packet.
Gateway: After a route is applied to an IP packet, the value specified in the Gateway field defines
the forwarding or next-hop IP address that the packet will use for the network destination.
Interface: The value of the Interface field defines the IP address of the network interface card
(NIC) used to forward the packet to the next hop.
Metric: The value in the Metric field indicates the cost of using the route. The metric determines
which route is applied among the different route options.
The additional fields that can be present in the Windows 2000 routing table and Windows XP routing
table are:
Directly Attached Network ID Routes: This information is used for all routes that are directly
attached. In this case, the Gateway IP address is the interface’s IP address on the specific
network for all networks that are attached.
Remote Network ID Routes: This information is used for those routes that are available through
other routers. The routes are therefore not directly available. Here, the Gateway IP address is the
local router’s IP address that is located between the forwarding node and the remote network.
Host Routes: This field allows users to enter a route to a specific destination host. In this case, the
network destination is the specific host’s IP address. The subnet mask is 255.255.255.255.
Default Route: Users can enter a default route that will be used to forward packets where the
network ID or host route cannot be found in the routing table. In this case, the network destination
is 0.0.0.0. The subnet mask is 0.0.0.0.
route help
route
route print
.
4. The default routing table entries are created whenever the TCP/IP protocol starts on the specific
computer.
5. The default route should be displayed as 0.0.0.0 with the subnet mask of 0.0.0.0.
6. The loopback route should be displayed as 127.0.0.0 with a subnet mask of 255.0.0.0 and
gateway 127.0.0.1.
7. The Network Destination column should contain a route entry for the local computer.
8. Enter
exit
route
command:
1. Click Start, Run, enter cmd, then press Enter to open a command prompt window.
2. Enter the command
route help
route
4. To verify that the correct routing table entry was added, enter route print to view the routing table.
5. If the incorrect gateway or metric was entered, use the route change command to modify these
values.
6. If any other information was incorrectly entered, use the
route delete
route add
3. To verify that the correct routing table entry was deleted, enter
route print
route
route
commands in Windows 2000, Windows XP, and Windows Server 2003 are all the same.
The Routing and Remote Access management console. Access the Routing and Remote Access
console by clicking Start, Administrative Tools, and Routing and Remote Access.
The main differences between the previous routing tables and the Windows Server 2003 routing
tables are listed below:
With Windows Server 2003, the routing metric is automatically calculated by the TCP/IP protocol.
The interface’s speed determines the routing metric. The feature is automatically enabled by
default.
With the previous routing tables, the netmask for the Class D multi-cast is specified as 224.0.0.0.
With Windows Server 2003 routing tables, the netmask for the Class D multi-cast is specified as
240.0.0.0.
The routing tables in Windows Server 2003 can be viewed and maintained through the Routing
and Remote Access management console. In Windows 2000 and Windows XP, routing tables can
only be viewed and modified from the command line with the
route
command.
How to add routing table entries with the Routing and Remote Access console:
1. Click Start, Administrative Tools, and Routing and Remote Access to open the Routing and
Remote Access console.
2. In the console tree, expand the IP Routing node.
3. To view the routing table for an interface, right-click the specific interface then select Show IP
routing Table from the shortcut menu.
4. To add a static routing table entry, expand the IP Routing node then select Static Routes.
5. Right click Static Routes and click Add Static Route on the shortcut menu.
6. The Static Route dialog box opens.
7. From the Interface drop-down list box, select the interface.
8. Enter a value for Destination.
9. Enter a value for Network mask.
10. Enter a value for Gateway.
11. Enter a value for Metric.
12. Leave the demand-dial connections check-box enabled if the route is to be used for demand-dial
connections.
13. Click OK.
How to Delete Routing Table Entries with the Routing and Remote Access Console
1. Click Start, Administrative Tools, and Routing and Remote Access to open the Routing and
Remote Access console.
2. In the console tree, expand the IP Routing node.
3. Select Static Routes to display the current static routes in the right pane.
4. Locate and select the static route to be removed from the IP routing table.
5. Right-click the specific static route then select Delete from the shortcut menu.
6. The static route is immediately removed from the routing table.