Solaris: How do I setup a default static route / static router IP address?November 15, 2010 by: upa_kid
/etc/defaultrouter is the configuration file for default router under Solaris os. The /etc/defaultrouter file can contain the IP addresses or hostnames of one or more default routers, with each entry on its own line. If you use hostnames, each hostname must also be listed in the local /etc/hosts file, because no name services are running at the time that defaultrouter is read.
The default routes listed in this file replace those added by the kernel during diskless booting. An empty /etc/defaultrouter file will cause the default route added by the kernel to be deleted.
(1) First login to Solaris box as a root user:
The /etc/defaultrouter is configuration file for default router under Sun Solaris. Open the file /etc/defaultrouter and add the router IP address:
# vi /etc/defaultrouter
Append IP address:
Restart the Solaris network with following command:
# /etc/init.d/network restart
(3) Or you can add the router IP to default route table as follows:
# route add default 192.168.1.254
add net default: gateway 192.168.1.254
Finally use nslookup and ping command to check network settings:
$ ping 192.168.1.254
$ nslookup nixcraft.com
- HP-UX: How Do I configure routing or add route?
- How to setup Linux as a router for DSL, T1 line etc
- Configure Static Routes In Debian or Red Hat Enterprise Linux
- Howto Setup Linux as router for ppp dial up (PSTN/ISDN) connections
- Solaris UNIX: How to Setup DNS Client configuration / name server
- Howto: Ubuntu Linux convert DHCP network configuration to static IP configuration
- Ubuntu Linux: Creating ethernet alias for eth0 network device
- Default Gateway Linux
- No Route to Host error and solution
- FreeBSD > How to setup FreeBSD as DNS client?