Jump to content

Acknowledgement (data networks): Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
failed checksum example is more related to NAK than ACK, moving it down to that section
(One intermediate revision by the same user not shown)
Line 3: Line 3:
{{Use British English|date=January 2020}}
{{Use British English|date=January 2020}}


In [[data networking]], [[telecommunication]]s, and [[Bus (computing)|computer buses]], an '''acknowledgment''' ('''ACK''') is a [[signal]] that is passed between communicating [[process (computing)|processes]], [[computer]]s, or devices to signify acknowledgment, or receipt of message, as part of a [[communications protocol]]. The '''negative-acknowledgement''' ('''NAK''' or '''NACK'''<ref>{{cite IETF |rfc=3941 |title=Negative-Acknowledgment (NACK)-Oriented Reliable Multicast (NORM) Building Blocks |date=November 2004}}</ref>) is a signal that is sent to reject a previously received message or to indicate some kind of error. Acknowledgments and negative acknowledgments inform a sender of the receiver's state so that it can adjust its own state accordingly.
In [[data networking]], [[telecommunication]]s, and [[Bus (computing)|computer buses]], an '''acknowledgment''' ('''ACK''') is a [[signal]] that is passed between communicating [[process (computing)|processes]], [[computer]]s, or devices to signify acknowledgment, or receipt of message, as part of a [[communications protocol]]. Correspondingly an '''negative-acknowledgement''' ('''NAK''' or '''NACK'''<ref>{{cite IETF |rfc=3941 |title=Negative-Acknowledgment (NACK)-Oriented Reliable Multicast (NORM) Building Blocks |date=November 2004}}</ref>) is a signal that is sent to reject a previously received message or to indicate some kind of error. Acknowledgments and negative acknowledgments inform a sender of the receiver's state so that it can adjust its own state accordingly.


==Acknowledgment characters==
==Acknowledgment signal types==
[[ASCII]] code includes an ACK character (0000110<sub>2</sub> or 6<sub>16</sub>) which can be transmitted to indicate successful receipt and a NAK character (0010101<sub>2</sub> or 15<sub>16</sub>) which can be transmitted to indicate an inability or failure to receive.<ref>{{cite web |url=https://www.aivosto.com/articles/control-characters.html |title=Control characters in ASCII and Unicode |access-date=2020-03-04}}</ref> [[Unicode]] provides visible symbols for these characters, U+2406 (␆) and U+2415 (␕).
The [[ASCII]] [[code point]] for ACK is 0x06 (binary 0000 0110). By convention a receiving device sends an ACK to indicate it successfully received a message. ASCII also provides a NAK code point (0x15, binary 0001 0101) which can be used to indicate the receiving device cannot, or will not, comply with the message.<ref>{{cite web |url=https://www.aivosto.com/articles/control-characters.html |title=Control characters in ASCII and Unicode |access-date=2020-03-04}}</ref> [[Unicode]] provides visible symbols for these ASCII characters, U+2406 (␆) and U+2415 (␕).

ACK and NAK symbols may also take the form of single bits or [[bit field]]s depending on the protocol [[data link layer]] definition or even as a dedicated wire at [[physical layer]].


==Protocol usage==
==Protocol usage==
{{unreferenced section|date=May 2018}}
{{unreferenced section|date=May 2018}}
Many protocols are acknowledgement-based, meaning that they positively acknowledge receipt of messages. The internet's [[Transmission Control Protocol]] (TCP) is an example of an acknowledgement-based protocol. When computers communicate via TCP, received [[Network packet|packets]] are acknowledged by sending back a packet with an ACK bit set. The TCP protocol allows these acknowledgements to be included with data that is sent in the opposite direction.
Many protocols are acknowledgement-based, meaning that they positively acknowledge receipt of messages. The internet's [[Transmission Control Protocol]] (TCP) is an example of an acknowledgement-based protocol. When computers communicate via TCP, received [[Network packet|packets]] are acknowledged by sending a return packet with an ACK bit set.


Some protocols send a single acknowledgement per packet of information. Other protocols such as TCP and [[ZMODEM]] allow many packets to be transmitted before receiving acknowledgement for any of them, a procedure necessary to fill high [[bandwidth-delay product]] links with a large number of bytes in flight.
While some protocols send an acknowledgement per each [[network packet|packet]] received, other protocols such as TCP and [[ZMODEM]] allow many packets to be transmitted before sending an acknowledgement for the set of them, a procedure necessary to fill high [[bandwidth-delay product]] links with a large number of bytes in flight.


Other protocols are NAK-based, meaning that they only respond to messages if there is a problem. Examples include most [[reliable multicast]] protocols which send a NAK when the receiver detects missing packets or protocols that use [[checksum]]s to verify the integrity of the [[payload (computing)|payload]] and [[header (computing)|header]].
Some protocols are NAK-based, meaning that they only respond to messages if there is a problem. Examples include most [[reliable multicast]] protocols which send a NAK when the receiver detects missing packets or protocols that use [[checksum]]s to verify the integrity of the [[payload (computing)|payload]] and [[header (computing)|header]].


Still other protocols make use of both NAKs and ACKs. [[Binary Synchronous Communications]] (Bisync) and Adaptive Link Rate (for [[Energy-Efficient Ethernet]]) are examples.
Still other protocols make use of ''both'' NAKs and ACKs. [[Binary Synchronous Communications]] (Bisync) and Adaptive Link Rate (for [[Energy-Efficient Ethernet]]) are examples.


The acknowledgement function is used in the [[automatic repeat request]] (ARQ) function. Acknowledgement frames are numbered in coordination with the frames that have been received and then sent to the transmitter. This allows the transmitter to avoid [[Buffer overflow|overflow]] or [[Buffer underrun|underrun]] at the receiver, and to become aware of any missed [[frame (networking)|frames]].
Still other protocols such as the [[RC-5]], [[User Datagram Protocol]] (UDP), and [[X10 (industry standard)|X10]] protocols perform [[blind transmission]] with no acknowledgement, often transmitting the same message multiple times in hopes that at least one copy of the message gets through.


In IBM [[Binary Synchronous Communications]], the NAK is used to indicate that a transmission error was detected in the previously received block and that the receiver is ready to accept [[Retransmission (data networks)|retransmission]] of that block. Bisync does not use a single ACK character but has two control sequences for alternate even/odd block acknowledgement.
The acknowledgement function is used in the [[automatic repeat request]] (ARQ) function. Acknowledgement frames are numbered in coordination with the frames that have been received and then sent to the transmitter. This allows the transmitter to avoid [[Buffer overflow|overflow]] or [[Buffer underrun|underrun]] at the receiver, and to become aware of any missed frames.


ACK and NAK based methodologies are not the only protocol design paradigms. Some protocols such as the [[RC-5]], [[User Datagram Protocol]] (UDP), and [[X10 (industry standard)|X10]] protocols perform [[blind transmission]] with no acknowledgement, often transmitting the same message multiple times in hopes that at least one copy of the message gets through.
In [[Binary Synchronous Communications]], the NAK is used to indicate that a transmission error was detected in the previously received block and that the receiver is ready to accept [[Retransmission (data networks)|retransmission]] of that block. Bisync does not use a single ACK character but has two control sequences for alternate even/odd block acknowledgement.


== Hardware acknowledgment ==
== Hardware acknowledgment ==
Some [[computer bus]]es have a dedicated acknowledge wire in the [[control bus]] used to acknowledge bus operations: DACK used for [[direct memory access#ISA|ISA DMA]]; DATACK used in the [[STEbus]], the data transfer acknowledge pin of the [[Motorola 68000]] that inspired the title of [[DTACK Grounded]], etc. Some computer buses do not always acknowledge every write; some or all of the writes use a [[posted write]].
Some [[computer bus]]es have a dedicated acknowledge wire in the [[control bus]] used to acknowledge bus operations: DACK used for [[direct memory access#ISA|ISA DMA]]; DATACK used in the [[STEbus]], the data transfer acknowledge pin of the [[Motorola 68000]] that inspired the title of [[DTACK Grounded]], etc. Some computer buses do not wait for acknowledgement of every transmission, see for instance [[posted write]].


The [[I²C]] serial bus has a time slot for an acknowledgment bit after each byte.<ref>{{cite web|url=http://i2c.info/i2c-bus-specification|title=I2C Bus Specification}}</ref><ref>{{cite web|url=http://www.ti.com/lit/an/slva704/slva704.pdf|title=Understanding the I2C Bus|at=Figure 8}}</ref>
The [[I²C]] serial bus has a time slot for an acknowledgment bit after each byte.<ref>{{cite web|url=http://i2c.info/i2c-bus-specification|title=I2C Bus Specification}}</ref><ref>{{cite web|url=http://www.ti.com/lit/an/slva704/slva704.pdf|title=Understanding the I2C Bus|at=Figure 8}}</ref>

Revision as of 05:52, 24 May 2024

In data networking, telecommunications, and computer buses, an acknowledgment (ACK) is a signal that is passed between communicating processes, computers, or devices to signify acknowledgment, or receipt of message, as part of a communications protocol. Correspondingly an negative-acknowledgement (NAK or NACK[1]) is a signal that is sent to reject a previously received message or to indicate some kind of error. Acknowledgments and negative acknowledgments inform a sender of the receiver's state so that it can adjust its own state accordingly.

Acknowledgment signal types

The ASCII code point for ACK is 0x06 (binary 0000 0110). By convention a receiving device sends an ACK to indicate it successfully received a message. ASCII also provides a NAK code point (0x15, binary 0001 0101) which can be used to indicate the receiving device cannot, or will not, comply with the message.[2] Unicode provides visible symbols for these ASCII characters, U+2406 (␆) and U+2415 (␕).

ACK and NAK symbols may also take the form of single bits or bit fields depending on the protocol data link layer definition or even as a dedicated wire at physical layer.

Protocol usage

Many protocols are acknowledgement-based, meaning that they positively acknowledge receipt of messages. The internet's Transmission Control Protocol (TCP) is an example of an acknowledgement-based protocol. When computers communicate via TCP, received packets are acknowledged by sending a return packet with an ACK bit set.

While some protocols send an acknowledgement per each packet received, other protocols such as TCP and ZMODEM allow many packets to be transmitted before sending an acknowledgement for the set of them, a procedure necessary to fill high bandwidth-delay product links with a large number of bytes in flight.

Some protocols are NAK-based, meaning that they only respond to messages if there is a problem. Examples include most reliable multicast protocols which send a NAK when the receiver detects missing packets or protocols that use checksums to verify the integrity of the payload and header.

Still other protocols make use of both NAKs and ACKs. Binary Synchronous Communications (Bisync) and Adaptive Link Rate (for Energy-Efficient Ethernet) are examples.

The acknowledgement function is used in the automatic repeat request (ARQ) function. Acknowledgement frames are numbered in coordination with the frames that have been received and then sent to the transmitter. This allows the transmitter to avoid overflow or underrun at the receiver, and to become aware of any missed frames.

In IBM Binary Synchronous Communications, the NAK is used to indicate that a transmission error was detected in the previously received block and that the receiver is ready to accept retransmission of that block. Bisync does not use a single ACK character but has two control sequences for alternate even/odd block acknowledgement.

ACK and NAK based methodologies are not the only protocol design paradigms. Some protocols such as the RC-5, User Datagram Protocol (UDP), and X10 protocols perform blind transmission with no acknowledgement, often transmitting the same message multiple times in hopes that at least one copy of the message gets through.

Hardware acknowledgment

Some computer buses have a dedicated acknowledge wire in the control bus used to acknowledge bus operations: DACK used for ISA DMA; DATACK used in the STEbus, the data transfer acknowledge pin of the Motorola 68000 that inspired the title of DTACK Grounded, etc. Some computer buses do not wait for acknowledgement of every transmission, see for instance posted write.

The I²C serial bus has a time slot for an acknowledgment bit after each byte.[3][4]

See also

References

  1. ^ Negative-Acknowledgment (NACK)-Oriented Reliable Multicast (NORM) Building Blocks. November 2004. doi:10.17487/RFC3941. RFC 3941.
  2. ^ "Control characters in ASCII and Unicode". Retrieved 2020-03-04.
  3. ^ "I2C Bus Specification".
  4. ^ "Understanding the I2C Bus" (PDF). Figure 8.