Web Request
Goddie Robins
Introduction
I shall boot up my laptop and connect to an
Ethernet connection through the Ethernet switches to the school router. The
school router connects to an internet service provider (ISP) which provides DNS
services to the school. Therefore, the DNS servers are located on the ISP’s
network. The DHCP server is running on the school’s router. When I plug in the
Ethernet cable, I cannot access any webpage since I lack an IP address.
Therefore, the school’s network will first run its DHCP server to generate an
IP address for my device.
Web
Request
My laptop’s
operating system will generate a DHCP request and add the request to the UDP
segment that contains the DHCP server and client. The UDP message is
encapsulated in an IP datagram containing the source IP address (0.0.0.0) since
his device has not been allocated an IP address. Still, I cannot access the
network. The IP datagram that contains the DHCP send request message is
encapsulated in an Ethernet frame. The Ethernet frame’s MAC address is
FF:FF:FF:FF:FF:FF to ensure the Ethernet frame can broadcast to the devices
that are connected to the DHCP server. The frame from my device is sent to the
Ethernet switch, which is a broadcast frame that contains a DHCP request
message. The switch then broadcasts all incoming frames from all output ports,
including those frames from the port that are connected to the router.
The broadcast
Ethernet frame that contains DHCP request message is sent to the router which
later extracts the IP datagram. The broadcast IP address of the datagram shows
that the upper layer protocols should process the IP address at its node to
ensure the UDP message is distributed upward to extract the DHCP request message.
In this scenario, we assume that the DHCP server that runs on the router can
assign IP addresses through the address block 68.85.2.0/24. Here, the IP
address used in the school is also used in the address block that the wire
company has assigned. We will assume that my computer is assigned an IP
address of 68.85.2.101 by the DHCP server. The server will then generate an ACK
message that contains the DNS server’s address, the subnet mask and the default
gateway’s IP address. The DHCP messages are encapsulated in UDP datagrams,
which are then encapsulated in IP messages and later encapsulated in Ethernet
frames for transmission. The Ethernet frame is connected to the router
interface source MAC address at the home network and the destination MAC
address of my device.
The router then
sends the Ethernet frame containing the DHCP ACK to the switch. Since the switch
initially received DCHP request frame from my device, it decides to forward the
frame to the DHCP ACK from the port that initially received the request frame
to the 00:16:D3:23:68:8A MAC address. My
device receives the frame that contains the DHCP ACK. After decapsulating the
frame layer by layer, it obtains the DHCP ACK message. The DHCP client of my
browser records its and the DNS server’s IP addresses. The DHCP also records
the default gateway’s address in its forwarding table. My device begins sending
datagrams containing the default gateway’s destination address and its subnet
is 68.85.2.0/24. The
device, at this point, has started initializing the web parts and it can now
generate and process web pages. When I click the OCU URL, the event chain
eventually results in displaying the OCU home page in the browser. The browser
then creates a TCP socket process that sends HTTP requests to the OCU home
page. To create a socket, my computer must know OCU’s IP address. The DNS protocol
thus provides the name to IP address translation.
My computer’s
operating system will create a DNS query message that places OCU’s domain name
in the DNS message. The query message is then added to the UDP datagram. The
UDP datagram is now added to an IP message with a source IP of 68.85.2.101 and
a destination address of 68.87.71.226. My device places the data that contains
the DNS query message in the Ethernet frame header. The default gateway on the
school network will then receive the data frame. My device can learn the school
router’s IP address by checking the DHCP ACK messages. However, it cannot
determine its MAC address. To determine the default gateway’s MAC address, the
laptop must know the ARP protocol.
My device generates
a new ARP query message to the default gateway and places the ARP message in an
Ethernet frame whose broadcast destination address is FF:FF:FF:FF:FF:FF. The
Ethernet frame is the switch and forwards it to the default gateway router and
other connected devices. A frame containing an ARP query message is sent to the
gateway router and forwarded to the interface connecting to the school network.
The gateway router then discovers that the destination of 68.85.2.1 in the ARP query
message corresponds with its interface. It can then prepare an ARP reply that
indicates the MAC address of my device matches that of the IP address
68.85.2.1.
My device analyzes
the ARP request message to extract the MAC address of the gateway router after
receiving the frame that contains the ARP request message. At this stage, my
computer can send Ethernet frames containing DNS query messages to MAC addresses
of the gateway router. Here, the IP datagram, destination address of DNS server
and gateway router are 68.87.71.226 and 00:22:6B:45:1F:1B respectively. My
device then sends the frame to the switch and later to the gateway router.
The router receives
the data frame and obtains the IP message segment that contains the DNS query
message (Tanenbaum
et al., 2019). The gateway router checks the destination IP 68.87.71.226 and its
forwarding table. The IP datagrams are then placed in link layer frames which
are later sent through the connection to the school router. The Comcast network
is the leftmost router. After receiving the data frame, the Comcast network extracts
the IP message segment, analyzes the message’s IP destination address and
determines the appropriate interface to send datagrams from the forwarding
table to the router DNS server.
The final IP
datagram that contains the DNS query message will then reach the DNS server.
The query message is extracted, DNS database for the OCU domain name is checked
and the server extracts the DNS source record that contains OCU’s IP address.
The cached data originates from an authorized DNS server from https://www.oc.edu. The DNS server then
creates a DMS reply message that contains hostnames and IP addresses, encloses
it and sends it to my device. The Comcast network then sends the message will
be sent to the school router through the Ethernet switch and finally to my
device.
My device then analyzes
the DNS reply message to obtain OCU’s IP address from the OCU server. This is
when the device can connect to the OCU server. Since my device now has OCU’s
IP, it creates TCP sockets to facilitate sending HTTP GET messages to OCU’s
servers. When the TCP socket is created, a three-way handshake is performed
with the OCU server. The device must then create a TCP SYN message segment and
encapsulate the datagram in the frame header. This is then sent to the gateway
router to forward the frame to the switch.
The Comcast, school
and OCU networks use their own forwarding tables that forward messages that
contain TCP SYN to the OCU server. The incoming interface that manages packet
forwarding and calls route forwarding tables uses the BGP border gateway
routing protocol. The message segment that contains the TCP SYN will eventually
arrive at the OCU server. The TCP SYN message will be obtained from the message
segment and distributed to port 80. This facilitates the successful creation of
the TCP link socket on my device and on https://www.oc.edu. The TCP SYNACK
message is then added to a datagram that is sent to my computer and
encapsulated into the link-layer data frame that links OCU’s first-hop router.
The message segment
that contains TCP SYNACK is forwarded through the layers to my device.
Datagrams are then distributed to TCP sockets that were created by my operating
system for matching. Since the connection socket on the device can now send
bytes to OCU, the web browser will create HTTP GET messages for access through
the URL. The HTTP GET message will then be written in the socket and become the
payload of the TCP message segment. The TCP message segments are placed in
datagrams and transmitted to OCU.
The GET message is
read by the OCU HTTP server from the TCP socket. The OCU server then creates a
HTTP response message which is then placed in HTTP reply message before the
message is sent to the TCP socket (Joey, 2022). The datagram that contains the
HTTP reply message is transmitted through multiple layers to my device. The web
browser then reads the HTTP reply message sent by the socket, extracts the web
page’s html from the HTTP response message segment and displays the OCU web
page.
References
Joey. (2022). Web page
request procedure. https://saltyfish123.github.io/Network_Web_Request/
Tanenbaum, A., Wetherall,
D., Kurose, J., & Ross, K. (2019). Computer Networks Title: Computer
Networking: A Top-Down Approach. Instructor, 201901. https://www.uvic.ca/ecs/ece/assets/docs/current/undergraduate/202101/ece458.pdf
Comments
Post a Comment