How to assign an additional IP address (alias) to a network interface in FreeBSD

To set up an additional network alias in FreeBSD (it will disappear after reboot):

ifconfig em0 alias
To remove an alias:
ifconfig em0 -alias
To assign persistent IP aliases edit /etc/rc.conf:
ifconfig_em0_alias0= "inet netmask"
ifconfig_em0_alias1= "inet netmask"

Got a comment?

captcha =


  1. System (20)
    1. FreeBSD (5)
    2. Linux (9)
  2. Email (2)
  3. DNS (2)
  4. Databases (1)
  5. WebServer (27)
Copyright © 2012-2015 HowToUnix - *nix Howtos and Tutorials
All Rights Reserved.