12-IPv4 Routing Configuration

Download

Table of Contents

Chapter 1 Static Routing Configuration. 1-1

1.1 Introduction. 1-1

1.1.1 Static Route. 1-1

1.1.2 Default Route. 1-1

1.1.3 Application Environment of Static Routing. 1-2

1.2 Configuring a Static Route. 1-2

1.2.1 Configuration Prerequisites. 1-2

1.2.2 Configuration Procedure. 1-2

1.3 Detecting Reachability of the Static Route’s Nexthop. 1-3

1.3.1 Detecting Nexthop Reachability Through Track. 1-3

1.4 Displaying and Maintaining Static Routes. 1-4

1.5 Configuration Example. 1-5

Chapter 2 RIP Configuration. 2-1

2.1 RIP Overview. 2-1

2.1.1 RIP Working Mechanism.. 2-1

2.1.2 Operation of RIP. 2-3

2.1.3 RIP Version. 2-3

2.1.4 RIP Message Format 2-4

2.1.5 Supported RIP Features. 2-5

2.1.6 Protocols and Standards. 2-5

2.2 Configuring RIP Basic Functions. 2-6

2.2.1 Configuration Prerequisites. 2-6

2.2.2 Configuration Procedure. 2-6

2.3 Configuring RIP Route Control 2-8

2.3.1 Configuring an Additional Routing Metric. 2-8

2.3.2 Configuring RIPv2 Route Summarization. 2-9

2.3.3 Disabling Host Route Reception. 2-10

2.3.4 Advertising a Default Route. 2-10

2.3.5 Configuring Inbound/Outbound Route Filtering. 2-11

2.3.6 Configuring a Priority for RIP. 2-11

2.3.7 Configuring RIP Route Redistribution. 2-12

2.4 Configuring RIP Network Optimization. 2-12

2.4.1 Configuring RIP Timers. 2-12

2.4.2 Configuring Split Horizon and Poison Reverse. 2-13

2.4.3 Configuring the Maximum Number of Load Balanced Routes. 2-14

2.4.4 Enabling Zero Field Check on Incoming RIPv1 Messages. 2-14

2.4.5 Enabling Source IP Address Check on Incoming RIP Updates. 2-15

2.4.6 Configuring RIPv2 Message Authentication. 2-15

2.4.7 Specifying a RIP Neighbor 2-16

2.5 Displaying and Maintaining RIP. 2-16

2.6 RIP Configuration Examples. 2-17

2.6.1 Configuring RIP Version. 2-17

2.7 Troubleshooting RIP. 2-18

2.7.1 No RIP Updates Received. 2-18

2.7.2 Route Oscillation Occurred. 2-19

Chapter 3 OSPF Configuration. 3-1

3.1 Introduction to OSPF. 3-1

3.1.1 Basic Concepts. 3-2

3.1.2 OSPF Area Partition and Route Summarization. 3-4

3.1.3 Classification of OSPF Networks. 3-9

3.1.4 DR and BDR. 3-10

3.1.5 OSPF Packet Formats. 3-12

3.1.6 Supported OSPF Features. 3-20

3.1.7 Protocols and Standards. 3-21

3.2 OSPF Configuration Task List 3-21

3.3 Configuring OSPF Basic Functions. 3-23

3.3.1 Prerequisites. 3-23

3.3.2 Configuration Procedure. 3-23

3.4 Configuring OSPF Area Parameters. 3-24

3.4.1 Prerequisites. 3-24

3.4.2 Configuration Procedure. 3-24

3.5 Configuring OSPF Network Types. 3-25

3.5.1 Prerequisites. 3-26

3.5.2 Configuring the OSPF Network Type for an Interface. 3-26

3.5.3 Configuring an NBMA Neighbor 3-26

3.5.4 Configuring a Router Priority for an OSPF Interface. 3-27

3.6 Configuring OSPF Route Control 3-27

3.6.1 Prerequisites. 3-27

3.6.2 Configuring OSPF Route Summarization. 3-27

3.6.3 Configuring OSPF Inbound Route Filtering. 3-28

3.6.4 Configuring ABR Type-3 LSA Filtering. 3-29

3.6.5 Configuring an OSPF Cost for an Interface. 3-29

3.6.6 Configuring the Maximum Number of OSPF Routes. 3-30

3.6.7 Configuring the Maximum Number of Load-balanced Routes. 3-30

3.6.8 Configuring a Priority for OSPF. 3-31

3.6.9 Configuring OSPF Route Redistribution. 3-31

3.7 Configuring OSPF Network Optimization. 3-32

3.7.1 Prerequisites. 3-32

3.7.2 Configuring OSPF Packet Timers. 3-33

3.7.3 Specifying an LSA Transmission Delay. 3-34

3.7.4 Specifying SPF Calculation Interval 3-34

3.7.5 Specifying the LSA Minimum Repeat Arrival Interval 3-35

3.7.6 Specifying the LSA Generation Interval 3-35

3.7.7 Disabling Interfaces from Sending OSPF Packets. 3-36

3.7.8 Configuring Stub Routers. 3-37

3.7.9 Configuring OSPF Authentication. 3-37

3.7.10 Adding the Interface MTU into DD Packets. 3-38

3.7.11 Configuring the Maximum Number of External LSAs in LSDB. 3-38

3.7.12 Making External Route Selection Rules Defined in RFC1583 Compatible. 3-39

3.7.13 Logging Neighbor State Changes. 3-39

3.7.14 Configuring OSPF Network Management 3-39

3.7.15 Enabling the Advertisement and Reception of Opaque LSAs. 3-40

3.8 Configuring OSPF Graceful Restart 3-40

3.8.1 Configuring the GR Capability. 3-40

3.8.2 Configuring the OSPF GR Helper 3-42

3.8.3 Triggering OSPF Graceful Restart 3-42

3.9 Displaying and Maintaining OSPF. 3-43

3.10 OSPF Configuration Examples. 3-44

3.10.1 Configuring OSPF Basic Functions. 3-44

3.10.2 Configuring an OSPF Stub Area. 3-48

3.10.3 Configuring an OSPF NSSA Area. 3-51

3.10.4 Configuring OSPF DR Election. 3-53

3.10.5 Configuring OSPF Virtual Links. 3-58

3.10.6 OSPF Graceful Restart Configuration Example. 3-61

3.11 Troubleshooting OSPF Configuration. 3-62

3.11.1 No OSPF Neighbor Relationship Established. 3-62

3.11.2 Incorrect Routing Information. 3-63

Chapter 4 IS-IS Configuration. 4-1

4.1 IS-IS Overview. 4-1

4.1.1 Basic Concepts. 4-1

4.1.2 IS-IS Area. 4-4

4.1.3 IS-IS Network Type. 4-6

4.1.4 IS-IS PDU Format 4-8

4.1.5 IS-IS Features Supported. 4-15

4.1.6 Protocols and Standards. 4-17

4.2 IS-IS Configuration Task List 4-18

4.3 Configuring IS-IS Basic Functions. 4-19

4.3.1 Configuration Prerequisites. 4-19

4.3.2 Configuration Procedure. 4-19

4.4 Configuring IS-IS Routing Information Control 4-20

4.4.1 Configuration Prerequisites. 4-20

4.4.2 Specifying a Priority for IS-IS. 4-20

4.4.3 Configuring IS-IS Link Cost 4-21

4.4.4 Configuring the Maximum Number of Equal Cost Routes. 4-23

4.4.5 Configuring IS-IS Route Summarization. 4-23

4.4.6 Advertising a Default Route. 4-24

4.4.7 Configuring Inbound Route Filtering. 4-24

4.4.8 Configuring Route Redistribution. 4-25

4.4.9 Configuring IS-IS Route Leaking. 4-25

4.5 Tuning and Optimizing IS-IS Network. 4-26

4.5.1 Configuration Prerequisites. 4-26

4.5.2 Configuring a DIS Priority for an Interface. 4-26

4.5.3 Configuring IS-IS Timers. 4-26

4.5.4 Disabling an Interface from Sending/Receiving IS-IS Hello Packets. 4-28

4.5.5 Configuring LSP Parameters. 4-28

4.5.6 Configuring SPF Parameters. 4-30

4.5.7 Configuring Dynamic Host Name Mapping. 4-31

4.5.8 Configuring IS-IS Authentication. 4-31

4.5.9 Configuring LSDB Overload Tag. 4-32

4.5.10 Logging the Adjacency Changes. 4-33

4.5.11 Enabling an Interface to Send Small Hello Packets. 4-33

4.5.12 Enabling SNMP Trap. 4-34

4.6 Configuring IS-IS GR. 4-34

4.7 Displaying and Maintaining IS-IS. 4-35

4.8 IS-IS Configuration Example. 4-36

4.8.1 IS-IS Basic Configuration. 4-36

4.8.2 DIS Selection Configuration. 4-41

4.8.3 IS-IS Graceful Restart Configuration Example. 4-46

Chapter 5 BGP Configuration. 5-1

5.1 BGP Overview. 5-1

5.1.1 Formats of BGP Messages. 5-2

5.1.2 BGP Path Attributes. 5-5

5.1.3 BGP Route Selection. 5-10

5.1.4 IBGP and IGP Synchronization. 5-12

5.1.5 Settlements for Problems Caused by Large Scale BGP Networks. 5-13

5.1.6 BGP GR. 5-17

5.1.7 MP-BGP. 5-18

5.1.8 Protocols and Standards. 5-19

5.2 BGP Configuration Task List 5-19

5.3 Configuring BGP Basic Functions. 5-20

5.3.1 Prerequisites. 5-20

5.3.2 Configuration Procedure. 5-20

5.4 Controlling Route Distribution and Reception. 5-22

5.4.1 Prerequisites. 5-22

5.4.2 Configuring BGP Route Redistribution. 5-23

5.4.3 Configuring BGP Route Summarization. 5-23

5.4.4 Advertising a Default Route to a Peer or Peer Group. 5-24

5.4.5 Configuring BGP Route Distribution Filtering Policies. 5-24

5.4.6 Configuring BGP Route Reception Filtering Policies. 5-25

5.4.7 Enabling BGP and IGP Route Synchronization. 5-26

5.4.8 Configuring BGP Route Dampening. 5-27

5.5 Configuring BGP Route Attributes. 5-27

5.5.1 Prerequisites. 5-27

5.5.2 Configuration Procedure. 5-27

5.6 Tuning and Optimizing BGP Networks. 5-30

5.6.1 Prerequisites. 5-31

5.6.2 Configuration Procedure. 5-31

5.7 Configuring a Large Scale BGP Network. 5-33

5.7.1 Configuration Prerequisites. 5-33

5.7.2 Configuring BGP Peer Groups. 5-33

5.7.3 Configuring BGP Community. 5-34

5.7.4 Configuring a BGP Route Reflector 5-35

5.7.5 Configuring a BGP Confederation. 5-36

5.8 Configuring BGP GR. 5-37

5.9 Displaying and Maintaining BGP. 5-38

5.9.1 Displaying BGP. 5-38

5.9.2 Resetting BGP Connections. 5-39

5.9.3 Clearing BGP Information. 5-39

5.10 BGP Configuration Examples. 5-39

5.10.1 BGP Basic Configuration. 5-39

5.10.2 BGP and IGP Synchronization Configuration. 5-44

5.10.3 BGP Load Balancing and MED Attribute Configuration. 5-46

5.10.4 BGP Community Configuration. 5-49

5.10.5 BGP Route Reflector Configuration. 5-52

5.10.6 BGP Confederation Configuration. 5-54

5.10.7 BGP Path Selection Configuration. 5-57

5.11 Troubleshooting BGP. 5-61

5.11.1 No BGP Peer Relationship Established. 5-61

Chapter 6 Routing Policy Configuration. 6-1

6.1 Introduction to Routing Policy. 6-1

6.1.1 Routing Policy and Policy Routing. 6-1

6.1.2 Filters. 6-2

6.1.3 Routing Policy Application. 6-3

6.2 Routing Policy Configuration Task List 6-3

6.3 Defining Filtering Lists. 6-4

6.3.1 Prerequisites. 6-4

6.3.2 Defining an IPv4 prefix List 6-4

6.3.3 Defining an AS Path List 6-5

6.3.4 Defining a Community List 6-5

6.3.5 Defining an Extended Community List 6-5

6.4 Configuring a Routing Policy. 6-6

6.4.1 Prerequisites. 6-6

6.4.2 Creating a Routing Policy. 6-6

6.4.3 Defining if-match Clauses for the Routing Policy. 6-7

6.4.4 Defining apply Clauses for the Routing Policy. 6-8

6.5 Displaying and Maintaining the Routing Policy. 6-10

6.6 Routing Policy Configuration Example. 6-10

6.6.1 Applying Routing Policy When Redistributing IPv4 Routes. 6-10

6.7 Troubleshooting Routing Policy Configuration. 6-14

6.7.1 IPv4 Routing Information Filtering Failure. 6-14

 


Chapter 1  Static Routing Configuration

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

l           Introduction

l           Configuring a Static Route

l           Application Environment of Static Routing

l           Displaying and Maintaining Static Routes

l           Configuration Example

 

&  Note:

The term “router” in this document refers to a router in a generic sense or a Layer 3 switch.

 

1.1  Introduction

1.1.1  Static Route

A static route is a special route that is manually configured by the network administrator. If a network’s topology is simple, you only need to configure static routes for the network to work normally. The proper configuration and usage of static routes can improve network performance and ensure bandwidth for important network applications.

The disadvantage of using static routes is that they cannot adapt to network topology changes. If a fault or a topological change occurs in the network, the routes will be unreachable and the network breaks. In this case, the network administrator has to modify the static routes manually.

1.1.2  Default Route

A router selects the default route only when it cannot find any matching entry in the routing table.

If the destination address of a packet fails to match any entry in the routing table, the router selects the default route to forward the packet.

If there is no default route and the destination address of the packet fails to match any entry in the routing table, the packet will be discarded and an ICMP packet will be sent to the source to report that the destination or the network is unreachable.

You can create the default route with both destination and mask being 0.0.0.0, and some dynamic routing protocols, such as OSPF, RIP and IS-IS, can also generate the default route.

1.1.3  Application Environment of Static Routing

Before configuring a static route, you need to know the following concepts:

1)         Destination address and mask

In the ip route-static command, an IPv4 address is in dotted decimal format and a mask can be either in dotted decimal format or in the form of mask length (the digits of consecutive 1s in the mask).

2)         Output interface and next hop address

While configuring a static route, you can specify either the output interface or the next hop address depending on the specific occasion. The next hop address can not be a local interface IP address; otherwise, the route configuration will not take effect.

In fact, all the route entries must have a next hop address. When forwarding a packet, a router first searches the routing table for the route to the destination address of the packet. The system can find the corresponding link layer address and forward the packet only after the next hop address is specified.

When specifying the output interface, note that:

l           If the output interface is a NULL 0 interface, there is no need to configure the next hop address.

l           You are not recommended to specify a broadcast interface (such as VLAN interface) as the output interface, because a broadcast interface may have multiple next hops. If you have to do so, you must specify the corresponding next hop for the output interface.

3)         Other attributes

You can configure different preferences for different static routes so that route management policies can be applied more flexibly. For example, specifying the same preference for different routes to the same destination enables load sharing, while specifying different preferences for these routes enables route backup.

1.2  Configuring a Static Route

1.2.1  Configuration Prerequisites

Before configuring a static route, you need to configure the IP addresses for related interfaces.

1.2.2  Configuration Procedure

Follow these steps to configure a static route:

To do…

Use the command…

Remarks

Enter system view

system-view

Configure a static route

ip route-static dest-address { mask | mask-length } { next-hop-address | interface-type interface-number [ next-hop-address ] } [ preference preference-value ] [ tag tag-value ] [ description description-text ]

Required

By default, preference for static routes is 60, tag is 0, and no description information is configured.

Configure the default preference for static routes

ip route-static default-preference default-preference-value

Optional

60 by default

 

&  Note:

l      When configuring a static route, the static route does not take effect if you specify the next hop address first and then configure it as the IP address of a local interface, such as a VLAN interface.

l      If you do not specify the preference when configuring a static route, the default preference will be used. Reconfiguring the default preference applies only to newly created static routes.

l      You can flexibly control static routes by configuring tag values and using the tag values in the routing policy.

l      If the destination IP address and mask are both configured as 0.0.0.0 with the ip route-static command, the route is the default route.

 

1.3  Detecting Reachability of the Static Route’s Nexthop

If a static route fails due to a topology change or a fault, the connection will be interrupted. To improve network stability, the system needs to detect reachability of the static route’s next hop and switch to a backup route once the next hop is unreachable.

1.3.1  Detecting Nexthop Reachability Through Track

If you specify the nexthop but not outgoing interface when configuring a static route, you can associate the static route with a track entry to check the static route validity:

l           When the track entry is positive, the static route's nexthop is reachable and the static route takes effect.

l           When the track entry is negative, the static route's nexthop is unreachable and the static route is invalid. For details about track, refer to Track Configuration.

I. Network requirements

To detect the reachability of a static route's nexthop through a Track entry, you need to create a Track first. For detailed Track configuration procedure, refer to Track Configuration.

II. Configuration procedure

Follow these steps to detect the reachability of a static route's nexthop through Track:

To do…

Use the command…

Remarks

Enter system view

system-view

Associate the static route with a track entry

ip route-static dest-address { mask | mask-length } next-hop-address track track-entry-number [ preference preference-value ] [ tag tag-value ] [ description description-text ]

Required

Not configured by default

 

&  Note:

l      To configure this feature for an existing static route, simply associate the static route with a track entry. For a non-existent static route, configure it and associate it with a Track entry.

l      If a static route needs route recursion, the associated track entry must monitor the nexthop of the recursive route instead of that of the static route; otherwise, a valid route may be mistakenly considered invalid.

 

1.4  Displaying and Maintaining Static Routes

To do…

Use the command…

Remarks

Display the current configuration information

display current-configuration

Available in any view

Display the brief information of the IP routing table

display ip routing-table

Display the detailed information of the IP routing table

display ip routing-table verbose

View information of static routes

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

Delete all the static routes

delete static-routes all

Available In system view

 

1.5  Configuration Example

I. Network requirements

The IP addresses and masks of the switches and hosts are shown in the following figure. Static routes are required for interconnection between any two hosts.

II. Network diagram

Figure 1-1 Network diagram for static route configuration

III. Configuration procedure

1)         Configuring IP addresses for interfaces (omitted)

2)         Configuring static routes

# Configure a default route on Switch A

<SwitchA> system-view

[SwitchA] ip route-static 0.0.0.0 0.0.0.0 1.1.4.2

# Configure two static routes on Switch B

<SwitchB> system-view

[SwitchB] ip route-static 1.1.2.0 255.255.255.0 1.1.4.1

[SwitchB] ip route-static 1.1.3.0 255.255.255.0 1.1.5.6

# Configure a default route on Switch C

<SwitchC> system-view

[SwitchC] ip route-static 0.0.0.0 0.0.0.0 1.1.5.5

3)         Configure the hosts

The default gateways for the three hosts A, B and C are 1.1.2.3, 1.1.6.1 and 1.1.3.1 respectively. The configuration procedure is omitted.

4)         Display the configuration result

# Display the IP routing table of Switch A.

[SwitchA] display ip routing-table

Routing Tables: Public

         Destinations : 7       Routes : 7

 

Destination/Mask    Proto  Pre  Cost         NextHop         Interface

 

0.0.0.0/0           Static 60   0            1.1.4.2         Vlan500

1.1.2.0/24          Direct 0    0            1.1.2.3         Vlan300

1.1.2.3/32          Direct 0    0            127.0.0.1       InLoop0

1.1.4.0/30          Direct 0    0            1.1.4.1         Vlan500

1.1.4.1/32          Direct 0    0            127.0.0.1       InLoop0

127.0.0.0/8         Direct 0    0            127.0.0.1       InLoop0

127.0.0.1/32        Direct 0    0            127.0.0.1       InLoop0

# Display the IP routing table of Switch B.

[SwitchB] display ip routing-table

Routing Tables: Public

         Destinations : 10       Routes : 10

 

Destination/Mask    Proto  Pre  Cost         NextHop         Interface

 

1.1.2.0/24          Static 60   0            1.1.4.1         Vlan500

1.1.3.0/24          Static 60   0            1.1.5.6         Vlan600

1.1.4.0/30          Direct 0    0            1.1.4.2         Vlan500

1.1.4.2/32          Direct 0    0            127.0.0.1       InLoop0

1.1.5.0/30          Direct 0    0            1.1.5.5         Vlan600

1.1.5.5/32          Direct 0    0            127.0.0.1       InLoop0

127.0.0.0/8         Direct 0    0            127.0.0.1       InLoop0

127.0.0.1/32        Direct 0    0            127.0.0.1       InLoop0

1.1.6.0/24          Direct 0    0            1.1.6.1         Vlan100

1.1.6.1/32          Direct 0    0            127.0.0.1       InLoop0     

# From Host A, use the ping command to verify the network layer reachability to Host B and Host C.

 


Chapter 2  RIP Configuration

 

&  Note:

l      The term “router” in this document refers to a router in a generic sense or a Layer 3 switch.

l      The S5500-EI series only support single RIP process.

 

When configuring RIP, go to these sections for information you are interested in:

l           RIP Overview

l           Configuring RIP Basic Functions

l           Configuring RIP Route Control

l           Configuring RIP Network Optimization

l           Displaying and Maintaining RIP

l           RIP Configuration Examples

l           Troubleshooting RIP

2.1  RIP Overview

RIP is a simple Interior Gateway Protocol (IGP), mainly used in small-sized networks, such as academic networks and simple LANs. RIP is not applicable to complex networks.

RIP is still widely used in practical networking due to easier implementation, configuration and maintenance than OSPF and IS-IS.

2.1.1  RIP Working Mechanism

I. Basic concepts

RIP is a distance vector routing protocol, using UDP packets for exchanging information through port 520.

RIP uses a hop count to measure the distance to a destination. The hop count is known as the metric. The hop count from a router to a directly connected network is 0. The hop count from one router to a directly connected router is 1. To limit convergence time, the range of RIP metric value is from 0 to 15. A metric value of 16 (or bigger) is considered infinite, which means the destination network is unreachable. That is why RIP is not suitable for large-scaled networks.

RIP prevents routing loops by implementing the split horizon and poison reverse functions.

II. RIP routing table

A RIP router has a routing table containing routing entries of all reachable destinations, and each routing entry contains:

l           Destination address: IP address of a host or a network.

l           Next hop: IP address of the adjacent router’s interface to reach the destination.

l           Egress interface: Packet outgoing interface.

l           Metric: Cost from the local router to the destination.

l           Route time: Time elapsed since the routing entry was last updated. The time is reset to 0 every time the routing entry is updated.

l    &nb