On the basis of analysis of the M2M system architecture and working principle
using the advantages of NAT traversal technology for IoT
this paper proposed a M2M communication solution with user authentication function based on STUN and STUNT agreement.The experiments showed that communication and management between M2M nodes in the IoT could be achieved simply by embedding the STUN Client and the STUNT Client module into M2M devices without changing the original network structure.