‫So let's see what happens to a packet inside the network traffic.
‫Please note, the data unit transferred between two endpoints has different names in each layer and
‫layers five, six and seven application layers.
‫It's called data in layer for transport layer.
‫It's called Segment four TCP and data gram for UDP in layer three the network layer.
‫It's called packet in layer two.
‫The data link layer.
‫The data unit is called frame.
‫Now I usually use packet for the transferred data unit in each layer to make it less complicated for
‫you.
‫Makes sense before looking at the road trip of a DNS query in detail.
‫Let's look at the relationship between the osai layers and computer systems.
‫The packets and layer one and layer two are managed by network interfaces of your device, for example,
‫by your Ethernet card.
‫And the package from three to seven are managed by the processing unit in software detail.
‫The layer three and layer for packets are managed by the operating system of your devices, and the
‫packets of layer five to seven are managed by the related application or service, for example, a web
‫browser.
‫When you write a, you are URL in the address bar of your browser and hit enter.
‫The first thing it sends is a DNS query, a DNS query is the process of a computer networking device
‫making an enquiry to get an IP address for a DNS names such as Mail Dot Yahoo.com.
‫The client computer will send a DNS query to one of their internet service providers DNS servers.
‫The DNS server looks in its DNS database to tell whether it can answer the query authoritatively.
‫If the DNS server can answer authoritatively, the DNS server answers the query and the DNS query process
‫is complete.
‫So let's see the road trip of a DNS query from your computer to a DNS server when data is transmitted
‫by the source toward a specific destination.
‫It passes through the application presentation and the session layers, and the protocol data unit arrives
‫at the transport layer.
‫Layer four layers five, six and seven are displayed as a single layer to simplify the presentation.
‫At this layer, a 20 byte data header is placed in front of the data.
‫A DNS query can also use TCP.
‫But let's assume that it uses UDP at this time the data and the layer for header.
‫Here it's UDP header, which together form a segment or data.
‫Graham is passed down to layer three.
‫The network layer.
‫The network layer places it's layer three header.
‫Here, the IP header in front of the received segment and this group becomes a packet.
‫The layer three header contains important fields, such as the logical address, the IP address of both
‫the source and the destination device.
‫The newly formed packet is then passed down to layer two, the data link layer creates a new data unit
‫called the frame by adding the layer to frame header, which is the Ethernet header here.
‫Like layer three and addressing structure is also applied in the layer two header that is the Mac address.
‫The frame is then passed down to the physical layer.
‫Which converts the information into zero and one bits that are sent over the physical media using electrical
‫signals on a copper link, for instance.
‫Finally, the data is sent over the wire using a wide variety of methods such as Ethernet or token ring.
‫The headers are a specific form of control information, but allows the data to go through the network
‫properly.
‫Thus, the data at each layer is encapsulated in the information appropriate for this specific layer,
‫including addressing and error checking.
‫The overall size of the information increases as the data travels through the lower layers from layer
‫four to layer one, the destination device, which is the DNS server here, receives the data and this
‫additional information is analyzed and then is removed as the data passes through the higher layers
‫up to the application layer where the data is de capsule8 it.
‫The physical address, commonly the Mac address, which is located in a special field in the data link
‫layer header changes as the packet passes from one device to another.
‫For example, from the source PC to a switch to a router to another switch and finally to the destination
‫PC.
‫However, the original IP source and destination addresses do not change when transiting the network
‫because the packet is stripped of its layer three header only when it goes beyond a router.
‫When it stays within the same land, it only passes through switches, which capsule8 it at the layer
‫two header containing the Mac address.
‫As a result, the header changes as the packet is re encapsulated, as does the Mac address fields.