Solved

Trying to add a static route

Posted on 2007-11-13
7
10,465 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 
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

What, When and Where - Security Threats from Q1

Join Corey Nachreiner, CTO, and Marc Laliberte, Information Security Threat Analyst, on July 26th as they explore their key findings from the first quarter of 2017.

Question has a verified solution.

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

How to set-up an On Demand, IPSec, Site to SIte, VPN from a Draytek Vigor Router to a Cyberoam UTM Appliance. A concise guide to the settings required on both devices
I recently attended Cisco Live! in Las Vegas, a conference that boasted over 28,000 techies in attendance, and a week of hands-on learning hosted by a solid partner with which Concerto goes to market.  Every year, Cisco displays cutting-edge technol…
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…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Suggested Courses
Course of the Month9 days, 16 hours left to enroll

623 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