Linux Networking: How The Kernel Handles A TCP Connection

  Рет қаралды 95,699

Deep Linux

Deep Linux

Күн бұрын

I am going to walk you through the details of how a TCP connection request and network packets are handled by the Linux kernel. I will use LTTng tracer and Tracecompass trace analysis tools for the purpose of this video.
More information about LTTng:
lttng.org/docs/v2.13
More on Tracecompass:
www.eclipse.org/tracecompass/
/ @eclipsetracecompass7421

Пікірлер: 67
@linkernick5379
@linkernick5379 Жыл бұрын
This video is unique: it is too deep for the majority of users, but a few ones, who need it to be watched, they seem to be saved by you, dear author! 🎉
@deeplinux2248
@deeplinux2248 9 ай бұрын
Thanks for the comment.
@epolpier
@epolpier Ай бұрын
It's not deep at all, it barely scratches the surface...
@natking1u1z99
@natking1u1z99 Ай бұрын
“Too deep for the majority of users” speak for yourself buddy 😂😂😂
@khardian2823
@khardian2823 Ай бұрын
Sadly, most people don't know what "majority of users" mean, thus making your comment too deep for the majority of users.
@danielzhu194
@danielzhu194 6 ай бұрын
This is one of the greatest KZbin videos of all time. It was not only incredibly thorough, but also very easy to digest (assuming the viewer has a basic understanding of kernel concepts like interrupt handlers, etc). I also appreciate how you would periodically “zoom out” to review the forest after diving deep into the individual trees.
@aospware
@aospware Ай бұрын
Tons of books and videos have never been able to do this ever. Keep on this great work. I wish to see more such stuff from you.
@Tubu-fu2lh
@Tubu-fu2lh Ай бұрын
Wow! I now understand so many things taught in computer networks class. It was all imagination to me before. Thankyou
@bramgn
@bramgn 8 ай бұрын
Wow, this channel is a diamond in the rough! Glad to have stumbled upon it! Keep it up!
@ideaparkcc
@ideaparkcc 7 күн бұрын
absolutely brilliant deep dive the linux network
@GudinVladimir
@GudinVladimir 8 ай бұрын
Wow! This is realy excellent tutorial! It was so interest to investigate syscall interconnections and time consumption of different parts. This live format is absolutly amazing! Thanks a lot for your work!
@pneuma33
@pneuma33 7 ай бұрын
You pulling up the kernel was truly deep Linux.. subscribed
@jindiggs
@jindiggs Жыл бұрын
Please continue, you got my full support ! Thank you.
@zelllers
@zelllers 8 ай бұрын
So cool. I'm coming at this from a networking background, familiar with packet captures but seeing the kernel traces, system calls, file descriptors, and all that it really gave me a much better picture of what's going on there. I loved it, subscribed and definitely will check out your other videos. Thank you
@hoodrobinson1159
@hoodrobinson1159 8 ай бұрын
Holy this channel is SO underrated, these real world examples helps me learning OS & network, big thanks.
@XYZ56771
@XYZ56771 Ай бұрын
Indeed, this kind of teaching is what we need. Thank you!
@MrRaja
@MrRaja 8 ай бұрын
I am interested in Linux more and more recently and this somewhat helps put a picture to the background process we are unaware of.
@abhinavjain9264
@abhinavjain9264 9 ай бұрын
I have no words to appreciate the deep respect you have earnestly earned in my heart. This is awesome, please keep it up, I love the tracing frameworks in Linux and such videos just makes learning kernel so much more fun.
@deeplinux2248
@deeplinux2248 9 ай бұрын
Wow that is truely flattering. Thanks!
@zalavadiaridham
@zalavadiaridham Жыл бұрын
Amazing video and great in-depth explanation. Thank you!
@deeplinux2248
@deeplinux2248 Жыл бұрын
I am happy that you have found this useful. Is there any other particular kernel area that you may be interested in?
@thedanielspindler
@thedanielspindler 2 ай бұрын
Thank you, this is an amazing video. Very well presented and explained. Keep up the good work!
@MorbusCQ
@MorbusCQ 8 ай бұрын
I learned more from watching this than my professor. I'm taking computer networks at the moment and this covers a lot of the course material, but in far more detail.
@deeplinux2248
@deeplinux2248 8 ай бұрын
Good to hear that. If you want to be able to produce this on your own then watch this video: kzbin.info/www/bejne/h56kfYyif6h0nMk
@suyashpurwar631
@suyashpurwar631 8 ай бұрын
Please keep making such videos! I wan this level of depth!
@deeplinux2248
@deeplinux2248 8 ай бұрын
Then take your time and watch this one as well: kzbin.info/www/bejne/hHapqKVsoat9jaM
@danielmoreno968
@danielmoreno968 8 ай бұрын
Thank you so much for this information!
@ratatui900
@ratatui900 8 ай бұрын
oh my god, this is what's called top level content, this vid delayed my sleep schedule for an hour yesterday
@thapakazi_
@thapakazi_ 6 ай бұрын
woooooh, these are dope details. now I wanna learn more... thanks for sharing this resource 🙇‍♂
@nose05031980
@nose05031980 4 ай бұрын
Well done, mate! Thank you! Subscribed.
@lxn7404
@lxn7404 6 ай бұрын
Finding your channel was my Christmas present 🤩
@deeplinux2248
@deeplinux2248 6 ай бұрын
Wow that is such a nice complement. Merry Christmas!
@suscactus420
@suscactus420 8 ай бұрын
thank you so much for this. it's a great video
@jindiggs
@jindiggs Жыл бұрын
Wow man, this is so much stuff going on !!!! I love it.
@deeplinux2248
@deeplinux2248 Жыл бұрын
Glad that you liked it. You may want to view this one which really drills down into the kernel code for tracing how a TCP connection is handled. kzbin.info/www/bejne/bobQgaqMe9iqrLs
@QuantumQ80
@QuantumQ80 9 ай бұрын
Awesome video! ❤
@tanchienhao
@tanchienhao 9 ай бұрын
Awesome channel!! Subscribed
@abdurrahmanrafi7946
@abdurrahmanrafi7946 8 ай бұрын
You made my day... Thanks a lot.
@ashishratnawat2711
@ashishratnawat2711 8 ай бұрын
Thank you very much!
@maixicek
@maixicek 7 ай бұрын
very good video, thank you
@user-te4eb2nw4w
@user-te4eb2nw4w 9 ай бұрын
love it. Always wondered. Now I know.
@AmolGautam
@AmolGautam Ай бұрын
This was in really helpful. Thanks
@PhillipMaii
@PhillipMaii 4 ай бұрын
great content, thanks!
@darkside3ng
@darkside3ng Ай бұрын
Amazing!
@vadiks20032
@vadiks20032 8 ай бұрын
wow thank you i didn't understand anything but i will still leave a like and comment
@chabaslabas
@chabaslabas 8 ай бұрын
Thanks a lot!
@yb9737
@yb9737 6 ай бұрын
THANK YOU
@ricardorosa5315
@ricardorosa5315 4 ай бұрын
GOLD!!!!
@internet.security.analyst
@internet.security.analyst 7 ай бұрын
짱이다짱
@4skinntim420
@4skinntim420 6 ай бұрын
This is amazing content! I am amazed by the fact that I (a complete linux kernel newbie) can understand what is happening. The information presented here is very valuable to my research (I want to know how select/epoll works in regards to concurrency and multithreading). Keep up with the great work and can I ask a question - is 'softirq' some kind of lightweight kernel thread or what is it?
@deeplinux2248
@deeplinux2248 6 ай бұрын
Thanks for the encouraging feedback. Softirq is not a kernel thread, it is simply an interrupt handler which serves software interrupts. These are generally functions which are called by the kernel when an interrupt is raised. A softirq has the seconds highest priority after hardirq which serves actual hardware interrupts coming from net or disk, for example. If you require some cobtext of execution in the kernel then you can use simple threads but in kernel space, or if you require a kernel routine then go with tasklets.
@kimaegaii
@kimaegaii Ай бұрын
Thank you. Is there any video that might prep us for this video. I've been working with Linux a long time , but I got lost with what the program you're using and sort of had more questions along the way of what's going on. Sorry and thanks.
@ganeshkirshna
@ganeshkirshna 3 ай бұрын
This is really a great deep dive video i have ever seen, just wanted to know at timefram 21:56, you have mentioned that it will create a new socket for data transfer? but generally TCP relays on the same socket for listening and data transferring right? Can you please advice me on this?
@deeplinux2248
@deeplinux2248 3 ай бұрын
Very good question. In the tcp protocol we have two kinds of sockets, listen and data sockets. A listen socket is only applicable on the server side and is unique per server ip/port. The data socket is one per source dest ip port quadruple. The listen socket is only there to accept new connection requests. Once a connection request is received the kernel creates a new data socker per incoming ip port. From the application side you wont see these different sockets.
@candyboah
@candyboah 8 ай бұрын
Прикольно
@OMGHADDSXO._.
@OMGHADDSXO._. 8 ай бұрын
Intro music is far too loud btw, but thanks for this!
@deeplinux2248
@deeplinux2248 8 ай бұрын
Yes that is so true😅
@flintthuang
@flintthuang 3 ай бұрын
starting from 17:10, why readfds=0x8 means fd 3?
@flintthuang
@flintthuang 3 ай бұрын
i got it, 0x8 = 1000, 1 is at bitmap position 3. with the same logic 0x11 = 10001, it contains fd 4 and fd 0
@Lircking
@Lircking 8 ай бұрын
it feels like I should watch another video before I can understand this one. Any recommendations?
@deeplinux2248
@deeplinux2248 8 ай бұрын
It depends what area you have issues with. If you want to get comfortable with the visualization and analysis tool then this is the official Tracecompass channel playlist: kzbin.info/www/bejne/bqCVlZSobtmZgsk
@BunuConstantin
@BunuConstantin 6 ай бұрын
@@deeplinux2248 Hi, i can suggest something that may can help you: 1. About tracing in linux kernel: kzbin.info/www/bejne/gIPco5uprZJ_a7s 2. Memory Management in linux Kernel : kzbin.info/www/bejne/bZKyf3yMiL2cgJo. 3: Networking fundamentals: kzbin.info/www/bejne/mJuQipmXoM-fosU
@Nowlala
@Nowlala 4 ай бұрын
may i know , what will i learn from learnig these ? like how will it impact my learning in linux basically
@deeplinux2248
@deeplinux2248 4 ай бұрын
Depends what your goal is in your Linux journey. A user or even a simple admin then probably not much. But if you debug kernel issues or write network software in the lower layers then you would not be asking this question😉
@Corteum
@Corteum Ай бұрын
How is it different to how Windows or MacOS handles it?
@djtomoy
@djtomoy Ай бұрын
Very inefficient, I would have done it much differently myself
@pppkenken6610
@pppkenken6610 8 ай бұрын
tsuzuki computer club. Amigo
eBPF: Unlocking the Kernel [OFFICIAL DOCUMENTARY]
30:00
Speakeasy Productions
Рет қаралды 88 М.
Deep Dive: The ip Command in Linux
52:44
Prowse Tech
Рет қаралды 9 М.
Русалка
01:00
История одного вокалиста
Рет қаралды 5 МЛН
NERF WAR HEAVY: Drone Battle!
00:30
MacDannyGun
Рет қаралды 56 МЛН
The Tragedy of systemd
47:18
linux.conf.au
Рет қаралды 1,1 МЛН
Steven Rostedt - Learning the Linux Kernel with tracing
1:07:24
OpenFest Bulgaria
Рет қаралды 90 М.
How Do Linux Kernel Drivers Work? - Learning Resource
17:02
LiveOverflow
Рет қаралды 539 М.
The Magic of RISC-V Vector Processing
16:56
LaurieWired
Рет қаралды 241 М.
Remotely Control Any PC with an image?!
12:42
Loi Liang Yang
Рет қаралды 144 М.
What Makes A Great Developer
27:12
ThePrimeTime
Рет қаралды 157 М.
So You Think You Know Git - FOSDEM 2024
47:00
GitButler
Рет қаралды 1 МЛН
Why Compile a Linux Kernel from Source?
13:38
DJ Ware
Рет қаралды 28 М.