Java Reference
In-Depth Information
packets from the same message. IP is concerned with the routing of these packets
through an internet. Introduced by the American military during the Cold War, it
was designed from the outset to be robust. In the event of a military strike against
one of the network routers, the rest of the network had to continue to function as
normal, with messages that would have gone through the damaged router being re-
routed. IP is responsible for this re-routing. It attaches the IP address of the intended
recipient to each packet and then tries to determine the most effi cient route available
to get to the ultimate destination (taking damaged routers into account).
However, since packets could still arrive out of sequence, be corrupted or even not
arrive at all (without indication to either sender or intended recipient that anything
had gone wrong), it was decided to place another protocol layer on top of IP. This
further layer was provided by TCP (Transmission Control Protocol), which allowed
each end of a connection to acknowledge receipt of IP packets and/or request
retransmission of lost or corrupted packets. In addition, TCP allows the packets to
be rearranged into their correct sequence at the receiving end. IP and TCP are the
two commonest protocols used on the Internet and are almost invariably coupled
together as TCP/IP. TCP is the higher level protocol that uses the lower level IP.
For Internet applications, a four-layer model is often used, which is represented
diagrammatically in Fig. 1.1 below. The transport layer will often comprise the TCP
protocol, but may be UDP (described in the next section), while the internet layer
will always be IP. Each layer of the model represents a different level of abstraction,
with higher levels representing higher abstraction. Thus, although applications may
appear to be communicating directly with each other, they are actually communicat-
ing directly only with their transport layers. The transport and internet layers, in
their turn, communicate directly only with the layers immediately above and below
them, while the host-to-network layer communicates directly only with the IP layer
at each end of the connection. When a message is sent by the application layer at
one end of the connection, it passes through each of the lower layers. As it does so,
each layer adds further protocol data specifi c to the particular protocol at that level.
For the TCP layer, this process involves breaking up the data packets into TCP seg-
ments and adding sequence numbers and checksums; for the IP layer, it involves
placing the TCP segments into IP packets called datagrams and adding the routing
details. The host-to-network layer then converts the digital data into an analogue
form suitable for transmission over the carrier wire, sends the data and converts it
back into digital form at the receiving end.
Application Layer
Application Layer
Transport Layer (E.g., TCP)
Transport Layer (E.g., TCP)
Internet Layer (IP)
Internet Layer (IP)
Fig. 1.1
The 4-layer network
Host-to-network layer
Search WWH ::

Custom Search