Implementation of the router

Follow the title :+1: 
Signed-off-by: David Aparicio <ra142289@beach.lab.ic.unicamp.br>