Java Reference
In-Depth Information
Figure 1-3. The structure of an IPv4 datagram
Besides routing and addressing, the second purpose of the Internet layer is to enable
different types of Host-to-Network layers to talk to each other. Internet routers translate
between WiFi and Ethernet, Ethernet and DSL, DSL and fiber-optic backhaul protocols,
and so forth. Without the internet layer or something like it, each computer could only
talk to other computers that shared its particular type of network. The internet layer is
responsible for connecting heterogenous networks to each other using homogeneous
protocols.
The Transport Layer
Raw datagrams have some drawbacks. Most notably, there's no guarantee that they will
be delivered. Even if they are delivered, they may have been corrupted in transit. The
header checksum can only detect corruption in the header, not in the data portion of a
datagram. Finally, even if the datagrams arrive uncorrupted, they do not necessarily
arrive in the order in which they were sent. Individual datagrams may follow different
routes from source to destination. Just because datagram A is sent before datagram B
does not mean that datagram A will arrive before datagram B.
The transport layer is responsible for ensuring that packets are received in the order
they were sent and that no data is lost or corrupted. If a packet is lost, the transport layer
can ask the sender to retransmit the packet. IP networks implement this by adding an
additional header to each datagram that contains more information. There are two
primary protocols at this level. The first, the Transmission Control Protocol (TCP), is
a high-overhead protocol that allows for retransmission of lost or corrupted data and
delivery of bytes in the order they were sent. The second protocol, the User Datagram
Protocol (UDP), allows the receiver to detect corrupted packets but does not guarantee
 
Search WWH ::




Custom Search