Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Nov 1995 13:18:05 -0500
From:      "Garrett A. Wollman" <wollman@lcs.mit.edu>
To:        Justin Seger <shorty@iii.net>
Cc:        freebsd-questions@freebsd.org
Subject:   How do I setup IP aliases?
Message-ID:  <9511141818.AA23322@halloran-eldar.lcs.mit.edu>
In-Reply-To: <199511132338.SAA18438@iii1.iii.net>
References:  <199511132338.SAA18438@iii1.iii.net>

next in thread | previous in thread | raw e-mail | index | archive | help
<<On Mon, 13 Nov 1995 18:38:19 -0500, Justin Seger <shorty@iii.net> said:

> I want to setup multiple IP addresses for one ethernet card, specifically:
> 199.232.47.49, 199.232.47.52, 199.232.47.53, 199.232.47.54

> My default is to ifconfig le0 to 199.232.47.49.  I tried doing this:
> ifconfig le0 alias 199.232.47.52 then setting up an arp entry:
> arp -s 199.232.47.52 ethernetaddress pub

I'm not sure where you got this idea from.  Unfortunately I don't
follow most of the mailing-lists or newsgroups so somebody may have
been spreading this erroneous advice without giving me a chance to
correct it (again).

This should be in the FAQ.

To support multiple IP addresses on a single interface, you must first
examine the situation closely.  In almost every situation, you will
fall into one of these two cases:

1) Multiple logical IP subnets on a single wire.  In this case, use
the following commands:

	ifconfig de0 inet xxx.yyy.zzz.aaa netmask mmm.nnn.ooo.ppp
	ifconfig de0 alias inet bbb.ccc.ddd.eee netmask qqq.rrr.sss.ttt

2) Multiple logical IP hosts on the same IP subnet.  In this case, use
the following commands:

	ifconfig de0 inet xxx.yyy.zzz.aaa netmask mmm.nnn.ooo.ppp
	ifconfig de0 alias inet xxx.yyy.zzz.bbb netmask 255.255.255.255

-GAWollman

--
Garrett A. Wollman   | Shashish is simple, it's discreet, it's brief. ... 
wollman@lcs.mit.edu  | Shashish is the bonding of hearts in spite of distance.
Opinions not those of| It is a bond more powerful than absence.  We like people
MIT, LCS, ANA, or NSA| who like Shashish.  - Claude McKenzie + Florent Vollant



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9511141818.AA23322>