Showing posts with label freebsd ip config. Show all posts
Showing posts with label freebsd ip config. Show all posts

Friday, May 16, 2008

rc.conf config more than one IP address on one interface

the best way to configure more than one IP to one interface in freebsd is to edit /etc/rc.conf


ipv4_addrs_vr0="192.168.0.1/24 192.168.1.1-5/28" #I prefer this way


It is also possible to add IP alias entries using ifconfig(8) syntax. Assuming that the interface in question was ed0, it might look something like this:

ifconfig_ed0_alias0="inet 127.0.0.253 netmask 0xffffffff"
ifconfig_ed0_alias1="inet 127.0.0.254 netmask 0xffffffff"