When a TCP/IP Connection is established, is all handled at the network interface (NIC) level or does it also hit the OS kernel? If so, is it expensive to the CPU (in terms of CPU cycles)?
Asked
Active
Viewed 120 times
-4
-
This is really (*REALLY*) basic stuff. It doesn't qualify as a question a "professional sysadmin" should be asking by any means. Please pick up and read a copy of [TCP/IP Illustrated](http://www.amazon.com/TCP-Illustrated-Addison-Wesley-Professional-Computing/dp/0201776316) (A/K/A "The Stevens Book") and optionally any good book on OS design... – voretaq7 Dec 16 '12 at 18:57
1 Answers
4
The OS kernel implements the TCP/IP stack which means it manages the TCP/IP connections/packets. The NIC (& its network driver) handles usually the physical and data link layers in spite it can handle some other functionalities like the case of TCP off-loading.
You can have a look at this link to see an example of the involved calls within Linux kernel when a packet is received/sent. Although it is old (kernel 2.4.x), it is still can be useful to get a better idea.
Whether it is expensive or not depends on the functionality you are implementing and the size of traffic. There is no simple answer to this!
![](../../users/profiles/58024.webp)
Khaled
- 35,688
- 8
- 69
- 98