
Discover the end product of this course: automatically built routing tables on topology load, a tcp/ip stack library with timer management, logging, and application development.
Explore interface management in networking by building a mini project that gathers interface statistics, counts packets transmitted and received, and enables status changes with notifications to applications.
Explore enabling and disabling interfaces on a networking device, including ingress and egress traffic, and how a disabled interface drops inbound and outbound traffic.
Revisit how the DCP IP stack in user space interacts with the kernel-space stack using UDP over localhost, with interface auxiliary data to simulate delivery between nodes.
Develop a dynamic routing solution that automatically constructs and installs layer 3 routes across all devices to prevent loops and inconsistencies, leveraging scmp (equal-cost multi-path) and reacting to link changes.
Review appendix section 8.1 and 8.2 to grasp the theory behind layer three routing table construction, including the DaCosta algorithm, before implementing the routing table in the next lecture.
Implement the SPF routing algorithm through a new CLI, create a dedicated directory and files, update the Makefile, and wire handlers to compute and display SPF results.
Prepare before implementing the SPF algorithm by defining new data structures and helper APIs, and master priority queue operations like insertion and deletion by priority.
Develop ten helper APIs to support the spf algorithm implementation, test them with a driver, and validate against a reference solution within the tcp/ip stack project in c.
Implement the l3 bidirectional link api for tcp/ip stack in c, ensuring interfaces are up and ip addresses are in same subnet, and flush next hops by managing reference counts.
Implement a priority queue for the SPF algorithm by inserting SPF data objects in increasing SPF metric order, and perform initialization, insertion, deletion, and dequeue via APIs.
Implement the initialization of direct neighbors by iterating all root links, evaluating eligibility, and updating each neighbor’s next hop and metric, including scmp handling and flushing old entries.
Complete the initialization by creating a priority queue, initializing its head with energy and thread function, and inserting the SPF root node into the queue.
Implement the execution phase of the SPF algorithm by popping nodes from the priority queue, handling root and non-root cases, and enqueuing eligible neighbors with debugging logs.
Explore ECMP requirements and implement phase three of the SPF algorithm to compute a routing table with multiple next hops, enabling round-robin load balancing and redundancy through SCMP.
Learn how ecmp data forwarding uses a next-hop index to select the next hop, forward packets across multiple routes, and update the index in a round-robin fashion.
Demonstrate the spf algorithm on a square topology by populating routing tables across nodes, then updating routes when an interface goes down and verifying reachability via ping.
Demonstrates using the tcp ip stack library to capture and log packets for debugging, including icmp, arp, and ip headers.
APIs to parse and format standard headers
Learn to implement and test header formatting APIs for a TCP/IP stack in C, formatting IP headers into a buffer, handling IP and ICMP protocols, and optional application headers.
Implements a logging function that checks log file pointers and a socket descriptor, writes the output buffer to non-null sources, flushes, and omits console output when needed.
Integrate tcp/ip stack with logging by bridging send and receive paths to dcp dumps and logger, enabling packet formatting, log files, and output data sources through two API hooks.
Learn how to implement separate logging buffers for packets entering and leaving a device, preventing concurrency issues, with per-node transmit buffers and a single receive buffer for serialized packet logging.
Learn to implement a dual-level logging system by creating device and interface log files, embedding log structures in node and interface data, and initializing logs during topology setup.
Explore the notification chain pattern, where a publisher pushes events to multiple subscribers and supports registration and deregistration across threads, processes, or components.
Learn how a notification chain distributes interface-level configuration changes to all applications on a DCB IP stack. See how callbacks respond, updating routing when interfaces go down.
Represent a notification chain as a linked list of elements with a key, key size, wildcard flag, and a function pointer; define the notification chain and elements for tcp/ip stack.
Use notification chains to propagate interface config changes from admin to applications in the TCP/IP stack. Wrap the generic notification chain to support interface conflict change notifications.
Understand how three routers automatically build routing tables, forward traffic via the shortest paths, and handle equal-cost multi-path routing while preventing loops through shared metrics and routing cooperation.
Explore how routing tables determine the next hop to reach a destination like 192.168.0.2, using least-cost entries, local routes, and forward decisions through devices D, E, C, and B.
We explain the three basic steps routers follow to compute their local routing table. Build an input graph of the topology, apply the routing algorithm, and derive the routing table.
Welcome to the Part-B of the TCP/IP Stack Development Course Series. This is a sequel course to Part-A in which we implemented a pseudo TCP/IP Stack working in Virtualized topology.
In this Course, We shall be implementing more advanced and additional features to our Pseudo TCP/IP Stack and would try to impart a more realistic flavor to it.
We will resume from where we left in Part-A. If you have signed up for this course, I presume you have completed Part-A of the course and we are ready for another roller coaster ride into our project.
This course is Advanced as compared to Part-A. In this course we will learn some more aspects of TCP/IP stack and in general, how Networking software is developed. You will not only doing Networking Based Programming but also, you will continue doing a typical Linux based System Programming development as Networking is strongly tied to System Programming.
Student Level: Intermediate to Advanced to Working Professionals, Beginners in Coding pls excuse this course.
Table of Contents
1. What is this Course all about?
2. Project 1 : Interface Management and Statistics
Enable/Disable an Interface
Gathering Interface Rx/Tx Statistics
3. Project 2 : Implementing the Packet Generator
Create and Feed Pkt stream into Topology
4. Project 3 : Implementing Routing Table Construction Algorithm
Designing Data Structure
Shortest Path First Algorithm in Detail
Implementation Strategy
Testing SPF Algorithm Implementation
Route Calculation
5. Project 4 : Logging Infra
Track Ingress and Egress pkts per device per interface
Track L3 Path taken by a pkt from src to dst
6. Project 5 : Notification Chains
Introduction to NFC
Understand with the help of Example
Writing a Generic NOTIF Infra code
Writing TCP/IP Stack NFC
Implement Publisher Subscriber APIs
See NFC in Action
7. Project 6 : Working with Timers
Implementing Ageism
Implement Timer State Machine