This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Lwip with dual stack IPv4/IPv6

Other Parts Discussed in Thread: EK-TM4C1294XL

Hi all,

Does anyone know if Texas porting of Lwip (...\ti\TivaWare\third_party\lwip-1.4.1) supports Dual stack IPv4/IPv6? 

I'm using TivaWare revision 2.1.0.12573, kit EK-TM4C1294XL, CCS 6, Texas compiler v5.1.6.

  • Hi, really is a problem does not exist examples.
    But with such a question is subject to some "guru" answer him "will study".
    But ok, if the folder:
    \ TivaWare_C_Series-2.1.0.12573 \ third_party \ lwIP-1.4.1 \ src \ include \ ipv6 \ lwIP,
    and:
    \ TivaWare_C_Series-2.1.0.12573 \ third_party \ lwIP-1.4.1 \ src \ core \ ipv6 ...
    But you have to build the project, because I think there is.

    "IPv6 support in lwIP is very experimental".

    Regards
    Aquino
  • Hi Vinicius,

    The IPv6 is supported by lwIP. I don't think there is anything different needed in the porting layer for the IPv6 to work. But we did not have any examples/demo codes in the TivaWare to demonstrate the use of IPv6.

    Thanks,
    Sai
  • Hi Sai,

    I refer specifically to dual stack:

    "Support for IPv6 is currently being added to LwIP. Up to version 1.4.x LwIP can use either IPv4 or IPv6, but not both. Code for dual Stack operation is in the current development version". So, in Lwip directory under Tiware, is there code to dual stack?

  • Hi Vinicius,

    I am not sure if the version of lwIP that supports dual Stack operation is released yet. TivaWare supports version 1.4.1 and from lwIP website dual stack operation is not supported in this version.

    Thanks,
    Sai
  • Hi Vinicius, LW stay for Light Weight so just one stack can fit in low footprint. New processor has large footprint so this can be done, try ask on LWIP site or better to Adam about planned date release add this feature to his descendants.

    http://dunkels.com/adam/software.html

     Adams is no more a student so it founded Contiki, it sell network product development services, just try if can fit your application but remember is not free.

  • Vinicius Maciel said:
    Support for IPv6 is currently being added to LwIP. Up to version 1.4.x LwIP can use either IPv4 or IPv6, but not both. Code for dual Stack operation is in the current development version". So, in Lwip directory under Tiware, is there code to dual stack?

     Hi Vinicius, Sai, I checked task status of LWIP development and few dual stack job are assigned and still are at 0%.

  • Hi,

    I need dual stack in my application, because I have to run IPv6 TCP socket and web server(IPv4) at the same time. But I'm not sure if it's necessary to have dual stack support.
    Fortunately I managed to adapt the updated LwIP code with Texas porting(directory ports). With small changes, I am enable to compile and run my project. I ran a socket tcp server(IPv4) and works very well. Now I will test a IPv6 socket server, after dual stack operation.

  • Vinicius Maciel said:
    I need dual stack in my application, because I have to run IPv6 TCP socket and web server(IPv4) at the same time. But I'm not sure if it's necessary to have dual stack support.

     Hi Vinicius, just a moment to clarify what do you mean with:

     web server is the highest level application protocol layer and TCP socket layer has nothing to do with transport nor routing than addressing differences.

     Stack IPV6 mean all IP transport use 128bit instead of 32, so IPV4 on TCP HTTP protocol is striding, if you choose IPV6 all addresses are IPV6 and if you compiled this mean you selected IPV6 or a lot of error/warning appear, don't ignore warning on IP size if you intermixed code IP4 IP6, they are not compatible.

     If you have some IP addr into URL or URI then need some update too, format example:

    192.168.1.123 -> ::ffff:192.168.1.123, check if LWIP API  take care of this.

     Also take care about localhost/localaddress and all IPV6/MAC address related oddity.

     Few are using IPV6 and just BSD well supported from long time.

     Reference 1 ISO OSI:

    http://en.wikipedia.org/wiki/OSI_model

    Reference 2 I P layer:

    http://en.wikipedia.org/wiki/Internet_Protocol

     A better guide can be a book like Computer Networks by Andrew S. Tanenbaum also author of Minix from where born Linux.

  • Not sure if this is of any help, but it appears TI-RTOS has dual stack networking.

    (I never worked with it, I just saw it and thought it may be an alternate solution.).  I don't know if it supports the Tiva chip, but source code is available.  Perhaps a TI person can give more useful information if this is a possible solution for you.

    www.ti.com/.../ndktcpip Networking&tisearch=Search-EN-Everything

    TI-RTOS Networking (formerly known as the NDK or Network Developers Kit) combines dual mode IPv4/IPv6 stack with some network applications. TI-RTOS Networking support is available for both Ethernet-enabled MCUs as a part of TI-RTOS and also for TMS320C6000(TM) High Performance DSP-based devices. 

  • Hi Quark, thank for advice, yes is TIVA supported, and I ported my application but I seen examples just few minutes then I realized API is BSD like and never touched again, all my code ported in less time to RTOS than LWIP.
    TIVA ETH module exploited some trouble I pointed on early day but I suppose now is more stable and silicon errata is well known, I got a new sample of processor but I have to try if it work also at full speed, worst was on DK-TM4c129 than EK-TM4c1294xl. On my application board remained XM processor so I leave run at low speed, never touch what is working!!

    About IPV6 IMHO time is not so mature for IPV6 and less router and network device are supporting it correctly, we can have feedback from Vinicius about his application.
  • Hi,
    I am aware of capacity of TI NDK suporting dual stack IPv4/IPv6. In fact, I have just completed my entire project using TI-RTOS+NDK and the NDK met all my requirements. I can say that it is an incredible stack that fully supports IPv6! But now I have to port the project to FreeRTOS+Lwip.

    Because we need a solution that works on any processor. Well, I can not question orders. You know what i mean :D
  • Vinicius Maciel said:
    I can say that it is an incredible stack that fully supports IPv6! But now I have to port the project to FreeRTOS+Lwip.

    Because we need a solution that works on any processor.

     Hi Vinicius, sorry for pointing to Stack and ISO OSI definition I suppose you know in deep, about LWIP API are IPV4 converted? If yes transport them seamless?

     From your last post is correct you have an IPV4 based server on IPV6? Can you briefly explain if not confidential?

     When I was evaluating stack on TIVA, FreeRTOS scored high as good multivendor supported OS, a solid TCPIP stack (IPV4 only) but less supported on TIVA for now. I have to say thank to FreeRTOS get me inspiration about what was wrong in ETH module.

  • " Hi Vinicius, sorry for pointing to Stack and ISO OSI definition I suppose you know in deep, about LWIP API are IPV4 converted? If yes transport them seamless?" Sorry, I did not understand this question. 

    "From your last post is correct you have an IPV4 based server on IPV6? Can you briefly explain if not confidential?"

    No, let me explain. In my project I have 4 TCP sockets in 4 ports. At startup I read the EEPROM. If a configuration byte have IPV4 value, I open four socket with IPv4. Otherwise, I open four sockets with IPv6. But I never open sockets IPv4 and IPv6 at the same time, although I think that is possible. Something similiar to tcp_echo/tcpEchoIPv6. Besides the socktes, I also start a HTTP server, which is always accessed via the IPv4 address, independent of sockets(IPv4/IPv6).

    "When I was evaluating stack on TIVA, FreeRTOS scored high as good multivendor supported OS, a solid TCPIP stack (IPV4 only) but less supported on TIVA for now. I have to say thank to FreeRTOS get me inspiration about what was wrong in ETH module.

    I'm running FreeRTOS+LwIP in my EK-TM4C1294XL and works very well, at least with IPv4 sockets. As I said before, now I will test IPv6 using updated Lwip source code: http://git.savannah.gnu.org/cgit/lwip.git

  • Hi,

    I am finally able to create ipv4 and ipv6 sockets using Lwip! It has an impressive performance, very good. I just made some small changes in lwiplib.c and other files.