Java Reference
In-Depth Information
Figure 13.1 Networks use a layer architecture. Highest level applications talk to the
Transport layer, which in turn talks to the Network layer and this in turn talks to the
Physical layer. To the application user, however, the communications path will
appear to be directly from one application to another. [2]
containing its destination and source addresses and other miscellaneous infor-
mation such as error correction bytes. The body of the packet is called the data
payload. These packets travel through the network via routers that lie at nodes
(intersections) in the network. The routers read the destination addresses on the
packets and, just as with mail in the postal system, send the packet to the next
node closest to the final destination. If such a node doesn't respond or if the traffic
load needs balancing, the transmitting node looks for alternate routes. When the
packets reach their final destination, the original message is rebuilt. The packets
may arrive out of order so the rebuilding must wait for all packets to arrive.
13.2.1 IP datagrams
The IP layer communicates via packets called datagrams. Datagrams have headers
of 20-60 bytes and data payloads of up to 65K bytes. The headers contain the
source and destination addresses. An IP address consists of four bytes displayed as
four values separated by periods as in 130.237.217.62 . The left-most byte is
the highest-order address and so can represent a region or country. The lower-order
bytes narrow the address down until the final byte indicates, typically, a particular
computer on a WAN (Wide Area Network) or LAN (Local Area Network).
Datagrams from the same message can travel completely different paths as
the routers dynamically choose paths for the same destination address so as to
avoid loading down any one link. Thus datagrams may become lost or arrive
out of order from how they were sent. When TCP/IP is used, the TCP layer is
responsible for putting the packets back together in the proper order.
There are a number of special IP addresses. For example, any address beginning
with 127, as in 127.0.0.1, translates as a loop back address. This means that
any packets sent with this destination address automatically return to the source
computer.
Search WWH ::




Custom Search