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 1.2.3.4/24
To remove an alias:
ifconfig em0 -alias 1.2.3.4/24
To assign persistent IP aliases edit /etc/rc.conf:
ifconfig_em0_alias0= "inet 1.2.3.4 netmask 255.255.255.0"
ifconfig_em0_alias1= "inet 1.2.3.5 netmask 255.255.255.0"






Got a comment?

captcha =

Categories

  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.