lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Routing and link up/down vs. netif up/down


From: Sergio R. Caprile
Subject: Re: [lwip-users] Routing and link up/down vs. netif up/down
Date: Mon, 09 Jun 2014 18:36:28 -0300
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:24.0) Gecko/20100101 Thunderbird/24.5.0

 

> Well yes and no. I don't decide how the customer will use the two interfaces.
> But if he does attach them to the same subnet and wants to have cable 
> redundancy, it should behave in a way that works at least similar to what a 
> full fledged IP stack like the linux one would.

Well, in that case you should run your app on a full fledged Linux system.
You'll see, when the dinosaurs ruled the earth and I was studying networking,
Cisco's did not allow two interfaces within the same subnet. The definition of
"routing" requires different "networks". Since then, some strategies were
developed, like for example having a bridge before the router and so the router
sees a virtual interface which is virtually connected to the virtual bridge,
which has two more interfaces, belonging of course to the same subnet because
it is a bridge. As both interfaces are on the same device, a switch is a 
simpler concept.
Things may have changed, but since IPv4 and Ethernet are still the same, I don't
think Linux might actually do anything radically different from this, although
it does it internally and you don't see it, and it does it good.
The lw in lwIP stands for light-weight, so if you require a heavy-weight you'll
have to lift it yourself. I would start by writing a netif driver for a
non existent simple pseudo-device that will connect lwIP to "the switch", and 
then
write the switch code to do what its name suggests among the external, aka 
"real"
interfaces, keeping one and only one active (otherwise you'll have a bridge... 
and
you'll have to avoid repeating yourself.
If I were you, I would instruct the user not to do what is not intended to do 
with the
device. But I'm not.
Regards





reply via email to

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