Java Reference
In-Depth Information
The Ethernet protocol informs you that a message is coming in from the Cisco router back
to the laptop. The IP protocol specifies that the message is coming from address 8.8.8.8 and
back to your address 10.33.200.175. The UDP protocol tells you that the message originates
from port 53 and is destined for port 61796—the one you're listening on to receive a reply.
The DNS message contains a structured answer, telling you that www.wrox.com is the same
as wrox.com , and that wrox.com has the IP address 208.215.179.178.
6.
All of this was done just to figure out the IP address of www.wrox.com . Your browser can now
establish a connection to 208.215.179.178. Again, a number of protocols are combined to
construct a complex message. You have already seen IEEE 802.3 (Ethernet) and IP. Instead
of UDP, another transport protocol is used on top of this, called TCP (Transmission Control
Protocol). TCP provides a more reliable means of delivering network messages, as it includes
functionality for error‐checking, makes sure that packets are delivered in the right order, and
takes care of resending packets when they are lost in transmission. Finally, HTTP (HyperText
Transfer Protocol) is used to request and receive the web page. Figure 10-3 shows the complete
package the browser sends to request a web page from www.wrox.com (208.215.179.178).
figure 10-3  
Figure 10-3 shows the whole stack of protocols at work here. Note the sequence number, the
acknowledgement number, and the checksum in the TCP message, which make sure messages are
delivered correctly and in the right order. Note also that, just as with UDP, TCP uses the ports
mechanism to organize messages. The HTTP message looks like the following:
GET / HTTP/1.1
Host: www.wrox.com
Connection: keep-alive
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;
Search WWH ::




Custom Search