Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm currently trying to route a 56k connection, which is connected to a PSTN off a microwave transmitter, through a laptop to some ethernet enabled equipment. Essentially I'm using a laptop as a router utilizing a persistant route until proper routing equipment can be flown in. I can connect, route, perform data transfer between my remote points, and the 33kbs is plenty enough bandwidth for my needs using the following route:

route add -p mask if 0x10004

However, if the modem is forced to redial the interface index on the 56k modem changes (0x10004 -> 0xa0004 -> 0xc0004 -> etc) and the route is invalidated.

If I don't specifiy the route, the route add fails with the message that the index is wrong or the gateway isn't on the same interface.

Is there any way to route the 56k connection independant of the interface index to my ethernet interface?

share|improve this question
up vote 1 down vote accepted

I ended up writing a small application with the super creative name DialupRouteMaster.

It checks the destination gateway to see if the route is alive (not in a disconnected state) and if the network is disconnected (redialing, etc) then it attempts to remove the persistent route then recreate it with the correct interface. I unfortunately tried as Geoff suggested, and it is the recommended way to create the route, but if it doesn't work, you'll have to try something else.

share|improve this answer
Kudos for writing your own app for it – Mark Henderson Dec 23 '09 at 5:54
Moral: If you need to ship the system in 48 hours, just write your way around the problem. – Greg Buehler Dec 23 '09 at 6:30

You should be able to leave off the interface, like so:

route add -p mask

And it will use whatever interface it uses to reach It even states that in the help dialog:

"If IF is not given, it tries to find the best interface for a given gateway."

However, I don't know if it's adaptable enough to retain the permanent route when it becomes invalid, then re-instate it when the interface comes back. If it's not, I would think your only recourse is triggering a script to add the route once it's done dialing...

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.