Friday, September 25, 2015

How web page is displayed

How web page is displayed.

Imagine that you decide to visit the web site http://GetCertifiedGetAhead.com
using your web browser so you type the URL into the browser, and the web page appears. Here are
the details of what is happening. Figure 3.3 provides an overview of how this will look and the
following text explains the process.

Your computer creates a packet with source and destination IP addresses and source and
destination ports. It queries a DNS server for the IP address of GetCertifiedGetAhead.com and learns
that the IP address is 72.52.206.134. Additionally, your computer will use its IP address as the source
IP address. For this example, imagine your computer’s IP address is 70.150.56.80.

Because the web server is serving web pages using HTTP and the well-known port is used, the
destination port is 80. Your computer will identify an unused port in the dynamic and private ports
range (a port number between 49,152 and 65,535) and map that port to the web browser. For this
example, imagine it assigns 49,152 to the web browser. It uses this as the source port.
At this point, the packet has both destination and source data as follows:
Destination IP address: 72.52.206.134 (the web server)
Destination port: 80
Source IP address: 70.150.56.80 (your computer)
Source port: 49,152


TCP/IP uses the IP address (72.52.206.134) to get the packet to the GetCertifiedGetAhead web
server. When it reaches the web server, the server looks at the destination port (80) and determines
that the packet needs to go to the web server program servicing HTTP. The web server creates the
page and puts the data into one or more return packets. At this point, the source and destinations are swapped because the packet is coming from the server back to you:
Destination IP address: 70.150.56.80 (your computer)
Destination port: 49,152
Source IP address: 72.52.206.134 (the web server)
Source port: 80

Again, TCP/IP uses the IP address to get the packets to the destination, which is your computer at
this point. Once the packets reach your system, it sees that port 49,152 is the destination port. Because
your system mapped this port to your web browser, it sends the packets to the web browser, which
displays the web page.


Source: Darril Gibson 2014 book, CompTIA Security+ SY)-401, Page 249

No comments:

Post a Comment