Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 31 Aug 2019 09:26:15 +0700
From:      Eugene Grosbein <eugen@grosbein.net>
To:        bsd.lists@h8spam.org, FreeBSD NET <freebsd-net@freebsd.org>
Subject:   Re: Difficulty using more than a 2 port NIC
Message-ID:  <1f71d773-9346-a811-1592-fa0d437df405@grosbein.net>
In-Reply-To: <7996a2e188386dff1d31f76621f5abae@h8spam.org>
References:  <7996a2e188386dff1d31f76621f5abae@h8spam.org>

next in thread | previous in thread | raw e-mail | index | archive | help
31.08.2019 8:56, bsd.lists@h8spam.org wrote:

> I lease 7 public addresses.
> I'm running into a strange problem setting up a NIC
> with more than 2 (public) addresses.
> I initially did some research, and found an re(4) 2
> port NIC that was well supported (RTL8169S).
> The host (box) I'm attempting all this on manages 3
> addresses. So I simply set it up as follows ( rc.conf(5) ):
> 
> hostname="sum.host-n.ame"
> # re0
> ifconfig_re0="inet AA.BB.CC.83 netmask 255.255.255.0"
> # re1
> ifconfig_re1="inet AA.BB.CC.82 netmask 255.255.255.0"
> ifconfig_re1_alias0="inet AA.BB.CC.86 netmask 255.255.255.0"
> 
> defaultrouter="AA.BB.CC.1"
> ifconfig_re0_ipv6="inet6 accept_rtadv"
> ifconfig_re1_ipv6="inet6 accept_rtadv"
> 
> And all worked as intended.

You was a bit lucky. It is not supposed to work this way.
Generally, you should not have more than single network interface attached to single IP subnet.
Instead, you assign one of IPs as primary address and others as secondary addresses with mask /32.
So you don't need additional physical ports to utilize any number of addresses.

There are some cases when you use port aggregation for ports connected to same switch and subnet
but then you still use single lagg(4) logical network interface to assign all your IPs.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1f71d773-9346-a811-1592-fa0d437df405>