Student Level: Intermediate to Advanced to Working Professionals, Beginners in Coding pls excuse this course.
Talk to your Prof: Use this Project as your Final Year Under-Grad Project
Note: If you are buying this course, pls do not buy my other course on - "Integrate CLI interface to you C/C+++ Project". It's all videos that are already included in this course.
This is a 100% Coding based Course in C in which we will develop a TCP/IP Stack from scratch having Data Link Layer, Network Layer and Application Layer in Operation. This is one big project split up into 6 mini-projects. The development of the sister course (Part-B) is in progress.
This Course will set you ready for a core network developer's role in the industry. If you are thorough with basics of L2 Routing including ARP, L3 routing, then probably you already have the required knowledge for this project-based course. If not, you should enroll in to my course - "Networking Concepts and Programming from Scratch" and at-least do section number : 3 to 5. For VLANs implementation section 6,7, and 8 is required. We shall be implementing this theory in C now. If you have some other favorite language, feel free to do this course in that, I don't mind, but I shall be explaining logic and showing the demos in C only.
In this course, We shall be implementing a TCP/IP Stack demo through 6 Networking Projects. All Below Projects should be done in the same sequence as listed.
Project 1 : Build a MultiNode Topology Emulation of Routers and Switches
Project 2 : Implement DataLink Layer (L2 routing), including ARP
Project 3 : Implement L2 Switching (Mac-based Learning and Forwarding)
Project 4 : Implement Vlan Based Mac learning and Forwarding
Project 5 : Implement Network Layer (L3 routing)
Project 6 : Case Study : Implement IP-Tunnelling (Optional)
In these mini Projects, we shall be implementing the packet Journey Upwards and Downwards through layers of TCP/IP Stack (= OSI Model). We shall be implementing the TCP/IP Stack !! There is minimal Socket Programming in this course. Not every Networking project has to be socket programming based.
Along the way, we shall be discussing and implementing the solution to new challenges we encounter while solving the problem. Based on how this course is accepted by students, I would add more projects to this course based on the student's feedback.
After Doing These Projects, you shall be able to :
1. Tell why you need Data link layer and Network Layer
2. How to design a new Application protocol on a TCP/IP stack (just like ICMP, HTTP, etc all work on TCP/IP Stack)
3. Get your hands dirty with industry-level network programming.
4. Learn cooking up, parsing and reading the packet buffers
5. Understand End-To-End Architecture and Design of Network Application and TCP/IP Stack
6. Conquer Interviews for the role of Network Developer Engineer
7. Decorate your GitHub, and add a strong project to your HAT, Expected LOCs of this course shall exceed 10k !
This project will fill up the gap between theoretical knowledge and the Implementation version of it. How does it sound that you have written code by your own hands to resolve ARP, packet forwarding, etc. Decorate your resume and GitHub with this project.
This course is divided into Two Parts :
Part A - In this part of the course, we shall be building up the Network topology Infrastructure comprising of routers, switches, and links connecting them. Nodes can also exchange packets with their neighbors. Basically, we want to simulate a fully programmable and configurable network topology in this part of the course. This is Project 1.
Part B - The Configurable Network Topology build in Part A of the course shall be used to implement the Remaining five Projects [2-6] as listed above.
We shall be setting up all the required infrastructure to mimic the network topology - and that itself is a mini project altogether. We shall be creating nodes, links connecting nodes, configuring network parameters on nodes, sending and receiving traffic streams - All in one project. This is Megaproject, expected LOC may go to tens of thousands if we keep on adding TCP/IP stack features onto it. The sky is the limit.
The best thing about this project is - You will learn many other things along the journey, including setting up Timers, Network Topology Construction, Glthreads - A Glue way of Linked lists, Building Project using Makefile and I am not even talking about learning Software Designing skills. Additional Material has been added in the Appendix Section of the course. We shall be modularizing the project in separate folders, each folder contains code implementing a particular OSI Layer functionality, and Yes, We shall be doing it all from scratch.
1. Absolute beginners, struggling with basic data structures and pointers, pls excuse this course. You are not prepared for this project. Pls, invest your time into learning basics first.
2. Machine Used: Ubuntu 19.04, GCC compiler. So my codes may not compile on your machine if you are using some other compiler or machine.
Table Of Contents :
[ PROJECT 1]
Section 1. KYC (Know your Course)
Section 2. Developing a Generic Graph Topology
Section 3. Construction of a Network Graph Topology
Adding Network topology details to the graph
APIs to configure Network Topology
Get ready without first Hello World Network Topology
Section 4. Command-Line Integration
Section 5. Communication Setup
Sending a packet to Nbr node on the outgoing interface
Listening and Monitoring Multiple Sockets
Receiving a packet on an interface
Section 6. Agenda of Part B
[ PROJECT 2]
Section 7. Getting Started with TCP/IP Stack Development
Section 8. Implement Layer 2 (DataLink Layer) - ARP
Get started with ARP Implementation
ARP Message Format and Example
Creating ARP Tables
CRUD APIs on ARP Tables
CLIs to work with ARP
ARP Cycle and ARP APIs
Preparing and Sending ARP Broadcast request msg
Processing ARP Broadcast Request msg
Sending ARP reply Msg
API to Start Ingress Journey of the Frame
Processing ARP reply msg and create an ARP entry in ARP table
ARP in Action
[ PROJECT 3]
Section 9. Implement Layer 2 (DataLink Layer) - L2 Switching
APIs to configure node as L2 switches
Setting up the new Topology with L2 switches and host machines
Implementing MAC learning and Forwarding algorithms
MAC Table Management of L2 switches
Testing L2 switching behavior using ARP
[ PROJECT 4]
Section 10. Layer 2 - Implementing Vlan Based Forwarding
Goals and Pre-requisites
802.1Q Vlan hdr format
Vlan Tagged Ethernet Header Data Structures
API to determine Tagged Vs Untagged frames
Tagged <--> Untagged Frame Conversion
Vlan Based MAC Forwarding - Further Roadmap
Frame Ingress Condition Table
Frame Ingress Completion
Frame Egress Condition Table
Egress Frame Completion
Test Vlan Based Forwarding
[ PROJECT 5]
Section 11. Setting Up Layer 3 Routing Infrastructure (Network Layer)
Goals and Pre-requisites
L3 Routing Table Setup
CRUD APIs for Routing Table Mgmt
L3 Route Installation
Defining IP HDr format
Adding Ping CLI
Network and Application Layer Interaction
L3 Routing Concepts Revisited
L3 Routing Flowcharts
Section 12. Layer 3 Routing Flowcharts Implementation
Payload Data Transfer from L2 to L3
Layer 3 Flowchart Implementation - Step by Step
Layer 3 Operations Flowchart Implementation
Layer 2 Operations Flowchart Implementation
Testing Beta Version of our Project
Section 13. On-Demand ARP Resolution
Data Structure Enhancements
ARP Sane Entry Creation
ARP Pending List Processing
Final Demo of our Complete Project
Section 14. Implement IP-IN-IP Encapsulation (Tunneling)
Future Extension of the Project. Students are supposed to take this forward on their own.
Section 15. Routing between two Vlans (Inter Vlan Routing)