[afnog] Two IP Addresses on the same Interface

Randy Bush randy at psg.com
Wed Jul 11 12:25:37 UTC 2007


> 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"
ifconfig_em0_alias2="inet 147.28.0.43 netmask 255.255.255.255"
ifconfig_em0_alias3="inet 147.28.0.57 netmask 255.255.255.255"
ifconfig_em0_alias4="inet 147.28.0.59 netmask 255.255.255.255"
ifconfig_em0_alias5="inet 147.28.0.129 netmask 255.255.255.255"
ifconfig_em0_alias6="inet 147.28.0.130 netmask 255.255.255.255"
ifconfig_em0_alias7="inet 147.28.0.131 netmask 255.255.255.255"

in your case, the alias would have a diff mask than /32 i assume

randy



More information about the afnog mailing list