 Now when we try to study this topic a little more formally, then you will find in textbooks that there is something called the OSI stack which is mentioned as well as there is something called the TCP IP stack which is mentioned. So these are nothing but the same idea of layering that we have seen of three or four different layers carrying out their functions and talking to the peer layer on the opposite side using protocols. Now I will not go into the details of each of these separate stacks and so on because that you can get by looking at textbooks as well as there are other courses which deal with that. So here I will restrict myself to talking about it at a more conceptual level. Conceptually, let's look at it from the bottom moving upwards. The bottom most layer is the physical layer. What is the physical layer consists of? Consists of wires and equipment of that nature. What is its job? Its job is to carry the bits from one end to the other. So the concept of physical layer, you have these ideas of modulation techniques and you know how to transmit the information, how to transmit the bits. So that's what the physical layer concerns itself with. On top of the physical layer is what we call the link layer. So what is the link layer? The link layer now has to concern itself with transmitting what are called packets or segments along the physical layer. For example, let's say you are using a wireless network. It may be that there are multiple machines are accessing the same physical layer. In this case, the physical medium is the end and the physical layer actually deals with how are the bits transmitted over this medium. Now when multiple people are accessing the same physical layer, there has to be some protocol by which people can decide who waits to speak when. So this idea is called medium access control. How to control access to the medium? Secondly, there is also the idea of ensuring that when I have sent data to the other end of the wire or from the laptop to the access point, I should know that my data has reached to the other end. So there is a notion of acknowledgments. So these ideas are what the link layer concerns itself with. What comes above the link layer? It cannot be that everything is just one link. So automatically, we need the notion of being able to have multiple links which are connected with each other in order to form a network. The moment we do that, we automatically come up with the idea of packets, saying that okay, I need a packet. Now this packet has to go from a source which is at one end of the network to a destination which is at another end of the network. And in between, there could be multiple links. There could be links which are traveled over wireless. There could be links which are traveled under the sea and there could be links which are traveled on different types of physical media. So when a packet has to traverse across multiple links, we need the routing layer or the network layer to actually make sure that the packet goes from the source to the destination. So we have seen the network layer at this level in various real-life instances also. For example, you could think of your postal network as a network layer where you write the address of the destination and you put it into the postal system and the postal system has its own way of carrying the letter from the source to the destination. So the function of the network layer is very similar to the function of the postal system when you are sending one letter. Going ahead, you might have more than one letter, you might have large packages which have to be sent such as we saw in the analogy example. So in this case, what is required is that you want to take a large document and you want to chunk it into multiple pieces, you want to segment it into multiple pieces and send each of them through the network layer. Why is this important? This is important because if we send the entire large document as one chunk and let's say some part of it gets corrupted in some link of the transmission then at the receiver's end the entire document becomes unusable. So the idea is to take a large document and split it into multiple segments and send each segment separately. So each segment you can think of as one letter. So each segment goes separately, now because each segment is going separately it may happen that some segments get lost or it may happen that some segments reach before other segments, hence we need the transport layer which actually keeps track of the segments. So the job of the transport layer is to take the document or take the information which has to be sent, split it into multiple segments, keep track of the segments by sequencing them, putting some sequence numbers on them and communicating with its peer at the other end in order to ensure that which sequences have been received, which segments have been missing, which need to be retransmitted. So there is the notion of an acknowledgement. So this broadly is the work of the transport layer. On top of the transport layer is the application layer which is what we are familiar with as users. So when you open your browser essentially what you are doing is you are opening an application layer. When you connect to a web server and you search for information or you are downloading something, you are opening a connection between the application layer on your machine and on the server's machine. So what is the information that is being passed on at this layer? The information is that you are sending a request and in response to that request you are getting back some information. So the client makes a request and the server sends the response. So this information is at a very abstract level. It does not worry about okay what is the way in which it goes or what is the link layer and so on. So the client simply says okay give me this document. The server takes the document and gives it to the transport layer on its side which then segments it, sends it through the network and it comes back to the client side. So this is the way in which communication happens on a network. Now that we have understood it conceptually, let us look at how it actually happens in a real network. So we will use a tool called Wireshark which is able to capture these packets and open them for you to see what is there inside the packets.