lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] using two ethernet cards with on IP Address


From: address@hidden
Subject: Re: [lwip-users] using two ethernet cards with on IP Address
Date: Thu, 31 Jan 2008 19:24:45 +0100
User-agent: Thunderbird 2.0.0.9 (Macintosh/20071031)

Hehe, given the current state of IPv6 in lwIP, it is probably no good idea to try this ;-)

I have two different networks therefore its not really a problem.

Yeah, but thy wouldn't have the same subnet settings, would they? In that case 
with IPv4, you can't connect to both from the same network or they won't know 
how to route (see below).


anyway, can you give some tips about what problems would i encounter when
using 2 ethernets (even with different ip addresses), on the same process
thread?

Even with 2 different IP addresses: if you have 2 interfaces in one machine that is connected to 2 (physically separated) networks, the networks must have different subnet settings.

While receiving is no problem (ARP resolution should work fine; IP allows the packet since the local IP matches), sending will be a problem because it always (even on other OSes) works like this:
- you specify a destination IP
- the stack checks its routing table which interface to use when sending to that IP address's network - the packet is sent on that interface (might be sent to the default gateway of that interface if it's no local packet)

This results in outgoing packets always being sent on the netif that comes first in the routing table (the first match is taken). LwIP's routing table is quite simple: the netif_list is simply checked for IP address and netmask to match.

Using multiple interfaces is no problem on lwIP, however your networks must be on different subnets.

Simon


Grubb, Jared schrieb:
FYI: In IPv6, you can actually have this situation. For example, if you
have a router that is sitting on the edge of two different "links"
(think subnets), then it is possible to have the same link-local IP
address for both links. You can explicitly address them using the
"address%zoneid" syntax (e.g., in Linux, 'FE80::1%eth0' and
'FE80::1%eth1' represent the same IP address on the same machine for two
different interfaces in two different link-local zones). (See
http://en.wikipedia.org/wiki/IPv6#Zone_indices)

As for the equivalent situation in IPv4, I'd have to defer to you on how
it would be handled.

Jared

-----Original Message-----
From: address@hidden
[mailto:address@hidden On Behalf Of
Goldschmidt Simon
Sent: Thursday, January 31, 2008 00:27
To: Mailing list for lwIP users
Subject: RE: [lwip-users] using two ethernet cards with on IP Address

Is it possible to use the package, for activating two Ethernet cards(2
different mac - addresses)
with the same IP address, which will work on the same processing
thread (tcpip_thread) with two
different interrupts of receive?

Actually, I don't think having the same IP for different MAC addresses
is supported on any OS or makes much sense: If you connect them to the
same switched network, a client asking for the IP's MAC will only get
one MAC returned (or gets confused because it gets both MACs) and will
use that MAC for the connection.

Maybe you can explain what you intend to do? If you try to increase
bandwidth by using 2 ethernet cards instead of one, you need some other
mechanism (that is implemented on the other side of the cable as well)
to achieve this.

Simon


_______________________________________________
lwip-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-users


_______________________________________________
lwip-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-users






reply via email to

[Prev in Thread] Current Thread [Next in Thread]