SPNA248 March 2021 TM4C1292NCPDT , TM4C1292NCPDT , TM4C1292NCZAD , TM4C1292NCZAD , TM4C1294KCPDT , TM4C1294KCPDT , TM4C1294NCPDT , TM4C1294NCPDT , TM4C1294NCZAD , TM4C1294NCZAD , TM4C1299KCZAD , TM4C1299KCZAD , TM4C1299NCZAD , TM4C1299NCZAD , TM4C129DNCPDT , TM4C129DNCPDT , TM4C129DNCZAD , TM4C129DNCZAD , TM4C129EKCPDT , TM4C129EKCPDT , TM4C129ENCPDT , TM4C129ENCPDT , TM4C129ENCZAD , TM4C129ENCZAD , TM4C129LNCZAD , TM4C129LNCZAD , TM4C129XKCZAD , TM4C129XKCZAD , TM4C129XNCZAD , TM4C129XNCZAD
The enet_tcpecho_server_static_ip_lwip example is very similar to the enet_tcpecho_server_lwip except that a static IP address is used for the server. There are various reasons where a static IP address is desired. One example would be that the device is setup as an FTP or web server. You would want to ensure that people can always access the server. If the server were assigned a dynamic address, it is possible that the address can change occasionally which would prevent the router from knowing which device on the network is the server.
When assigning static IP addresses for local devices on home or private networks, the addresses should be chosen from the private IP address ranges defined by the Internet Protocol (IP). The static addresses should be limited to the defined ranges:
Make sure the static address you choose is not in use by any other device in your private network or it will result in address conflict errors. Consult with your network system administrator for static IP address selection.
If you want to experiment with the static IP address and are unsure which address is currently unused in the network, you can first run the enet_tcpecho_server_lwip to let the DHCP choose the IP address. This dynamic address will be leased to your device for some time and this ensures no other devices on the same network will be given the same address until the address has expired. Record this address and use it for your static address generation.