HOME

  Solaris Forum  

  Newsletter  

 Tell a Friend

  Bookmark

Google Web adminschoice.com 
redarrow1.gif (101 bytes)redarrow1.gif (101 bytes) Day Light Saving Change in USA - Summary of changes with links to patches and information.
redarrow1.gif (101 bytes)redarrow1.gif (101 bytes) Application Monitoring - Challenges , best practices and implementation of application monitoring is discussed.
redarrow1.gif (101 bytes)Unix Commands - A quick reference to commonly used unix commands .
redarrow1.gif (101 bytes)Solaris Network Configuartion - Simplified : Quick reference to setting up network in Solaris system
Performance Monitoring -  iostat , vmstat & netstat - Introduction to performance monitoring tools with example and command  syntax.
crontab in Unix - A Quick Reference to setting up and using cron jobs in unix .
Veritas Volume Manager-1
Using vxdiskadm to add &  manage disks & disk groups .
Veritas Volume Manager-2
Using vxassist to create ,configure &  manage volumes .
Admin's Guide to Solstice Disk Suite: Complete practical reference including root mirroring and trouble shooting.
Securing Solaris
A few suggestions to make your Solaris system secure from internal and external intrusion.
 
Solaris Installation
Step by step guide to Solaris Installation.
Jumpstart Server
Network  installation of Solaris over one or multiple systems. 
Booting Process
Details of Solaris  booting process. 
Booting Problems in Solaris
Common booting related error messages and their possible solution
DNS Server
Setting up DNS server
Trouble Shooting DNS  Some of the configuration and nslookup related errors explained.
NIS+
Server , Clients setup and commands. 
OpenBoot Parameters
Reference table of important parameters and their values.
Solaris Error Messages
Alphabetical listing of common Solaris Error Messages and their explanation
Checking & Repairing File systems with fsck   fsck operation ,syntax and explanation of some common error messages
Vi Quick  Reference   
vi basics for  reference
explanations.
 
Open Directory   
Unix , Solaris Administration 
Sun.com   
BigAdmin
 
 
 
FAQs
unix , unix programming , VI  ,Sendmail  , Bind
ssh ,BASH ,Security, Secure unix programming, Unix socket 
SCSI
Solaris 2Solaris x86  ,NIS+ FreeBSD ,RedHat , HPUX
:
Unix
Unix History and timeline ,
Overview of the UNIX 
Microsoft Windows NT Server 4.0 versus UNIX
Overview of Unix Commands 
Unix for advance Users ,
Unix Bourne Shell Guide with Ksh ,
Korn Shell
BASH reference Guide
:
Solaris Documentation
Solaris 7 System Administration Collection
Solaris 8 System Administrator Collection
Solaris 9 System Administartion Collection
Creating Solaris Packages
Multibooting Solaris 
:
Sun
Sun System Handbook
Sun Hardware Info.
:
Documentation Home
Sun , BSD  ,Linux ,Hp,Veritas
:
Patches & Softwares
Solaris Patches , 
Solaris Freeware
GNU Software
big brother  , 
webmin .com
bugzilla.org
:
Certification Info 
Sun  ,Red Hat , HP

 
Solaris Network configuration 

Setting up Solaris networking often becomes challenging for the new sysadmins and new  owners of Sun systems . This document details the steps involved in setting up of Solaris networking and can be used as a check list if you are already familiar with Solaris network configuration .

Table of contents :
  1. Enable the network card 
  2. Configuring ipaddress and netmask and making the interface status as up .
  3. Configuring Virtual interface :
  4. Ip-forwording : 
  5. Router Configuration
  6. Network Terms
  7. Next Steps


Ifconfig command is used in Solaris to configure the network interfaces . The following lines describes the activities needed to configure a freshly installed network card from the root prompt .

1. Enable the network card 

#ifconfig hme0 plumb 

ifconfig -a command should show following type of output which means device is enabled and is ready to configure ip address and netmask :

hme0: flags=842<BROADCAST,RUNNING,MULTICAST> mtu 1500 
inet 0.0.0.0 netmask 0 
ether 3:22:11:6d:2e:1f 

2. Configuring ipaddress and netmask and making the interface status as up .

#ifconfig hme0 192.9.2.106 netmask 255.255.255.0 up 

#ifconfig -a will now show the ip address , netmask and up status as follows :

hme0: flags=843<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 
inet 192.9.2.106 netmask ffffff00 broadcast 192.9.2.255 
ether 3:22:11:6d:2e:1f 


The file /etc/netmasks is used to define netmasks for ip addresses .

127.0.0.1, is the standard loop back  route and 127.0.0.0 is the default loopback ipaddress used by the kernel  when no interface is configured this will be the only entry dispalyed by the system on invoking ifconfig -a command..

3. Configuring Virtual interface :
Vitual interface can be configured to enable hme0  reply to more then one ip addresses. This is possible by using hme0 alias which can be configured by ifconfig command only . The new  alias device name now becomes hme0:1  hme:2 etc.

#ifconfig hme0:1 172.40.30.4 netmask 255.255.0.0 up 

ifconfig -a will show the original hme0 and alias interface : 

hme0: flags=843<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 
inet 192.9.2.106 netmask ffffff00 broadcast 192.9.2.255 
ether 3:22:11:6d:2e:1f 
hme0:1: flags=842<BROADCAST,RUNNING,MULTICAST> mtu 1500 
inet 172.40.30.4 netmask ffff0000 broadcast 172.40.255.255 

4. Ip-forwording : 

IP forwarding allows you to forward all requests coming for a certain port or  URL to be redirected to a specified IP address.

ip forwording becomes enabled automatically when system detects more then one interface at the booting time . The file involed is /etc/rc2.d/S69inet .

ipforwording is on by default but can be turned off by following command :

#ndd -set /dev/ip ip_forwarding 0 

5. Router Configuration

After interfaces and ipaddess have been configured the system needs a default router which will allow the machine to talk to world outside of local network . 

You can specify a particular route for a particular address as in following example 

#route add -net 10.0.0.0 -netmask 255.0.0.0 172.40.30.1 1

if the the destination ipaddess is not defined in this manner system forwards all requests to the default router .

default route is defined manually by editing /etc/defaultrouter file and putting router's ipaddress entry in it. This file is read by /etc/rc2.d/S69inet file during the booting process and entry added to the routing table .

The route can be defined online also using routeadd command but the changes will be lost on reboot .To make changes permanent make sure to put an entry in /etc/defaultrouter.

#route add default 205.100.155.2 1

#route change default 205.100.155.2 1

The 1 at the end is the number of hops to the next gateway.

If an interface is not responding to the network, check to be sure it has the correct IP address and netmask  , network cables are fine .

6. Network Terms
CIDR :
CIDR : Classless Inter-Domain Routing - the notation often used instead of writing the subnet mask along with ip-address . It has network prefix at the end of a address as / number of network bits.This means that the IP address 192.200.20.10 with the subnet mask 255.255.255.0 can also be expressed as 192.200.20.10/24. The /24 indicates the network prefix length, which is equal to the number of continuous binary one-bits in the subnet mask (11111111.11111111.11111111.000000). Zeros are for addressing the hosts on this network.

VLSM :
network can be variably subnetted into smaller networks, each smaller network having a different subnet mask .This functionality is avaiable in Solaris 2.6 above. the ipaddresses

7. Next Steps : 

Reference books on Networking at  Amazon.com

This  article  tried to cover the solaris network configuration   . Network configuration is a part of broader area of network managment .If you wish to gain more knowledge about the networking concepts  there are some good books available for online buying from Amazon.com in the display panel below.

Two suggested books to understand the networking concepts are :

1. TCP/IP Network Administration (3rd Edition; O'Reilly Networking)
2. Internetworking with TCP/IP Vol.1: Principles, Protocols, and Architecture (4th Edition)

 

Copyright © 2000-2007 , Adminschoice.com . All Rights Reserved. Site Comment/Suggestions   Privacy

Post a Comment about this article :

 


 

 Posted by :jituDate Posted:  March 5, 2008, 12:40 pm
  can anyone tell me how can i see active ip in the system when system has more than one ip
 Posted by :PundlikDate Posted:  February 7, 2008, 6:15 am
  sun solaris operating system dvds
 Posted by :G PhilpottDate Posted:  December 14, 2007, 6:09 pm
  To change the MTU size in solaris, use the ifconfig command (ifconfig eth0 mtu 1492) and then confirm (ifconfig -a) the mtu is listed on the same line as the interface.
 Posted by :lutfullahDate Posted:  December 5, 2007, 11:27 am
  are there some one to tell me the path of file that i can add permanent ip on solaris 9 routing table
 Posted by :lutfullahDate Posted:  December 5, 2007, 11:18 am
  on which file i can add the ip to have a parmanent ip on routing table on solaris 9

br lutfullah
 Posted by :Sharma PCSDate Posted:  November 16, 2007, 9:22 am
  Can any one tell me equivalent command for ifconfig -a for HP-UX system. On HP-UX system there is no -a option. I need it very badly. On Tandem (NonStop-UX) ifconfig -a is working fine. But on HP-UX ifconfig -a is not working. Please help me regarding this.
Thanks.
 Posted by :amanuelDate Posted:  November 12, 2007, 6:15 pm
  it helped me alot thanx very much. Originaly i thought the ip address are set only on /etc/hosts and /etc/netmasks thanx to u now the connection is done.
 Posted by :mahalingaiah cDate Posted:  November 3, 2007, 10:13 pm
  The answer is correct, but if additionally You want to configure 2 ip addresses in the same card, you need to repeat the process, just adding for example ifconfig eri0:1 second_ip_address.

 Posted by :Adolfo Ramirez Date Posted:  October 15, 2007, 6:00 pm
  Hello
Thanks for the info... it works great, but I have a question: How can I change the configuration from DHCP to Static IP forever (I mean, not to type a ifconfig command every time the server reboots)? Thank you
 Posted by :RickDate Posted:  May 7, 2007, 6:03 pm
  The answer is correct, but if additionally You want to configure 2 ip addresses in the same card, you need to repeat the process, just adding for example ifconfig eri0:1 second_ip_address.

Regards :)
 Posted by :vishnu priyaDate Posted:  April 24, 2007, 9:33 am
  what is meant by hm()
 Posted by :chinnajeeDate Posted:  April 12, 2007, 11:36 am
  in solaris what is the abbrivation of hme0,elxl0,eri0,qfe0 etc.,
 Posted by :Antu JosephDate Posted:  April 12, 2007, 4:43 am
  It's fantastic.But one doubt.Suppose I configured two interfaces with two ip.How can I switch between these ip.Ex:I configured one 10.x.x.x ip and one 97.x.x.x ip.Some times i want to use 10.x.x.x series ip and some times 97.x.x.x series ip.how it's possible?
 Posted by :Thomas GutzmannDate Posted:  March 27, 2007, 3:02 pm
  Thanks for this excellent "how to". It should be added that the files hostname.* in /etc should be created, otherwise the ifconfig commands have to be repeated after each reboot. A file for the first virtual interface of ce0 would be called hostname.ce0:1, and its content would be the dns name for this virtual address.
 Posted by :makarandDate Posted:  March 13, 2007, 7:40 am
  It has help me alot today as my network configuration was not working thru webmin.

Really its a worth site.

Thanx & Regards,
Makarand
 Posted by :Eric RapillyDate Posted:  March 5, 2007, 10:38 pm
  thanks for this documetation. Is it a way to change the MTU from 1500 to 1492 ? thanks.