[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now


how to setup/config network

Posted on 2001-06-13
Medium Priority
Last Modified: 2013-12-27
I have a new SUN Ultra5 box

I need to setup TCP/IP network
I have got IP, netmask, broadcast and gateway addresses

I don't know how to set tcp/ip up using commands
when I excute some ifconfig and netstat commands, I have the following outputs:

# ifconfig -a
lo0: flags=1000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1
        inet netmask ff000000
hme0: flags=1000842<BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
        inet netmask ffffff00 broadcast
        ether 8:0:20:ff:e2:52

# netstat -rn

Routing Table: IPv4
  Destination           Gateway           Flags  Ref   Use   Interface
-------------------- -------------------- ----- ----- ------ ---------               UH       2     13  lo0

the interface to be setup is hme0

when I tried

route add default gateway

had error

gateway: bad value

I am sure that the physical network connection is OK as I swap the cable with the other machine and the other machine works OK

Can someone help please?

I need to use commands not GUI
Question by:ffan
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 15

Expert Comment

ID: 6190292
For command line,

# route add default <ip of default router/gateway> 1
 If you are not sure what is your default router/gateway, you might want to check with your network guy.

And if you want to make it permanent there are a few files that you need to look at.


in /etc/hosts           yourhostname

and in /etc/hostname.hme0, put

The entry in /etc/hostname.hme0 must correspond with <yourhostname> in /etc/hosts

in /etc/defaultrouter key in the ip address of your defaultrouter.  For example

in /etc/netmasks
add a line :
<you network number>     <your netmasks>   

And then reboot your machine.

good luck

Expert Comment

ID: 6192739
What samri writes is correct except for the netmasks
In this file you shoild enter the base network and the mask you you want to put on that network.

In your case the base network is a class A network (
This is maybe not the best choice for a small network, better to use one of 192.168.0 - 192.168.255 (reserverd for private networks not on the net or hidden behind NAT gateway.

Anyway, put  255.255.255 in the netmasks file
LVL 38

Accepted Solution

yuzh earned 200 total points
ID: 6193634
Hi  ffan,

    I think it is easy for you to run sys-unconfig command in you Sun box,  reboot the machine, then follow the screen instructions to  type in the network information about you machine.

    If you want to manually edit the config files, you need to look at the following files to make the change: (use a text editor, eg vi)
   /etc/nodename    #if you need to change the name of the machine
  /etc/hostname.interface    (eg hostname.hme0 )
  /etc/hosts                        # Update to reflect new IP
  /etc/nsswitch.conf           # U/etc/resolv.conf       #Update if your name servers/domain changed (DNS only)pdate if your name resolution
  /etc/defaultdomain   # set you default domain
  /etc/defaultrouter      # Set the default router's IP
  /etc/inet/networks             # Set your network name
  /etc/inet/netmasks             # Set your network number

  /etc/net/ticlts/hosts            # For the streams-level loopback
  /etc/net/ticot/hosts            # For the streams-level loopbacks/hosts          
  /etc/net/ticotsord/hosts      # For the streams-level loopback

   then reboot your Sunbox.  please do a FULL system backup before making any change to your system.


LVL 21

Expert Comment

ID: 8050137
No comment has been added lately, so it's time to clean up this Topic Area.
I will leave a recommendation for this question in the Cleanup topic area as follows:

- Answered by yuzh

Please leave any comments here within the next 7 days


Cleanup Volunteer

Expert Comment

ID: 8099623
Finalized as proposed


Community Support Moderator
Experts Exchange

Featured Post

Tech or Treat! - Giveaway

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

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

Let's say you need to move the data of a file system from one partition to another. This generally involves dismounting the file system, backing it up to tapes, and restoring it to a new partition. You may also copy the file system from one place to…
In tuning file systems on the Solaris Operating System, changing some parameters of a file system usually destroys the data on it. For instance, changing the cache segment block size in the volume of a T3 requires that you delete the existing volu…
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…
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.:
Suggested Courses

650 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