ArticleslgStudy

computer science

UPnP

UPnP is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand UPnP rather than just read about it. In short: UPnP (originally Universal Plug and Play) is a set of Internet Protocol-based networking protocols that permits networked devices, such as personal computers, printers, Internet gateways, Wi-Fi access points and mobile devices, to seamlessly discover each other's presence on the network and establish functional network services. UPnP is intended primarily for residential networks without enterprise-class devices.

UPnP — main illustration
UPnP — illustration

Key takeaways

  • UPnP belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect UPnP to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of UPnP from memory before moving on to harder problems.

Reference excerpt

UPnP (originally Universal Plug and Play) is a set of Internet Protocol-based networking protocols that permits networked devices, such as personal computers, printers, Internet gateways, Wi-Fi access points and mobile devices, to seamlessly discover each other's presence on the network and establish functional network services. UPnP is intended primarily for residential networks without enterprise-class devices. Officially, only the abbreviations UPnP and UPnP+ are trademarked. UPnP assumes the network runs IP, and then uses HTTP on top of IP to provide device/service description, actions, data transfer and event notification. Device search requests and advertisements are supported by running HTTP on top of UDP (port 1900) using multicast (known as HTTPMU). Responses to search requests are also sent over UDP, but are instead sent using unicast (known as HTTPU). Conceptually, UPnP extends plug and play—a technology for dynamically attaching devices directly to a computer—to zero-configuration networking for residential and SOHO wireless networks. UPnP devices are plug-and-play in that, when connected to a network, they automatically establish working configurations with other devices, removing the need for users to manually configure and add devices through IP addresses. UPnP is generally regarded as unsuitable for deployment in business settings for reasons of economy, complexity, and consistency: the multicast foundation makes it chatty, consuming too many network resources on networks with a large population of devices; the simplified access controls do not map well to complex environments.

Overview The UPnP architecture allows device-to-device networking of consumer electronics, mobile devices, personal computers, and networked home appliances. It is a distributed, open architecture protocol based on established standards such as the Internet Protocol Suite (TCP/IP), HTTP, XML, and SOAP. UPnP control points (CPs) are devices which use UPnP protocols to control UPnP controlled devices (CDs). The UPnP architecture supports zero-configuration networking. A UPnP-compatible device from any vendor can dynamically join a network, obtain an IP address, announce its name, advertise or convey its capabilities upon request, and learn about the presence and capabilities of other devices. Dynamic Host Configuration Protocol (DHCP) and Domain Name System (DNS) servers are optional and are only used if they are available on the network. Devices can disconnect from the network automatically without leaving state information. UPnP was published as a 73-part international standard ISO/IEC 29341 in December 2008. Other UPnP features include:

Media and device independence UPnP technology can run on many media that support IP, including Ethernet, FireWire, Infrared (IrDA), home wiring (G.hn) and Radiofrequency (Bluetooth, Wi-Fi). No special device driver support is necessary; common network protocols are used instead. User interface (UI) control Optionally, the UPnP architecture enables devices to present a user interface through a web browser (see Presentation below). Operating system and programming language independence Any operating system and any programming language can be used to build UPnP products. UPnP stacks are available for most platforms and operating systems in both closed- and open-source forms. Programmatic control UPnP architecture also enables conventional application programmatic control. Extensibility Each UPnP product can have device-specific services layered on top of the basic architecture. In addition to combining services defined by the UPnP Forum in various ways, vendors can define their own device and service types. They can extend standard devices and services with vendor-defined actions, state variables, data structure elements, and variable values.

Protocol

UPnP uses common Internet technologies. It assumes the network must run Internet Protocol (IP) and then uses HTTP, SOAP and XML on top of IP, to provide device/service description, actions, data transfer and "eventing" (event notification). Device search requests and advertisements are supported by running HTTP on top of UDP using multicast (known as HTTPMU). Responses to search requests are also sent over UDP, but are instead sent using unicast (known as HTTPU). UPnP uses UDP due to its lower overhead, as it does not require confirmation of received data and retransmission of corrupt packets. HTTPU and HTTPMU specifications were initially submitted as an Internet Draft, but it expired in 2001; These specifications have since been integrated into the actual UPnP specifications. UPnP uses UDP port 1900, and all used TCP ports are derived from the SSDP alive and response messages.

Addressing The foundation for UPnP networking is IP addressing. Each device must implement a DHCP client and search for a DHCP server when the device is first connected to the network. If no DHCP server is available, the device must assign itself an address. The process by which a UPnP device assigns itself an address is known within the UPnP Device Architecture as AutoIP. In UPnP Device Architecture Version 1.0, AutoIP is defined within the specification itself; in UPnP Device Architecture Version 1.1, AutoIP references IETF RFC 3927. If during the DHCP transaction, the device obtains a domain name, for example, through a DNS server or via DNS forwarding, the device should use that name in subsequent network operations; otherwise, the device should use its IP address.

Discovery Once a device has established an IP address, the next step in UPnP networking is discovery. The UPnP discovery protocol is known as the Simple Service Discovery Protocol (SSDP). When a device is added to the network, SSDP allows that device to advertise its services to control points on the network. This is achieved by sending SSDP alive messages. When a control point is added to the network, SSDP enables that control point to actively search for devices of interest on the network or listen passively to SSDP alive messages from devices. The fundamental exchange is a discovery message containing a few essential details about the device or one of its services, such as its type, identifier, and a pointer (network location) to more detailed information.

… excerpt ends here. Continue reading the full article.

Illustrations

UPnP: UPnP logo as promoted by the UPnP Forum (2001–2016) and Open Connectivity Foundation (2016–present)
UPnP logo as promoted by the UPnP Forum (2001–2016) and Open Connectivity Foundation (2016–present)
UPnP illustration

Worked examples

Example 1 — a first encounter with UPnP

Start with the simplest possible case. Write down what UPnP claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to UPnP before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about UPnP ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of UPnP

In research
UPnP appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses UPnP in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
UPnP is common in secondary-school and first-year university syllabi. It links to neighbouring topics Digital media, Discovery protocols, Media servers, so understanding it makes those chapters shorter.
In everyday life
Look for UPnP outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “UPnP” →

How to study UPnP in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what UPnP means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain UPnP out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is UPnP in simple terms?

UPnP (originally Universal Plug and Play) is a set of Internet Protocol-based networking protocols that permits networked devices, such as personal computers, printers, Internet gateways, Wi-Fi access points and mobile devices, to seamlessly discover each other's presence on the network and establi…

Why does UPnP matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study UPnP?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on UPnP.

Tags

  • Digital media
  • Discovery protocols
  • Media servers
  • Mobile content
  • Servers (computing)
  • Windows administration
  • Windows communication and services

Keep exploring