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: John Pote
Subject: Re: [lwip-users] Using multiple IP addresses on one interface
Date: Tue, 5 Jan 2016 17:34:08 +0000

Patrick,

Thanks for the prompt reply, much appreciated.

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.

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 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. I presume multiple listening sockets can be opened on different ports. Do you think this might be a bit easier? Either way I’ll have to modify low level code. I’d like to avoid modifying the LwIP stack if at all possible.

Regards,

John

 

From: lwip-users-bounces+address@hidden [mailto:lwip-users-bounces+address@hidden On Behalf Of Patrick Klos
Sent: 04 January 2016 17:46
To: address@hidden
Subject: Re: [lwip-users] Using multiple IP addresses on one interface

 

On 1/4/2016 10:25 AM, John Pote wrote:

Hello all,

 

I am new to LWIP and working on extending some legacy code using the LWIP stack. It would be useful now if we could have a number of IP addresses on the one network interface.

I found the thread “LWIP and second IP feasible?” dated 5 Mar 2011 (http://lists.nongnu.org/archive/html/lwip-users/2011-03/msg00024.html)  which indicates it is possible with some effort.

My situation is perhaps a little simpler in that consecutive, statically allocated IP addresses will be used. So I wondered if a single IP address could be assigned to the IP stack with an appropriate subnet mask. EG

IP            192.168.1.16

Mask     255.255.255.252

The subnet would then consist of the 4 addresses 192.168.1.16/17/18/19.

 

Would the rest of LWIP stack manage the above arrangement correctly? I will need to open a listening socket on each IP address.

 

Any thoughts and help appreciated,


Hello John,

You'll clearly have to tweak any code that checks local IP address(es).  I'm pretty sure they're all expecting a single IP address (not an address and mask).  I'm sure it's not a huge task. 

As was suggested in the thread you mentioned, another approach might be to create alternate ethernet interfaces, one for each IP address, so the rest of the code (hopefully) doesn't have to know or care?  There still may be some tweaking to make it all seamless, but it doesn't sound very difficult.

What platform are you using LwIP on?

Patrick Klos
Laufer Wind



THIS MESSAGE IS CONFIDENTIAL AND/OR MAY BE PRIVILEGED INFORMATION, and is intended for a particular recipient(s) only. If you have received this message by mistake please notify us by return email then delete it from your system. This message has not been encrypted. It may therefore be liable to compromise. It is your responsibility to scan this message for viruses. Viruses and compromises of security are inherent risks in relation to email. To the extent permitted by law we do not accept any liability for any virus infection and/or external compromise of security in relation to transmissions by email. Any personal views expressed in this message are not necessarily the views of Integrated System Technologies Ltd, its directors or employees. Please note that contracts may NOT be concluded on behalf of Integrated System Technologies Ltd by email

PATENTS: IST considers innovation as key to LED technology development and invests heavily in R&D to keep our customers ahead of their competitors. Our growing intellectual property portfolio enables the next generation of LED lighting to occur and already has key patents granted worldwide as follows: UK Patent No(s): 2,499,220; 2,340,215; 2,369,730; 2,408,315; 1,433,363; 0720488.6; 0814255.6; 2433091; 2,491,550 - CHINA Patent No: Int Pat App PCT/GB2009/001923, ZL200980139063.2; CN102177395A - JAPAN Patent No: 4445082 - US Patent No(s): 6,422,718; 6,963,175; 11/912 098; 12/738 750; PCT/GB2009/001923; 7 923 935, US-2011-0140633-A1; 13/351 001 - AUSTRALIA Patent No(s): 2002321596; 2009278992; 2012200252 - CZECH REPUBLIC Patent No: 1,433,363 - DENMARK Patent No: 1,433,363 - FRANCE Patent No: 1,433,363 - GERMANY Patent No: 602 31 418.6 - IRELAND Patent No: 1,433,363 - ITALY Patent No: 1,433,363 - LUXEMBOURG Patent No: 1,433,363 - MONACO Patent No: 1,433,363 - SWITZERLAND Patent No: 1,433,363 - THE NETHERLANDS Patent No: 1,433,363 - SWEDEN Patent No: 1,433,363 - EUROPEAN Patent Application No(s): 05735894.7; 08750475.9; 2324280; Euro Pat App 2 218 304; 12151464.0; PCT Patent Application No: PCT/GB2009/001923 - US Patent No. 8 659 237; 8 664 882

reply via email to

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