lwIP logo

lwIP

Free

lwIP is a small independent implementation of the TCP/IP protocol suite that has been initially developed by Adam Dunkels. Supports DHCP with AutoIP fallback, UDP, TCP, and an interrupt driven model.

FreeFree tier
Type
Open Source

About lwIP

lwIP is a widely used open-source implementation of the TCP/IP protocol suite designed specifically for embedded systems with limited resources. Initially created by Adam Dunkels, it is now maintained by a community under the Savannah project. The stack focuses on reducing RAM and ROM usage while providing a full-scale TCP implementation, making it suitable for devices with tens of kilobytes of free RAM and around 40 kilobytes of code ROM. It supports a comprehensive set of protocols including IPv4/IPv6, ICMP, ND, MLD, UDP, TCP, IGMP, ARP, PPPoS, and PPPoE. Additional features include DHCP client, DNS client with mDNS hostname resolution, AutoIP/APIPA (Zeroconf), SNMP agent (v1, v2c, v3 with private MIB support), and a MIB compiler. lwIP offers specialized APIs for enhanced performance as well as an optional Berkeley-alike socket API. Extended capabilities include IP forwarding over multiple network interfaces, TCP congestion control, RTT estimation, and fast recovery/fast retransmit. Add-on applications such as HTTP(S) server, SNTP client, SMTP(S) client, ping, NetBIOS nameserver, mDNS responder, MQTT client, and TFTP server are also available. The software is released under a BSD-style license and is in production/stable development status.

Key Features

Protocols: IP, IPv6, ICMP, ND, MLD, UDP, TCP, IGMP, ARP, PPPoS, PPPoE
DHCP client with AutoIP/APIPA (Zeroconf) fallback
DNS client including mDNS hostname resolver
SNMP agent (v1, v2c, v3) with private MIB support and MIB compiler
Specialized high-performance APIs and optional Berkeley-alike socket API
IP forwarding over multiple network interfaces
TCP congestion control, RTT estimation, fast recovery/fast retransmit
Add-on applications: HTTP(S) server, SNTP client, SMTP(S) client, ping, NetBIOS nameserver, mDNS responder, MQTT client, TFTP server

Pros & Cons

Pros
  • Very lightweight and optimized for embedded systems
  • Full suite of TCP/IP protocols including IPv6 and advanced features
  • BSD-style license allows flexible use in open-source and proprietary projects
  • Active development with regular releases and bug fixes
  • Extensive add-on applications available (HTTP, MQTT, SNTP, etc.)
Cons
  • Not designed for high-throughput desktop/server environments
  • Learning curve for developers unfamiliar with embedded networking stacks
  • Some features (like full TLS) may require additional integration

Best For

Embedded systems with limited memory (tens of KB RAM, ~40 KB ROM)Internet of Things (IoT) devices requiring reliable network connectivityMicrocontroller-based networking projectsResource-constrained networking applications needing full TCP/IP stack