PGDCA, BCA, B-Tech, MCA, M-Tech, B.Sc computer science राजस्थान सूचना सहायक व कंप्यूटर शिक्षक विशेष नोट्स: इस अध्याय में हम Constrained Application Protocol (CoAP): RESTful Architecture over UDP (CoAP प्रोटोकॉल: UDP आधारित लाइटवेट RESTful आर्किटेक्चर (RFC 7252)) की संपूर्ण थ्योरी, मुख्य तकनीकी बिंदु, तुलनात्मक तालिका और विगत परीक्षाओं के पैटर्न पर आधारित 20 अति-महत्वपूर्ण बहुविकल्पीय प्रश्न (MCQs) विस्तृत हिंदी व अंग्रेजी व्याख्या सहित पढ़ेंगे।
Overview: Constrained Application Protocol (CoAP), standardized in IETF RFC 7252, is a lightweight RESTful web transfer protocol engineered for constrained IoT nodes over UDP. It mirrors HTTP semantics (GET, POST, PUT, DELETE) using a compact 4-byte binary header, asynchronous message exchange, and DTLS encryption.
अध्याय सार: कंस्ट्रेन्ड एप्लिकेशन प्रोटोकॉल (CoAP), जिसे IETF RFC 7252 में मानकीकृत किया गया है, UDP पर सीमित संसाधनों वाले IoT नोड्स के लिए बनाया गया एक लाइटवेट RESTful प्रोटोकॉल है। यह 4-बाइट के कॉम्पैक्ट बाइनरी हेडर, एसिंक्रोनस मैसेज एक्सचेंज और DTLS एन्क्रिप्शन के साथ HTTP जैसी कार्यक्षमता प्रदान करता है।
Constrained Application Protocol (CoAP): RESTful Architecture over UDP: Detailed Notes & Architecture (CoAP प्रोटोकॉल: UDP आधारित लाइटवेट RESTful आर्किटेक्चर (RFC 7252))
1. CoAP Architecture & RFC 7252 Header Format (CoAP आर्किटेक्चर और RFC 7252 हेडर प्रारूप)
[EN] CoAP follows a two-layer architecture consisting of a Messaging layer for UDP reliability and duplicate detection, and a Request/Response layer for RESTful resource interaction. Every CoAP packet begins with a fixed 4-byte (32-bit) binary header containing Version (2 bits, set to 1), Type (2 bits), Token Length or TKL (4 bits, 0 to 8 bytes), Code (8 bits in class.detail format such as 0.01 for GET or 2.05 for Content), and a 16-bit Message ID. Optional variable-length Token, Delta-encoded Options, and a 0xFF payload marker follow before the application payload.
[HI] CoAP एक दो-स्तरीय आर्किटेक्चर का उपयोग करता है जिसमें UDP विश्वसनीयता और डुप्लिकेट डिटेक्शन के लिए मैसेजिंग लेयर तथा RESTful इंटरैक्शन के लिए रिक्वेस्ट/रिस्पॉन्स लेयर होती है। प्रत्येक CoAP पैकेट 4-बाइट (32-बिट) फिक्स्ड बाइनरी हेडर से शुरू होता है जिसमें वर्जन (2 बिट), टाइप (2 बिट), टोकन लेंथ (4 बिट, 0-8 बाइट्स), कोड (8 बिट जैसे 0.01 GET या 2.05 Content) और 16-बिट मैसेज ID शामिल होता है। इसके बाद वैकल्पिक टोकन, डेल्टा-एन्कोडेड ऑप्शन्स और पेलोड से पहले 0xFF मार्कर आता है।
2. Message Types (CON, NON, ACK, RST) & Reliability (मैसेज प्रकार (CON, NON, ACK, RST) और विश्वसनीयता)
[EN] Because UDP lacks built-in delivery guarantees, CoAP defines four message types: Confirmable (CON, 0), Non-confirmable (NON, 1), Acknowledgement (ACK, 2), and Reset (RST, 3). A CON message requires an ACK with the matching 16-bit Message ID and uses exponential backoff retransmission until acknowledged or MAX_RETRANSMIT (default 4) expires. NON messages provide low-overhead fire-and-forget telemetry and are mandatory for IPv4 (224.0.1.187) or IPv6 (ff02::fd) multicast requests, while RST signals an unprocessable or unexpected packet.
[HI] क्योंकि UDP में डिलीवरी की गारंटी नहीं होती, इसलिए CoAP चार मैसेज प्रकार परिभाषित करता है: कन्फर्मेबल (CON, 0), नॉन-कन्फर्मेबल (NON, 1), एक्नॉलेजमेंट (ACK, 2) और रीसेट (RST, 3)। CON मैसेज को समान 16-बिट मैसेज ID वाले ACK की आवश्यकता होती है और यह एक्नॉलेज होने तक एक्सपोनेंशियल बैकऑफ के साथ पुनः प्रयास करता है। NON मैसेज बिना ACK के टेलीमेट्री भेजते हैं और मल्टीकास्ट (224.0.1.187 या ff02::fd) के लिए अनिवार्य हैं, जबकि RST अमान्य पैकेट की सूचना देता है।
3. RESTful Methods, Resource Discovery & Observe (RFC 7641) (RESTful मेथड्स, रिसोर्स डिस्कवरी और ऑब्जर्व (RFC 7641))
[EN] CoAP supports the four core REST methods—GET (0.01), POST (0.02), PUT (0.03), and DELETE (0.04)—addressed via coap:// or coaps:// URIs on default UDP ports 5683 and 5684. Clients discover server endpoints automatically by sending a GET request to /.well-known/core, which returns resources in CoRE Link Format (RFC 6690). Through the Observe extension (RFC 7641), clients register once with Observe=0 to receive push notifications whenever a sensor value changes, eliminating wasteful polling.
[HI] CoAP डिफ़ॉल्ट UDP पोर्ट 5683 (coap://) और 5684 (coaps://) पर चार प्रमुख REST मेथड्स—GET (0.01), POST (0.02), PUT (0.03) और DELETE (0.04)—का समर्थन करता है। क्लाइंट /.well-known/core पर GET अनुरोध भेजकर CoRE लिंक फॉर्मेट (RFC 6690) में उपलब्ध रिसोर्स खोज सकते हैं। Observe एक्सटेंशन (RFC 7641) क्लाइंट को सेंसर डेटा बदलने पर पुश नोटिफिकेशन प्राप्त करने की अनुमति देता है, जिससे बार-बार पोलिंग की आवश्यकता समाप्त हो जाती है।
4. CoAP Security (DTLS), Block Transfer & HTTP Mapping (CoAP सुरक्षा (DTLS), ब्लॉक ट्रांसफर और HTTP मैपिंग)
[EN] To secure constrained UDP traffic, CoAP relies on Datagram Transport Layer Security (DTLS, RFC 6347) over UDP port 5684 with four security modes: NoSec, PreSharedKey (PSK), RawPublicKey (RPK), and X.509 Certificates. For payloads exceeding the MTU limit (typically 1024 bytes), RFC 7959 introduces Block-wise transfer using Block1 (request) and Block2 (response) options to prevent IP fragmentation. Cross-protocol proxies seamlessly translate CoAP binary messages to standard HTTP/JSON for cloud backends.
[HI] UDP ट्रैफिक को सुरक्षित करने के लिए CoAP पोर्ट 5684 पर DTLS (RFC 6347) का उपयोग करता है, जिसमें NoSec, PreSharedKey (PSK), RawPublicKey (RPK) और X.509 सर्टिफिकेट मोड शामिल हैं। MTU सीमा से बड़े डेटा को IP फ्रेगमेंटेशन से बचाने के लिए RFC 7959 Block1 और Block2 विकल्पों के साथ ब्लॉक-वाइज ट्रांसफर प्रदान करता है। क्रॉस-प्रोटोकॉल प्रॉक्सी CoAP बाइनरी पैकेट्स को क्लाउड सर्वर के लिए मानक HTTP में सहजता से बदल देते हैं।
Syntax, Formula & Technical Example (Constrained Application Protocol (CoAP): RESTful Architecture over UDP)
CoAP Packet Trace (GET /temp, Confirmable, Piggybacked ACK)
---------------------------------------------------------------
Client -> Server [UDP Port 5683]:
Header: Ver=1 | Type=0 (CON) | TKL=4 | Code=0.01 (GET) | MsgID=0x7D34
Token : 0xA1B2C3D4 | Option: Uri-Path = "temp"
Server -> Client [Piggybacked Response]:
Header: Ver=1 | Type=2 (ACK) | TKL=4 | Code=2.05 (Content) | MsgID=0x7D34
Token : 0xA1B2C3D4 | Format: text/plain (0) | Marker: 0xFF
Payload: "24.5 C"
Constrained Application Protocol (CoAP): RESTful Architecture over UDP Quick Reference & Comparison Table
| CoAP Component / Field | Technical Specification | Exam Key Fact |
|---|---|---|
| Confirmable (CON, Type=0) | Reliable UDP delivery with ACK and retransmission | Uses 16-bit Message ID & exponential backoff |
| Non-confirmable (NON, Type=1) | Fire-and-forget transmission without ACK | Mandatory type for CoAP IP multicast requests |
| CoAP Base Header (RFC 7252) | Fixed 4-byte binary header (Ver, T, TKL, Code, MsgID) | 0xFF payload marker separates options from body |
| DTLS Port 5684 (coaps://) | Datagram TLS encryption (PSK, RPK, Certificate) | Plaintext CoAP uses default UDP port 5683 |
Constrained Application Protocol (CoAP): RESTful Architecture over UDP Top 20 Bilingual MCQs with Answers
Q1. Which transport layer protocol is natively specified by RFC 7252 for CoAP?
(RFC 7252 द्वारा CoAP के लिए मूल रूप से किस ट्रांसपोर्ट लेयर प्रोटोकॉल को निर्दिष्ट किया गया है?)
(A) UDP
(B) TCP
(C) ICMP
(D) SCTP
Correct Answer: (A)
[EN] RFC 7252 defines CoAP over UDP (and DTLS for security) to minimize overhead on constrained IoT nodes.
[HI] RFC 7252 सीमित IoT नोड्स पर ओवरहेड कम करने के लिए UDP (और सुरक्षा हेतु DTLS) पर CoAP को परिभाषित करता है।
Q2. What is the fixed size of the mandatory CoAP base header in RFC 7252?
(RFC 7252 में अनिवार्य CoAP बेस हेडर का निश्चित आकार क्या होता है?)
(A) 8 bytes (64 bits)
(B) 20 bytes (160 bits)
(C) 4 bytes (32 bits)
(D) 2 bytes (16 bits)
Correct Answer: (C)
[EN] Every CoAP message starts with a compact 4-byte header containing Ver, Type, TKL, Code, and Message ID.
[HI] प्रत्येक CoAP मैसेज 4-बाइट के कॉम्पैक्ट हेडर से शुरू होता है जिसमें Ver, Type, TKL, Code और Message ID होते हैं।
Q3. What are the default UDP ports for plaintext CoAP (coap://) and secure CoAP (coaps://) respectively?
(सामान्य CoAP (coap://) और सुरक्षित CoAP (coaps://) के लिए डिफ़ॉल्ट UDP पोर्ट क्रमशः क्या हैं?)
(A) 5353 and 5354
(B) 1883 and 8883
(C) 80 and 443
(D) 5683 and 5684
Correct Answer: (D)
[EN] CoAP uses UDP port 5683 for unencrypted communication and UDP port 5684 when secured with DTLS (1883/8883 belong to MQTT).
[HI] CoAP बिना एन्क्रिप्शन के लिए UDP पोर्ट 5683 और DTLS सुरक्षा के साथ पोर्ट 5684 का उपयोग करता है (1883/8883 MQTT के हैं)।
Q4. In a CoAP header, what is the maximum length of the Token field controlled by the 4-bit TKL field?
(CoAP हेडर में 4-बिट TKL फ़ील्ड द्वारा नियंत्रित Token फ़ील्ड की अधिकतम लंबाई क्या होती है?)
(A) 8 bytes
(B) 15 bytes
(C) 16 bytes
(D) 4 bytes
Correct Answer: (A)
[EN] Although TKL is 4 bits (0-15), RFC 7252 restricts valid Token lengths to 0-8 bytes; values 9-15 are reserved and treated as message format errors.
[HI] यद्यपि TKL 4 बिट (0-15) का है, RFC 7252 टोकन की लंबाई केवल 0-8 बाइट्स तक सीमित करता है; 9-15 को त्रुटि माना जाता है।
Q5. Which byte value serves as the Payload Marker separating CoAP Options from the message payload?
(CoAP में ऑप्शन्स को मैसेज पेलोड से अलग करने के लिए किस बाइट मान का उपयोग पेलोड मार्कर के रूप में किया जाता है?)
(A) 0xAA
(B) 0x7E
(C) 0x00
(D) 0xFF
Correct Answer: (D)
[EN] The single-byte marker 0xFF indicates the end of CoAP options and the start of the payload; if absent, the message has no payload.
[HI] 0xFF बाइट मार्कर ऑप्शन्स के अंत और पेलोड की शुरुआत को दर्शाता है; यदि यह न हो तो मैसेज में कोई पेलोड नहीं होता।
Q6. Which CoAP message type MUST be used when sending a multicast request to multiple CoAP servers?
(एक साथ कई CoAP सर्वरों को मल्टीकास्ट अनुरोध भेजते समय किस CoAP मैसेज प्रकार का उपयोग करना अनिवार्य है?)
(A) Acknowledgement (ACK)
(B) Confirmable (CON)
(C) Reset (RST)
(D) Non-confirmable (NON)
Correct Answer: (D)
[EN] Multicast CoAP requests must use NON messages to avoid an ACK storm from numerous responders.
[HI] कई सर्वरों से एक साथ आने वाले ACK की बाढ़ (ACK storm) से बचने के लिए मल्टीकास्ट में NON मैसेज का उपयोग अनिवार्य है।
Q7. In CoAP, what is the primary purpose of the 16-bit Message ID versus the Token?
(CoAP में Token की तुलना में 16-बिट Message ID का मुख्य उद्देश्य क्या है?)
(A) Both fields perform identical duplicate detection
(B) Message ID stores the URI path; Token stores the DTLS key
(C) Message ID matches CON with ACK/RST and detects duplicates; Token matches requests with responses
(D) Message ID encrypts the payload; Token identifies the UDP port
Correct Answer: (C)
[EN] Message ID operates at the messaging layer (CON/ACK/duplicate detection), whereas Token operates at the request/response layer (especially for separate responses).
[HI] Message ID मैसेजिंग लेयर पर CON/ACK मिलान व डुप्लिकेट जांच करता है, जबकि Token रिक्वेस्ट और रिस्पॉन्स को जोड़ता है।
Q8. Which well-known URI path is queried via CoAP GET for standardized resource discovery (RFC 6690)?
(मानकीकृत रिसोर्स डिस्कवरी (RFC 6690) के लिए CoAP GET द्वारा किस वेल-नोन URI पाथ पर अनुरोध भेजा जाता है?)
(A) /coap/discovery
(B) /.well-known/core
(C) /.sys/nodes
(D) /api/resources
Correct Answer: (B)
[EN] Sending GET /.well-known/core returns available resources formatted in CoRE Link Format (application/link-format).
[HI] GET /.well-known/core पर अनुरोध भेजने से CoRE लिंक फॉर्मेट में उपलब्ध सभी संसाधनों की सूची प्राप्त होती है।
Q9. Which CoAP response code corresponds to HTTP 200 OK when returning a resource representation in a GET response?
(GET रिस्पॉन्स में रिसोर्स डेटा लौटाते समय कौन सा CoAP कोड HTTP 200 OK के समतुल्य होता है?)
(A) 4.04 (Not Found)
(B) 2.01 (Created)
(C) 2.04 (Changed)
(D) 2.05 (Content)
Correct Answer: (D)
[EN] CoAP defines 2.05 Content for GET responses carrying a representation, whereas 2.04 Changed is used for POST/PUT success.
[HI] CoAP में डेटा के साथ GET सफलता के लिए 2.05 Content कोड प्रयुक्त होता है, जबकि POST/PUT सफलता हेतु 2.04 Changed होता है।
Q10. Which RFC extends CoAP with the Observe option to support asynchronous push notifications when a resource state changes?
(रिसोर्स की स्थिति बदलने पर एसिंक्रोनस पुश नोटिफिकेशन प्रदान करने के लिए कौन सा RFC CoAP में Observe विकल्प जोड़ता है?)
(A) RFC 6690
(B) RFC 7959
(C) RFC 7252
(D) RFC 7641
Correct Answer: (D)
[EN] RFC 7641 adds the Observe option (registration Observe=0, deregistration Observe=1) for event-driven updates over CoAP.
[HI] RFC 7641 CoAP में इवेंट-आधारित पुश अपडेट के लिए Observe विकल्प (पंजीकरण 0, रद्दीकरण 1) जोड़ता है।
Q11. How does CoAP handle payloads larger than a single UDP datagram (e.g., firmware updates) without IP fragmentation?
(CoAP IP फ्रेगमेंटेशन के बिना एक सिंगल UDP डेटाग्राम से बड़े पेलोड (जैसे फर्मवेयर अपडेट) को कैसे संभालता है?)
(A) Increasing the UDP packet limit to 64 MB
(B) Compressing payloads inside the 4-byte header
(C) Automatically switching to FTP over port 21
(D) Using Block-wise transfer (RFC 7959) with Block1 and Block2 options
Correct Answer: (D)
[EN] RFC 7959 defines Block1 (request payload blocks) and Block2 (response payload blocks) to transfer large payloads safely in small chunks.
[HI] RFC 7959 बड़े पेलोड को छोटे टुकड़ों में सुरक्षित भेजने के लिए Block1 और Block2 विकल्पों के साथ ब्लॉक-वाइज ट्रांसफर का उपयोग करता है।
Q12. In a piggybacked CoAP response, how does the server reply to a Confirmable (CON) GET request?
(पिगीबैक्ड (piggybacked) CoAP रिस्पॉन्स में सर्वर Confirmable (CON) GET अनुरोध का उत्तर कैसे देता है?)
(A) By opening a separate TCP socket to the client
(B) By sending an empty RST packet followed by a NON message
(C) By broadcasting the payload to 224.0.1.187
(D) By sending the response code and payload directly inside the ACK message
Correct Answer: (D)
[EN] If the server can respond immediately, it piggybacks the response (e.g., 2.05 Content) inside the ACK packet with the same Message ID and Token.
[HI] यदि सर्वर तुरंत उत्तर दे सकता है, तो वह उसी Message ID और Token वाले ACK पैकेट के अंदर ही रिस्पॉन्स डेटा भेज देता है।
Q13. Which security protocol protects CoAP packets over UDP port 5684?
(UDP पोर्ट 5684 पर CoAP पैकेट्स की सुरक्षा कौन सा प्रोटोकॉल करता है?)
(A) SSHv2
(B) WPA2-TKIP
(C) DTLS (Datagram Transport Layer Security)
(D) IPsec AH only
Correct Answer: (C)
[EN] DTLS adapts TLS security (encryption, integrity, authentication) for datagram-oriented UDP traffic used by CoAP.
[HI] DTLS, CoAP द्वारा उपयोग किए जाने वाले UDP डेटाग्राम ट्रैफिक को एन्क्रिप्शन और प्रमाणीकरण प्रदान करने के लिए TLS का रूपांतरित रूप है।
Q14. What happens if a CoAP client sends a CON message with an unrecognized critical option to a server?
(यदि कोई CoAP क्लाइंट सर्वर को एक अज्ञात क्रिटिकल (critical) विकल्प वाला CON मैसेज भेजता है तो क्या होगा?)
(A) The server rejects it with 4.02 Bad Option (or RST if malformed)
(B) The server automatically upgrades to HTTP/2
(C) The client switches to Type=3 ACK
(D) The server silently ignores the critical option and returns 2.05
Correct Answer: (A)
[EN] In CoAP, odd option numbers are Critical (must be understood or rejected with 4.02 Bad Option), while even option numbers are Elective (safely ignored if unknown).
[HI] CoAP में विषम संख्या वाले विकल्प क्रिटिकल होते हैं जिन्हें न समझने पर सर्वर 4.02 Bad Option त्रुटि देता है, जबकि सम (even) विकल्पों को अनदेखा किया जा सकता है।
Q15. What is the all-CoAP-nodes IPv4 link-local multicast address defined in RFC 7252?
(RFC 7252 में परिभाषित सभी CoAP नोड्स के लिए IPv4 मल्टीकास्ट एड्रेस क्या है?)
(A) 239.255.255.250
(B) 192.168.1.255
(C) 224.0.1.187
(D) 224.0.0.1
Correct Answer: (C)
[EN] RFC 7252 assigns IPv4 multicast address 224.0.1.187 and IPv6 addresses ff02::fd / ff05::fd for CoAP node discovery.
[HI] RFC 7252 CoAP नोड डिस्कवरी के लिए IPv4 मल्टीकास्ट एड्रेस 224.0.1.187 और IPv6 एड्रेस ff02::fd / ff05::fd आवंटित करता है।
Q16. Which statement is NOT true about CoAP compared to MQTT?
(MQTT की तुलना में CoAP के बारे में कौन सा कथन सत्य नहीं है?)
(A) CoAP strictly requires a central message broker for all node communication
(B) CoAP natively supports RESTful GET/POST/PUT/DELETE methods
(C) CoAP runs primarily over connectionless UDP
(D) CoAP uses a 4-byte minimum header
Correct Answer: (A)
[EN] Unlike MQTT which depends on a central broker over TCP, CoAP uses a peer-to-peer RESTful client/server model directly between endpoints without requiring a broker.
[HI] MQTT के विपरीत (जो TCP पर सेंट्रल ब्रोकर पर निर्भर है), CoAP सीधे एंडपॉइंट्स के बीच पीयर-टू-पीयर RESTful क्लाइंट/सर्वर मॉडल पर काम करता है और इसे ब्रोकर की आवश्यकता नहीं होती।
Q17. Within Constrained Application Protocol (CoAP): RESTful Architecture over UDP, which coap component / field directly maps to: "Reliable UDP delivery with ACK and retransmission"?
(Constrained Application Protocol (CoAP): RESTful Architecture over UDP में कौन सा CoAP Component / Field सीधे "Reliable UDP delivery with ACK and retransmission" से संबंधित है?)
(A) Non-confirmable (NON, Type=1)
(B) Confirmable (CON, Type=0)
(C) DTLS Port 5684 (coaps://)
(D) CoAP Base Header (RFC 7252)
Correct Answer: (B)
[EN] In Constrained Application Protocol (CoAP): RESTful Architecture over UDP, 'Confirmable (CON, Type=0)' handles 'Reliable UDP delivery with ACK and retransmission' (Uses 16-bit Message ID & exponential backoff).
[HI] Constrained Application Protocol (CoAP): RESTful Architecture over UDP में 'Confirmable (CON, Type=0)' का कार्य/विवरण 'Reliable UDP delivery with ACK and retransmission' (Uses 16-bit Message ID & exponential backoff) है।
Q18. Which option accurately describes 'Non-confirmable (NON, Type=1)' in Constrained Application Protocol (CoAP): RESTful Architecture over UDP?
(Constrained Application Protocol (CoAP): RESTful Architecture over UDP के संदर्भ में 'Non-confirmable (NON, Type=1)' की सही विशेषता कौन सी है?)
(A) Reliable UDP delivery with ACK and retransmission
(B) Fixed 4-byte binary header (Ver, T, TKL, Code, MsgID)
(C) Fire-and-forget transmission without ACK
(D) Datagram TLS encryption (PSK, RPK, Certificate)
Correct Answer: (C)
[EN] 'Non-confirmable (NON, Type=1)' provides 'Fire-and-forget transmission without ACK' — key point: Mandatory type for CoAP IP multicast requests.
[HI] 'Non-confirmable (NON, Type=1)' का मुख्य विवरण 'Fire-and-forget transmission without ACK' है (Mandatory type for CoAP IP multicast requests)।
Q19. In Constrained Application Protocol (CoAP): RESTful Architecture over UDP, identify the correct parameter for the specification: "Fixed 4-byte binary header (Ver, T, TKL, Code, MsgID)".
(Constrained Application Protocol (CoAP): RESTful Architecture over UDP में "Fixed 4-byte binary header (Ver, T, TKL, Code, MsgID)" विवरण किस विकल्प के लिए सही है?)
(A) DTLS Port 5684 (coaps://)
(B) CoAP Base Header (RFC 7252)
(C) Confirmable (CON, Type=0)
(D) Non-confirmable (NON, Type=1)
Correct Answer: (B)
[EN] 'CoAP Base Header (RFC 7252)' corresponds to 'Fixed 4-byte binary header (Ver, T, TKL, Code, MsgID)' (0xFF payload marker separates options from body).
[HI] 'CoAP Base Header (RFC 7252)' का संबंध 'Fixed 4-byte binary header (Ver, T, TKL, Code, MsgID)' (0xFF payload marker separates options from body) से है।
Q20. Considering Constrained Application Protocol (CoAP): RESTful Architecture over UDP, what key behavior defines 'DTLS Port 5684 (coaps://)'?
(Constrained Application Protocol (CoAP): RESTful Architecture over UDP में 'DTLS Port 5684 (coaps://)' की मुख्य भूमिका या मान क्या है?)
(A) Reliable UDP delivery with ACK and retransmission
(B) Fixed 4-byte binary header (Ver, T, TKL, Code, MsgID)
(C) Datagram TLS encryption (PSK, RPK, Certificate)
(D) Fire-and-forget transmission without ACK
Correct Answer: (C)
[EN] 'DTLS Port 5684 (coaps://)' represents 'Datagram TLS encryption (PSK, RPK, Certificate)' (Plaintext CoAP uses default UDP port 5683).
[HI] 'DTLS Port 5684 (coaps://)' का अर्थ/मान 'Datagram TLS encryption (PSK, RPK, Certificate)' है (Plaintext CoAP uses default UDP port 5683)।
Constrained Application Protocol (CoAP): RESTful Architecture over UDP — Exam FAQs
Q1: How does CoAP differ from HTTP for IoT devices?
IoT डिवाइस के लिए CoAP, HTTP से किस प्रकार भिन्न है?
[EN] CoAP replaces TCP and verbose text headers with UDP and a 4-byte binary header, supports native multicast, and adds lightweight Observe push notifications while retaining RESTful URIs and methods.
[HI] CoAP, TCP और बड़े टेक्स्ट हेडर के स्थान पर UDP तथा 4-बाइट बाइनरी हेडर का उपयोग करता है, मल्टीकास्ट का समर्थन करता है और RESTful मेथड्स के साथ लाइटवेट Observe पुश सुविधा देता है।
Q2: What is the difference between a Piggybacked Response and a Separate Response in CoAP?
CoAP में पिगीबैक्ड (Piggybacked) और सेपरेट (Separate) रिस्पॉन्स में क्या अंतर है?
[EN] In a piggybacked response, the server sends the result inside the immediate ACK packet; in a separate response, the server first sends an empty ACK to stop client retransmissions and later transmits the result in a new CON/NON message matching the Token.
[HI] पिगीबैक्ड रिस्पॉन्स में सर्वर तुरंत ACK पैकेट के भीतर ही उत्तर भेज देता है; जबकि सेपरेट रिस्पॉन्स में सर्वर पहले खाली ACK भेजकर रीट्रांसमिशन रोकता है और बाद में समान Token के साथ नए CON/NON मैसेज में परिणाम भेजता है।
Q3: Can CoAP run over TCP or WebSockets instead of UDP?
क्या CoAP UDP के बजाय TCP या WebSockets पर चल सकता है?
[EN] Yes, RFC 8323 defines CoAP over TCP, TLS, and WebSockets to traverse restrictive enterprise firewalls and NATs that block UDP traffic, adjusting the frame format slightly for stream transports.
[HI] हाँ, RFC 8323 ऐसे एंटरप्राइज फ़ायरवॉल और NAT को पार करने के लिए जो UDP ब्लॉक करते हैं, TCP, TLS और WebSockets पर CoAP को परिभाषित करता है।
Post a Comment
Post a Comment