This article was previously published under Q151795
After you run a ROUTE ADD command, the following error message may appear:
The route addition failed: 87
This message alerts you that you have an addressing problem.
The route addition error message appears in at least these two situations:
The gateway address you specify is not on the same logical subnet as any of the network adapters in your system. For example, if your computer has the following configuration and you use the route add 184.108.40.206 220.127.116.11 command, you receive the error message because the gateway is not on the same logical subnet as your computer:
ip address 18.104.22.168 subnet mask 255.255.0.0
In this example, 22.214.171.124 is the remote subnet you want to reach, and 126.96.36.199 is the gateway address you want to use.
The destination address you enter is a specific host address instead of a subnet address and you specify a netmask.
For example, using the same configuration as the first example, if you wanted to reach the following specific computer, you might use the route add 188.8.131.52 mask 255.255.0.0 184.108.40.206 command:
ip address:220.127.116.11 subnet mask: 255.255.0.0 valid local gateway: 18.104.22.168
This command would give you the error 87 message. The ROUTE command expects the subnet address 22.214.171.124 instead of the specific destination address.
To correctly add a host route, do not specify a netmask. By default, Windows will use a netmask of 255.255.255.255. For example:
route add 126.96.36.199 188.8.131.52
Or use a subnet mask of all 1s (ones), 255.255.255.255. For example: