Network Fundamentals -
Basics of Network IP Addressing
A Detailed Thread π
Basics of IP Addressing in Linux -
Each device connected to the internet has a unique identifier knows as an IP Address.
An IP address is a 32-bit binary number that is assigned to a computing device such as a PC, Tablet, or smartphone in an IP network.
Most of the networks today, including all computers on the internet uses the TCP/IP as a standard to communicate with each other.
In the TCP/IP protocol, this unique identifier is the IP Address. The two kinds of IP Addresses are IPv4 and IPv6.
When devices communicate with each other over a local area nw, or "LAN", or across the internet, the message transmitted is ultimately directed to the target device's nw hw address that is programmed into the device by the manufacturer.
Unfortunately, MAC's r not helpful 4 routing comm'n msgs outside of a small no. of locally interconnected devices bcz dey r randomly scattered arnd d world, i.e, a device wid a MAC addr of 10:20:30:40:50:60 cud be in Delhi & anthr wid mac addr of 10:20:30:40:50:61 cud be in Seoul
To enable devices to find each other easily no matter where dey r in d world, d creators of d Internet came up wid a logical addressing scheme dat made it much easier for devices to find each other. These logical, Internet Protocol, addresses r commonly referred to as "IP addrs".
IP Terminologies -
Bit - This is a single digit, represented either as 1 or 0
Byte - This is a collection or series of 8 bits. 1 byte = 8 bits
Octet - An octet comprises 8 bits or 1 byte
An IP address is segmented into 4 octets or bytes. Each octet has 8 bits.
As IP address can be depicted in the following ways:
Dotted-decimal form -
For example 192.168.1.5
Binary form - 11000000.10101000.00000001.00000101.
Hexadecimal form -
c0.a8.01.05.
All the above notations represent the same IP address.
The hexadecimal format is rarely used.
Classful Routing -
Message routing devices or "routers" that transfer messages from one organization to another use a highly structured method of IP addressing called "classful routing", where IP address ranges are grouped into five classes.
IP Classes -
Typically, the IPv4 space allows us to hv addrs b/n 0.0.0.0 to 255.255.255.255. Hwevr, some no's in dat range r reserved 4 specific purposes on TCP/IP nw's.
These reservations r recognized by TCP/IP addressing Authority the Internet Assigned Numbers Authority IANA
0.0.0.0 β This represents the default network, which is the abstract concept of just being connected to a TCP/IP network.
255.255.255.255 β This address is reserved for network broadcasts, or messages that should go to all computers on the network.
127.0.0.1 - This is called d loopback addr, meaning ur device's way of identifying itself, whether or not it has an IP addr.
169.254.0.1 to 169.254.255.254 - This is d Automatic Private IP Addressing (APIPA) range of addr's assigned automatically wen a device doesn't get dhcp ip
IPv4 address can be categorized into 5 classes:
Class A
Class B
Class C
Class D
Class E
Class A, B, and C which are mostly used in host systems.
Class D is used for multicast and E is mostly for research and experimental purposes.
Class A. This is the biggest class boasting of 16,777,216 IP addresses that can be assigned to hosts and the least number of assignable networks which are 126 by default.
Use-
Class A is used by organizations requiring very large size networks like NASA, Pentagon etc.
Class B which has the second-highest number of possible IP addresses which are 65,534 and 16,384 assignable networks by default.
Use -
Class B is used by organizations requiring medium size networks like IRCTC, banks etc.
Class C which is the smallest class yielding only 254 possible IP addresses and 2,097,152 assignable networks by default.
Use-
Class C is used by organizations requiring small to medium size networks.
For example- engineering colleges, small universities, small offices etc.
All the classes of IP Address are summarized in the following table-
Classless Inter-Domain Routing (CIDR) -
D no. of class "A", "B" and "C" IP addr ranges is severely limited, so wen an org obtains an IP addr range, dey usually obtain a number of class "C" ranges, or if dey r lucky, a class "B". Obtaining a class "A" addr range is highly unlikely
Fortunately, the development of d Classless Inter-Domain Routing (CIDR) method of IP addressing & routing gave org's d opportunity to easily segregate any of their classful IP addr ranges or "networks" into a number of sub-ranges or "subnets" through d use of "subnet masks".
Subnet masks -
Each Internet router dat uses classful routing knows dat any IP addr starting with 0-127 is a class "A" addr with a nw identifying component 1 byte in length. Any IP addr beginning wid 128-191 is a class "B" addr, so d nw component is two bytes in length, etc.
But when an org'n needs to break up its class "A" or class "B" nw into a number of class "C"- or other smaller-sized subnets, its routers cannot rely on the initial byte of d IP addr to tell it anything about the length of the network identifying component of the subnetted addrs.
To provide the routers with this information when using classless routing, you must specify the length of the network identifying component of the subnet's IP addresses through the use of a "subnet mask".
CIDR notation -
Since many of us r not very efficient binary calculators, CIDR provides a simpler method of expressing d mask merely by indicating the nw addr (i.e d first addr in d IP addr range) followed by a slash & d no of bits dat r in d nw identifying component of d IP addr
Routable address vs. Non-routable addresses -
Were we to give every device in the world its own unique IP addr, we would have run out of addresses a long time ago.
So Internet Engineering Task Force (IETF) decided dat, since most devices only need to be accessed within their org & never need to be accessed remotely, dey would reserve ranges of addrs dat every org can use for their internal device-to-internal device communication traffic.
β’ β’ β’
Missing some Tweet in this thread? You can try to
force a refresh
Troubleshooting is the art of taking a problem, gathering information about it, analyzing it, and finally solving it.
While some problems are inherently βharderβ than others, the same basic approach can be taken for every problem.
Not just fixing!
While fixing a problem is one of the major parts of troubleshooting, there are other parts that cannot be neglected: documenting the problem (and fix), and performing a root cause analysis (RCA).
Zombie processes in Linux are sometimes also referred to as defunct or dead processes. Theyβre processes that have completed their execution, but their entries are not removed from the process table.
What are different Process States?
Linux maintains a process table of all the processes running, along with their states. Letβs briefly overview the various process states:
What is systemd and why should Linux users care about it?
Everything about "systemd" !!
A Mega Thread π
What is systemd ?
systemd is the glue that holds Linux systems together. systemd is a collection of building blocks, which handle services, processes, logging, network connectivity and even authentication.
systemd handles the boot process for Linux systems. As an init implementation, it has a PID of 1 like other init systems, such as System V, Upstart.
It was designed as a replacement for SystemV and LSB-style startup scrips, which were prevalent since 1980s.
Every Linux Admin or DevOps Engineer should know what happens when a Linux system boots. It's a very popular Interview Question as well.
Every time you power on your Linux PC, it goes through a series of stages before finally displaying a login screen that prompts for your username or password.
There are 3 high level stages of a typical Linux boot process.
Everything you need to know about Virtualization, VMs , Containers, Pods, Clusters ..
A Mega Thread π
What is Virtualization?
Virtualization is the act of dividing shared computational resources: CPU, RAM, Disk, and Networking into isolated resources that are unaware of the original shared scope.
What is a virtual machine?
A VM is a virtual env that functions as a virtual computer system with its own CPU, memory, nw interface, & storage, created on a physical hw system (located off- or on-prem).
It uses sw instead of a physical computer to run programs & deploy apps.
traceroute tracks the route packets take across an IP network on their way to a given host.
It assists you in troubleshooting nw connectivity issues from your Destination to a Remote destination by using echo packets (ICMP) to visually trace the route.
The syntax -
The cmd traceroute <x> (x here being an IP or hostname) is d most basic version & it will begin to send packets to d designated target. This result will allow u to trace d path of d packets sent from ur machine to each of d systems b/n u & ur desired destination.