Re: 2 IP addresses for one network card

From: Chuck Forsberg (caf_at_localhost.localdomain)
Date: 10/22/04


Date: Thu, 21 Oct 2004 21:33:57 -0700

On Sun, 26 Oct 2003 02:09:08 +0200, Jan Gosch wrote:
> You have to ceate an alias for the NIC. You can assign as many
> ip-addresses to a NIC as you like.
> create a file in /etc/sysconfig/network-scripts named ifcfg-eth0:0 with an
> ipaddress and netmask.
> For other ip's ifcfg-eth0:1 and so on. Thats it.
>
Thanks for the tip. The ifconfig man page makes no mention of this!

-- 
Chuck Forsberg    caf@omen.com   www.omen.com   503-614-0430
Developer of Industrial ZMODEM(Tm) for Embedded Applications
  Omen Technology Inc      "The High Reliability Software"
10255 NW Old Cornelius Pass Portland OR 97231   FAX 629-0665


Relevant Pages

  • ipnat with alias?
    ... Will someone tell me please how to enable nat for the alias on an interface, ... inet w.x.y.126 netmask 0xfffffffc media autoselect ... pass out on rtk0 all head 150 ...
    (comp.unix.bsd.netbsd.misc)
  • Re: Is there anything weird I should know about using ipfw on alias addresses?
    ... > ifconfig shows the alias addresses correctly bound. ... inet 210.5.51.27 netmask 0xffffffff broadcast 210.5.51.27 ... ipfw doesn't do anything different with any address in particular except ...
    (freebsd-questions)
  • Re: Jails and IP Aliasing
    ... ones if the alias is for an address that's part of the same network. ... netmask, with any additional aliases using a netmask of all ones. ... one style over the other -- just a matter of administrator preference. ...
    (freebsd-questions)
  • Re: Obytes counter in netstat not incrementing
    ... related to my netmask address for the inet alias? ... alias Establish an additional network address for this interface. ...
    (freebsd-hackers)
  • Re: ifconfig alias is not working
    ... you should always use a 32-bit netmask, as suggested by the ifconfig man ... ifconfig rl0 inet NEW_IP netmask 255.255.255.255 alias ... Yes, i tried to configure such alias, so on one interface ... alias Establish an additional network address for this interface. ...
    (comp.unix.bsd.freebsd.misc)