title: CIDR entries and routing tables
body: <p>I have a question which asks the following:</p>
  
  <blockquote>
    <p>Suppose a router has the following CIDR entries in its routing table:</p>
  
  <pre><code>Net/Preﬁx Next Hop
  128.96.39.0/24 Interface 0
  128.96.39.128/25 Interface 1
  128.96.40.0/25 Router 2
  192.4.153.0/26 Router 3
  default Router 4
  </code></pre>
    
    <p>For each of the following IP addresses, what does the router do if a packet
        with that address arrives?</p>
    
    <ol>
    <li>128.96.39.10;</li>
    <li>128.96.40.12; </li>
    <li>128.96.39.151;</li>
    <li>192.4.153.17;</li>
    <li>192.4.153.90.</li>
    </ol>
  </blockquote>
  
  <p>I know that <code>/24</code> means that 24 bits are assigned to the network address meaning that 8 bits are assigned to hosts. How do I get the subnet mask from the IP address represented in decimal and then from there determine where the IP would go?</p>