Misplaced Pages

User Datagram Protocol

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.

The ones' complement of a binary number is the value obtained by inverting (flipping) all the bits in the binary representation of the number. The name "ones' complement" refers to the fact that such an inverted value, if added to the original, would always produce an "all ones" number (the term " complement " refers to such pairs of mutually additive inverse numbers, here in respect to a non-0 base number). This mathematical operation is primarily of interest in computer science , where it has varying effects depending on how a specific computer represents numbers.

#206793

67-589: In computer networking , the User Datagram Protocol ( UDP ) is one of the core communication protocols of the Internet protocol suite used to send messages (transported as datagrams in packets ) to other hosts on an Internet Protocol (IP) network. Within an IP network, UDP does not require prior communication to set up communication channels or data paths. UDP is a connectionless protocol meaning that messages are sent without negotiating

134-665: A data section (the payload data for the application). The UDP datagram header consists of 4 fields, each of which is 2 bytes (16 bits): The use of the Checksum and Source Port fields is optional in IPv4 (light purple background in table). In IPv6 only the Source Port field is optional. If not used, these fields should be set to zero. The method used to compute the checksum is defined in RFC ; 768 , and efficient calculation

201-756: A protocol stack , often constructed per the OSI model, communications functions are divided up into protocol layers, where each layer leverages the services of the layer below it until the lowest layer controls the hardware that sends information across the media. The use of protocol layering is ubiquitous across the field of computer networking. An important example of a protocol stack is HTTP (the World Wide Web protocol) running over TCP over IP (the Internet protocols) over IEEE 802.11 (the Wi-Fi protocol). This stack

268-492: A branch of computer science , computer engineering , and telecommunications , since it relies on the theoretical and practical application of the related disciplines. Computer networking was influenced by a wide array of technological developments and historical milestones. Computer networks enhance how users communicate with each other by using various electronic methods like email, instant messaging, online chat, voice and video calls, and video conferencing. Networks also enable

335-498: A carry-out (17th bit) is produced, swing that 17th carry bit around and add it to the least significant bit of the running total. Finally, the sum is then ones' complemented to yield the value of the UDP checksum field. If the checksum calculation results in the value zero (all 16 bits 0) it should be sent as the ones' complement (all 1s) as a zero-value checksum indicates no checksum has been calculated. In this case, any specific processing

402-410: A combination of TCP and TLS to ensure reliability and security respectively. This means that HTTP/3 uses a single handshake to set up a connection, rather than having two separate handshakes for TCP and TLS, meaning the overall time to establish a connection is reduced. Transmission Control Protocol is a connection-oriented protocol and requires handshaking to set up end-to-end communications. Once

469-401: A computer network can include personal computers , servers , networking hardware , or other specialized or general-purpose hosts . They are identified by network addresses and may have hostnames . Hostnames serve as memorable labels for the nodes and are rarely changed after initial assignment. Network addresses serve for locating and identifying the nodes by communication protocols such as

536-448: A connection and that UDP doesn't keep track of what it has sent. UDP provides checksums for data integrity , and port numbers for addressing different functions at the source and destination of the datagram. It has no handshaking dialogues and thus exposes the user's program to any unreliability of the underlying network; there is no guarantee of delivery, ordering, or duplicate protection. If error-correction facilities are needed at

603-441: A connection is set up, user data may be sent bi-directionally over the connection. User Datagram Protocol is a simpler message-based connectionless protocol . Connectionless protocols do not set up a dedicated end-to-end connection. Communication is achieved by transmitting information in one direction from source to destination without verifying the readiness or state of the receiver. Computer network A computer network

670-478: A different header layout, the method used to compute the checksum is changed accordingly: Any transport or other upper-layer protocol that includes the addresses from the IP header in its checksum computation must be modified for use over IPv6, to include the 128-bit IPv6 addresses instead of 32-bit IPv4 addresses. When computing the checksum, again a pseudo header is used that mimics the real IPv6 header : The checksum

737-503: A diverse set of networking capabilities. The protocols have a flat addressing scheme. They operate mostly at layers 1 and 2 of the OSI model. For example, MAC bridging ( IEEE 802.1D ) deals with the routing of Ethernet packets using a Spanning Tree Protocol . IEEE 802.1Q describes VLANs , and IEEE 802.1X defines a port-based network access control protocol, which forms the basis for the authentication mechanisms used in VLANs (but it

SECTION 10

#1732801299207

804-540: A high degree of reliability, a protocol such as the Transmission Control Protocol may be used instead. Most often, UDP applications do not employ reliability mechanisms and may even be hindered by them. Streaming media , real-time multiplayer games and voice over IP (VoIP) are examples of applications that often use UDP. In these particular applications, loss of packets is not usually a fatal problem. In VoIP, for example, latency and jitter are

871-440: A large, congested network into an aggregation of smaller, more efficient networks. A router is an internetworking device that forwards packets between networks by processing the addressing or routing information included in the packet. The routing information is often processed in conjunction with the routing table . A router uses its routing table to determine where to forward packets and does not require broadcasting packets which

938-440: A multi-port bridge. Switches normally have numerous ports, facilitating a star topology for devices, and for cascading additional switches. Bridges and switches operate at the data link layer (layer 2) of the OSI model and bridge traffic between two or more network segments to form a single local network. Both are devices that forward frames of data between ports based on the destination MAC address in each frame. They learn

1005-432: A network, but the topology of interconnections of a network can significantly affect its throughput and reliability. With many technologies, such as bus or star networks, a single failure can cause the network to fail entirely. In general, the more interconnections there are, the more robust the network is; but the more expensive it is to install. Therefore, most network diagrams are arranged by their network topology which

1072-457: A repeater hub assists with collision detection and fault isolation for the network. Hubs and repeaters in LANs have been largely obsoleted by modern network switches. Network bridges and network switches are distinct from a hub in that they only forward frames to the ports involved in the communication whereas a hub forwards to all ports. Bridges only have two ports but a switch can be thought of as

1139-723: A socket to its endpoint of data transmission, which is a combination of an IP address and a port . In this way, UDP provides application multiplexing . A port is a software structure that is identified by the port number , a 16-bit integer value, allowing for port numbers between 0 and 65535. Port 0 is reserved but is a permissible source port value if the sending process does not expect messages in response. The Internet Assigned Numbers Authority (IANA) has divided port numbers into three ranges. Port numbers 0 through 1023 are used for common, well-known services. On Unix -like operating systems , using one of these ports requires superuser operating permission. Port numbers 1024 through 49151 are

1206-403: A standard voice telephone line. Modems are still commonly used for telephone lines, using a digital subscriber line technology and cable television systems using DOCSIS technology. A firewall is a network device or software for controlling network security and access rules. Firewalls are inserted in connections between secure internal networks and potentially insecure external networks such as

1273-452: A system, a number is negated (converted from positive to negative or vice versa) by computing its ones' complement. An N-bit ones' complement numeral system can only represent integers in the range −(2 −1) to 2 −1 while two's complement can express −2 to 2 −1. It is one of three common representations for negative integers in binary computers , along with two's complement and sign-magnitude . The ones' complement binary numeral system

1340-877: A transmission medium. Power line communication uses a building's power cabling to transmit data. The following classes of wired technologies are used in computer networking. Network connections can be established wirelessly using radio or other electromagnetic means of communication. The last two cases have a large round-trip delay time , which gives slow two-way communication but does not prevent sending large amounts of information (they can have high throughput). Apart from any physical transmission media, networks are built from additional basic system building blocks, such as network interface controllers , repeaters , hubs , bridges , switches , routers , modems, and firewalls . Any particular piece of equipment will frequently contain multiple building blocks and so may perform multiple functions. A network interface controller (NIC)

1407-495: A variety of different sources, primarily to support circuit-switched digital telephony . However, due to its protocol neutrality and transport-oriented features, SONET/SDH also was the obvious choice for transporting Asynchronous Transfer Mode (ATM) frames. Asynchronous Transfer Mode (ATM) is a switching technique for telecommunication networks. It uses asynchronous time-division multiplexing and encodes data into small, fixed-sized cells . This differs from other protocols such as

SECTION 20

#1732801299207

1474-602: A virtual system of links that run on top of the Internet . Overlay networks have been used since the early days of networking, back when computers were connected via telephone lines using modems, even before data networks were developed. The most striking example of an overlay network is the Internet itself. The Internet itself was initially built as an overlay on the telephone network . Even today, each Internet node can communicate with virtually any other through an underlying mesh of sub-networks of wildly different topologies and technologies. Address resolution and routing are

1541-522: Is computer hardware that connects the computer to the network media and has the ability to process low-level network information. For example, the NIC may have a connector for plugging in a cable, or an aerial for wireless transmission and reception, and the associated circuitry. In Ethernet networks, each NIC has a unique Media Access Control (MAC) address —usually stored in the controller's permanent memory. To avoid address conflicts between network devices,

1608-470: Is a formatted unit of data carried by a packet-switched network . Packets consist of two types of data: control information and user data (payload). The control information provides data the network needs to deliver the user data, for example, source and destination network addresses , error detection codes, and sequencing information. Typically, control information is found in packet headers and trailers , with payload data in between. With packets,

1675-427: Is a set of computers sharing resources located on or provided by network nodes . Computers use common communication protocols over digital interconnections to communicate with each other. These interconnections are made up of telecommunication network technologies based on physically wired, optical , and wireless radio-frequency methods that may be arranged in a variety of network topologies . The nodes of

1742-422: Is a virtual network that is built on top of another network. Nodes in the overlay network are connected by virtual or logical links. Each link corresponds to a path, perhaps through many physical links, in the underlying network. The topology of the overlay network may (and often does) differ from that of the underlying one. For example, many peer-to-peer networks are overlay networks. They are organized as nodes of

1809-566: Is also found in WLANs ) – it is what the home user sees when the user has to enter a "wireless access key". Ethernet is a family of technologies used in wired LANs. It is described by a set of standards together called IEEE 802.3 published by the Institute of Electrical and Electronics Engineers. Wireless LAN based on the IEEE 802.11 standards, also widely known as WLAN or WiFi, is probably

1876-444: Is also trivial. The result can be only one of two cases. In case 1, operand 1 is −0 so the result is produced simply by subtracting 1 from 1 at every bit position. In case 2, the subtraction will generate a value that is 1 larger than operand 1 and an end-around borrow . Completing the borrow generates the same value as operand 1. The next example shows what happens when both operands are plus or minus zero: This example shows that of

1943-478: Is an electronic device that receives a network signal , cleans it of unnecessary noise and regenerates it. The signal is retransmitted at a higher power level, or to the other side of obstruction so that the signal can cover longer distances without degradation. In most twisted-pair Ethernet configurations, repeaters are required for cable that runs longer than 100 meters. With fiber optics, repeaters can be tens or even hundreds of kilometers apart. Repeaters work on

2010-562: Is characterized by the bit complement of any integer value being the arithmetic negative of the value. That is, inverting all of the bits of a number (the logical complement) produces the same result as subtracting the value from 0. Many early computers, including the UNIVAC 1101 , CDC 160 , CDC 6600 , the LINC , the PDP-1 , and the UNIVAC 1107 , used ones' complement arithmetic. Successors of

2077-427: Is characterized by the sign (high-order) bit being off (0) and all other bits being on (1). The lowest negative value is characterized by the sign bit being 1, and all other bits being 0. The table below shows all possible values in a four-bit system, from −7 to +7. Adding two values is straightforward. Simply align the values on the least significant bit and add, propagating any carry to the bit one position left. If

User Datagram Protocol - Misplaced Pages Continue

2144-430: Is computed over the following fields: Lacking reliability, UDP applications may encounter some packet loss, reordering, errors or duplication. If using UDP, the end-user applications must provide any necessary handshaking such as real-time confirmation that the message has been received. Applications, such as TFTP , may add rudimentary reliability mechanisms into the application layer as needed. If an application requires

2211-402: Is discussed in RFC  1071 : Checksum is the 16-bit ones' complement of the ones' complement sum of a pseudo header of information from the IP header, the UDP header, and the data, padded with zero octets at the end (if necessary) to make a multiple of two octets. In other words, all 16-bit words are summed using ones' complement arithmetic. Add the 16-bit values up. On each addition, if

2278-409: Is easily produced in a ones' complement adder. Simply add the positive and negative of the same magnitude. Although the math always produces the correct results, a side effect of negative zero is that software must test for negative zero. The generation of negative zero becomes a non-issue if addition is achieved with a complementing subtractor. The first operand is passed to the subtract unmodified,

2345-414: Is generally transmitted using UDP. Real-time video and audio streaming protocols are designed to handle occasional lost packets, so only slight degradation in quality occurs, rather than large delays if lost packets were retransmitted. Because both TCP and UDP run over the same network, in the mid-2000s a few businesses found that an increase in UDP traffic from these real-time applications slightly hindered

2412-412: Is inefficient for very big networks. Modems (modulator-demodulator) are used to connect network nodes via wire not originally designed for digital network traffic, or for wireless. To do this one or more carrier signals are modulated by the digital signal to produce an analog signal that can be tailored to give the required properties for transmission. Early modems modulated audio signals sent over

2479-461: Is not required at the receiver, because all 0s and all 1s are equal to zero in 1's complement arithmetic. The differences between IPv4 and IPv6 are in the pseudo header used to compute the checksum, and that the checksum is not optional in IPv6. Under specific conditions, a UDP application using IPv6 is allowed to use a zero UDP zero-checksum mode with a tunnel protocol. When UDP runs over IPv4,

2546-487: Is preferable to waiting for packets delayed due to retransmission , which may not be an option in a real-time system . The protocol was designed by David P. Reed in 1980 and formally defined in RFC   768 . UDP is a simple message-oriented transport layer protocol that is documented in RFC  768 . Although UDP provides integrity verification (via checksum ) of the header and payload, it provides no guarantees to

2613-479: Is said to have "wrapped around", a condition called an " end-around borrow ". When this occurs, the bit must be subtracted from the right-most bit. This phenomenon does not occur in two's complement arithmetic. It is easy to demonstrate that the bit complement of a positive value is the negative magnitude of the positive value. The computation of 19 + 3 produces the same result as 19 − (−3). Add 3 to 19. Subtract −3 from 19. Negative zero

2680-431: Is the condition where all bits in a signed word are 1. This follows the ones' complement rules that a value is negative when the left-most bit is 1, and that a negative number is the bit complement of the number's magnitude. The value also behaves as zero when computing. Adding or subtracting negative zero to/from another value produces the original value. Adding negative zero: Subtracting negative zero: Negative zero

2747-578: Is the map of logical interconnections of network hosts. Common topologies are: The physical layout of the nodes in a network may not necessarily reflect the network topology. As an example, with FDDI , the network topology is a ring, but the physical topology is often a star, because all neighboring connections can be routed via a central physical location. Physical layout is not completely irrelevant, however, as common ducting and equipment locations can represent single points of failure due to issues like fires, power failures and flooding. An overlay network

User Datagram Protocol - Misplaced Pages Continue

2814-422: Is the process of selecting network paths to carry network traffic. Routing is performed for many kinds of networks, including circuit switching networks and packet switched networks. Ones%27 complement A ones' complement system or ones' complement arithmetic is a system in which negative numbers are represented by the inverse of the binary representations of their corresponding positive numbers. In such

2881-459: Is used between the wireless router and the home user's personal computer when the user is surfing the web. There are many communication protocols, a few of which are described below. The Internet protocol suite , also called TCP/IP, is the foundation of all modern networking. It offers connection-less and connection-oriented services over an inherently unreliable network traversed by datagram transmission using Internet protocol (IP). At its core,

2948-462: The Institute of Electrical and Electronics Engineers (IEEE) maintains and administers MAC address uniqueness. The size of an Ethernet MAC address is six octets . The three most significant octets are reserved to identify NIC manufacturers. These manufacturers, using only their assigned prefixes, uniquely assign the three least-significant octets of every Ethernet interface they produce. A repeater

3015-736: The Internet Protocol . Computer networks may be classified by many criteria, including the transmission medium used to carry signals, bandwidth , communications protocols to organize network traffic , the network size, the topology, traffic control mechanisms, and organizational intent. Computer networks support many applications and services , such as access to the World Wide Web , digital video and audio , shared use of application and storage servers , printers and fax machines , and use of email and instant messaging applications. Computer networking may be considered

3082-416: The bandwidth of the transmission medium can be better shared among users than if the network were circuit switched . When one user is not sending packets, the link can be filled with packets from other users, and so the cost can be shared, with relatively little interference, provided the link is not overused. Often the route a packet needs to take through a network is not immediately available. In that case,

3149-401: The registered ports used for IANA-registered services. Ports 49152 through 65535 are dynamic ports that are not officially designated for any specific service and may be used for any purpose. These may also be used as ephemeral ports , which software running on the host may use to dynamically create communications endpoints as needed. A UDP datagram consists of a datagram header followed by

3216-470: The upper layer protocol for message delivery and the UDP layer retains no state of UDP messages once sent. For this reason, UDP sometimes is referred to as Unreliable Datagram Protocol . If transmission reliability is desired, it must be implemented in the user's application. A number of UDP's attributes make it especially suited for certain applications. Applications can use datagram sockets to establish host-to-host communications. An application binds

3283-526: The CDC 6600 continued to use ones' complement arithmetic until the late 1980s, and the descendants of the UNIVAC 1107 (the UNIVAC 1100/2200 series ) still do, but the majority of modern computers use two's complement . Positive numbers are the same simple, binary system used by two's complement and sign-magnitude. Negative values are the bit complement of the corresponding positive value. The largest positive value

3350-440: The Internet protocol suite or Ethernet that use variable-sized packets or frames . ATM has similarities with both circuit and packet switched networking. This makes it a good choice for a network that must handle both traditional high-throughput data traffic, and real-time, low-latency content such as voice and video. ATM uses a connection-oriented model in which a virtual circuit must be established between two endpoints before

3417-574: The Internet. Firewalls are typically configured to reject access requests from unrecognized sources while allowing actions from recognized ones. The vital role firewalls play in network security grows in parallel with the constant increase in cyber attacks . A communication protocol is a set of rules for exchanging information over a network. Communication protocols have various characteristics. They may be connection-oriented or connectionless , they may use circuit mode or packet switching, and they may use hierarchical addressing or flat addressing. In

SECTION 50

#1732801299207

3484-627: The actual data exchange begins. ATM still plays a role in the last mile , which is the connection between an Internet service provider and the home user. There are a number of different digital cellular standards, including: Global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), cdmaOne , CDMA2000 , Evolution-Data Optimized (EV-DO), Enhanced Data Rates for GSM Evolution (EDGE), Universal Mobile Telecommunications System (UMTS), Digital Enhanced Cordless Telecommunications (DECT), Digital AMPS (IS-136/TDMA), and Integrated Digital Enhanced Network (iDEN). Routing

3551-468: The association of physical ports to MAC addresses by examining the source addresses of received frames and only forward the frame when necessary. If an unknown destination MAC is targeted, the device broadcasts the request to all ports except the source, and discovers the location from the reply. Bridges and switches divide the network's collision domain but maintain a single broadcast domain. Network segmentation through bridging and switching helps break down

3618-405: The carry extends past the end of the word it is said to have "wrapped around", a condition called an " end-around carry ". When this occurs, the bit must be added back in at the right-most bit. This phenomenon does not occur in two's complement arithmetic. Subtraction is similar, except that borrows, rather than carries, are propagated to the left. If the borrow extends past the end of the word it

3685-443: The checksum is computed using a pseudo header that contains some of the same information from the real IPv4 header . The pseudo header is not the real IPv4 header used to send an IP packet, it is used only for the checksum calculation. UDP checksum computation is optional for IPv4. If a checksum is not used it should be set to the value zero. The checksum is calculated over the following fields: As IPv6 has larger addresses and

3752-668: The literature as the physical medium ) used to link devices to form a computer network include electrical cable , optical fiber , and free space. In the OSI model , the software to handle the media is defined at layers 1 and 2 — the physical layer and the data link layer. A widely adopted family that uses copper and fiber media in local area network (LAN) technology are collectively known as Ethernet. The media and protocol standards that enable communication between networked devices over Ethernet are defined by IEEE 802.3 . Wireless LAN standards use radio waves , others use infrared signals as

3819-665: The means that allow mapping of a fully connected IP overlay network to its underlying network. Another example of an overlay network is a distributed hash table , which maps keys to nodes in the network. In this case, the underlying network is an IP network, and the overlay network is a table (actually a map ) indexed by keys. Overlay networks have also been proposed as a way to improve Internet routing, such as through quality of service guarantees achieve higher-quality streaming media . Previous proposals such as IntServ , DiffServ , and IP multicast have not seen wide acceptance largely because they require modification of all routers in

3886-415: The most well-known member of the IEEE 802 protocol family for home users today. IEEE 802.11 shares many properties with wired Ethernet. Synchronous optical networking (SONET) and Synchronous Digital Hierarchy (SDH) are standardized multiplexing protocols that transfer multiple digital bit streams over optical fiber using lasers. They were originally designed to transport circuit mode communications from

3953-447: The network interface level, an application may instead use Transmission Control Protocol (TCP) or Stream Control Transmission Protocol (SCTP) which are designed for this purpose. UDP is suitable for purposes where error checking and correction are either not necessary or are performed in the application; UDP avoids the overhead of such processing in the protocol stack . Time-sensitive applications often use UDP because dropping packets

4020-729: The network. On the other hand, an overlay network can be incrementally deployed on end-hosts running the overlay protocol software, without cooperation from Internet service providers . The overlay network has no control over how packets are routed in the underlying network between two overlay nodes, but it can control, for example, the sequence of overlay nodes that a message traverses before it reaches its destination . For example, Akamai Technologies manages an overlay network that provides reliable, efficient content delivery (a kind of multicast ). Academic research includes end system multicast, resilient routing and quality of service studies, among others. The transmission media (often referred to in

4087-444: The packet is queued and waits until a link is free. The physical link technologies of packet networks typically limit the size of packets to a certain maximum transmission unit (MTU). A longer message may be fragmented before it is transferred and once the packets arrive, they are reassembled to construct the original message. The physical or geographic locations of network nodes and links generally have relatively little effect on

SECTION 60

#1732801299207

4154-495: The performance of applications using TCP such as point of sale , accounting , and database systems (when TCP detects packet loss, it will throttle back its data rate usage). Some VPN systems such as OpenVPN may use UDP and perform error checking at the application level while implementing reliable connections. QUIC is a transport protocol built on top of UDP. QUIC provides a reliable and secure connection. HTTP/3 uses QUIC as opposed to earlier versions of HTTPS which use

4221-520: The physical layer of the OSI model but still require a small amount of time to regenerate the signal. This can cause a propagation delay that affects network performance and may affect proper function. As a result, many network architectures limit the number of repeaters used in a network, e.g., the Ethernet 5-4-3 rule . An Ethernet repeater with multiple ports is known as an Ethernet hub . In addition to reconditioning and distributing network signals,

4288-784: The primary concerns. The use of TCP would cause jitter if any packets were lost as TCP does not provide subsequent data to the application while it is requesting a re-send of the missing data. Numerous key Internet applications use UDP, including: the Domain Name System (DNS), the Simple Network Management Protocol (SNMP), the Routing Information Protocol (RIP) and the Dynamic Host Configuration Protocol (DHCP). Voice and video traffic

4355-456: The protocol suite defines the addressing, identification, and routing specifications for Internet Protocol Version 4 (IPv4) and for IPv6 , the next generation of the protocol with a much enlarged addressing capability. The Internet protocol suite is the defining set of protocols for the Internet. IEEE 802 is a family of IEEE standards dealing with local area networks and metropolitan area networks. The complete IEEE 802 protocol suite provides

4422-418: The second operand is complemented, and the subtraction generates the correct result, avoiding negative zero. The previous example added 22 and −22 and produced −0. "Corner cases" arise when one or both operands are zero and/or negative zero. Subtracting +0 is trivial (as shown above). If the second operand is negative zero it is inverted and the original value of the first operand is the result. Subtracting −0

4489-482: The sharing of computing resources. For example, a user can print a document on a shared printer or use shared storage devices. Additionally, networks allow for the sharing of files and information, giving authorized users access to data stored on other computers. Distributed computing leverages resources from multiple computers across a network to perform tasks collaboratively. Most modern computer networks use protocols based on packet-mode transmission. A network packet

#206793