[afnog] Two IP Addresses on the same Interface
Phil Regnauld
regnauld at x0.dk
Wed Jul 11 12:33:29 UTC 2007
Randy Bush (randy) writes:
> > I'd like to configure two routable IP addresses (from different
> > prefixes) on the same NIC. How can I go about this in FreeBSD?
>
> from /etc/rc.conf
>
> ifconfig_em0="inet 147.28.0.62 netmask 255.255.255.0"
> ifconfig_em0_alias0="inet 147.28.0.34 netmask 255.255.255.255"
> ifconfig_em0_alias1="inet 147.28.0.36 netmask 255.255.255.255"
[...]
> in your case, the alias would have a diff mask than /32 i assume
He says "different prefixes". If that's the case, then the
alias will have the real netmask.
i.e.:
ifconfig_em0_alias0="inet 1.2.3.4/27"
/32 is only used for aliases within the same IP subnet.
P.
More information about the afnog
mailing list