Published in


What is an IP and its Routing Protocols ? Everything You should Know about


What is Computer Network ?

  • Computer Network is a group of computers connected with each other through wires, optical fibres or optical links so that various devices can interact with each other through a network
  • The aim of the computer network is the sharing of resources among various devices.
  • In the case of computer network technology, there are several types of networks that vary from simple to complex level.

What the heck is OSI && TCP/IP ?

The International Standard Organization has a well-defined model for Communication Systems known as Open System Interconnection, or the OSI Model. This layered model is a conceptualized view of how one system should communicate with the other, using various protocols defined in each layer. Further, each layer is designated to a well-defined part of communication system. For example, the Physical layer defines all the components of physical nature, i.e. wires, frequencies, pulse codes, voltage transmission etc. of a communication system.

OSI model is a generic model that is based upon functionalities of each layer. TCP/IP model is a protocol-oriented standard.OSI model gives guidelines on how communication needs to be done, while TCP/IP protocols layout standards on which the Internet was developed. So, TCP/IP is a more practical model.

TCP/IP is a model for describing how communication across networks typically occurs from the application layer of a source machine (HTTP), through to the physical layer, through to the destination machine and an application layer on that machine receiving a packet.

A majority of the internet uses a protocol suite called the Internet Protocol Suite also known as the TCP/IP protocol suite. This suite is a combination of protocols which encompasses a number of different protocols for different purpose and need. Because the two major protocols in this suites are TCP (Transmission Control Protocol) and IP (Internet Protocol), this is commonly termed as TCP/IP Protocol suite. This protocol suite has its own reference model which it follows over the internet. In contrast with the OSI model, this model of protocols contains less layers.

What Is An IP Address?

An IP address is a string of numbers assigned to computers, routers, servers, pretty much anything connected to the internet, including websites. It works much like a regular address, pinpointing the location of any device or system in the network around the world. IP stands for Internet Protocol. IP addresses are used in the TCP/IP Protocol to help devices, routers, and servers communicate with each other.

When it comes to actual websites, this string of numbers is masked by a domain URL, making it easier for people to remember.

IP vs Mac Address :

MAC Address stands for Media Access Control Address. IP Address stands for Internet Protocol Address. MAC Address ensure that physical address of the computer is unique. IP Address is a logical address of the computer and is used to uniquely locate computer connected via a network. in this one we are going to focus on only ip address

Types : IPv4 and IPv6

All devices and network systems have an IPv4 IP address. This is a string of numbers in four groups separated by dots, called “dotted-decimal notation”. An IPv4 address looks like this:

There are around 4 billion IPv4 addresses and they are all mostly in use, rotated and renewed. A few years ago, between 2011 and 2018, IPv4 addresses started running out. The Internet Protocol introduced IPv6 to add trillions of new addresses. IPv6 addresses include letters along with numbers and instead of dots to separate the sections, they use colons. An IPv6 address looks like this:


The transition from IPv4 to IPv6 is still in process and will take years to complete. Not all networks support IPv6 and most devices still use IPv4. Some large network providers and ISPs have adopted IPv6 while maintaining an alternate IPv4. There’s no official shut-off date for IPv4, it will keep existing as more and more ISP’s and large websites adopt IPv6 .

IPv4 :

Internet Protocol version 4 (IPv4) is the fourth version of the Internet Protocol (IP). It is one of the core protocols of standards-based internetworking methods in the Internet and other packet-switched networks. IPv4 was the first version deployed for production on SATNET in 1982 and on the ARPANET in January 1983.

Internet Protocol being a layer-3 protocol (OSI) takes data Segments from layer-4 (Transport) and divides it into packets. IP packet encapsulates data unit received from above layer and add to its own header information

IP header includes many relevant information including Version Number, which, in this context, is 4. Other details are as follows −

  • Version − Version no. of Internet Protocol used (e.g. IPv4).
  • IHL − Internet Header Length; Length of entire IP header.
  • DSCP − Differentiated Services Code Point; this is Type of Service.
  • ECN − Explicit Congestion Notification; It carries information about the congestion seen in the route.
  • Total Length − Length of entire IP Packet (including IP header and IP Payload).
  • Identification − If IP packet is fragmented during the transmission, all the fragments contain same identification number. to identify original IP packet they belong to.
  • Flags − As required by the network resources, if IP Packet is too large to handle, these ‘flags’ tells if they can be fragmented or not. In this 3-bit flag, the MSB is always set to ‘0’.
  • Fragment Offset − This offset tells the exact position of the fragment in the original IP Packet.
  • Time to Live − To avoid looping in the network, every packet is sent with some TTL value set, which tells the network how many routers (hops) this packet can cross. At each hop, its value is decremented by one and when the value reaches zero, the packet is discarded.
  • Protocol − Tells the Network layer at the destination host, to which Protocol this packet belongs to, i.e. the next level Protocol. For example protocol number of ICMP is 1, TCP is 6 and UDP is 17.
  • Header Checksum − This field is used to keep checksum value of entire header which is then used to check if the packet is received error-free.
  • Source Address − 32-bit address of the Sender (or source) of the packet.
  • Destination Address − 32-bit address of the Receiver (or destination) of the packet.
  • Options − This is optional field, which is used if the value of IHL is greater than 5. These options may contain values for options such as Security, Record Route, Time Stamp, etc.

An IPv4 address class is a categorical division of internet protocol addresses in IPv4-based routing. Separate IP classes are used for different types of networks. … IP addresses are notated in four groups of three-digit representations of 8 bits of binary in base 10-formatted notation for a total of 32 bits.

IPv4 — Addressing :

Each IPv4-based network must have the following:

  • A unique network number that is assigned by either an ISP, an IR, or, for older networks, registered by the IANA. If you plan to use private addresses, the network numbers you devise must be unique within your organization.
  • Unique IPv4 addresses for the interfaces of every system on the network.
  • A network mask.

The IPv4 address is a 32-bit number that uniquely identifies a network interface on a system, as explained in How IP Addresses Apply to Network Interfaces. An IPv4 address is written in decimal digits, divided into four 8-bit fields that are separated by periods. Each 8-bit field represents a byte of the IPv4 address. This form of representing the bytes of an IPv4 address is often referred to as the dotted-decimal format.

The following figure shows the component parts of an IPv4 address,

Figure 2–1 IPv4 Address Format


Registered IPv4 network number. In class-based IPv4 notation, this number also defines the IP network class, Class B in this example, that would have been registered by the IANA.


Host part of the IPv4 address. The host part uniquely identifies an interface on a system on a network. Note that for each interface on a local network, the network part of the address is the same, but the host part must be different.

If you plan to subnet a class-based IPv4 network, you need to define a subnet mask, or netmask, as explained in netmasks Database.

The next example shows of the CIDR format address

Figure 2–2 CIDR Format IPv4 Address



Network part, which consists of the IPv4 network number that is received from an ISP or IR.


Host part, which you assign to an interface on a system.


Network prefix, which defines how many bits of the address comprise the network number. The network prefix also provides the subnet mask for the IP address. Network prefixes are also assigned by the ISP or IR.

An Oracle Solaris-based network can combine standard IPv4 addresses, CIDR format IPv4 addresses, DHCP addresses, IPv6 addresses, and private IPv4 addresses.

Designing Your IPv4 Addressing Scheme

This section describes the classes into which standard IPv4 address are organized. Though the IANA no longer gives out class-based network numbers, these network numbers are still in use on many networks. You might need to administer the address space for a site with class-based network numbers. For a complete discussion of IPv4 network classes, refer to Network Classes.

The following table shows the division of the standard IPv4 address into network and host address spaces. For each class, “Range” specifies the range of decimal values for the first byte of the network number. “Network Address” indicates the number of bytes of the IPv4 address that are dedicated to the network part of the address. Each byte is represented by xxx. “Host Address” indicates the number of bytes that are dedicated to the host part of the address. For example, in a class A network address, the first byte is dedicated to the network, and the last three bytes are dedicated to the host. The opposite designation is true for a class C network.

Table 2–1 Division of the IPv4 Classes


The numbers in the first byte of the IPv4 address define whether the network is class A, B, or C. The remaining three bytes have a range from 0–255. The two numbers 0 and 255 are reserved. You can assign the numbers 1–254 to each byte, depending on the network class that was assigned to your network by the IANA.

The following table shows which bytes of the IPv4 address are assigned to you. The table also shows the range of numbers within each byte that are available for you to assign to your hosts.

Table 2–2 Range of Available IPv4 Classes


IPv4 Subnet Number

Local networks with large numbers of hosts are sometimes divided into subnets. If you divide your IPv4 network number into subnets, you need to assign a network identifier to each subnet. You can maximize the efficiency of the IPv4 address space by using some of the bits from the host part of the IPv4 address as a network identifier. When used as a network identifier, the specified part of the address becomes the subnet number. You create a subnet number by using a netmask, which is a bitmask that selects the network and subnet parts of an IPv4 address. Refer to Creating the Network Mask for IPv4 Addresses for details.

Designing Your CIDR IPv4 Addressing Scheme

The network classes that originally constituted IPv4 are no longer in use on the global Internet. Today, the IANA distributes classless CIDR format addresses to its registries around the world. Any IPv4 address that you obtain from an ISP is in CIDR format, as shown in Figure 2–2.

The network prefix of the CIDR address indicates how many IPv4 addresses are available for hosts on your network. Note that these host addresses are assigned to interfaces on a host. If a host has more than one physical interface, you need to assign a host address for every physical interface that is in use.

The network prefix of a CIDR address also defines the length of the subnet mask. Most Oracle Solaris commands recognize the CIDR prefix designation of a network’s subnet mask. However, the Oracle Solaris installation program and /etc/netmask file require you to set the subnet mask by using dotted decimal representation. In these two cases, use the dotted decimal representation of the CIDR network prefix, as shown in the next table.

Table 2–3 CIDR Prefixes and Their Decimal Equivalent


For more information on CIDR addresses, refer to the following sources:

Using Private IPv4 Addresses

The IANA has reserved three blocks of IPv4 addresses for companies to use on their private networks. These addresses are defined in RFC 1918, Address Allocation for Private Internets. You can use these private addresses, also known as 1918 addresses, for systems on local networks within a corporate intranet. However, private addresses are not valid on the Internet. Do not use them on systems that must communicate outside the local network.

The following table lists the private IPv4 address ranges and their corresponding netmasks.

IPv4 Address Range


IPV6 :

Internet Protocol version 6 (IPv6) is the latest revision of the Internet Protocol (IP) and the first version of the protocol to be widely deployed. IPv6 was developed by the Internet Engineering Task Force (IETF) to deal with the long-anticipated problem of IPv4 address exhaustion. This tutorial will help you in understanding IPv6 and its associated terminologies along with appropriate references and examples.

it is a numeric label that is used to identify and locate a network interface of a computer or a network node participating in an computer network using IPv6. IP addresses are included in the packet header to indicate the source and the destination of each packet.

Why We needed V6 ? :

as we know Internet Protocol version 6 is a new addressing protocol designed to incorporate all the possible requirements of future Internet known to us as Internet version 2. This protocol as its predecessor IPv4, works on the Network Layer (Layer-3). Along with its offering of an enormous amount of logical address space, this protocol has ample features to which address the shortcoming of IPv4.

So far, IPv4 has proven itself as a robust routable addressing protocol and has served us for decades on its best-effort-delivery mechanism. It was designed in the early 80’s and did not get any major change afterward. At the time of its birth, Internet was limited only to a few universities for their research and to the Department of Defense. IPv4 is 32 bits long and offers around 4,294,967,296 (232) addresses. This address space was considered more than enough that time. Given below are the major points that played a key role in the birth of IPv6:

  • Internet has grown exponentially and the address space allowed by IPv4 is saturating. There is a requirement to have a protocol that can satisfy the needs of future Internet addresses that is expected to grow in an unexpected manner.
  • IPv4 on its own does not provide any security feature. Data has to be encrypted with some other security application before being sent on the Internet.
  • Data prioritization in IPv4 is not up to date. Though IPv4 has a few bits reserved for Type of Service or Quality of Service, but they do not provide much functionality.
  • IPv4 enabled clients can be configured manually or they need some address configuration mechanism. It does not have a mechanism to configure a device to have globally unique IP address.

Why not V5 ? :

Till date, Internet Protocol has been recognized has IPv4 only. Version 0 to 3 were used while the protocol was itself under development and experimental process. So, we can assume lots of background activities remain active before putting a protocol into production. Similarly, protocol version 5 was used while experimenting with the stream protocol for Internet. It is known to us as Internet Stream Protocol which used Internet Protocol number 5 to encapsulate its datagram. It was never brought into public use, but it was already used

features :

• Large Address Space: IPv4 has 32 bit (4-byte) address space, but IPv6 has 128-bit (16-byte) address space. The very large IPv6 address space supports a total of 2128 (3.4×1038) addresses. This large address space allow a better, systematic, hierarchical allocation of addresses and efficient route aggregation. With the large number of available addresses we can eliminate address-conservation techniques like NAT (Network Address Translation).

• Statefull and Stateless IPv6 address configuration: In IPv6 statefull or stateless configuration is possible. Hosts on a link can automatically configure with IPv6 addresses called link-local addresses and with addresses derived from prefixes advertised by local routers. When first connected to a network, a host sends a link-local router solicitation multicast request for its configuration parameters. The router which is available in the link responds to the request from the host with a router advertisement packet that contains network-layer configuration parameters. Hosts can configure link-local addresses automatically and communicate each other without manual configuration even there is no router available. The hosts may also have stateful configuration with the Dynamic Host Configuration Protocol version 6 (DHCPv6) or static configurations, as IPv4.

• Multicast: The three types of communication available in in IPv4 are unicast, multicast and broadcast. Unicast is one-to-one communication; multicast is one-to-many communication and broadcast is one-to-all communication. The transmission of a packet to all hosts was performed by using special broadcast addresses in IPv4. Broadcast communication is not available in IPv6 and therefore does not define broadcast addresses. In IPv6, the effect of broadcast can be achieved by sending a packet to the link-local all nodes multicast group at address ff02::1.

• Integrated Internet Protocol Security (IPSec): Internet Protocol Security (IPSec) is a set of Internet standards that uses cryptographic security services to provide Confidentiality, Authentication, Data integrity. The support for Internet Protocol Security (IPSec) was optional in IPv4. Internet Protocol Security (IPSec) is an integral part of the base protocol suite in IPv6. Internet Protocol Security (IPSec) support is mandatory in IPv6.

IPV4 vs IPV6 :

Types of IP Addresses

There a number of different types of IP addresses:

  • Dynamic
  • Static
  • Public
  • Private
  • Shared
  • Dedicated
  • Loopback


Dynamic IP addresses are addresses assigned by the Dynamic Host Configuration Protocol DHCP. These addresses are on a lease basis and change from time to time. Regular home routers and small networks usually have dynamic IP addresses. Simply put, it’s the common default provided by Internet Service Providers.


Static IP addresses are addresses that don’t change once they are assigned. They will stay the same until the device on the network is decommissioned. This type of IP address is assigned by the ISP and can come at a higher cost than the regular dynamic address. These are assigned to servers and other large network systems. They can also be assigned to particular devices but can have security risks if not configured properly or supported by security protocols.

In order to have a static address for your computer and devices you have to contact your Internet Service Provider and ask what options they offer as a service. You will need enough tech experience to keep your static IP address safe.

Public And Private

Public IP addresses are sometimes also referred to as External. This is the address that is assigned to a router or network and is used for external communications outside of its own network. When you use a tool like What is My IP Address, it will show your public address. Public addresses are only used by one router or network at a time. If it’s a dynamic address, it might be used by another router once the lease is up.

A private IP address also referred to as Local or Internal is assigned independently to all devices inside a network. This set of numbers is the same inside any network and is applied to each device in the order that they connect to the router/modem or server. What sometimes gets confusing is that a router, while it has a unique public IP address, will also have a Private address. The router’s private address will be the same for any router of that brand around the world. For example, Linksys routers use, D-Link and NETGEAR routers are set to and so on.

Let’s take, for example, a home and an office each with their own modem/router. Each of the routers will have its own Private AND Public IP address. If both the home and the office use a Linksys router, they will both have the same private address for their router. What will be different is their public IP address.

Individual devices communicate with the internet with the help of something called Network Access Translation NAT. What NAT does is help the network translate from the public address to all the different private addresses inside a network. That’s how each device is receiving the correct information for the process it’s doing. The screenshot below is a great visualization of how this works.

What is My Ip Address

Shared And Dedicated

Shared and dedicated pertain mostly to website domains. Like I mentioned above, every website has an IP address. Sometimes these are shared with a number of different websites even if they have different domains. A dedicated IP address works only for one website.

In many cases, dedicated hosting provides a dedicated IP address. But in the case of shared hosting, the address is shared with the other websites in the server. You can ask for a dedicated address even if you are using a shared host.

I you want to know more about having a dedicated IP address for your website, talk to your host about their offers.

Virtual Private Networks

Another aspect worth mentioning has to do with VPNs. A VPN is a Virtual Private Network. The way it works is that a different dedicated or static IP address masks your computer’s dynamic address and the router or host you are using. Most VPN providers have dedicated or static addresses from around the world and you can choose which to use.

VPNs are helpful when you want to enter a website that has been banned in the country you are in, or if you need to access a version of a website from another country.

Loopback IP Addresses :

The IP address range– 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 or any IP from loopback range, implies that the TCP/IP software stack on the machine is successfully loaded and working.

I hope I’ve given you the clearest/basic picture about IP and, I’ll try to provide more info about IP routing etc with upcoming posts Thanks for reading this far and, if there are any questions don’t hesitate to ask .



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store