Transcript for:
TCP/IP Stack and Networking Basics

in this video we'll be describing the role of the four layers of the tcp/ip stack describe the role of sockets in the tcp/ip stack and be familiar with the role of the media access control address we'll be covering a number of protocols in these videos but arguably the most important is the tcp/ip protocol now technically these are two protocols but they're so commonly put together that we just refer to them as tcp/ip and that's the transmission control protocol and the internet protocol as I stated this is one of the most important protocol stacks in use today any device running the tcp/ip protocol can communicate and transfer data across a network and out across the internet it's a set of networking protocols consisting of four distinct layers that all work together and for the exam you need to know what each of these four layers here do all incoming and outgoing data packets pass up and down through the various layers when you communicate on the network so we're going to go through these layers in a bit more detail but very abstractly first of all here we have a source computer that one sense of communication to this destination computer on the way out it travels down through the tcp/ip stack with the various rules of each layer being applied one at a time once it reaches the link layer or layer one it gets sent on to the first Rooter where it moves up to the network layer and down we'll explain why through any other routers that required and when it reaches the destination computer it travels back up for the protocol stack so we're going to take a detailed look now at the tcp/ip stack and the four layers you need to know about we're going to pass the following message down through the layers of the tcp/ip stack to see what happens to it at each stage before it gets sent out the network so this is the message computer system and Alice this is like child rearing you can do grievous damage but you cannot ensure success so imagine this message was being sent out on the network it first has to travel down for the tcp/ip stack the first layer has to go through is the application layer and as the name suggests this layer uses an appropriate protocol relating to whatever application is being used to transmit the data so in our example we're going to pretend this as a web browser so that protocol could be HTTP HTTP FTP and these are protocols we're going to cover later on so you can see there's your message and a header which in real terms will be additional ones and zeros added to this packet of data so we know what application it is that needs to processes at the other end we then pass this down to the transport layer the transport layer is the layer which is using the TCP part it's responsible for establishing an end-to-end connection once the connection is made it splits the data to be transmitted into packets now this message so short it probably wouldn't really be split into packets but we're just doing this as an example but typically a data transmission can be quite large and it will split it into a number of packets it adds to each packet the number of the packet packet 1 the total number of packets 1 of 3 and also the port number the packet should use so we can see these have all been split up now and this additional data is kind of wrapped think of it like a pasture parcel this extra information has been wrapped around the information which was already wrapped from the application layer around the original message why do we need to number the packets well this comes back to packet switching which we covered in the last section there's a good chance that these packets may arrive at the destination computer out of order and the sequencing numbers added by the transport layer allows the receiving computer to reassemble the packets in the correct sequence now we're done they get passed down to the net work layer now the network layer uses the IP part called the Internet layer it adds to each packet a source IP address and a destination IP address and we can see here that our data we got from the transport layer has been wrapped up again with some additional information and this information says the source IP and the destination IP all Reuters operate on this layer which is sometimes thought of as layer 4 in the bigger model and the route has used the IP address to know the destination the packets are going now it's also important in this section to understand in bus socket o an IP address so the destination IP address 47:22 2 2 4 5 366 here plus the port together makes a socket and once you have a socket then when you receive a packet you know what device the packet is going to that's the IP part and you also know what application on that device needs the packet and that's the port when you look a little bit more what ports in some subsequent videos in this section finally we pass down to the link layer sometimes called the physical layer or layer 1 it's the lowest layer of the model and this represents the actual physical connection between the various nodes now this is responsible for adding the MAC addresses and again it adds a source MAC address and a destination MAC address and again it will wraps this information around everything else these packets can now disappear off and let's just do a demonstration here so we've reached the bottom of this link layer and this packet would then disappear off and it would head towards the first Rooter the Rooter will strip off the outer packet and pass up the network layer these destination IP is still set to yeah but this Rooter at this point will now decide where's this packet needs to go well used to go to this Rooter so that ad is own MAC address and destination dress I wrapped the information back up and pass it on when it eventually arrives at the destination computer this packet moves up through the destinations computer tcp/ip stack and each layer is removed one at a time as it passed up until eventually the destination computer sees the original data now we've mentioned MAC address here and you've probably come across this before and it's important you understand what a MAC address is students often get confused between IP address and MAC address and that's because both of them are used and commonly referred to in networking and we often label up packets with a destination and a source IP address and MAC address so what's the difference well IP addresses are logical addresses and they're able to change and we look a lot more about i peeing what that is later in this section IP addresses operates at layer 3 MAC addresses are what's known as physical addresses they never change and as I've said here they're actually hard-coded during the manufacturing stage to every single network interface card and every device that you have that connects the network with the internet will have a network interface card although it necessarily looked like this if you get a route or a laptop you can probably turn it over and see a sticker that has its MAC address on and if you went to the command prompt in Windows and typed in ipconfig /all you could get the physical MAC address it's a series of 12 digit hexadecimal codes from a MAC address you can uniquely identify any device a printer a mobile phone and Rueter whatever it is wide or Wireless anywhere in the world and the MAC addresses operate on layer 2