About Transport Layer- layer 4 -Jun 21, 2021 YUMEMI Study Groupkkeeth @kuwahara_jsri @clown0082
View Slide
About me
const my_info = {Name: ‘܂ݪਔ’,Position: ‘Tech Lead of FET’,Skills: ‘PHP, Node.js, TS, Ruby’,PokemonGO: ‘TL 40’,}About me
🙇 Sorry1 … 🙇1. This slide is made in English.2. I’m really bad at infrastructureand networking.Plz feedback for me called“Masakari” about my talk !!
🙇 Sorry2 … 🙇NAT, NAPT, Window Controlwill be omitted due to lack of time.
📣 Precondition 📣Physical Layer -> Layer 1Data-Link Layer -> Layer 2Network Layer -> Layer 3Transport Layer -> Layer 4
The Role ofLayer 4
Layer 1:Transmission of information to the destination where thecable is connectedLayer 2:How data is exchanged within a segment→ a state in which signals can be exchangedLayer 3:How data is exchanged between segments(networks)→ IP address, RoutingPreviously
In other words,The role of actually transferringdata from computer to computer.
The difference betweenLayers 1-3 and 4-7 💁
Layer 4-7DifferencesLayer 1-3
Layer 4DifferencesLayer 1-3Data transfer(execution unit)
Layer 4DifferencesLayer 1-3Not interestedin theseɾData corruptionɾDestination doesnot existɾError occurs
Layer 1-3DifferencesAll I know is that the packetsreach the destinationLayer 4-7
Layer 1-3DifferencesLayer 4Perform necessaryprocessing for transferor received dataLayer 4-7
About the role of Layer 4 💁
The role of layer 4Flow ControlError Recovery(acknowledgement)IdentifyingApplications(with Port Number)Sequence Number
Error Recovery(Acknowledge)
AcknowledgementA Bdataacknowledgement
Error RecoveryA Bdata×dataacknowledgementre-send
Flow Control
Flow ControlA Bsend lots of datanow processing…
Flow ControlA Bsend lots of dataI can't keep upwith the processing,overflow💦
Flow ControlA Backnowledgementfree space: 2
Flow ControlA Backnowledgementfree space: 0×
Identity Applications(with Port Number)
Identifying ApplicationsA BdataNICWhat data is this ?🤔
Identifying ApplicationsA BdataNIC2000 3000 4000
Identifying ApplicationsA BdataNIC2000 3000 4000Communication between applicationsThis is called “end-to-end”
about “Sequence Number”later 💁
The role of layer 4Flow ControlError Recovery(acknowledgement)IdentifyingApplications(with Port Number)Segment(with Sequence Number)Reliable transmission 🤝To achieve this, we need …
Two Protocols for ControlTCP UDP
TCP
Connection, Segment
ConnectionThe road of data that is exchangedbetween applications is called a connection.The communication path created by TCPis called a virtual communication path.
What's the point?🤔
ConnectionTo communicate reliably and efficientlyTo exchange confirmations in advanceTo make sure that others will confirm
ConnectionTo communicate reliably and efficientlyTo exchange confirmations in advanceTo make sure that others will confirmThis is called“Establishing a connection”
A kind of “hello ὸ🤙" protocolwe often use 😆
TCP Header
TCP Header4PVSDFQPSUOVNCFS %FTUJOBUJPOQPSUOVNCFS 4FRVFODFOVNCFS "DLOPXMFEHFNFOUOVNCFS %BUBPffTFU 3FTFSWF $POUSPMCJUT XJOEPX $IFDLTVN &NFSHFODZQPJOUFS 0QUJPOT※ numbers are bits
TCP Header4PVSDFQPSUOVNCFS %FTUJOBUJPOQPSUOVNCFS 4FRVFODFOVNCFS "DLOPXMFEHFNFOUOVNCFS %BUBPffTFU 3FTFSWF $POUSPMCJUT XJOEPX $IFDLTVN &NFSHFODZQPJOUFS 0QUJPOT※ numbers are bitsWe can remember it as 20 octets 👍
Control bitsURGACKPSHRSTSYNFIN
3 Way Handshake
3 Way HandshakeA BSYNACKSYN + ACK
Connection closeA BFIN + ACKACKACKFIN + ACK
MSS
MSS, MTUMSS(Max Segment Size)MTU(Max Transmission Unit)EthernetHeader(14)IP Header(20)TCPHeader(20)Payload(TCP Segment)(0ʙ1460)FCS(4)※ numbers are octetsMSSMTU
Sequence Number
Sequence NumberMSS(Max Segment Size)MTU(Max Transmission Unit)EthernetHeader(14)IP Header(20)TCPHeader(20)Payload(TCP Segment)(0~1460)FCS(4)※ numbers are octetsMSSMTUIf the data is long,split it up and send it.
Sequence NumberMSS(Max Segment Size)MTU(Max Transmission Unit)EthernetHeader(14)IP Header(20)TCPHeader(20)Payload(TCP Segment)(0ʙ1460)FCS(4)※ numbers are octetsMSSMTUThe order of the data is important,so assign a number to it.This number is called Sequence Number.
3 Way HandshakeA BSYNACKSYN + ACKMSSdesicion
Well Known Port
Well Known PortA BdataNIC2000 3000 4000Numbers 1 to 1023 are calledwell known ports.* These numbers cannot beused.
Well Known Port number1PSU/VNCFS"QQMJDBUJPO '51EBUB '51DPOUSPM 5&-/&5 4.51 %/4 %)$1TFSWFS %)$1DMJFOU1PSU/VNCFS"QQMJDBUJPO 5'51 )551 101 4/.1SFRVFTU 4/.1USBQ )5514 3*1
UDP
TCPA BSYNACKSYN + ACK
UDPA B
broadcast(TCP)A NNN3 Way Handshake
broadcast(TCP)A NNNsegment for each destination,acknowledgement
broadcast(TCP)A NNNsegment for each destination,acknowledgementTCP can't send without knowing the destination,so it can't broadcast 😫
broadcast(UDP)A NNNJust send a single pieceof data 👍
broadcast(UDP)A NNNSince there is no confirmation,it is assumed that high-speed
broadcast(UDP)A NNNReal-Time communication, Video distribution,Broadcasting application, etc.
UDPA BReal-Time communication, Video distribution,Broadcasting application, etc.
UDP Header
UDP Header4PVSDFQPSUOVNCFS %FTUJOBUJPOQPSUOVNCFS -FOHUI $IFDLTVN ※ numbers are bits
There are many more, socheck them out 💁