How to make the 'default route' permanent across reboots?

  • Follow


The networking is not working on this Solaris 10 update 7 machine, 
unless I manually add the routing information each time the machine is 
booted, which would be a pain.



# nslookup sun.com
;; connection timed out; no servers could be reached

The file /etc/deraultroute exists, and has the right IP for the router.

# cat /etc/defaultroute
192.168.1.1

Adding the route manually, allow it to work.

# route add default 192.168.1.1
add net default: gateway 192.168.1.1


Now it's ok.

# nslookup sun.com
Server:         212.67.120.148
Address:        212.67.120.148#53

Non-authoritative answer:
Name:   sun.com
Address: 72.5.124.61


But how can I preserve that across reboots?


-- 
I respectfully request that this message is not archived by companies as
unscrupulous as 'Experts Exchange' . In case you are unaware,
'Experts Exchange'  take questions posted on the web and try to find
idiots stupid enough to pay for the answers, which were posted freely
by others. They are leeches.
0
Reply Dave 7/12/2009 10:47:58 AM

Dave wrote:
> The networking is not working on this Solaris 10 update 7 machine, 
> unless I manually add the routing information each time the machine is 
> booted, which would be a pain.
> 
If all else fails, you could write a script to set the routing 
information at boot time.
> 
> 
> # nslookup sun.com
> ;; connection timed out; no servers could be reached
> 
> The file /etc/deraultroute exists, and has the right IP for the router.
> 
> # cat /etc/defaultroute
> 192.168.1.1
> 
> Adding the route manually, allow it to work.
> 
> # route add default 192.168.1.1
> add net default: gateway 192.168.1.1
> 
> 
> Now it's ok.
> 
> # nslookup sun.com
> Server:         212.67.120.148
> Address:        212.67.120.148#53
> 
> Non-authoritative answer:
> Name:   sun.com
> Address: 72.5.124.61
> 
> 
> But how can I preserve that across reboots?
> 
> 

You could try spelling it correctly!  It's /etc/defaultrouter!  Note the 
final "r".

Computers do what you said, not what you meant!!!!!!!
0
Reply Richard 7/12/2009 11:21:07 AM


Dave <foo@coo.com> writes:

> The file /etc/deraultroute exists, and has the right IP for the router.
> 
> # cat /etc/defaultroute
> 192.168.1.1

The only thing you need to do is get it right :-)

File Formats                                     defaultrouter(4)

NAME
     defaultrouter - configuration file for default router(s)

SYNOPSIS
     /etc/defaultrouter

DESCRIPTION
     The /etc/defaultrouter file specifies a IPv4 host's  default
     router(s).

-- 
Atro Tossavainen (Mr.)               / The Institute of Biotechnology at
Systems Analyst, Techno-Amish &     / the University of Helsinki, Finland,
+358-9-19158939  UNIX Dinosaur     / employs me, but my opinions are my own.
< URL : http : / / www . helsinki . fi / %7E atossava / > NO FILE ATTACHMENTS
0
Reply Atro 7/12/2009 11:24:33 AM

Hi,

Richard B. Gilbert wrote:
> Dave wrote:
>> The networking is not working on this Solaris 10 update 7 machine, 
>> unless I manually add the routing information each time the machine is 
>> booted, which would be a pain.
>>
> If all else fails, you could write a script to set the routing 
> information at boot time.
>>
>>
>> # nslookup sun.com
>> ;; connection timed out; no servers could be reached
>>
>> The file /etc/deraultroute exists, and has the right IP for the router.
>>
>> # cat /etc/defaultroute
>> 192.168.1.1
>>
>> Adding the route manually, allow it to work.
>>
>> # route add default 192.168.1.1
>> add net default: gateway 192.168.1.1
>>
>>
>> Now it's ok.
>>
>> # nslookup sun.com
>> Server:         212.67.120.148
>> Address:        212.67.120.148#53
>>
>> Non-authoritative answer:
>> Name:   sun.com
>> Address: 72.5.124.61
>>
>>
>> But how can I preserve that across reboots?
>>
>>
> 
> You could try spelling it correctly!  It's /etc/defaultrouter!  Note the 
> final "r".
> 
> Computers do what you said, not what you meant!!!!!!!
Someone should make a replacement for bash called it gash which uses 
google to search for everycommand typed and issue a "did you mean" 
whenever there are typos, that would put CLI to a new level :)

/michael
0
Reply Michael 7/12/2009 11:24:34 AM

Michael Laajanen wrote:
> Hi,
> 
> Richard B. Gilbert wrote:

>> You could try spelling it correctly!  It's /etc/defaultrouter!  Note 
>> the final "r".
>>
>> Computers do what you said, not what you meant!!!!!!!
> Someone should make a replacement for bash called it gash which uses 
> google to search for everycommand typed and issue a "did you mean" 
> whenever there are typos, that would put CLI to a new level :)
> 
> /michael


Yes, 'gash' could be useful, but not exactly in the spirit of unix, 
where it does what you say.

-- 
I respectfully request that this message is not archived by companies as
unscrupulous as 'Experts Exchange' . In case you are unaware,
'Experts Exchange'  take questions posted on the web and try to find
idiots stupid enough to pay for the answers, which were posted freely
by others. They are leeches.
0
Reply Dave 7/12/2009 12:10:33 PM

Atro Tossavainen wrote:
> Dave <foo@coo.com> writes:
> 
>> The file /etc/deraultroute exists, and has the right IP for the router.
>>
>> # cat /etc/defaultroute
>> 192.168.1.1
> 
> The only thing you need to do is get it right :-)
> 
> File Formats                                     defaultrouter(4)
> 
> NAME
>      defaultrouter - configuration file for default router(s)
> 
> SYNOPSIS
>      /etc/defaultrouter
> 
> DESCRIPTION
>      The /etc/defaultrouter file specifies a IPv4 host's  default
>      router(s).
> 


Spelling never was my strong point. That solved the problem of course.

-- 
I respectfully request that this message is not archived by companies as
unscrupulous as 'Experts Exchange' . In case you are unaware,
'Experts Exchange'  take questions posted on the web and try to find
idiots stupid enough to pay for the answers, which were posted freely
by others. They are leeches.
0
Reply Dave 7/12/2009 12:12:09 PM

Michael Laajanen wrote:
> Hi,
> 
> Richard B. Gilbert wrote:
>> Dave wrote:
>>> The networking is not working on this Solaris 10 update 7 machine, 
>>> unless I manually add the routing information each time the machine 
>>> is booted, which would be a pain.
>>>
>> If all else fails, you could write a script to set the routing 
>> information at boot time.
>>>
>>>
>>> # nslookup sun.com
>>> ;; connection timed out; no servers could be reached
>>>
>>> The file /etc/deraultroute exists, and has the right IP for the router.
>>>
>>> # cat /etc/defaultroute
>>> 192.168.1.1
>>>
>>> Adding the route manually, allow it to work.
>>>
>>> # route add default 192.168.1.1
>>> add net default: gateway 192.168.1.1
>>>
>>>
>>> Now it's ok.
>>>
>>> # nslookup sun.com
>>> Server:         212.67.120.148
>>> Address:        212.67.120.148#53
>>>
>>> Non-authoritative answer:
>>> Name:   sun.com
>>> Address: 72.5.124.61
>>>
>>>
>>> But how can I preserve that across reboots?
>>>
>>>
>>
>> You could try spelling it correctly!  It's /etc/defaultrouter!  Note 
>> the final "r".
>>
>> Computers do what you said, not what you meant!!!!!!!
> Someone should make a replacement for bash called it gash which uses 
> google to search for everycommand typed and issue a "did you mean" 
> whenever there are typos, that would put CLI to a new level :)
> 

It's a losing proposition!  The more you dumb down the software, the 
dumber the users get!

0
Reply Richard 7/12/2009 12:28:02 PM

Michael Laajanen wrote:

>  Someone should make a replacement for bash called it gash which uses 
>  google to search for everycommand typed and issue a "did you mean" 
>  whenever there are typos, that would put CLI to a new level :)

Zsh has had spelling correction option for ages.

{lucifer}~> zsh
{lucifer}~> setopt correctall 
{lucifer}~> cat /etc/defaultroute  
zsh: correct '/etc/defaultroute' to '/etc/defaultrouter' [nyae]? y
192.168.100.100

It doesn't do google searches, but it's usually not necessary. :-)

-- 
 .-.   .-.    Yes, I am an agent of Satan, but my duties are largely
(_  \ /  _)   ceremonial.
     |
     |        dave@fly.srk.fer.hr
0
Reply Drazen 7/12/2009 1:58:11 PM

Hi,

Drazen Kacar wrote:
> Michael Laajanen wrote:
> 
>>  Someone should make a replacement for bash called it gash which uses 
>>  google to search for everycommand typed and issue a "did you mean" 
>>  whenever there are typos, that would put CLI to a new level :)
> 
> Zsh has had spelling correction option for ages.
> 
> {lucifer}~> zsh
> {lucifer}~> setopt correctall 
> {lucifer}~> cat /etc/defaultroute  
> zsh: correct '/etc/defaultroute' to '/etc/defaultrouter' [nyae]? y
> 192.168.100.100
> 
> It doesn't do google searches, but it's usually not necessary. :-)
> 

Does that also work if '/etc/defaultrouter' does not exist?

/michael
0
Reply Michael 7/12/2009 2:12:52 PM

Michael Laajanen wrote:

>  Does that also work if '/etc/defaultrouter' does not exist?

Probably not, but I suppose it could be enhanced to look up for files from
the man pages. That should be better than google.

-- 
 .-.   .-.    Yes, I am an agent of Satan, but my duties are largely
(_  \ /  _)   ceremonial.
     |
     |        dave@fly.srk.fer.hr
0
Reply Drazen 7/12/2009 4:28:36 PM

9 Replies
825 Views

(page loaded in 0.06 seconds)

Similiar Articles:













7/20/2012 1:07:37 PM


Reply: