Basic Networking in Solaris 10

When you already install Solaris 10, what you need to do is to setup the network configuration. Here we are going to talk about how to change the default IP address, adding up Ethernet card, and some simple routing.

The first one is to change the IP address in e1000g0 interface, this setting will be persist over reboot

Edit /etc with format hostname.interface

vi /etc/hostname.e1000g0

Inside there write

Ip-address netmask + netmask

192.168.3.9 netmask + 255.255.255.0

Now you need to edit /etc/inet/hosts

Add this

Ip-address hostname

192.168.3.9 test-machine

Now you need to edit /etc/inet/ipnodes

Add this

Ip-address hostname

192.168.3.9 test-machine

After that type:

reboot — -r

The next step is to add and configure extra ethernet card in your machine, if you want to know what Ethernet is plug in your machine, type

dladm show-link

Enable the network card, in this case e1000g3, you can change according your machine

ifconfig e1000g3 plumb

To check you can type ifconfig –a, to see if e1000g3 is already activated, to inactivate the Ethernet card just type

ifconfig e1000g3 unplumb

Now we can add an IP address to e1000g3,for example we wan to put 192.168.2.9 to that ethernet type:

ifconfig e1000g3 192.168.2.9 netmask 255.255.255.0 broadcast 192.168.2.255

Then you have to bring up the network card

ifconfig e1000g3 up

But wait if you just do that, next time you reboot, all of your configuration will be gone, to prevent it this is what you need to do

Make a new file in /etc with format hostname.interface

vi /etc/hostname.e1000g3

Inside there write

Ip-address netmask + netmask

192.168.2.9 netmask + 255.255.255.0

Now you need to edit /etc/inet/hosts

Add this

Ip-address hostname

192.168.2.9 test-machine

Now you need to edit /etc/inet/ipnodes

Add this

Ip-address hostname

192.168.2.9 test-machine

After that type:

reboot — -r

Then the next step that you can do is to add some routing to this configuration

route –p add default your-gateway

route –p add default 192.168.2.1

-p = persistence over reboot

Default = all destination 0.0.0.0/0.0.0.0

This will try to register a default gateway for the PC, if you want to add another routing for this PC to specified network you can do:

route –p add –net network-address –gateway gateway-address

I suggest you always to use –p so that your routing wont be flushed when the machine is reboot. Also you need your gateway in /etc/defaultrouter

To check your routing you can type:

netstat –rn

To flush your routing, but the one that from installation wont be flushed

route flush

These configuration at least will make your Solaris box able to communicate with other machine.

Advertisements

11 thoughts on “Basic Networking in Solaris 10

  1. thanks for this post, it’s really easy to understand…..
    i had tried more than 10 day for peer to peer configuration. i hope that it may help me………

  2. This information is worth reading & implementing. Thanks!!!Taz…
    Going forward…I have Solaris 10 installed in virtualbox 4. I have configured my network as mentioned in this post. I want to make a network between 2 solaris 10 systems installed in Virtualbox OR between solaris 10 and local windows xp (host machine). If you can guide and advise what steps to be performed to achieve target will be highly appreciated.

    Thanks 🙂

  3. Also, below are the details/query i would like to know/update.
    1) what will be my default gateway when my ip is 10.10.12.1?
    2) I am using virtualbox 4. I have enable NAT in network adapter.
    3) I have not defined router since confused with default gateway
    4) How can i connect to internet from solaris machine installed in Virtual box

  4. Hi Imran,

    Sorry for the late reply,
    1. it depend with the default gateway that you have in your PC (not your VMs), For example: your IP is 10.10.12.1/8 if it is static configuration then the gateway might be 10.1.1.1 or even 10.10.1.1
    2. I suggest you to use Bridging for easier configuration
    3. again you need to know your current gateway with your PC
    4. if you use bridging, if your PC able to connect to internet, so does with your VM

  5. i new to solaris .i installed solaris in sun fire v440 server. i insert the twisted pair cable to sunfire v440. i want network connection what are the configuration need ..?

  6. I am unable to view the server login prompt using terminal server connected to x4200 box. When I give telnet ip port, the control is going to terminal server login not the solaris 10 server.

    1. Is there any list of services to be enabled and checked for console over terminal server?
    2. If there any special cabling required?
    3. Is there any online document to follow step by step in detail.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s