IP Addresses Flashcards
Describe what a router understands from an IP address.
An IP address is split into 2 parts: a network number and a host number on that network. The host can tell if the destination is on the network by looking at the network part of the IP address.
When a destination is not on the local network, the data packet is sent to the gateway/router. A router maintains a table of IP addresses, with next-hop routers associated with those addresses.
Describe the IP table present in a gateway/router.
Each row of the table contains:
1. A destination address: address of a single host, but usually a network address
- The address of the next-hop router
- Which interface to send the packet out on to get to that router
What does a gateway/router do when a packet arrives?
If a packet arrives at a router, it checks the table:
- If the packet destination matches a host address in the table, it sends the packet to the indicated host on the indicated interface
- Else, if the packet’s destination network part matches a network address in the table, send the packet to the indicated router on the indicated interface.
- Else, find an entry in the table marked ‘default’, and send the packet to the indicated router on the indicated interface
- Else error.