Skip to main content

Posts

packet-switching X.25

  X.25 is a packet-switching protocol suite developed by the ITU-T in the 1970s for wide area networking over unreliable communication links.  It operates at the first three layers of the OSI model and was widely used for connecting remote terminals and computers over public data networks, particularly before reliable digital infrastructure became commonplace. Architecture and Operation: X.25 uses virtual circuits to establish connections between endpoints.  It employs three protocol layers: X.25 Packet Layer Protocol (Layer 3), LAPB (Link Access Procedure Balanced) at Layer 2, and typically operates over serial interfaces at Layer 1.  The protocol provides both Switched Virtual Circuits (SVCs) that are established on-demand and Permanent Virtual Circuits (PVCs) that are pre-configured. Key Features: Built-in error detection and correction at multiple layers Flow control to prevent buffer overflow Virtual circuit multiplexing over single physical links Store...

encapsulation with aal5snap

  AAL5SNAP (ATM Adaptation Layer 5 Subnetwork Access Protocol) is an encapsulation method used to carry network layer protocols like IP over ATM networks.  It combines two key components: AAL5 for ATM cell adaptation and SNAP for protocol identification. ATM Adaptation Layer 5 (AAL5): AAL5 is one of several ATM Adaptation Layers that segment higher-layer data into 48-byte payloads for ATM cells.  Unlike other AALs, AAL5 uses a "null" header approach - it doesn't add overhead to each cell but instead adds an 8-byte trailer to the entire packet.  This trailer contains length and CRC information for error detection and packet reassembly. AAL5 is highly efficient and became the standard for data communications over ATM. SNAP (Subnetwork Access Protocol): SNAP is an IEEE 802.2 extension that identifies the network layer protocol being carried. It consists of a 5-byte header containing an Organizational Unique Identifier (OUI) and a protocol type field.  For IP t...

Asynchronous Transfer Mode (ATM)

  Asynchronous Transfer Mode (ATM) is a cell-switching network technology that transmits data in fixed-size 53-byte cells (48 bytes payload + 5 bytes header).  Developed in the late 1980s, ATM was designed to handle voice, video, and data traffic with guaranteed Quality of Service (QoS) over both LAN and WAN connections. Key Features: ATM uses virtual circuits established through signaling protocols. It supports both Permanent Virtual Circuits (PVCs) and Switched Virtual Circuits (SVCs).  The fixed cell size eliminates variable delay, making it ideal for real-time applications.  ATM provides multiple service classes including Constant Bit Rate (CBR), Variable Bit Rate (VBR), Available Bit Rate (ABR), and Unspecified Bit Rate (UBR). Architecture: ATM networks consist of ATM switches connected by high-speed links.  Virtual Path Identifiers (VPIs) and Virtual Channel Identifiers (VCIs) route cells through the network. The small, fixed cell size reduces bufferi...

Frame Relay

Frame Relay is a packet-switching wide area network (WAN) protocol that operates at the data link layer (Layer 2) of the OSI model.  It was widely used in the 1990s and early 2000s to connect remote offices and branch locations over carrier networks, though it has largely been replaced by MPLS and internet-based VPNs today. Key Characteristics: Frame Relay uses virtual circuits called Data Link Connection Identifiers (DLCIs) to establish connections between endpoints.  It provides statistical multiplexing, allowing multiple virtual circuits to share the same physical link.  The protocol is connection-oriented but connectionless in nature - permanent virtual circuits (PVCs) are pre-configured, while switched virtual circuits (SVCs) are established on-demand. Benefits: Cost-effective for connecting multiple sites Efficient bandwidth utilization through statistical multiplexing Built-in congestion control mechanisms Lower latency compared to X.25 Basic Configuratio...

Linux Standard Error (stderr)

Standard error (stderr) is one of the three standard data streams in Linux, specifically designed for error messages and diagnostic output.  It uses file descriptor 2 and by default displays on the terminal screen, separate from standard output (stdout). Purpose of stderr Unlike stdout (file descriptor 1) which carries normal program output, stderr handles error messages, warnings, and diagnostic information. This separation allows users to redirect normal output while still seeing error messages, or vice versa. Basic stderr Examples Viewing stderr Output ls /nonexistent_directory # Error message appears on screen via stderr ls: cannot access '/nonexistent_directory': No such file or directory Command with Both stdout and stderr find /home -name "*.txt" # Files found go to stdout # Permission denied errors go to stderr Redirecting stderr Redirect stderr to File ( 2> ) find /root -name "*.txt" 2> errors.log # Normal output to screen, errors to...

Linux Standard Input (stdin)

Standard input (stdin) is one of the three standard data streams in Linux, representing the default source from which programs read input data.  It's assigned file descriptor 0 and typically connects to the keyboard by default. Understanding stdin When you run a command, it expects input from somewhere. By default, this "somewhere" is your keyboard - this is stdin. Programs read data from stdin character by character or line by line, waiting for user input. Basic stdin Examples Interactive Command Input cat # After pressing Enter, cat waits for keyboard input Hello World # Press Ctrl+D to end input The cat command without arguments reads from stdin and echoes to stdout. Reading User Input in Scripts read name echo "Hello, $name" # Program waits for user to type their name Redirecting stdin From Files ( < ) sort < unsorted_data.txt # sort reads from file instead of keyboard From Here Documents ( << ) mysql -u root -p << EOF USE dat...

Linux, Redirecting Input and Output

Linux provides powerful redirection operators to control where commands read input from and send output to, instead of using the default keyboard (stdin) and terminal (stdout). Output Redirection Basic Output Redirection ( > ) ls -l > file_list.txt This redirects the output of ls -l to a file called file_list.txt , creating or overwriting it. Append Output ( >> ) echo "New entry" >> file_list.txt This appends text to the existing file without overwriting previous content. Error Redirection ( 2> ) find /root -name "*.txt" 2> errors.log This redirects error messages (stderr) to errors.log while normal output still goes to the terminal. Redirect Both Output and Errors ( &> ) command &> all_output.txt # or alternatively command > output.txt 2>&1 Input Redirection Basic Input Redirection ( < ) sort < unsorted_list.txt This feeds the contents of unsorted_list.txt as input to the sort command. Here ...