Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 Feb 2001 14:00:40 -0600
From:      Lucas Bergman <lucas@slb.to>
To:        ereese <ereese@acool.net>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: multiple IP addresses/interface (was: vhost)
Message-ID:  <20010207140040.E29737@billygoat.slb.to>
In-Reply-To: <000801c09130$3d3fe830$0926a93f@aries>; from ereese@acool.net on Wed, Feb 07, 2001 at 01:03:12PM -0500
References:  <000801c09130$3d3fe830$0926a93f@aries>

next in thread | previous in thread | raw e-mail | index | archive | help
> how do i publish multiple ips to the freebsd box to use with vhost
> and virtual hosted webs?  ie... i have 1 ip for the box i need to
> add many more for different vhost.   i need to know how to make them
> permenant and add on the fly without having to reboot each time to
> add a new vhost

  # ifconfig zz0 inet 1.2.3.4 alias

Check ifconfig(8) and look at the "alias" command.  To remove an
alias,

  # ifconfig zz0 inet 1.2.3.4 -alias

You can also add lines in /etc/rc.conf like

  ifconfig_zz0_alias0="inet 1.2.3.4"
  ifconfig_zz0_alias1="inet 2.3.4.5"

and so on, to make the aliases happen when you boot.  Paraphrasing
ifconfig(8), if the alias is on the same subnet as the first network
address for the interface, add "netmask 255.255.255.255" (or, of
course, "netmask 0xffffffff") after the IP address.

> ... will someone pls give me ...

What is with people spelling please as "pls?"  Are the keys with the
vowels on them somehow harder to push?

Lucas


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




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