Networking: Difference between Transport layer and Networking Layer

hqt picture hqt · Nov 11, 2012 · Viewed 56.8k times · Source

In Internet Model there are four layers: Link -> Networking -> Transport -> Application.

I don't really know the difference between networking layer and transport layer. As I read:

Transport layer: include congestion control, flow control, reliability ...
Networking layer: route data from A to B

So, base on above properties, I see that there are some overlaps between those two layers.

1) Networking layer decides to move data from A to B. But, when data has known how to moved from A to B, what does it means for term "flow control" "congestion control" ... ? How and What does it control when the packet (and byte stream is in packet) has already known to moved across network.

2) Or other example, TCP protocol in Transport layer is ORDERED delivery of a stream. But, TCP doesn't decide how to move data, but Networking layer. So, how can TCP can do ?

So, I cannot get in those two terms. Please teach me.

Thanks :)

Answer

Anirudh Ramanathan picture Anirudh Ramanathan · Nov 11, 2012

These are levels of abstraction.

Transport Layer is where the decision to use TCP/UDP is made. Among commonly used protocols in this layer, TCP is reliable, UDP isn't. Depending upon the choice made, the respective headers are attached to your packet. TCP for example just knows about SYN-ACK, Three-way handshake mechanisms, but does not know the address of the remote-endpoint, or the mechanism of getting the packet across the network.

Congestion control, Flow control help ensure that the network isn't flooded with packets, by regulating the number of packets being sent.

Now, after TCP/UDP header being appended, it moves on to the Network Layer. Till this step, the remote end-point's IP address wasn't a part of the packet at all. It is at this step that the Source & Destination IP addresses are added to the packet. This layer actually knows the remote-endpoint.


      Sender                          Receiver


    -----------                      ------------
   |           |   virtual link     |            |
   | Transport | -----------------> | Transport  |
   |           |                    |            |
    -----------                      ------------
         |                                |
         |                                |
    -----------                       -----------
   |           |    virtual link     |           |
   |  Network  | ------------------> |  Network  |
   |           |                     |           |
    -----------                       -----------
         |                                |
         |                                |
    -----------                       -----------
   |           |                     |           |
   | Physical  |                     | Physical  |
   |           |                     |           |
    -----------                       -----------
         ↓                                 ↑
         |____________real link____________|

The sender's Transport Layer data, is the exact data received by the receiver's transport layer.

As the packet travels down the sender, each layer is adding its own header information, but all of that is removed by the corresponding layer on the receiver.

The advantage is that a virtual link is established, like the one shown above, whereas the real link is only in the physical layer.