Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Default route problem

Status
Not open for further replies.

jacko24

Programmer
Jul 31, 2001
15
CA
I cannot add a default route, either manually or at startup. In either case, the addition of the default route fails due to "Network unreachable" . This is IRIX 6.5 on an Indy.

I have added the default router to the hosts file, and have also tried route -n as well. Neither worked. Is this a circular problem? As in, no route to my default router, therefore can't add a route to it?? I have worked with this stuff on Solaris before, but on IRIX I can't figure it out, I don't know why.

Any help would be appreciated.

Thanks
 
I actually figured it out, it was something small and overlooked. But my next question is, what variable can I use in a startup script to get my current IP address?

For example, $VARIABLES used in static-route.options, is there one accessible which holds the value of the machine's IP address?
 
I'd imagine you've already figured this out, but something like this may work:
var1=`ifconfig -a | grep inet | grep -v 127.0.0.1 | awk '{print $2}'`

provided you only have one ip.

-jared
 
Hi,

Have you tried to add the line...

route add default x.y.z.a

...at the end of the file /etc/init.d/network ?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top