Now consider the operation of a router. A router keeps a routing table (or also often called a forwarding table) with entries telling for a given network address (including its netmask) what will be the outgoing link and the next-hop router to reach this network. For each IP packet to be forwarded, the IP destination address will be extracted out of the packet and the routing table is consulted to find a matching entry (see below). When such an entry has been found, the packet will be forwarded to the indicated next hop. As an example, assume the router has the following entries in its routing table: Destination network address | Outgoing interface | Next-hop router 63.120.14.0/8 eth0 64.64.0.0/14 ethl 78.12.4.1 44.37.8.1 129.122.58.3 144.12.85.128/28 eth2 and no others. Suppose that the router has to forward an IP packet to destination address a.b.c.d (which is not equal to one of the router's IP addresses and which is not directly reachable). Let us consider a few example cases: • If the packet destination address is, for example, 10.11.12.13 then none of the entries matches and the packet should be dropped. • If the destination address is 144.12.85.129 then the last entry matches and the packet should be sent to outgoing interface eth2 to the next-hop IP router shown in the table (which is directly reachable via this interface). • If the destination address is 144.12.85.177 then the last entry does not match (and no other does) so the packet should be dropped. To check whether the IP destination address a.b.c.d belongs to (or matches) some given routing table entry u.v.w.x/k of network u. v.w.x with netmask /k, the router performs the following computation: • Calculate the bitwise AND between the destination address a.b.c.d and the netmask /k (its binary representation). The result of this computation is denoted as f.g.h.i. • If the result f.g.h.i is exactly equal to the network address u.v.w.x (for which we assume that the rightmost 32 - k bits are zero, otherwise we will apply the bitmask /k to it as well) then the entry matches, otherwise it does not. In general it is possible for more than one entry to match a given destination address (see Section 2.1.4). If only one entry matches, then the packet is forwarded to the outgoing interface (and next hop router) indicated in the entry. If several entries match, then the most specific entry is chosen, i.e. the entry with the smallest network 14 size (or the largest value of k in the netmask). With this convention the default address or default router can simply be accommodated by a table entry for destination address 0.0.0.0/0 (with a /0 netmask all bits of the destination address would become zero when applying the AND operation to it). For a more detailed discussion of the operations a router carries out in the process of forwarding see Section 2.1.5 Problem 2.1.7 (Some calculations). Carry out the calculation for the exemplary routing table and the three example destination addresses from above.
Now consider the operation of a router. A router keeps a routing table (or also often called a forwarding table) with entries telling for a given network address (including its netmask) what will be the outgoing link and the next-hop router to reach this network. For each IP packet to be forwarded, the IP destination address will be extracted out of the packet and the routing table is consulted to find a matching entry (see below). When such an entry has been found, the packet will be forwarded to the indicated next hop. As an example, assume the router has the following entries in its routing table: Destination network address | Outgoing interface | Next-hop router 63.120.14.0/8 eth0 64.64.0.0/14 ethl 78.12.4.1 44.37.8.1 129.122.58.3 144.12.85.128/28 eth2 and no others. Suppose that the router has to forward an IP packet to destination address a.b.c.d (which is not equal to one of the router's IP addresses and which is not directly reachable). Let us consider a few example cases: • If the packet destination address is, for example, 10.11.12.13 then none of the entries matches and the packet should be dropped. • If the destination address is 144.12.85.129 then the last entry matches and the packet should be sent to outgoing interface eth2 to the next-hop IP router shown in the table (which is directly reachable via this interface). • If the destination address is 144.12.85.177 then the last entry does not match (and no other does) so the packet should be dropped. To check whether the IP destination address a.b.c.d belongs to (or matches) some given routing table entry u.v.w.x/k of network u. v.w.x with netmask /k, the router performs the following computation: • Calculate the bitwise AND between the destination address a.b.c.d and the netmask /k (its binary representation). The result of this computation is denoted as f.g.h.i. • If the result f.g.h.i is exactly equal to the network address u.v.w.x (for which we assume that the rightmost 32 - k bits are zero, otherwise we will apply the bitmask /k to it as well) then the entry matches, otherwise it does not. In general it is possible for more than one entry to match a given destination address (see Section 2.1.4). If only one entry matches, then the packet is forwarded to the outgoing interface (and next hop router) indicated in the entry. If several entries match, then the most specific entry is chosen, i.e. the entry with the smallest network 14 size (or the largest value of k in the netmask). With this convention the default address or default router can simply be accommodated by a table entry for destination address 0.0.0.0/0 (with a /0 netmask all bits of the destination address would become zero when applying the AND operation to it). For a more detailed discussion of the operations a router carries out in the process of forwarding see Section 2.1.5 Problem 2.1.7 (Some calculations). Carry out the calculation for the exemplary routing table and the three example destination addresses from above.
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
100%
Can someone please help me with Problem 2.1.7? I'm reviewing for my up coming exam. Thanks

Transcribed Image Text:Now consider the operation of a router. A router keeps a routing table (or also often called a forwarding table)
with entries telling for a given network address (including its netmask) what will be the outgoing link and the
next-hop router to reach this network. For each IP packet to be forwarded, the IP destination address will be
extracted out of the packet and the routing table is consulted to find a matching entry (see below). When such
an entry has been found, the packet will be forwarded to the indicated next hop. As an example, assume the
router has the following entries in its routing table:
Destination network address Outgoing interface Next-hop router
eth0
eth1
78.12.4.1
44.37.8.1
129.122.58.3
eth2
63.120.14.0/8
64.64.0.0/14
144.12.85.128/28
and no others. Suppose that the router has to forward an IP packet to destination address a.b.c.d (which is
not equal to one of the router's IP addresses and which is not directly reachable). Let us consider a few example
cases:
• If the packet destination address is, for example, 10.11.12.13 then none of the entries matches and
the packet should be dropped.
• If the destination address is 144.12.85.129 then the last entry matches and the packet should be sent
to outgoing interface eth2 to the next-hop IP router shown in the table (which is directly reachable via
this interface).
• If the destination address is 144.12.85.177 then the last entry does not match (and no other does) so
the packet should be dropped.
To check whether the IP destination address a.b.c.d belongs to (or matches) some given routing table entry
u.v.w.x/k of network u.v.w.x with netmask /k, the router performs the following computation:
• Calculate the bitwise AND between the destination address a.b.c.d and the netmask /k (its binary
representation). The result of this computation is denoted as f.g.h.i.
• If the result f.g.h.i is exactly equal to the network address u.v.w.x (for which we assume that
the rightmost 32 - k bits are zero, otherwise we will apply the bitmask/k to it as well) then the entry
matches, otherwise it does not.
In general it is possible for more than one entry to match a given destination address (see Section 2.1.4). If only
one entry matches, then the packet is forwarded to the outgoing interface (and next hop router) indicated in the
entry. If several entries match, then the most specific entry is chosen, i.e. the entry with the smallest network
14
size (or the largest value of k in the netmask). With this convention the default address or default router can
simply be accommodated by a table entry for destination address 0.0.0.0/0 (with a /0 netmask all bits
of the destination address would become zero when applying the AND operation to it). For a more detailed
discussion of the operations a router carries out in the process of forwarding see Section 2.1.5.
Problem 2.1.7 (Some calculations).
Carry out the calculation for the exemplary routing table and the three example destination addresses from
above.
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 4 steps

Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you

Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON

Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education