connect directly to the router via an ethernet port.
from there you can also restore the router to its factory settings and reset the password by typing the router's ip address into your browser and selecting that option.
most routers will also have an option to initiate a hard reset without a connection - it depends on the router, so you should check your manual.