 Hello. Hi everyone. I am Sanjay Gupta. I welcome you on Sanjay Gupta Tech School. So today is day five of Cyber Security Bootcamp and I have Sumit with me. So welcome Sumit on the channel. So Sumit will be explaining related to IP today. So yesterday you got to know about MAC addresses. Today he will be explaining you about IP and will share you some insight about tomorrow's session because in tomorrow's session, like he will be guiding you how you can set up certain things, those will be required for further sessions. So over to you Sumit. Please start with the session. Welcome everyone. This is day five of Cyber Security Bootcamp and I welcome you all on this journey with me. My name is Sumit Jain and before I start, let me introduce myself, those who are new. So I'm an ethical hacker and cyber security expert. Apart from that, I'm working as a red team member in Cinec, red team or Pentabug. I'm working as a senior security specialist at Jito Networks. I have experience of past 10 years in the cyber security field or domain. Previously I'm a guest instructor at Central Detective Training School. Right now I'm helping students, freshers and professionals to build their career in cyber security or web application security in penitent testing. So I create contents on YouTube related to cyber security and different fields of cyber security like web application security, mobile application security and network related security. So you guys can follow the channel of Cyber Security Zone. Also follow the channel of Sanjay Gupta Tech School as well. And you can follow me on these below platforms. You can follow me on LinkedIn, Twitter and if you want to discuss one to one with me, you can join our Telegram group. The links are available in the video description. So check that out. So yesterday we talked about how IP address will distribute, how IP address will connected with your devices, how IP address will provide via the ISP. So we have five classes of IP address. I explained already what are the classes. So we have a total range of 1 to 255 and we divided all these ranges into five parts. These five parts are known as IP classes. So these are all the ranges of all the classes we have. So class A, B, C, D and E. We only use class A, B, C in our internal network. So first let me recap you something. So what is an IP address? So IP address is the identifier that enables your device to send or receive data packets across the internet. It holds information related to your location and therefore making your device available for two-way communication. The internet requires a process to distinguish between your networks, routers, websites. So IP address will provide the mechanism of this process and it forms an indispensable part in the working of the internet. So this IP will assign or you will notice that most of the IP address are essentially numerical. So IP address is represented by a series of numbers separated by dots. We have four columns to represent this and this type of version is called IP version 4. So now we have to understand what are the types of IP address. So we have two types of IP address. One is for public IP address and other one is private IP address. So let's understand what are those and how these IP address will use your internet device or how you connected with internet using those IP address. So let's understand something first. Like if you are connected with the ISP, like if this is your internet device, this is your computer and this is your another computer. You are using your home network. So this is your Wi-Fi device which you are connected to. This is your Wi-Fi and this is your computer for user 1 and this is your computer for user 2. These two computers are connected with the Wi-Fi with a networking mechanism like Wi-Fi transmission mode. So they use a NIC for Wi-Fi transmission. So these computers have an address for your NIC. Suppose this computer have a MAC address of X and this computer have a MAC address of Y. Now they both want to access the internet. So they use this Wi-Fi to connect with the internet and this Wi-Fi further is connected with a network connection. You are bought from the market like some internet service providers. In our case we use a service provider like if I use ATL service provider. So I am connected with the ATL ISP. So this device is further connected to this ISP. Now we want to share the data throughout the internet and we want to interact with the other users. We want to interact on to the other networks using those network connections using internet. So we need an IP to communicate with the other devices. So the IP is provided by this ISP. The IP is provided by this ISP and the IP is provided by ISP is called public IP address. Public IP address. For example let's write an example like ISP will provide this IP address to my connection and I am using this IP to communicate the other servers to communicate other users or to communicate other networks. So now this IP is used by this device. So basically IP address is provided to your network connection. If you are using one internet connection only one IP is assigned by you via the ISP and when you are using this IP no one else in the world is using this IP and if you are disconnected the IP is got back to the by the ISP and it will assigned for another user. So right now at the time of 9pm you are using this IP. It's called public IP. So public IP is something which is directly assigned by the ISP service provider or on to your internet network connection. Right now these both systems are want to use the internet. So they have they access the internet activity they connected to this device. So this device is directly assigned this IP to this device. And also this device if they want if they both interact with the Google if they both interact with the different websites the address they use for communicate is this. What it so this is public IP address public IP is used for interacting other networks. But if we if they both if these user want to interact with each other then they need another IP address because same IP address can't interact with each other. So in a network in a network a IP is same IP is the same. So they both devices can't interact with each other. So we need another type of IP address which is called private IP address. So private IP address is assigned by your network devices. And so the IP ranges we have in classes. So a small part of IP is cut by the Aina which is your IP distributor in the all over the world. And those IPs are called private IPs. So all the all the users in the network have these private IP and via these private IP they can also interact with each other. So in a network if if our device has a private IP it can interact with the other users in our network. But if we only have private IP we can't interact in another network for another in for another network. We need a public IP got it. So the ranges of private IP are in class a we have this IP 10.0.0 to 10.255.255.255. This IP range will not used by the any of the ISP in the world. This is only used by the network service provider. And in class B we have a IP range of private IP is 172.16.0.0 to 172.31.255.255. And in class C we have this range of private IP is 192.16.0.0 to 192.16.255.255.255. These IP at these IP ranges are known as private IP and they are used by a network in your in your in your network devices. So if this device want to separate those devices and these both devices want to interact with each other. They need a IP address and for the for this problem we have private IP. So if this Wi-Fi network device use a range of class C class C. This IP range will assign to this device like 192.16.0.1.1 and this device will use 192.16.0.1.2. So now they both have different IP address and they both have a single private public IP address. So this type of network will communicate with each and every device because we have public IP and we have private IP as well. So using private IP we can interact with each other in our network and using public IP we can interact with other networks as well. So private IP can't be controlled by the ISP which we can use which we can use whichever the ranges we want we can use whichever the classes we want. So ISP don't have any control over the private IP. Also these ranges used by every network. So right now if I am using this range hopefully the other networks can also use this range. But in public IP if I am using some IP ranges no one else in the world can use this range. But private IP they can use. So if I create another network and assign this same range to their users it can work. But if I assign this public IP on to the network connection this will not work. Public IP is unique but private IP is also unique but in a network. And private IP can be communicated via only private IP. Public IP can be communicated via the public IP. So both IPs private IPs can't be interact in another network. If you want to interact with another network another network user using the private IP you can't. You need a public IP. So basically we need both public and private IP to communicate the network. Public IP is assigned by ISP. Private IP is assigned by your network device which whichever you use router, modem, switches, hubs. So how these device how your IP work in network. So process of the IP address is if your computer network smart phone or any other Wi-Fi enabled device firstly connect to a network that is further connect to the internet. The network is responsible for giving your device device access to the internet. While working from home your device would be probably using the network provided by internet service provider ISP. So your ISP is responsible to generate the IP address for your devices which is called public IP address. All other the ranges apart from that are known as public ranges in IP version 4. The total range we have is 1, 2, 255. So these ranges are known as private IP and all other ranges are known as public IP. So how you check your public or private IP. So let me tell you to check public IP. I already told you how to check which is what is my IP address. Also you can go to google.com type in the search box my IP. So it will display your public IP. But if you want to check private IP in your windows operating system, you need CMD which is command prompt and you need to type IP config command. This is the command you will use in your windows based operating system. And if you are using Linux based operating system type in the terminal, which is similar to your command prompt basically a shell and the command is if config. So using this command you can check your private IP and your public IP. The private IP network will be the same among all the users and the public IP will also same of all the users. So what is the network in a private IP? So we have to understand this because using the network we can create more networks in our single network. This process is known as subnet creating more networks creating subnetworks of your network. If you are connecting 50 users in your network, but you want to separate them like five computers can't exchange the data with another 45 computers, you create a separate network. But you are using a single network connection like your public IP is same, your public IP is one but you want to differentiate those five computers to be accessed or to be to be to exchange the data from another 45 computers. So you need to create subnet. So what is subnet? Subnet is creating subnetworks in your network and the process is known as subnetting. So if I use a class C range of private IP like this, so in this IP, in this range, these 24 bits because we total have 32 bits in our IP. So these 24 bits are known as network 24 bits are known as network and this single 8-bit, this 8-bit is known as host. So if my network connection use network, we all connected via on this part, we connected on this part. Like if you understand with the diagram, this is my Wi-Fi and I'm connecting to users. The further Wi-Fi is connected to ISP. So we have public IP address but right now we don't need a public IP address. You already know all the possible scenarios with the public IP address. So we need to focus what is private IP and how this will be distributed on your network. So if my Wi-Fi network device use class C of private IP address, it will create a network and the range it is using is 192.168.1. So the one is network. If we want to read this, we say we are running on a network one and this part is known as host address. So the Wi-Fi device is using default IP and this device is use this range like .1 and this device is use .2 and this device will use .3. So they both use the same network but a different host. The host part is different on each computer but the network part is same. So all the other computers, if we connect more computers in this network, all the computers have the same network. This is the network part. In class C, we have a 24-bit network which is called our network and 8-bit of host. So host number or host value is different in a network but the network is same. If we are using class B ranges, then only 16-bits are called network and another 16-bits are called host. If we are using class A network, only 8-bit are called network and another 24-bits are called host. So in class C, we can only connect maximum 256 hosts because the range will continue from 0 to 255. So we have total 256 hosts in a network. So using this network, we only can connect 256 computers in this network. If we want to connect more network on this network, we need to use another network and these both networks can't interact with each other. So if you are designing a connection which has less computers we will use, we will assign or your network device will automatically assign the shortest range of class C. But if you have more networks, if you have more computers, we will use class B because in class B, we have total 65,536 hosts available and if we use class A IP, then we have around this number of hosts available in a single network. So more of the computer we use in our network, the ranges will increase but if you are designing a network which has less computers, we will use class C. And in class C, only 24-bits are known as network and 8-bits are known as host. In class B, 16-bits are known as network and let me write again. In class A, we have network bit is what is the host bit? Host bit is 24-bit. So in one network, we can connect around these number of computers. In class B, we have 16-bit network and the host network is host bit is also 16. And we can connect 65,536 hosts in a single network and if you are using class C range, then the network bit is 24 and the host bit is 8. So we use, we only have 256 hosts available in a single network. Also in a network, two IP, two hosts are not used. The first host, the first range, the first address in a network, first IP and last IP. These IP are not used in a network. You have, if you are using, like I'm using a class C address, so this is a class C, I'm using 29 network. So this is my IP address range and if I continue with this range, these IP address will be assigned to my users and so on. This will continue from 4,254, this is the last range and this type of it. So we have these host addresses. This is 0 to 225. So we total have 256 addresses and we use this network. So this network is called 29 network. So if I using this network, we will read as we are using a 29 network of class C and my computer private IP is like this. 192.168.29.3. So every network, two hosts are not used for communicating. One is first IP and one is last IP. So in this network, this is the first IP and this is the last IP. They both are not used. So only 1, 2, 2, 54 ranges are used as a user. So user will use 1, 2, 2, 54. So we only have 254 IPs to provide users to communicate with another network. So why the first and last IP is not used in a network? Because first IP is known as network address and the last IP is known as broadcast address. So we will not use these first or last IP in every network. If you are making a network of class B and if you are making a network of class A as well, you are not using a first IP and the last IP as well. So in private IP, if we have a network of 8 bit, we are using a class A network. If we have network bit of 16, we use a class B network. So why we need these all the classes? Because the computer you are connecting to your internet is not accurate. It will be connected from your users. So the amount of computers or hosts you will provide to the network, the ranges will automatically divided or assigned by your network devices. So if I want to create subnetwork from the network, this process is known as subnetting and for this we use a range called subnetmasks. And this will a permanent range, so you need to remember it for creating subnets. And subnets are something if you want to distribute or if you want to create more networks in a network. Network in a network are known as subnet and the process is known as subnetting. And for subnetting we use subnetmasks. So we have a subnetmask for class A is 255.255.0. I told you that we use 24 bits for class A we use this address and for class B we use this address. For class C we use this address. So in class A we have total 8 networks so this pair is full. In class B we use 16 bit network so this pair is full. In class C we use 24 networks so all 3 updates are full. And these 0 represents our hosts. So in class A we can assign the IP address on this octet, on this octet, on this octet as well. So that's why we have more combinations in class A but in class B we only have 2 octets. That's why we have a shorter range from the class A and class C we only have this octet for the user. That's why this class C have a mini number of users which are connected to your network devices. In class B we have more range that is 65,000. And in class C we have around 1 crore ranges to connect your computer. So these ranges are known as subnetmasks. Each network, each IP have a subnetmask, subnetmask. So this is known as subnetmask and it will tell you what are the classes you are using in your network and what are the IP or what are the hosts you have in your network. This subnetmask will remain final and not changed. It is not changed. So let's recap. So in IT we have three types of things. One is classes, other one is types and other is versions. We have five classes which is class A to class B, class C, class D and class E. We have two types which is public and private. Also this public IP has further two types because the IP you are using is not static. It will change dynamically. So this public has also two variants. One is static and one is dynamic. We are using dynamic IP address because our IP is not permanent. When we disconnect the internet, our IP will be changed. But if you are running a domain or if you are running a server, you need an IP address which is not changed upon disconnecting. So you purchase an IP address from the ISP. This IP is known as static IP address which is not changed whenever you disconnected from the internet. We have private IP address which will be assigned by your network devices. We have two versions. One is version four and the other is version six. So in version four, we have 32-bit address and in version six, we have 128-bit address. And version six also have hexadecimal representation. In v4 version, we have binary representation. So v6 has more ranges than the v4. In v6, we have around 330 trillion, trillion, trillion. These are all the ranges of these IP version six. So currently companies are shifting towards the IP version six because it has no limitations. We can give a user a separate address. We don't need to share the internet. We don't need to share the IP addresses. And for this, for private IP, we have subnet mask, which is your masking range, masking IP. And for this, we have plus eight. Plus eight is represented by this. Plus B is represented by this. And plus C is represented by it. So this is the complete IP flowchart of your internet connection, whichever range you are using, whatever the network you are making is used. If this type of network flowchart in your system, using this, you can share. You can interchange the data. After the IPs, we also need some ports to exchange our data. Like if you are sharing some data between two computers, like if I want to share a movie with you, you give me a pen drive and I transfer the data onto your pen drive. So a port will be used to transfer your data. So in computer network system, we have different types of port to transfer the different types of data. So we have two types of port. One is physical port and the second one is virtual port. Physical port is something you are using in your daily life, like USB port, HDMI port, VGA port, C type, your Ethernet port, your DVD port, audio port, audio and video port. So we have different types of port to transfer the data. But in our computers, there are also some virtual ports available to transfer different types of data. You listen something about like STTP. So this STTP is a port and it will use a number. So in virtual port, we have total 65,535 ports available in our computer. And they are assigned to some services for transferring the data. So these ports are known by the some service name. So we have numbers, like one number port, one number port is assigned to some service, two number port is assigned to some service. So that range of 1, 2, 1, 0, 2, 3 are known as well-known port. The common services are running on these port and this range is registered ports, registered ports. These are not common ports we are using in our daily life, but these port numbers are registered to some services. Like if you are using a MySQL on your domain, you are using a port number of 3306. MySQL is running on this port number. And the last range we have is 65,535. These are unregistered port. So if I want to spread a virus onto the network, I use these unregistered ports. So hackers and cyber criminals use these unregistered ports to spread some virus malware or some harmful software onto the internet. So the software or application or the virus will download or coming in your system and will harm you or share the data and steal the data from your network. So the common ports you need to understand and you need to remember is 20. 20 port number is known as FPP, which is for file transfer. The name for this port is File Transfer Protocol and Protocol Act of Rules. So we have rules for file transfer. If I want to share a file to the network, we use 20 number port, which is for file transfer, FTP port. 22 known as SSH, Secure Shell Hash. This port will help to share your data with security. This port number is known as SMTP. The full form is Simple Mail Transfer Protocol. Then we have 53, which is known as DNS Domain Name Server. We have 80, which is known as STTP, HyperX Transfer Protocol. Some other ports are 110, which is known as POP3. Post Office Protocol 43, Message Access Protocol 443, STTPS, Hyper Text Transfer Protocol Secure. We have 3306, which is used for MySQL. We have 189, which is used for BGP. BGP is Border Gateway Protocol. And we have 8080, which is also the alternate port of STTP. In a network, if we want to transfer the data, we use these common ports. And using these common ports, we share our data. By default, in your system, only 80 number port will be always open, and the other port is opened when the desired data is come and port is closed when the data is transferred. So in cybersecurity, we also test the number of amount your port is open in your network, in your application. So we have to understand what these ports are. So you need to remember the port name or number and the services and the working of these ports. So these are some common ports I have written. So Google it, search about it, how these ports function. And understand because they are for transferring the data. So tomorrow we will set our lab for the sessions related to cybersecurity. So I'm writing here some instructions what you need to install so that we can set up our lab. So you need to install a Firefox browser in your operating system. Also, you need to create two Gmail accounts or registering some of the service I will told you. Also, register on github.com, register on shodan.io. You need to make an account on these websites so we will set our labs. Also, you need to download a software called VMware Warp Station. This is a virtual machine in which multiple operating system will be installed. So you need to download this software. Google it, VMware Warp Station. You can download the latest Warp Station regarding your operating systems you are using. Like if you are using Windows, you can install the Warp Station for Windows. And if you are using Linux operating system, you can download for the Linux environment. So with all these, we configure our lab and start our cybersecurity lectures, how to test a target, how to put print a target, how to scan a target and find vulnerabilities and do a VAPT process. So with that note, I will wrap up this today's session here. So if you have any questions and queries, you can ask in the comment section. So I will answer. Okay, so thank you, Sumit, for sharing this knowledge. So one thing I just want to discuss, like in your tomorrow session, like you will be creating all these in front of the viewers or like you will be already having all these accounts created. How we will be proceeding. I will create these accounts or... Okay, so I think Firefox browser Gmail account guys will create at their own, but I'm worried about GitHub and shodan.io. So if we can guide them because few folks will be new for those websites. The registration process is simple. You can register via the sign up page and provide your email address and your password. You will choose a password. The registration process is simple. If you are registering for an account like Facebook, it will work as Facebook.com as well. Okay, so guys, please create these accounts. And if you face any problems, so we have a telegram group. So you can post your queries there. Sumit will be helping you and also install VMware software that Sumit guided you. So have those softwares and accounts ready with you because from tomorrow everything will be having theoretical and practical information. So if you want to understand everything properly, so have these things available in your system so that you can go with Sumit, whatever he is explaining you will be able to understand. I can show you, I can show them how they will download the VMware workstation. Let me. Okay, so Sumit, someone is asking to provide notes document. So I think if you can create a slide where you can write whatever prerequisites for tomorrow's session, so it will help them. He can create. Yeah. So you can go to the Google and type VMware workstation. You will find this website where a download option is available. Download VMware workstation pro. You will click on that. You will go to download section. Here is the link of downloading the desired software. If you're using Windows, you can download this. And if you are using Linux operating system, you can download this. And after the download process is complete, you can simply install this software like you are installing some other softwares. The installation process is simple. This is for like some other softwares. Okay. And maybe like Sumit will be sharing these links in the telegram group as well so that it will be handy for them. No, no problem. I will create a slide out to download how to install. You will get all the slides in the slide tracker. Yeah. So in the slides, everything will be added. And if you still have any problems. So just ask in the telegram group because this is very much important. So tomorrow we'll check like if you are having any issue. So we'll see that first and then like we'll be starting those things. And Anil, can you please ask your question in the telegram group? He's asking like role of gateway address IP configuration of NIC. So you can ask in the telegram group I will be available for. So whatever questions you are having guys, you can just utilize telegram group for that purpose. Okay. So thank you everyone for joining the session and thank you so much for sharing valuable information. Okay guys. See you tomorrow. Same time. Thank you.