Your Ad Here

Selasa, 11 September 2012

Unix Tip: MULTIPLE IP ADDRESSES

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

UNIX GURU UNIVERSE
UNIX HOT TIP

Unix Tip 3503 - September 11, 2012

http://www.ugu.com/sui/ugu/show?tip.today

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


MULTIPLE IP ADDRESSES

Ever wanted to make your
m/c support more than one
IP addresses?

Well, here is the good
old way:

1. To make a machine support
a new (virtual) IP address:

$ ifconfig hme0:1 132.186.67.157 255.255.254.0 132.186.67.255 up

Where:
- First param is hme0 is
the physical name of the
primary interface for your
m/c, (it can be e.g. le0
for other flavours).
':1' is the logical name.
To make it simple, logical
name is kinda branch of the
original. So basically what
your doing with this command
is making hme0 to support one
more IP address on a new
branch named 'hme0:1'.

- Second param is 'new the IP
address'.

- Third and Fourth are netmask
and broadcast address
respectively. Contact your
SysAdm or RTFM. :).

Note: bringing up a virtual IP
address on a node can be
divided in two steps:
1> Create
2> Bring up.
In this case both are done by
this one command.

- Fifth one you know,
don't you?

2. To bring this virtual IP
address down (without
deleting it):

$ ifconfig hme0:1 down

3. To bring this virtual IP
address up agn(hme0:1 has to
exist for this):

$ ifconfig hme0:1 up

4. To delete this virtual
IP address:

$ ifconfig hme0:1 0 down

Note: Assigning 0 as IP
address, deletes it.

IMPORTANT: All of these commands
requires root permission. If
user with lower authority try
to do this, the result may not
be good.

(manuals say problems arising
from that can be tough to
diagnose)

Wondering about where to
use it: We're using this in a
cluster environment to give
client only one IP address
which we make sure is always
up n running on one of the
nodes.


This tip generously supported by: bhatt.kashyap@blr.spcnl.co.in


--------------------------------------------------------------------------
To Subscribe: http://www.ugu.com/sui/ugu/show?tip.subscribe
To Unsubscribe: http://www.ugu.com/sui/ugu/show?tip.unsubscribe
To Submit A Tip: http://www.ugu.com/sui/ugu/show?tip.today

==========================================================================
DISCLAIMER: All UNIX HOT TIPS ARE OWNED BY THE UNIX GURU UNIVERSE AND ARE
NOT TO BE SOLD, PRINTED OR USED WITHOUT THE WRITTEN CONSENT OF THE UNIX
GURU UNIVERSE. ALL TIPS ARE "USE AT YOUR OWN RISK". UGU ADVISES THAT
ALL TIPS BE TESTED IN A NON-PRODUCTION DEVELOPMENT ENVIRONMENT FIRST.

Unix Guru Universe - www.ugu.com - tips@ugu.com - Copyright 1994-2001
==========================================================================

Tidak ada komentar:

Posting Komentar

Your Ad Here
Free Automatic Backlink Free Auto Backlink Free Auto Backlink Free Auto Backlink Free Auto Backlink Free Auto Backlink Free Auto Backlink Free Auto Backlink Free Auto Backlink Free Auto Backlink