A router has input ports for receiving IP packets and output ports for sending those packets toward their destinations. When a packet comes to an input port, the router examines the packet header and checks the destination in it against a routing tablea database that tells the router how to send packets to various destinations.