lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Using multiple IP addresses on one interface


From: Patrick Klos
Subject: Re: [lwip-users] Using multiple IP addresses on one interface
Date: Tue, 5 Jan 2016 12:48:10 -0500
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0

On 1/5/2016 12:34 PM, John Pote wrote:

Patrick,

Thanks for the prompt reply, much appreciated.


My pleasure.

We are currently using LwIP on a Ti Stellaris platform in an embedded product. We anticipate moving on to Ti’s Tiva platform as our particular silicon is at end of life.


We ran into that same problem.  We are currently using the Tiva TM4C129X processor in several of our designs now with no problems.

Do I take it from your reply that the IP subnet mask is not used? I seem to remember coming across a function in the LwIP code to do with setting up that took a mask value.


The IP subnet mask is used by the IP stack to determine when packets can be sent on the local wire and when they need to be forwarded to the "gateway" address (i.e. your router).  I'm pretty sure it has no effect on incoming packets (like you're trying to do).

The other thought I had was to do a bit of translation in the driver for the Ethernet MAC. So multiple IP address all using the same TCP/UDP port get translated to one IP address using multiple ports.

Kind of like NAT?

What is your real goal?  To get a single device listening to the same port on several IP addresses?

I presume multiple listening sockets can be opened on different ports.

Sure.  I presume you can listen to the same port on different interfaces (IP addresses) as well.

Do you think this might be a bit easier?

Not really (in my opinion).  Remember, whatever you "translate" on the way in will need to be reverse-translated on the way out.  Not impossible, but I'm not sure it would be easier than just creating several "virtual" interfaces?  It would take some experimenting, either way.

Either way I’ll have to modify low level code. I’d like to avoid modifying the LwIP stack if at all possible.

If I get a chance, I'll pull out my Tiva Launchpad and see if I can rig up something like what you're trying to do.

Good luck,

Patrick Klos
Laufer Wind


reply via email to

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