Strategy Partner :

16-Routing Protocol Operation

Table of Contents

Chapter 1 IP Routing Protocol Overview.. 1-1

1.1 Introduction to IP Route and Routing Table. 1-1

1.1.1 IP Route. 1-1

1.1.2 Routing Table. 1-1

1.2 Routing Protocol Overview. 1-3

1.2.1 Static Routing and Dynamic Routing. 1-3

1.2.2 Classification of Dynamic Routing Protocols. 1-3

1.2.3 Routing Protocols and Routing Priority. 1-4

1.2.4 Load Sharing and Route Backup. 1-5

1.2.5 Routing Information Sharing. 1-5

1.3 Displaying and Maintaining a Routing Table. 1-6

Chapter 2 Static Route Configuration. 2-1

2.1 Introduction to Static Route. 2-1

2.1.1 Static Route. 2-1

2.1.2 Default Route. 2-2

2.2 Static Route Configuration. 2-2

2.2.1 Configuration Prerequisites. 2-2

2.2.2 Configuring a Static Route. 2-2

2.3 Displaying and Maintaining Static Routes. 2-3

2.4 Static Route Configuration Example. 2-3

2.5 Troubleshooting a Static Route. 2-5

Chapter 3 RIP Configuration. 3-1

3.1 RIP Overview. 3-1

3.1.1 Basic Concepts. 3-1

3.1.2 RIP Startup and Operation. 3-2

3.2 RIP Configuration Task List 3-3

3.3 Basic RIP Configuration. 3-3

3.3.1 Configuration Prerequisites. 3-3

3.3.2 Configuring Basic RIP Functions. 3-4

3.4 RIP Route Control 3-5

3.4.1 Configuration Prerequisites. 3-5

3.4.2 Configuring RIP Route Control 3-5

3.5 RIP Network Adjustment and Optimization. 3-9

3.5.1 Configuration Prerequisites. 3-9

3.5.2 Configuration Tasks. 3-9

3.6 Displaying and Maintaining RIP Configuration. 3-11

3.7 RIP Configuration Example. 3-12

3.8 Troubleshooting RIP Configuration. 3-13

3.8.1 Failed to Receive RIP Updates. 3-13

Chapter 4 OSPF Configuration. 4-1

4.1 OSPF Overview. 4-1

4.1.1 Introduction to OSPF. 4-1

4.1.2 OSPF Route Calculation. 4-2

4.1.3 Basic OSPF Concepts. 4-2

4.1.4 OSPF Area Partition and Route Summarization. 4-5

4.1.5 OSPF Network Type. 4-10

4.1.6 DR/BDR. 4-11

4.1.7 OSPF Features. 4-13

4.2 OSPF Configuration Task List 4-13

4.3 Basic OSPF Configuration. 4-14

4.3.1 Configuration Prerequisites. 4-14

4.3.2 Basic OSPF Configuration. 4-14

4.4 OSPF Area Attribute Configuration. 4-16

4.4.1 Configuration Prerequisites. 4-16

4.4.2 Configuring OSPF Area Attributes. 4-16

4.5 OSPF Network Type Configuration. 4-17

4.5.1 Configuration Prerequisites. 4-18

4.5.2 Configuring the Network Type of an OSPF Interface. 4-18

4.5.3 Configuring an NBMA/P2MP Neighbor 4-19

4.5.4 Configuring the DR Priority on an OSPF Interface. 4-19

4.6 OSPF Route Control 4-20

4.6.1 Configuration Prerequisites. 4-20

4.6.2 Configuring OSPF Route Summarization. 4-20

4.6.3 Configuring OSPF to Filter Received Routes. 4-21

4.6.4 Configuring the OSPF Cost on an Interface. 4-22

4.6.5 Configuring OSPF Route Priority. 4-22

4.6.6 Configuring the Maximum Number of OSPF ECMP Routes. 4-22

4.6.7 Configuring OSPF to Redistribute External Routes. 4-23

4.7 OSPF Network Adjustment and Optimization. 4-24

4.7.1 Configuration Prerequisites. 4-24

4.7.2 Configuring OSPF Timers. 4-24

4.7.3 Configuring the LSA transmission delay. 4-26

4.7.4 Configuring the SPF Calculation Interval 4-26

4.7.5 Disabling OSPF Packet Transmission on an Interface. 4-26

4.7.6 Configuring OSPF Authentication. 4-27

4.7.7 Configuring the MTU Field in DD Packets. 4-28

4.7.8 Enabling OSPF Logging of Neighbor State Changes. 4-29

4.7.9 Configuring OSPF Network Management 4-29

4.8 Displaying and Maintaining OSPF Configuration. 4-30

4.9 OSPF Configuration Examples. 4-31

4.9.1 Configuring DR/BDR Election. 4-31

4.9.2 Configuring OSPF Virtual Link. 4-33

4.10 Troubleshooting OSPF Configuration. 4-35

4.10.1 Unable to Establish a Neighbor Relationship between Routers. 4-35

4.10.2 Unable to Learn a Complete Network Topology. 4-35

Chapter 5 BGP Configuration. 5-1

5.1 BGP Overview. 5-1

5.1.1 BGP Message Type. 5-2

5.1.2 BGP Route Attributes. 5-5

5.1.3 BGP Routing Policy. 5-10

5.1.4 Problems in Large-Scale BGP Networks. 5-11

5.1.5 MP-BGP. 5-15

5.1.6 Protocol Standard. 5-16

5.2 BGP Configuration Task List 5-17

5.3 Basic BGP Configuration. 5-17

5.3.1 Configuration Prerequisites. 5-17

5.3.2 Configuring BGP Multicast Address Family. 5-18

5.3.3 Configuring Basic BGP Functions. 5-18

5.4 Configuring the Way to Advertise/Receive Routing Information. 5-20

5.4.1 Configuration Prerequisites. 5-20

5.4.2 Importing Routes. 5-20

5.4.3 Configuring BGP Route Summarization. 5-21

5.4.4 Enabling Default Route Advertising. 5-22

5.4.5 Configuring BGP Route Distribution Filtering Policies. 5-22

5.4.6 Configuring BGP Route Reception Filtering Policies. 5-23

5.4.7 Disable BGP-IGP Route Synchronization. 5-24

5.4.8 Configuring BGP Route Dampening. 5-25

5.5 Configuring BGP Route Attributes. 5-26

5.5.1 Configuration Prerequisites. 5-26

5.5.2 Configuring BGP Route Attributes. 5-26

5.6 Tuning and Optimizing a BGP Network. 5-28

5.6.1 Configuration Prerequisites. 5-29

5.6.2 Tuning and Optimizing a BGP Network. 5-29

5.7 Configuring a Large-Scale BGP Network. 5-31

5.7.1 Configuration Prerequisites. 5-31

5.7.2 Configuring BGP Peer Group. 5-31

5.7.3 Configuring BGP Community. 5-33

5.7.4 Configuring BGP RR. 5-33

5.7.5 Configuring BGP Confederation. 5-34

5.8 Displaying and Maintaining BGP Configuration. 5-35

5.8.1 Displaying BGP Configuration. 5-35

5.8.2 Resetting BGP Connections. 5-36

5.8.3 Clearing BGP Information. 5-37

5.9 BGP Configuration Examples. 5-37

5.9.1 Configuring BGP Confederation Attribute. 5-37

5.9.2 Configuring BGP RR. 5-39

5.9.3 Configuring BGP Path Selection. 5-41

5.10 Troubleshooting BGP Configuration. 5-46

5.10.1 BGP Peer Connection Establishment Error 5-46

Chapter 6 IP Routing Policy Configuration. 6-1

6.1 IP Routing Policy Overview. 6-1

6.1.1 Introduction to IP Routing Policy. 6-1

6.1.2 Filters. 6-2

6.2 IP Routing Policy Configuration Task List 6-3

6.3 Routing Policy Configuration. 6-3

6.3.1 Configuration Prerequisites. 6-3

6.3.2 Defining a Routing Policy. 6-4

6.3.3 Defining if-match Clauses and apply Clauses. 6-5

6.4 IP-Prefix Configuration. 6-7

6.4.1 Configuration Prerequisites. 6-7

6.4.2 Configuring an ip-prefix list 6-7

6.5 AS Path List Configuration. 6-8

6.6 Community List Configuration. 6-8

6.7 Displaying IP Routing Policy. 6-9

6.8 IP Routing Policy Configuration Example. 6-9

6.8.1 Configuring to Filter Received Routing Information. 6-9

6.8.2 Controlling RIP Packet Cost to Implement Dynamic Route Backup. 6-12

6.9 Troubleshooting IP Routing Policy. 6-16

Chapter 7 Route Capacity Configuration. 7-1

7.1 Route Capacity Configuration Overview. 7-1

7.1.1 Introduction. 7-1

7.1.2 Route Capacity Limitation. 7-2

7.2 Route Capacity Limitation Configuration. 7-2

7.2.1 Configuring the Lower Limit and the Safety Value of the Switch Memory. 7-2

7.2.2 Enabling/Disabling Automatic Protocol Recovery. 7-3

7.3 Displaying and Maintaining Route Capacity Limitation Configuration. 7-3

 


Chapter 1  IP Routing Protocol Overview

Go to these sections for information you are interested in:

l           Introduction to IP Route and Routing Table

l           Routing Protocol Overview

l           Displaying and Maintaining a Routing Table

 

&  Note:

The term router in this chapter refers to a router in a generic sense or an Ethernet switch running a routing protocol.

 

1.1  Introduction to IP Route and Routing Table

1.1.1  IP Route

Routers are used for route selection on the Internet. As a router receives a packet, it selects an appropriate route (through a network) according to the destination address of the packet and forwards the packet to the next router. The last router on the route is responsible for delivering the packet to the destination host.

1.1.2  Routing Table

I. Function

The key for a router to forward packets is the routing table. Each router maintains a routing table. Each entry in this table contains an IP address that represents a host/subnet and specifies which physical port on the router should be used to forward the packets destined for the host/subnet. And the router forwards those packets through this port to the next router or directly to the destination host if the host is on a network directly connected to the router.

Routes in a routing table can be divided into three categories by origin:

l           Direct routes: Routes discovered by data link protocols, also known as interface routes.

l           Static routes: Routes that are manually configured.

l           Dynamic routes: Routes that are discovered dynamically by routing protocols.

II. Routing entry

Each routing entry in a routing table contains:

l           Destination: It identifies the address of the destination host or network of an IP packet.

l           Mask: Along with the destination address, it identifies the address of the network segment where the destination host or router resides. By performing a logical AND operation between destination address and network mask, you can get the address of the network segment where the destination host or router resides. For example, if the destination address is 129.102.8.10 and the mask is 255.255.0.0, the address of the network segment where the destination host or router resides is 129.102.0.0. A mask consists of some consecutive 1s, represented either in dotted decimal notation or by the number of the consecutive 1s in the mask.

l           Interface: It indicates through which interface IP packets should be forwarded to the destination.

l           Nexthop: It indicates the next router that IP packets will pass through to reach the destination.

l           Preference: There may be multiple routes with different next hops to the same destination. These routes may be discovered by different routing protocols, or be manually configured static routes. The one with the highest preference (the smallest numerical value) will be selected as the current optimal route.

According to different destinations, routes fall into the following categories:

l           Subnet route: The destination is a subnet.

l           Host route: The destination is a host.

In addition, according to whether the network where the destination resides is directly connected to the router, routes fall into the following categories:

l           Direct route: The router is directly connected to the network where the destination resides.

l           Indirect route: The router is not directly connected to the network where the destination resides.

In order to avoid an oversized routing table, you can set a default route. All the packets for which the router fails to find a matching entry in the routing table will be forwarded through this default route.

Figure 1-1 shows a relatively complicated internet environment, the number in each network cloud indicate the network address. Router G is connected to three networks, and so it has three IP addresses and three physical ports. Its routing table is shown in Figure 1-1.

Destination Network

Nexthop

Interface

11.0.0.0

14.0.0.1

3

12.0.0.0

14.0.0.1

3

13.0.0.0

16.0.0.1

2

14.0.0.0

14.0.0.3

3

15.0.0.0

17.0.0.2

1

16.0.0.0

16.0.0.2

2

17.0.0.0

17.0.0.1

1

Figure 1-1 Routing table

1.2  Routing Protocol Overview

1.2.1  Static Routing and Dynamic Routing

Static routing is easy to configure and requires less system resources. It works well in small, stable networks with simple topologies. It cannot adapt itself to any network topology change automatically so that you must perform routing configuration again whenever the network topology changes.

Dynamic routing is based on dynamic routing protocols, which can detect network topology changes and recalculate the routes accordingly. Therefore, dynamic routing is suitable for large networks. It is complicated to configure, and it not only imposes higher requirements on the system than static routing, but also occupies a certain amount of network resources.

1.2.2  Classification of Dynamic Routing Protocols

Dynamic routing protocols can be classified based on the following standards:

I. Operational scope

l           Interior Gateway Protocols (IGPs): Work within an autonomous system, typically including RIP, OSPF, and IS-IS.

l           Exterior Gateway Protocols (EGPs): Work between autonomous systems. The most popular one is BGP.

 

&  Note:

An autonomous system refers to a group of routers that share the same routing policy and work under the same administration.

 

II. Routing algorithm

l           Distance-vector protocols: RIP and BGP. BGP is also considered a path-vector protocol.

l           Link-state protocols: OSPF and IS-IS.

The main differences between the above two types of routing algorithms lie in the way routes are discovered and calculated.

III. Type of the destination address

l           Unicast routing protocols: RIP, OSPF, BGP, and IS-IS.

l           Multicast routing protocols: PIM-SM and PIM-DM.

This chapter focuses on unicast routing protocols. For information on multicast routing protocols, refer to the part discussing Multicast.

1.2.3  Routing Protocols and Routing Priority

Different routing protocols may find different routes (including static routes) to the same destination. However, not all of those routes are optimal. In fact, at a particular moment, only one protocol can uniquely determine the current optimal routing to the destination. For the purpose of route selection, each routing protocol (including static routes) is assigned a priority. The route found by the routing protocol with the highest priority is preferred.

The following table lists some routing protocols and the default priorities for routes found by them:

Table 1-1 Routing protocols and priorities of their default route

Routing approach

Priority

DIRECT

0

OSPF

10

STATIC

60

RIP

100

OSPF ASE

150

OSPF NSSA

150

UNKNOWN

255

BGP

256

 

&  Note:

l      The smaller the priority value, the higher the priority.

l      The priority for a direct route is always 0, which you cannot change. Any other type of routes can have their priorities manually configured.

l      Each static route can be configured with a different priority.

 

1.2.4  Load Sharing and Route Backup

I. Load sharing

A given routing protocol may find several routes with the same metric to the same destination, and if this protocol has the highest priority among all the active protocols, these routes will be considered valid and are used to forward packets, thus achieving load sharing.

II. Route backup

You can configure multiple routes to the same destination, expecting the one with the highest priority to be the primary route and all the rest backup routes.

Route backup can help improve network reliability. Automatic switching can happen between the primary route and a backup route.

Under normal circumstances, packets are forwarded through the primary route. When the primary route goes down, the route with the highest priority among the backup routes is selected to forward packets. When the primary route recovers, the route selection process is performed again and the primary route is selected again to forward packets.

1.2.5  Routing Information Sharing

As different routing protocols use different algorithms to calculate routes, they may discover different routes. In a large network with multiple routing protocols, it is required for routing protocols to share their routing information. Each routing protocol shares routing information discovered by other routing protocols through a route redistribution mechanism.

1.3  Displaying and Maintaining a Routing Table

To do…

Use the command…

Remarks

Display brief information about a routing table

display ip routing-table [ | { begin | exclude | include } regular-expression ]

Available in any view

Display detailed information about a routing table

display ip routing-table verbose

Display information about routes permitted by a basic ACL

display ip routing-table acl acl-number [ verbose ]

Display information about routes permitted by a prefix list

display ip routing-table ip-prefix ip-prefix-name [ verbose ]

Display routes to a specified destination

display ip routing-table ip-address [ mask | mask-length ] [ longer-match ] [ verbose ]

Display routes to specified destinations

display ip routing-table ip-address1 { mask1 | mask-length1 } ip-address2 { mask2 | mask-length2 } [ verbose ]

Display routes discovered by a routing protocol

display ip routing-table protocol protocol [ inactive | verbose ]

Display the tree-structured routing table information

display ip routing-table radix

Display statistics about a routing table

display ip routing-table statistics

Clear statistics about a routing table

reset ip routing-table statistics protocol { all | protocol }

Available in user view

 


Chapter 2  Static Route Configuration

When configuring a static route, go to these sections for information you are interested in:

l           Introduction to Static Route

l           Static Route Configuration

l           Displaying and Maintaining Static Routes

l           Static Route Configuration Example

l           Troubleshooting a Static Route

 

&  Note:

The term router in this chapter refers to a router in a generic sense or an Ethernet switch running a routing protocol.

 

2.1  Introduction to Static Route

2.1.1  Static Route

Static routes are special routes. They are manually configured by the administrator. In a relatively simple network, you only need to configure static routes to make routers work normally. Proper configuration and usage of static routes can improve network performance and ensure sufficient bandwidth for important applications.

When the network topology changes, static routes may become unreachable because they cannot adapt themselves to the change automatically, thus resulting in network interruption. In this case, the network administrator needs to modify the configuration of static routes manually.

Static routes are divided into three types:

l           Reachable route: normal route. If a static route to a destination is of this type, the IP packets destined for this destination will be forwarded to the next hop. It is the most common type of static routes.

l           Unreachable route: route with the reject attribute. If a static route to a destination has the reject attribute, all the IP packets destined for this destination will be discarded, and the source hosts will be informed of the unreachability of the destination.

l           Blackhole route: route with blackhole attribute. If a static route destined for a destination has the blackhole attribute, the outgoing interface of this route is the Null 0 interface regardless of the next hop address, and all the IP packets addressed to this destination will be dropped without notifying the source hosts.

The attributes reject and blackhole are usually used to limit the range of the destinations this router can reach, and help troubleshoot the network.

2.1.2  Default Route

To avoid too large a routing table, you can configure a default route.

When the destination address of a packet fails to match any entry in the routing table,

l           If there is default route in the routing table, the default route will be selected to forward the packet.

l           If there is no default route, the packet will be discarded and an ICMP Destination Unreachable or Network Unreachable packet will be returned to the source.

A default route can be manually configured or generated by some dynamic routing protocols, such as OSPF and RIP.

2.2  Static Route Configuration

2.2.1  Configuration Prerequisites

Before configuring a static route, perform the following tasks:

l           Configuring the physical parameters of related interfaces

l           Configuring IP addresses for related interfaces

2.2.2  Configuring a Static Route

Follow these steps to configure a static route:

To do...

Use the command...

Remarks