*BSD News Article 50358


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!msunews!uwm.edu!math.ohio-state.edu!howland.reston.ans.net!swrinde!gatech!news.mathworks.com!newshost.marcam.com!Empire.Net!news.net99.net!berry.elite.net!almond.elite.net!not-for-mail
From: nate@elite.net (Nate Lawson)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: multiple IP's per one ethernet SOLVED
Date: 31 Aug 1995 20:33:22 -0700
Organization: Elite Networking (Merced, CA)
Lines: 15
Message-ID: <425uu2$8kv@almond.elite.net>
NNTP-Posting-Host: nate@elite.net

The appropriate syntax for aliasing a second IP (if 10.0.0.1 is the 
primary IP and 10.0.0.2 is an alias) is as follows:

ifconfig ed0 inet 10.0.0.1 netmask 0xffffff00
ifconfig ed0 inet 10.0.0.2 netmask 0xffffffff alias

ifconfig ed0:0 inet 10.0.0.1 netmask 0xffffff00
ifconfig ed0:1 inet 10.0.0.2 netmask 0xffffff00 up

Those might be redundant, but I have yet to find documentation on this 
(ifconfig man page is very sparse).

Thanks go to Brian Tao for pointing out the omission of netmask.

-Nate