Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Jun 2005 17:02:21 -0500 (CDT)
From:      "Alfredo Aguirre" <aguirre@canal22.org.mx>
To:        <freebsd-questions@freebsd.org>
Subject:   RE: configuring two network interfaces, same subnet
Message-ID:  <62560.207.249.4.240.1118700141.squirrel@webmail.canal22.org.mx>
In-Reply-To: <200506131926.j5DJQZQZ070053@unsane.co.uk>
References:  <63826.207.249.4.240.1118686283.squirrel@webmail.canal22.org.mx> <200506131926.j5DJQZQZ070053@unsane.co.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
Vince dijo:
>
>
>> Hello people!,
>>
> Hi
>
>> I'm trying to configure 2 network interfaces in the same
>> subnet, because i want to  use one interface for NS and the
>> other for MX,
>>
>> if i try
>> bash-2.05b# ifconfig em0 aa.bb.dd.1 netmask 255.255.255.0
>> bash-2.05b# ifconfig em1 aa.cc.ee.2 netmask 255.255.255.0
>> ifconfig: ioctl (SIOCAIFADDR): File exists
>>
>> ok they both cannot be in the same subnet.
>
> Yep this thread here
> http://lists.freebsd.org/pipermail/freebsd-net/2003-July/001108.html
> Seems to cover it quite well.

yep i've checked there

and it says:

8<-------------------------------------------------------------
I have two interfaces on a 192.168.1 network and I open a socket, bind
the local address to INADDR_ANY and the remote address to something
else on the 192.168.1 network, which interface do I pick for outgoing
packets?

The dark secret in OpenBSD and NetBSD here is that they always pick the
same one.  You think you're "load balancing" by putting two interfaces
in there, but the general truth is that you're just pouring electrons
into unused hardware unless you've carefully configured the system to
make use of both interfaces.
--------------------------------------------------------------8<

i'd like to configure one ip for the mail and other one for the dns, to
have Alias sound good but the machine has 2 nics already and i dont want
to have unused hardware.

>
>>
>> i know that i cannot have them both in the same subnet
>> without modifying the routing, but im confussed about it.
>>
>> i also tried after settin' one of the ips, deleting the routing
>>
>> bash-2.05b# route delete aa.bb.cc.0
>>
>> and then setting the ip
>>
>> bash-2.05b# ifconfig em0 aa.bb.dd.1 netmask 255.255.255.
>>
>> ok i can now set the 2 ips in the same subnet but my DNS
>> stops working,
>>
>> i dont want to change the submask, for any of my ips
>>
>
> As far as I know you cannt have 2 interfaces on the same subnet
> full stop on freebsd, and to be fair I cant see what advantage
> it would give you if you could.
>

so it wont give any advantage just having one nic for each one (the NS and
the mail server)?

> Vince
>
>> well im confused about it, so i hope you guys could adress me
>> in the right direction,
>>
>> Thanks in advance,
>>
>> Alfredo
>>
>>

Thanks in advance,

Alfredo





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