In this article we will talk about IP routing in Windows Server. We will see how to configure static routes and what are the main principles behind this operation. By now you should know the basics of networking, if not, please check out my Networking Fundamentals articles. Once you get familiar with all these networking elements (routers, switches, IP, gateway, network mask, etc.) and you will understand how are these things correlated in the routing mechanism, this lesson will be easier to digest. I will try to picture an overview of the routing process in Windows Server and we will explore some of the commands used in Windows routing. For this lesson I will be using a Windows Server 2008 R2 machine.
The intranet of a network that spans several geographical areas stands in the core of the communication process. The intranet consists of different small networks interconnected to form a large communication channel between all devices. At the edge of each network lies a router which is usually used as the default gateway for all network devices. Routers have different interconnected routes to enable communication flows between offices. An ISP would normally provide the physical channel through which devices communicate but, it’s up to the network administrators to configure and troubleshoot them. Routing, as a concept, is a mechanism that provides the means to send network packets from one host to another. If one of these hosts is a Windows machine, then you would need to know some of the tools used in routing.
The most important utility used in networking is ping. Ping is used to test the response of remote machines. You probably know how to ping a remote machine but, I will show you anyway. Open a command prompt and type in ping [machine IP or name]:
The ping command will return a response message deppending on the information received from the remote host. Ping can be disabled so that ping messages are not accepted but, this is another story. Disabling the ICMP protocol is usually configured on Servers exposed to the Internet. By the way, ICMP or Internet Control Message Protocol is the protocol used by the Ping tool. For more information about ICMP, check out this article from Wikipedia.
Pathping and tracert are two powerful windows tools with which you can verify how network packets are sent from your host to a remote machine. These tools offer similar results but, Pathping will give you detailed information about each hop (like response time). Using these tools you can determine how packets are routed from one point to another. These are the results of using pathping and tracert against the same remote IP:
Although routing protocols are usually configured on routers, I will show you how to configure RIPv2 on a Windows machine since this feature is available. Before configuring this routing protocol, we’ll have to install the Routing and Remote Access Services. Open the Server Manager console, navigate to the Roles section and press the Add Roles button. From the Server Roles selection menu, check the Network Policy and Access Services:
Press next until you get to the Role Services section, select Routing and Remote Access Services and proceed with the installation.
Expand the Roles section, navigate to Network Policy and Access Services/Routing and Remote Access, right click this section and select Configure and Enable Routing and Remote Access:
Press next until you get to the Routing and Remote Access Server Setup Wizard and select Custom configuration:
From the following page check the LAN routing box. You will then be promoted to Start the Routing and remote access service:
Wait until the service is configured then press finish. At this point we are ready to configure RIPv2. Expand Routing and Remote Access, IPv4, right click General and select New Routing Protocol:
Select RIP Version 2 for Internet Protocol:
You’ll have to add the interface that will be used by RIP to send routing messages. Right click the RIP section and select New Interface:
Select the desired network interface and press OK:
In the next section you can set custom settings that will modify RIP’s behavior:
General – set the operation mode, the RIP version used for Outgoing/Incoming messages and configure authentication settings:
In the Security tab you can add IP ranges used to update the routing information. By default, all routes will be accepted:
Neighbors – specify how will the router interact with listed neighboring RIP routers:
In the advanced section you can modify some of the features available with RIPv2:
I will not explain them right now because I’ve talked about RIPv2 in a previous article and all of its features in past articles.
After you press OK, RIP will be enabled and it will advertise routes as configured. Note that this configuration must be made on each network interface.
When using dynamic routing protocols like RIPv2 you would not need to configure any additional routes. There are situations in which you’d need to create static routes to forward traffic to/from certain networks. To add a static route on a Windows server, open a command prompt and type in the following:
route -p add [network IP] mask [network mask] [Next hop IP]:
I’ve added a static route for the 192.168.0.0 network that is using 192.168.0.1 as next hop.
To view the newly configured route type route print. This command will display the whole routing table of your machine:
The IPs shown in the routing table are as follows:
0.0.0.0 – this is called the default route. It matches all packets and it’s used as a last resort if there is no alternative route available
10.18.6.0 – the subnet that the computer belongs to
The next lines are showing the loopack address class (127.X.X.X)
If you have additional network interfaces, their IP addresses will appear in the following lines
IP addresses starting with 224 are multicast classes used to send network packets from one source to multiple computers
IPs starting with 255.255.255.255 will be used to match the single IP address assigned to your network interfaces.
Static routing can also be configured using the Routing and Remote Access console. Expand the IPv4 section, right click on Static Routes and select New Static Route:
Enter the required information and press OK. I’ll add a static route to reach the 192.168.0.0 network with 192.168.0.1 as next hop IP address. The route will inform the current server that all traffic destined to 192.168.0.0 network will be sent through 192.168.0.1:
Static routes are most often used when there are machines using two or more network interfaces. After the route is added it will appear in the static routes section of the Routing and Remote Access console:
That’s it for this article folks, hope you’ve understood the main principles behind routing protocols and how to configure RIPv2. If you have any questions don’t hesitate to leave a comment and I will try to respond as soon as possible. Have a great day and stay tuned for the following articles from IT training day.