The IoT Gateway realizes network interconnection above the network layer, and is the most complex network interconnection device, which is only used to interconnect two networks with different high-level protocols.
IoT gateways can be used to interconnect both WANs and LANs. A gateway is a computer system or device that acts as a switching heavyweight. Used between different communication protocols, data formats or languages, or even two systems with completely different architectures, an IoT gateway is a translator.
Unlike a bridge that simply conveys information, an IoT gateway repackages the information it receives to suit the needs of the destination system. Same layer - the application layer.