freebsd at meijome.net
Sun Sep 9 18:33:06 PDT 2007
On Sun, 9 Sep 2007 11:50:11 -0700
jekillen <jekillen at prodigy.net> wrote:
> I have built a machine with two network interfaces and tried
> assigning local addresses in the same subnet mask:
> 192.168.1.1 192.168.1.2 for example to each of the
> interfaces and only one of the interfaces will respond to
> a connection attempt (via ftp or ssh for example). I found
> that each of the interfaces have to be assigned an address
> in a different subnet. for them to both be usable.
please show us the relevant settings in rc.conf (or the ifconfig commands you issue if you havent set these settings in rc.conf yet).
My gut feelling tells me you are setting the netmask for the aliased interfaces to the "proper" netmask (eg, 255.255.255.0) , rather than the /32 netmask aliases *ON THE SAME SUBNET AS OTHER IP ON SAME NIC* should have.
ifconfig_bge0="inet 192.168.1.1 netmask 255.255.255.0"
ifconfig_bge0="inet 192.168.1.2 netmask 255.255.255.0" << THIS netmask should be 255.255.255.255
Search the archives for the reasons behind this. I believe the reasons are specific to FreeBSD TCP/IP stack.
"Ugly programs are like ugly suspension bridges: they're much more liable to collapse than pretty ones, because the way humans (especially engineer-humans) perceive beauty is intimately related to our ability to process and understand complexity. A language that makes it hard to write elegant code makes it hard to write good code."
I speak for myself, not my employer. Contents may be hot. Slippery when wet. Reading disclaimers makes you go blind. Writing them is worse. You have been Warned.
More information about the freebsd-questions