IP Addresses Flashcards

1
Q

Describe what a router understands from an IP address.

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Describe the IP table present in a gateway/router.

A

Each row of the table contains:
1. A destination address: address of a single host, but usually a network address

  1. The address of the next-hop router
  2. Which interface to send the packet out on to get to that router
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What does a gateway/router do when a packet arrives?

A

If a packet arrives at a router, it checks the table:

  1. If the packet destination matches a host address in the table, it sends the packet to the indicated host on the indicated interface
  2. 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.
  3. Else, find an entry in the table marked ‘default’, and send the packet to the indicated router on the indicated interface
  4. Else error.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly