Solved

Trying to add a static route

Posted on 2007-11-13
7
10,457 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
ID: 20276499
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
ID: 20276562
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
ID: 20276579
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
Create the perfect environment for any meeting

You might have a modern environment with all sorts of high-tech equipment, but what makes it worthwhile is how you seamlessly bring together the presentation with audio, video and lighting. The ATEN Control System provides integrated control and system automation.

 
LVL 28

Expert Comment

by:batry_boy
ID: 20276585
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
ID: 20276899
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
ID: 20277058
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
ID: 20290703
Thanks, and have a great day!
0

Featured Post

The New “Normal” in Modern Enterprise Operations

DevOps for the modern enterprise offers many benefits — increased agility, productivity, and more, but digital transformation isn’t easy, especially if you’re not addressing the right issues. Register for the webinar to dive into the “new normal” for enterprise modern ops.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
how much data has traverse from a particular VIP on F5 from specific date 2 24
EIGRP STUB 19 86
Wifi addin for wireshark? 5 31
Changing Lease Duration for DHCP clients 34 35
PRTG Network Monitor lets you monitor your bandwidth usage, so you know who is using up your bandwidth, and what they're using it for.
Use of TCL script on Cisco devices:  - create file and merge it with running configuration to apply configuration changes
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…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

828 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