In the computer networking world, there are two types of addressing schemes needed to get the communication done between two hosts. The first is physical addressing called MAC address and the other is logical addressing called IP address. Here in this article we are going to discuss the fundamentals of IPv4 addressing and routing.

What is IPv4 addressing?

An IP address is a numeric identifier to each machine on an IP network to specify the location of a device on the network. IPv4 address is a software based address, unlike MAC address which is a physical address of a host. IPv4 address is a 32 bit binary numbering system and it’s mostly stored as a text file but displayed as a human understandable concept as a series of numbers, like (a class B IPv4 address).

CCNA Training – Resources (Intense)

Below is the binary representation of the class B IP address

IPv4 is a connectionless datagram protocol which means it is unreliable and works on a best-effort delivery service.

Due to the huge growth of Internet, the IETF standardized a new 128 bit long version called IP v6 addressing scheme. Soon it will be the new addressing scheme used all over the world in the near future.

IP Terms:

Bit: A bit can have only a one-digit value, either 1 or 0.

Byte & Octet: According to IEEE, A Byte is a set of adjacent bits operated on as a group. An octet is made up of a set of 8 bits, just an ordinary binary number.

Network address: Network address gives network nodes a unique identity to communicate with each other.

Broadcast address: This is the address used by applications and hosts to send the information to all nodes on a specific sub network.

Range of IP addresses classes:

The IP address consists of a 32 bit number that ranges from 0 to 4294967295, meaning approximately 4.3 billion unique objects. To make such large address blocks easier to handle, it was divided into four 8 bit numbers or octets. In the diagram below, it shows that 50% of addresses are class A addresses, and 25% are class B addresses:

IP addressing contains two parts: Network ID and Host ID. Network ID is the network portion of an IP address. The Host addresses/Host ID is the portion of the address used to identify hosts on the network. For a Class A network, the first 8 bits refers to the Network ID and other 24 bits is the Host ID. For a Class B network, the first two 2 octets is the Network ID and the next two octets the Host ID. In a Class C network, the first 3 octets is the Network ID and the last octet is the Host ID.

The figure below shows the segregation of octets that make up the Network and Host IDs for each network class:

Byte 1 Byte 2 Byte 3 Byte 4

Class A



Class B



Class C



Class D

Multicast address

Class E

Reserved for Future use

The designers of the Internet created classes of networks based on network size. Class A is meant for a small network with a large number of hosts while Class C is meant for a large network with a small number of hosts. The diagram below, you can see that Class A network starts with 0: the first bit of the first octet will always be 0 and other 7 bits will change in the Network ID. For Class A network, the number of networks will be 126.

Characteristics of the IP Address Classes


Address Range

Identity Bits (binary Value)

Bits in Network ID

Number of Networks

Bits in Host ID

Number of Hosts\ Network


0 ~ 127

1 (0)






128 ~ 191

2 (10)






192 ~ 223

3 (110)





Class full network & Classless Network:

IP addresses with default CIDR values are considered as class full addresses whereas IP addresses with CIDR values other than the default are considered as Classless network.

Ex: /24 is a class full network while is a classless network.

Sub network/Subnet:

A sub network/subnet is a logical division of a larger network into a smaller network. By using subnetting techniques, a network designer can reduce network traffic and manage the network better to enhance its performance.

Subnet Mask:

Subnet mask is a 32-bit value that allows the recipient of IP packets to distinguish the network ID portion of the IP address from the host ID portion of the IP address. The first octet of a subnet mask if all are 1 means the binary number 11111111 converts into a decimal number which is 255. For that reason, the subnet mask of Class A network address is, as seen in above diagram.

Figure 5 clearly shows that why 255 is used.

Public and Private IP address:

Besides the reserved IP address ( and there are other addresses not used on the Public Internet. These addresses are called Private IP addresses which are usually used for the internal network of an Enterprise. Network Address Translation (NAT) is needed because private IP addresses are not routable on the Public Internet, so they must be translated into public IP addresses before they touch the Internet.

  • ( to
  • ( to
  • ( to
  • ( to

Fundamentals of IP routing:

Subtopics of this article will help you to understand the principles behind IP routing and how it works in the computer networking industry.

IP routing is required to send data from one network to another network. It’s a Layer 3 protocol, which means a Layer 3 device router is needed to enable communication.

IP Routing can be classified into two parts:

  1. Static Routing: In static routing, the network admin needs to manually add routes to each router’s routing table. Static Routing is good for very small networks, where only a few routers need to be configured. But if the network grows it is quite impossible for a network engineer to add, modify and delete the route into each router’s routing table manually.
  2. Dynamic Routing: Dynamic routing is when protocols are used to find networks and update routing tables on a router.

    Dynamic routing can be classified into two parts: Interior Gateway Protocol (IGP) and Exterior Gateway Protocol (EGP).

IGP: Interior Gateway protocol is a routing protocol that is used to exchange routing information within the same autonomous system (AS).

EGP: Exterior Gateway protocol is used to determine network reachability between autonomous systems.

IGP can be divided into two categories: distance-vector routing protocol and link- state routing protocol.

RIP and IGRP is an example of a distance-vector routing protocol, which uses the Bellman-ford algorithm. In distance-vector routing protocol, each router does not possess information about the full network topology. It advertises its distance vector (DV) calculated from other routers and receive similar advertisements from other routers. Unless any changes happen in routing advertisement, each router populates its routing table.

In the next cycle, a router updates its information from its routing table. This process continues until the routing tables of each router converge in stable values. The diagram below shows the flow diagram of different routing:

Routing Information Protocol:

  • RIP employs hop count as a routing metric.
  • The maximum number of hops is 15 and AD is 120, and it retransmits all routing information to its neighbor every 30 seconds.
  • RIP uses UDP as its transport protocol, assigned to the reserved port number 520.

There are two versions of RIP:

RIP V1: Supports only class full routing, lacks support for VLSM, and does not provide any support for router authentication.

RIPV2: Supports Classless Inter Domain Routing (CIDR) and also supports multicast (multicast at It also allows MD5 authentication which means it’s more secure than RIPV1.

Interior Gateway Routing Protocol (IGRP) is a distance vector interior routing protocol invented by Cisco. It is basically designed to overcome the limitations of RIP. It also exchanges routing data within an autonomous system.

Enhanced Interior Gateway Routing Protocol (EIGRP):

  • EIGRP is a Cisco proprietary hybrid protocol, which means its uses Distance vector and link state algorithm. It is an IP based and IP protocol No 88 and its layer 3 protocol.
  • Most of the routing optimizations are based on Diffusing Update Algorithm (DUAL), which provide loop-free operation and fast convergence time. Back up route also uses DUAL algorithm.
  • It supports Classless Inter Domain Routing (CIDR), but by default summarization is on, which means only class full network advertisements can be sent. For that reason, a network administrator needs to disable auto summarization to use CIDR.
  • It sends query for alternate route if no feasible successor is found.
  • By default maximum hop count for EIGRP is 100, but it can be set from 1 to 255. The hop count does not need to calculate the best path; it is mainly used for preventing unwanted routing loops.
  • It supports equal load balancing up to 4 hops/links and supports unequal load balancing up to 16 hops.
  • EIGRP multicasts at and convergence time of EIGRP is lower than OSPF and RIP (EIGRP<OSPF<RIP).

Metric values are:

Metric Value Range
  1. 4.2 M
  1. 4.2 M
Load 1-255
Reliability 0-255
MTU 1-65535

In order to maintain neighbor-ship in EIGRP, this point should be fulfilled:

  • Hello Packet should be received.
  • Primary subnet should be matched.
  • Packets should be coming from the same Autonomous System.
  • Identical K Values should be matched
  • Authentication should be matched.

When neighbor-ship is done, the router sends the full routing table for the first time and after that, only partial updates are sent to its neighbor. Hello timer of EIGRP is 5 sec and Hold time is 15 sec.

IPX, APPLE TALK, IPV6 also supports EIGRP.

Open Shortest Path First:

Open Shortest Path First protocol is an open standard IP based routing protocol which uses IP protocol no-89. It works in Layer 3 of an OSI layered structure network.

OSPF is the largest used IGP protocol used in large enterprise networks.

OSPF designed to support Variable Length Subnet Mask or CIDR addressing models.

It multicasts at and IP addresses, hello packets normally send in addresses, and is used to send message to BR/BDR.

An OSPF domain is divided into different areas; several types of Area are defined, such as Backbone area, Stub area, and non-stub area. The diagram below illustrates the router of Area Border Routing (ABR) and ASBR.

Border Gateway Protocol (BGP):

  • Border Gateway routing protocol is a scalable and reliable (security is high) protocol. It’s basically used in an ISP’s network.
  • Millions of routers are connected together using BGP protocol, so it’s very slow to reach convergence.
  • BGP provides manual unicast neighbor ship, but supports IPv4 and IPv6 multicast.
  • It works in Layer 7, so it is an application layer routing protocol. It works based on Autonomous system routing. It works on TCP based protocol no. 179.

BGP message types:

  1. Keep alive: maintain neighbor ship, Hello message timer 60 sec, Hold message time is 180 Sec)
  2. Update message: network layer reachability information exchange
  3. Open message: give formal introduction
  4. Notification: bad usage of message type

To establish BGP neighbor-ship, the router needs to check:

  • IGP (reachability)
  • AS/IP
  • Authentication
  • Router ID
  • Same BGP version

When Autonomous System (AS) is the same then IBGP is used, otherwise EBGP is used.


  1. CCNA study guide by Todd Lamle.
  2. CCNA study guide by Richard Deal.