Ethernet Ring Protection Switching

Project description

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.

Approach to solving the problem

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:

  1. Basic ERPS configuration, which provide command line to create ERPS ring; set control vlan to transmit RAPS packet; add port to ERPS ring, and set roles of port ( normal port, RPL owner, RPL neighbour); set ERPS timer (Guard, WTR, Holdoff, WTB); set switch mode. Maybe some configurations are not needed in FreeBSD; Provide command line to query this configuration informations; Use this configuration information to initialize the ERPS protocol module, or update the protocol module.
  2. Deal with protocol packet. In ERPS, we need to support two types of protocol packet: RAPS packets and EthOAM CC packets. I’m not sure if FreeBSD supports the EthOAM or not. If not, we should support EthOAM first. Because, the ERPS use EthOAM cc packet to detect signal failure (SF). So, it’s necessary in ERPS protocol. Hence, I should figure out how to send protocol packet through physical port, and receive protocol packet from physical port in FreeBSD.
  3. Implement the ERPS protocol module:
    • Initialize the protocol module with user configuration informations.
    • Implement ERPS state machine, there are three states in ERPS ring: initialization, idle and protection. I need to implement this state machine with all possible trigger events.
    • Through protocol state to change logical port’s state ( forwarding, blocking), and then change the physical port.
    • FDB flush consists of removing the learned MAC addresses of the ring ports from the node's filtering database.

Deliverables

Milestones

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;

Test Plan

The Code

SummerOfCode2016/EthernetRingProtectionSwitching (last edited 2018-03-18T18:14:06+0000 by MarkLinimon)