Hi guys, welcome back to the CS classroom. What I'm going to do today is I'm going to cover topic three of the IB computer science curriculum which focuses on networks. This video is meant to help you either learn the topic if you slept during that portion of class or to review for your exam if you haven't seen this material in a while. Let's get started. So the first thing that you need to know is that the idea of networks is kind of built on a server and client. A server is a central piece of hardware or a system. So for example, if you are in an airport, for example, and you're at a kiosk and you're trying to check into an airplane, you're using a client. And that client is sending information to a central computer in the network that's part of the airline that is a server. So right here, a client. It's something that requests a service or connects to a server on the same network. So it's a bit like a node or it's something that's serving a central system. And a server is that centralized system where all the data is held and where all the instructions come from or go to. So probably just another good analogy would be like if you're in a restaurant, right? And or let's say you're in a bar, for example. You've got your clients who are sitting around the bar ordering drinks. You've got the bartender who's the server. They're sort of that centralized person who is handling your requests. And that sort of server client concept is at the center of the networks. Now I'm going to post these slides in the description. I'll link to these slides in the description. And besides my explanations, there's also helpful videos that you can watch from other sources on YouTube in order to give you a better idea from a different perspective of how these concepts work. Now, a computer network is taking this client-server paradigm and taking it into the digital world. So we're talking about a computer network, we're basically talking about multiple computers that are connected to each other, and they can send and receive data from each other. This may be through a centralized system, as in our previous example, or it might be peer-to-peer, so just to each other. But the point is, a computer network is multiple computers that are hooked up and connected to each other. Now, there are a couple of different ways to connect computer systems. There are a hub, a switch, and a router. Now a hub is when a network device wants to send data to all devices on the network. So, for example, if you have computers connected to a hub and one wants to send data to one computer wants to send data to another, has no choice but to send that same piece of data to every computer on the network. Not very efficient. The next we've got is a switch, which allows us to send data from one individual computer to another. So if you've got six computers in a network, you can send data from, let's say, computer A to computer B. much more efficient. Then we've got a router. And what a router does allows us to connect up multiple networks to each other to kind of stitch multiple networks of computers to each other and create larger networks. A good example is a home network and the internet. So the internet itself is a very large network, but you can connect it to your own home like Wi-Fi network and access the internet through the use of a router which is serving as sort of an intermediary between those two things, allowing them to talk to each other. Now, the Internet. Like I said, the Internet is really just a really large network. It uses something called the TCP IP protocol to transmit data. That means data all has to fit into a specific format and travel in a certain way as specified by the TCP IP rules. There's no centralized governing body. There are some organizations that help the Internet run, but there's a centralized body. Now, there's an important distinction between the World Wide Web and the Internet. The Internet is physical infrastructure. That means wires. That means mobile networks, radio waves that allow all the computers and the Internet to communicate with each other. The actual websites, the Google.com, the Facebook.com, your blog, all of those web pages make up the World Wide Web. So the World Wide Web is the information and the Internet is the physical infrastructure. Now, ISPs run networks that provide internet access. So an ISP allows you to connect into it, and that ISP in turn gives you access to internet exchanges. These internet exchanges glue different ISPs together. So the ISP is actually really just a really large network, and all those really large networks which are ISPs are glued together by internet exchanges. And collectively, These form the Internet. So these Internet exchanges are usually run by academic institutions or nonprofits. They're really fundamental to how the Internet works because they hook up your Comcast and your CenturyLink and all that together. And without them, the Internet as a whole, as a global network, couldn't really exist. Now, the Internet works by transmitting data in the form of packets. So let's say you're sending a picture from this computer to this computer in Zimbabwe to this computer in the United States. That picture is probably going to get broken up into like 100 different packets and transmitted through the Internet. Those packets may take different routes through these different exchanges and different routers, different ISPs, until it gets to your destination. They may travel separately, but ultimately they will all arrive at the same destination and be put together to show you that picture. Now, this method of transmitting information is called packet switching. So a packet is, again, a unit of information. Multiple packets will make up whatever data you're being sent, whatever data you're sending, I mean. Your data will be divided into multiple packets. They'll follow different routes, and we'll get to the same destination as we showed below. Now, these little boxes here are actually routers, and they help those packets that are traveling get to their ultimate destination in the most efficient and quick way possible. In short, they're sort of like relays on the internet that help packets get from one destination to another. So, that's the way it works. Now, this is roughly what a data packet looks like. There's a payload, which is binary. That's your photo, or that's your text file, or your movie, or your text message, or whatever you want to send. You have a header, which contains the sender and the destination. Then you're also going to have a footer, which we'll look at later on, or a trailer rather. Now again, maybe you're sending a document from here to here. It's going to pass through a series of routers. So actually this piece of data is going to be in one server and it's going to get sent to another server. These might actually just be computers, servers after all are just computers, but they're getting passed through a variety of routers. They're getting broken up and passed through a number of routers until they get to your destination. Now again, just to review, a router is used to manage traffic, control the flow of data packets, and then send them to the right destination. There's also an element of security involved with routers, making sure that those data packets aren't being sniffed out or aren't being intercepted by another person. Some videos you can watch. Now, one of the big concepts that's covered is the different types of networks. So basically, a network is a collection of computers, but these can have different configurations for different purposes. The most common network is known as the local area network. Now, this is something like what you'd have in your house. So right here, you've got this typical wireless home router. It's basically just connecting different devices together and also serving as interface between your network and the internet. Generally, a local area network covers a single building with a radius of one kilometer or less. So that could be your house, that could be a school, etc. The next type of network is a wide area network, which is basically the same thing as a local area network with the exception that it covers a much greater radius. So it might be several local area networks stitched together using routers. It could be different buildings connected through a network provider that have access to the same network. Now some examples of a wide area network are the internet, which covers the globe. A cellular network, which covers a huge area. It could be a whole town, or I guess a village really. or an ATM network, which is just a network of multiple ATMs connected to a central banking computer over an area of a city. So same thing as a local area network, could be multiple local area networks stitched together, but really fundamentally, a wide area network is the same thing with a larger radius. So again, differences between local area network and wide area network. Geography is the biggest one. Local area networks will generally have a higher data transfer rate because they cover a shorter distance. And so the signal isn't going to be, I guess, deleted is the way to say it. The setup costs are, like, so wider networks are generally going to be more expensive. Just because of the amount of wire that you have to use and the amount of infrastructure you need to connect networks over a wider area. And again, partly because you have multiple devices, you have multiple routers and you have multiple devices that are facilitating this connection, you tend to have more technical problems with WANs than LANs. So really like the differences again, just come down to a function of distance. Now our next local network is a bit confusing. It is a virtual local area network. Basically what it is, is this is going to be one or more physical local area networks. You've got a local area network or maybe even a wide area network. But when you look at this local area network, this physical network, let's say you have two physical local area networks that are connected together. Instead, because of the way the network has been set up, it looks like it's five different networks. So virtual local area network is a network, it's an artificial network that is created by using network switches, or maybe even using software configuration. Basically what it does is it mimics an actual physical local area network. So basically allows you to have in terms of like when you look at a computer from a software perspective, allows you to have more networks than you physically have. And this is just so you could group different computers into these made-up networks, into these virtual networks, and give them different access, different security requirements to connect. Just give them different settings, give them different configurations. So in conclusion, a virtual local area network is basically a made-up, a virtual network that exists in order to divide groups of computers on physical networks. based on security configuration or just whatever specific characteristics apply to those groups of computers. So again, right here we have three different physical local area networks. They're connected by a switch, but each color indicates a different virtual network, right? So right here we have one that's connected to LAN A, LAN B, and LAN C. And that determination is made by configuration by software rather than their physical architecture. So some of the similarities, they're obviously used to connect devices and share resources, but with virtual local area networks, they're more flexible because let's say you want to connect one, take one computer and switch it from one network to another. With virtual local area networks, you might just have to change a software configuration or do something in software. Maybe even just move a cord around on a switchboard. versus with a local area network, you might actually have to just move that computer somewhere else and connect to a different router. They're also safer because you can implement different security settings for each virtual local area network, in an easier and more efficient way than with a physical LAN. But they can be more complex to set up because again, as we saw right here, you generally need to hook up virtual local area networks into separate areas on a switchboard. or you'll need to do some custom software configuration to make this work. But generally, they're good for larger organizations because that means they don't need to have multiple local area networks. Instead, they can have a fewer number of physical local area networks and just make up more virtual networks. So the next type of network we're going to cover is going to be a storage area network. Now what this is, is purely a network of storage devices. You've probably seen this if you've logged into your school network. They appear as shared drives, but they consist of multiple storage devices all hooked up together. And basically you might have a storage area network and from that storage area network you connect directly to any computers that want to access it. You wouldn't even go through like a LAN or a Wi-Fi network. In fact, they're not accessible to your standard LAN. So you wouldn't be able to connect to a storage area network just by connecting to your Wi-Fi network. They may store emails, application data, database data, or just files. And generally they'll have backup servers and backup battery. So if there's an earthquake or something that network can still stay online and it can at least conserve its data. They tend to have better performance for this reason and also given the fact that all of the servers are dedicated to just storing data rather than doing other things like accepting website requests or whatever you do with the server. The point of a storage area network is it is an efficient and fault-tolerant way to access multiple storage devices. This is kind of how it would work. You'd have multiple storage devices connected to a router or a switchboard, and computers would directly have to access that storage area network. Okay, so this is probably the type of network that you guys are most familiar with. Now, this is basically a LAN, but the devices are connected to the router using radio waves, wireless, Wi-Fi. Wi-Fi just describes a type of radio wave. Through Wi-Fi, you can make requests to the router, your Wi-Fi router, which in turn makes requests to the internet. So that's how you get data back and forth off the internet through your router. It's basically a LAN, a local area network, but just Wi-Fi. Now, Now, one of the big advantages is that you don't really need to license the radio spectrum. You can just use it anywhere. You don't need to register your Wi-Fi router the same way you would a radio station. There's no cable, so you can move around. There's global standards, so with your computer, you can connect to a Wi-Fi network anywhere, and it doesn't take much to set up a Wi-Fi network. The disadvantages are interference. If you put a refrigerator right in front of your Wi-Fi router, you're probably not going to get a very good connection. Limited range, you can't use a Wi-Fi network outside of like, I don't know, probably like a 20 meter distant radius. Security, if you're like in your house, someone could like drive up to your house and hack into your wireless network, which they can't do with a wired connection because they'd have to like physically access your house and break in. Health concerns, which like, there's a lot of research on this. I don't know how true this is, but some people have health concerns with regards to wireless. Now, the next step of network is a personal area network called a PAN. So this connects devices in a user's immediate area. It's basically like a LAN, except it has a much smaller radius. Some examples include Wi-Fi hotspots and just Bluetooth devices. So when you set up your, you know, when you allow your phone or your AirPods to connect to your laptop, then that is technically a personal area network because you're connecting from one device to another, one computer to another, really one computer to another, using Bluetooth rather than Wi-Fi. Still a PAN. Now here we've got the intranet and the extranet. So an intranet is like a private internet. So you can't access it on the World Wide Web, but you can access it if you're connected to the network that is hosting that intranet. It's like a private internet. It uses TCP IP, and there are web pages, but it may only exist in a company. So you might just go into your office building, connect to the Wi-Fi network for your company, not one that's internet enabled. and then go to a specific address on the internet to see a discussion board just for those in your company so it's hidden from the internet it's a private internet a great example is North Korea they have their own internet like they have this internet system but the internet only consists are there their intranet rather the North Korean internet only consists of servers and websites that exist on a network that is just like and closed in North Korea. So people accessing the North Korean internet cannot access the World Wide Web. They can't access Google, Facebook. They can only access other servers and by extension other web pages on this like isolated closed off network. An internet system can become an extranet if it can be accessed through an online portal. So you might have an internet system like just that you can only use when you're in your office, when you connect to a specific network in your office, but there might be like a login page on your company website by which you can access pages that exist on the intranet. Then it becomes an extranet. So in conclusion, Internet is a private Internet that is closed off from the World Wide Web. It only consists of web pages that are hosted on servers in a specific private network that again is closed off from the Internet. These aren't really that common anymore, but again, it exists in North Korea. It's still a concept, right? So let's move on to a VPN or virtual private network, which is actually just a more common way of securely accessing servers information. Now you've probably used a VPN client like NordVPN or there's a lot of free VPNs out there. If you download a VPN on your phone, you're just getting a client that's accessing a VPN server. that is hosted by the given company that owns the client you download. So for example, if you downloaded the NordVPN app, you're using that, you are accessing the internet via a NordVPN server. So basically what happens is if you look at... We'll look at a diagram here. You as a user, you download that app, your VPN client. You're sending information through a encrypted tunnel to a VPN server. So let's say you want to go to google.com. You are sending a request to google.com to the VPN server. That request is heavily encrypted. And that VPN server is then sending a request to google.com. Google.com is sending a response to the web page to the VPN server. And the VPN server is returning that to you through this heavily encrypted tunnel that exists between you and the VPN server. So really, you are sending requests to the internet. So you're asking for stuff from the internet and getting information back through a VPN server. And when you make those requests or when you send information online, like maybe you want to buy something. So you send your credit card number to Amazon. That credit card number is going through, is heavily encrypted. It's being sent to the VPN server. That VPN server is sending that credit card number to Amazon.com. Amazon.com accepts it, says, yay, you bought it, and sends a web page saying that, okay, congratulations, you bought that to the VPN server, which then passes it to you. The VPN server acts as an intermediary. That means that when amazon.com gets your credit card number, it doesn't really know where your computer is. It doesn't know what your IP address is. And knows what your name is because you would have sent the information. But all it sees is this VPN server. This is acting as like sort of a barrier between the user and between any website on the internet that you're accessing. So it doesn't see the user, it just sees the VPN server. Again, like when you access Netflix, when you want to access Netflix using a VPN, for example, Netflix will not see you as a user. It's just going to see the request coming from a server. So from a VPN server. So that's why, for example, if you're in Colombia, you can access the VPN server that's based in the US and then Netflix thinks that you're in the US. even though it has your user login information. It sees an IP address that's based in the US. So going back, so that process of creating and maintaining an encrypted connection between a server and the client is called tunneling. So right here, we have a tunnel right here. So we have a heavily encrypted connection between the user and the VPN server, and that encryption, that process of encrypting and passing data through, passing encrypted data, is called tunneling. The encryption is done using technologies like SSL, TLS, or IPSec, which are all very secure technologies. Some of the advantages of VPN include authentication, so no one can see what you're sending. Basically authentication means you have control over what information you sent and what encryption is used. You have to log in to an app to be able to start using a VPN and to send information. Encryption which means that no one can see what it is that you've sent. Tunneling which means data is heavily secured. Again, that kind of relates to encryption, but it's considered an advantage. Data is heavily secured between you and the VPN, and multiple exit nodes, which basically means anonymity. When you're on the internet, no website can really see exactly who you are or where you're coming from unless you explicitly give them a username or some identifying information. The next network is called a peer-to-peer network. If you like, peer-to-peer networks are still used. I mean, they're used for things like torrenting. I would say they probably had their heyday. Well, actually, you know, I guess technically cryptocurrency would be. Cryptocurrency would technically be considered a peer-to-peer network as well. It's kind of getting into a different level of complexity, but the point of a peer-to-peer network is that two computers are sharing resources with each other, not through some centralized server. So for example, if you are sharing information on your school network, for example, the information you send is going to go through some centralized server in the center. So if you're sending it from this computer to this computer, normally in a regular client server network, a usual network, It would get sent to some central point and then from there it gets sent to the other computer. So everything is getting passed through some centralized point. But in a peer-to-peer network, you can send things directly to other computers, not through a centralized point. So here in this peer-to-peer network, you have a connection with every other computer in the network. And there's no centralized computer that all of your requests or all of your responses are going through. Each computer acts both as a client and a server, no centralization. Probably a great example of a peer-to-peer network in real life would be probably speed dating as opposed to a dating website. So when you get on a dating website, you are putting information into a centralized repository, which is a website. And then people can look at that, like they can look on the website and they can find you and they can send you a message through that website only, right? So any communication you have with whoever it is you want to date goes to their website. Versus if you use something like speed dating, you are not going through anything else, like you're just meeting individual people one at a time. So there's no intermediary, there's no central system that your messages, your communication is going through, but you are just talking to those people on an individual basis. So it's just peer-to-peer, it's not through a centralized system. So this is the normal client-server model. Again, think about our airport example where you have multiple check-in kiosks. That information is going to a centralized computer and returning a response. Versus in the peer-to-peer model, everyone is communicating with everyone else. There's no centralized server system. It's basically a free-for-all. Now, earlier we talked about protocols. So protocols kind of are the rules for data transmission in a given network. So this comic actually does a great job of explaining networks. But basically in the internet, for example, the protocol we use is TCP IP. This means that data needs to be in a certain way and is transmitted in a certain way on the internet. So these are the rules that dictate that transmission. HTTPS is used for transmitting data between a web browser and a server. And SFTP is used for transferring data, transferring files specifically from a client to a server. So those are all examples of protocols that are used. Now, protocols have a few basic functions or roles. They are to maintain data integrity, to make sure the same data that is sent is received. So for example, if you send some data to Amazon, like maybe your credit card number, your name, your address, that data that you sent is the same that is received by Amazon. Flow control to make sure the data is sent and received at the same rate. So when you're sending data between two computers, like maybe even between you and Facebook, like Facebook servers, or Facebook's computers can receive data at a much faster rate than you can send it. But flow control makes sure that the data that you send is received at the same rate on the other end. So and Or I guess in another case, if you're sending data, if your computer can send data at a much faster rate than another computer can receive it on the network, it'll force your computer to send it at a slower rate or it'll transmit that data at a slower rate. The next is to prevent deadlock. Maybe you're receiving messages or you're receiving data from two different computers, from the Internet, from another computer on your network, it could be from anywhere. Deadlock makes sure that data doesn't collide with each other, that two packets don't block each other, that they can travel, maybe one packet moves to your computer, or is received by your computer, and then the other packet goes. And finally, they have to make sure that there's no errors and the data is being transmitted. So they make sure that similar to maintaining data integrity, they make sure that the data that is sent is the same data that is received and no errors are introduced in transit. Now, while transmitting data, like just in data transmission, generally transmitting data over the internet, there are seven layers to that transmission. So there are basically seven layers of processes that have to happen in order for data to be transmitted from one computer to another over a network. And we have application, presentation, session, transport, network, data link, and physical. Now, you can kind of see what role each of these plays, like physical is the actual wires or wireless connection, and application is like the website that you're seeing, like HTTP, right? Now, I'm not going to go too much into this just because you don't need to know what these layers do for the IB exam. You just need to know the names of three of them. So pick any three and just memorize them, like physical, data link, network, application, presentation, session. This can get really complex, but like I said, for the IB exam, just know three. Now, the next topic we're going to cover is transmission media. By transmission media, we're talking about physically what transmits our data packets. So we're talking about that physical layer down here. So wireless, Ethernet, fiber optic. There are broadly two types of transmission media, that's wired and wireless. Now in terms of wire, we usually use Ethernet, which is also called an untwisted pair or a twist pair. And that's the one with the square sort of input that you're probably used to using. We have copper, which is... Actually, that's also probably going to fall under copper because that involves copper wires. But it could also mean a coaxial cable, which is what you use to plug in your TV to cable. And then fiber optic. Fiber optic nowadays is used for long range, like heavy duty network connections. So for example, if an internet company wants to transmit data to your neighborhood, they're going to have a fiber optic connection or like a line of fiber optic that goes directly from their nearest data interchange or from their nearest facility to a junction box in your neighborhood. And from there, you're going to hook into your internet connection. In terms of wireless, we have radio waves, microwave, and wireless. These could be different, but generally, we don't really use microwaves commonly. You and I are probably never going to use that. Really just talking about wireless or Wi-Fi. Now with transmission media, there are four factors to consider, security, reliability, cost, and speed. Now, what security, I mean, we're talking about can someone hack it with reliability? We're talking about how, like, are we going to lose data? Like how reliable is the connection? Cost is how much does it cost, basically, and speed is how fast that connection. Now probably the two most common connection or transmission media are going to be Wi-Fi and Ethernet. This is kind of a breakdown. Like Wi-Fi has slower speeds than Ethernet because you're transmitting through the air. Versus Ethernet, you're just literally sending a signal to a piece of metal. Wi-Fi is less reliable because you could have interference. For example, you could have physical objects or geographical features blocking the connection. Versus Ethernet, that's not an issue, as long as that Ethernet cord is well insulated and there's no magnets near, there's no electromagnetic interference. With Wi-Fi data needs to be encrypted because otherwise, because people can just access a Wi-Fi network who are near you. Like anyone who's near you can access the Wi-Fi network. Versus I would say that even over Ethernet data should be encrypted, but it's a lot harder to like... to intercept your transmission because they physically need to plug an Ethernet, like plug that cord into their computer. And it's a lot harder to hide that than to connect to a wireless network. Again, latency just means Ethernet is faster. And deployment means Wi-Fi is easier. You just really need to set up a Wi-Fi router. Versus with Ethernet, you need to have like a router, but then you also need to have a bunch of Ethernet cables that connect to all the computers that want to connect to your network. Now, broadly again, we're going to compare fiber versus copper, so fiber optic versus, for example, an Ethernet cord, because fiber optic is used, again, for transmitting more data at a faster rate over a longer distance. Probably because it has more bandwidth, you can send more data over a given period of time. It has, you can send data over a much higher distance, over a much longer distance rather. And Also, it's not susceptible to electromagnetic interference or voltage surges. The data you send is not going to be susceptible to changes in the electrical grid or a magnet put right next to a cord. Because remember, fiber optic is just a piece of glass, and you're basically transmitting light over a piece of glass. So you're basically sending a signal. It's kind of like a Morse code, where with a Morse code you send sound, like you just send patterns of sound. With fiber optic, you're sending patterns of light, except at an extremely high frequency. So for example, you're having a light beep, probably like billions of times, or millions of times a second in order to transmit data. Also fiber optic is more lightweight than copper, or than a fiber optic cord. So that makes it easier to transport. So generally fiber optic is better, but there's also some downsides. So we'll get to those in a second. Well, okay, we'll get to those right now, actually. So one of the downsides between fiber optic and Ethernet is that fiber optic is more expensive. It's actually the most expensive method by which to transmit data. Copper is the second most expensive, and then Wi-Fi is the cheapest. So one of the big advantages of Wi-Fi over any of these is cost. One of the disadvantages of fiber is also cost, and that's important to know. Also, with fiber, you need to have a straight, a linear connection between two points. You can't bend it the same way as you can copper. Because after all, fiber is a piece of glass. So that needs to be taken into consideration as well. And beyond cost, yeah, I would say that those are two big disadvantages of fiber. Now, we can look at some connection speeds right here. So This is untwisted pair copper cable. We're basically talking about Ethernet 100 megabits per second. Fiber optic is obviously way faster. Wi-Fi varies, so it can be slower than Ethernet, but also faster. And this is basically talking about line connections. Right here, this is not that relevant, but still interesting. DSL Internet connection, this would be the speed. Fiber optic blows them all out of the water. 3G, 4G, which are just cellular connections. Now, what we need to learn about, having learned about transmission media, is some factors that affect how fast data travels. The primary factor that affects transmission speed is traffic, so how much data is being sent at a given point in time. More data that's being sent, more data that needs to... Basically, you're going to have a traffic jam, right? The slower your network speeds are going to be, think about at 6 PM when everyone comes home and wants to watch Netflix. That gets us to our secondary factors, which are time of day, distance, data transmission is less effective usually over a distance, and infrastructure. And this infrastructure basically means the quality and the way that wiring is set up. These will also affect transmission speed. Traffic is the most important factor, followed by these factors. And then we also might have environmental factors, temperature interference, financial factors. So the quality of equipment that might be used can affect the transmission speed. So if you buy cheaper equipment, you might have a less reliable connection. Additionally, if you use copper over fiber optic, you're going to have a much slower connection. But. Fiber optic is going to cost you a lot more. And the type of data. So streaming data, for example, streaming Netflix is going to take up, is going to slow your connection down for others more than sending text files. This is kind of like a one-off. So we use, it kind of makes, it kind of connects into the other topics. Just because compression is basically when you take data and make it smaller. Now compression can, is often used to send data more quickly or to store more data in a set size, in a set hard drive, or hard drive with a set size. We have two types of compression. We have lossy and lossless compression. So lossy compression actually removes data in order to make a file smaller. So right here, for example, we remove some pixels to make this file smaller than the original. We have smaller file sizes, but it's irreversible because we're basically throwing some data away each time. So mainly we're going to use lossy compression with videos, images, et cetera. So basically when we're doing compression, you may have seen zip files or whatever. That's an example of compression. Now, the other type of compression is lossless compression. So lossless compression, we use an algorithm to reduce file size. So we're not really using, we're not really losing data. We're just kind of rearranging that data. Our file size is going to be larger than with lossy, but it's going to be smaller than the original. We use this when no data can be lost. Imagine trying to compress an essay, for example. If you lose some of that data, your essay makes absolutely no sense at all. That's a good use case for lossless. Basically, compression is when we're trying to make data smaller to send it or to store it, and we have lossy and lossless compression. And you might have a question in the IV exam that asks whether you'd want to use lossless or lossy. What are some of the advantages of lossy over lossless? This is going to be our last section, and it's going to be network security. So with network security, we're basically talking about how to prevent unauthorized use of networks. Now, when we're talking about networks, again, remember we're talking about the internet. So one of the big ways to prevent unauthorized use to networks or to websites or to networks of servers on the internet is to use authentication. And we have three types of authentication. We have one factor authentication, which might just be typing in a password. So you're utilizing something you should know in order to gain access to a network. password, pin, whatever. The next way is two-factor authentication. So you're going to use, you might have to type in a password and then have a text message sent to your phone on a pre-registered phone, like a phone that's registered with that website. And so this would be, for example, when you type in a password and then you type in, you get a text message with a pin and then type that in on your website or like maybe you're trying to log into your Google account, you have to tap yes on your Google account. And three factor is probably like the most secure. Maybe you type in a password, you tap yes, or you get a pin on your phone, and you use something that you have as part of your physical body. One factor, something you know. Two factors, something you know and something you have. Using your smartphone in conjunction with a password. Three factors, something you know, something you have, and something you are. Fingerprint, facial recognition, retina scan. All of these are very difficult to fake because they are unique to you. So three-factor authentication, my bad. Three-factor authentication, type in a password, get a text message or tap yes or no on your phone and scan your thumb or press your thumb against a thumbprint reader on your phone or have your eye scanned or to show your face. Now, another way of securing a network or data is encryption. Encryption is basically when data is encoded. You might use some standard like SSL or TLS in order to transmit data from one computer to another. The idea is that the data can only be read by a sender and a receiver. It involves some sort of key, a private key or a public key. Basically, you need to know what encryption is and that encryption can be used. You don't really need to know how it works for the IB exam. Now, the next is to control access to a network using media access control or a MAC address. A MAC address is basically imprinted or assigned to every single network enabled device. Anything that can control to a network through a network interface controller. that has a MAC address. So, for example, your phone has a device or has a chip that can connect to a network, that can connect to a Wi-Fi network. That has a MAC address. Your laptop has a network interface controller that connects to Wi-Fi network. That has a MAC address. Your computer has an Ethernet port. That has a MAC address. And this is imprinted into every single device when it's made in the factory, and it's unique to that device. So basically what you can do with a MAC address is you can only, let's say you have a Wi-Fi network and you want to control access to that Wi-Fi network. You can say that you only want certain devices with specific MAC addresses to be able to access that network. And that's called a whitelist. So, one method of security is to create a whitelist of networks that are allowed to access your network. And so when a computer or when any other device tries to access your network, it's strict against the whitelist. If the MAC address of your device matches the whitelist, then you can access it. Otherwise you can't. Just to give you an idea, this is an example of a MAC address. It's six pairs of two hexadecimal digits. Another way to secure a network is a firewall. Firewall can be a device or a piece of software that analyzes data packets that are coming into your network. Based on what's in those data packets, it can stop them or allow them to enter your network. It can also analyze MAC addresses or IP addresses of incoming data packets. Usually firewalls again can handle that whitelisting procedure. Aside from controlling incoming traffic, incoming data packets, it can also analyze and control outgoing traffic, so outgoing data packets. So maybe for example, you want to disallow credit card numbers, you want to disallow certain servers in your network from sending data outside of your network, firewall would allow you to do that, incoming and outgoing traffic. The last one is like, this one is kind of hilarious, because you'll actually get questions that involve this, but it's like physical security. So like this is the idea of having like locked doors around your router or a cage that no one can access, or security guards, or secure room. Or you might have your, you like the area where you keep your network devices, like your switches, your routers, your servers, like security against hurricanes, hurricanes, earthquakes. It might be EMP insulated so that a magnet can't just be used to wipe everything on that network or to disrupt the network. So you might get asked questions of how can the network be secured against unwanted or unauthorized users. unauthorized people who are entering your facility without authorization. And your answer may just be like, lock the door or have a cage or have security guards. So keep in mind with some of the IB questions, they're actually just asking questions about how you can physically secure different components of a network or data on a network. So that's actually the last slide. I think we covered that in about an hour, but that is everything you need to know for topic three. Now, I would like to work through actual IB questions. I took a lot of information for the slideshow directly from the answers to IB questions, but I'm not going to go over them just for copyright purposes. If you would like, you can see them actually in the slides that are attached to this particular presentation with all of the answers attached. One thing that I was unable to cover in a lot of detail was actually data packets. So if you look at the slideshow, there will be a slide that explains data packets in detail, partly because the best diagram I could possibly find for data packets. and what each part of the data packet does is from an IB question with the mark scheme. So please make sure and take a look at that while you're going through this video or after you go through this video. Anyways, I hope that was of value to you. It's a really quick review I think you could use for the IB exam in conjunction with the slides in the description. If you want to see more videos like this, please remember to like and subscribe. Have a nice day.