You are on page 1of 3

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 .
. Configuring !irtual interface :
". #p$forwarding
%. &outer Configuration
'. (etwork Terms
). (e*t Steps
#fconfig 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 hme, plumb
ifconfig $a command should show following type of output which means device is
enabled and is ready to configure ip address and netmask :
hme,: flags-."2 mtu 1%,,
inet ,.,.,., netmask ,
ether :22:11:'d:2e:1f
2. Configuring ipaddress and netmask and making the interface status as up .
+ifconfig hme, 1/2./.2.1,' netmask 2%%.2%%.2%%., up
+ifconfig $a will now show the ip address 0 netmask and up status as follows :
hme,: flags-." mtu 1%,,
inet 1/2./.2.1,' netmask ffffff,, broadcast 1/2./.2.2%%
ether :22:11:'d:2e:1f
The file 1etc1netmasks is used to define netmasks for ip addresses .
12).,.,.10 is the standard loop back route and 12).,.,., is the default loopback
ipaddress used by the kernel when no interface is configured this will be the only
entry displayed by the system on invoking ifconfig $a command..
3. Configuring Virtual interface
!irtual interface can be configured to enable hme, reply to more then one ip
addresses. This is possible by using hme, alias which can be configured by ifconfig
command only . The new alias device name now becomes hme,:1 hme:2 etc.
+ifconfig hme,:1 1)2.",.,." netmask 2%%.2%%.,., up
ifconfig $a will show the original hme, and alias interface :
hme,: flags-." mtu 1%,,
inet 1/2./.2.1,' netmask ffffff,, broadcast 1/2./.2.2%%
ether :22:11:'d:2e:1f
hme,:1: flags-."2 mtu 1%,,
inet 1)2.",.,." netmask ffff,,,, broadcast 1)2.",.2%%.2%%
4. p!forwarding
#2 forwarding allows you to forward all re3uests coming for a certain port or 4&5 to
be redirected to a specified #2 address.
ip forwarding becomes enabled automatically when system detects more then one
interface at the booting time . The file involved is 1etc1rc2.d1S'/inet .
ipforwarding is on by default but can be turned off by following command :
+ndd $set 1dev1ip ip6forwarding ,
". #outer Configuration
7fter 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 .
8ou can specify a particular route for a particular address as in following e*ample
+route add $net 1,.,.,., $netmask 2%%.,.,., 1)2.",.,.1 1
if the the destination ipaddess is not defined in this manner system forwards all
re3uests to the default router .
default route is defined manually by editing 1etc1defaultrouter file and putting router9s
ipaddress entry in it. This file is read by 1etc1rc2.d1S'/inet 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
1etc1defaultrouter.
+route add default 2,%.1,,.1%%.2 1
+route change default 2,%.1,,.1%%.2 1
The 1 at the end is the number of hops to the ne*t gateway.
#f an interface is not responding to the network0 check to be sure it has the correct #2
address and netmask 0 network cables are fine .
$. Network %erms
C&#
C#:& : Classless #nter$:omain &outing ; the notation often used instead of writing
the subnet mask along with ip$address . #t has network prefi* at the end of a address
as 1 number of network bits.This means that the #2 address 1/2.2,,.2,.1, with the
subnet mask 2%%.2%%.2%%., can also be e*pressed as 1/2.2,,.2,.1,12". The 12"
indicates the network prefi* length0 which is e3ual to the number of continuous binary
one$bits in the subnet mask <11111111.11111111.11111111.,,,,,,=. >eros are for
addressing the hosts on this network.
V'S(
network can be variably subnetted into smaller networks0 each smaller network
having a different subnet mask .This functionality is avaiable in Solaris 2.' above. the
ipaddresses

You might also like