Which one of the following is not a client server application? Which of the following statements best explains the need for this field? Consider a source computer S transmitting a file of size bits to a destination computer D over a network of two routers R1 and R2 and three links L1, L2, and L3.
Let each link be of length km. Assume signals travel over each link at a speed of meters per second. Assume that the link bandwidth on each link is 1Mbps. Let the file be broken down into packets each of size bits.
Find the total sum of transmission and propagation delays in transmitting the file from S to D? The ISP wants to give half of this chunk of addresses to Organization A, and a quarter to Organization B, while retaining the remaining with itself. Which of the following is a valid allocation of addresses to A and B?
Assume that source S and destination D are connected through two intermediate routers labeled R. Determine how many times each packet has to visit the network layer and the data link layer during a transmission from S to D. Computer in a network cannot be accessed outside of the local network unless given permission is known as:. An organization is granted the block It needs to have four subnets.
Which of the following is not an address of this organization? Which of the following is not a valid multicast MAC address? A supernet has a first address of A router receives four packets with the following destination addresses.
Which packet belongs to this supernet? Suggested Test Series. But its so random. Will datagram size affect the drop rate? Likely yes, though bytes is pretty small. Without statistics on the drop rate it's impossible to determine if your losses are expected or out of the ordinary.
Wireless links are pretty lossy, but protocols like TCP will compensate for that. UDP is fire and forget. You're not going to get absolute reliability that way, but sure, if the drop rates are OK for you in that case, that's one method.
Otherwise you'd need some sort of acknowledgement in your protocol, or just do TCP. Broadcast and multicast over WiFi simply doesn't work well: superuser. Show 5 more comments. Active Oldest Votes. UDP is inherently unreliable in the sense that: UDP packets may be lost, and the UDP protocol provides no mechanism to tell if packets have been lost, or to resend them. In general, there are a number of possible reasons: packets may be misrouted, packets may be "eaten" by a firewall, packets may be dropped due to congestion in a gateway, packets may be dropped due to congestion at the end-point, or packets may be lost due to a network-level problem; e.
Hence, the probability of a large UDP packet getting lost is greater. These things may help: Pick a maximum UDP packet size that won't lead to fragmentation. Implement your software to read the packets as quickly as possible Avoid sending UDP packets through a potentially congested network link. Avoid sending too many packets in too short a time.
Improve this answer. Stephen C Stephen C k 90 90 gold badges silver badges bronze badges. Thanks for the detailed answer. I have solved it by sending an acknowledgement for every packet and retrying until the packet gets through with a ms delay between them. It is working better than the naive approach. I don't think it would. But it would drop UDP messages if kernel buffering for the socket was exceeded; i. The apps have to not mind time-out values such as forever. TCP offers more features than just reliability.
You can read about them in many of the RFCs. Any of these features "could" be implemented at the application layer. Eventually there becomes a point where you start reinventing the wheel. Flow Control: ensures that sender and receiver transmit at rates where both can handle the data rate. End to end congestion control: allows end nodes to throttle their throughput based on losses. Read about slow start, congestion avoidance, and fast recovery. In my experience, UDP is used when speed is a concern over reliability.
For example if you still want fast performance, you can implement forward error correction FEC where you transmit the data more than once. You still get good performance and some level of reliability note quite TCP reliability without all of the back and forth chit chat to get lost packets.
The trade of is that it increases the network utilization but may be suitable for real time applications like gaming or streaming. Sign up to join this community. The best answers are voted up and rise to the top. Stack Overflow for Teams — Collaborate and share knowledge with a private group.
Create a free Team What is Teams? Learn more. Ask Question. Asked 2 years, 4 months ago. Active 2 years, 4 months ago. Viewed 7k times. Improve this question. Why would every application provides their own reliability mechanism when they can simply rely on another widely available protocol like TCP?
Also, UDP is really designed for small payloads, e. The more-experienced programmers tell them to give it up and just use TCP. They all think they can do a better job, but it is highly unlikely. I know this isn't part of your question directly, but one reason UDP can be better is that you can implement only the reliability parts you need. With TCP you get reliability about ordering and delivery.
This means TCP can have hiccups while it waits for a previous message to be resent. With UDP you could decide all you want is delivery, but if any message arrives out of order, you don't wait for the missing ones, you just discard them. In that case, just use TCP. Show 11 more comments. Active Oldest Votes. Improve this answer. Custom "UDP with reliability" protocols are also extremely common in video games.
There are a ton of networking libraries with various implementations. They usually want packets to be ordered and have error correction, without wanting retransmission of lost packets and receive delays of all future packets. Sounds like you're saying "TCP is the optimal general solution, so it makes to support it natively". BlueRaja-DannyPflughoeft And sometimes you want reliable unordered packets e. BlueRaja-DannyPflughoeft if you have a typical example protocol library I'll be happy to incorporate into the answer — jonathanjo.
Show 2 more comments. Andrea Corbellini Andrea Corbellini 1 1 silver badge 3 3 bronze badges.
0コメント