Multiple static IPs
Holger Kipp
Holger.Kipp at alogis.com
Wed Mar 3 08:36:05 PST 2004
Erik Sliman (p500.2004 at openstandards.net) wrote:
>How do you give a computer multiple static IPs?
>
>I've tried many things, including the ifaliases setting in rc.conf:
>
>ifconfig_vr0="inet 192.168.1.3 netmask 255.255.255.0"
>ifaliases_vr0="192.168.1.36 255.255.255.0"
>
>but none seem to work.
a) See /etc/defaults/rc.conf
b) Try "man ifconfig" -> alias
c) Use netmask of 255.255.255.255
For your example, try something like
ifconfig_vr0="inet 192.168.1.3 netmask 255.255.255.0"
ifconfig_vr0_alias0="inet 192.168.1.36 255.255.255.255"
d) To understand how this works, look at rc.network. The
corresponding entry is
eval ifconfig_args=\$ifconfig_${ifn}_alias${alias}
if [ -n "${ifconfig_args}" ]; then
ifconfig ${ifn} ${ifconfig_args} alias
eval showstat_$ifn=1
alias=$((${alias} + 1))
else
break;
fi
And I think this is a faq anyway ;-)
Regards,
Holger
More information about the freebsd-java
mailing list