Re: Two (2) IP and hostnames on same NIC

From: Green, Simon (Simon.Green@EU.ALTRIA.COM)
Date: Wed May 19 2004 - 05:11:44 EDT


The simplest way, if you just want the NIC to respond to both IP
addresses, is to use an alias.
ifconfig en0 10.11.12.13 netmask 255.255.255.0 alias
Or use smit, which will let you put it into the ODM.
We use aliases a lot for our home-grown BCS.

One thing to remember is that out-bound traffic goes out on the
primary address, not any of the aliases. If that's not what you
want you'll need a different approach.

We had a weird problem with a NIC that had a lot of aliases on,
(about 20, iirc), which messed up the default route.

You also need to take some care with the subnets and routing. For
example, if you have two physical networks, 10.* and 193.*, say.
If you add an alias on the 10 network to a NIC which is physically
on the 193 network any packets coming from the box on the 193
network destined to the 10 network will NOT get sent to the default
router, because IP will think that the destination address is on the
local network.

The safest thing is to only use aliases which are in the same
subnet as the NIC to which they are being added.

--
Simon Green
Altria ITSC Europe Ltd
AIX-L Archive at https://new-lists.princeton.edu/listserv/aix-l.html
New to AIX? http://publib-b.boulder.ibm.com/redbooks.nsf/portals/UNIX
N.B. Unsolicited email from vendors will not be appreciated.
Please post all follow-ups to the list.
> -----Original Message-----
> From: cbaker@GOODYEAR.COM [mailto:cbaker@GOODYEAR.COM]
> Sent: 18 May 2004 21:17
> To: aix-l@Princeton.EDU
> Subject: Two (2) IP and hostnames on same NIC
>
>
> How do you define two (2), or more, IP addresses and
> hostnames to the same NIC?   This is AIX 5.2.


This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 22:17:55 EDT