1 Reply Latest reply on Jul 8, 2018 11:47 PM by grsr

    Is WICED's NetXduo built with NX_DISABLE_ARP_AUTO_ENTRY?

    webmstreric

      By default WICED only has 6 entries in the ARP table. (See WICED/network/NetX_Duo/WICED/wiced_network.h)

       

      #define ARP_CACHE_SIZE                  (6 * SIZE_OF_ARP_ENTRY)

       

      If you have a lot more than 6 devices on the layer 2 network that are frequently communicating then every one of those devices would be expected to send out ARP requests. By default NetXduo stores the sender of every received ARP request in the ARP table. If there are only 6 entries in the table, the table will quickly fill up with entries from other devices with which a specific device may never intend to communicate and the entries for devices with which it does normally communicate will get overwritten. This means it may have to send an ARP request almost every time it communicates with each IP that it frequently communicates with. This will dramatically slow down communications.

       

      We ran into this problem when developing code on WICED 3.5.1 and have upgraded the code to include newer features in more recent releases of WICED. Back then each of our devices was frequently sending messages to 20, 30 or more IP addresses. An ARP table of 6 was clearly too small for our application. Now we have optimized communication using multicasts, so each device should only be communicating with a small number of IP addresses. Thus an arp table with only 6 entries should be big enough as long as NetXduo's automatic ARP entries are disabled with NX_DISABLE_ARP_AUTO_ENTRY.

       

      Since NetXduo is a prebuilt library, we don't have control over NX_DISABLE_ARP_AUTO_ENTRY.

       

      Now that we are upgrading to WICED 6.2, is WICED's NetXduo built with NX_DISABLE_ARP_AUTO_ENTRY?

       

      See https://rtos.com/wp-content/uploads/secure/NetX_User_Guide.pdf pp 87-88:

       

      ARP Dynamic Entries p 87
      By default, the ARP enable service places all entries
      in the ARP cache on the list of available dynamic
      ARP entries. A dynamic ARP entry is allocated from
      this list by NetX Duo when a send request to an
      unmapped IP address is detected. After allocation,
      the ARP entry is set up and an ARP request is sent to
      the physical media.
      A dynamic entry can also be created by the service
      nx_arp_dynamic_entry_set.
      If all dynamic ARP entries are in use, the least
      recently used ARP entry is replaced with a new
      mapping.
      ...
      Automatic ARP Entry p 88
      NetX Duo records the peer’s IP/MAC mapping after the
      peer responses to the ARP request. NetX Duo also
      implements the automatic ARP entry feature where it
      records peer IP/MAC address mapping based on
      unsolicited ARP requests from the network. This feature
      allows the ARP table to be populated with peer
      information, reducing the delay needed to go through
      the ARP request/response cycle. However the
      downside with enabling automatic ARP is that the ARP
      table tend to fill up quickly on a busy network with many
      nodes on the local link, which would eventually lead to
      ARP entry replacement.
      This feature is enabled by default. To disable it, the NetX
      Duo library must be compiled with the symbol
      NX_DISABLE_ARP_AUTO_ENTRY defined.