Universal Plug and Play (UPnP)

In this article, we will understand the concept of UPnP. It has features to discover and connect devices automatically within the local area network. This, uses standard protocols like TCP/IP, DHCP, and HTTP for establishing connections and acquiring IP addresses on the devices that are connected wirelessly.

UPnP devices are popular as users can make video streaming to TV which is connected to the internet, home automation is made simpler using IoT-enabled devices, connecting printers to laptops, PC, smart TV, etc.

Let’s show you an example

Creating a connection between a PC or laptop or any other network-enabled device with the printer is made easier using UPnP.So when any data content or images need to be printed from a camera or Laptop, then this protocol searches for the available printable devices and discovers the location using a URL, and creates a connection between both devices that are connected within a private network.

Importance of UPnP

Before this technology, the user has to manually set up the configuration, and installation for each device to get connected to the network. Once setup is done, discovering devices on the local network should be made each time. So all this manual process takes more time to create a connection between network devices.

On using UPnP, once the device gets discovered on the network then it gets automatically connected for the next use.

Working of UPnP

This protocol uses the port forwarding technique for the applications or the devices to create and close the ports that are connected to Local Area Network.

When the device enters the network then, UPnP devices start working on the below steps −


Each device has its IP address owned, so the device sends a request to the DHCP server using its IP address.

Device Discovery

SSDP (Simple Service Discovery protocol ) is used for discovering the devices providing specifications of the device, name assigned, services, etc. to the network labeling it as live messages so that other devices listen to SSDP messages for exchange.

Specifying the Description

After the discovery process is successful, then the device needs to add details about its model name, ID or serial number, services provided along with the location URL. All these details are passed as XML data to the network.


Before starting the interaction with the device, the control point uses SOAP (Simple Object Access Protocol) to send and receive messages to use the services provided by the device and these messages are in XML format.

Notification of Event

The control point enrolls itself as a device and sends a notification to the other control points that are registered on the same network when the state value changes. General Event Notification Architecture (GENE) has been used for sending and receiving notifications.


When a website URL is provided during the specification phase then the control point can access it and use it for loading to the web server.

Security Issues

  • No authentication is provided for the devices, this is the main security issue in UPnP forwarding.

  • This protocol assumes all the requesting devices are trustable which in turn leads hackers or attackers to get into the network and steal the data or send malicious code.

  • No proper implementation method is fixed so when multiple devices are connected then each router has its method which may lead to bugs or malware programs which in turn are transmitted through all the devices connected in a network.


Universal Plug and Play is commonly used in many real-time applications which include the below points −

  • Connects to the printer or any other peripheral devices from any of the devices (laptop/PC/camera etc.) connected to the network.

  • Used in IoT-enabled devices for automation purposes.

  • Home automation and surveillance systems like Alexa, automatic lighting to rooms, Security lock for doors, etc.

  • Game servers can also be connected to stream online games and play them using a gaming console.

  • Streaming of data from a laptop or PC or smartphone to the internet enables smart TV.

  • Connecting speakers from mobile phone or Laptop.

Steps to avoid security issues

  • Enable or disable the UPnP router based on the security needed by the user. It is best when this protocol is used within a home network or trusted private network so any confidential data cannot be accessed by any third-party intruder or hacker.

  • Installing any cybersecurity tools or network software that monitors the traffic and detects any malicious user and provides notification to make this a high priority of security risk. This software has an option for multi-factor authentication with advanced firewall features.


Universal Plug and Play helps devices to communicate and connect themselves within the network defined. This provides a comfortable environment to set up connections between any device to other peripheral devices needed. But still, this protocol lacks security risk as it trusts all the connected devices which may result in cyberattacks. This flaw can also be avoided by disabling specific routers or installing protection software tools on the network device for monitoring purposes.