so within our T c p I P suite,
we have two main protocols which we use and we call our communications protocols.
Now, our communications protocols work on our transport later layer, and they allow us to determine they allow their protocols which determine how our packets air formatted how their scent and essentially, how we're going to take this data,
break it up into chunks and then send it to where it needs to go and how that other end is going to take those packets
and then reassemble them.
So our transport layer is less about what's in the packets and more about how we're going to take those packets and send them from one place to another.
Think them think of them as our delivery, our delivery truck of choice. Our delivery truck doesn't really care. What's in those packets are delivery truck. Will we care what's in them as faras, whether we're choosing TCP or UDP. But our delivery truck is really what
decides how big our boxes convey be how many shipments we need to make. And if we're gonna have read receipts when we get to the other end, or if we have delivered delivery receipts. Want to get so the other end.
So we have two main communication protocols within our TCP within our t c p i P suite. We have two main communication protocols when it comes to networking in computers,
and this is TCP versus UDP.
our communications protocols again, they work at our transport layer. This is our layer four of our OS I model. And what's the difference between our TCP and our UDP? Well, TCP stands for a transmission control protocol, and TCP is a connection oriented protocol.
So transmission control protocol and it's a connection oriented
protocol, and that's probably one of the biggest. The biggest, most important factors of TCP is that T. C. P is going to make sure that the packets we send get there
and they get there in the right order. And if they don't and if or if they get corrupted along the way will rescind those packets.
So if you think about the TCP I p sweet if you think about communicating over the Internet, one of our protocols is http loading Web pages.
Now when we're loading a web page, we want to make sure that we're getting all the aspects of that Web page were made. We're going to make sure that we're getting all of the data to our computer properly, and then it's loading correctly. That would be TCP because TCP is going to say
the Web server is going to say, Hey, did you get this packet? Okay, cool. I'm gonna send you the next one
and here's the next one and here's the next one and here's the way you put all those packets and order. And if any of them are corrupted, let me know, and I'll rescind them and things of that nature.
So T. C. P is a connection oriented protocol, which means it gives us delivery confirmation. It talks back, and it communicates with the receiving party to make sure that it got it
before it sends the next packet.
Now TCP allows us to have larger packet sizes,
and this is because it has a larger header. It's larger packet sizes and we also have a larger header, 20 bite header. The reason we have such a large header is because we need a lot more information in that header that is essentially saying okay,
this is packet number such and such of how many packets I have to deliver to you.
And I need you to send me back and make sure that this gets there. So our header is going to contain a lot more information
now. Ah, header on a packet is a part of a packet of data that includes information not necessarily part of that packet, but more information such as dressing information where this packet is going to information such as transmission control, control, protocol, information such a CZ
which order this packet is if you need to re transmit the packet
So our headers are additional information that we tack on. Two are the beginning of our packet To help identify that packet, the rest of our entire packet could be encrypted. But that header we would still be ableto our routers would still be able to read so we could move that packet along through the Internet
if we encrypt our entire packet.
And then it hit a router that couldn't read that encryption, it wouldn't know what to do with it. It would just see it as a corrupted packet or an encrypted packet but it wouldn't be able to read it.
So we need a header on those packets.
But because we have such a large header, we have a large packet size with TCP transmissions.
So our TCP packets are numbered.
All of our TCP packets haven't ordered to them,
so they have to have a number. Because if the other end doesn't receive a certain packet, it'll say, OK, I have packets. 123
Wait, You just sent me packing. Five. I didn't get packet for I need you to re transmit that packet.
So that's why they're numbered.
They also have re transmission, which means if the other in doesn't get a packet, it can request to re transmission and get a re transmission. Or if the other end does not confirm that it got a packet, then descending in will say, Hey, you didn't confirm you got this packet. I'm gonna send it again.
TCP is also a want one connection because it is connection oriented and we need to be converse ing back and forth between are receiving party if they received a packet and if they got it in the right order and if it was corrupted or any anything like that. There needs to be a 1 to 1 connection.
We aren't gonna be using TCP to broadcast out packets.
We're gonna be using TCP on a 1 to 1 connection basis between us and another in point.
Now, when we initiate a TCP connection, TCP also initiate something called a three way handshake are three way handshake is what What gets this party started before we actually sending the packets without TCP protocol, we have our three way handshake occur.
on one side of the equation, we have our
And then on the other end of the equation, we have our server. We have our web server or
it could be a server and a client. It could be a client and another in point. It could be a servant, a server. It doesn't have to be a computer and a server. It just needs to be two in points.
You have an initiating side
The initiating side is going to be whichever computer decides to start the connection, that's gonna be the initiator.
The initiator is first going the first part of our three way handshake
is that the initiator is going to send a S y in
message a synchronized message also commonly referred to as a sin message.
This s Ryan message is our initiating party saying Hey,
I need to synchronize with you and make sure that we can talk before I just start randomly sending you data.
If our receiving party receives this properly and accepts that and decides it wants to yes, initiate this connection,
then it will send back to the initiating party
a synchronized acknowledge.
So this receiving party has said OK, I acknowledge that I have received your first synchronization packet.
So a sin ac, synchronize, acknowledge.
And then our last transmission, our last part of our three way handshake is our final act.
That final act is an acknowledge from the initiating party back to the receiving party, saying Okay, cool. I was able to hear you telling me back that you were able to talk to me.
Well, why do we do a three way communication? Why don't we just do a sin and then a Cenac?
We need to make sure that the communication is clear both ways.
If we just send one way, If we put a sin.
Two are receiving party
and then we just had a sin act from Are receiving party?
What if there's some sort of firewall block there?
What if there's some sort of miss configuration that is blocking that sin AC?
If our receiving party just assumes that that sin AC went through, then if there was some sort of block there, it would be much harder to configure the way for those two parties to figure out what's going on.
This receiving party would think that everything was fine. The initiating party would be the one that didn't know what was going on.
So that's why we have this final acknowledge because this final acknowledge tells the receding party. Okay, I got your response back that said, You're good to go. So receiving party are sending Party says Hey, are you ready to talk? Receiving? Party says, Yeah, I can hear you. Can you hear me?
And then our initiating party says, Yeah, we can both hear each other. We're good to talk.
So then, after we initiate that three way handshake after we verify that we have that connective ity between our two points, then we'll begin initiating our TCP communication.
a TCP again is connection oriented. So we have to verify a connection. We have to maintain a connection in order for those packets to be delivered.
Our final point for our TCP protocol is that we can push data as a stream,
which means that once we
identify our packet size for a TCP connection,
we can take our data and just cut it up at the max packet size. We don't care if the point that we're cutting it at makes logical sense or not.
Um, so we're sending or loading a Web page, and we're sending all the data that they need to load that Web page, and we have to break it up and say, Hypothetically, that is, we have 1000 bites that we need to transmit,
and we're giving you a maximum of 100 byte packet size. Well, 20 of those bites need to be the header. Then we have 80 bites information, and then we take 80 bites and we cut it.
So we have 100 bytes of full information, and then we send that packet. We don't We aren't sending any packets that are only halfway full because we don't care where we cut it. We could cut our com. We could cut the ***. We could cut the packet in the middle of a sentence or a middle of
a logical stream of information
because it doesn't matter. Those packets are numbered. And if there's any corruption, they could be retransmitted. So we're just saying we're just taking all of the bricks that we have that we need to have delivered. We're filling up the box all the way and we're saying this is number. This is box number one that you need to open
and pushing it and then saying this is box number two that you need to open and then pushing it.
And if they don't receive box number two a box number three, then they could just ask us for that correct box back. We'll send them the box and because they're numbered and in order, they just open it up and say, OK, this is my information. Wait, it looks like it got it. Looks like they filled up the bite. They filled up the packet
and they stopped here. My next box should pick up right where it left off.
So that's why we're able to just send that data as a stream with T C p.
TCP wrap up. Biggest thing. Remember, TCP is connection or a connection oriented communication protocol when we're talking back and forth this connection oriented.