Explain about Network and Transport layer

life24

Senior member
Mar 25, 2014
283
0
76
Hello my friends,
Would you mind more explain about my problem?
I attached two photo for this.

Transport layer is end-to-end but network layer is host-to-host :confused:

And about TCP Flow control.

r4lypcyk3dixv3vf77jf.jpg


87wlu3hcseca3nxoi3f1.jpg
 

life24

Senior member
Mar 25, 2014
283
0
76
First you need to post your questions. ..

Thank you,
Why in logical connection ,Transport layer is end-to-end ? and Network layer is host-to-host ?
What means "end-to-end " and "host-to-host" ? :(
What means "logical connection" ? :(
 

sdifox

No Lifer
Sep 30, 2005
101,205
18,220
126
Thank you,
Why in logical connection ,Transport layer is end-to-end ? and Network layer is host-to-host ?
What means "end-to-end " and "host-to-host" ? :(
What means "logical connection" ? :(

end to end = host to host :p

logical as in you think of it as two computers or 2 applications without thinking about all that has to happen below the application layer


https://en.wikipedia.org/wiki/OSI_model


that should make it clear enough.
 

Gryz

Golden Member
Aug 28, 2010
1,551
204
106
First you need to learn a little terminology.

- A host. A computer with only 1 connection to the network. A host will not forward packets destined to other hosts. It will only accept packets that are destined for itself.

- A router. A computer with 2 or more connections to networks. A router will forward packets that it did not originate itself and that are not destined to itself.

So host-to-host is when one computer sends packets to another computer. If those hosts use the TCP/IP family of protocols, then they use IP (Internet Procotol, the layer-3 protocol of the TCP/IP family).

Now what is inside those IP packets ?
An example can be TCP segments. The TCP protocol in the TCP/IP family acts as if there is a "connection". And that connection is not between 2 computers. But between two "endpoints". Those endpoints are applications, processes, daemons, whatever you want to call them. E.g. your email program (e.g. OutLook) can talk to a POP-daemon on the mail-server to transport email over POP over TCP over IP. But you can at the same time send email. Your OutLook then talks to the SMTP-daemon on the mail-server (SMTP over TCP over IP). This means you have 2 logical connections between your computer and the mail-server. On the IP-layer (the network-layer) both computer just exchange IP-packets. But on the logical layer, TCP uses port-numbers to keep track of the 2 different connections. And those connections are between applications. And that is why they call it end-to-end.

The difference is really subtle. And can be confusing. 80% of people in networking doesn't even think about these little details.
 

Gryz

Golden Member
Aug 28, 2010
1,551
204
106
About TCP flow control.

This is a subject that we could talk about for days. The little details are important, but not always easy to understand. Let me try to tell you the basics.

1) The problem.
Suppose you have this network:
host A ---1 Gbps Ethernet--- host B

Host A wants to send a large file to B. How fast can it send the packets ? Well, it can look at its network-interface. It sees it is a 1Gbps interface, so it can send "at linerate" or "at linespeed", which in this case means 1 Gbps. No problem

Now suppose we have this network:
host A ---1 Gbps Ethernet --- routerX ---10 Mbps Ethernet --- routerY --- 1 Gbps --- Host B

Now how fast does host A needs to send its packets to transfer a file ?
If it sends at 1 Gbps speed, the link between routerX and routerY can not transfer all packets fast enough. routerX will try to buffer a little bit, but soon its buffers will be full. And routerX will start dropping packets. Host A doesn't get acks, and starts retransmitting. More packets. More drops are routerX. And the network is "congested" (meaning more packets than it can handle).

To fix this, host A must try to figure out how fast it can send.
This is called "flow control".

TCP has many ways to try and do flow control.
Both A and B will tell the other side how much data they can receive before they are overrun themselves. These are called "receive windows".
https://en.wikipedia.org/wiki/Congestion_window

TCP does something called "slow start".
On a new connection, TCP will start sending only one packet. And it times how long it takes to receive an acknowledgement (ack). When it receives the ack, it will send 2 packets. And the next time it gets acks back, it sends 4 packets. Etc, etc. This way TCP will start slowly using more and more bandwidth. But when it sends too much, it will not receive acks for the dropped packets it just sent earlier. Or the acks take longer to get back. TCP will then start to slow down a little. This way it tries to find the optimal speed at which it can send, without packet drops and retransmissions.
https://en.wikipedia.org/wiki/Slow-start

And there are more little tricks TCP does to try and find the maximum speed at which it can send (a.k.a. flow control). Don't worry if you don't understand all the details right away. This is not stuff for people new to networking. If you understand what flow-control tries to do, that is already a good first step.