Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 Jun 1999 19:57:29 -0400 (EDT)
From:      "Crist J. Clark" <cjc@cc942873-a.ewndsr1.nj.home.com>
To:        tetetet@te.com (eq)
Cc:        questions@FreeBSD.ORG
Subject:   Re: multiple IPs on 1 interface
Message-ID:  <199906162357.TAA29435@cc942873-a.ewndsr1.nj.home.com>
In-Reply-To: <004401beb79d$637038c0$0200a8c0@video.eecue.com> from eq at "Jun 15, 99 07:10:20 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
eq wrote,
> Is it possible to assign multiple IP adresses to a single interface.

See ifconfig(8),

    "alias   Establish an additional network address for this interface.  This
             is sometimes useful when changing network numbers, and one wishes
             to accept packets addressed to the old interface."

And rc.conf(5),

     network_interfaces
                  .
	          .
	          .
                                           "It is also possible to add IP
                   alias entries here in cases where you want a single inter-
                   face to have multiple IP addresses registered against it.
                   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"

                   And so on.  For each ifconfig_<interface>_alias<n> entry
                   that is found, its contents are passed to ifconfig(8).  Ex-
                   ecution stops at the first unsuccessful access, so if you
                   had something like:

                   ifconfig_ed0_alias0="inet 127.0.0.251 netmask 0xffffffff"
                   ifconfig_ed0_alias1="inet 127.0.0.252 netmask 0xffffffff"
                   ifconfig_ed0_alias2="inet 127.0.0.253 netmask 0xffffffff"
                   ifconfig_ed0_alias4="inet 127.0.0.254 netmask 0xffffffff"

                   Then note that alias4 would not be added since the search
                   would stop with the missing alias3 entry."


> I have
> two static connections to the internet and would like to share bandwidth
> over the two of them.  I would like to avoid using three NICs in my
> system... I already have two for my firewall.

You have two physical connections? How are you going to use the same
IP address at your end for both? If you're not familiar with ifconfig,
are you familiar with the routing issues that involves?
-- 
Crist J. Clark                           cjclark@home.com


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199906162357.TAA29435>