UPNP - Universal Plug and Play =============================== .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **What is UPnP?** UPnP (Universal Plug and Play) is a set of networking protocols that allows devices on a network to discover each other and establish functional network services automatically, without manual configuration. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Why is UPnP useful?** * Automatically discovering devices (smart TVs, printers, routers) * Enabling seamless communication between devices * Reducing manual setup for port forwarding, media sharing, and device control .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **How it works** * Device joins network: A UPnP-enabled device connects to the local network * Discovery via SSDP: Sends multicast messages announcing presence * Description exchange: Other devices retrieve device capabilities (usually XML) * Control: Devices send commands using SOAP over HTTP * Eventing: Devices subscribe and receive state change notifications * Presentation: Optional web interface for user interaction .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Where is UPnP used?** * Home networks (smart TVs, gaming consoles, media servers) * IoT devices (smart lights, thermostats, cameras) * Printers and scanners * Routers (automatic port forwarding) * Streaming and file sharing applications .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Which OSI layer does this protocol belong to?** * UPnP uses HTTP, SOAP, and XML—all application-layer protocols * Manages device discovery, service description, control commands, event notifications * High-level functions performed by applications .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **What is SSDP’s role in UPnP?** * SSDP is the discovery protocol within UPnP * Devices advertise themselves using NOTIFY messages * Control points (clients) search for devices using M-SEARCH .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **What devices typically support UPnP?** * Smart TVs and media players * Network printers * Game consoles (PlayStation, Xbox) * IP cameras * Routers * Home automation hubs * Streaming servers (e.g., Plex, DLNA) .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Can UPnP work across subnets or VLANs?** No, UPnP is designed for local LANs only. SSDP uses multicast, which generally does not cross routers unless special relay/proxy setups are in place. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **What are the main components of UPnP architecture?** * Devices – Provide services (e.g., media server, printer) * Control Points – Clients that discover and control devices * Services – XML-defined interfaces describing functionality * Description – Device metadata in XML format * Control – Clients send SOAP commands * Eventing – Devices notify clients about state changes (optional) * Presentation – Optional web UI for user interaction .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **What happens if two devices provide the same UPnP service?** Clients differentiate them by: * Unique UUIDs * USN field * Different service description URLs .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Is UPnP only for home networks?** Mostly yes. UPnP is designed for LAN environments and does not scale well in: * WAN environments * Segmented networks without multicast forwarding .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow Topics in this section, * :ref:`Learnings in this section ` * :ref:`Terminology ` * :ref:`Version Info ` * :ref:`UPNP Version&IEEE Details ` * :ref:`UPNP Basic Setup on Ubuntu using IPv4 ` * :ref:`UPNP Basic Setup on Ubuntu using IPv6 ` * :ref:`UPNP Protocol Packet Details ` * :ref:`UPNP Usecases ` * :ref:`UPNP Basic Features ` * :ref:`UPNP Feature : Zero Configuration ` * :ref:`UPNP Feature : Auto Discovery ` * :ref:`UPNP Feature : Device Control ` * :ref:`UPNP Feature : Service Advertisement ` * :ref:`UPNP Feature : Event Notification ` * :ref:`UPNP Feature : Content Sharing ` * :ref:`UPNP Feature : Port Mapping ` * :ref:`UPNP Feature : Standardized Architecture ` * :ref:`UPNP Feature : Extensibility ` * :ref:`UPNP Feature : Cross Platform Support ` * :ref:`Reference links ` .. _UPNP_step1: .. tab-set:: .. tab-item:: Learnings in this section * In this section, you are going to learn .. _UPNP_step2: .. tab-set:: .. tab-item:: Terminology * Terminology .. _UPNP_step3: .. tab-set:: .. tab-item:: Version Info * Version Info .. _UPNP_step5: .. tab-set:: .. tab-item:: UPNP Version&RFC Details .. csv-table:: :file: ./UPNP/UPNP_RFCdetails.csv :widths: 10,10,10,30,30 :header-rows: 1 .. _UPNP_step20: .. tab-set:: .. tab-item:: UPNP Basic Setup on Ubuntu using IPv4 * setup .. _UPNP_step21: .. tab-set:: .. tab-item:: UPNP Basic Setup on Ubuntu using IPv6 * setup .. _UPNP_step6: .. tab-set:: .. tab-item:: UPNP Protocol Packet Details **UPNP M SEARCH Packet** .. csv-table:: :file: ./UPNP/UPNP_M_Search_Packet.csv :widths: 10,20,30,40 :header-rows: 1 **UPNP NOTIFY Packet** .. csv-table:: :file: ./UPNP/UPNP_NOTIFY_Packet.csv :widths: 10,20,30,40 :header-rows: 1 **UPNP HTTP RESPONSE Packet** .. csv-table:: :file: ./UPNP/UPNP_HTTP_Response_Packet.csv :widths: 10,20,30,40 :header-rows: 1 .. _UPNP_step7: .. tab-set:: .. tab-item:: UPNP Usecases .. csv-table:: :file: ./UPNP/UPNP_Use_Cases.csv :widths: 10,20,30 :header-rows: 1 .. _UPNP_step8: .. tab-set:: .. tab-item:: UPNP Basic Features .. csv-table:: :file: ./UPNP/UPNP_Features.csv :widths: 10,10,30 :header-rows: 1 .. _UPNP_step9: .. tab-set:: .. tab-item:: UPNP Feature : Zero Configuration **Zero Configuration - Testcases** .. csv-table:: :file: ./UPNP/UPNP_Feature1_zero_configuration_Test_Cases.csv :widths: 10,10,30,20 :header-rows: 1 .. _UPNP_step10: .. tab-set:: .. tab-item:: UPNP Feature : Auto Discovery **Auto Discovery - Testcases** .. csv-table:: :file: ./UPNP/UPNP_Feature2_Auto_discovery_Test_Cases.csv :widths: 10,10,30,20 :header-rows: 1 .. _UPNP_step11: .. tab-set:: .. tab-item:: UPNP Feature : Device Control **Device Control - Testcases** .. csv-table:: :file: ./UPNP/UPNP_Feature3_Device_control_Test_Cases.csv :widths: 10,10,30,20 :header-rows: 1 .. _UPNP_step12: .. tab-set:: .. tab-item:: UPNP Feature : Service Advertisement **Service Advertisement - Testcases** .. csv-table:: :file: ./UPNP/UPNP_Feature4_Service_advertisement_Test_Cases.csv :widths: 10,10,30,20 :header-rows: 1 .. _UPNP_step13: .. tab-set:: .. tab-item:: UPNP Feature : Event Notification **Event Notification - Testcases** .. csv-table:: :file: ./UPNP/UPNP_Feature5_event_notification_Test_Cases.csv :widths: 10,10,30,20 :header-rows: 1 .. _UPNP_step14: .. tab-set:: .. tab-item:: UPNP Feature : Content Sharing **Content Sharing - Testcases** .. csv-table:: :file: ./UPNP/UPNP_Feature6_Content_sharing_Test_Cases.csv :widths: 10,10,30,20 :header-rows: 1 .. _UPNP_step15: .. tab-set:: .. tab-item:: UPNP Feature : Port Mapping **Port Mapping - Testcases** .. csv-table:: :file: ./UPNP/UPNP_Feature7_Port_Mapping_Test_Cases.csv :widths: 10,10,30,20 :header-rows: 1 .. _UPNP_step16: .. tab-set:: .. tab-item:: UPNP Feature : Standardized Architecture **Standardized Architecture - Testcases** .. csv-table:: :file: ./UPNP/UPNP_Feature8_standardized_architecture_Test_Cases.csv :widths: 10,10,30,20 :header-rows: 1 .. _UPNP_step17: .. tab-set:: .. tab-item:: UPNP Feature : Extensibility **Extensibility - Testcases** .. csv-table:: :file: ./UPNP/UPNP_Feature9_Extensibility_Test_Cases.csv :widths: 10,10,30,20 :header-rows: 1 .. _UPNP_step18: .. tab-set:: .. tab-item:: UPNP Feature : Cross Platform Support **Cross Platform Support - Testcases** .. csv-table:: :file: ./UPNP/UPNP_Feature10_Cross_platform_support_Test_Cases.csv :widths: 10,10,30,20 :header-rows: 1 .. _UPNP_step19: .. tab-set:: .. tab-item:: Reference links * Reference links