Re: strange kernel message when hacking the NIC driver

Timothy Covell (timothy.covell@ashavan.org)
Sat, 12 Jan 2002 15:58:13 -0600


On Saturday 12 January 2002 15:37, Prof. Brand wrote:
> Timothy Covell <timothy.covell@ashavan.org> said:
> > On Thursday 10 January 2002 23:20, Timothy Covell wrote:
> >
> > Let me clarify what I said earlier. You cannot have
> > identical MAC addresses on two different NICs.
>
> You sure can. Look at your nearest Sun machine with two NICs for an
> example.

And why don't you connect those two NICs with the same MACs to
the same HUB and see how well that works.

>
> > Indeed,
> > it is impossible w/o trying to fool the kernel into
> > redefining the NICs hardware based MAC address.
>
> It is not "fooling", you can set the MAC address on some cards by software.
> Kernel has nothing to do with it.
>
> > As concerns TCP/IP, you can define two NICs to have the
> > same IP address, but you will only end up confusing
> > your switch/HUB router which assumes a 1 to 1 mapping
> > of MACs to IPs. The whole point of ICMP is to
> > discover this mapping via ARP requests.
>
> TCP/IP is a 4(5) level protocol stack:
>
> 0 Hardware [Cribbed from ISO]
> 1 Device driver
> 2 IP [Includes ICMP]
> 3 TCP and UDP
> 4 Applications
>
> A switch/hub works on Ethernet frames, i.e., at the hardware level. It has
> absolutely no idea of mappings of MACs to IPs.
>
> ICMP is part of the IP layer, the whole of the mapping of IPs to MACs is
> (conceptually at least) part of the device driver layer. This includes ARP,
> DHCP et al. ICMP has nothing to do with ARP.

If you have two NICs with the identical MAC address on the same segment,
your ethernet routing will become confused. The ARP table keeps a map
of MAC to IP address. This table assumes a 1 to 1 relationship. If you
try to reach a host but fail due to routing issues, then ICMP sends out
DESTINATION HOST UNKNOWN/HOST UNREACHABLE messages.
So, ICMP and very much to do with ARP.

The whole ISO Model is flawed because there really is not
a clean delineation among the layers. For example, BGP uses TCP
to route IP, so it's an ISO layer 3 process, but it makes use of TCP
which is layer 4. So, you need layer 4 to define layer 3. Crazy huh.
The same argument can be shifted to the Internet Model, which is
IHMO, an after-the-fact idea that came from trying to apply ISO to
Internet.

-- 
timothy.covell@ashavan.org.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/