Is it possible to test a GUI and a network protocol using Selenium?
The short answer is: no. As per the Selenium website, "Selenium automates browsers. That's it!"
In other words, Selenium only communicates at the browser level. It has no way of understanding or communicating with the network level.
Or do I have to use another framework with Selenium?
Maybe. It might be possible to create your own tool to add to your Selenium implementation or find a suitable tool to add.
Is there a framework to test both GUI and Network protocol?
There are tools for networking like Charles Proxy, Fiddler, and Wireshark, but I've never seen anyone use these in conjunction with Selenium.
Update:
Based on more info from the OP, I'm biased toward using a JavaScript solution for Selenium (WDIO for example) or even using Playwright. In this case, there is an SNMP package the OP found; there are others listed on npmjs.
The solution is to add one of these solutions to your package.json or via your package manager. Import the library into your class file (likey PageObject class), and instantiate the object for the SNMP class. In the PageObject class, you can use the SNMP library like any other code and return any values needed back to the test/spec file for assertions.
This question has a Selenium-IDE tag, so no, this solution won't work in Selenium-IDE.