DevOps Training
  • DevOps
  • What is DevOps
    • What DevOps Look like
    • Why DevOps Needed
    • DevOps Automation Tools
    • DevOps Principles
  • cloud computing
    • How DevOps links with Cloud Computing
    • What is cloud computing?
      • Platform as a service (PaaS)
      • Infrastructure as a service (IaaS)
      • Software as a service (SaaS)
      • Function as a Service
      • SaaS, PaaS, IaaS
  • Version Control
    • Git as Version Control
      • Setting up Remote Repo
      • Git Hooks
      • github vs gitlab vs bitbucket
      • Quick Recap Git
  • DevOps #01 Continuous Integration
    • Continuous Integration & Continuous Delivery
      • Understanding CI Tools
      • Prerequisite
      • Continuous Integration
      • CI Tools
      • Travis-CI
        • Travis CI with S3
        • Static Site Build S3
        • Beanstalk with AWS CLI
          • Elastic Beanstalk with Travis CI
        • Travis using Code Deploy EC2
          • Github and Code Deploy
          • Travis CI with Code Deploy
      • Gitlab-CI
        • CI Setup for application
        • Gitlab Runners on EC2
        • CI Integration with AWS
          • Deploying App using Gitlab CI
          • Gitlab CI with AWS S3
          • Gitlab CI with ECS
          • CI Integration with EC2
            • Update and Clean Gitlab.yml
        • Install Gitlab on EC2
      • CI/CD using Jenkins CI
        • Jenkins Build on EC2
        • Jenkins Build EC2 Ubuntu
        • Jenkins CI/CD
          • Create a Build Item
          • Create a Build Pipleine
            • Pipeline Using Docker
            • Pipeline Examples
          • Jenkins CI with S3
            • Jenkins CI - S3
          • Jenkins CI with EC2
    • Jenkins CI Cluster Mode
    • AWS Code Pipeline CI/CD
      • AWS CI/CD Tools
        • AWS Code Build
        • AWS Code Deploy to Beanstalk
        • AWS Code Deploy to EC2
        • AWS Pipeline - Example CI/CD
  • Docker
    • Docker
      • Docker for Developers
        • Install and setup
        • Docker Commands
        • Docker Images Container
        • Docker Architecture
    • Docker Demos
      • Node JS Container
    • Docker-compose
      • Using Docker Compose
      • Docker Compose Demo
  • AWS Quick Refresh
    • AWS Quick Recap - Videos
    • AWS Quick Recap
  • AWS Architecture - Lab
    • Application Deployment - 01
    • Application Deployment - 02
    • Application 3 tier Architecture
  • Basic Networking
    • Computer Networking for Beginners
      • Basic of Networking
      • Networking Protocols
      • OSI Model
      • Network address and Host address
      • Subnetting Type
    • Network Architecture
    • Networking Layers OSI Model
    • Internet protocol
      • CIDR and subnetting
        • Examples
      • AWS VPC Subnets
  • VPC and Networking
    • AWS VPC
    • VPC Demo
      • Bastion Host | Jump Server
  • AWS Components
    • AWS Components In Depth
      • AWS Storage
        • AWS EBS
        • AWS Cloudfront
        • AWS S3
      • AWS Compute
        • ECS
        • AWS VPC
          • VPC Components
        • AWS EC2
        • AWS ELB
          • Application Load balancer
            • Example
        • AWS EC2 Auto Scaling
          • Demo
        • AWS Route 53
        • AWS Lambda Serverless
          • AWS Lambda Serverless Computing
  • Assignments
    • Assignment 01-Node JS app on EC2
    • Assignment 02-Node JS with Mysql
    • Assignment-03
  • Microservices
    • Microservices Architecture
      • Docker and Docker-Compose
      • Docker-Compose Example 01
      • Docker-Compose Example 02
      • Hand-on | Building Microservices
    • Architecture Components
  • AWS ECS
    • AWS ECS
      • Introduction of ECS
Powered by GitBook
On this page
  • IPv4 vs IPv6
  • IPv6 Addresses
  • Network Prefix and Host Identifier
  • IPv4 Address Classification
  • Reserved IP Addresses
  • Loopback IPs
  • Private IPs
  • Subnets
  • Netmasks

Was this helpful?

  1. Basic Networking

Internet protocol

PreviousNetworking Layers OSI ModelNextCIDR and subnetting

Last updated 5 years ago

Was this helpful?

Each device connected to the internet has a unique identifier. Most networks today, including all computers on the internet, use the TCP/IP as a standard to communicate on the network. In the TCP/IP protocol, this unique identifier is the IP Address. The two kinds of IP Addresses are IPv4and IPv6.

IPv4 vs IPv6

IPv4 uses 32 binary bits to create a single unique address on the network. An IPv4 address is expressed by four numbers separated by dots. Each number is the decimal (base-10) representation for an eight-digit binary (base-2) number, also called an octet.

IPv6 uses 128 binary bits to create a single unique address on the network. An IPv6 address is expressed by eight groups of hexadecimal (base-16) numbers separated by colons. Groups of numbers that contain all zeros are often omitted to save space, leaving a colon separator to mark the gap .

IPv6 space is much larger than the IPv4 space due the use of hexadecimals as well as having 8 groups. Most devices use IPv4. However, due to advent of IoT devices and the greater demand for IP Addresses, more and more devices are accepting IPv6.

IPv4 addresses are normally expressed in dot-notation xxx.xxx.xxx.xxxwhere xxx is a value from 0 to 255. But another way to express them is as a 4-tuple of octets, which is an 8-bit segment since 2⁸=256. Here is the same IPv4 address in both dot-notation and 4-tuple octet.

172.217.6.3610101100 11011001 00000110 00100100

IPv6 Addresses

IPv6 addresses are normally expressed in colon-notation as xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx where xxxx is a hexadecimal value. We can express them as an 8-tuple of 16-bit segments. Here is the same IPv6 address as an 8-tuple of 16 bits.

2001:0db8:0012:0001:3c5e:7354:0000:5db10010000000000001 0000110110111000 0000000000010010 0000000000000010
0011110001011110 0111001101010100 0000000000000000 0101110110110001

Network Prefix and Host Identifier

IPv4 addresses are comprised of two parts. The first part is the network prefix, which identifies the network the address belongs to. The second part is the host identifier, which identifies the host within that network.

Where the network prefix ends and where the host identifier begins depends on the class of the IPv4 address.

IPv4 Address Classification

There are 5 classes of IPv4 addresses, labeled A through E. The class of the IP address is determined by the first 4 bits.

  • Class A — IP addresses are in this class if their first bit is a 0. In dot-notation, this is the range 0.0.0.0 to 127.255.255.255 . The first 8 bits represent the network prefix and the rest represents the host identifier. For example, 127.42.13.69 has network prefix 127 and host identifier42.13.69 .

  • Class B — IP addresses are in this class if their first two bits are 10 . In dot-notation, this is the range 128.0.0.0 to 191.255.255.255 . The first 16 bits represent the network prefix and the rest represent the host identifier. For example, 129.42.13.69 has network prefix 129.42 and host identifier 13.69 .

  • Class C — IP addresses are in this class if their first three bits are 110 . In dot-notation, this is the range 192.0.0.0 to 223.255.255.255 . The first 24 bits represent the network prefix and the rest represent the host identifier. For example, 196.13.42.69 has network prefix 196.13.42 and host identifier 69 .

  • Class D — IP addresses are in this class if their first four bits are 1110 . In dot-notation, this is the range 224.0.0.0 to 239.255.255.255 . These addresses are used for multi-casting protocols (ie. when a single packet can be sent to multiple hosts in one action)

  • Class E — IP addresses are in this class if their first four bits are 1111 . In dot-notation, this the range 240.0.0.0 to 255.255.255.255 . These addresses are reserved for future and experimental use.

Reserved IP Addresses

Some IPv4 addresses are reserved for specific uses, namely loopback IPs andPrivate IPs.

Loopback IPs

The IPv4 address range 127.0.0.0 to 127.255.255.255 is reserved for looping back, which is when a host sends a network request to itself. Sometimes we want a program on a host to connect back to itself for debugging or development purposes.

Private IPs

Subnets

A subnetwork or subnet is basically a smaller network within a larger network. The process of partitioning a network into subnets is called subnetting. Each computer on the same subnet can communicate directly with each other but not directly with computers on a different subnet. This is usually done for security or performance reasons.

As stated earlier, IPv4 addresses are comprised by a network prefix and host identifier. Subnetting is done by partitioning the IP address into three parts, a network prefix, a subnet number, and host identifier. The specification of where these numbers start and end in the IP address is done through a net mask.

Netmasks

A netmask is used to describe which segments of the IP address are the network prefix and host identifier. Namely, the netmask is a 4-tuple of octets, that specify which segment of the IP address as part of the network prefix by using a 1 for every position that corresponds to a network prefix, and 0otherwise. In other words, we get the network prefix through bit-wise multiplication of the IP address and the netmask.

For example, the default netmask for Class A IP addresses would be 11111111 00000000 00000000 00000000 as binary or 255.0.0.0 in dot-notation.

The default netmask for Class B IP addresses would be 11111111 11111111 00000000 00000000 as binary or 255.255.0.0 in dot-notation.

The default netmask for Class C IP addresses would be 11111111 11111111 11111111 00000000 as binary or 255.255.255.0 in dot-notation.

Note there are only 2³² possible IPv4 addresses but 2¹²⁸ possible IPv6 addresses. There is then a . The Internet is (gradually) transitioning to IPv6 addresses so it can support more networked devices, without having to resort to -ing.

The Internet is not a single large network, but rather a collection of networks. One of these networks may be a college campus network; another of these networks may be a metro-wide ISP’s network, and they connect to each other through .

The IP ranges 10.0.0.0 — 10.xxx.xxx.xxx , 172.16.0.0 — 172.31.xxx.xxx , and 192.168.0.0 — 192.168.xxx.xxx are designated private network addresses, meaning they can be assigned to computers which must go through the to connect to the Internet. It’s private IPs that make it possible for over 8 billion devices to connect with only about 4 billion IPv4 address (2³² =~ 4 billion).

one-to-one but not onto mapping from IPv4 to IPv6 addresses
NAT
internet exchange points
Network Address Translation (NAT) protocol