Tuesday, April 4, 2017

IPV4 Addresses

IPv4 Addresses
IP addresses develop by IETF (Internet Engineering Task Force).

IP is network layer routed protocol, which are use for numeric identification of a device on TCP/IP network.
  • Binary numeric system: represent data in bits 0 or 1
  • Decimal numeric system: represent data in digits, 0-9
  • Hexa decimal numeric system: represent data in 0-9 and A-F

Mac address is a hexa decimal format, which consist of 12 hexa (48 bits). 1 Hexa=4bits. Authorized by IEEE (Institute of Electrical Electronic Engineering).
  • First 6 hexa of Mac address called OUI (Organization Unique Identifier), we can’t change it
  • Second 6 hexa of Mac address called vender assign numbers

We have five classes of IP addresses: A, B, C, D, E

Class A: Range (0-127). Rule: first bit of first byte must be off, at least one bit from the remaining must be on. Ex: 01000000.
Total network and host in class A: 2n-1, where n=number of network bits. 28-1 -2=27-2=126 (networks).
2P-2, where p=number of host bits. 224 -2=16777214 (hosts).
Class B: Range (128-191). Rule: first bit of first byte must be on second bit of first byte must be off, remaining bits may be on or off. Ex: 10111001.
Total network and host in class B: 2n-2, where n=number of network bits. 216-2=214 =16384  (networks).
2P-2, where p=number of host bits. 216-2=65534 (hosts).
Class C: Range (192-223). Rule: first bit of first byte must be on second bit of first byte must be on third bit of first byte must be off, at least the remaining bits may be on or off. Ex: 11010000.
Total network and host in class C: 2n-3, where n=number of network bits. 224-3=221=2097152 (networks).
2P-2, where p=number of host bits. 28-2=254 (hosts).
Class D: Range (224-239). Use for multicasting, no network and host portion.
Class E: Range (240-255). Reserved for IETF, use for research purposes. No network and no host portion.
Subnet mask: Define the network and host portion, in subnet mask on bits are called network portion and off bits are called host portion.
Ex: 192.168.1.0 255.255.255.0/24
CIDR: (Classless inter domain routing) or Prefix, /24.
Private and Public IPs
Private IPs: 192.168.0.0-192.168.255.255, 172.16.0.0-172.31.255.255, 10.0.0.0-10.255.255.255. Except these IPs all IPs are called Public IPs.
Understanding the power of 2: Power of 2 is important to understand and memorize for use with IP subnetting.
21=2, 22=4, 23=8, 24=16, 25=32, 26=64, 27=128, 28=256, 29=512, 210=1024, 211=2048, 212=4096, 213=8192, 214=16384 etc.

No comments:

Post a Comment