Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Beginner Question - How to assign mulitple IP addresses to Solaris 10 server

572 views
Skip to first unread message

underh20.s...@gmail.com

unread,
Mar 10, 2008, 1:23:34 PM3/10/08
to
Hello,

Our Solaris 10 server has one NIC with IP address at hme0 as below :

hme0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu
1500 index 2
inet 172.27.248.133 netmask fffffff00 broadcast
172.27.248.255

In addition to the permanent address above, we need to add 3 IP
addresses with the same subnet, default gateway and netmasks to this
server. Could we do it ? If yes, could you let me know how
please ? One requirement is we cannot reboot the server at any time.

Thanks,

Bill

Dan McDonald

unread,
Mar 10, 2008, 1:29:52 PM3/10/08
to
In article <93de70d4-13d1-46e4...@s13g2000prd.googlegroups.com>,

<underh20.s...@gmail.com> wrote:
>Hello,
>
>Our Solaris 10 server has one NIC with IP address at hme0 as below :
>
> hme0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu
>1500 index 2
> inet 172.27.248.133 netmask fffffff00 broadcast
>172.27.248.255
>
>In addition to the permanent address above, we need to add 3 IP
>addresses with the same subnet, default gateway and netmasks to this
>server. Could we do it ?

Yes.

> If yes, could you let me know how please ? One requirement is we cannot
> reboot the server at any time.

Here's how to do it w/o rebooting, for every new-addr/new-addr's-prefix pair:

ifconfig hme0 addif <new-addr>/<new-addr's-prefix> up

I'll assume you don't need any other routing stuff. I can't recall the
standard way to make this stick across reboots, so I'll let someone else
followup with that.
--
Daniel L. McDonald - Solaris Security & Networking Engineering
Mail: dan...@sun.com | * MY OPINIONS ARE NOT NECESSARILY SUN'S! *
35 Network Drive Burlington, MA |"rising falling at force ten
http://blogs.sun.com/danmcd/ | we twist the world and ride the wind" - Rush

ne...@buffy.sighup.org.uk

unread,
Mar 10, 2008, 1:50:46 PM3/10/08
to
In comp.unix.misc Dan McDonald <dan...@eng.sun.com> wrote:
> In article <93de70d4-13d1-46e4...@s13g2000prd.googlegroups.com>,
> <underh20.s...@gmail.com> wrote:
>>Hello,
>>
>>Our Solaris 10 server has one NIC with IP address at hme0 as below :
>>
>> hme0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu
>>1500 index 2
>> inet 172.27.248.133 netmask fffffff00 broadcast
>>172.27.248.255
>>
>>In addition to the permanent address above, we need to add 3 IP
>>addresses with the same subnet, default gateway and netmasks to this
>>server. Could we do it ?
>
> Yes.
>
>> If yes, could you let me know how please ? One requirement is we cannot
>> reboot the server at any time.
>
> Here's how to do it w/o rebooting, for every new-addr/new-addr's-prefix pair:
>
> ifconfig hme0 addif <new-addr>/<new-addr's-prefix> up
>
> I'll assume you don't need any other routing stuff. I can't recall the
> standard way to make this stick across reboots, so I'll let someone else
> followup with that.

Create a file called /etc/hostname.hme0:1 containing a single line holding
the IP number. Further IPs can be allocated by increating the :1 to :2, :3
etc.

--
Gustaf Lindborg: The sailor does not pray for wind, he learns to sail

underh20

unread,
Mar 10, 2008, 2:19:37 PM3/10/08
to
On Mar 10, 10:29 am, dan...@Eng.Sun.COM (Dan McDonald) wrote:
> In article <93de70d4-13d1-46e4-826a-700afadc6...@s13g2000prd.googlegroups.com>,

>
>  <underh20.scubadiv...@gmail.com> wrote:
> >Hello,
>
> >Our Solaris 10 server has one NIC with IP address at hme0 as below :
>
> >       hme0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu
> >1500 index 2
> >                 inet 172.27.248.133 netmask fffffff00 broadcast
> >172.27.248.255
>
> >In addition to the permanent address above, we need to add 3 IP
> >addresses with the same subnet, default gateway and netmasks to this
> >server.   Could we do it ?
>
> Yes.
>
> > If yes, could you let me know how please ?  One requirement is we cannot
> > reboot the server at any time.
>
> Here's how to do it w/o rebooting, for every new-addr/new-addr's-prefix pair:
>
>         ifconfig hme0 addif <new-addr>/<new-addr's-prefix> up
>
> I'll assume you don't need any other routing stuff.  I can't recall the
> standard way to make this stick across reboots, so I'll let someone else
> followup with that.
> --
> Daniel L. McDonald  -  Solaris Security & Networking Engineering
> Mail: dan...@sun.com             |  * MY OPINIONS ARE NOT NECESSARILY SUN'S! *
> 35 Network Drive  Burlington, MA |"rising falling at force tenhttp://blogs.sun.com/danmcd/    | we twist the world and ride the wind" - Rush

Hi Daniel,

Will the current hme0 be hung if I issue "ifconfig hme0 addif <new-
addr>/<new-addr's-prefix> up" command ?

Thanks for your help.

Bill

ITguy

unread,
Mar 10, 2008, 10:41:09 PM3/10/08
to

The current hme0 will continue to run with no problems during and
after the ifconfig addif command. You can make the changes persist
across reboots by just adding the "addif" statements in /etc/
hostname.hme0


Darren Dunham

unread,
Mar 12, 2008, 9:15:29 PM3/12/08
to
In comp.unix.solaris ITguy <sout...@gmail.com> wrote:
> The current hme0 will continue to run with no problems during and
> after the ifconfig addif command. You can make the changes persist
> across reboots by just adding the "addif" statements in /etc/
> hostname.hme0

Uhh, sorta.

Solaris 8 and later parses the /etc/hostname.* files differently if they
have exactly one line or if they have more than one line.

While you can add ifconfig statements (like addif), you'll probably have
to modify the existing line as well.
(The modification usually consists of adding
netmask + broadcast + up
to the end of the existing line)

--
Darren Dunham ddu...@taos.com
Senior Technical Consultant TAOS http://www.taos.com/
Got some Dr Pepper? San Francisco, CA bay area
< This line left intentionally blank to confuse you. >

0 new messages