Routing Protocol Basics

Knowledge of routing and routing protocols is the basis to understand networking and its technologies. This chapter starts by introducing basic concepts, such as a route’s composition, static and dynamic routes, and routing tables. It then describes RIP,

  • PDF / 3,843,607 Bytes
  • 49 Pages / 439.37 x 666.142 pts Page_size
  • 56 Downloads / 254 Views

DOWNLOAD

REPORT


Routing Protocol Basics

Learning about routing and routing protocols is essential to your understanding of networking. They are fundamental to your network technology knowledge. After completing this section, you should be able to: • • • • •

Understand a route’s composition and how it is generated Distinguish between a computer’s routing table and a router’s routing table Classify routing protocols Understand the basics of RIP Understand the basics of OSPF and its differences with RIP

8.1 8.1.1

Routing Routes and Routing Tables

Essentially, a route is a network-layer path from a network device to a destination, and a routing table stores information about routes. Routing tables are stored on routers, computers, and Layer 3 switches (not Layer 2 switches) and function like a database, in which information specific to each route is called a routing entry. The following shows a routing table and some of the entries stored within.

© Springer Science+Business Media Singapore 2016 Huawei Technologies Co., Ltd., HCNA Networking Study Guide, DOI 10.1007/978-981-10-1554-0_8

179

180

8 Routing Protocol Basics

The preceding routing table is that of an Internet-connected Huawei AR series router (named R1). To check the routing table, run the display ip routing-table command on R1. Each line is a routing entry, and each routing entry must contain three important elements: a destination address/mask (Destination/Mask), an outbound interface (Interface), and a next-hop IP address (NextHop). In addition to these elements, a routing entry may contain attributes such as a route preference (Pre), route cost (Cost), and protocol (Proto) that generated the routing entry. These attributes are described in subsequent sections. Take the routing entry 2.0.0.0/8 (destination address/mask) as an example. R1 is aware that a network exists at 2.0.0.0/8, as 2.0.0.0 is a network address and 8 is the mask length. This entry specifies that, for all IP packets destined to 2.0.0.0/8, R1 must send them through its outbound interface GigabitEthernet1/0/1 to the next-hop IP address 12.0.0.2. Assume that R1 receives a packet whose destination IP address is 2.1.0.1. R1 performs an AND operation on 2.1.0.1 and each routing entry to determine which of the entries match this packet. The result of this operation is that two routing entries, 2.0.0.0/8 and 2.1.0.0/16, match the IP packet. If an IP packet matches more than one routing entry, R1 uses the longest match rule to determine the optimal route for forwarding the packet. (The longest match rule is an algorithm used to ascertain which of the routing entries that match the packet’s destination address is the most specific.) 2.1.0.0/16 is the optimal route because it is the most specific; its mask length is greater than that of 2.0.0.0/8. Therefore, R1 sends this received packet to 2.1.0.0/16. Computers also send packets through the optimal route. After a computer constructs IP packets to be sent out at the network layer, it searches its routing table for entries that match the packets’ destination a