Click to See Complete Forum and Search --> : routing question
crokett
01-23-2003, 04:15 PM
My office was recently converted from token ring to ethernet. Before the conversion, I could use the route add command to add a route for the ip address of a machine sitting behind the router in our hardware lab. I just used the external interface on the router as the gateway. Now my office machine is on a different subnet than the router in the lab (still on token ring). Route add fails. Is there any way to get around this?
You've been around here long enough that I'm sure you know what you're doing, but I might as well ask a few obvious things:
-What is the exact syntax of the route command you are trying?
- Is the router the default gateway for your subnet?
- In the upgrade/changeover, was the router replaced? If so, what's the current make/model?
Also, sorry for being so vague (or possibly lame); I've been on the boards all day and my brain hears a beer calling very soon...
:)
crokett
01-23-2003, 09:21 PM
Originally posted by DMR
You've been around here long enough that I'm sure you know what you're doing, but I might as well ask a few obvious things:
-What is the exact syntax of the route command you are trying?
- Is the router the default gateway for your subnet?
- In the upgrade/changeover, was the router replaced? If so, what's the current make/model?
Also, sorry for being so vague (or possibly lame); I've been on the boards all day and my brain hears a beer calling very soon...
:)
Perhaps some details are in order...
The router in the lab is RH Linux using iptables to route/forward traffic in the lab (ethernet) to the site ring and is not the default gateway for my office. The lab has not been converted. Most of the labs haven't. Before the changeover, I was on the same subnet as the router. Now I am not. The syntax of the command is:
route add <destination> <gateway>
where destination is the ip of the machine in the lab and gateway is the ip of the token ring card in the lab router. The problem is the gateway has to be on the same subnet as my office machine. A buddy in another city still on the company ring - he hasn't been converted - has the same problem I am having now. I was told trying to fix him that there isn't a way and that y the gateway in the route add command has to be on the same subnet as the machine you are trying to add the route to.
No prob on the beer. If it weren't so damn cold, I'd be having one. Rather have hot chocolate instead though.
javmarcan
01-24-2003, 07:32 AM
Ok, you probably have more experience than I do in this business so dont blame if I say something stupid for you.
First I think that your machines ip have to be in the same range that your router gateway
you could use a machine to be the router to the routers lab
and the command is
route add -net <net> gw <gateway>
crokett
01-24-2003, 09:58 AM
The command is correct. IT used to work before the conversion. I think it is because my office is now on a different network. You are right, I will have to figure out a way to get a machine sitting on both networks. Either that or just get used to walking to the lab again.
ask_123
01-25-2003, 06:26 PM
HAve you enable the IP forwarding in your router/gateway?
cowanrl
01-26-2003, 09:54 AM
As you said, the command you use to add the static route won't change, you just need to change the gateway address you use. Since you are now on a different subnet, it will no longer be the same address you used before.
Most likely you will need to use the same IP address as the default gateway set up on your computer. The only way that won't be the case is if there are 2 routers on your network.
You didn't say whether the computer you are adding the routes on is Windows or Linux but judging by the syntax of the route add command, I'd say it's a Windows machine. To find your default gateway, you can either look in your configuration screens or run ipconfig from the command line. If it's Win9x, use winipcfg from the command line.
Then just use that IP address in your route add command. That should work as long as your default gateway is configured properly so it knows how to get to all the addresses and/or networks you want to add static maps for.
It could also be possible that the Red Hat box that acts as the router for the Lab doesn't have a route back to the new subnet that you are on. If it doesn't know how to get packets back to you, then even using the proper gateway address in your route add command won't work.
MattCauth
01-31-2003, 06:25 AM
Another obvious one, but easy to overlook, especially in light of the recent changes: Double check your subnet mask, and make sure and include it in your ifconfig command once confirmed.
Matt