Where do I set up the default gateway in Solaris 8?

Posted on 2005-05-03
Medium Priority
Last Modified: 2013-12-21
Where do I set up the default gateway in Solaris 8?
Question by:rickpary
  • 3
LVL 38

Accepted Solution

yuzh earned 1600 total points
ID: 13923635
create a file /etc/defaultrouter


echo "" >/etc/defaultrouter

replace with your real gateway IP

then reboot
LVL 38

Expert Comment

ID: 13932960
Need more help?

Author Comment

ID: 13937473
Ok, great. But I don't beleive that files exists.
How do I create it?

Assisted Solution

thaanum earned 400 total points
ID: 13941084
The command yuzh gave you:   echo "" > /etc/defaultrouter

 will create the file,  echo is writing whatever you put in the "quotes" to the /etc/defaultrouter file.
 It will be created after you issue that command from root.

 you can verify this by # cat /etc/defaultrouter            to see contents of file.

 Also, instead of rebooting after you create this file, you can:

  # route add default

 using the IP address you need for default route instead of ""

 This will change the default route dynamically, and the /etc/defaultrouter  file will set it on a reboot...

 you can check your route after this command by:

 # netstat -rn

  this will show routing tables, and should see your default route set there now....

 let us know how it goes ...
LVL 38

Expert Comment

ID: 13941648
>How do I create it?
   use the command in my privios comment:
   echo "" >/etc/defaultrouter

or use any text editor (eg dtpad, vi) to create one, just put your real gateway IP
inside the file.

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Suggested Courses
Course of the Month15 days, 2 hours left to enroll

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question