Furniture 439

Static routes, discussed later, exemplify how reachability is statically configured in a router. Typically, however, reachability is learned dynamically through the use of a routing protocol. Routing protocols, such as RIPRIPv2, OSPF, and BGP4, provide the mechanism for routers to learn reachability. Once routers learn about reachability within and between networks, this information is used to forward packets toward their destinations. Routers store 254 CHAPTER 6 Addressing and Routing Architecture Address Type Meaning Global Addresses Addresses that are recognized worldwide. Such addresses are usually at the network (IP) layer. Private Addresses Networklayer addresses that are not routed through the public Internet. Private addresses are used in Network Address Translation (NAT). Local Addresses Addresses that are recognized locally, at the LAN or subnet. Such addresses are usually at the datalink (e.g., Ethernet) layer. Public Addresses Networklayer addresses that are routed through the public Internet. Temporary Addresses Addresses that are assigned for a short duration of time, e.g., dynamically via the Dynamic Host Configuration Protocol (DHCP) Persistent Addresses Addresses that are assigned for a long duration of time or permanently configured within the device. FIGURE 6.3 Address Terms and Meanings reachability information and update it from time to time, or upon a change in the state of routing in the network. A routing table, or list of routes, metrics, and how they can be reached, is a common mechanism routers use to keep such information. Routers forward packets based on reachability. Traditionally, a router looks at the network portion of a packet’s destination address to determine where it needs to be sent. The router compares this destination to the contents of its routing table, and chooses the best route for that destination. If there are multiple possible routes, the best route is the one with the longest (or more explicit) match. Figure 6.4 gives an example of this. In this example Company A has the address 129.29.0.0 with a network mask of 255.255.0.0, which is 16 bits in length. Company B has the address 129.99.10.0 with a network mask of 255.255.255.0, which is 24 bits in length. IP packets arriving from the Internet will be examined at ISP Z’s router, where the destination addresses of these packets are compared with entries in the routing table. In comparing a packet’s destination address with entries in a routing table, the longest match to the destination address is chosen. For example, an IP packet arriving at ISP Z with a destination address of 129.99.10.1 matches both entries in the routing table shown in Figure 6.4. When the network mask of the first entry in the routing table, 255.255.0.0, is applied to 129.99.0.0, we get 129.99 as the Background 255 Company A 129.99.0.0 255.255.0.0 Company B 129.99.10.0 255.255.255.0 ISP X ISP Y ISP Z Routing Table 129.99.