Solved

Trying to add a static route

Posted on 2007-11-13
7
10,441 Views
Last Modified: 2012-08-13
I am trying to add a static route:

route add 10.0.0.0 mask 255.0.0.0 10.1.1.10 IF 1

I get this error message:
The route addition failed: Either the interface index is wrong or the gateway do
does not lie on the same network as the interface. Check the IP Address Table for
the machine.

I have 2 network cards on this server one that is attatched to our internal network and 1 that is attatched to our outside network. I need to add a route on the internal interface that points back to our core switch. This is probably something dumb that I am missing.

Thanks in advance,
Rory
0
Comment
Question by:rorybrady
7 Comments
 
LVL 28

Expert Comment

by:batry_boy
Comment Utility
My guess is that you have the wrong interface number specified.  If you issue the "route print" command, you will see a hex list of interface numbers at the top.  The hex number for your inside network adapter is the number you want to give the "route add" command.  I believe that "1" is typically the loopback adapter which is why you're getting the error...the output should look similar to the following:

Interface List
0x1 ........................... MS TCP Loopback interface
0x2 ...00 11 22 33 00 08 ...... Broadcom NetXtreme 57xx Gigabit Controller - Packet Scheduler Miniport

In this case, if I wanted to specify the NetXtreme adapter for that route, I would enter the command:

route add 10.0.0.0 mask 255.0.0.0 10.1.1.10 if 2
0
 

Author Comment

by:rorybrady
Comment Utility
Thanks for your quick response! I am still having the same issue.

This is the out put for the route print:
Interface List
0x1 ........................... MS TCP Loopback interface
0x10003 ...00 11 43 d6 65 f5 ...... Intel(R) PRO/1000 MT Network Connection #2
0x10004 ...00 11 43 d6 65 f4 ...... Intel(R) PRO/1000 MT Network Connection
===========================================================================
===========================================================================

I would like to bound this route to local area connection 1. I changed the route command to look like this:
route add 10.0.0.0 mask 255.0.0.0 10.1.1.10 IF 4
I still get the same error message:
The route addition failed: Either the interface index is wrong or the gateway do
es not lie on the same network as the interface. Check the IP Address Table for
the machine.

Thanks,
Rory



0
 
LVL 28

Expert Comment

by:batry_boy
Comment Utility
Based on your output, you should try:

route add 10.0.0.0 mask 255.0.0.0 10.1.1.10 IF 10004
0
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
LVL 28

Expert Comment

by:batry_boy
Comment Utility
I'll admit that's a weird interface index number, but it is what it is...
0
 
LVL 40

Accepted Solution

by:
Fatal_Exception earned 500 total points
Comment Utility
You might even use the entire Hex number, meaning 'if 0x10004'.   This should also work in your case..
0
 
LVL 11

Expert Comment

by:tvman_od
Comment Utility
I'd recommend not to use interface number, just pint it to an IP of the gateway and let system decide which interface to use. Windows can renumber interfaces without any notifications. Besides that I'd recommend to add -p key to make this router persistent
0
 
LVL 40

Expert Comment

by:Fatal_Exception
Comment Utility
Thanks, and have a great day!
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

In the world of WAN, QoS is a pretty important topic for most, if not all, networks. Some WAN technologies have QoS mechanisms built in, but others, such as some L2 WAN's, don't have QoS control in the provider cloud.
Resolve DNS query failed errors for Exchange
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now