Monday, August 5, 2019

CCNA LESSON 6 - IP ADDRESSING

6.IP Addressing


IP Addressing



An IP address is a numeric identifier assigned to each machine on an IP network. It designates the specific location of a device on the network. An IP address is a software (logical) address, not a hardware (physical) address, the latter is hardcoded on a network interface card (NIC) and used for finding hosts on a local network. IP addressing was designed to allow hosts on one network to communicate with a host on a different network regardless of the type of LANs the hosts are
participating in.


IP Terminology


Throughout this chapter you’ll learn several important terms vital to your understanding of the Internet Protocol. Here are a few to get you started:


  1. Bit: A bit is one digit, either a 1 or a 0.
  2. Byte: A byte is 8 bits.
  3. Octet: An octet, made up of 8 bits, is just an ordinary 8-bit binary number.
  4. Broadcast address: The address used by applications and hosts to send information to all nodes on a network is called the broadcast address.

IPv4 Address Syntax

If you want to provide an IPv4 addresses using binary representation, then each address would appear as a 32-digit string of 1s and 0s. Such binary strings of 1s and 0s are very difficult to remember, so they are represented using dotted decimal notation, in which periods or dots are used to separate four decimal numbers from 0 to 255. Each decimal number, known as an octet, represents 8 bits i.e. 1 byte of the 32-bit address.

For example, the binary string of IPv4 address 11000000101010000000000000000001 is presented in dotted decimal as 192.168.0.1. To convert an IPv4 address from binary notation to dotted decimal
notation, you:

  • Segment it into 8-bit blocks: 11000000 10101000 00000000 00000001
  • Convert each block to decimal: 192 168 0 1
  • Separate the blocks with periods:192.168.3.24 show the conversion of binary notation to dotted decimal notation.

Subnet Mask

Subnet Mask is used to differentiate Network ID and Host ID from a given IP address.
A subnet is a subdivision of a network address that can be used to represent a part of a larger network.
A subnet mask is a 32 bit number that masks an IP address and divides the IP address into network address and host address.

The default subnet masks for the different address classes are:


Class A 255.0.0.0
Class B 255.255.0.0
Class C 255.255.255.0
Class D 255.255.255.255
Class E underdeveloped


In Subnet Mask the network bit is set as 1's and host bit is set as 0's. The subnet mask specifies the bits of the IP address that are for network identifier and host identifier. For a Class A address, the default subnet mask value is 255.0.0.0 where 255 is the network address portion whose binary form is 1111111 and 0 is the host address portion whose binary form is all 0's i.e. 00000000. So the mask of 255.0.0.0 in binary form will be: 11111111.00000000.00000000.00000000 This mask shows that there are 8 bits in the first block that is the network identifier bits and remaining 24 bits are the host identifier Within a given network, two host addresses are reserved for special purpose, and cannot
be assigned to hosts. The "0" address is assigned a network address and "255" is assigned to a broadcast address, and they cannot be assigned to hosts.


Network Addressing


  • Each network is uniquely identified by a network address which is also called the network number. Every machine on the same network shares that network address as part of its IP address. In the IP address 172.16.30.56, for example, 172.16 is the network address.
  • The node address is assigned and uniquely identifies, each machine on a network.
  • This part of the address must be unique because it identifies a particular machine, an individual as opposed to a network, which is a group. This number can also be referred to as a host address. In the sample IP address 172.16.30.56, the 30.56 is the node address.
  • To ensure efficient routing, Class A network address always starts with a 0, the router might be able to speed a packet on its way after reading only the first bit of its address.
  • This is where the address schemes define the difference between a Class A, a Class B, and a Class C address. Classes A, B, and C are the only ranges that are used to address hosts in our networks.


Classes of Addresses


• The developers of the internet planned to create classes of networks as
per there network size.
• The classes of network are as mentioned below:

1. Class A
2. Class B
3. Class C
4. Class D
5. Class E
Summary of the three classes of networks

Class A


  • In a Class A addressing structure the first block or byte is assigned to the network address and the remaining three blocks or bytes are allocated for the host address. The Class A network and host combination is: NETWORK.HOST.HOST.HOST
  • As Class A has first block or byte for network address so the total network ID in form of bits present for Class A is NetworkID = 8 bits whereas for host ID there are 3 blocks or bytes i.e. HostID = 3x8 = 24 bits
  • In Class A the first bit of the first block or byte must always be off or 0. So considering the following network address: 0xxxxxxx
  • Here the x can replace by 0 or 1, so if we replace x with all 0 and then with 1, then we will find the range of Class A network addresses:

00000000 = 0
01111111 = 127


• Hence the range stand between 0 to 127 for Class A, but the complication
is that the network address of all 0's i.e. 00000000 is reserved for default
route and the 127 is reserved for loop back address used for diagnostics,
thus this both number cannot be used for specifying Class A network
address. Henceforth Class A range is 1 to 126.
• With the first bit of the first byte reserved there remains the 7 bit out of 8
for addressing. As a result the total network that can be obtained from
Class A is: 27 = 128
• Here form 128 we have to minus 2 as 0 and 127 is not used as they are
reserved. So the total is 128-2 = 126 network.
• Class A has 3 bytes for host address, So that total host address found in
Class A is: 224-2 = 16,777,214 host


Class B


In a Class B addressing structure the first two block is assigned to the network address and the remaining two blocks are allocated for the host address. The Class B network and host combination is: NETWORK.NETWORK.HOST.HOST
As Class B has first two block for network address so the total network ID in form of bits present for Class B is NetworkID = 2x8 = 16 bits whereas for host ID there are two blocks i.e. HostID = 2x8 = 16 bits
In Class B that RFCs state that the first bit of the first byte must always be turned on or set to 1 and the second bit to off or 0. So considering the following network address: 10xxxxxx
Here the x can replace by 0 or 1, so if we replace x with all 0 and then with 1, then we will find the range of Class B network addresses:

10000000 = 128
10111111 = 191

Hence the range of Class B is 128 to 191.

• With the network address of 2bytes where network address start with binary digit 1 then 0 thus 2 bit minus from the first 2 byte i.e. 16 bits leaves with 14 bit for addressing.• As a result the total network that can be obtained from Class B is: 214 = 16384 network
• Class B has 2 bytes for host address, So that total host address found in Class B is: 216-2 = 65534 host


Class C


• In a Class C addressing structure the first 3 bytes are allocated to the network address and the remaining 1 byte is dedicated for the host address. The Class C network and host combination is: NETWORK.NETWORK.NETWORK.HOST
• As Class C has first 3 byte for network address so the total network ID in form of bits present for Class C is NetworkID = 3x8 = 24 bits
• whereas for host ID there are 1 bytes so HostID = 8 bits
• In Class C that RFCs state that the first 3 bit of the first byte must always be turned on or set to 1 and the third bit to off or 0.
• So considering the following network address: 110xxxxx
• Here the x can replace by 0 or 1, so if we replace x with all 0 and then with 1, then we will find the range of Class C network addresses:

11000000 = 192
11011111 = 223
• Thus the range of Class C is 192 to 223.


In Class C network address, the first 3 bit is set to the binary 110. So first 3 bytes or 24 bits NID minus 3 bit leaves with 21 bits. As a result the total network that can be obtained from Class C is: 221 = 2,097,152 networkClass C has 1 byte for host address, So that total host address found in  Class C is: 28-2 = 254 host


Class D

In Class D that RFCs state that the first 4 bit of the first byte must always be turned on or set to 1, so considering the following network address: 1110xxxxHere the x can replace by 0 or 1, so if we replace x with all 0 and then with 1, then we will find the range of Class D network addresses:

11100000 = 224
11101111 = 239

The address 224 to 239 is range of Class D which used for multicast addresses


Class E


The remaining range i.e. from 240 to 255 is of Class E, which is used for research and development.
IP Address Classes with the parameters


Public IP Addresses


A public IP address is assigned to every computer that connects to the Internet where each IP is unique. Hence there cannot exist two computers with the same public IP address all over the Internet.This addressing scheme makes it possible for the computers to “find each other” online and exchange information .User has no control over the IP address (public) that is assigned to the computer.
The public IP address is assigned to the computer by the Internet Service Provider as soon as the computer is connected to the Internet gateway.
A public IP address can be either static or dynamic. A static public IP address does not change and is used primarily for hosting web pages or services on the Internet. And another one a dynamic public IP address is chosen from a pool of available addresses and changes each time one connects to the Internet. Most Internet users will only have a dynamic IP assigned to their computer which goes off when the computer is disconnected from the Internet. Thus when it is re-connected it gets a new IP.



Private IP Addresses


The designers who created the IP addressing scheme also created private IP addresses. These addresses can be used on a private network, but they’re not routable through the Internet. This is designed for the purpose of creating a measure of well-needed security, but it also conveniently saves valuable IP address space.
Just think if every host on every network had to have real routable IP addresses, we would have run out of IP addresses to hand out years ago. But by using private IP addresses, ISPs, corporates, and home users only need a relatively tiny group of bonafide IP addresses to connect their networks to the
Internet. This seems to be economical because they can use private IP addresses on their internal networks and get along just fine.
To do so you can use Network Address Translation (NAT), which basically takes a private IP address and converts it for use on the Internet.
Many people can use the same real IP address to transmit out onto the Internet.
Doing things this way saves megatons of address space-good for us all!


Loopback IP Addresses


Loopback address is a special IP number i.e. 127.0.0.1 that is designated for the software loopback interface of a machine. The IP address range 127.0.0.0 – 127.255.255.255 is reserved for loopback, i.e. a Host’s self-address, also known as localhost address. This loopback IP address is managed entirely by and within the operating system. Loopback addresses, enable the Server and Client processes on a single system to communicate with each other.

When a process creates a packet with destination address as loopback address, the operating system loops it back to itself without having any interference of NIC. Data sent on loopback is forwarded by the operating system to a virtual network interface within operating system. This address is mostly used for testing purposes like client-server architecture on a single machine.

Other than that, if a host machine can successfully ping 127.0.0.1 or any IP from loopback range, implies that the TCP/IP software stack on the machine is successfully loaded and working.

No comments:

Post a Comment

CCNA LESSON 10. BASIC CISCO ROUTER CONFIGURATION

  10.Basic Cisco Router Configuration Basic configuration of Router • While configuring the router you should be in the global mode i....