A non-transitory machine-readable medium having instructions stored therein, which when executed by a processor, cause the processor to perform a method of operating a host device for communication using a user datagram protocol (UDP), the method comprising:
- receiving a UDP message from a network gateway at the host device, the network gateway device being one of a plurality of network gateway devices managed by the host device over a wide area network (WAN), wherein the host device provides access to management tools for the network gateway devices, wherein the network gateway devices are network traffic devices within local area networks (LANs) that provide a gateway for their respective LANs to the WAN, wherein the host device maintains a persistent network connection with each of the network gateway devices to send network configuration data for configuring the respective network gateway devices and to receive operational statistics from the respective network gateway devices, wherein the persistent network connection includes a virtual private network (VPN) tunnel to exchange the network configuration data and operational statistics encapsulated therein, wherein the network gateway devices and the host device each have an internal Internet protocol (IP) address that is a private address from within an IP address range used for the persistent network connections over the WAN, wherein the network gateway devices include a first network gateway device having a first public IP address that is publicly routable within the WAN and a first internal IP address for communicating with the host device via a first VPN tunnel, wherein the network gateway devices include a second network gateway device that is behind the first network gateway device, the second network gateway device having a second internal IP address for communicating with the host device via a second VPN tunnel;
- detecting message information in the received UDP message that verifies it is a management message;
- determining if the received UDP message is a data type message;
- extracting an IP packet encapsulated within the received UDP message in response to determining that the received UDP message is a data type message, the IP packet comprising the internal IP address of the gateway device;
- and
- locating identification information in the received UDP message that identifies the internal IP address of the network gateway device and inserting or updating an entry of a node mapping table based on the identification information,
- wherein the entry of the node mapping table maps the internal IP address of the network gateway device with an external IP address associated with the network gateway device that is routable within the WAN, wherein the external IP address is either a public IP address of the network gateway device or a public IP address of an externally routable network device behind which the network gateway device is located,
- wherein the node mapping table includes a first entry associated with the first network gateway device and a second entry associated with the second network gateway device, wherein the first entry maps the first public IP address of the first network gateway device with the first internal IP address of the first network gateway device, and wherein the second entry maps the first public IP address of the first network gateway device with the second internal IP address of the second network gateway device, such that the host device does not need to know whether any of the first and second network gateway devices is behind another network gateway device when the host device communicates with any of the first and second network gateway devices.