We may earn an affiliate commission when you visit our partners.
Abhishek CSEPracticals, Ekta Ekta, and Shiwani Nigam

What is this Course all about?

This Course presents the Case study in which we implement the Pseudo Interior Gateway Protocol similar to OSPF (Open Shortest Path First) & ISIS (Intermediate System to Intermediate System). Both ISIS and OSPF are IGP protocols that fall under the category of link-state protocols and achieves the same objectives. Don't worry, We shall cover all necessary theories regarding what we shall be going to implement in the project before we hit the first line of code of the project.

This full course is divided into 2 parts - Part A and Part B .

Read more

What is this Course all about?

This Course presents the Case study in which we implement the Pseudo Interior Gateway Protocol similar to OSPF (Open Shortest Path First) & ISIS (Intermediate System to Intermediate System). Both ISIS and OSPF are IGP protocols that fall under the category of link-state protocols and achieves the same objectives. Don't worry, We shall cover all necessary theories regarding what we shall be going to implement in the project before we hit the first line of code of the project.

This full course is divided into 2 parts - Part A and Part B .

We shall implement the Simplified version of the actual ISIS protocol using our tcp-ip stack library. The goal is to learn the nuances involved in implementing a typical Network protocol on a device from absolute scratch. You will be doing it all your life once you join the industry, but here, this case study aims at giving you firsthand experience regarding what it takes to implement a typical Network protocol on a (simulated) device.

I bet if you are giving an interview in the company for a network developer role, entry-level up to 2-3 yrs of experience, or making a cross-domain switch into Networking Development, seeing the above mention of the project in your resume would give goosebumps to the interviewer. If you could answer cross-questions (I shall be covering in this Course) – you shall be selected without any doubt. Maintain GitHub to present your codes to him if asked.

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:

  1. Configurable via CLIs

  2. Show internal states and results through show CLIs

  3. Respond to generic configuration changes ( such as link shut-down, IP Address on interface change, etc)

  4. Compute results and install the results in Tables (Routing Information Base, MAC Tables, hardware Tables, etc )

  5. Respond to Topological Changes (link failures, device failures, etc )

  6. Time-out stale Data structures if any.

  7. Periodically Generate Or Process Protocol packet

  8. 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 20k LOCs), you would also get the opportunity to learn how to :

  1. Organize the code in header and src files

  2. Modularize the codebase: How to keep the code of different features in different src files

  3. Testing the new feature, and cross-check it doesn’t break existing features

  4. Maintain Code Commits through Version control system ( Github in this case )

  5. Bug Fixing, and exercise various debugging techniques (gdb, Valgrind, etc )

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

Pre-requisites to do this Course

Needless to say, this project is very challenging, and you need to be reasonably good at Data Structures and Algorithms in C/C++ programming. If you are still struggling with LinkedList/Trees or other common Computer Science basic fundamentals, I would not recommend you spend time on this project – rather work on building your basics first. There is no point in showcasing this project on your resume while at the same time you cannot answer other fundamentals such as questions on Heap Memory, Multithreading, etc, or fail miserably in reversing a linked list.

Also,  I shall assume that you have no background in Networking routing protocol (but do possess Networking Basics such as L3 routing, etc ) therefore I shall begin from absolute scratch, covering all necessary theories before we start coding. Along the journey in the implementation, we shall pick up various new concepts related to Networking, Project Planning, feature designing, or Coding Standards at the Industry level.

Enroll now

What's inside

Learning objectives

  • Understand how network protocols are implemented on network devices
  • Implement new features incrementally
  • Packet processing, update protocol data structures through packets processing
  • Implement complex protocol state machines and network algorithms
  • Debugging and troubleshoot code to resolve issues
  • The aim of this project is to cycle you through the experience of end-to-end implementation of a typical network protocol

Syllabus

Course Objectives and Pre-requisites
Agenda and Challenges
Project Road Map
How to do this Course ?
Read more
Schooling - Get familiar with TCP/IP Stack Library
Download Src Code
Setup Code Navigator

Note : file testapp.c has been renamed as main.c

Checking RT and MAC Tables
Packet Capture and Debugging
Library Internal Design and Architecture
Handling Interface Config Change Events
LIBCLI Library
Theory - Layer3 Routing Fundamentals
Welcome To College - Agenda
L3 Routing Table Construction - Introduction
Goals and Problem Statement
Routing Table Entry Format
ECMP - Equal Cost Multiple Path
L3 Device Collaboration
Generic Steps to Build Routing Table
Theory - Understanding IGP Protocols Functioning
Phases of This Section
Phase 1 - 4 Steps
Phase 1 - Step 1 and 2
Phase 1 - Steps 3 and 4
Phase 2 - Spf Algorithm
Phase 2 - Spf Algo Example 1
Phase 2 - Spf Algo Rules
Phase 2 - Spf Algo Example 2
Phase 3 - Final Routing Table Computation
Conclusion
Professional - Getting Started with Protocol Dev
Getting Started
Ecosystem for Protocol Development
Introducing LIBCLI
Ist CLI Development
CLI Backend Handler Implementation
Protocol Configuration Holders
Assignment Questions ( Mandatory )
Developing a Show CLI
Configuring Protocol Interfaces
CLI for Configuring Interfaces
Mandatory Assignment
Hello Pkt Content
Enable Disable Protocol On interfaces
Protocol Control Packets
Protocol Packet Types
Manipulating Ethernet Frames - APIs
Packet Registration Step 1 of 2
Packet Registration Step 2 of 2
Phase 1 - Adjacency Mgmt Implementation
Adjacency Mgmt - Getting Started
Adjacency Formation
Adjacency State
Adjacency Timers
Whats in this section to implement ?
TLVs - Prerequisites
TLV Insertion
TLV Search
Hello Packet Format
Assignment Questions
Cooking up Hello Protocol Packets - Pre-requisites
Cooking up Hello Protocol Packets
Hello Packet Transmission
Hello Packet Transmission Implementation
Hello Xmit APIs Integration
Hello Transmission Testing
Phase 1 - Packet Capture and Debugging
Packet Logging
Packet Registration for Tracing and logging
Packet Tracing Demo
Logging Internal Traces
Phase 1 - Protocol Hello Packet Processing
Entry point for Packet Processing
Assignment Question
Validation Checks on Hello Pkts
Bug Fix - Missed return
Adjacency Object Creation
Show Command Enhancements

Check status of the project upto this point of development stage as follows .

Download the Src code again in separate dir, say, project_progress

mkdir project_progress

cd project_progress

git clone https://github.com/sachinites/tcpip_stack

git checkout proto-dev2

git reset --hard 40b5289842d5914c7e4ff4173ef4945525ac9a86  ( this is commit hashcode )


use git log to verify , the top commit (at the top of screen) should be shown as below :


commit 40b5289842d5914c7e4ff4173ef4945525ac9a86 (HEAD -> proto-dev2, origin/proto-dev2)

Author: sachinites <sachinites@gmail.com>

Date:   Sun Sep 26 12:59:03 2021 -0700


    Added hit count to routing table.


Now browse the code at this point (using cscope or otherwise ). Check for show command enhancement we discussed before this lecture video.

To reset the project back to its original state ( latest commit ) use,

git pull


I will share only the commit hash code in a subsequent section of the course when I would want you to check the project dev status up to that point of development in our course. Follow the same procedure as described here. Copy-paste these steps in some text file.

Adjacency Delete Timer APIs Implementation
Adjacency Expiry Timer APIs Implementation

Cover :

Display of Expiry timer remaining

Display of Delete Timer Remaining

Display of Adj Up time

Adjacency State Transition Diagram
Adjacency State Transition Diagram Implementation
Adjacency State Transition Diagram Implementation - Part 2
Bug Fix - Adjacency State Machine - Missing Breaks
Phase 1 - Assignment Questions - Show me your Skills
Assignment Questions - Test your Understanding of Phase 1
Phase 1 - Interface Config Change Notifications

Good to know

Know what's good
, what to watch for
, and possible dealbreakers
Mirrors the experience of implementing a network protocol on a device from scratch, which is valuable for those seeking entry-level roles or transitioning into networking
Involves implementing a simplified version of ISIS protocol using a TCP/IP stack library, offering practical experience in network protocol implementation
Covers organizing code, modularizing codebase, testing, version control (Github), and debugging techniques (gdb, Valgrind), essential skills for software engineers working on large projects
Requires a solid understanding of Data Structures and Algorithms in C/C++, suggesting it is designed for those with a computer science background
Focuses on implementing a routing protocol, covering aspects like CLI configuration, state management, and response to topological changes, which are relevant to network engineers
Assumes no prior background in networking routing protocols but expects networking basics such as L3 routing, indicating it's suitable for those with some networking knowledge

Save this course

Save Part A - Network Protocol Development in C ( from scratch ) to your list so you can find it easily later:
Save

Activities

Be better prepared before your course. Deepen your understanding during and after it. Supplement your coursework and achieve mastery of the topics covered in Part A - Network Protocol Development in C ( from scratch ) with these activities:
Review TCP/IP Fundamentals
Solidify your understanding of TCP/IP fundamentals to better grasp the complexities of network protocol development in C.
Browse courses on TCP/IP
Show steps
  • Review the OSI model layers and their functions.
  • Study TCP and IP header formats.
  • Understand the three-way handshake process.
Practice C Programming Fundamentals
Sharpen your C programming skills, especially pointers and memory management, as they are crucial for network protocol development.
Browse courses on C Programming
Show steps
  • Work through C tutorials on pointers and memory allocation.
  • Implement basic data structures like linked lists and queues in C.
  • Practice debugging C code using gdb.
Read 'Beej's Guide to Network Programming'
Supplement your learning with this guide, which offers a practical and accessible introduction to network programming in C.
Show steps
  • Read the sections on socket programming and client-server communication.
  • Experiment with the example code provided in the guide.
  • Apply the concepts to your own network protocol projects.
Four other activities
Expand to see all activities and additional details
Show all seven activities
Read 'TCP/IP Illustrated, Vol. 1: The Protocols'
Gain a deeper understanding of TCP/IP protocols by studying this classic text, which provides detailed explanations and illustrations.
Show steps
  • Read chapters related to IP, TCP, and UDP protocols.
  • Study the packet formats and state diagrams.
  • Take notes on key concepts and implementation details.
Implement a Simple Packet Sniffer
Apply your C programming and networking knowledge by building a packet sniffer that captures and analyzes network traffic.
Show steps
  • Use libpcap or similar library to capture network packets.
  • Parse the Ethernet, IP, and TCP/UDP headers.
  • Display the captured packet information in a user-friendly format.
Document Protocol Implementation Challenges
Reflect on the challenges encountered during protocol development and document your solutions to reinforce your understanding.
Show steps
  • Identify the most challenging aspects of the protocol implementation.
  • Describe the problems you faced and the solutions you implemented.
  • Share your findings in a blog post or technical report.
Contribute to a Networking Project
Deepen your understanding by contributing to an open-source networking project, gaining experience with real-world codebases and collaboration.
Show steps
  • Find an open-source networking project on GitHub or GitLab.
  • Identify a bug or feature to work on.
  • Submit a pull request with your changes.

Career center

Learners who complete Part A - Network Protocol Development in C ( from scratch ) will develop knowledge and skills that may be useful to these careers:
Network Software Developer
Network software developers create the software that powers network devices and systems. This course provides an ideal introduction to this career since it walks through the full cycle of network protocol development. The course's focus on coding a routing protocol, from initial configuration using command line interfaces to handling topological changes, mirrors the real-world tasks of a network software developer. Understanding data structures, algorithms, and debugging techniques within the networking space through this course's hands-on approach provides a solid foundation for creating robust and efficient networking applications. The course work provides direct experience that is of immense value in this field.
Network Engineer
A network engineer designs, implements, and maintains network infrastructure. This course is exceptionally relevant, as it focuses on the implementation of a network routing protocol from scratch. The practical experience of building a protocol, configuring it, and observing its behavior will directly translate into a deeper understanding of network behavior. This hands-on experience of working with protocol state machines and packet processing will enable any network engineer to troubleshoot issues more efficiently. The course's deep dive into the intricacies of protocol implementation will prove invaluable when managing and optimizing complex network environments.
Telecommunications Engineer
Telecommunications engineers work on communication systems, including large scale networks. This course is highly relevant, because it presents an in depth look at a network routing protocol. The course focuses on configuration and implementation of protocols, using the C language, which is often used in telecommunications settings. The experience of implementing a protocol from the ground up and debugging it will inform a deeper understanding of the field. This is especially important in understanding the operation of network devices.
Embedded Systems Engineer
Embedded systems engineers design and maintain the low level software for hardware such as network devices. This course aligns well because it involves writing a network protocol from scratch, which requires a deep understanding of how software interacts with hardware. The course's focus on protocol implementation using the C language, along with the debugging and optimization techniques, are crucial, as well as the lessons in code organization. This course is particularly useful in implementing features and debugging. An embedded systems engineer will often be working at this level.
Systems Programmer
Systems programmers develop and maintain the core components of operating systems and other low level software. This course is highly relevant because it involves creating a network protocol, which requires a deep understanding of system level concepts. The course provides hands-on experience with implementing command line interfaces, processing network packets, and handling state transitions. All of these are highly aligned with the day to day work of a system programmer. This course provides the kind of practical, low level experience that many system programmers find valuable.
Technical Support Engineer
A technical support engineer provides support for technical products, including networking equipment. This course builds an understanding of how core network protocols function. Gaining experience in implementing a network protocol from the ground up, configuring it, and troubleshooting it can lead to a more effective support engineer. The skills of debugging and analyzing network behavior taught in this course will be exceptionally useful in diagnosing and resolving issues users might face. This course is useful for gaining a deeper understanding of fundamental network behaviors.
Network Administrator
Network administrators oversee day to day operations of a network. This course may be useful to a network administrator, as it covers the implementation of network protocols. Understanding the low level of how these protocols are configured and their functions and operational states may be helpful in diagnosing network issues. While network administrators do not create protocols, they benefit from understanding how such protocols operate. This course offers hands-on experience to better understand network behavior.
Cybersecurity Analyst
Cybersecurity analysts monitor and protect networks against threats. This course may be useful for a cybersecurity analyst because it allows for a view of the inner workings of network protocols. This can help build an understanding of how network traffic flows and how vulnerabilities might be exploited by hackers. Working with network packet analysis, debugging and protocol implementation helps to build a deeper perspective for network security measures. The course provides valuable hands-on experience with how network protocols are built, which then informs how they can be defended.
Solutions Architect
Solutions architects design and plan technical system solutions, often involving networks. This course is beneficial in building a foundation of network protocol operations. By implementing a protocol and going through the process of configuration and debugging, it provides a hands-on perspective about what is involved. This level of knowledge is a competitive advantage when designing solutions, especially for those involving network devices. The course may be useful for understanding the low level details of how network solutions function.
DevOps Engineer
DevOps engineers manage and automate the software deployment infrastructure. This course may be useful, as it helps build a foundation in networking, which is a critical part of infrastructure. The course emphasizes configuration via command line interfaces, a skill that is directly applicable to DevOps. By working through the course, learners will see how network protocols are configured, and how to troubleshoot network issues that are fundamental to infrastructure management. DevOps engineers benefit from an understanding of networking at the protocol level, and this course can provide that.
Research Scientist
Research scientists conduct research in computer science, often involving networking. This course provides practical experience with network protocol implementation, which may be useful. This will give a hands-on understanding of what challenges typically exist in this field. Understanding how to debug, design, configure, and test a protocol provides practical research in the space and will help you formulate research questions or design experiments. While a research scientist usually requires an advanced degree, this course can be a great place to start.
QA Engineer
Quality assurance engineers test software and systems, including networking systems. This course may be useful because the course emphasizes debugging and troubleshooting issues with a network protocol implementation. Understanding how to configure and test a network and its underlying protocols will inform how a QA engineer tackles testing issues. This course can provide them with deeper knowledge of how to test networks, especially at the protocol level. The course will help build a foundation useful for QA.
Software Engineer
Software engineers design, develop, and maintain software applications. While this course is focused on networking, it may be useful as it builds a strong foundation in C programming, data structures, and algorithms, which are essential for any software engineer. The course also provides experience with version control, debugging, and code organization, which are common tasks. If you are a software engineer looking to understand more about networking, the course is especially useful.
Product Manager
Product managers are involved in the strategy and development of products. This course may be useful to a product manager working on networking products. It provides a deeper understanding of networking behaviors, and this understanding can inform product strategy. The course also emphasizes understanding and using configuration parameters and command line interfaces, and these are factors that a product manager may consider. This may be useful in helping a product manager understand the low level details of a product they work on.
Technical Writer
Technical writers create documentation for technical products and services. This course may be useful, since it provides a deeper understanding of network protocols. Going through the process of implementing and debugging such a protocol, the writer may find that they have a better appreciation for what goes into the design and operation of networking software. A technical writer must be able to understand the topics and technologies of the materials they document. This course can provide knowledge to support such activities.

Reading list

We've selected two books that we think will supplement your learning. Use these to develop background knowledge, enrich your coursework, and gain a deeper understanding of the topics covered in Part A - Network Protocol Development in C ( from scratch ).
Provides an in-depth look at the TCP/IP protocol suite. It valuable reference for understanding the underlying protocols that you will be implementing. It is commonly used as a textbook in networking courses and by industry professionals. This book adds significant depth to the course material.
This guide provides a practical introduction to network programming using sockets in C. It is helpful for understanding the basics of socket programming and how to implement network protocols. is more valuable as additional reading than as a current reference. It is commonly used by students learning network programming.

Share

Help others find this course page by sharing it with your friends and followers:

Similar courses

Similar courses are unavailable at this time. Please try again later.
Our mission

OpenCourser helps millions of learners each year. People visit us to learn workspace skills, ace their exams, and nurture their curiosity.

Our extensive catalog contains over 50,000 courses and twice as many books. Browse by search, by topic, or even by career interests. We'll match you to the right resources quickly.

Find this site helpful? Tell a friend about us.

Affiliate disclosure

We're supported by our community of learners. When you purchase or subscribe to courses and programs or purchase books, we may earn a commission from our partners.

Your purchases help us maintain our catalog and keep our servers humming without ads.

Thank you for supporting OpenCourser.

© 2016 - 2025 OpenCourser