 Now that we have seen the details of communication and protocols at different layers, let's begin with the reflection spot. Suppose we have an application on a client which wants to communicate with a corresponding application on the server. Can you trace out the path that the packet will take, the request packet will take all the way down the chain on the client side across the network and up the chain on the server side. Take a moment to think about what all steps of processing happen to this packet at the different layers and then proceed. Many of you may have thought about the different layers that are coming in the process. So some of them, for example, the request is generated by the application. What is the corresponding information that the application layer provides? It provides a source and the destination. You know the source, you know the source port, you know the destination and you know the destination port. For example, if it is your browser which is making an application request to a search engine, you know the source port which is HTTP and you know the destination which is the web server. And then at the next level, the domain names are translated into IP address by a domain name lookup followed by adding the IP addresses into the packet. So you can think of the packet as how it grows along. So it starts with just the data, then there is the application ports, then there is the IP addresses which are attached and then there are sequence numbers which are attached and once it comes down to the MAC level, the MAC addresses is also updated at every routing point. On arrival at the destination, it's like opening a bunch of envelopes. So you keep opening these envelopes till you get to the data and the data is passed over to the application layer. To look at this in slightly more detail, let's look at the slide where we see the data packet and we see all these headers that I talked about being attached at each of the layers. Let's start with the top layer. There is host A, there are a couple of routers on the way and there is host B which need to communicate with each other. Now at each layer, it appears that the layer is communicating with its peer entity at the other side whereas actually the packet is going down the network, coming up into the routers, going back down and then coming up at the other end. So for example, when the request is generated by the application with a source and destination port, it appears that the application layer is communicating with the application layer at the other end. So it's a process-to-process communication. Then when the protocol for communication is determined, the corresponding control information is added. For example, if the protocol is TCP, then there are corresponding TCP ports which are open, TCP sequence numbers which are decided and so on. So this now instead of a process-to-process communication becomes a host-to-host communication because some packet from one machine are now to be taken to another machine. One level lower than that are the source and destination IP addresses which are attached. This becomes a network level communication because now the packet is free to go in different routes, different packets can take different routes from one host to the other from A to B and they will be reassembled at B. Finally, in order to put the packet onto the link, based on the destination IP address, the corresponding MAC address for the next hop is added and now the interesting thing to note is this MAC address is the one which changes most frequently because at every hop the MAC address of the next link has to be changed. How often does the IP address change? The IP address does not change because you are going to a single host destination and how often does the application port number change? The application port number also does not change because on that destination the transport layer knows which application it has to hand over the packet to. So this is the broad idea by which the data flows through the network. So on arrival at the destination based on the port address, the application opens the request and sends the response. How does this response go? It takes a similar path as far as the network is concerned, it does not differentiate between a request and a response, it treats both of them as packets and it does exactly the same thing. It attaches IP addresses, it attaches port numbers and it attaches the headers of the MAC addresses and so on and the packet travels back from the destination back to the source as a reply packet. So this broadly summarizes how communication happens in today's computer networks. Now that you have a complete picture of how communication happens over the internet it is time to complete the assignment for this week. Have fun.