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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

resetting default gateway at each reboot.

Status
Not open for further replies.

jxfish2

Technical User
Jan 24, 2002
183
US
Can anyone tell me why I have to reset my default gateway at each reboot?

My static IP address, hostname, netmask, DNS servers, etc. all configure just fine, but each time I reboot, I have to reset the default gateway...

Can anyone tell me what I need to do to set this permanently? Once and for all!

TIA

Joe F.
 
hi jxfish2

here are some areas to check out. but it looks like you need to set your /etc/defaultrouter with a Static IP


Bring a SUN Sparc5 online using Static IPs then here are some points for these files

/etc/resolv.conf must have domain name ( i.e. verizon, bellatlantic, sprint ), nameserver xxx.xxx.x.xx ( dns0 ) nameserver xxx.xxx.x.xx ( dns1 ) ( on separate lines )

/etc/hostname.le0 must have a hostname ( i.e. sparky )

/etc/hostname6.le0 must have an empty file if there is not already one available ( if you have IPv6 activiated )

/etc/hosts must have 127.0.0.1 localhost and xxx.xxx.xxx.xx sparky loghost (on separate lines)

/etc/nsswitch hosts: files dns ( this line must be visible in /etc/nsswitch file )

/etc/defaultrouter must have Static IP Address of router xxx.xxx.xxx.xxx

Some partitions on disk may be root ( / ) /var /opt /usr /tmp /export/home swap

Also see article by the following for additional hints
 

Hi jxfish2

By the way, default gateways tend to change when updates have been made to a routing profile and changes are not made all the way through.

So when the server or workstation reboots, it comes up looking for it's original settings which are not there

check the following setttings in this file. it should read

etc/nsswitch hosts: files dns ( this line must be visible in /etc/nsswitch file )

 

FYI
You might have to do some searching for the following /etc/nsswitch hosts: files dns ( this line must be visible in /etc/nsswitch file )

Also check /etc/nsswitch.dns for the ( hosts: files dns ) file
 
fyi vi /etc/nsswitch.conf
and look for ( hosts: files dns ) This should already be set
 
Take a look at /etc/rc2.d/S69inet
Look for the entry which adds the default route :-
.... route -n add default .....
This may need to be uncommented
Then the default route should be added at each reboot
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top