Can several interfaces in one computer actually have a unique IP address?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The Linux NET-3-HOWTO states at section 5.1.4 that it is legal to use the
same IP address on each interface of a single machine in some circumstances.
I don't understand how that could be.
Here it is what I guess to happen:
1) If two interfaces are attached to the same physical network they would
compete for the same connections from other hosts: Both interfaces would
answer the ARP requests with a different MAC and, correct me if I am
making mistake, the host initiating the connection would use the MAC of the
last ARP response, making impractical the other interface.
In the case that the host having two interfaces starts the communication it
would send its datagrams to the network and interface that first matches the
destination address in the routing table. Again, the rest of the interfaces
have no practical use.
2) If each of two interfaces are attached to different physical networks
among which the host would function as a gateway, the gateway wouldn't
be able to forward datagrams correctly. No matter what netmask is used
for the gateway interfaces the network portion of the destination IP
address would always match both routes in the routing table, or at least
it would forward datagrams towards the interface that first matches
the destination address in the routing table, since a lookup in the routing
table only matches one entry.

If two physical interfaces are used for the purpouse of doubling bandwidth,
they should be used under an only OS network interface or with two
different IP addresses.

I suspect the NET-3-HOWTO assesment is in error.
If it's not I would appreciate the explanation and some example.
I'm developing user networking documentation, so this will help other people
to understand the internals of Linux networking and what they can and cannot
do with the current TCP/IP implementation.
TIA.
Zacarías


-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux