Ethernet Ring Protection Switching (ERPS) provide sub-50ms protection and recovery switching for Ethernet traffic in a ring topology and at the same time ensuring that there are no loops formed at the Ethernet layer, which is defined in ITU-T G. 8032. The goal of this project is to implement the ERPS protocol in FreeBSD, so that the appliances such as pfSense and FreeNAS can be directly plugged into the ERPS network without the need to sit behind routers.
There are three necessary things to do. The first is to understand the ERPS protocol. The second is to build related environment for me test ERPS ring. The third is to understand FreeBSD framework, and using LACP as an example ( which is implemented in FreeBSD) to understand how the protocol work with physical or logical interfaces, and the framework to implement a network protocol in FreeBSD.
The implementation of ERPS can be divided in three sections:
| Date | Task |
|---|---|
| April 22 ~ May 22 | 1). Community Bonding; |
| 2). Create my code repository; | |
| 3). Learn freeBSD and EAPS/ERPS protocol; | |
| Week 1 | 1). Learn to build custom kernel; |
| 2). Learn how freeBSD layer 2 protocols receive packets from network interfaces; | |
| 3). Define “create/delete eaps domain” command interfaces; | |
| 4). Start to code the command interfaces of “create/delete eaps domain”, which is located in /usr.sbin/eaps; | |
| Week 2 | 1). Continue to work on command interfaces of “create/delete eaps domain”; |
| 2). Start to work on command interfaces of “Display eaps information”; | |
| 3). Add eaps protocol module files and related makefiles; | |
| 4). Work on the interfaces from usr.sbin to eaps protocol module; | |
| Week 3 | 1). Learn how to “ktrace” to understand procedure of program; |
| 2). Use “if_bridge” and “if_lagg” as examples to understand how “ioctl” interface works, how to “clone” new interface instance, and how the modules are loaded. | |
| 3). Write to code to create/delete eaps interface, and load eaps modules, which are located in eaps.c; |