Upgrade to Pro — share decks privately, control downloads, hide ads and more …

About Transport Layer -layer 4-

About Transport Layer -layer 4-

3135a28c51dfa27396bb525e9972db95?s=128

kkeeth

June 21, 2021
Tweet

Transcript

  1. About Transport Layer - layer 4 - Jun 21, 2021

    YUMEMI Study Group kkeeth @kuwahara_jsri @clown0082
  2. About me

  3. const my_info = { Name: ‘܂ݪ੟ਔ’, Position: ‘Tech Lead of

    FET’, Skills: ‘PHP, Node.js, TS, Ruby’, PokemonGO: ‘TL 40’, } About me
  4. 🙇 Sorry1 … 🙇 1. This slide is made in

    English. 2. I’m really bad at infrastructure and networking. Plz feedback for me called “Masakari” about my talk !!
  5. 🙇 Sorry2 … 🙇 NAT, NAPT, Window Control will be

    omitted due to lack of time.
  6. 📣 Precondition 📣 Physical Layer -> Layer 1 Data-Link Layer

    -> Layer 2 Network Layer -> Layer 3 Transport Layer -> Layer 4
  7. The Role of Layer 4

  8. Layer 1: Transmission of information to the destination where the

    cable is connected Layer 2: How data is exchanged within a segment → a state in which signals can be exchanged Layer 3: How data is exchanged between segments(networks) → IP address, Routing Previously
  9. In other words, The role of actually transferring data from

    computer to computer.
  10. The difference between Layers 1-3 and 4-7 💁

  11. Layer 4-7 Differences Layer 1-3

  12. Layer 4 Differences Layer 1-3 Data transfer (execution unit)

  13. Layer 4 Differences Layer 1-3 Not interested in these ɾData

    corruption ɾDestination does not exist ɾError occurs
  14. Layer 1-3 Differences All I know is that the packets

    reach the destination Layer 4-7
  15. Layer 1-3 Differences Layer 4 Perform necessary processing for transfer

    or received data Layer 4-7
  16. About the role of Layer 4 💁

  17. The role of layer 4 Flow Control Error Recovery (acknowledgement)

    Identifying Applications (with Port Number) Sequence Number
  18. Error Recovery (Acknowledge)

  19. Acknowledgement A B data acknowledgement

  20. Error Recovery A B data × data acknowledgement re-send

  21. Flow Control

  22. Flow Control A B send lots of data now processing…

  23. Flow Control A B send lots of data I can't

    keep up with the processing, over fl ow💦
  24. Flow Control A B acknowledgement free space: 2

  25. Flow Control A B acknowledgement free space: 0 ×

  26. Identity Applications (with Port Number)

  27. Identifying Applications A B data NIC What data is this

    ?🤔
  28. Identifying Applications A B data NIC 2000 3000 4000

  29. Identifying Applications A B data NIC 2000 3000 4000 Communication

    between applications This is called “end-to-end”
  30. about “Sequence Number” later 💁

  31. The role of layer 4 Flow Control Error Recovery (acknowledgement)

    Identifying Applications (with Port Number) Segment (with Sequence Number) Reliable transmission 🤝 To achieve this, we need …
  32. Two Protocols for Control TCP UDP

  33. TCP

  34. Connection, Segment

  35. Connection The road of data that is exchanged between applications

    is called a connection. The communication path created by TCP is called a virtual communication path.
  36. What's the point?🤔

  37. Connection To communicate reliably and ef fi ciently To exchange

    con fi rmations in advance To make sure that others will con fi rm
  38. Connection To communicate reliably and ef fi ciently To exchange

    con fi rmations in advance To make sure that others will con fi rm This is called “Establishing a connection”
  39. A kind of “hello ὸ🤙" protocol we often use 😆

  40. TCP Header

  41. TCP Header 4PVSDFQPSUOVNCFS  %FTUJOBUJPOQPSUOVNCFS  4FRVFODFOVNCFS  "DLOPXMFEHFNFOUOVNCFS 

    %BUBP ff TFU  3FTFSWF  $POUSPMCJUT  XJOEPX  $IFDLTVN  &NFSHFODZQPJOUFS  0QUJPOT ※ numbers are bits
  42. TCP Header 4PVSDFQPSUOVNCFS  %FTUJOBUJPOQPSUOVNCFS  4FRVFODFOVNCFS  "DLOPXMFEHFNFOUOVNCFS 

    %BUBP ff TFU  3FTFSWF  $POUSPMCJUT  XJOEPX  $IFDLTVN  &NFSHFODZQPJOUFS  0QUJPOT ※ numbers are bits We can remember it as 20 octets 👍
  43. TCP Header 4PVSDFQPSUOVNCFS  %FTUJOBUJPOQPSUOVNCFS  4FRVFODFOVNCFS  "DLOPXMFEHFNFOUOVNCFS 

    %BUBP ff TFU  3FTFSWF  $POUSPMCJUT  XJOEPX  $IFDLTVN  &NFSHFODZQPJOUFS  0QUJPOT ※ numbers are bits
  44. Control bits U R G A C K P S

    H R S T S Y N F I N
  45. 3 Way Handshake

  46. 3 Way Handshake A B SYN ACK SYN + ACK

  47. A kind of “hello ὸ🤙" protocol we often use 😆

  48. Connection close A B FIN + ACK ACK ACK FIN

    + ACK
  49. MSS

  50. MSS, MTU MSS(Max Segment Size) MTU(Max Transmission Unit) Ethernet Header

    (14) IP Header (20) TCP Header (20) Payload (TCP Segment) (0ʙ1460) F C S (4) ※ numbers are octets MSS MTU
  51. Sequence Number

  52. Sequence Number MSS(Max Segment Size) MTU(Max Transmission Unit) Ethernet Header

    (14) IP Header (20) TCP Header (20) Payload (TCP Segment) (0~1460) F C S (4) ※ numbers are octets MSS MTU If the data is long, split it up and send it.
  53. Sequence Number MSS(Max Segment Size) MTU(Max Transmission Unit) Ethernet Header

    (14) IP Header (20) TCP Header (20) Payload (TCP Segment) (0ʙ1460) F C S (4) ※ numbers are octets MSS MTU The order of the data is important, so assign a number to it. This number is called Sequence Number.
  54. 3 Way Handshake A B SYN ACK SYN + ACK

    MSS desicion
  55. Well Known Port

  56. Well Known Port A B data NIC 2000 3000 4000

    Numbers 1 to 1023 are called well known ports. * These numbers cannot be used.
  57. Well Known Port number 1PSU /VNCFS "QQMJDBUJPO  '51EBUB 

    '51DPOUSPM  5&-/&5  4.51  %/4  %)$1TFSWFS  %)$1DMJFOU 1PSU /VNCFS "QQMJDBUJPO  5'51  )551  101  4/.1SFRVFTU  4/.1USBQ  )5514  3*1
  58. UDP

  59. TCP A B SYN ACK SYN + ACK

  60. UDP A B

  61. broadcast(TCP) A N N N 3 Way Handshake

  62. broadcast(TCP) A N N N segment for each destination, acknowledgement

  63. broadcast(TCP) A N N N segment for each destination, acknowledgement

    TCP can't send without knowing the destination, so it can't broadcast 😫
  64. broadcast(UDP) A N N N Just send a single piece

    of data 👍
  65. broadcast(UDP) A N N N Since there is no con

    fi rmation, it is assumed that high-speed
  66. broadcast(UDP) A N N N Real-Time communication, Video distribution, Broadcasting

    application, etc.
  67. UDP A B Real-Time communication, Video distribution, Broadcasting application, etc.

  68. UDP Header

  69. UDP Header 4PVSDFQPSUOVNCFS  %FTUJOBUJPOQPSUOVNCFS  -FOHUI  $IFDLTVN 

    ※ numbers are bits
  70. There are many more, so check them out 💁

  71. None