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

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

    Accepted Solution

    create a file /etc/defaultrouter


    echo "" >/etc/defaultrouter

    replace with your real gateway IP

    then reboot
    LVL 38

    Expert Comment

    Need more help?

    Author Comment

    Ok, great. But I don't beleive that files exists.
    How do I create it?
    LVL 2

    Assisted Solution

    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

    >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

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    Suggested Solutions

    FreeBSD on EC2 FreeBSD ( 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…
    Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
    Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
    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.

    754 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

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now