Friday 1 June 2012

Chapter 1: Network Foundations

Note: I have discontinued this blog. Instead I have started a FREE video series on CCNA in YouTube. You can find it here. 


What is a Network?

In short, network is a collection of devices connected together that can communicate with each other! Here the key word is 'CONNECTED'. This connection is called a NETWORK.


If you notice in the image above, there are devices of different types, devices with different operating systems. Yet they all can communicate effortlessly over the network. This is the beauty of a computer network and what makes this so beautiful is what you will learn during the course of this training.

As an analogy, lets imagine how messages were sent in the olden days. A king writes a message and hands it to one of of his messenger. The messenger then rides a horse through the roads and delivers the message to the recipient. If we compare this to a computer network, the roads through which the messenger travelled represents the network! The message which the messenger carried are the network packets of information! That is the simplest explanation to describe a NETWORK!!!

Seems very interesting. Can you explain how it works?

For any device to connect with any other device, there needs to be a medium of connection. This medium is called a Network Interface Controller (NIC). The most common NIC available today is an ethernet card as given in the image below:

Another type of NIC is the Wireless card more commonly found on laptops, netbooks, tablets and mobile phones! Wired or wireless NIC has the same function - Connect the device to the NETWORK!

What are the types of Networks? Any ideas?

Well there are 5 major types of networks:
  1. PAN (Personal Area Network)
  2. LAN (Local Area Network)
  3. WAN (Wide Area Network)
  4. MAN (Metropolitan Area Network)
  5. Internet (The mother of all networks!)
Personal Area Network (PAN):
A personal area network is a computer network revolving around an individual. It could as simple as a computer connected to a printer! This is the smallest chunk of a network!
NO STUPID QUESTION: What about a blue-tooth headset connected to your mobile phone? Yes, that is also a PAN!   

Local Area Network (LAN):
A local area network is a group of computers used in a local area, like an office or a department or a building. There is no limit to the number of computers in a LAN. The only thing defining a LAN is the size of the area, which needs to be geographically small, at most limiting it to a building.

Metropolitan Area Network (MAN):
A metropolitan area network is a group of computers extending to a single city.

Wide Area Network (WAN):
A wide area network is a group of computers spanning a wider area! It is a collection of two or more MANs.

Internet:
It is a collection of many WANs. It is the biggest network in the world, spanning the whole world!

Interesting, but you still did not tell us how it communicates!

Devices identify and communicate over the network using IP Addresses and respective protocols.

What is an IP Address?

  1. An IP Address is a unique identifier for each device in a network
  2. It is a 32bits binary number (example: 11010010 11100001 00010100 10101010)
  3. The most popular way of representing this address is by Dotted Decimal form, which is separating every 8bit by a DOT(.) and converting each 8 bit to its decimal equivalent (example: 192.168.1.1)
  4. Of the 32bits, some represent the network portion and other remaining the host portion (as explained later in the chapter)
Before we go any further, lets learn a bit about binary maths! A detailed explanation will be given in chapter: 'Day 5: Binary Maths'.

In the decimal number system (the one we use in everyday life) we have digits 0,1,2,3,4,5,6,7,8,9. They are a total of 10 digits and that is why it is called DECIMAL derived from the greek word 'δέκα', meaning TEN! Starting from 0 if we keep adding 1, it goes on till 9. After nine since we do not have a digit, we add 1 to the number on the left and reset the number to 0 and that is how we get 10! But BINARY has only 0 and 1, so if we keep increasing after 1, using the same rule add 1 to left and reset that digit to 0. As an example, lets see both the system:

DECIMAL                BINARY
0000                      0000
0001                      0001
0002                      0010
0003                      0011
0004                      0100
0005                      0101
0006                      0110
0007                      0111
0008                      1000
0009                      1001
0010                      1010
0011                      1011
0012                      1100
0013                      1101

So on so forth...

As explained above, an IP Addresses is a 32 bit binary number. Doing a bit of binary maths, we know with 32bits the biggest number is 4,294,967,296!!! (Got using the formulae: 2^[number of bits]). That means that you can have a maximum of 4,294,967,296 unique ip addresses. That is ip address going from:

00000000 00000000 00000000 00000000 (0.0.0.0)
00000000 00000000 00000000 00000001 (0.0.0.1)
00000000 00000000 00000000 00000010 (0.0.0.2)
00000000 00000000 00000000 00000011 (0.0.0.3)
00000000 00000000 00000000 00000100 (0.0.0.4)
00000000 00000000 00000000 00000101 (0.0.0.5)
00000000 00000000 00000000 00000110 (0.0.0.6)
00000000 00000000 00000000 00000111 (0.0.0.7)
00000000 00000000 00000000 00001000 (0.0.0.8)
TO
00000000 00000000 00000000 11111111 (0.0.0.255)
00000000 00000000 00000001 00000000 (0.0.1.0)
TO
00000000 00000000 00000001 11111111 (0.0.1.255)
00000000 00000000 00000010 00000000 (0.0.2.0)
TO
00000000 00000000 11111111 11111111 (0.0.255.255)
00000000 00000001 00000000 00000000 (0.1.255.255)
this will continue until all bits become '1'
11111111 11111111 11111111 11111111 (255.255.255.255)

But managing such a long list of ip address is a little tedious and impractical. For this reason ip addresses were broken down to classes

IP Address Classes


IP Addresses are grouped in classes depending on the first number in the Dotted Decimal as follows:

  • If the number is between 0 - 127 : CLASS A
  • If the number is between 128 - 191 : CLASS B
  • If the number is between 192 - 223 : CLASS C
  • If the number is between 224 - 239 : CLASS D (Reserved)
  • If the number is between 240 - 255 : CLASS E (Reserved)

So the ip address: 192.168.1.1 is a CLASS C address, identified by the first number: 192!

Another one: 10.1.4.5 ? YES, CLASS A it is!!!
Okay one more: 172.16.1.1 ? Brilliant, it is indeed CLASS B!

IP Address Subnet Mask

If we look closely at any IP Address, they comprise of two parts!
NETWORK and HOST

It is like any email address: xyz@abc.com. So when you send an email, your email server first checks the domain you are sending the email to, which in this example is 'abc.com'. If your email server is also part of 'abc.com' then it knows it is a local email address and sends it to the relevant inbox. If it is on a different server than your email server, it send it out to its external gateway to be routed to the 'abc.com' domain. (NOTE: This is an overtly simplified process of how an email system works. This is just for explanation.)

Devices also communicate similarly as the above email example. If a packet (message) is sent from one computer to another, it first checks the NETWORK part of the ip address to see if it is in the same network. If it is, then it sends it to the local address. If it is not on the same network, it sends it out to the gateway to route it to the correct address.

But how does the device know which is the NETWORK and which is the host! That is where we make use of the SUBNET MASK. A network device compares the IP address along with the Subnet Mask, and identifies's the Network bits corresponding to the '1s' in the subnet mask and Host bits corresponding to the '0s' of the subnet mask. Lets look at an example. This is a CLASS C ip address and the CLASS C subnet mask is: 255.255.255.0

IP Address:    192.168.1.1     (11000000 10101000 00000001 00000001)
Subnet Mask: 255.255.255.0  (11111111 11111111 11111111 00000000)
----------------------------------------------------------------------------
If we AND the two together:  (11000000 10101000 00000001 00000000)

This will tell the device that '192.168.1' is the NETWORK and '.1' is the HOST. The host bits (the last 8 bits) can go from all '0s' to all '1s'! Doing a bit of binary maths, on the 8 bits available for HOSTs, we can have a maximum of 2^8=256 ip addresses! That is:

192.168.1.0 ---> Network IP
192.168.1.1
192.168.1.2
192.168.1.3
192.168.1.4
till
192.168.1.254
192.168.1.255 ---> Broadcast IP 

NOTE: Keep in mind that in any ip address, if all the HOST bits are '0s' it is the NETWORK address and if all the HOST bits are '1s' it is the BROADCAST address. These addresses cannot be used to assign any hosts. So the total number of VALID HOSTs in any network is got by the formulae: 2^(number of bits) - 2

Subnet Mask List for each Class:
Class A - 255.0.0.0 (24bits for HOST, that is 16,777,214 hosts)
Class B - 255.255.0.0 (16bits for HOST, that is 65,534 hosts)
Class C - 255.255.255.0 (8bits for HOST, that is 254 hosts)

As seen above, we have to decide on the best suited IP Address class to use for our network depending on the number of devices in our network. Using a class A ip addressing scheme for an office with only 4 devices would be wasting 16,777,210 ip addresses!!!

This is just a summary. Later in the course, when we do Subnetting, we will look into IP Address Classes in more detail. Use this chapter to understand the structure of an IP ADDRESS!

Summary

Alright that would be all for DAY 2! Let us summarize on what we learnt today!

  1. Definition of a Network
  2. How a network works
  3. Types of Network
  4. What is an IP Address
  5. What are IP Address Classes
  6. What is an IP Subnet Mask

Fastest Finger First


A) What is a NETWORK?
  1. Devices connected together that can communicate with each other
  2. Devices disconnected
  3. Devices connected, but cannot communicate
  4. None of the above
B) How many bits does an IP Address have?
  1. 16
  2. 8
  3. 24
  4. 32
C) What is a subnet mask?
  1. A 32 bit number to identify a device
  2. A 32 bit number to differentiate between Network and Host of an IP Address
  3. A 32 bit number to identify a computer
  4. A 4 digit decimal number
D) How many valid hosts can we have in a Class B IP Address?
  1. 254
  2. 65534
  3. 16777214
  4. 4294967296

Thank You!

If you have any queries, post it as a comment below. I will answer all your queries. Also as soon as you complete today's class, give the correct answers for FASTEST FINGER FIRST in the comment section below.

3 Comments:

At 23 May 2017 at 15:18 , Blogger juanjuergens said...

I would like to say that this blog really convinced me to do it! Thanks, very good post.
ccna training london

 
At 7 April 2018 at 13:57 , Blogger jacob john said...

The article is well written and easy to understand. Thank you. I am planning to do CCNA course in Abu Dhabi

 
At 19 February 2022 at 22:39 , Blogger vijay said...

Thanks for the article. Check out CCNA blog. For CCNA Practice Tests check out this site.

 

Post a Comment

Subscribe to Post Comments [Atom]

<< Home