You can run an ethernet cable from downstairs to upstairs by drilling a hole through the roof of where the router is located to where you want the cable to come out from. Use fish tape to pull the cable through the holes you drilled. If you don't want to drill, you can run the cable along the walls of the stairs. However, do not bend the cable; otherwise, use flat LAN wires.