DEV Community

Grace Mihiral
Grace Mihiral

Posted on

Day 8: Added a 'control plane'

Hi, today I finished up the basics for the Switch class and added a Manager class that will probably stay untouched for now as I plan to spend more time adding features to the switch class. The aim is to get punting of packets working to then be able to implement a link state protocol since I think that could be cool.

I believe I need to pass a threadsafe queue into the port threads I'm making to allow punting. Once I get that working though and set up a new test to spawn multiple switches I can work on implementing a protocol to detect switches going down and then later detecting the best path to forward packets through. The multiple switches experiments might wait till I have a Manager class working so I can maybe have an easier way to bring multiple switches up instead of having the tests run multiple switches manually and having to make a bunch of config files that share interfaces nicely. We'll see how time consuming that idea might be though, for a single topology making the config files manually wouldn't be too bad.

Anyway thanks for reading :0

Top comments (0)