H3C Low-End Ethernet Switches Configuration Examples(V1.04)

HomeSupportResource CenterSwitchesH3C S3100 Switch SeriesH3C S3100 Switch SeriesTechnical DocumentsConfigureConfiguration ExamplesH3C Low-End Ethernet Switches Configuration Examples(V1.04)
05-Routing Configuration Examples
Title Size Download
05-Routing Configuration Examples 716.56 KB

Table of Contents

Chapter 1 Routing Overview.. 1-1

1.1 Overview. 1-1

1.1.1 Static Routing and Routing Protocols. 1-1

1.1.2 Routing Protocols Supported by the H3C Low-End Ethernet Switches. 1-1

1.2 Configuration Guide. 1-2

1.2.1 Configuration Task List 1-2

1.2.2 Static Route Configuration. 1-2

1.2.3 RIP Configuration. 1-3

1.2.4 OSPF Configuration. 1-9

1.2.5 BGP Configuration. 1-18

1.2.6 Route Policy Configuration. 1-29

Chapter 2 Configuration Examples. 2-1

2.1 Configuration Examples. 2-1

2.1.1 Static Routing Configuration Example. 2-1

2.1.2 RIP Configuration Examples. 2-2

2.1.3 DR Configuration Example. 2-4

2.1.4 OSPF Virtual Link Configuration Examples. 2-6

2.1.5 BGP Confederation Configuration Example. 2-9

2.1.6 BGP Route Reflector Configuration Example. 2-11

2.1.7 BGP Path Selection Configuration Example. 2-14

Chapter 3 Comprehensive Configuration Example. 3-1

3.1 Network Requirements. 3-1

3.1.1 Requirement Analysis, Network Diagram and Configuration Plan. 3-1

3.1.2 Devices Used for Networking. 3-3

3.1.3 Routing Protocols and Related Parameters on Devices. 3-3

3.1.4 Software Version. 3-4

3.2 Configuration Procedure. 3-4

3.2.1 Configuration Guide. 3-4

3.2.2 Basic Configuration. 3-4

3.2.3 Basic RIPv2/OSPF/BGP Configuration. 3-4

3.2.4 RIP, Static Route, and Routing Policy Configuration Example. 3-12

3.2.5 BGP and IGP Interaction Configuration Example. 3-13

3.2.6 Route Backup Configuration Example. 3-15

3.2.7 BGP MED Attribute Configuration Example. 3-16

3.3 Displaying the Whole Configuration on Devices. 3-20

3.3.1 Displaying the Whole Configuration on Devices. 3-20

3.4 Verifying the Configuration. 3-31

3.4.1 Verifying the Configuration of Routing Policy and Static Routes. 3-31

3.4.2 Verifying the BGP and IGP Interaction Configuration. 3-32

3.4.3 Verifying the Route Backup Configuration. 3-33

3.4.4 Verifying the MED Attribute Configuration. 3-34

3.5 Precautions. 3-36

 


Chapter 1  Routing Overview

1.1  Overview

1.1.1  Static Routing and Routing Protocols

I. Static routing

Static routing features zero overhead, simple configuration, and is applicable to simple and stable networks. But it requires human intervention when the network topology changes.

II. RIP

RIP is easy to configure and is insensitive to CPU and memory, so it is applicable to small and medium sized networks. However, it converges slowly and cannot eliminate route loops completely. In addition, periodic RIP updating multicasts or broadcasts consume many network resources.

III. OSPF

OSPF is complicated to configure and requires high-performance CPU and memory. It is applicable to medium and large sized networks. OSPF converges fast and can eliminate route loops completely. It supports area partition and provides hierarchical route management.

IV. BGP

BGP runs between ASs. Although complicated to configure, BGP features high reliability, stability, and scalability, has flexible and powerful routing policies and eliminates route loops completely.

1.1.2  Routing Protocols Supported by the H3C Low-End Ethernet Switches

Table 1-1 Routing protocols supported by the H3C low-end ethernet switches

               Routing

             Protocols

 

Model

RIP

OSPF

BGP

S3600-SI

S3600-EI

S5600

 

1.2  Configuration Guide

 

&  Note:

l      This configuration guide takes S5600 series Ethernet switches as an example.

l      For configuration precautions, see corresponding operation manuals and command manuals.

 

1.2.1  Configuration Task List

Table 1-2 Configuration task List

Task

Details

Static route configuration

1.2.2 

RIP configuration

1.2.3 

OSPF configuration

1.2.4 

BGP configuration

1.2.5 

 

1.2.2  Static Route Configuration

Table 1-3 Configure a static route

Operation

Command

Remarks

Enter system view

system-view

Configure a static route

ip route-static ip-address { mask | mask-length } { interface-type interface-number | next-hop } [ preference preference-value ] [ reject | blackhole ] [ detect-group group number ] [ description text ]

Required

By default, the system can obtain the route to the subnet directly connected to the router.

 

1.2.3  RIP Configuration

Table 1-4 RIP configuration tasks

Configuration task

Remarks

Related section

Configuring basic RIP functions

Enabling RIP

Required

1.2.3  I.

Setting the RIP operating status on an interface

Optional

1.2.3  II.  

Specifying a RIP version

Optional

1.2.3  III.

Configuring RIP route control

Setting the additional routing metrics of an interface

Optional

1.2.3  IV.

Configuring RIP route summarization

Optional

1.2.3  V.

Disabling the receiving of host routes

Optional

1.2.3  VI.

Configuring RIP to filter incoming/outgoing routes

Optional

1.2.3  VII.

Setting RIP preference

Optional

1.2.3  VIII.

Enabling load sharing among interfaces

Optional

1.2.3  IX.

Configuring RIP to import routes from another protocol

Optional

1.2.3  X.

Adjusting and optimizing a RIP network

Configuring RIP timers

Optional

1.2.3  XI.

Configuring split horizon

Optional

1.2.3  XII.

Configuring RIP-1 packet zero field check

Optional

1.2.3  XIII.

Setting RIP-2 packet authentication mode

Optional

1.2.3  XIV.

Configuring RIP to unicast packets

Optional

1.2.3  XV.

 

I. Configuring Basic RIP Functions

Table 1-5 Enable RIP on the interfaces attached to a specified network segment

Operation

Command

Remarks

Enter system view

system-view

Enable RIP and enter RIP view

rip

Required

Enable RIP on the specified interface

network network-address

Required

Disabled by default.

 

II. Setting the RIP operating status on an interface

Table 1-6 Set the RIP operating status on an interface

Operation

Command

Remarks

Enter system view

system-view

Enter interface view

interface interface-type interface-number

Enable the interface to receive RIP update packets

rip input

Optional

By default, all interfaces are allowed to send and receive RIP update packets.

Enable the interface to send RIP update packets

rip output

Enable the interface to receive and send RIP update packets

rip work

 

III. Specifying the RIP version on an interface

Table 1-7 Specify the RIP version on an interface

Operation

Command

Remarks

Enter system view

system-view

Enter interface view

interface interface-type interface-number

Specify the version of the RIP running on the interface

rip version { 1 | 2 [ broadcast | multicast ] }

Optional

By default, the version of the RIP running on an interface is RIP-1.

 

IV. Setting the additional routing metrics of an interface

Additional metric is the metric added to the original metrics of RIP routes on an interface. It does not directly change the metric value of a RIP route in the routing table of a router, but will be added to incoming or outgoing RIP routes on the interface.

Table 1-8 Set additional routing metric

Operation

Command

Remarks

Enter system view

system-view

Enter interface view

interface interface-type interface-number

Set the additional routing metric to be added for incoming RIP routes on this interface

rip metricin value

Optional

By default, the additional routing metric added for incoming routes on an interface is 0.

Set the additional routing metric to be added for outgoing RIP routes on this interface

rip metricout value

Optional

By default, the additional routing metric added for outgoing routes on an interface is 1.

 

V. Configuring RIP route summarization

Table 1-9 Configure RIP route summarization

Operation

Command

Remarks

Enter system view

system-view

Enter RIP view

rip

Enable RIP-2 automatic route summarization

summary

Required

By default, RIP-2 automatic route summarization is enabled.

 

VI. Disabling the router from receiving host routes

Table 1-10 Disable the router from receiving host routes

Operation

Command

Remarks

Enter system view

system-view

Enter RIP view

rip

Disable the router from receiving host routes

undo host-route

Required

By default, the router receives host routes.

 

VII. Configuring RIP to filter incoming/outgoing routes

Table 1-11 Configure RIP to filter incoming/outgoing routes

Operation

Command

Remarks

Enter system view

system-view

Enter RIP view

rip

Configure RIP to filter incoming routes

filter-policy { acl-number | ip-prefix ip-prefix-name [ gateway ip-prefix-name ] | route-policy route-policy-name } import

Required

By default, RIP does not filter any incoming route.

The gateway keyword is used to filter the incoming routes advertised from a specified address.

filter-policy gateway ip-prefix-name import

Configure RIP to filter outgoing routes

filter-policy { acl-number | ip-prefix ip-prefix-name } export [ protocol ] [ process-id ]

Required

By default, RIP does not filter any outgoing route.

filter-policy route-policy route-policy-name export

 

VIII. Setting RIP preference

Table 1-12 Set RIP preference

Operation

Command

Remarks

Enter system view

system-view

Enter RIP view

rip

Set the RIP preference

preference value

Required

The default RIP preference is 100.

 

IX. Enabling load sharing among RIP interfaces

Table 1-13 Enable load sharing among RIP interfaces

Operation

Command

Remarks

Enter system view

system-view

Enter RIP view

rip

Enable load sharing among RIP interfaces

traffic-share-across-interface

Required

By default, load sharing among RIP interfaces is disabled

 

X. Configuring RIP to redistribute routes from another protocol

Table 1-14 Configure RIP to import routes from another protocol

Operation

Command

Remarks

Enter system view

system-view

Enter RIP view

rip

Configure a default cost for an incoming route

default cost value

Optional

1 by default.

Configure RIP to redistribute routes from another protocol

import-route protocol [ process-id ] [ cost value | route-policy route-policy-name ]*

Required

By default, RIP does redistribute any route from other protocols.

 

XI. Configuring RIP timers

Table 1-15 Configure RIP timers

Operation

Command

Remarks

Enter system view

system-view

Enter RIP view

rip

Set the RIP timers

timers { update update-timer | timeout timeout-timer } *

Required

By default, the Update timer is set 30 seconds and the Timeout timer to 180 seconds.

 

XII. Configuring split horizon

Table 1-16 Configure split horizon

Operation

Command

Remarks

Enter system view

system-view

Enter interface view

interface interface-type interface-number

Enable split horizon

rip split-horizon

Required

Enabled by default.

 

XIII. Configuring RIP-1 packet zero field check

Table 1-17 Configure RIP-1 packet zero field check

Operation

Command

Remarks

Enter system view

system-view

Enter RIP view

rip

Enable the check of the “must be zero” field in RIP-1 packets

checkzero

Required

Enabled by default.

 

XIV. Setting RIP-2 packet authentication mode

Table 1-18 Set RIP-2 packet authentication mode

Operation

Command

Remarks

Enter system view

system-view

Enter interface view

interface interface-type interface-number

Set RIP-2 packet authentication mode

rip authentication-mode { simple password | md5 { rfc2453 key-string | rfc2082 key-string key-id } }

Required

If you specify to use MD5 authentication, you must specify one of the following MD5 authentication types:

l      rfc2453 (this type supports the packet format defined in RFC 2453)

l      rfc2082 (this type supports the packet format defined in RFC 2082)

 

XV. Configuring RIP to unicast RIP packets

Table 1-19 Configure RIP to unicast RIP packets

Operation

Command

Remarks

Enter system view

system-view

Enter RIP view

rip

Configure RIP to unicast RIP packets

peer ip-address

Required

When RIP runs on the link that does not support broadcast or multicast, you must configure RIP to unicast RIP packets.

 

1.2.4  OSPF Configuration

Table 1-20 OSPF configuration tasks

Configuration task

Remarks

Related section

Basic OSPF configuration

Required

1.2.4  I.  

OSPF area attribute configuration

Optional

1.2.4  II.

OSPF network type configuration

Configuring the network type of an OSPF interface

Optional

1.2.4  III.

Configuring an NBMA/P2MP neighbor

Optional

1.2.4  IV.

Configuring the DR priority on an OSPF interface

Optional

1.2.4  V.

OSPF route control

Configuring OSPF route summarization

Optional

1.2.4  VI.

Configuring OSPF to filter received routes

Optional

1.2.4  VII.

Configuring OSPF interface cost

Optional

1.2.4  VIII.

Configuring OSPF route priority

Optional

1.2.4  IX.

Configuring the maximum number of OSPF ECMP routes

Optional

1.2.4  X.

Configuring OSPF to redistribute external routes

Optional

1.2.4  XI.

OSPF network adjustment and optimization

Configuring OSPF timers

Optional

1.2.4  XII.

Configuring the LSA transmission delay

Optional

1.2.4  XIII.

Configuring the SPF calculation interval

Optional

1.2.4  XIV.

Disabling OSPF packet transmission on an interface

Optional

1.2.4  XV.

Configuring OSPF authentication

Optional

1.2.4  XVI.

Configuring the MTU field in DD packets

Optional

1.2.4  XVII.

Enabling OSPF logging of neighbor state changes

Optional

1.2.4  XVIII.

Configuring OSPF network management

Optional

1.2.4  XIX.

 

I. Basic OSPF configuration

Table 1-21 Basic OSPF configuration

Operation

Command

Remarks

Enter system view

system-view

Configure the router ID

router id router-id

Optional

If multiple OSPF processes run on a router, you are recommended to use the router-id keyword in the ospf command to specify different router IDs for different processes.

Enable OSPF and enter OSPF view

ospf [ process-id [ router-id router-id ] ]

Required

Enter OSPF view.

Enter OSPF area view

area area-id

Configure the network segments in the area

network ip-address wildcard-mask

Required

By default, an interface does not belong to any area.

 

II. Configuring OSPF Area Attributes

Table 1-22 Configure OSPF area attributes

Operation

Command

Remarks

Enter system view

system-view

Enter OSPF view

ospf [ process-id [ router-id router-id ] ]

Enter OSPF area view

area area-id

Configure the current area to be a stub area

stub [ no-summary ]

Optional

By default, no area is configured as a stub area.

Configure the current area to be an NSSA area

nssa [ default-route-advertise | no-import-route | no-summary ] *

Optional

By default, no area is configured as an NSSA area.

Configure the cost of the default route transmitted by OSPF to a stub or NSSA area

default-cost cost

Optional

This can be configured on an ABR only. By default, the cost of the default route to a stub or NSSA area is 1.

Create and configure a virtual link

vlink-peer router-id [ hello seconds | retransmit seconds | trans-delay seconds | dead seconds | simple password | md5 keyid key ] *

Optional

For a virtual link to take effect, you need to use this command at both ends of the virtual link and ensure consistent configurations of the hello, dead, and other parameters at both ends.

 

III. Configuring the Network Type of an OSPF Interface

Table 1-23 Configure the network type of an OSPF interface

Operation

Command

Remarks

Enter system view

system-view

Enter interface view

interface interface-type interface-number

Configure the network type of the OSPF interface

ospf network-type { broadcast | nbma | p2mp [ unicast ] | p2p }

Optional

By default, the network type of an interface depends on the physical interface.

 

IV. Configuring an NBMA/P2MP Neighbor

Table 1-24 Configure NBMA/P2MP neighbor

Operation

Command

Remarks

Enter system view

system-view

Enter OSPF view

ospf [ process-id [ router-id router-id ] ]

Required

Configure an NBMA/P2MP neighbor

peer ip-address [ dr-priority dr-priority ]

Required

By default, the priority for the neighbor of an NBMA interface is 1.

 

V. Configuring the DR Priority on an OSPF Interface

Table 1-25 Configure the DR priority on an OSPF interface

Operation

Command

Remarks

Enter system view

system-view

Enter interface view

interface interface-type interface-number

Configure the DR priority on the OSPF interface

ospf dr-priority priority

Optional

The default DR priority is 1.

 

VI. Configuring OSPF Route Summarization

Table 1-26 Configure ABR route summarization

Operation

Command

Remarks

Enter system view

system-view

Enter OSPF view

ospf [ process-id [ router-id router-id ] ]

Enter area view

area area-id

Enable ABR route summarization

abr-summary ip-address mask [ advertise | not-advertise ]

Required

This command takes effect only when it is configured on an ABR. By default, this function is disabled on an ABR.

 

Table 1-27 Configure ASBR route summarization

Operation

Command

Remarks

Enter system view

system-view

Enter OSPF view

ospf [ process-id [ router-id router-id ] ]

Enable ASBR route summarization

asbr-summary ip-address mask [ not-advertise | tag value ]

Required

This command takes effect only when it is configured on an ASBR. By default, summarization of imported routes is disabled.

 

VII. Configuring OSPF to Filter Received Routes

Table 1-28 Configure OSPF to filter received routes

Operation

Command

Remarks

Enter system view

system-view

Enter OSPF view

ospf [ process-id [ router-id router-id ] ]

Configure to filter the received routes

filter-policy { acl-number | ip-prefix ip-prefix-name | gateway ip-prefix-name } import

Required

By default, OSPF does not filter received routing information.

 

VIII. Configuring the OSPF Cost on an Interface

Table 1-29 Configure the OSPF cost on an interface

Operation

Command

Remarks

Enter system view

system-view

Enter interface view

interface interface-type interface-number

Configure the OSPF cost on the interface

ospf cost value

Optional

By default, the interface calculates the OSPF cost according to the current baud rate on it. For a VLAN interface on the switch, a fixed value of 10 is used.

 

IX. Configuring OSPF Route Priority

Table 1-30 Configure OSPF route priority

Operation

Command

Remarks

Enter system view

system-view

Enter OSPF view

ospf [ process-id [ router-id router-id ] ]

Configure OSPF route priority

preference [ ase ] value

Optional

By default, the OSPF route priority is 10 and the priority of OSPF ASE is 150.

 

X. Configuring the Maximum Number of OSPF ECMP Routes

Table 1-31 Configure the maximum number of OSPF ECMP routes

Operation

Command

Remarks

Enter system view

system-view

Enter OSPF view

ospf [ process-id [ router-id router-id ] ]

Configure the maximum number of OSPF ECMP routes

multi-path-number value

Optional

3 by default.

 

XI. Configuring OSPF to Redistribute External Routes

Table 1-32 Configure OSPF to redistribute external routes

Operation

Command

Remarks

Enter system view

system-view

Enter OSPF view

ospf [ process-id [ router-id router-id ] ]

Configure OSPF to redistribute routes from another protocol

import-route protocol [ process-id ] [ cost value | type value | tag value | route-policy route-policy-name ] *

Required

By default, OSPF does not import the routing information of other protocols.

Configure OSPF to filter outgoing routes

filter-policy { acl-number | ip-prefix ip-prefix-name } export [ protocol ]

Optional

By default, OSPF does not filter advertised routes.

Enable OSPF to import the default route

default-route-advertise [ always | cost value | type type-value | route-policy route-policy-name ]*

Optional

By default, OSPF does not import the default route.

Configure the default parameters for redistributed routes, including cost, interval, limit, .tag, and type

default { cost value | interval seconds | limit routes | tag tag | type type } *

Optional

These parameters respectively default to:

l      Cost: 1

l      Interval: 1 (second)

l      Limit: 1000

l      Tag: 1

l      Type: 2

 

XII. Configuring OSPF Timers

Table 1-33 Configure OSPF timers

Operation

Command

Remarks

Enter system view

system-view

Enter interface view

interface interface-type interface-number

Configure the hello interval on the interface

ospf timer hello seconds

Optional

By default, p2p and broadcast interfaces send Hello packets every 10 seconds; while p2mp and NBMA interfaces send Hello packets every 30 seconds.

Configure the poll interval on the NBMA interface

ospf timer poll seconds

Optional

By default, poll packets are sent every 40 seconds.

Configure the dead time of the neighboring router on the interface

ospf timer dead seconds

Optional

By default, the dead time for the OSPF neighboring router on a p2p or broadcast interface is 40 seconds and that for the OSPF neighboring router on a p2mp or NBMA interface is 120 seconds.

Configure the interval for retransmitting an LSA on an interface

ospf timer retransmit interval

Optional

By default, this interval is five seconds.

 

XIII. Configure the LSA transmission delay

Table 1-34 Configure the LSA transmission delay

Operation

Command

Remarks

Enter system view

system-view

Enter interface view

interface interface-type interface-number

Configure the LSA transmission delay

ospf trans-delay seconds

Optional

By default, the LSA transmission delay is one second.

 

XIV. Configuring the SPF Calculation Interval

Table 1-35 Configure the SPF calculation interval

Operation

Command

Remarks

Enter system view

system-view

Enter OSPF view

ospf [ process-id [ router-id router-id ] ]

Configure the SPF calculation interval

spf-schedule-interval interval

Optional

By default, the SPF calculation interval is five seconds.

 

XV. Disabling OSPF Packet Transmission on an Interface

Table 1-36 Disable OSPF packet transmission on an interface

Operation

Command

Remarks

Enter system view

system-view

Enter OSPF view

ospf [ process-id [ router-id router-id ] ]

Disable OSPF packet transmission on a specified interface

silent-interface silent-interface-type silent-interface-number

Optional

By default, all the interfaces are allowed to transmit OSPF packets.

 

XVI. Configuring OSPF Authentication

Table 1-37 Configure OSPF authentication

Operation

Command

Remarks

Enter system view

system-view

Enter OSPF view

ospf [ process-id [ router-id router-id ] ]

Enter OSPF area view

area area-id

Configure the authentication mode of the OSPF area

authentication-mode { simple | md5 }

Required

By default, no authentication mode is configured for an area.

Return to OSPF view

quit

Return to system view

quit

Enter interface view

interface interface-type interface-number

Configure the authentication mode of the OSPF interface

ospf authentication-mode { simple password | md5 key-id key }

Optional

By default, OSPF packets are not authenticated on an interface.

 

XVII. Configuring the MTU Field in DD Packets

Table 1-38 Configure to fill the MTU field when an interface transmits DD packets

Operation

Command

Remarks

Enter system view

system-view

Enter Ethernet interface view

interface interface-type interface-number

Required

Enable the interface to fill in the MTU field when transmitting DD packets

ospf mtu-enable

Optional

By default, the MTU value is 0 when an interface transmits DD packets. That is, the actual MTU value of the interface is not filled in.

 

XVIII. Enabling OSPF Logging of Neighbor State Changes

Table 1-39 Enable OSPF logging of neighbor state changes

Operation

Command

Remarks

Enter system view

system-view

Enter OSPF view

ospf [ process-id [ router-id router-id ] ]

Enable the OSPF logging of neighbor state changes

log-peer-change

Required

Disabled by default.

 

XIX. Configuring OSPF Network Management

Table 1-40 Configure OSPF network management (NM)

Operation

Command

Remarks

Enter system view

system-view

Configure OSPF MIB binding

ospf mib-binding process-id

Optional

By default, OSPF MIB is bound to the first enabled OSPF process.

Enable OSPF Trap sending

snmp-agent trap enable ospf [ process-id ] [ ifauthfail | ifcfgerror | ifrxbadpkt | ifstatechange | iftxretransmit | lsdbapproachoverflow | lsdboverflow | maxagelsa | nbrstatechange | originatelsa | vifauthfail | vifcfgerror | virifrxbadpkt | virifstatechange | viriftxretransmit | virnbrstatechange ]*

Optional

You can configure OSPF to send diversified SNMP TRAP messages and specify a certain OSPF process to send SNMP TRAP messages by process ID.

 

1.2.5  BGP Configuration

Table 1-41 BGP configuration tasks

Configuration task

Remarks

Related section

Configuring Basic BGP Functions

Required

1.2.5  I.  

Configuring the way to advertise/receive routing information

Importing routes

Optional

1.2.5  II.

Configuring route aggregation

Optional

1.2.5  III.

Enabling Default Route Advertising

Optional

1.2.5  IV.

Configuring route reception filtering policies

Optional

1.2.5  V.

Configure route advertisement filtering policies

Optional

1.2.5  VI.

Disable BGP-IGP Route Synchronization

Optional

1.2.5  VII.

Configuring BGP Route Dampening

Optional

1.2.5  VIII.

Configuring BGP route attributes

Optional

1.2.5  IX.

Adjusting and optimizing a BGP network

Optional

1.2.5  X.

Configure a large-scale BGP network

Configuring BGP Peer Group

Required

1.2.5  XI.

Configuring BGP Community

Required

1.2.5  XII.

Configuring BGP RR

Optional

1.2.5  XIII.

Configuring BGP Confederation

Optional

1.2.5  XIV.

 

I. Configuring Basic BGP Functions

Table 1-1 Configure basic BGP functions

Operation

Command

Description

Enter system view

system-view

Enable BGP and enter BGP view

bgp as-number

Required

By default, BGP is disabled.

Specify the AS number for the BGP peers

peer group-name as-number as-number

By default, a peer is not assigned an AS number.

Assign a description string for a BGP peer/a BGP peer group

peer { group-name | ip-address } description description-text

Optional

By default, a peer/a peer group is not assigned a description string.

Activate a specified BGP peer

peer { group-name | ip-address } enable

Optional

By default, a BGP peer is active.

Enable BGP logging

log-peer-change

Optional

By default, BGP logging is enabled.

Specify the source interface for route update packets

peer { group-name | ip-address } connect-interface interface-type interface-number

Optional

By default, the source interface of the optimal route update packets is used as the source interface.

Allow routers that belong to non-directly connected networks to establish EBGP connections.

peer group-name ebgp-max-hop [ hop-count ]

Optional

By default, routers that belong to two non-directly connected networks cannot establish EBGP connections.

You can configure the maximum hops of EBGP connection by specifying the hop-count argument.

 

II. Importing Routes

Table 1-2 Import routes

Operation

Command

Description

Enter system view

system-view

Enable BGP, and enter BGP view

bgp as-number

Import the default route to the BGP routing table

default-route imported

Optional

By default, BGP does not import default routes to BGP routing table.

Import and advertise routing information generated by other protocols.

import-route protocol [ process-id ] [ med med-value | route-policy route-policy-name ]*

Required

By default, BGP does not import nor advertise the routing information generated by other protocols.

Advertise network segment routes to BGP routing table

network network-address [ mask ] [route-policy route-policy-name ]

Optional

By default, BGP does not advertise any network segment routes.

 

III. Configuring BGP Route Aggregation

Table 1-3 Configure BGP route aggregation

Operation

Command

Description

Enter system view

system-view

Enable BGP, and enter BGP view

bgp as-number

Required

By default, BGP is disabled.

Configure BGP route aggregation

Enable automatic route aggregation

summary

Required

By default, routes are not aggregated.

Enable manual route aggregation

aggregate ip-address mask [ as-set | attribute-policy route-policy-name | detail-suppressed | origin-policy route-policy-name | suppress-policy route-policy-name ]*

 

IV. Enabling Default Route Advertising

Table 1-4 Enable default rout advertising

Operation

Command

Description

Enter system view

system-view

Enter BGP view

bgp as-number

Enable default route advertising

peer  group-name default-route-advertise [ route-policy route-policy-name ]

Required

By default, a BGP router does not send default routes to a specified peer/peer group.

 

V. Configuring route reception filtering policies

Table 1-5 Configure route reception filtering policies

Operation

Command

Description

Enter system view

system-view

Enter BGP view

bgp as-number

Configure the global route reception filtering policy

filter-policy { acl-number | gateway ip-prefix-name | ip-prefix ip-prefix-name [ gateway ip-prefix-name ] } import

Required

By default, the incoming routing information is not filtered.

Reference a routing policy to filter routes from a peer/peer group

peer { group-name | ip-address } route-policy policy-name import

Required

By default, no route filtering policy is specified for a peer/peer group.

Filter the routing information from a peer/peer group

Reference an ACL to filter BGP routes from a peer/peer group

peer { group-name | ip-address } filter-policy acl-number import

Required

By default, no ACL-based BGP route filtering policy, AS path ACL-based BGP route filtering policy, or IP prefix list-based BGP route filtering policy is configured for a peer/peer group.

Reference an AS path ACL to filter routes from a peer/peer group

peer { group-name | ip-address } as-path-acl acl-number import

Reference an IP prefix list to filter routes from a peer/peer group

peer { group-name | ip-address } ip-prefix ip-prefix-name import

 

VI. Configure route advertisement filtering policies

Table 1-6 Configure route advertisement filtering policies

Operation

Command

Description

Enter system view

system-view

Enter BGP view

bgp as-number

Configure the global route advertisement filtering policy

filter-policy { acl-number | ip-prefix ip-prefix-name } export [ protocol [ process-id ] ]

Required

By default, advertised routes are not filtered.

Reference a routing policy to filter the routes to a peer group

peer group-name route-policy route-policy-name export

Required

By default, no route advertising policy is specified for the routes advertised to a peer group.

Filter the routing information to a peer group

Reference an ACL to filter BGP routes to a peer group

peer  group-name  filter-policy acl-number export

Required

Not configured by default

Reference an AS path ACL to filter BGP routes to a peer group

peer group-name  as-path-acl acl-number export

Reference an IP prefix list to filter BGP routes to a peer group

peer group-name ip-prefix ip-prefix-name export

 

VII. Disable BGP-IGP Route Synchronization

Table 1-7 Disable BGP-IGP route synchronization

Operation

Command

Description

Enter system view

system-view

Enter BGP view

bgp as-number

Disable BGP-IGP route synchronization

undo synchronization

Required

By default, BGP routes and IGP routes are not synchronized.

 

VIII. Configuring BGP Route Dampening

Table 1-8 Configure BGP route dampening

Operation

Command

Description

Enter system view

system-view

Enter BGP view

bgp as-number

Configure BGP route dampening-related parameters

dampening [ half-life-reachable half-life-unreachable reuse suppress ceiling ] [ route-policy route-policy-name ]

Required

By default, route dampening is disabled. Other default route dampening-related parameters are as follows.

l      half-life-reachable: 15 (in minutes)

l      half-life-unreachable: 15 (in minutes)

l      reuse: 750

l      suppress: 2000

l      ceiling: 16,000

 

IX. Configuring BGP Route Attributes

Table 1-9 Configure BGP route attributes

Operation

Command

Description

Enter system view

system-view

Enter BGP view

bgp as-number

Configure the management preference of the exterior, interior and local routes

preference ebgp-value  ibgp-value local-value

Optional

By default, the management preference of the exterior, interior and local routes is 256, 256, and 130.

Set the default local preference

default local-preference value

Optional

By default, the local preference defaults to 100.

Configure the MED attribute

Configure the default local MED value

default med med-value

Optional

By default, the med-value argument is 0.

Permit to compare the MED values of the routes coming from the neighbor routers in different ASs.

compare-different-as-med

Optional

By default, the compare of MED values of the routes coming from the neighbor routers in different ASs is disabled.

Configure the local address as the next hop address when a BGP router advertises a route.

peer group-name  next-hop-local

Required

In some network, to ensure an IBGP neighbor locates the correct next hop, you can configure the next hop address of a route to be the local address for a BGP router to advertise route information to IBGP peer groups.

Configure the AS_Path attribute

Configure the number of local AS number occurrences allowed

peer { group-name | ip-address } allow-as-loop [ number ]

Optional

By default, the number of local AS number occurrences allowed is 1.

Assign an AS number for a peer group

peer  group-name as-number as-number

Optional

By default, the local AS number is not assigned to a peer group.

Configure that the BGP update packets only carry the pubic AS number in the AS_Path attribute when a peer sends BGP update packets to BGP peers.

peer group-name public-as-only

Optional

By default, a BGP update packet carries the private AS number.

 

X. Adjusting and Optimizing a BGP Network

Table 1-10 Adjust and optimize a BGP network

Operation

Command

Description

Enter system view

system-view

Enter BGP view

bgp as-number

Configure BGP timer

Configure the Keepalive time and Holdtime of BGP.

timer keepalive keepalive-interval hold holdtime-interval

Optional

By default, the keepalive time is 60 seconds, and holdtime is 180 seconds. The priority of the timer configured by the timer command is lower than that of the timer configured by the peer time command.

Configure the Keepalive time and holdtime of a specified peer/peer group.

peer { group-name | ip-address } timer  keepalive keepalive-interval hold holdtime-interval

Configure the interval at which a peer group sends the same route update packet

peer group-name route-update-interval seconds

Optional

By default, the interval at which a peer group sends the same route update packet to IBGP peers is 15 seconds, and to EBGP peers is 30 seconds.

Configure the number of route prefixes that can be learned from a BGP peer/peer group

peer { group-name | ip-address } route-limit prefix-number [ { alert-only | reconnect reconnect-time } | percentage-value ] *

Optional

By default, there is no limit on the number of route prefixes that can be learned from the BGP peer/peer group.

Perform soft refreshment of BGP connection manually

return

refresh bgp { all | ip-address | group group-name } [ multicast ] { import | export }

Optional

system-view

Enter BGP view again

bgp as-number

Configure BGP to perform MD5 authentication when establishing TCP connection

peer { group-name | ip-address } password { cipher | simple } password

Optional

By default, BGP dose not perform MD5 authentication when establishing TCP connection.

 

XI. Configuring BGP Peer Group

Table 1-11 Configure BGP peer group

Operation

Command

Description

Enter system view

system-view

Enter BGP view

bgp as-number

Create an IBGP peer group

Create an IBGP peer group

group group-name [ internal ]

Optional

If the command is executed without the internal or external keyword, an IBGP peer group will be created. You can add multiple peers to the group, and the system will automatically create a peer in BGP view, and configure its AS number as the local AS number.

Add a peer to a peer group

peer ip-address group group-name [ as-number as-number ]

Create an EBGP peer group

Create an EBGP peer group

group group-name external

Optional

You can add multiple peers to the group. The system automatically creates the peer in BGP view and specifies its AS number as the one of the peer group.

Configure the AS number of a peer group

peer group-name as-number as-number

Add a peer to a peer group

peer ip-address group group-name [ as-number as-number ]

Create a hybrid EBGP peer group

Create an EBGP peer group

group group-name external

Optional

You can add multiple peers to the peer group.

Add a peer to a peer group

peer ip-address group group-name [ as-number as-number ]

Finish the session with the specified peer/peer group

peer { group-name | ip-address } shutdown

Optional

 

XII. Configuring BGP Community

Table 1-12 Configure BGP community

Operation

Command

Description

Enter system view

system-view

Enter BGP view

bgp as-number

Configure the peers to advertise community attribute to each other

peer group-name advertise-community

Required

By default, no community attribute or extended community attribute is advertised to any peer group.

Specify routing policy for the routes exported to the peer group

peer  group-name route-policy route-policy-name export

Required

By default, no routing policy is specified for the routes exported to the peer group.

 

XIII. Configuring BGP RR

Table 1-13 Configure BGP RR

Operation

Command

Description

Enter system view

system-view

Enter BGP view

bgp as-number

Configure the local router as the RR and configure the peer group as the client of the RR

peer group-name reflect-client

Required

By default, no RR or its client is configured.

Enable route reflection between clients

reflect between-clients

Optional

By default, route reflection is enabled between clients.

Configure cluster ID of an RR

reflector cluster-id cluster-id

Optional

By default, an RR uses its own router ID as the cluster ID.

 

XIV. Configuring BGP Confederation

Table 1-14 Configure BGP confederation

Operation

Command

Description

Enter system view

system-view

Enter BGP view

bgp as-number

Basic BGP confederation configuration

Configure confederation ID

confederation id as-number

Required

By default, no confederation ID is configured and no sub-AS is configured for a confederation.

Specify the sub-ASs included in a confederation

confederation peer-as as-number-list

Configure the compatibility of a confederation

confederation nonstandard

Optional

By default, the confederation configured is consistent with the RFC 1965.

 

1.2.6  Route Policy Configuration

Table 1-15 Route Policy Configuration

Configuration task

Remarks

Related section

Configure an IP-prefix list

Configuring an ip-prefix list

Optional

1.2.6  I.  

AS path list configuration

Optional

1.2.6  II.

Community list configuration

Optional

1.2.6  III.

Define a routing policy

Defining a Routing Policy

Required

1.2.6  IV.

Define if-match clauses

Optional

1.2.6  V.

Define apply clauses

Optional

1.2.6  VI.

 

I. Configuring an ip-prefix list

Table 1-1 Configure an IPv4 IP-prefix list

Operation

Command

Remarks

Enter system view

system-view

Configure an IPv4 IP-prefix list

ip ip-prefix ip-prefix-name [ index index-number ] { permit | deny } network len [ greater-equal greater-equal | less-equal less-equal ]

Required

By default, no IP-prefix list is specified.

 

II. AS path list configuration

Table 1-2 AS path list configuration

Operation

Command

Description

Enter system view

system-view

Configure AS path list

ip as-path-acl acl-number { permit | deny } as-regular-expression

Optional

By default, no AS path list is defined

 

III. Community list configuration

Table 1-3 Community list configuration

Operation

Command

Description

Enter system view

system-view

Configure basic community list

ip community-list basic-comm-list-number { permit | deny } [ aa:nn | internet | no-export-subconfed | no-advertise | no-export ]*

Optional

By default, no BGP community list is defined

Configure advanced community list

ip community-list adv-comm-list-number { permit | deny } comm-regular-expression

Optional

By default, no BGP community list is defined

 

IV. Defining a Routing Policy

Table 1-4 Define a routing policy

Operation

Command

Remarks

Enter system view

system-view

Define a routing policy and enter the routing policy view

route-policy route-policy-name { permit | deny } node node-number

Required

By default, no routing policy is defined.

 

V. Define if-match clauses

Table 1-5 Define if-match clauses

Operation

Command

Description

Enter system view

system-view

Enter the route-policy view

route-policy route-policy-name { permit | deny } node node-number

Required

Define a rule to match AS path of BGP routing information

if-match as-path as-path-number

Optional

Define a rule to match community attributes of BGP routing information

if-match community { basic-community-number [ whole-match ] | adv-community-number }

Optional

Define a rule to match the IP address of routing information

if-match { acl acl-number | ip-prefix ip-prefix-name }

Optional

By default, no matching is performed on the address of routing information.

Define a rule to match the routing cost of routing information

if-match cost value

Optional

By default, no matching is performed on the routing cost of routing information.

Define a rule to match the next-hop interface of routing information

if-match interface interface-type interface-number

Optional

By default, no matching is performed on the next-hop interface of routing information.

Define a rule to match the next-hop address of routing information

if-match ip next-hop { acl acl-number | ip-prefix ip-prefix-name }

Optional

By default, no matching is performed on the next-hop address of routing information.

Define a rule to match the tag field of OSPF routing information

if-match tag value

Optional

By default, no matching is performed on the tag field of OSPF routing information.

 

VI. Define apply clauses

Table 1-6 Define apply clauses

Operation

Command

Description

Enter system view

system-view

Enter the route-policy view

route-policy route-policy-name { permit | deny } node node-number

Required

Add specified AS number for as-path in BGP routing information

apply as-path as-number-1 [ as-number-2 [ as-number-3 ... ] ]

Optional

Configure community attributes for BGP routing information

apply community { none | [ aa:nn ] [ no-export-subconfed | no-export | no-advertise ]* [ additive ] }

Optional

Set next hop IP address for routing information

apply ip next-hop ip-address

Optional

Set local preference of BGP routing information

apply local-preference local-preference

Optional

Define an action to set the cost of routing information

apply cost value

Optional

By default, no action is defined to set the routing cost of routing information.

Set route cost type for routing information

apply cost-type [ internal | external ]

Optional

Set route source of BGP routing information

apply origin { igp | egp as-number | incomplete }

Optional

Define an action to set the tag field of routing information

apply tag value

Optional

By default, no action is defined to set the tag field of OSPF routing information.

 


Chapter 2  Configuration Examples

 

&  Note:

The following configuration examples use the S5600 series switches.

 

2.1  Configuration Examples

2.1.1  Static Routing Configuration Example

I. Network requirements

1)         Requirement analysis:

A small company requires any two nodes in its network communicate with each other. The network should be simple and stable. The customer hopes to make the best use of the existing devices that do not support dynamic routing protocols.

Based on the customer requirements and networking environment, configure static routes to realize network interconnection.

2)         Network diagram

Figure 2-1 shows the network diagram.

Figure 2-1 Network diagram for static route configuration

II. Configuration procedure

Configure the switches:

# Configure static routes on Switch A.

<SwitchA> system-view

[SwitchA] ip route-static 1.1.3.0 255.255.255.0 1.1.2.2

[SwitchA] ip route-static 1.1.4.0 255.255.255.0 1.1.2.2

[SwitchA] ip route-static 1.1.5.0 255.255.255.0 1.1.2.2

# Configure static routes on Switch B.

<SwitchB> system-view

[SwitchB] ip route-static 1.1.2.0 255.255.255.0 1.1.3.1

[SwitchB] ip route-static 1.1.5.0 255.255.255.0 1.1.3.1

[SwitchB] ip route-static 1.1.1.0 255.255.255.0 1.1.3.1

# Configure static routes on Switch C.

<SwitchC> system-view

[SwitchC] ip route-static 1.1.1.0 255.255.255.0 1.1.2.1

[SwitchC] ip route-static 1.1.4.0 255.255.255.0 1.1.3.2

Configure the hosts:

# Configure the default gateway as 1.1.5.1 on host A (omitted).

# Configure the default gateway as 1.1.4.1 on host B (omitted).

# Configure the default gateway as 1.1.1.1 on host C (omitted).

Now any two hosts or switches can communicate with each other.

2.1.2  RIP Configuration Examples

I. Network requirements

1)         Requirement analysis:

A small company requires any two nodes in its network can communicate with each other.  The devices can dynamically adjust to network topology changes.

Based on the customer requirements and networking environment, use RIP to realize network interconnection.

2)         Network diagram

Figure 2-2 shows the network diagram.

Device

Interface

IP Address

Device

Interface

IP Address

Switch A

Vlan-int1

110.11.2.1/24

Switch B

Vlan-int1

110.11.2.2/24

 

Vlan-int2

155.10.1.1/24

 

Vlan-int3

196.38.165.1/24

Switch C

Vlan-int1

110.11.2.3/24

 

 

 

 

Vlan-int4

117.102.0.1/16

 

 

 

Figure 2-2 Network diagram for RIP configuration

II. Configuration procedure

 

&  Note:

Only RIP-related configurations are described below. Before performing the following configurations, make sure that the data link layer works normally and the IP addresses of the VLAN interfaces have been configured.

 

1)         Configure Switch A.

# Configure RIP.

<SwitchA> system-view

[SwitchA] rip

[SwitchA-rip] network 110.11.2.0

[SwitchA-rip] network 155.10.1.0

2)         Configure Switch B.

# Configure RIP.

<SwitchB> system-view

[SwitchB] rip

[SwitchB-rip] network 196.38.165.0

[SwitchB-rip] network 110.11.2.0

3)         Configure Switch C.

# Configure RIP.

<SwitchC> system-view

[SwitchC] rip

[SwitchC-rip] network 117.102.0.0

[SwitchC-rip] network 110.11.2.0

2.1.3  DR Configuration Example

I. Network requirements

1)         Requirement analysis

Use OSPF to realize interconnection between devices in a broadcast network. Devices with higher performance should become the DR and BDR to improve network performance. Devices with lower performance are forbidden to take part in DB/BDR election.

Based on the customer requirements and networking environment, assign proper priorities to interfaces.

2)         Network diagram

Figure 2-3 shows the network diagram.

Device

Interface

IP address

Router ID

Interface priority

Switch A

Vlan-int1

196.1.1.1/24

1.1.1.1

100

Switch B

Vlan-int1

196.1.1.2/24

2.2.2.2

0

Switch C

Vlan-int1

196.1.1.3/24

3.3.3.3

2

Switch D

Vlan-int1

196.1.1.4/24

4.4.4.4

1

Figure 2-3 Network diagram for OSPF DR selection

II. Configuration procedure

# Configure Switch A.

<SwitchA> system-view

[SwitchA] interface Vlan-interface 1

[SwitchA-Vlan-interface1] ip address 196.1.1.1 255.255.255.0

[SwitchA-Vlan-interface1] ospf dr-priority 100

[SwitchA-Vlan-interface1] quit

[SwitchA] router id 1.1.1.1

[SwitchA] ospf

[SwitchA-ospf-1] area 0

[SwitchA-ospf-1-area-0.0.0.0] network 196.1.1.0 0.0.0.255

# Configure Switch B.

<SwitchB> system-view

[SwitchB] interface Vlan-interface 1

[SwitchB-Vlan-interface1] ip address 196.1.1.2 255.255.255.0

[SwitchB-Vlan-interface1] ospf dr-priority 0

[SwitchB-Vlan-interface1] quit

[SwitchB] router id 2.2.2.2

[SwitchB] ospf

[SwitchB-ospf-1] area 0

[SwitchB-ospf-1-area-0.0.0.0] network 196.1.1.0 0.0.0.255

# Configure Switch C.

<SwitchC> system-view

[SwitchC] interface Vlan-interface 1

[SwitchC-Vlan-interface1] ip address 196.1.1.3 255.255.255.0

[SwitchC-Vlan-interface1] ospf dr-priority 2

[SwitchC-Vlan-interface1] quit

[SwitchC] router id 3.3.3.3

[SwitchC] ospf

[SwitchC-ospf-1] area 0

[SwitchC-ospf-1-area-0.0.0.0] network 196.1.1.0 0.0.0.255

# Configure Switch D.

<SwitchD> system-view

[SwitchD] interface Vlan-interface 1

[SwitchD-Vlan-interface1] ip address 196.1.1.4 255.255.255.0

[SwitchD-Vlan-interface1] quit

[SwitchD] router id 4.4.4.4

[SwitchD] ospf

[SwitchD-ospf-1] area 0

[SwitchD-ospf-1-area-0.0.0.0] network 196.1.1.0 0.0.0.255

Use the display ospf peer command to display OSPF neighbors on Switch A. Note that Switch A has three neighbors.

The state of each neighbor is full. This means that Switch A has formed adjacencies with all neighbors. (Switch A and Switch C can act as the DR and BDR only when they establish adjacencies with all the switches in the network.) Switch A acts as the DR, while Switch C acts as the BDR. Any other neighbor is DRother (neither DR nor BDR).

# Change the priority of Switch B to 200.

<SwitchB> system-view

[SwitchB] interface Vlan-interface 1

[SwitchB-Vlan-interface1] ospf dr-priority 200

Use the display ospf peer command to display OSPF neighbors on Switch A. Note that the priority of Switch B is 200 now, but it is not the DR.

 The DR will be reelected only after the current DR fails to work. Shut down Switch A and use the display ospf peer command to display neighbors on Switch D. Note that Switch C that used to be the BDR becomes the DR and Switch B becomes the BDR.

If you shut down and then restart all the switches, Switch B with priority 200 will be elected as the DR and Switch A with priority 100 will be elected as the BDR, because such operation triggers a new round of DR/BDR election. 

2.1.4  OSPF Virtual Link Configuration Examples

I. Network requirements

1)         Requirement analysis

Devices in the network run OSPF to realize interconnection. The network is split into three areas: one backbone area and two non-backbone areas (Area 1 and Area 2). Area 2 has no direct connection to the backbone, and it has to reach the backbone through Area 1. The customer hopes that Area 2 can interconnect with other two areas.

Based on the customer requirements and networking environment, use a virtual link to connect Area 2 to the backbone area.

2)         Network diagram

Figure 2-4 shows the network diagram.

Device

Interface

IP address

Router ID

Switch A

Vlan-int1

196.1.1.2/24

1.1.1.1

 

Vlan-int2

197.1.1.2/24

Switch B

Vlan-int1

152.1.1.1/24

2.2.2.2

 

Vlan-int2

197.1.1.1/24

Figure 2-4 Network diagram for virtual link configuration

II. Configuration procedure

1)         Configure OSPF basic functions

# Configure Switch A.

<SwitchA> system-view

[SwitchA] interface vlan-interface 1

[SwitchA-Vlan-interface1] ip address 196.1.1.2 255.255.255.0

[SwitchA-Vlan-interface1] quit

[SwitchA] interface vlan-interface 2

[SwitchA-Vlan-interface2] ip address 197.1.1.2 255.255.255.0

[SwitchA-Vlan-interface2] quit

[SwitchA] router id 1.1.1.1

[SwitchA] ospf

[SwitchA-ospf-1] area 0

[SwitchA-ospf-1-area-0.0.0.0] network 196.1.1.0 0.0.0.255

[SwitchA-ospf-1-area-0.0.0.0] quit

[SwitchA-ospf-1] area 1

[SwitchA-ospf-1-area-0.0.0.1] network 197.1.1.0 0.0.0.255

[SwitchA-ospf-1-area-0.0.0.1] quit

[SwitchA-ospf-1] quit

# Configure Switch B.

<SwitchB> system-view

[SwitchB] interface Vlan-interface 1

[SwitchB-Vlan-interface1] ip address 152.1.1.1 255.255.255.0

[SwitchB-Vlan-interface1] quit

[SwitchB] interface Vlan-interface 2

[SwitchB-Vlan-interface2] ip address 197.1.1.1 255.255.255.0

[SwitchB-Vlan-interface2] quit

[SwitchB] router id 2.2.2.2

[SwitchB] ospf

[SwitchB-ospf-1] area 1

[SwitchB-ospf-1-area-0.0.0.1] network 197.1.1.0 0.0.0.255

[SwitchB-ospf-1-area-0.0.0.1] quit

[SwitchB-ospf-1] area 2

[SwitchB-ospf-1-area-0.0.0.2] network 152.1.1.0 0.0.0.255

[SwitchB-ospf-1-area-0.0.0.2] quit

# Display the OSPF routing table on Switch A

[SwitchA] display ospf routing

 

                 OSPF Process 1 with Router ID 1.1.1.1

                              Routing Tables

 

Routing for Network

Destination             Cost Type NextHop         AdvRouter        Area

196.1.1.0/24              10 Stub 196.1.1.2       1.1.1.1          0.0.0.0

197.1.1.0/24              10 Net  197.1.1.1       2.2.2.2          0.0.0.1

 

Total Nets: 2

  Intra Area: 2  Inter Area: 0  ASE: 0  NSSA: 0

 

&  Note:

Since Area2 has no direct connection to Area0, the routing table of RouterA has no route to Area2.

 

2)         Configure a virtual link

# Configure Switch A.

[SwitchA] ospf

[SwitchA-ospf-1] area 1

[SwitchA-ospf-1-area-0.0.0.1] vlink-peer 2.2.2.2

[SwitchA-ospf-1-area-0.0.0.1] quit

[SwitchA-ospf-1] quit

# Configure Switch B.

[SwitchB-ospf-1] area 1

[SwitchB-ospf-1-area-0.0.0.1] vlink-peer 1.1.1.1

[SwitchB-ospf-1-area-0.0.0.1] quit

# Display the OSPF routing table on Switch A.

[SwitchA]display ospf routing

 

                 OSPF Process 1 with Router ID 1.1.1.1

                              Routing Tables

 

Routing for Network

Destination             Cost Type NextHop         AdvRouter        Area

196.1.1.0/24              10 Stub 196.1.1.2       1.1.1.1          0.0.0.0

197.1.1.0/24              10 Net  197.1.1.1       2.2.2.2          0.0.0.1

152.1.1.0/24              20 SNet 197.1.1.1       2.2.2.2          0.0.0.0

 

Total Nets: 3

  Intra Area: 2  Inter Area: 1  ASE: 0  NSSA: 0

Switch A has learned the route 152.1.1.0/24 to Area2.

2.1.5  BGP Confederation Configuration Example

I. Network requirements

1)         Requirement analysis

BGP runs in a large AS of a company. As the number of IBGP peers increases rapidly in the AS, more network resources for BGP communication are occupied. The customer hopes to reduce IBGP peers and decrease the CPU and network resources consumption of BGP without affecting device performance.

Based on user requirements, configure a BGP confederation to achieve the goal.

2)         Network diagram

Figure 2-5 shows the network diagram.

Device

Interface

IP address

AS

Switch A

Vlan-int 10

172.68.10.1/24

100

 

Vlan-int 50

10.1.1.1/24

Switch B

Vlan-int 10

172.68.10.2/24

Switch C

Vlan-int 10

172.68.10.3/24

 

Vlan-int 20

172.68.1.1/24

 

Vlan-int 30

156.10.1.1/24

Switch D

Vlan-int 20

172.68.1.2/24

Switch E

Vlan-int 30

156.10.1.2/24

200

 

Vlan-int 40

8.1.1.1/24

Figure 2-5 Network diagram for BGP AS confederation configuration

3)         Configuration plan

l           Split AS 100 into three sub-ASs: AS 1001, AS 1002, and AS 1003.

l           Run EBGP between AS 1001, AS1002, and AS 1003.

l            AS 1001, AS1002, and AS 1003 are fully meshed within themselves by running IBGP.

l           Run EBGP between AS 100 and AS 200.

II. Configuration procedure

# Configure Switch A.

<SwitchA> system-view

[SwitchA] bgp 1001

[SwitchA-bgp] network 10.1.1.0 255.255.255.0

[SwitchA-bgp] confederation id 100

[SwitchA-bgp] confederation peer-as 1002 1003

[SwitchA-bgp] group confed1002 external

[SwitchA-bgp] peer 172.68.10.2 group confed1002 as-number 1002

[SwitchA-bgp] group confed1003 external

[SwitchA-bgp] peer 172.68.10.3 group confed1003 as-number 1003

[SwitchA-bgp] quit

# Configure Switch B.

<SwitchB> system-view

[SwitchB] bgp 1002

[SwitchB-bgp] confederation id 100

[SwitchB-bgp] confederation peer-as 1001 1003

[SwitchB-bgp] group confed1001 external

[SwitchB-bgp] peer 172.68.10.1 group confed1001 as-number 1001

[SwitchB-bgp] group confed1003 external

[SwitchB-bgp] peer 172.68.10.3 group confed1003 as-number 1003

# Configure Switch C.

<SwitchC> system-view

[SwitchC] bgp 1003

[SwitchC-bgp] confederation id 100

[SwitchC-bgp] confederation peer-as 1001 1002

[SwitchC-bgp] group confed1001 external

[SwitchC-bgp] peer 172.68.10.1 group confed1001 as-number 1001

[SwitchC-bgp] group confed1002 external

[SwitchC-bgp] peer 172.68.10.2 group confed1002 as-number 1002

[SwitchC-bgp] group ebgp200 external

[SwitchC-bgp] peer 156.10.1.2 group ebgp200 as-number 200

[SwitchC-bgp] group ibgp1003 internal

[SwitchC-bgp] peer 172.68.1.2 group ibgp1003

# Configure Switch D.

<SwitchD> system-view

[SwitchD] bgp 1003

[SwitchD-bgp] confederation id 100

[SwitchD-bgp] group ibgp1003 internal

[SwitchD-bgp] peer 172.68.1.1 group ibgp1003

# Configure Switch E.

<SwitchE> system-view

[SwitchE] bgp 200

[SwitchE-bgp] network 8.1.1.0 255.255.255.0

[SwitchE-bgp] group ebgp100 external

[SwitchE-bgp] peer 156.10.1.1 group ebgp100 as-number 100

[SwitchE-bgp] quit

# Display the BGP routing table on Switch E.

[SwitchE] display bgp routing

 

Flags:  # - valid       ^ - active      I - internal

        D - damped      H - history     S - aggregate suppressed

 

    Dest/Mask          Next-Hop        Med        Local-pref Origin Path

--------------------------------------------------------------------------

#^  8.1.1.0/24         0.0.0.0         0          100         IGP

#^  10.1.1.0/24        156.10.1.1      0          100         IGP   100

 

  Routes total: 2

# Display the BGP routing table on Switch A.

[SwitchA] display bgp routing

 

Flags:  # - valid       ^ - active      I - internal

        D - damped      H - history     S - aggregate suppressed

 

    Dest/Mask       Next-Hop      Med      Local-pref  Origin  Path

--------------------------------------------------------------------------

  I 8.1.1.0/24      156.10.1.2    0        100         IGP     (1003) 200

#^  10.1.1.0/24     0.0.0.0       0        100         IGP

 

  Routes total: 2

The above display shows that sub-AS routing information is advertised only within the confederation. A device in an AS outside of the confederation, such as Switch E, cannot learn the sub-AS routing information within the confederation because it treats the confederation as a single AS.

2.1.6  BGP Route Reflector Configuration Example

I. Network requirements

1)         Requirement analysis

BGP runs in a large AS of a company. As the number of IBGP peers increases rapidly in the AS, more network resources for BGP communication are occupied.  The customer hopes to reduce IBGP peers and decrease CPU and network resources consumption of BGP without affecting device performance. In addition, IBGP peers are partially interconnected in the AS.

Based on the requirements and networking environment, configure a BGP route reflector to achieve the goal.

2)         Network diagram

Figure 2-6 shows the network diagram.

Device

Interface

IP address

AS

Switch A

Vlan-int 100

1.1.1.1/8

100

 

Vlan-int 2

192.1.1.1/24

Switch B

Vlan-int 2

192.1.1.2/24

200

 

Vlan-int 3

193.1.1.2/24

Switch C

Vlan-int 3

193.1.1.1/24

 

Vlan-int 4

194.1.1.1/24

Switch D

Vlan-int 4

194.1.1.2/24

Figure 2-6 Network diagram for BGP route reflector configuration

3)         Configuration plan

l           Run EBGP between the peers in AS 100 and AS 200. Advertise network 1.0.0.0/8.

l           Run IBGP between the peers in AS 200. Configure a star topology for the AS. Specify the central device as a route reflector and other devices as clients.

II. Configuration procedure

1)         Configure switch A.

<SwitchA> system-view

[SwitchA] interface Vlan-interface 2

[SwitchA-Vlan-interface2] ip address 192.1.1.1 255.255.255.0

[SwitchA-Vlan-interface2] interface Vlan-interface 100

[SwitchA-Vlan-interface100] ip address 1.1.1.1 255.0.0.0

[SwitchA-Vlan-interface100] quit

[SwitchA] bgp 100

[SwitchA-bgp] group ex external

[SwitchA-bgp] peer 192.1.1.2 group ex as-number 200

[SwitchA-bgp] network 1.0.0.0 255.0.0.0

2)         Configure Switch B.

# Configure the VLAN interface IP addresses.

<SwitchB> system-view

[SwitchB] interface Vlan-interface 2

[SwitchB-Vlan-interface2] ip address 192.1.1.2 255.255.255.0

[SwitchB-Vlan-interface2] quit

[SwitchB] interface Vlan-interface 3

[SwitchB-Vlan-interface3] ip address 193.1.1.2 255.255.255.0

[SwitchB-Vlan-interface3] quit

# Configure BGP peers.

[SwitchB] bgp 200

[SwitchB-bgp] group ex external

[SwitchB-bgp] peer 192.1.1.1 group ex as-number 100

[SwitchB-bgp] group in internal

[SwitchB-bgp] peer 193.1.1.1 group in

3)         Configure Switch C.

# Configure the VLAN interface IP addresses.

<SwitchC> system-view

[SwitchC] interface Vlan-interface 3

[SwitchC-Vlan-interface3] ip address 193.1.1.1 255.255.255.0

[SwitchC-Vlan-interface3] quit

[SwitchC] interface vlan-Interface 4

[SwitchC-Vlan-interface4] ip address 194.1.1.1 255.255.255.0

[SwitchC-Vlan-interface4] quit

# Configure BGP peers and configure Switch C as the route reflector.

[SwitchC] bgp 200

[SwitchC-bgp] group rr internal

[SwitchC-bgp] peer rr reflect-client

[SwitchC-bgp] peer 193.1.1.2 group rr

[SwitchC-bgp] peer 194.1.1.2 group rr

4)         Configure Switch D.

# Configure the VLAN interface IP address.

<SwitchD> system-view

[SwitchD] interface Vlan-interface 4

[SwitchD-Vlan-interface4] ip address 194.1.1.2 255.255.255.0

[SwitchD-Vlan-interface4] quit

# Configure the BGP peer.

[SwitchD] bgp 200

[SwitchD-bgp] group in internal

[SwitchD-bgp] peer 194.1.1.1 group in

Use the display bgp routing command to display the BGP routing table on Switch B. Note that Switch B has learned network 1.0.0.0.

Use the display bgp routing command to display the BGP routing table on Switch D. Note that Switch D has learned network 1.0.0.0.

2.1.7  BGP Path Selection Configuration Example

I. Network requirements

1)         Requirement analysis

A network consists of two ASs, which run BGP to communicate with each other. OSPF runs in one of them.

The requirement is to control the data forwarding path from AS 200 to AS 100.

The following give two plans to meet the requirement

l           Use the MED attribute to control the forwarding path for packets from AS 200 to AS 100.

l           Use the LOCAL_PREF attribute to control the forwarding path for packets from AS 200 to AS 100

2)         Network diagram

Figure 2-7 shows the network diagram.

Device

Interface

IP address

AS

Switch A

Vlan-int 101

1.1.1.1/8

100

 

Vlan-int 2

192.1.1.1/24

 

Vlan-int 3

193.1.1.1/24

Switch B

Vlan-int 2

192.1.1.2/24

200

 

Vlan-int 4

194.1.1.2/24

Switch C

Vlan-int 3

193.1.1.2/24

 

Vlan-int 5

195.1.1.2/24

Switch D

Vlan-int 4

194.1.1.1/24

 

Vlan-int 5

195.1.1.1/24

Figure 2-7 Network diagram for BGP path selection

3)         Configuration plan

l           Run EBGP between AS 100 and AS 200. Advertise network 1.0.0.0/8.

l           Run OSPF in AS 200 to realize network interconnection.

l           Run IBGP between Switch D and Switch B as well as between Switch D and Switch C.

l           Apply a routing policy on Switch A to modify the MED attribute of the route to be advertised to AS 200, making the data forwarding path from Switch D to AS 100 as Switch D – Switch C – Switch A.

l           Apply a routing policy on Switch C to modify the LOCAL_PREF attribute of the route to be advertised to Switch D, making the data forwarding path from AS 200 to AS 100 as Switch D – Switch C – Switch A.

II. Configuration procedure

1)         Configure Switch A.

# Configure the VLAN interface IP addresses.

<SwitchA> system-view

[SwitchA] interface Vlan-interface 2

[SwitchA-Vlan-interface2] ip address 192.1.1.1 255.255.255.0

[SwitchA-Vlan-interface2] quit

[SwitchA] interface Vlan-interface 3

[SwitchA-Vlan-interface3] ip address 193.1.1.1 255.255.255.0

[SwitchA-Vlan-interface3] quit

[SwitchA] interface Vlan-interface 101

[SwitchA-Vlan-interface101] ip address 1.1.1.1 255.0.0.0

[SwitchA-Vlan-interface101] quit

# Enable BGP.

[SwitchA] bgp 100

# Advertise network 1.0.0.0/8.

[SwitchA-bgp] network 1.0.0.0

# Configure BGP peers.

[SwitchA-bgp] group ex192 external

[SwitchA-bgp] peer 192.1.1.2 group ex192 as-number 200

[SwitchA-bgp] group ex193 external

[SwitchA-bgp] peer 193.1.1.2 group ex193 as-number 200

[SwitchA-bgp] quit

# Define ACL 2000 to permit the routes destined for 1.0.0.0/8.

[SwitchA] acl number 2000

[SwitchA-acl-basic-2000] rule permit source 1.0.0.0 0.255.255.255

[SwitchA-acl-basic-2000] rule deny source any

[SwitchA-acl-basic-2000] quit

# Create a routing policy named apply_med_50, and specify node 10 with the permit matching mode for the routing policy. Set the MED value of the route matching ACL 2000 to 50.

[SwitchA] route-policy apply_med_50 permit node 10

[SwitchA-route-policy] if-match acl 2000

[SwitchA-route-policy] apply cost 50

[SwitchA-route-policy] quit

# Create a routing policy named apply_med_100, and specify node 10 with the permit matching mode for the routing policy. Set the MED value of the route matching ACL 2000 to 100.

[SwitchA] route-policy apply_med_100 permit node 10

[SwitchA-route-policy] if-match acl 2000

[SwitchA-route-policy] apply cost 100

[SwitchA-route-policy] quit

# Apply the routing policy apply_med_50 to routing updates to the peer group ex193 (the peer 193.1.1.2) and apply_med_100 to routing updates to the peer group ex192 (the peer 192.1.1.2).

[SwitchA] bgp 100

[SwitchA-bgp] peer ex193 route-policy apply_med_50 export

[SwitchA-bgp] peer ex192 route-policy apply_med_100 export

2)         Configure Switch B.

# Configure the VLAN interface IP addresses.

<SwitchB> system-view

[SwitchB] interface vlan 2

[SwitchB-Vlan-interface2] ip address 192.1.1.2 255.255.255.0

[SwitchB-Vlan-interface2] quit

[SwitchB] interface Vlan-interface 4

[SwitchB-Vlan-interface4] ip address 194.1.1.2 255.255.255.0

[SwitchB-Vlan-interface4] quit

# Configure OSPF.

[SwitchB] ospf

[SwitchB-ospf-1] area 0

[SwitchB-ospf-1-area-0.0.0.0] network 194.1.1.0 0.0.0.255

[SwitchB-ospf-1-area-0.0.0.0] network 192.1.1.0 0.0.0.255

[SwitchB-ospf-1-area-0.0.0.0] quit

[SwitchB-ospf-1] quit

# Enable BGP, create a peer group, and add peers to the peer group.

[SwitchB] bgp 200

[SwitchB-bgp] undo synchronization

[SwitchB-bgp] group ex external

[SwitchB-bgp] peer 192.1.1.1 group ex as-number 100

[SwitchB-bgp] group in internal

[SwitchB-bgp] peer 194.1.1.1 group in

[SwitchB-bgp] peer 195.1.1.2 group in

3)         Configure Switch C.

# Configure the VLAN interface IP addresses.

<SwitchC> system-view

[SwitchC] interface Vlan-interface 3

[SwitchC-Vlan-interface3] ip address 193.1.1.2 255.255.255.0

[SwitchC-Vlan-interface3] quit

[SwitchC] interface Vlan-interface 5

[SwitchC-Vlan-interface5] ip address 195.1.1.2 255.255.255.0

[SwitchC-Vlan-interface5] quit

# Enable OSPF.

[SwitchC] ospf

[SwitchC-ospf-1] area 0

[SwitchC-ospf-1-area-0.0.0.0] network 193.1.1.0 0.0.0.255

[SwitchC-ospf-1-area-0.0.0.0] network 195.1.1.0 0.0.0.255

[SwitchC-ospf-1-area-0.0.0.0] quit

[SwitchC-ospf-1] quit

# Enable BGP, create a peer group, and add peers to the peer group. 

[SwitchC] bgp 200

[SwitchC-bgp] undo synchronization

[SwitchC-bgp] group ex external

[SwitchC-bgp] peer 193.1.1.1 group ex as-number 100

[SwitchC-bgp] group in internal

[SwitchC-bgp] peer 195.1.1.1 group in

[SwitchC-bgp] peer 194.1.1.2 group in

4)         Configure Switch D.

# Configure the VLAN interface IP addresses.

<SwitchD> system-view

[SwitchD] interface Vlan-interface 4

[SwitchD-Vlan-interface4] ip address 194.1.1.1 255.255.255.0

[SwitchD-Vlan-interface4] quit

[SwitchD] interface Vlan-interface 5

[SwitchD-Vlan-interface5] ip address 195.1.1.1 255.255.255.0

[SwitchD-Vlan-interface5] quit

# Enable OSPF.

[SwitchD] ospf

[SwitchD-ospf-1] area 0

[SwitchD-ospf-1-area-0.0.0.0] network 194.1.1.0 0.0.0.255

[SwitchD-ospf-1-area-0.0.0.0] network 195.1.1.0 0.0.0.255

[SwitchD-ospf-1-area-0.0.0.0] network 4.0.0.0 0.255.255.255

[SwitchD-ospf-1-area-0.0.0.0] quit

[SwitchD-ospf-1] quit

# Enable BGP, create a peer group, and add peers to the peer group.

[SwitchD] bgp 200

[SwitchD-bgp] undo synchronization

[SwitchD-bgp] group in internal

[SwitchD-bgp] peer 195.1.1.2 group in

[SwitchD-bgp] peer 194.1.1.2 group in

l           To validate the configuration, you need to use the reset bgp all command on all the BGP peers.

l           Since the MED attribute of route 1.0.0.0 learned by Switch C is smaller than that learned by Switch B, Switch D selects the route 1.0.0.0 from Switch C.

l           If you do not configure MED attribute control on Switch A, setting the local preference attribute for route 1.0.0.0 on Switch C is another choice.

# Define ACL 2000 to permit the routes destined for 1.0.0.0/8.

[SwitchC] acl number 2000

[SwitchC-acl-basic-2000] rule permit source 1.0.0.0 0.255.255.255

[SwitchC-acl-basic-2000] rule deny source any

[SwitchC-acl-basic-2000] quit

# Create a routing policy named localpref, and specify node 10 with the permit matching mode for the routing policy. Set the local preference value of the route matching ACL 2000 to 200

[SwitchC] route-policy localpref  permit node 10

[SwitchC-route-policy] if-match acl 2000

[SwitchC-route-policy] apply local-preference 200

[SwitchC-route-policy] quit

# Create a routing policy named localpref, and specify node 20 with the permit matching mode for the routing policy. Set the local preference value of the route to 100.

[SwitchC] route-policy localpref permit node 20

[SwitchC-route-policy] apply local-preference 100

[SwitchC-route-policy] quit

# Apply the routing policy localpref to the routing information from the peer 193.1.1.1 (Switch A).

[SwitchC] bgp 200

[SwitchC-bgp] peer 193.1.1.1 route-policy localpref import

Since the local preference (200) of the route learned by Switch C is bigger than that learned by Switch B (100), Switch D prefers the route 1.0.0.0 from Switch C. Note that the local preference is not set for route 1.0.0.0 on Switch B, so the route uses the default value 100.

 


Chapter 3  Comprehensive Configuration Example

 

&  Note:

l      For details about routing protocols, see corresponding operation manuals of products.

l      For detailed commands, see corresponding command manuals of products.

l      The following examples use S3600 and S5600 series switches.

 

3.1  Network Requirements

3.1.1  Requirement Analysis, Network Diagram and Configuration Plan

I. Requirement analysis

An ISP has four ASs: AS 100, AS 200, AS 300, and AS 400. AS 100 is the core layer. It connects AS 200, AS 300, and AS 400 and forwards data between them. AS 200, AS 300, and AS 400 constitutes the distribution layer. They provide access services for users. The specific requirements are as follows:

l           Fast convergence is required for AS 200 and AS 400 because their networks are quite large and complicated.

l           The network of AS 300 is small and simple. The devices in the network supports only RIP. Their performances are low and the capacities of routing tables are quite limited.

l           Access users in AS 200 require a very reliable network.

l           Access users in AS 200, AS 300, and AS 400 are accessible to each other.

l           S200_10 in AS 200 is connected with Layer 2 devices.

l           S300_B in AS 300 is connected with Layer 2 devices. 

l           The data forwarding path needs to be controlled when users in AS 400 access AS 200 and AS 300.

l           An AS 300 access user is interconnected with the ISP through a single link.

II. Network diagram

Figure 3-1 shows the network diagram designed according to the requirements.

Figure 3-1 Network diagram

III. Configuration plan

l           Run BGP in AS 100 to interconnect with AS 200, AS 300, and AS 400. Use the MED attribute to control the forwarding path.

l           Run OSPF in AS 200. The device in AS 200 connecting to AS 100 runs both OSPF and BGP. Use static routes as backup routes to implement link redundancy and improve network reliability. Apply a routing policy when redistributing BGP routes for filtering.

l           Run OSPF in AS 400. The device in AS 400 connecting to AS 100 runs both OSPF and BGP. Apply a routing policy when redistributing BGP routes for filtering.

l           Run RIPv2 in AS 300. The device in AS 300 connecting to AS 100 runs both RIPv2 and BGP. Apply a routing policy when redistributing BGP routes for filtering.

l           AS 300 users use the combination of static routes, RIP, and routing policy to access the ISP.

l           Interaction between IGP and BGP is involved in the configuration. Since the default BGP preference is 256, when backup routes exist in the routing table, you need to modify the BGP preference in order to select the primary route as required.

3.1.2  Devices Used for Networking

Table 3-1 Device model and device name

Model

Device name

7500

S200/S300

5600

S100_1/S100_2/S400

3600

S200_0/S200_10/S300_A/S300_B/ S400_0

 

&  Note:

l      Either S7500 series Ethernet switches or S5600 series Ethernet switches can serve as S100_1/S100_2/S400/S200/S300.

l      You can use other partially layer 3 capable switches as S300_B.

 

3.1.3  Routing Protocols and Related Parameters on Devices

Table 3-2 Routing protocols supported by devices

Device name

Routing protocol

Router ID

AS

S100_1

BGP (IBGP&EBGP)

1.1.1.1

100

S100_2

BGP (IBGP&EBGP)

1.2.1.1

S200

BGP (EBGP)/OSPF

2.1.1.1

200

S200_0

OSPF

S200_10

OSPF/STATIC

S300

BGP (EBGP)/RIPv2

3.1.1.1

300

S300_A

RIPv2/STATIC

S300_B

RIPv2

S400

BGP (EBGP)/OSPF

4.1.1.1

400

S400_0

OSPF

 

3.1.4  Software Version

S3600 series Ethernet switches use Release 1510.

S5600 series Ethernet switches use Release 1510.

S7500 series Ethernet switches use Release 3130.

3.2  Configuration Procedure

3.2.1  Configuration Guide

Table 3-3 Configuration guide

Configuration task

Description

Basic Configuration

Create VLANs and configure IP addresses for VLAN interfaces

Basic RIPv2/OSPF/BGP Configuration

Basic RIPv2/OSPF/BGP configuration

RIP, Static Route, and Routing Policy Configuration Example

 Using a routing policy, configure RIP to advertise route updates but does not receive route updates and use static routing to access the ISP.

BGP and IGP Interaction Configuration Example

IGP and BGP share routes. Apply a routing policy for BGP redistribution to IGP as required

Route Backup Configuration Example

To improve network reliability, run OSPF on the primary link and run static routing on the backup link to realize interconnection

BGP MED Attribute Configuration Example

Apply a routing policy to change the MED attribute of routes to control the forwarding path

 

3.2.2  Basic Configuration

Creating VLANs and configuring IP addresses for VLAN interfaces are omitted here, refer to Displaying the Whole Configuration for related information.

3.2.3  Basic RIPv2/OSPF/BGP Configuration

I. Basic RIPv2 configuration

Figure 3-2 shows the relevant network diagram of AS 300.

Device

Interface

IP address

S300

Vlan-int 14

206.1.4.2/24

S300_A

Vlan-int 14

206.1.4.1/24

 

Vlan-int 662

166.1.2.1/24

 

Vlan-int 665

166.1.5.2/24

S300_B

Vlan-int 662

166.1.2.2/24

 

Vlan-int 623

162.1.3.1/24

 

Vlan-int 624

162.1.4.1/24

Figure 3-2 Network diagram for RIPv2 configuration

l           Configure S300.

# Run RIP on the interface with the IP address 206.1.4.0.

<S300> system-view

[S300] rip

[S300-rip] network 206.1.4.0

# Disable RIPv2 route summarization.

[S300-rip] undo summary

[S300-rip] quit

# Run RIPv2 on VLAN-interface 14.

[S300] interface vlan-interface 14

[S300-Vlan-interface14] rip version 2

[S300-Vlan-interface14] quit

l           Configure S300_A.

# Run RIP on the interfaces on networks 206.1.4.0 and 166.1.0.0.

<S300_A> system-view

[S300_A] rip

[S300_A-rip] network 206.1.4.0

[S300_A-rip] network 166.1.0.0

# Disable RIPv2 route summarization.

[S300_A-rip] undo summary

[S300_A-rip] quit

# Run RIPv2 on VLAN-interface 14 and VLAN-interface 662.

[S300_A] interface vlan-interface 14

[S300_A-Vlan-interface14] rip version 2

[S300_A-Vlan-interface14] quit

[S300_A] interface vlan-interface 662

[S300_A-Vlan-interface662] rip version 2

[S300_A-Vlan-interface662] quit

l           Configure S300_B.

# Run RIP on the interfaces connected to networks 162.1.0.0 and 166.1.0.0.

<S300_B> system-view

[S300_B] rip

[S300_B-rip] network 162.1.0.0

[S300_B-rip] network 166.1.0.0

# Disable RIPv2 route summarization.

[S300_B-rip] undo summary

[S300_B-rip] quit

# Run RIPv2 on VLAN-interface 623, VLAN-interface 624, and VLAN-interface 662.

[S300_B] interface vlan-interface 623

[S300_B-Vlan-interface623] rip version 2

[S300_B-Vlan-interface623] quit

[S300_B] interface vlan-interface 624

[S300_B-Vlan-interface624] rip version 2

[S300_B-Vlan-interface624] quit

[S300_B] interface vlan-interface 662

[S300_B-Vlan-interface662] rip version 2

[S300_B-Vlan-interface662] quit

II. Basic OSPF configuration

Figure 3-3 shows the relevant network diagram of AS 200.

Device

Interface

IP address

Area

S200

Vlan-int 12

206.1.2.3/24

0

S200_0

Vlan-int 12

206.1.2.1/24

0

 

Vlan-int 661

166.1.1.1/24

10

S200_10

Vlan-int 661

166.1.1.2/24

10

 

Vlan-int 621

162.1.1.1/24

10

 

Vlan-int 622

162.1.2.1/24

10

Figure 3-3 Network diagram for OSPF configuration

l           Configure S200.

# Run OSPF on the interface connected to network 206.1.2.0/24 and specify its area ID as 0.

<S200> system-view

[S200] ospf

[S200-ospf-1] area 0

[S200-ospf-1-area-0.0.0.0] network 206.1.2.0 0.0.0.255

l           Configure S200_0.

# Run OSPF on the interface connected to network 206.1.2.0/24 and specify its area ID as 0.

<S200_0> system-view

[S200_0] ospf

[S200_0-ospf-1] area 0

[S200_0-ospf-1-area-0.0.0.0] network 206.1.2.0 0.0.0.255

[S200_0-ospf-1-area-0.0.0.0] quit

# Run OSPF on the interface connected to network 166.1.1.0/24 and specify its area ID as 10.

[S200_0-ospf-1] area 10

[S200_0-ospf-1-area-0.0.0.10] network 166.1.1.0 0.0.0.255

l           Configure S200_10.

# Run OSPF on interfaces connected to networks 162.1.1.0/24, 162.1.2.0/24, and 166.1.1.0/24 and specify their area ID as 10.

<S200_10> system-view

[S200_10] ospf

[S200_10-ospf-1] area 10

[S200_10-ospf-1-area-0.0.0.10] network 162.1.1.0 0.0.0.255

[S200_10-ospf-1-area-0.0.0.10] network 162.1.2.0 0.0.0.255

[S200_10-ospf-1-area-0.0.0.10] network 166.1.1.0 0.0.0.255

Figure 3-4 shows the network diagram of AS 400.

Device

Interface

IP address

Area

S400

Vlan-int 16

206.1.6.3/24

0

S400_0

Vlan-int 16

206.1.6.1/24

0

 

Vlan-int 663

166.1.3.1/24

0.0.1.44

 

Vlan-int 664

166.1.4.1/24

0.0.1.44

Figure 3-4 Network diagram for AS 400 configuration

l           Configure S400.

# Run OSPF on the interface connected to network 206.1.6.0/24 and specify its area ID as 0.

<S400> system-view

[S400] ospf

[S400-ospf-1] area 0

[S400-ospf-1-area-0.0.0.0] network 206.1.6.0 0.0.0.255

l           Configure S400_0.

# Run OSPF on the interface connected to network 206.1.6.0/24 and specify its area ID as 0.

<S400_0> system-view

[S400_0] ospf

[S400_0-ospf-1] area 0

[S400_0-ospf-1-area-0.0.0.0] network 206.1.6.0 0.0.0.255

[S400_0-ospf-1-area-0.0.0.0] quit

# Run OSPF on interfaces connected to networks 166.1.3.0/24 and 166.1.4.0/24 and specify their area ID as 0.0.1.44.

[S400_0-ospf-1] area 0.0.1.44

[S400_0-ospf-1-area-0.0.1.44] network 166.1.3.0 0.0.0.255

[S400_0-ospf-1-area-0.0.1.44] network 166.1.4.0 0.0.0.255

III. Basic BGP configuration

Figure 3-5 shows the relevant network diagram.

Device

Interface

IP address

Router ID

AS

S100_1

Vlan-int 11

196.1.1.1/24

1.1.1.1

100

 

Vlan-int 15

196.1.3.1/24

 

 

Vlan-int 31

196.3.1.1/24

 

S100_2

Vlan-int 22

196.2.2.1/24

1.2.1.1

 

Vlan-int 23

196.2.3.2/24

 

 

Vlan-int 31

196.3.1.2/24

 

S200

Vlan-int 11

196.1.1.3/24

2.1.1.1

200

 

Vlan-int 13

206.1.3.3/24

 

S300

Vlan-int 22

196.2.2.2/24

3.1.1.1

300

 

Vlan-int 13

206.1.3.2/24

 

S400

Vlan-int 15

196.1.3.3/24

4.1.1.1

400

 

Vlan-int 23

196.2.3.3/24

 

Figure 3-5 Network diagram for BGP configuration

l           Configure S100_1.

# Configure the router ID of S100_1 as 1.1.1.1.

<S100_1> system-view

[S100_1] router id 1.1.1.1

# Enable BGP and specify the local AS number as 100.

[S100_1] bgp 100

# Create IBGP peer group 100 and EBGP peer groups 200 and 400.

[S100_1-bgp] group 100 internal

[S100_1-bgp] group 200 external

[S100_1-bgp] group 400 external

# Add peer 196.3.1.2 in AS 100 into peer group 100; Add peer 196.1.1.3 in AS 200 into peer group 200; Add peer 196.1.3.3 in AS 400 into peer group 400.

[S100_1-bgp] peer 196.3.1.2 group 100

[S100_1-bgp] peer 196.1.1.3 group 200 as-number 200

[S100_1-bgp] peer 196.1.3.3 group 400 as-number 400

# Advertise networks 196.1.3.0, 196.3.1.0, and 196.1.1.0.

[S100_1-bgp] network 196.1.3.0

[S100_1-bgp] network 196.3.1.0

[S100_1-bgp] network 196.1.1.0

# Set the preferences of EBGP routes, IBGP routes, and local routes to 200.

[S100_1-bgp] preference 200 200 200

l           Configure S100_2.

# Configure the router ID of S200_2 as 1.2.1.1.

<S100_2> system-view

[S100_2] router id 1.2.1.1

# Enable BGP and specify the local AS number as 100.

[S100_2] bgp 100

# Create IBGP peer group 100 and EBGP peer groups 300 and 400.

[S100_2-bgp] group 100 internal

[S100_2-bgp] group 300 external

[S100_2-bgp] group 400 external

# Add peer 196.3.1.1 in AS 100 into peer group 100; Add peer 196.2.2.2 in AS 300 into peer group 300; Add peer 196.2.3.3 in AS 400 into peer group 400.

[S100_2-bgp] peer 196.3.1.1 group 100

[S100_2-bgp] peer 196.2.2.2 group 300 as-number 300

[S100_2-bgp] peer 196.2.3.3 group 400 as-number 400

# Advertise networks 196.2.2.0, 196.2.3.0, and 196.3.1.0.

[S100_2-bgp] network 196.2.2.0

[S100_2-bgp] network 196.2.3.0

[S100_2-bgp] network 196.3.1.0

# Set the preferences of EBGP routes, IBGP routes, and local routes to 200.

[S100_2-bgp] preference 200 200 200

l           Configure S200.

# Configure the router ID of S200 as 2.1.1.1.

<S200> system-view

[S200] router id 2.1.1.1

# Enable BGP and specify the local AS number as 200.

[S200] bgp 200

# Create EBGP peer groups 100 and 300.

[S200-bgp] group 100 external

[S200-bgp] group 300 external

# Add peer 196.1.1.1 in AS 100 into peer group 100; Add peer 206.1.3.2 in AS 300 into peer group 300.

[S200-bgp] peer 196.1.1.1 group 100 as-number 100

[S200-bgp] peer 206.1.3.2 group 300 as-number 300

# Advertise networks 192.1.1.0 and 206.1.3.0.

[S200-bgp] network 192.1.1.0

[S200-bgp] network 206.1.3.0

# Set the preferences of EBGP routes, IBGP routes, and local routes to 200.

[S200-bgp] preference 200 200 200

l           Configure S300.

# Configure the router ID of S300 as 3.1.1.1.

<S300> system-view

[S300] router id 3.1.1.1

# Enable BGP and specify the local AS number as 300.

[S300] bgp 300

# Create EBGP peer groups 100 and 200.

[S300-bgp] group 100 external

[S300-bgp] group 200 external

# Add peer 196.2.2.1 in AS 100 into peer group 100; Add peer 206.1.3.3 in AS 200 into peer group 200.

[S300-bgp] peer 196.2.2.1 group 100 as-number 100

[S300-bgp] peer 206.1.3.3 group 200 as-number 200

# Advertise networks 206.1.3.0 and 196.2.2.0.

[S300-bgp] network 206.1.3.0

[S300-bgp] network 196.2.2.0

# Set the preferences of EBGP routes, IBGP routes, and local routes to 200.

[S300-bgp] preference 200 200 200

l           Configure S400.

# Configure the router ID of S400 as 4.1.1.1.

<S400> system-view

[S400] router id 4.1.1.1

# Enable BGP and specify the local AS number as 400.

[S400] bgp 400

# Create EBGP peer groups 100_1 and 100_2.

[S400-bgp] group 100_1 external

[S400-bgp] group 100_2 external

# Add peer 196.1.3.1 in AS 100 into peer group 100_1; Add peer 196.2.3.2 in AS 100 into peer group 100_2.

[S400-bgp] peer 196.1.3.1 group 100_1 as-number 100

[S400-bgp] peer 196.2.3.2 group 100_2 as-number 100

# Advertise networks 196.1.3.0 and 196.2.3.0.

[S400-bgp] network 196.1.3.0

[S400-bgp] network 196.2.3.0

# Set the preferences of EBGP routes, IBGP routes, and local routes to 200.

[S400-bgp] preference 200 200 200

3.2.4  RIP, Static Route, and Routing Policy Configuration Example

I. Network requirements

As shown in Figure 3-6, RIPv2 runs on S300_A/S300_B. To control the number of routes learned by S300_B through RIP, allow S300_B to advertise routes to S300_A and forbid S300_B to receive routes advertised by S300_A. Packets from S300_B to S300_A are forwarded through the default route.

II. Network diagram

Device

Interface

IP address

S300_A

Vlan-int 662

166.1.2.1/24

S300_B

Vlan-int 662

166.1.2.2/24

 

Vlan-int 623

162.1.3.1/24

 

Vlan-int 624

162.1.4.1/24

Figure 3-6 Network diagram for RIP, static route, and routing policy configuration

III. Configuration procedure

# Create ACL 2000 and deny all packets.

<S300_B> system-view

[S300_B] acl number 2000

[S300_B-acl-basic-2000] rule deny source any

[S300_B-acl-basic-2000] quit

# Apply ACL 2000 to incoming RIP routes.

[S300_B] rip

[S300_B-rip] filter-policy 2000 import

# Configure a default route and specify the next-hop IP address as 166.1.2.1.

[S300_B] ip route-static 0.0.0.0 0.0.0.0 166.1.2.1 preference 60

3.2.5  BGP and IGP Interaction Configuration Example

I. Network requirements

As shown in Figure 3-7, OSPF and BGP run on S400/S200. RIPv2 and BGP run on S300. To ensure that devices in each AS can learn network topologies of other ASs, configure interaction between IGP and BGP to share routes. When redistributing routes from IGP to BGP, apply a routing policy to redistribute routes with IP prefixes 162.1.1.0/24, 162.1.2.0/24, 162.1.3.0/24, 162.1.4.0/24, 166.1.3.0/24, and 166.1.4.0/24 only.

II. Network diagram

Figure 3-7 Network diagram for BGP and IGP interaction

III. Configuration procedure

l           Configure interaction between IGP and BGP on S200.

# Redistribute OSPF routes into BGP.

<S200> system-view

[S200] bgp 200

[S200-bgp] import-route ospf 1

[S200-bgp] quit

# Define a prefix list named ospf_import and permit the routes with IP prefixes 162.1.3.0/24, 162.1.4.0/24, 166.1.3.0/24, or 166.1.4.0/24.

[S200] ip ip-prefix ospf_import index 10 permit 162.1.3.0 24

[S200] ip ip-prefix ospf_import index 20 permit 162.1.4.0 24

[S200] ip ip-prefix ospf_import index 30 permit 166.1.4.0 24

[S200] ip ip-prefix ospf_import index 40 permit 166.1.3.0 24

# Create a routing policy named ospf_import with the match mode as permit. Define an if-match clause to permit routes whose destination addresses match IP prefix list ospf_import.

[S200] route-policy ospf_import permit node 10

[S200-route-policy] if-match ip-prefix ospf_import

[S200-route-policy] quit

# Redistribute BGP routes into OSPF and apply routing policy ospf_import.

[S200] ospf

[S200-ospf-1] import-route bgp route-policy ospf_import

l           Configure interaction between IGP and BGP on S300.

# Redistribute RIP routes into BGP.

<S300> system-view

[S300] bgp 300

[S300-bgp] import-route rip

[S300-bgp] quit

# Define a prefix list named rip_import and permit the routes with IP prefixes 162.1.1.0/24, 162.1.2.0/24, 166.1.3.0/24, and 166.1.4.0/24.

[S300] ip ip-prefix rip_import index 10 permit 162.1.1.0 24

[S300] ip ip-prefix rip_import index 20 permit 162.1.2.0 24

[S300] ip ip-prefix rip_import index 30 permit 166.1.3.0 24

[S300] ip ip-prefix rip_import index 40 permit 166.1.4.0 24

# Create a routing policy named rip_import with the matching mode as permit. Define an if-match clause to permit routes whose destination addresses match IP prefix list rip_import.

[S300] route-policy rip_import permit node 10

[S300-route-policy] if-match ip-prefix rip_import

[S300-route-policy] quit

# Redistribute BGP routes into RIP and apply routing policy rip_import.

[S300] rip

[S300-rip] import-route bgp route-policy rip_import

l           Configure interaction between IGP and BGP on S400.

# Redistribute OSPF routes into BGP.

<S400> system-view

[S400] bgp 400

[S400-bgp] import-route ospf 1

[S400-bgp] quit

# Define a prefix list named ospf_import and permit the routes with IP prefixes 162.1.1.0/24, 162.1.2.0/24, 162.1.3.0/24, and 162.1.4.0/24.

[S400] ip ip-prefix ospf_import index 10 permit 162.1.1.0 24

[S400] ip ip-prefix ospf_import index 20 permit 162.1.2.0 24

[S400] ip ip-prefix ospf_import index 30 permit 162.1.3.0 24

[S400] ip ip-prefix ospf_import index 40 permit 162.1.4.0 24

# Create a routing policy named ospf_import with the match mode as permit. Define an if-match clause to permit the routes whose destination addresses match IP prefix list ospf_import.

[S400] route-policy ospf_import permit node 10

[S400-route-policy] if-match ip-prefix ospf_import

[S400-route-policy] quit

# Redistribute BGP routes into OSPF and apply the routing policy named ospf_import.

[S400] ospf

[S400-ospf-1] import-route bgp route-policy ospf_import

3.2.6  Route Backup Configuration Example

I. Network requirements

As shown in Figure 3-8, implement route backup on S200_10. Run OSPF between S200_10 and S200_0. The OSPF route is the primary route. Configure a default route between S200_10 and S300_A. This route is the backup route. When the primary route cannot work, the device switches to the backup route automatically. When the primary route becomes feasible, the device switches to the primary route automatically. To achieve the route backup of S200_10, configure a static route to S200_10 on S300_A and redistribute this route into RIPv2.

II. Network diagram

Device

Interface

IP address

AS

S300_A

Vlan-int 665

166.1.5.2/24

300

S200_10

Vlan-int 665

166.1.5.1/24

200

 

Vlan-int 621

162.1.1.1/24

 

Vlan-int 622

162.1.2.1/24

Figure 3-8 Network diagram for route backup

III. Configuration procedure

# Configure a default route on S200_10 and specify the next-hop IP address as 166.1.5.2. Set the default preference to 200.

<S200_10> system-view

[S200_10] ip route-static 0.0.0.0 0.0.0.0 166.1.5.2 preference 200

# Configure a static route on S300_A and specify the destination IP addresses as 162.1.1.0/24 and 162.1.2.0/24. Specify the next-hop IP address as 166.1.5.1 and the default preference to 200.

<S300_A> system-view

[S300_A] ip route-static 162.1.1.0 255.255.255.0 166.1.5.1 preference 200

[S300_A] ip route-static 162.1.2.0 255.255.255.0 166.1.5.1 preference 200

# Redistribute the static route into RIP.

[S300_A] rip

[S300_A-rip] import-route static

3.2.7  BGP MED Attribute Configuration Example

I. Network requirements

As shown in Figure 3-9, S100_1 forwards packets from S400 to S200_10. S100_2 forwards packets from S400 to S300_B. Modify the MED value to achieve this goal.

II. Network diagram

Device

Interface

IP address

AS

S200_10

Vlan-int 621

162.1.1.1/24

200

 

Vlan-int 622

162.1.2.1/24

S300_B

Vlan-int 623

162.1.3.1/24

300

 

Vlan-int 624

162.1.4.1/24

S400_0

Vlan-int 663

166.1.3.1/24

400

 

Vlan-int 664

166.1.4.1/24

Figure 3-9 Network diagram for MED attribute configuration

III. Configuration procedure

l           Configure S100_1.

# Define a prefix list named as200_1 and permit the route with IP prefix 162.1.1.0/24.

<S100_1> system-view

[S100_1] ip ip-prefix as200_1 index 10 permit 162.1.1.0 24

# Define a prefix list named as200_2 and permit the route with IP prefix 162.1.2.0/24.

[S100_1] ip ip-prefix as200_2 index 10 permit 162.1.2.0 24

# Define a prefix list named as300_1 and permit the route with IP prefix 162.1.3.0/24.

[S100_1] ip ip-prefix as300_1 index 10 permit 162.1.3.0 24

# Define a prefix list named as300_2 and permit the route with IP prefix 162.1.4.0/24.

[S100_1] ip ip-prefix as300_2 index 10 permit 162.1.4.0 24

# Define a prefix list named other and permit all the routes.

[S100_1] ip ip-prefix other index 10 permit 0.0.0.0 0 less-equal 32

# Create a routing policy named as200, and specify node 10 with the permit matching mode in the routing policy. Set the MED value of the route matching prefix list as200_1 to 100.

[S100_1] route-policy as200 permit node 10

[S100_1-route-policy] if-match ip-prefix as200_1

[S100_1-route-policy] apply cost 100

[S100_1-route-policy] quit

# Create node 20 with the matching mode as permit in routing policy as200.  Set the MED value of the route matching prefix list as200_2 to 100

[S100_1] route-policy as200 permit node 20

[S100_1-route-policy] if-match ip-prefix as200_2

[S100_1-route-policy] apply cost 100

[S100_1-route-policy] quit

# Create node 30 with the permit matching mode in routing policy as200.  Set the MED value of the route matching prefix list as300_1 to 200.

[S100_1] route-policy as200 permit node 30

[S100_1-route-policy] if-match ip-prefix as300_1

[S100_1-route-policy] apply cost 200

[S100_1-route-policy] quit

# Create node 40 with the permit matching mode in routing policy as200.  Set the MED value of the route matching prefix list as300_2 to 200.

[S100_1] route-policy as200 permit node 40

[S100_1-route-policy] if-match ip-prefix as300_2

[S100_1-route-policy] apply cost 200

[S100_1-route-policy] quit

# Create node 50 with the permit matching mode in routing policy as200. Permit all the routes.

[S100_1] route-policy as200 permit node 50

[S100_1-route-policy] if-match ip-prefix other

[S100_1-route-policy] quit

# Apply the routing policy as200 to the routes outgoing to peer group 400 (the peer 196.1.3.3).

[S100_1] bgp 100

[S100_1-bgp] peer 400 route-policy as200 export

l           Configure S100_2.

# Define a prefix list named as200_1 and permit the route with IP prefix 162.1.1.0/24.

<S100_2> system-view

[S100_2] ip ip-prefix as200_1 index 10 permit 162.1.1.0 24

# Define a prefix list named as200_2 and permit the route with IP prefix 162.1.2.0/24.

[S100_2] ip ip-prefix as200_2 index 10 permit 162.1.2.0 24

# Define a prefix list named as300_1 and permit the route with IP prefix 162.1.3.0/24.

[S100_2] ip ip-prefix as300_1 index 10 permit 162.1.3.0 24

# Define a prefix list named as300_2 and permit the route with IP prefix 162.1.4.0/24.

[S100_2] ip ip-prefix as300_2 index 10 permit 162.1.4.0 24

# Define a prefix list named other and permit all the routes.

[S100_2] ip ip-prefix other index 10 permit 0.0.0.0 0 less-equal 32

# Create a routing policy named as300. Configure the node number as 10 and the matching mode as permit.  Set the MED value of the route matching prefix list as200_1 to 200.

[S100_2] route-policy as300 permit node 10

[S100_2-route-policy] if-match ip-prefix as200_1

[S100_2-route-policy] apply cost 200

[S100_2-route-policy] quit

# Create node 20 with the permit matching mode in routing policy as300. Set the MED value of the route matching prefix list as200_2 to 200.

[S100_2] route-policy as300 permit node 20

[S100_2-route-policy] if-match ip-prefix as200_2

[S100_2-route-policy] apply cost 200

[S100_2-route-policy] quit

# Create node 30 with the permit matching mode in routing policy as300.  Set the MED value of the route matching prefix list as300_1 to 100.

[S100_2] route-policy as300 permit node 30

[S100_2-route-policy] if-match ip-prefix as300_1

[S100_2-route-policy] apply cost 100

[S100_2-route-policy] quit

# Create node 40 with the permit matching mode in routing policy as300.  Set the MED value of the route matching prefix list as300_2 to 100.

[S100_2] route-policy as300 permit node 40

[S100_2-route-policy] if-match ip-prefix as300_2

[S100_2-route-policy] apply cost 100

[S100_2-route-policy] quit

# Create node 50 with the permit matching mode in routing policy as300 and permit all routes.

[S100_2] route-policy as300 permit node 50

[S100_2-route-policy] if-match ip-prefix other

[S100_2-route-policy] quit

# Apply routing policy as300 to the routes outgoing to peer group 400 (peer 196.2.3.3).

[S100_2] bgp 100

[S100_2-bgp] peer 400 route-policy as300 export

3.3  Displaying the Whole Configuration on Devices

3.3.1   Displaying the Whole Configuration on Devices

I. S100_1

<S100_1> display current-configuration

#

 sysname S100_1

#

 router id 1.1.1.1

#

….

#

vlan 11

#

vlan 15

#

vlan 31

#

interface Vlan-interface11

 ip address 196.1.1.1 255.255.255.0

#

interface Vlan-interface15

 ip address 196.1.3.1 255.255.255.0

#

interface Vlan-interface31

 ip address 196.3.1.1 255.255.255.0

#

#

 undo fabric-port Cascade1/2/1 enable

 undo fabric-port Cascade1/2/2 enable

#

interface NULL0

#

bgp 100

 network 196.1.3.0

 network 196.3.1.0

 network 196.1.1.0

 undo synchronization

 group 100 internal

 peer 196.3.1.2 group 100

 group 200 external

 peer 196.1.1.3 group 200 as-number 200

 group 400 external

 peer 400 route-policy as200 export

 peer 196.1.3.3 group 400 as-number 400

 preference 200 200 200

#

route-policy as200 permit node 10

 if-match ip-prefix as200_1

 apply cost 100

route-policy as200 permit node 20

 if-match ip-prefix as200_2

 apply cost 100

route-policy as200 permit node 30

 if-match ip-prefix as300_1

 apply cost 200

route-policy as200 permit node 40

 if-match ip-prefix as300_2

 apply cost 200

route-policy as200 permit node 50

 if-match ip-prefix other

#

 ip ip-prefix as200_1 index 10 permit 162.1.1.0 24

 ip ip-prefix as200_2 index 10 permit 162.1.2.0 24

 ip ip-prefix as300_1 index 10 permit 162.1.3.0 24

 ip ip-prefix as300_2 index 10 permit 162.1.4.0 24

 ip ip-prefix other index 10 permit 0.0.0.0 0 less-equal 32

#

II. S100_2

<S100_2> display current-configuration

#

 sysname S100_2

#

 router id 1.2.1.1

#

……

#

vlan 22

#

vlan 23

#

vlan 31

#

interface Vlan-interface22

 ip address 196.2.2.1 255.255.255.0

#

interface Vlan-interface23

 ip address 196.2.3.2 255.255.255.0

#

interface Vlan-interface31

 ip address 196.3.1.2 255.255.255.0

#

#

interface Cascade1/2/1

#

interface Cascade1/2/2

#

 undo fabric-port Cascade1/2/1 enable

 undo fabric-port Cascade1/2/2 enable

#

interface NULL0

#

bgp 100

 network 196.2.2.0

 network 196.2.3.0

 network 196.3.1.0

 undo synchronization

 group 100 internal

 peer 196.3.1.1 group 100

 group 300 external

 peer 196.2.2.2 group 300 as-number 300

 group 400 external

 peer 400 route-policy as300 export

 peer 196.2.3.3 group 400 as-number 400

 preference 200 200 200

#

route-policy as300 permit node 10

 if-match ip-prefix as200_1

 apply cost 200

route-policy as300 permit node 20

 if-match ip-prefix as200_2

 apply cost 200

route-policy as300 permit node 30

 if-match ip-prefix as300_1

 apply cost 100

route-policy as300 permit node 40

 if-match ip-prefix as300_2

 apply cost 100

route-policy as300 permit node 50

 if-match ip-prefix other

#

 ip ip-prefix as200_1 index 10 permit 162.1.1.0 24

 ip ip-prefix as200_2 index 10 permit 162.1.2.0 24

 ip ip-prefix as300_1 index 10 permit 162.1.3.0 24

 ip ip-prefix as300_2 index 10 permit 162.1.4.0 24

 ip ip-prefix other index 10 permit 0.0.0.0 0 less-equal 32

#

…..

III. S200

<S200> display current-configuration

#

 sysname S200

#

……

#

 router id 2.1.1.1

#

………..

#

vlan 11

#

vlan 12

#

vlan 13

#

interface Vlan-interface11

 ip address 196.1.1.3 255.255.255.0

#

interface Vlan-interface12

 ip address 206.1.2.3 255.255.255.0

#

interface Vlan-interface13

 ip address 206.1.3.3 255.255.255.0

#

…….

#

bgp 200

 network 192.1.1.0

 network 206.1.3.0

 import-route ospf 1

 undo synchronization

 group 100 external

 peer 196.1.1.1 group 100 as-number 100

 group 300 external

 peer 206.1.3.2 group 300 as-number 300

 preference 200 200 200

#

ospf 1

 import-route bgp route-policy ospf_import

 area 0.0.0.0

  network 206.1.2.0 0.0.0.255

#

route-policy ospf_import permit node 10

 if-match ip-prefix ospf_import

#

 ip ip-prefix ospf_import index 10 permit 162.1.3.0 24

 ip ip-prefix ospf_import index 20 permit 162.1.4.0 24

 ip ip-prefix ospf_import index 30 permit 166.1.4.0 24

 ip ip-prefix ospf_import index 40 permit 166.1.3.0 24

#

……

IV. S200_0

<S200_0> display current-configuration

#

 sysname S200_0

#

…….

#

vlan 12

#

vlan 661

#

interface Vlan-interface12

 ip address 206.1.2.1 255.255.255.0

#

interface Vlan-interface661

 ip address 166.1.1.1 255.255.255.0

#

…….

#

ospf 1

 area 0.0.0.10

  network 166.1.1.0 0.0.0.255

 #

 area 0.0.0.0

  network 206.1.2.0 0.0.0.255

#

……….

V. S200_10

<S200_10> display current-configuration

#

 sysname S200_10

#

…….

#

vlan 621 to 622

#

vlan 661

#

vlan 665

#

interface Vlan-interface621

 ip address 162.1.1.1 255.255.255.0

#

interface Vlan-interface622

 ip address 162.1.2.1 255.255.255.0

#

interface Vlan-interface661

 ip address 166.1.1.2 255.255.255.0

#

interface Vlan-interface665

 ip address 166.1.5.1 255.255.255.0

#

………

#

ospf 1

 area 0.0.0.10

  network 162.1.1.0 0.0.0.255

  network 162.1.2.0 0.0.0.255

  network 166.1.1.0 0.0.0.255

#

 ip route-static 0.0.0.0 0.0.0.0 166.1.5.2 preference 200

#

………

VI. S300

<S300> display current-configuration

#

 sysname S300

#

router id 3.1.1.1

#

…..

#

vlan 13

#

vlan 14

#

vlan 22

#

interface Vlan-interface13

 ip address 206.1.3.2 255.255.255.0

#

interface Vlan-interface14

 ip address 206.1.4.2 255.255.255.0

 rip version 2 multicast

#

interface Vlan-interface22

 ip address 196.2.2.2 255.255.255.0

#

……

#

bgp 300

 network 206.1.3.0

 network 196.2.2.0

 import-route rip

 undo synchronization

 group 100 external

 peer 196.2.2.1 group 100 as-number 100

 group 200 external

 peer 206.1.3.3 group 200 as-number 200

 preference 200 200 200

#

rip

 undo summary

 network 206.1.4.0

 import-route bgp route-policy rip_import

#

route-policy rip_import permit node 10

 if-match ip-prefix rip_import

#

 ip ip-prefix rip_import index 10 permit 162.1.1.0 24

 ip ip-prefix rip_import index 20 permit 162.1.2.0 24

 ip ip-prefix rip_import index 30 permit 166.1.3.0 24

 ip ip-prefix rip_import index 40 permit 166.1.4.0 24

#

………

VII. S300_A

<S300_A> display current-configuration

#

 sysname S300_A

#

……

#

vlan 14

#

vlan 662

#

vlan 665

#

interface Vlan-interface14

 ip address 206.1.4.1 255.255.255.0

 rip version 2 multicast

#

interface Vlan-interface662

 ip address 166.1.2.1 255.255.255.0

 rip version 2 multicast

#

interface Vlan-interface665

 ip address 166.1.5.2 255.255.255.0

#

……

#

rip

 undo summary

 network 206.1.4.0

 network 166.1.0.0

 import-route static

#

ip route-static 162.1.1.0 255.255.255.0 166.1.5.1 preference 200

 ip route-static 162.1.2.0 255.255.255.0 166.1.5.1 preference 200

#

………

VIII. S300_B

<S300_B> display current-configuration

#

 sysname S300_B

#

……

#

acl number 2000

 rule 5 deny

#

……

#

vlan 623

#

vlan 624

#

vlan 662

#

interface Vlan-interface623

 ip address 162.1.3.1 255.255.255.0

 rip version 2 multicast

#

interface Vlan-interface624

 ip address 162.1.4.1 255.255.255.0

 rip version 2 multicast

#

interface Vlan-interface662

 ip address 166.1.2.2 255.255.255.0

 rip version 2 multicast

#

……

#

rip

 undo summary

 network 166.1.0.0

 network 162.1.0.0

 filter-policy 2000 import

#

 ip route-static 0.0.0.0 0.0.0.0 166.1.2.1 preference 60

#

……

IX. S400

<S400> display current-configuration

#

 sysname S400

#

 router id 4.1.1.1

#

……

#

vlan 15 to 16

#

vlan 23

#

interface Vlan-interface15

 ip address 196.1.3.3 255.255.255.0

#

interface Vlan-interface16

 ip address 206.1.6.3 255.255.255.0

#

interface Vlan-interface23

 ip address 196.2.3.3 255.255.255.0

#

……

#

interface Cascade1/2/1

#

interface Cascade1/2/2

#

 undo fabric-port Cascade1/2/1 enable

 undo fabric-port Cascade1/2/2 enable

#

interface NULL0

#

bgp 400

 network 196.1.3.0

 network 196.2.3.0

 import-route ospf 1

 undo synchronization

 group 100_1 external

 peer 196.1.3.1 group 100_1 as-number 100

 group 100_2 external

 peer 196.2.3.2 group 100_2 as-number 100

 preference 200 200 200

#

ospf 1

 import-route bgp route-policy ospf_import

 area 0.0.0.0

  network 206.1.6.0 0.0.0.255

#

route-policy ospf_import permit node 10

 if-match ip-prefix ospf_import

#

 ip as-path-acl 1 permit ^100 200$

 ip as-path-acl 2 permit ^100 300$

#

 ip ip-prefix ospf_import index 10 permit 162.1.1.0 24

 ip ip-prefix ospf_import index 20 permit 162.1.2.0 24

 ip ip-prefix ospf_import index 30 permit 162.1.3.0 24

 ip ip-prefix ospf_import index 40 permit 162.1.4.0 24

#

…..

X. S400_0

<S400_0> display current-configuration

#

 sysname S400_0

#

………

#

vlan 16

#

vlan 663 to 664

#

………

#

interface Vlan-interface16

 ip address 206.1.6.1 255.255.255.0

#

interface Vlan-interface663

 ip address 166.1.3.1 255.255.255.0

#

interface Vlan-interface664

 ip address 166.1.4.1 255.255.255.0

#

………

#

ospf 1

 area 0.0.1.44

  network 166.1.3.0 0.0.0.255

  network 166.1.4.0 0.0.0.255

 #

 area 0.0.0.0

  network 206.1.6.0 0.0.0.255

#

………

3.4  Verifying the Configuration

3.4.1  Verifying the Configuration of Routing Policy and Static Routes

<S300_B> display ip routing-table

 Routing Table: public net

Destination/Mask   Protocol Pre  Cost  Nexthop     Interface

0.0.0.0/0            STATIC   60    0     166.1.2.1   Vlan-interface662

127.0.0.0/8          DIRECT   0     0     127.0.0.1   InLoopBack0

127.0.0.1/32         DIRECT   0     0         127.0.0.1   InLoopBack0

162.1.3.0/24         DIRECT   0     0     162.1.3.1   Vlan-interface623

162.1.3.1/32         DIRECT   0     0     127.0.0.1   InLoopBack0

162.1.4.0/24         DIRECT   0     0     162.1.4.1   Vlan-interface624

162.1.4.1/32         DIRECT   0     0     127.0.0.1   InLoopBack0

166.1.2.0/24         DIRECT   0     0     166.1.2.2   Vlan-interface662

166.1.2.2/32         DIRECT   0     0     127.0.0.1   InLoopBack0    

<S300_B> tracert -a 162.1.3.1 166.1.4.1

 traceroute to 166.1.4.1(166.1.4.1) 30 hops max,40 bytes packet

 1 166.1.2.1 18 ms  3 ms  3 ms

 2 206.1.4.2 9 ms  4 ms  4 ms

 3 196.2.2.1 9 ms  9 ms  18 ms

 4 196.2.3.3 6 ms  3 ms  4 ms

 5 206.1.6.1 14 ms  4 ms  3 ms

3.4.2  Verifying the BGP and IGP Interaction Configuration

<S400_0> display ip routing-table

 Routing Table: public net

Destination/Mask  Protocol  Pre  Cost    Nexthop      Interface

127.0.0.0/8        DIRECT    0     0       127.0.0.1    InLoopBack0

127.0.0.1/32       DIRECT    0     0       127.0.0.1    InLoopBack0

162.1.1.0/24       O_ASE     150   1       206.1.6.3    Vlan-interface16

162.1.2.0/24       O_ASE     150   1       206.1.6.3    Vlan-interface16

162.1.3.0/24       O_ASE     150   1       206.1.6.3    Vlan-interface16

162.1.4.0/24       O_ASE     150   1       206.1.6.3    Vlan-interface16

166.1.3.0/24       DIRECT    0     0       166.1.3.1    Vlan-interface663

166.1.3.1/32       DIRECT    0     0       127.0.0.1    InLoopBack0

166.1.4.0/24       DIRECT    0     0       166.1.4.1    Vlan-interface664

166.1.4.1/32       DIRECT    0     0       127.0.0.1    InLoopBack0

192.168.0.0/24     DIRECT    0     0      192.168.0.30 Vlan-interface1

192.168.0.30/32    DIRECT    0     0      127.0.0.1    InLoopBack0

206.1.6.0/24       DIRECT     0     0      206.1.6.1    Vlan-interface16

206.1.6.1/32       DIRECT     0     0      127.0.0.1    InLoopBack0

<S300_A> display ip routing-table

 Routing Table: public net

Destination/Mask  Protocol Pre  Cost    Nexthop         Interface

127.0.0.0/8        DIRECT    0    0      127.0.0.1       InLoopBack0

127.0.0.1/32       DIRECT    0    0      127.0.0.1       InLoopBack0

162.1.1.0/24       RIP       100  1       206.1.4.2       Vlan-interface14

162.1.2.0/24       RIP       100  1       206.1.4.2       Vlan-interface14

162.1.3.0/24       RIP       100  1       166.1.2.2       Vlan-interface662

162.1.4.0/24       RIP       100  1       166.1.2.2       Vlan-interface662

166.1.2.0/24       DIRECT     0    0      166.1.2.1       Vlan-interface662

166.1.2.1/32       DIRECT    0    0      127.0.0.1       InLoopBack0

166.1.3.0/24       RIP        100  1       206.1.4.2       Vlan-interface14

166.1.4.0/24       RIP         100  1         206.1.4.2       Vlan-interface14

166.1.5.0/24       DIRECT    0    0      166.1.5.2       Vlan-interface665

166.1.5.2/32       DIRECT    0    0      127.0.0.1       InLoopBack0

206.1.4.0/24       DIRECT    0    0      206.1.4.1       Vlan-interface14

206.1.4.1/32       DIRECT   0    0        127.0.0.1       InLoopBack0

<S200_10> display ip routing-table

 Routing Table: public net

Destination/Mask  Protocol Pre  Cost   Nexthop     Interface

0.0.0.0/0         STATIC    200  0      166.1.5.2   Vlan-interface665

127.0.0.0/8        DIRECT      0    0      127.0.0.1   InLoopBack0

127.0.0.1/32      DIRECT   0    0      127.0.0.1   InLoopBack0

162.1.1.0/24       DIRECT      0    0      162.1.1.1   Vlan-interface621

162.1.1.1/32       DIRECT      0    0      127.0.0.1   InLoopBack0

162.1.2.0/24       DIRECT      0    0     162.1.2.1    Vlan-interface622

162.1.2.1/32       DIRECT    0    0      127.0.0.1   InLoopBack0

162.1.3.0/24       O_ASE     150  1      166.1.1.1   Vlan-interface661

162.1.4.0/24       O_ASE     150  1      166.1.1.1   Vlan-interface661

166.1.1.0/24       DIRECT    0    0      166.1.1.2   Vlan-interface661

166.1.1.2/32       DIRECT    0    0      127.0.0.1   InLoopBack0

166.1.3.0/24       O_ASE     150  1      166.1.1.1   Vlan-interface661

166.1.4.0/24       O_ASE     150  1      166.1.1.1   Vlan-interface661

166.1.5.0/24       DIRECT    0    0      166.1.5.1   Vlan-interface665

166.1.5.1/32       DIRECT    0    0      127.0.0.1   InLoopBack0

206.1.2.0/24       OSPF      10   20     166.1.1.1   Vlan-interface661

3.4.3  Verifying the Route Backup Configuration

I. Verify the primary route is installed into the routing table

<S200_10> display ip routing-table

 Routing Table: public net

Destination/Mask  Protocol Pre  Cost   Nexthop     Interface

0.0.0.0/0         STATIC    200  0      166.1.5.2   Vlan-interface665

127.0.0.0/8        DIRECT      0    0      127.0.0.1   InLoopBack0

127.0.0.1/32      DIRECT   0    0      127.0.0.1   InLoopBack0

162.1.1.0/24       DIRECT      0    0      162.1.1.1   Vlan-interface621

162.1.1.1/32       DIRECT      0    0      127.0.0.1   InLoopBack0

162.1.2.0/24       DIRECT      0    0     162.1.2.1    Vlan-interface622

162.1.2.1/32       DIRECT    0    0      127.0.0.1   InLoopBack0

162.1.3.0/24       O_ASE     150  1      166.1.1.1   Vlan-interface661

162.1.4.0/24       O_ASE     150  1      166.1.1.1   Vlan-interface661

166.1.1.0/24       DIRECT    0    0      166.1.1.2   Vlan-interface661

166.1.1.2/32       DIRECT    0    0      127.0.0.1   InLoopBack0

166.1.3.0/24       O_ASE     150  1      166.1.1.1   Vlan-interface661

166.1.4.0/24       O_ASE     150  1      166.1.1.1   Vlan-interface661

166.1.5.0/24       DIRECT    0    0      166.1.5.1   Vlan-interface665

166.1.5.1/32       DIRECT    0    0      127.0.0.1   InLoopBack0

206.1.2.0/24       OSPF      10   20     166.1.1.1   Vlan-interface661

<S200_10> tracert -a 162.1.1.1 166.1.3.1

 traceroute to  166.1.3.1(166.1.3.1) 30 hops max,40 bytes packet

 1 166.1.1.1 10 ms  3 ms  3 ms

 2 206.1.2.3 13 ms  3 ms  5 ms

 3 196.1.1.1 9 ms  3 ms  4 ms

 4 196.1.3.3 12 ms  3 ms  3 ms

 5 206.1.6.1 14 ms  5 ms  3 ms

II. Verify the backup route is installed into the routing table after the primary one fails

<S200_10> display ip routing-table

 Routing Table: public net

Destination/Mask  Protocol Pre  Cost   Nexthop     Interface

0.0.0.0/0           STATIC   200  0     166.1.5.2    Vlan-interface665

127.0.0.0/8         DIRECT   0    0          127.0.0.1    InLoopBack0

127.0.0.1/32        DIRECT   0    0      127.0.0.1    InLoopBack0

162.1.1.0/24        DIRECT   0    0      162.1.1.1       Vlan-interface621

162.1.1.1/32        DIRECT   0    0      127.0.0.1       InLoopBack0

162.1.2.0/24        DIRECT   0    0      162.1.2.1       Vlan-interface622

162.1.2.1/32        DIRECT   0    0      127.0.0.1       InLoopBack0

166.1.5.0/24        DIRECT   0    0      166.1.5.1       Vlan-interface665

166.1.5.1/32        DIRECT   0    0      127.0.0.1    InLoopBack0 

<S200_10> tracert -a 162.1.1.1 166.1.3.1

 traceroute to  166.1.3.1(166.1.3.1) 30 hops max,40 bytes packet

 1 166.1.5.2 11 ms  3 ms  4 ms

 2 206.1.4.2 13 ms  3 ms  4 ms

 3 196.2.2.1 13 ms  3 ms  6 ms

 4 196.2.3.3 11 ms  3 ms  4 ms

 5 206.1.6.1 12 ms  3 ms  4 ms

3.4.4  Verifying the MED Attribute Configuration

I. Trace the packet forwarding path when the default MED is used

<S400_0> tracert -a 166.1.3.1 162.1.1.1

 traceroute to  162.1.1.1(162.1.1.1) 30 hops max,40 bytes packet

 1 206.1.6.3 11 ms  3 ms  7 ms

 2 196.1.3.1 10 ms  3 ms  8 ms

 3 196.1.1.3 8 ms  3 ms  3 ms

 4 206.1.2.1 13 ms  4 ms  3 ms

 5 166.1.1.2 13 ms  4 ms  3 ms

<S400_0> tracert -a 166.1.3.1 162.1.3.1

 traceroute to  162.1.3.1(162.1.3.1) 30 hops max,40 bytes packet

 1 206.1.6.3 11 ms  3 ms  3 ms

 2 196.1.3.1 14 ms  4 ms  5 ms

 3 196.3.1.2 10 ms  8 ms  17 ms

 4 196.2.2.2 14 ms  3 ms  3 ms

 5 206.1.4.1 13 ms  3 ms  3 ms

 6 166.1.2.2 13 ms  3 ms  4 ms

II. Trace the packet forwarding path after the MED is modified

# Create AS path ACL 1 and permit the routes whose AS_PATH starts with 100 and ends with 200.

[S400] ip as-path-acl 1 permit ^100 200$

# Display the routes that match AS path ACL 1.

<S400> display bgp routing as-path-acl 1

 

Flags:   # - valid       ^ - active      I - internal

         D - damped      H - history     S - aggregate suppressed

    Dest/Mask        Next-Hop      Med   Local-pref   Origin      Path ----------------------------------------------------------------------

#^  162.1.1.0/24      196.1.3.1        100    100           INC       100 200

#   162.1.1.0/24      196.2.3.2        200    100           INC       100 200

#^  162.1.2.0/24      196.1.3.1        100    100           INC       100 200

#   162.1.2.0/24      196.2.3.2        200    100           INC       100 200

#^  166.1.1.0/24      196.1.3.1        0          100           INC       100 200

#   166.1.1.0/24      196.2.3.2        0          100           INC       100 200

#^  206.1.3.0         196.1.3.1        0      100           IGP       100 200

# Create AS path ACL 2 and permit the routes whose AS_PATH starts with 100 and ends with 300.

[S400] ip as-path-acl 2 permit ^100 300$

# Display the routes that match AS path ACL 2.

<S400> display bgp routing as-path-acl 2

 

Flags:   # - valid       ^ - active      I - internal

         D - damped      H - history     S - aggregate suppressed

    Dest/Mask         Next-Hop       Med       Local-pref   Origin     Path   ----------------------------------------------------------------------

#^  162.1.3.0/24     196.2.3.2      100       100            INC      100 300

#   162.1.3.0/24     196.1.3.1      200       100            INC      100 300

#^  162.1.4.0/24     196.2.3.2      100       100            INC      100 300

#   162.1.4.0/24     196.1.3.1      200       100            INC      100 300

#^  166.1.2.0/24     196.1.3.1      0         100            INC      100 300

#   166.1.2.0/24     196.2.3.2      0         100            INC      100 300

#^  166.1.5.0/24     196.1.3.1      0         100            INC      100 300

#   166.1.5.0/24     196.2.3.2      0         100            INC      100 300

#   206.1.3.0         196.2.3.2      0         100           IGP      100 300

<S400_0> tracert -a 166.1.3.1 162.1.1.1

 traceroute to  162.1.1.1(162.1.1.1) 30 hops max,40 bytes packet

 1 206.1.6.3 9 ms  4 ms  3 ms

 2 196.1.3.1 13 ms  4 ms  3 ms

 3 196.1.1.3 14 ms  4 ms  3 ms

 4 206.1.2.1 12 ms  3 ms  3 ms

 5 166.1.1.2 13 ms  4 ms  3 ms

<S400_0> tracert -a 166.1.3.1 162.1.3.1

 traceroute to  162.1.3.1(162.1.3.1) 30 hops max,40 bytes packet

 1 206.1.6.3 10 ms  4 ms  3 ms

 2 196.2.3.2 13 ms  3 ms  5 ms

 3 196.2.2.2 12 ms  5 ms  3 ms

 4 206.1.4.1 12 ms  4 ms  3 ms

 5 166.1.2.2 14 ms  3 ms  5 ms

3.5  Precautions

In the configuration and verification process, pay attention to the following points:

l           Disable the Fabric function before enabling BGP on Fabric-capable devices.

l           To achieve the configuration goal, you are recommended to set the BGP preference to 200. For devices with static routes configured, set a preference for the static routes as required.

l           On S300_A, the backup route (static route) cannot be switched to the primary RIP route automatically, so you need to delete the backup route manually and then add it again.

l           Since the routing policy is applied when BGP routes are redistributed into IGP, some route entries may not be redistributed, so you are recommended to use the tracert –a /ping –a command to verify the configuration in the source address mode.