Part B – Network Protocol Development in C ( from Scratch )

Part B – Network Protocol Development in C ( from Scratch )

English | MP4 | AVC 1280×720 | AAC 44KHz 2ch | 59 lectures (8h 12m) | 3.52 GB

Network Coding Project for Network Core Developers, Linux, System Programming, Operating systems, Projects in C/C++

First of all Congratulations on completing the Part-A of this Course in which we develop the Adjacency Mgmt feature of the protocol. I hope you enjoyed and had a great learning. You must be Feeling confident in developing timer-based state machines now?

And here starts a new challenge when we enter into Phase 2 of the Project – Link State Database Mgmt. Every Router will use its Adjacency Objects sitting on an interface to build its local Link State Database. But the challenge is – every router has to share its own local copy of the link-state database ( LSDB ) with every other router in the topology running ISIS protocol so that every router has a coherent and common view of the IGP topology. This is what is the end goal of this phase of the project.

This full course series is divided into 3 parts – Part A, Part B, and Part C out of which Part A and B are Live, and Part C is under Development as of 21 Dec 2021.

Once again we shall cover all required theories and concepts before we hit the keyboard for implementation. The three main concepts we shall going to implement in this installment of the course are :

1. Concept of Packet Flooding

2. Building of Link State Database

3. Link State Database Synchronization

We shall continue to use Timers as phase 2 is also heavily dependent on timers to achieve its goals. In addition to timers, we shall also get to introduce to the world of Asynchronous programming through this project.

Continue to Challenge yourself by doing more of such projects and you will not even realize that you have already transformed yourself into a 10x Developer.

Project Goals

The AIM of this project is to cycle you through the experience of end-to-end implementation of a typical network protocol. In this case study, we have chosen a routing protocol as an example, but the high-level logistics involved to implement a typical network protocol are more or less the same. For example, a typical network protocol has to:

  • Configurable via CLIs
  • Show internal states and results through show CLIs
  • Respond to generic configuration changes ( such as link shut-down, IP Address on interface change, etc)
  • Compute results and install the results in Tables (Routing Information Base, MAC Tables, hardware Tables, etc )
  • Respond to Topological Changes (link failures, device failures, etc )
  • Time-out stale Data structures if any.
  • Periodically Generate Or Process Protocol packet
  • How to add a new feature to the existing working Protocol Codebase. (This is what you shall be doing all your life as a software engineer !!)

Since the project is quite big (I am expecting around 10k LOCs), you would also get the opportunity to learn how to:

  • Organize the code in header and src files
  • Modularize the codebase: How to keep the code of different features in different src files
  • Testing the new feature, and cross-check it doesn’t break existing features
  • Maintain Code Commits through Version control system ( Github in this case )
  • Bug Fixing, and exercising various debugging techniques (gdb, Valgrind, etc )

Needless to say, you Can’t exercise the above points unless you do a project of considerable size.

What you’ll learn

  • Understand how Network Protocols are implemented on Network Devices
  • Packet processing, Update protocol data structures through packets processing
  • Debugging and troubleshoot code to resolve issues
  • Implement new features incrementally
  • Implement complex protocol state machines and Network Algorithms
  • The AIM of this project is to cycle you through the experience of end-to-end implementation of a typical network protocol
Table of Contents

Welcome to the Part 2 ( Sequel Course )
Agenda – What is in this Course

Phase 2 – Link State Packets
Link State Packet Format
TLV 22 Format
Assignment Defining new TLV Code Points
API to encode TLV22
TLV22 Encoding APIs Implementation
Assignment – Write TLV 22 Aggregating APIs
Structure to represent LSP Pkt
Assignment Browse the cheat sheet
The Sequence Number

Phase 2 – LSP Packet Generation
LSP Packet Generation
API to create LSP pkt
Mandatory Assignment
Debugging and Verification
isis_show_one_lsp_pkt_detail ( ) Implementation
show CLI and Testing Procedure
Mandatory Assignment Enabling LSP Packet tracing

Phase 2 – Introducing Asynchronous Programming
Introducing Asynchronous Programming
Redundant Work – Problem example 1 and Solution
Redundant Work – Problem example 2 and Solution
Asynchronous Programming – APIs to Use

Phase 2 – Revisiting LSP Generation – Asynchronous Method
LSP Pkt Generation API Integration – Part1
LSP Pkt Generation API Integration – Part2
Demo and Testing
Demonstration – Redundant Computations in Action
Converting Synchronous Call to Asynchronous Call
Assignment Task clean up during protocol shutdown
End Result Witness Final Optimization

Phase 2 – LSP Periodic Generation and Disbursement
LSP Periodic Generation and Disbursement
Implementation Periodic LSP Packet Generation
LSP Disbursement Design
LSP Disbursement API Discussion
LSP Disbursement API Implementation
LSP Disbursement Demo
LSP Reference Count Problem Explanation
Reference Count Problem and Solution in General
LSP Reference Count APIs Implementation
LSP Reference Count API Integration

Phase 2 – Link State Database Development and LSP flooding
Getting Started with Link State Database ( LSDB )
Link State Database APIs and Initialization
Link-State Database API Implementation
Updating LSDB with LSPs
Mandatory Assignment Handling Reference Count of LSPs
LSP Flooding Algorithm
Self LSP packet installation Rules in LSDB
Mandatory Assignment Write some Codes to be used in future
Setting up isis_install_lsp( ) API calls
isis_install_lsp( ) – Implementation for self lsp pkts
Mandatory assignment Implement show interface Stats CLI
Remote LSP packet installation Rules and Implementation in LSDB
Testing and Bug fixing
Case Study How to fix Bugs in Big Protocols
Mandatory Assignment

Phase 2 – Debugging Made Easier – Event Counters
Protocol Debug Counters

Phase 2 – Purging of LSP
What is LSP Purging
Design Discussion and APIs
LSP Purge – Complete Implementation
Mini-Project – Overloading ISIS Protocol

Phase 2 – Re-Conciliation
What is Protocol Convergence
Timer Driven Convergence
Reconciliation Explained – Concept and APIs
Reconciliation APIs Implementation
Reconciliation APIs Integration
Assignment Questions on Reconciliation
Processing On-Demand TLV
Assignment Questions on Reconciliation – 2
Final Demo of the Project
Beginning of Phase 3

Appendix-A – Tree Library Quick Tutorial
AVL Tree Library Tuorial

Appendix -B – Asynchronous Programming
Goals
Introducing Event Loop
Other Courses I have – Bonus

Homepage