Static Routing in Windows Server 2008

Static Routing
in Windows Server 2008

We have been using the route command for years. You can configure
static routing in Windows 2008 Server using either the route command or using
the GUI. However, if you use the Windows GUI interface, those routes will not
be listed in the CLI interface, when you type route print. Thus, I
highly recommend that if you are going to use static routing in Windows 2008,
you just use the route command at the windows command prompt.

So let’s look at some examples of how you configure static routing using
the route command:

Show the static routing table

Showing the static routing table is easy, just use the route print
command, as you see in Figure 1 below.

Figure 1: Showing the IP Routing table in Windows Server 2008

In the route print output, the first important thing that you see is the
interface list. Windows Server IP interfaces are labeled with an interface
number. The interface numbers in Figure 1 are 16, 14, 1, 15, 20, and 12. These
interface numbers are used whenever you add or delete routes to the routing

The second important thing in the route print output is the IPv4
Routing Table. This shows us the network destination, network mask, the default
gateway, interface, and metric. This table tells the Windows Server where to
route the traffic.

Add a static route

So how do you add a static route at the command line? The answer is easy-
use the route add command, like this:

route add mask if 1

As you see in Figure 2, the results of our route add was an affirmative

Figure 2: Using the route add command in Windows 2008

What was important in the route add command was the network we want to add,
its subnet, the destination/gateway, and the interface for that route.

This writes the persistent route to the following Windows Registry key as a
string value (REG_SZ):



Delete a static route
Deleting a route is even easier than adding a route. All you have to do is
to tell route delete the network that you want to remove, as you see in
Figure 3.

Figure 3: Using the route
delete command in Windows 2008

So those are the basics of configuring static routes at the command line.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s