What is an IP address?What a Phone Number is to you is what an Internet Protocol (IP) address is to a computerWhat this means is, when your friend wants to call you, he/she dials your mobile number to talk to youSimilarly when your computer wants to talk to Google.com (let us say) then it dials the IP address of the computer on which Google.com is runningTechnically: An IP Address is the Logical Address of any device on a network. What logical means is, just like a delivery guy reads your Home address on the dinner your ordered and decides a route to take inorder to reach your house, similarly when your computer dials the IP Address of Google.com, the address, helps the internet’s delivery guy, to understand logically, how and where to reach Google.com and deliver your request.So, how does this IP address look like?Like Ranbir Singh? or like Angelina Jolie? well, not so lucky we are but it looks much similar to a mobile number, an IP address, also, is made up of numbers in the following pattern: A.B.C.D where A, B, C and D are numbers between 0 and 255 (both included)For example: 184.108.40.206 220.127.116.11 1.26.325.127….. oh no not this…. why?…. Yes! because 325>255 and each chunk of IP address must be between 0-255. Neither less than 0 nor greater than 255 IP Address Classifications: There are various classifications of an IP address, let us try to understand those 1. Internal and External IP address: Let us take some simple analogies. Have you ever stayed in a hotel? NO? I guess you would have used an intercom like in your school/college or in your office. Now imagine a Scenario: Imagine you and your brother/sister are staying in room no 1023 in a hotel and your mom & dad are staying in room 1026 in the same hotel How do you communicate? Absolutely right!! You use the telephone in your room and simply dial 1026 But what if you want to wish your Aunt who is across another state, A Happy New Year? Yup, you call the (cute) receptionist and ask her to dial the telephone number of your Aunt. Sub analogies: 1. Now if you call your Aunt, what number/caller ID will she see on her mobile? 1023?? NO! She will see the number of the hotel exchange. right? 2. What if your Mom wants to wish your Aunt too? Will your Aunt see a different number now? NO!! She will also see the number of the hotel exchange, right? Why? Correct.. Because you are in the same hotel, although different internal room numbers but externally, there’s only one central exchange that connects the calls going outside the hotel. 3. If your Uncle comes home later and now want to talk to you, can he dial 1023 and talk to you? Obviously No! But if he dials the Hotel exchange number, will you be able to pick up? No!! Why? Because the call will reach only to the receptionist and she will decide whether or not to transfer the call to your internal telephone @1023 These are what Internal and External IP addresses are. When you are connected to your home wifi network, you can communicate between your devices via an internal IP address easily just like you might have done while transferring files via ShareIT or other similar applications But when you want to connect to Google.com, your “Wifi Router” is what connects you to Google.com i.e no matter whether you visit Google.com or your Brother, Google will only see one IP address (Caller ID), that is of your “Wifi Router” And your Wifi router, on the other hand, assigns you an INTERNAL IP ADDRESS (Just like the intercom) for internal connectivity. But who assigns the external IP address to your “Wifi Router”? The authority is called the “Internet Service Provider” or commonly known as ISPs. I.e. the company from which you have purchased the internet services. Example: Airtel, MTNL, BSNL, Spectranet and many more… How does this assignment work? Well, that is what the protocol DHCP does. DHCP stands for Dynamic Host Configuration Protocol. Whenever a new device connects to a network, the DHCP service basically allots an IP address to the device. For how long it reserves the IP address for that device is called the “Lease Time”. What that means is, if the lease time for your device is 3600 seconds, that means when you “Disconnect”, for 1 hour any new device won’t be assigned the IP address that was assigned to you. But after one hour, your IP address will be freed and can be assigned to any new device. This brings us to the Second classification of IP Addresses. So, How do you get to know your IP Address? with screenshots Well, its simple. Internal IP Address (Also called private/intranet Address) For Linux/Mac Os users, 1. Open your “Terminal” (Ctrl/Cmd + Alt + T) 2. Type ifconfig and press enter 3. Your will see your Internal IP Address For Windows Users: 1. Open the Command Prompt (cmd) -> (Win+R -> type “cmd” -> press enter) 2. Type ipconfig and press enter 3. Your will see your Internal IP Address External IP Address (Also called public/internet Address) Just search on Google : “ip address” -> you will see your external IP Address You can also browse to multiple free websites that will give you your external IP address, example: whatsmyip.com ipchicken.com ipcow.com etc. 2. Static v/s Dynamic IP Addresses Its as simple as it sounds like: If your IP address changes everytime your reconnect to a network, then its a Dynamic IP Address And if your IP address stays the same, no matter how long you wait before reconnecting, then your IP address is a Static one. Now let me ask you a simple question: How many devices can connect to a network? You guessed it right, as many number of IP addresses that are possible! Now to calculate that, lets do some MATH 🙁 x.x.x.x where x is a number between 0-255 That means total number of possible IP Addresses will be 256 * 256 * 256 * 256 As every x can be any of the 256 values between 0 & 255 (both included hence 256) The total comes to 256^4 or simply 2^32 (32bit i.e. 4 Byte address) which is ~= 4.2 Billion Addresses Woah!! Right? Thats quite a big number According to a study, a total of 3.2 Billion people used the internet in 2015 That leaves us with a billion spare addresses which is quite fine right? Sadly, NO! How many “Smart” Devices do you use? Let me guess… Atleast 3-5 Your mobile phone, your laptop, your desktop and in the current times, quite probably your Television, your Watch and even your house monitoring web-cameras. So even if we take an average of minimum 2 devices per each person who uses the Internet, Thats 6.4 Billion devices!! And what about the computers your favorite websites are running on? Or Offices, Schools, Colleges etc that have 100s of 1000s of devices other than yours? According to another study, till 2012, a staggering total of 8 billion devices used the Internet. 8 Billion unique devices. And that, my friend, was 6 years back. So the big question? How is the Internet still working? That answer to that we have already discussed and that is the Isolation of internal and External networks. Just like under one telephone exchange, 1000s of hotel rooms can be connected to the telephonic network, similarly, your “Router” (Wired/Wireless) is what acquires a single external IP address and all internal devices use the router to communicate outside. This technology is called Network Address Translation (NAT) – The process of translating data between internal and external networks. But is that it? In the future wont we need more addresses? Ofcourse, and that is what beings us to the third classification of IP address 3. IPv4 and IPv6: Internet Protocol version 4 (IPv4) is simply the technology we have been discussing so far. i.e. an IP address between 0.0.0.0 to 255.255.255.255 Key features: 1. Made up of numbers 2. Divided into 4 chunks 3. Can hold upto 2^32 ~= 4.2 Billion Addresses 4. Looks like A.B.C.D 5. Is obsolete and will probably expire in a few years Special Ranges: Some of the addresses are reserved for special usages, they are as follows: For Small Internal Networks (Like your home or small office): 192.168.0.0 to 192.168.255.55 For Large Internal Networks (Like Large MNCs, Colleges, Schools): 172.16.0.0 to 172.31.255.255 For Massive Internal Networks (Like Telecom networks, satellites): 10.0.0.0 to 10.255.255.255 127.0.0.1 : This is called the LoopBack address and is used as the address of your own machine. (We will look at its uses later) Internet Protocol version 6 (IPv6) is the new technology and it solves the biggest problem of IPv4 i.e limit of max number of devices. An IPv6 Address is represented as xy:xy:xy:xy:xy:xy where each x and y is a hexadecimal character ie 00-ff (Sample Hex table here) 00 10 20 30 40 50 60 70 80 90 a0 b0 c0 d0 e0 f0 01 . . . . . . . . . . . . . . . 02 . . . . . . . . . . . . . . . 03 . . . . . . . . . . . . . . . 04 . . . . . . . . . . . . . . . 05 . . . . . . . . . . . . . . . 06 . . . . . . . . . . . . . . . 07 . . . . . . . . . . . . . . . 08 . . . . . . . . . . . . . . . 09 . . . . . . . . . . . . . . . 0a . . . . . . . . . . . . . . . 0b . . . . . . . . . . . . . . . 0c . . . . . . . . . . . . . . . 0d . . . . . . . . . . . . . . . 0e . . . . . . . . . . . . . . . 0f 1f 2f 3f 4f 5f 6f 7f 8f 9f af bf cf df ef ff Now, this of course is massively huge. Again mathematically – 2^128 To give you a picture, this in digits is: 340,282,366,920,938,463,463,374,607,431,768,211,456 And I am sure you have no idea what that is called. Let me help you with that: Its over 340 Undecillion. Yes, that is a term. Just like Million is 1, Billion is 2 and Decillion is 10, Undecillion is 11 So if we use IPv6, we will never run out of IP addresses anywhere in the near future. However, not every device on the Internet is using or even supports IPv6 but slowly we are migrating and in a few years we will be able to completely migrate from IPv4 to IPv6That brings us to the conclusion of Basic Network Addressing and IP Addresses. Now lets give you some exercises 1. Study about Classes of IP addresses and Its ranges. Also study how, why and when were they used 2. Find the Internal and External IP address of 2 of your devices connected to the same WiFi network and check the following: a. Are the Internal Addresses same? b. Are the External Addresses same? c. Does the Internal Address change after restarting the WiFi router? d. Does the External Address change after Restarting the WiFi router?Quiz: An IP address can be used to locate the physical address of your laptop A. True B. False Answer: B. False : The IP address can be used to logically find a path to your laptop but not to find the physical location of it. Pick the incorrect IP address: A. 18.104.22.168 B. 127.0.2.255 C. aab4:ab76:f3d3:d980:f2l3:a9ee D. e004:1234:5678:9810:afff:c3d4 Answer: C : The address’ 5th chunk is f2l3 which is invalid as it can only be 0-9 and a-f. “l” is invalid If the lease time given to you by the router is 0, what does that mean: A. Your IP address is completely dynamic B. Your IP address is static C. Nothing, it is an error D. You wont get an IP address Answer: A : Lease time of 0 seconds means that your router will wait for 0 seconds after you disconnect before your IP address is freed up and assigned to someone else. This means, every time you re-connect, you will get a different IP Address. If an office wants to setup an Internal Network consisting over 600 devices, which reserved range will be best for the office? A. 192.168.0.0 – 192.168.255.255 B. 172.16.0.0 – 172.31.255.255 C. 10.0.0.0 – 10.255.255.255 D. Any of the above Answer: A : 192.168.0.0 Why? Lets calculate In the First series the total number of combinations will be 0.0 – 255.255 = 256*256 = 65535 In the Second series the total number of combinations will be 16.0.0 – 31.255.255 = 16*256*256 In the Third series the total number of combinations will be 0.0.0 – 255.255.255 = 256*256*256 So, 1st rage is the maximum we need for 600 devices And to avoid wastage, we avoid using the bigger series as we will never need the rest of the addresses If you try to reach @ 127.0.0.1 without being connected to any Wireless/Wired network, will you be able to reach it? A. Yes B. No Answer: Yes : As 127.0.0.1, also known as Localhost/Loopback address, is the address of your own device (i.e the device with is trying to reach), hence, it doesn’t need to be connected to any Wireless/Wired network as the device is always connected to itself.