Main content
AP®︎/College Computer Science Principles
Course: AP®︎/College Computer Science Principles > Unit 2
Lesson 5: Transporting packetsThe problems with packets
The Internet Protocol (IP) describes how to split messages into multiple IP packets and route packets to their destination by hopping from router to router.
IP does not handle all the consequences of packets, however. For example:
A computer might send multiple messages to a destination, and the destination needs to identify which packets belong to which message.
Packets can arrive out of order. That can happen especially if two packets follow different paths to the destination.
Packets can be corrupted, which means that for some reason, the received data no longer matches the originally sent data.
Packets can be lost due to problems in the physical layer or in routers' forwarding tables. If even one packet of a message is lost, it may be impossible to put the message back together in a way that makes sense.
Similarly, packets might be duplicated due to accidental retransmission of the same packet.
Fortunately, there are higher level protocols in the Internet protocol stack that can deal with these problems. Transmission Control Protocol (TCP) is the data transport protocol that's most commonly used on top of IP and it includes strategies for packet ordering, retransmission, and data integrity. User Datagram Protocol (UDP) is an alternative protocol that solves fewer problems but offers faster data transport.
Internet applications can choose the data transport protocol that makes the most sense for their application.
🙋🏽🙋🏻♀️🙋🏿♂️Do you have any questions about this topic? We'd love to answer—just ask in the questions area below!
Want to join the conversation?
- các gói bị mất , chúng có thể đi đâu?(1 vote)
- A package is just a collection of ones and zeros or to be more precise a grouping of low and high voltage that gets delivered over lines of communication.
If a target router receives too much information its allowed to just drop it (to ensure service), meaning it just ignores it. In the case of high package drop rates that tells your system that the network is congested resulting in reduced transmission in order to reduce package loss.(9 votes)
- What if you send a message through a messaging app and the package(or one of the packages) is corrupted, for example if the electromagnetic waves sent from the phone have been partly disturbed and some of the ones and zeros inbetween are missing. Would the message arrive but be partly modified or what would happen?(3 votes)
- "Packets can arrive out of order. That can happen especially if two packets follow different paths to the destination."
My intuition tells me that the packets would always be sent on the path that appears the most efficient to the current handler of the packet.
So,
Why would the packets follow different paths?
Does this mean that the packets are not always taking the most efficient routes? If so, Why?(2 votes)- Imagine that a router receives a packet and determines two equally viable paths for the packet to take. The router will choose one and send the packet on its way. Then, the router receives a second packet headed for the same destination. This time, however, the router attempts to balance the number of packets sent along each path (to improve performance) and sends it along the path it did not use for the first packet. So, the packets end up taking different routes to reach the same destination.(2 votes)
- How do I know how many routes are between two routers…
Example
….C ————-e
… /……………./
../……………../
A—————b
It makes since to me that there is only one route from a to b but that’s not correct and I don’t understand why. Thank you(1 vote) - what is tcp used for?(0 votes)
- TCP is used in cases where reliability and data integrity are the top priorities. When downloading files, for example, we want to get the entire file and we do not want the data to be corrupted, so we would use TCP.
On the other hand, UDP is not as reliable, but it is also faster. One case where UDP is used is when making a video call.(1 vote)
- What is IP? Can messages be sent only with IP?(0 votes)
- IP is short-hand for Internet Protocol, which is a network-level protocol that provides unreliable, connectionless packet delivery.
IP is not used independently; rather, IP is a part of the Internet protocol suite (commonly referred to as TCP/IP), which are the communication protocols used for communication over the global IP Internet.
IP is used in conjunction with protocols at the Application layer, Transport layer (note: this is the TCP [Transmission Control Protocol] in TCP/IP), Data Link layer, and Physical layer. You can learn more about the Internet protocol suite here on Khan Academy through the following article:
https://www.khanacademy.org/computing/computers-and-internet/xcae6f4a7ff015e7d:the-internet/xcae6f4a7ff015e7d:the-internet-protocol-suite/a/the-internet-protocols(1 vote)
- So does the IP split data into multiple packets or describe the structure of packets? It says one thing in previous lecture and another in this one.(0 votes)
- Both are accurate; the Internet Protocol is responsible for splitting data into multiple packets, and for that purpose it defines the structure of packets.(1 vote)
- wat is dys men(0 votes)
- Can you store internet packets on your own?(0 votes)
- Using a program, such as Wireshark, you can view the packets that pass through your computer and save them.(0 votes)