Java Reference
In-Depth Information
Users typically deal with text addresses called hostnames that are easier to
remember than the numerical addresses. For example, java.sun.com is a
hostname. Special nodes on the Internet called Domain Name Servers (DNS)
translate hostnames into the corresponding numerical IP addresses. A hostname
is composed of a top-level domain such as com , se ,or edu . These domains
are then divided into second level subdomains such as sun.com , kth.se ,or
ucr.edu . The systems at these locations can divide a domain further such as
java.sun.com , gluon.particle.kth.se ,or physics.ucr.edu .
13.2.2 TCP and UDP
Above the IP layer resides the Transport layer. It includes both the Transmission
Control Protocol (TCP) mentioned previously and the User Datagram Protocol
(UDP). The Transport layer attempts to smooth over the problems of the IP layer.
The Transport layer can rearrange packets into their proper order and request
retransmission of missing packets.
TCP guarantees that all bytes are provided in the correct order or else an error
condition is reported. For text messages and files, for example, this is obviously
a requirement. UDP, on the other hand, does not guarantee all the bytes in the
correct order, or even that all bytes are received. As such, it has a lower overhead
than TCP. For some applications, such as audio and video transmission, the loss
of a few bytes is not significant and the use of UDP provides better performance.
13.2.3 Application layer
The Application layer involves all those user programs that we are so familiar
with such as web browsers. These use protocols such as:
HTTP - Hypertext Transfer Protocol - web page transmission
FTP -File Transfer Protocol - for sending and obtaining files
SMTP - Simple Mail Transport Protocol - mail
Telnet - console sessions
These protocols require TCP since the programs cannot allow for randomly
dropped bytes from source files and web pages. Other application layer programs,
such as the ping program that sends test packets to a given IP address, can use the
simpler UDP. Most Java network programs only deal with the application layer.
13.3 Ports
The IP address is used to get a packet to the right computer, but how does the
packet get to the right program on that computer? A computer may have:
several programs running at the same time
several programs trying to communicate via the Internet
all the programs communicating over the same physical Ethernet cable
Search WWH ::




Custom Search