The internet is made up of end-hosts, links and routers. Data is delievered hop-by-hop over each link in turn. Data is delivered in packets.

A packet consistes of the data we want to be delivered, along with a header that tells the network where the packet is to be delivered, where it came from and so on.

The Link layer‘s job is to carry the data over one link at a time. Ethernet and WiFi are two examples of different Link layers.

The Network Layer‘s job is to deliver packets end-to-end across the Internet from the source to the destination.

The Network hands the datagram to the Link layer, telling it to send the datagram over the first link. In other words, the Link Layer is providing a “service” to the Network Layer.

At the other side of the link is a router. The Link layer of the router accepts the datagram from the link and hands it up to the Network layer inside the router.

The Network layer on the router examines the destination address of the datagram, and is responsible for routing the datagram one hop at a time towards its eventual destination.

And so on until it reaches the Network layer at the destination.

The Network layer does not need to concern itself with how the link layer sends the datagram over the link. In fact, different link layers work in very different ways. Ethernet and Wifi are clearly very different. This separation of concerns betweent the network layer and link layer allows each to focus on its job, without worrying about how the other layer works.

We must use Internet Protocol (IP) when tranferring data in internet. But IP does not guarantee all data can be delivered in order and with out lost and corruption. So it needs another protocol running on top of IP. That’s the job of the Transport Layer.

The most common Transport layer protocol is Transmission Control Protocol (TCP). TCP/IP is when an application uses both TCP and IP together. TCP makes sure that data sent by an application at one end of the Internet is correctly delivered in the right order to the applcation at the other end of the internet. If the Network Layers drops some datagrams, TCP will retransmit them, multiple times if need-be. If the network layer delivers them out of order, TCP will put the data back into the right order again.

Summary


0 Comments

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *