|I guess, you are talking about a router.|
Unfortunately, my crystal ball didn't show the make and model.
Therefore, you have to take a look into the routers manual, to figure out, how to reset your router to factory default settings.
After the reset, you have to configure the router from scratch.
Btw.: To configure the router from scratch, you have to be connected to it by wire.