Tech Notes

  • Networking: Layer 2 Switching

    CAM Table Vs FIB table: CAM table contains MAC address, egress port and vlan. Whereas, FIB table contains IP address, next-hop IP address, next-hop MAC address, Egress port. We use FIB and CAM Table in conjuction in multi-layer hardware based switching. Hardware based switching is always fast. Exceptions: Packets like ARP, IP packets which needs…

  • Networking: Data Center Physical layer

    Single mode Vs multi-mode fiber: Single-Mode Fiber (SMF): Multi-Mode Fiber (MMF): Choose single-mode fiber for long-distance communication and multi-mode fiber for short-distance, high-bandwidth connections within data centers or buildings. Transceivers: an optical transceiver is a module that converts electrical signals into optical signals and vice versa, allowing data to be transmitted over fiber optic cables.…

  • Networking: GRE and IPSec Tunnels

    GRE tunnel use-cases: GRE tunnels: Main components: GRE Packet: (transport protcol+GRE header)(encapsulate(Original Payload + passenger protocol) Configuration: See below scenario: R1:interface Tunnel100tunnel mode greip address 102.1.1.1 255.255.255.0ipv6 enable                     tunnel source Loopback0           tunnel destination 2.2.2.2 R2:interface Tunnel100tunnel mode greip address 102.1.1.2 255.255.255.0ipv6 enable                     tunnel source Loopback0           tunnel destination 1.1.1.1 Please note that 1.1.1.1 and 2.2.2.2 should be reachable from each…

  • Linux: Kernel and Hardware

    The terms “kernel” and “operating system” (OS) are sometimes used interchangeably, but they refer to different components of the software that manages a computer. Here’s a detailed explanation of each: Kernel: The kernel is the core component of an operating system. It acts as the bridge between applications and the actual data processing done at…

  • Linux: Processes, Threads and signals

    What is a process? https://www.youtube.com/watch?v=4rLW7zg21gI https://www.youtube.com/watch?v=ls5cGi12kGw&list=PLtK75qxsQaMKLUENMaPlD_O2qS8ZBGjuy A process is program in execution. So what is a program ?: A program is an executable program. A program contains code or set of processor instructions which are stored as a file on disk. CPU has a program counter. Program is loaded into the memory and then program…

  • Linux: Services, Daemons and IPTables

    Service: A service is program which runs in the background. It answers to the requests etc. For instance, the “web service” might be provided by an httpd daemon like Apache or Nginx. Daemon:  a daemon is a type of program that runs in the background, and a service is the functionality that is provided to the system…

  • Linux Users and Permissions

    To check which users are logged in, we can use “w” command: To check users history who logged in: List all users: Create and delete users:

  • Linux File System

    What is the purpose of file system Think of file system as a closet. Each slot in the closet is used to store jackets, socks, t-shirts etc. this makes the closet clean and not cluttered. Same is the purpose of the file system. Disk and Partitions: Partition are different blocks in a disk. We use…

  • Linux inodes and Links

    What is inode ? Each inode provides a unique identifier for each file and directory on the filesystem. When a file is created, it is assigned an inode number, which is unique within the filesystem. This allows the system to manage files by their inode numbers rather than by their names, which can be changed…

  • Leetcode: Data Parsing

    937. Reorder Data in Log Files Solution 1: Solution 2: 1st watch how sorted function works in python: https://www.youtube.com/watch?v=D3JvDWO-BY4 2 log files were shared and asked to write program to create a report based on aggregated values of parsed input