DEV Community

Grace Mihiral
Grace Mihiral

Posted on

Day 9: Control Plane

Hello all! Today I continued to work on the switch class which is pretty much the switches current control plane even though it doesn't have any real routing support right now.

Today I wrote two show_ methods in the Switch class to show interfaces on the switch and vlan configurations of those interfaces. I then started working on eventually getting the switch to run a link state algorithm.

I added a function for the dataplane packet processing threads to punt packets to the switch process. To do this I repurposed my ring_buffer class into a more generic thread safe ring buffer without logging to file capabilities that could take the packets and alert the switch that a packet has been punted up to be processed. My old logging class was remade into a new class called ringLogger, right now I don't see much purpose for it since I have the monitor class that works with Wireshark and is more fun to use but I'll probably find some use for the logging maybe for function calls in a debug mode.

The next two milestones will probably be getting the switch to process the link state messages and respond accordingly. And writing some more python to make bringing multiple switches and a bigger topology up without having to do it manually.

Anyways, thanks for reading :>

Top comments (0)