TCP Sequence and Acknowledgment Numbers

แชร์
ฝัง
  • เผยแพร่เมื่อ 22 ม.ค. 2025

ความคิดเห็น • 120

  • @mistakenmillenial6834
    @mistakenmillenial6834 5 ปีที่แล้ว +75

    Networking is funny. You literally have to tell yourself stories to understand what's going on. XD

    • @raq14
      @raq14 7 หลายเดือนก่อน

      Omg thats how im surviving my courses 😂

  • @TheNobodyscat
    @TheNobodyscat 5 ปีที่แล้ว +27

    Best explanation of Seq and ACK numbers I found online. Thank you!

  • @muradbagirli9285
    @muradbagirli9285 2 ปีที่แล้ว +6

    To be honest, I spent almost 3 weeks to understand this concept. I want to thank you because with your help I figured it out.

  • @thetayz72
    @thetayz72 7 ปีที่แล้ว +24

    Good explanation. I hate when tutorials leave out the "why" details, and you didn't. Well done.

    • @DerpyNetworking
      @DerpyNetworking  7 ปีที่แล้ว +3

      TheTayz yes, I hate it too when people don't explain the "why". XD thank you.

  • @MrAmerica141
    @MrAmerica141 8 ปีที่แล้ว +16

    One of the best explentions for my brain to handle. Great video, thank you.

  • @taddy666
    @taddy666 3 ปีที่แล้ว +4

    Superb - thanks so much. I was really struggling to understand this but the phantom byte when the syn and fin is flagged totally makes sense of the numbers.

  • @k86305
    @k86305 ปีที่แล้ว +2

    Excellent explanation of TCP connection (3 way hand shake, data-exchange, and Termination)

  • @eliashousseini9534
    @eliashousseini9534 7 ปีที่แล้ว +13

    Give this guy a cookie, you deserve it buddy ^_^

    • @DerpyNetworking
      @DerpyNetworking  7 ปีที่แล้ว +5

      Elias Housseini give me muffins! XD

  • @SounakVids
    @SounakVids 7 ปีที่แล้ว +2

    Best TCP Seq/Ack video on the internet.

  • @mahdidelavaran1099
    @mahdidelavaran1099 2 ปีที่แล้ว +1

    thanks man im reading Computer Networking: A Top-Down Approach and i didnt understand it , your video saved me

  • @mmcanhaoable
    @mmcanhaoable 2 ปีที่แล้ว +2

    Exam in 2 days, and I finally understand it, thank u

  • @EkramHBGaleti
    @EkramHBGaleti ปีที่แล้ว +2

    Masha Allah I was really confused, but good that I am seeing from Top Down approach must explains everything. Thank You. This gives me kick start and do more analysis. You should continue doing more videos using small examples with absolute numbers than relative numbers.

  • @netaishvasistha9875
    @netaishvasistha9875 5 ปีที่แล้ว +1

    One of the best video on you tube the phantom byte part was new and very well explained thx for the upload.

  • @tmq1030
    @tmq1030 4 ปีที่แล้ว +1

    Thank you so much this is one of the best tutorials in networking

  • @cmms1234
    @cmms1234 11 หลายเดือนก่อน

    1. Can anyone decide to close the connection
    2. When cleint closes ,whether server needs to close or can continue

  • @shilkababu1571
    @shilkababu1571 10 หลายเดือนก่อน

    how we got the data bytes from 376 to 270?

  • @marcelmravec9394
    @marcelmravec9394 8 หลายเดือนก่อน

    4:20 should't it be 378 in order to tell the client that it recieved 1 + 376 and is waiting on the next byte on position 378?

    • @DerpyNetworking
      @DerpyNetworking  8 หลายเดือนก่อน

      It should be 377 because 1 + 376 = 377. Also, in the beginning we start at 0. Look at the 3 way handshake.

  • @reynaldojrcapilitan943
    @reynaldojrcapilitan943 4 ปีที่แล้ว +1

    Love the way you explain bro. More power to you.

  • @McDonut24
    @McDonut24 5 ปีที่แล้ว +1

    Why does a FIN/ACK get 1 phantom byte, but an ACK doesn't get a phantom byte?
    Also, how would you detect if a packet is loss from the sequence and ack numbers?

    • @DerpyNetworking
      @DerpyNetworking  5 ปีที่แล้ว +1

      The FIN/ACK gets 1 because the FIN is set. If the SYN or FIN bit is set, it increases the count by 1.
      th-cam.com/video/SUFr2gYtEVU/w-d-xo.html&

  • @the_gacker_hub
    @the_gacker_hub 6 ปีที่แล้ว +1

    Fantastic, super fantastic video on TCP three-way handshake.

  • @shadow201011
    @shadow201011 8 ปีที่แล้ว +1

    Sir, I thank you from the bottom of my heart, thank's man

  • @universal4334
    @universal4334 4 ปีที่แล้ว

    I am unable to understand how reciver send seq no I mean 270 bytes

  • @aeh1905
    @aeh1905 4 ปีที่แล้ว +1

    Thank you! This is the best video about this topic :)

  • @MrLarryLicious
    @MrLarryLicious 5 ปีที่แล้ว +4

    Well-explained. Liked the pony :)

  • @caleb_gonsalves
    @caleb_gonsalves 7 ปีที่แล้ว +32

    I hated that pony, first impressions count, almost quit the video, but it's the best one out there

    • @DerpyNetworking
      @DerpyNetworking  7 ปีที่แล้ว +2

      Danger Wild Man Thanks for not judging a book by its cover. I appreciate that you looked past it.

    • @coming..back..in..2027
      @coming..back..in..2027 4 ปีที่แล้ว +1

      yeh me too

  • @magic_pink_horse
    @magic_pink_horse 2 ปีที่แล้ว +1

    Networking explained with ponies? Right when I have to do networking homework? Well, don't mind if I do! Good video x)

  • @matthewchew1849
    @matthewchew1849 6 ปีที่แล้ว +2

    so ack value = seq value + bytes sent ?

  • @martinzderadicka8280
    @martinzderadicka8280 3 ปีที่แล้ว

    whats up with the ponys?

  • @sathvikswaminathan7933
    @sathvikswaminathan7933 5 ปีที่แล้ว

    After the server ends the TCP connection, how does it respond to the client when it sends the FIN bit to end its connection?

  • @LindaDochter
    @LindaDochter 7 ปีที่แล้ว

    The client and server do not set up separate TCP connections. A single connection is between a pair of sockets (IP + port) and is bidirectional.

    • @DerpyNetworking
      @DerpyNetworking  7 ปีที่แล้ว

      Linda Dochter I don't think I ever said that, but I probably should have clarified. Thank you for pointing that out. Oh well. Me be derpin on the Internet. XD

  • @phamtienthinh1795
    @phamtienthinh1795 11 หลายเดือนก่อน +1

    Excellent explanation of TCP connection (3 way hand shake, data-exchange, and Termination)
    (Copy from k86305)

    • @phamtienthinh1795
      @phamtienthinh1795 11 หลายเดือนก่อน +1

      So this is how data transfer and the Mechanism to make sure data is sent when using TCP protocol
      Thank you

  • @dlightnin
    @dlightnin 8 ปีที่แล้ว +62

    Best tutorial out there

  • @andersulfsnes415
    @andersulfsnes415 6 ปีที่แล้ว

    Why doesn't the client increment the sequence number with the first transmission (GET request)? If seq=1 in the ACK last step of the handshake, shouldn't it be seq=2 in the GET?

    • @DerpyNetworking
      @DerpyNetworking  6 ปีที่แล้ว

      Good question. The SEQ and ACK only increment when data is transmitted. The only exception is if the FIN or SYN bit is set. The ACK never sent a payload so to speak.

    • @karimsalam2971
      @karimsalam2971 6 ปีที่แล้ว +1

      i found the sentence i was looking for about 12 hours , right in your answer to the comment of this man
      ( Anders Ulfsnes ) , " The SEQ and ACK only increment when data is transmitted. The only exception is if the FIN or SYN bit is set"

  • @duartedomingues4396
    @duartedomingues4396 4 ปีที่แล้ว +1

    great video dude, good job , helped me out a lot

  • @erichgonzalez6685
    @erichgonzalez6685 3 ปีที่แล้ว +1

    If you struggle at paying attention and don't understand what is going on, this video is actually easier to understand at playback speed 1.5

  • @julian403
    @julian403 7 ปีที่แล้ว

    What happends when the servers sends 2 continuous TCP packages ? The client return a packages with the sequence number with the last ACK numbers? what happends with the first packages?

    • @DerpyNetworking
      @DerpyNetworking  7 ปีที่แล้ว +1

      I believe my second video will clear your question up. If not, please message me again. th-cam.com/video/SUFr2gYtEVU/w-d-xo.html

    • @julian403
      @julian403 7 ปีที่แล้ว

      Thanks dude. Just a question. The ASK number dont specify that the last packages was recibe with success (thats the ASK flag). Does it specify the length for the next packages? that is no the purpose for windows side?

    • @DerpyNetworking
      @DerpyNetworking  7 ปีที่แล้ว +1

      Hopefully, I understand your question. There is no ASK flag, but I assume you mean ACK. The ACK sequence number acknowledges all previous data segments by saying that I'm ready for the "next byte in order". Definitely, it can get more complicated if they don't come in order or go missing. The video I linked to you explains some of that.
      The window size determines how much data the sender can send before an acknowledgment is required. The bigger the window size the faster the connection.

  • @jawito5378
    @jawito5378 4 ปีที่แล้ว +1

    Best Explanation, I found.

  • @YTM4niac
    @YTM4niac 7 ปีที่แล้ว +2

    Great video, thank you very much for your explanation!!

  • @Trellyy809
    @Trellyy809 4 ปีที่แล้ว

    So the http protocol goes through all that just for one request?

    • @DerpyNetworking
      @DerpyNetworking  4 ปีที่แล้ว

      There's a lot of other things below the application layer. It's actually pretty incredible when you think about it. It's somehow all works.

  • @tarunparashar8273
    @tarunparashar8273 3 ปีที่แล้ว

    Nice explanation in my perc-per-ps-psrc... perspective.

  • @MrLarryLicious
    @MrLarryLicious 5 ปีที่แล้ว

    So SEQ is what you’ve send (not including the message of what you’re currently sending) and ACK is what you’ve received.

  • @alexandrugheorghe5610
    @alexandrugheorghe5610 4 ปีที่แล้ว

    Tip: TCP header doesn't include the size of the payload. Can you figure out how to calculate the size of data sent by TCP in Wireshark?
    N.B. It involves total length of the IP header and the total length of the TCP header versus the total length of the IP datagram.

  • @alonkadosh400
    @alonkadosh400 3 ปีที่แล้ว +1

    What a great explanation :) Thank you!

  • @23o8idlnqdolkqd
    @23o8idlnqdolkqd ปีที่แล้ว +1

    Thumbs up for nice explanation and for ponies!

  • @xrays3879
    @xrays3879 ปีที่แล้ว +1

    perfect explanation, bravo 👏👏👏

  • @AliTaj5610
    @AliTaj5610 6 ปีที่แล้ว +1

    Super clear explanation. Thanks a lot!

  • @chloekimball536
    @chloekimball536 5 ปีที่แล้ว

    EXCELLENT explanation. Thank you sir

  • @hodnet
    @hodnet 3 ปีที่แล้ว

    Great Explanation Bro! NICE JOB!!!

  • @colinjames8278
    @colinjames8278 7 ปีที่แล้ว +1

    Great video! I'm new to all this stuff and trying to wrap my head around it. At what point would windowing come into play? After the 3-way handshake when the Client sends its first GET packet with the 376 bytes?

    • @DerpyNetworking
      @DerpyNetworking  7 ปีที่แล้ว

      I would have to look that up. Basically, after the three-way handshake, the window gets bigger and bigger. That means the sender will send more before an ack is required.

    • @DerpyNetworking
      @DerpyNetworking  7 ปีที่แล้ว

      I've only scratched the surface of TCP. It's a beast on its own. XD

    • @colinjames8278
      @colinjames8278 7 ปีที่แล้ว

      Derpy Networking no doubt!! Appreciate the response and the videos

    • @DerpyNetworking
      @DerpyNetworking  7 ปีที่แล้ว

      I was just thinking about you @Colin James. As I was reading the Cisco Press Books, I stumbled across this. I hope it helps.
      “TCP uses a flow control mechanism called windowing. Each TCP receiver grants a window to the sender. The window, which is a number, defines the number of bytes the sender can send over the TCP connection before receiving a TCP acknowledgment for at least some of those bytes. More exactly, the windows size is the number of unacknowledged bytes that the sender can send before the sender must simply stop and wait.
      The TCP window mechanism gives the receiver control of the sender’s rate of sending data. Each new segment sent by the receiver back to the sender grants a new window, which can be smaller or larger than the previous windows. By raising and lowering the window, the receiver can make the sender wait more or wait less.
      By choice, when all is well, the receiver keeps increasing the granted window, doubling it every time the receiver acknowledges data. Eventually, the window grows to the point that the sender never has to stop sending: the sender keeps receiving TCP acknowledgments before sending all the data in the previous window. Each new acknowledgment (as listed in a TCP segment and TCP header) grants a new window to the sender” -CCNA Book ICND2

  • @SUMIT-sy7qs
    @SUMIT-sy7qs 8 ปีที่แล้ว

    Hi sir, I have a question because something is not clear to me:
    In the following exemple where you explained the termination process of the TCP connection with the TCP four-way termination (I wrote the question in square brackets) :
    client

    • @DerpyNetworking
      @DerpyNetworking  8 ปีที่แล้ว +2

      I wouldn't get too hung up on the ACKs here. If there isn't a previous segment with data or a previous segment with the FIN or SYN bit set, the SEQ or ACK numbers won't increase. You can see this throughout my video.
      The ACK tells the other side what it's next SEQ number should be. "The next expectant byte." The SEQs and ACKs are used to keep track of Data (Reliable delivery).

    • @SUMIT-sy7qs
      @SUMIT-sy7qs 8 ปีที่แล้ว +2

      Thank you very much for your explaination. Everything is 100% clear to me now.
      This videos is really helpful and very well explained.

  • @UKImperium
    @UKImperium 4 ปีที่แล้ว +1

    Thanks for this video. I don't generally watch videos when it comes to learning but I've been stuck learning this all day - numbers just confuse me. So everything I read up on makes sense now.

  • @abhishekjaisinghiitr
    @abhishekjaisinghiitr 8 ปีที่แล้ว +1

    neatly explained! Nice work :D

  • @scholli99
    @scholli99 5 ปีที่แล้ว

    Hallo Kollege, eine Frage: MUSS der Client nach dem er jedes mal daten vom server gekriegt hat, auch wieder ein Ack zurücksenden?

    • @DerpyNetworking
      @DerpyNetworking  5 ปีที่แล้ว

      The client and server only send an ack according to the window size.

    • @scholli99
      @scholli99 5 ปีที่แล้ว

      @@DerpyNetworking i have no Window size. I just got a mss of 1448 Byte

    • @DerpyNetworking
      @DerpyNetworking  5 ปีที่แล้ว

      @@scholli99 networklessons.com/cisco/ccnp-route/tcp-window-size-scaling

  • @vipulv07
    @vipulv07 8 ปีที่แล้ว

    Worth Watching.. Clarity in explanation!

  • @aakashrudraa
    @aakashrudraa 9 หลายเดือนก่อน +1

    REAALLY THANK YOU , SO MUCH

  • @pancakekim8049
    @pancakekim8049 11 หลายเดือนก่อน +1

    Love this explaination

  • @Andersknudsen1
    @Andersknudsen1 7 ปีที่แล้ว

    Flow chart link is wrong

    • @DerpyNetworking
      @DerpyNetworking  7 ปีที่แล้ว

      Thank you for pointing that out. Fixed! XD

  • @selimhalac9804
    @selimhalac9804 8 ปีที่แล้ว +1

    Great video, thank you!

  • @c.j.dylanxu153
    @c.j.dylanxu153 8 ปีที่แล้ว +1

    friendship is magic!!!!!!!!!!!!!!!!!!!!!!!!!!

  • @vadrif-draco
    @vadrif-draco 3 ปีที่แล้ว

    purr spec tiv!
    jokes aside, great video.

  • @prateeksingh812
    @prateeksingh812 6 ปีที่แล้ว +1

    SuperGeneral Legend 8)

  • @aftostok6080
    @aftostok6080 3 ปีที่แล้ว +1

    Still this is helpful, thank you

  • @mmaranta785
    @mmaranta785 3 ปีที่แล้ว

    Thanks for the great explanation

  • @danteeep
    @danteeep 4 ปีที่แล้ว +1

    great explanation thx !!!

  • @TerrexoDesign
    @TerrexoDesign 6 ปีที่แล้ว +1

    Thanks a lot !

  • @yukeyang5735
    @yukeyang5735 6 ปีที่แล้ว

    Very helpful, thank you!

  • @MuazRazaq
    @MuazRazaq 7 ปีที่แล้ว

    Great Explaination

  • @mubiale4060
    @mubiale4060 6 ปีที่แล้ว +1

    Great, very helpful

  • @喻如辰
    @喻如辰 3 ปีที่แล้ว +1

    Thanks a lot

  • @felipealvarez2750
    @felipealvarez2750 6 ปีที่แล้ว +1

    Thanks!

  • @hashD509
    @hashD509 3 ปีที่แล้ว

    thank you! nice tutorial

  • @mariajaramillo1540
    @mariajaramillo1540 6 ปีที่แล้ว +1

    Thank you!!!

    • @gerryvalenzuela9158
      @gerryvalenzuela9158 6 ปีที่แล้ว

      María Jaramillo Sojo is that you in that profile pic?

  • @mylifeassaifi1708
    @mylifeassaifi1708 8 ปีที่แล้ว +1

    Great video Thanks............

  • @asingh4090
    @asingh4090 3 ปีที่แล้ว +1

    best video

  • @saugatsharma8639
    @saugatsharma8639 4 ปีที่แล้ว +1

    good tutorial

  • @chandysherin
    @chandysherin 6 ปีที่แล้ว

    Excellent

  • @duqan9060
    @duqan9060 6 ปีที่แล้ว +1

    u like a furry person or something?

  • @AlejandroMejia-wy4vd
    @AlejandroMejia-wy4vd 8 ปีที่แล้ว +1

    excelent

  • @privacy312
    @privacy312 หลายเดือนก่อน

    great thanks you !

  • @RahulSam
    @RahulSam 7 ปีที่แล้ว +4

    Are you god?

  • @israeljo3616
    @israeljo3616 6 ปีที่แล้ว

    That's why i need..super simple

  • @saadmanahmed860
    @saadmanahmed860 5 ปีที่แล้ว

    sentinelling illustration. Ta muchly

  • @dmartino74
    @dmartino74 5 ปีที่แล้ว

    how to explain something simple in a bad way, congrats

    • @DerpyNetworking
      @DerpyNetworking  5 ปีที่แล้ว

      I'm sorry you feel that way. What do you think I could have done differently?

    • @mahdidelavaran1099
      @mahdidelavaran1099 2 ปีที่แล้ว +1

      @@DerpyNetworking its good dont listen to him , youre a good teacher

  • @achromatopsium903
    @achromatopsium903 6 ปีที่แล้ว

    lol

  • @mystiqkc
    @mystiqkc 3 ปีที่แล้ว +1

    Excellent video! Thanks!