HUAWEI S9300 V100R006C01 Terabit Routing Switch Configuration Guide
विज्ञापन
विज्ञापन
Quidway S9300 Terabit Routing Switch
V100R006C01
Configuration Guide - IP Routing
Issue
Date
01
2011-10-26
HUAWEI TECHNOLOGIES CO., LTD.
Copyright © Huawei Technologies Co., Ltd. 2011. All rights reserved.
No part of this document may be reproduced or transmitted in any form or by any means without prior written consent of Huawei Technologies Co., Ltd.
Trademarks and Permissions
and other Huawei trademarks are trademarks of Huawei Technologies Co., Ltd.
All other trademarks and trade names mentioned in this document are the property of their respective holders.
Notice
The purchased products, services and features are stipulated by the contract made between Huawei and the customer. All or part of the products, services and features described in this document may not be within the purchase scope or the usage scope. Unless otherwise specified in the contract, all statements, information, and recommendations in this document are provided "AS IS" without warranties, guarantees or representations of any kind, either express or implied.
The information in this document is subject to change without notice. Every effort has been made in the preparation of this document to ensure accuracy of the contents, but all statements, information, and recommendations in this document do not constitute the warranty of any kind, express or implied.
Huawei Technologies Co., Ltd.
Address: Huawei Industrial Base
Bantian, Longgang
Shenzhen 518129
People's Republic of China
Website:
Email: http://www.huawei.com
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
i
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing About This Document
About This Document
Intended Audience
This document provides the basic concepts, configuration procedures, and configuration examples in different application scenarios of the S9300, including static routes, routing protocols (RIP, RIPng, OSPF, OSPFv3, IS-IS, BGP, BGP4+, MBGP), and routing policies.
This document describes how to configure the IP routing features.
This document is intended for: l Data configuration engineers l Commissioning engineers l Network monitoring engineers l System maintenance engineers
Symbol Conventions
The symbols that may be found in this document are defined as follows.
Symbol
DANGER
Description
Indicates a hazard with a high level of risk, which if not avoided, will result in death or serious injury.
Indicates a hazard with a medium or low level of risk, which if not avoided, could result in minor or moderate injury.
WARNING
TIP
NOTE
CAUTION
Indicates a potentially hazardous situation, which if not avoided, could result in equipment damage, data loss, performance degradation, or unexpected results.
Indicates a tip that may help you solve a problem or save time.
Provides additional information to emphasize or supplement important points of the main text.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
ii
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing About This Document
Command Conventions
The command conventions that may be found in this document are defined as follows.
Convention
Boldface
Italic
[ ]
{ x | y | ... }
[ x | y | ... ]
{ x | y | ... }
*
[ x | y | ... ]
*
&<1-n>
#
Description
The keywords of a command line are in boldface.
Command arguments are in italics.
Items (keywords or arguments) in brackets [ ] are optional.
Optional items are grouped in braces and separated by vertical bars. One item is selected.
Optional items are grouped in brackets and separated by vertical bars. One item is selected or no item is selected.
Optional items are grouped in braces and separated by vertical bars. A minimum of one item or a maximum of all items can be selected.
Optional items are grouped in brackets and separated by vertical bars. Several items or no item can be selected.
The parameter before the & sign can be repeated 1 to n times.
A line starting with the # sign is comments.
Change History
Updates between document issues are cumulative. Therefore, the latest document issue contains all updates made in previous issues.
Changes in Issue 01 (2011-10-26)
Initial commercial release.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
iii
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing Contents
Contents
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
iv
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
Contents
Issue 01 (2011-10-26) v
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
Contents
Issue 01 (2011-10-26) vi
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing Contents
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
vii
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing Contents
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
viii
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
Contents
Issue 01 (2011-10-26) ix
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing Contents
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
x
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
Contents
Issue 01 (2011-10-26) xi
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing Contents
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
xii
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
Contents
Issue 01 (2011-10-26) xiii
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing Contents
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
xiv
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing Contents
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
xv
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
Contents
Issue 01 (2011-10-26) xvi
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing Contents
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
xvii
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
Contents
Issue 01 (2011-10-26) xviii
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing Contents
10.4.5 Configuring the Local Peer to Advertise Community Attribute and Extended Community Attribute
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
xix
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing Contents
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
xx
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 1 IP Routing Overview
1
IP Routing Overview
About This Chapter
IP routing is the basic element of data communication networks.
1.2 Configuring IP FRR on the Public Network
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
1
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 1 IP Routing Overview
1.1 Routing Management
To forward data, switches need to establish and refresh routing tables and forward packets according to routing tables.
1.1.1 Displaying of the Routing Table
Checking routing tables helps to know networks and locate faults.
Prerequisite
Checking information about routing tables helps fault location. The following lists common commands for displaying information about the routing table.
The display commands can be run in all views.
Procedure
l Run the display ip routing-table command to check brief information about current active routes.
l Run the display ip routing-table verbose command to check detailed information about the IP routing table.
l Run the display ip routing-table ip-address [ mask | mask-length ] [ longer-match ]
[ verbose ] command to check the routes to a specified destination address.
l
Run the display ip routing-table ip-address1 { mask1 | mask-length1 } ip-address2
{ mask2 | mask-length2 } [ verbose ] command to check the routes whose destination addresses are within a specified address range.
l Run the display ip routing-table acl { acl-number | acl-name } [ verbose ] command to check the routes filtered by a specified basic ACL.
l Run the display ip routing-table ip-prefix ip-prefix-name [ verbose ] command to check the routes filtered by a specified IP prefix list.
l
Run the display ip routing-table protocol protocol [ inactive | verbose ] command to check the routes discovered by a specified protocol.
l Run the display ip routing-table statistics command to check statistics about the IP routing table.
l Run the display ip routing-table vpn-instance vpn-instance-name command to check brief information about the VPN routing table.
l Run the display ip routing-table vpn-instance vpn-instance-name verbose command to check detailed information about the VPN routing table.
----End
1.1.2 Displaying of the Routing Management Module
By using the display commands of the routing management module, you can locate routing problems.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
2
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 1 IP Routing Overview
Context
Procedure
l Run the display rm interface [ interface-type interface-number ] command to check RM information of a specified interface.
l Run the display rm ipv6 interface [ interface-type interface-number ] command to check
IPv6 RM information of a specified interface.
l
Run the display rm interface vpn-instance vpn-instance-name command to check RM information of the private network interface.
----End
1.1.3 FRR Principle
FRR is a technique to allow the physical layer or data link layer to report a fault to the upper layer routing system and allow packets to be forwarded over a backup link if a fault occurs.
Context
You can use display commands of the routing management (RM) module to locate routing problems.
display commands can be run in all views.
On traditional IP networks, after a forwarding device such as the switch detects a fault on the lower layer link, it takes the system several seconds to complete route convergence (that is, to re-select an available route).
A second-level convergence may seriously affect the services that are extremely sensitive to packet loss and delay, leading to service interruption. In the case of the VoIP service, the maximum convergence time tolerable is about 50 ms when network interruption occurs.
Therefore, to prevent services from being seriously affected by faults on the link, the forwarding system must be able to fast detect and rectify faults, and to restore the affected services as soon as possible.
Fast Reroute (FRR) is applicable to the services that are very sensitive to packet loss and delay.
After FRR is configured, when a fault is detected at the lower layer (physical layer or link layer), the fault is reported to the upper layer routing system. Meanwhile, packets are forwarded over a backup link. In this manner, the impact of link faults on services is minimized.
According to the application scope, FRR is classified into IP FRR and VPN FRR. IP FRR can be further classified into IP FRR on the public network and VPN IP FRR.
l IP FRR on the public network: protects switches on the public network.
l VPN IP FRR: protects CE switches.
l
VPN FRR: protects PE switches.
For detailed introduction of FRR, see the Quidway S9300 Terabit Routing Switch Feature
Description- IP Route.
For detailed configuration of VPN IP FRR and VPN FRR, see the Quidway S9300 Terabit
Routing Switch Configuration Guide - VPN.
FRR can provide backup for direct routes, static routes, and dynamic routes (including RIP routes, OSPF routes, IS-IS routes, and BGP routes) of S9300s.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
3
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 1 IP Routing Overview
1.2 Configuring IP FRR on the Public Network
IP FRR on the public network is applicable to the services that are very sensitive to packet loss and delay on the public network.
1.2.1 Establishing the Configuration Task
Before configuring IP FRR on the public network, familiarize yourself with the applicable environment, complete the pre-configuration tasks, and obtain the data required for the configuration. This will help you complete the configuration task quickly and accurately.
Applicable Environment
IP FRR on the public network is applicable to the services that are very sensitive to packet loss and delay on the public network.
Pre-configuration Tasks
Before configuring IP FRR on the public network, complete the following tasks: l Configuring a static route or an IGP to ensure that nodes are reachable l Setting different costs to generate two routes
Data Preparation
To configure IP FRR on the public network, you need the following data.
No.
Data
1 Name of the route-policy and the number of the node
2 Outbound interface of the backup route
3 Next hop of the backup route
1.2.2 Configuring a Route-Policy
When configuring IP FRR on the public network, you can use a route-policy to correctly establish the backup relationship between routes.
Context
Do as follows on the switch to which IP FRR on the public network is applied:
Procedure
Step 1 Run:
system-view
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
4
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
1 IP Routing Overview
The system view is displayed.
Step 2 Run:
route-policy route-policy-name { permit | deny } node node
The node of the route-policy is created and the route-policy view is displayed.
Step 3 (Optional) Run:
if-match
The matching condition is set to filter the routes to be backed up.
You can use the if-match command according to the description in
(Optional) Configuring the If-Match Clause
.
If the matching condition is not set, IP FRR backs up outbound interfaces and next hops for all routes in the routing table. In this manner, certain routes that do not need to be backed up are also configured with backup information. Therefore, you need to correctly set the relationship between routes to be backed up and backup routes. Using the matching condition to specify the routes to be backed up is recommended.
Step 4 Run:
apply backup-interface interface-type interface-number
The backup outbound interface is specified.
Step 5 Run:
apply backup-nexthop ip-address
The backup next hop is specified.
TIP
l If a backup next hop is specified, a backup outbound interface also needs to be specified.
l If a backup outbound interface is specified on a P2P link, no backup next hop needs to be specified.
l If a backup outbound interface is specified on a non-P2P link, a backup next hop also needs to be specified.
----End
1.2.3 Enabling IP FRR on the Public Network
After IP FRR is configured on the public network, when the primary link fails, service traffic can be switched to the backup link immediately. This ensures the normal transmission of service traffic.
Context
Do as follows on the switch to which IP FRR on the public network is applied:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
ip frr route-policy route-policy-name
Issue 01 (2011-10-26) 5
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 1 IP Routing Overview
IP FRR is enabled.
Before applying IP FRR, use this command to enable IP FRR. In this manner, the route-policy used to specify backup outbound interfaces and backup next hops can take effect.
----End
1.2.4 Checking the Configuration
After IP FRR on the public network is configured, you can check backup information about routes.
Prerequisite
The configurations of IP FRR on the public network are complete.
Procedure
l Run the display route-policy [ route-policy-name ] command to check the route-policy.
l Run the display ip routing-table verbose command to check backup outbound interfaces and backup next hops in the routing table.
l Run the display ip routing-table ip-address [ mask | mask-length ] [ longer-match ]
verbose command to check the backup outbound interface and the backup next hop in the routing table.
l Run the display ip routing-table ip-address1 { mask1 | mask-length1 } ip-address2
{ mask2 | mask-length2 } verbose command to check the backup outbound interface and the backup next hop in the routing table.
----End
1.3 Configuration Example
IP routing configuration examples explain networking requirements, networking diagrams, configuration notes, configuration roadmap, and configuration procedures.
1.3.1 Example for Configuring IP FRR of the Public Network
Networking Requirements
, Router-B and Router-C are egress routers of the Internet. The switch
SwitchA is connected to the core switches SwitchB and SwitchC through two GE interfaces.
Each of SwitchB and SwitchC is connected to the egress routers through two GE interfaces.
Configure static routes on SwitchA to ensure that the packets destined for 192.168.1.1/24 pass through SwitchC and the packets destined for 100.55.1.1/24 pass through SwitchB. In addition, you need to configure a routing policy on SwitchB. When the link between SwitchB and Router-
B fails, the packets on SwitchA destined for 100.55.1.1/24 are forwarded to the outgoing interface through SwitchB and SwitchC.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
6
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Figure 1-1 Networking of IP FRR of the public network
1 IP Routing Overview
Internet
192.168.1.1/24
Router-C
100.55.1.1/24
Router-B
Switch
SwitchA
SwitchA
SwitchB
SwitchB
SwitchB
SwitchB
SwitchC
SwitchC
SwitchC
SwitchC
GE1/0/0
VLANIF30
SwitchC
GE1/0/1
VLANIF 40
GE1/0/3
VLANIF50
GE1/0/2
VALNIF70
GE1/0/0
VLANIF50
SwitchA
Interface
GigabitEthernet 1/0/0
GigabitEthernet 1/0/1
GigabitEthernet 1/0/0
GigabitEthernet 1/0/1
GigabitEthernet 1/0/2
GigabitEthernet 1/0/3
GigabitEthernet 1/0/0
GigabitEthernet 1/0/1
GigabitEthernet 1/0/2
GigabitEthernet 1/0/3
GE1/0/1
VLANIF 20
GE1/0/2
VLANIF70
GE1/0/0
VLANIF 10
SwitchB
GE1/0/3
VLANIF60
GE1/0/1
VLANIF60
VLANIF Interface
VLANIF 50
VLANIF 60
VLANIF 10
VLANIF 20
VLANIF 70
VLANIF 60
VLANIF 30
VLANIF 40
VLANIF 70
VLANIF 50
Configuration Roadmap
The configuration roadmap is as follows:
1.
Enable the basic OSPF functions on each Switch.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
IP Address
50.1.1.2/24
60.1.1.2/24
10.1.1.2/24
20.1.1.2/24
70.1.1.2/24
60.1.1.1/24
30.1.1.1/24
40.1.1.1/24
70.1.1.1/24
50.1.1.1/24
7
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
1 IP Routing Overview
2.
Configure static routes on SwitchA to ensure that the packets destined for 192.168.1.1/24 pass through SwitchC and the packets destined for 100.55.1.1/24 pass through SwitchB.
3.
Configure a routing policy on SwitchB, specify the backup next hop and backup outgoing interface, and enable IP FRR of the public network. Then view information about the backup outgoing interface and the backup next hop.
4.
Disconnect SwitchC from Router-C, SwitchB, and Router-B. View the route convergence time on SwitchB and SwitchC.
Data Preparation
To complete the configuration, you need the following data: l Allowed VLANs on each interface and VLANIF addresses, as shown in
l Name of the routing policy, backup next hop 70.1.1.1, and backup outgoing interface
VLANIF70
Procedure
Step 1 Create VLANs and add interfaces to the VLANs.
The routers and the Switches are connected through trunk interfaces, and the Switches are connected through hybrid interfaces.
Step 2 Assign an IP address to each VLANIF interface. The configuration procedure is not mentioned here.
Step 3 Configure OSPF on SwitchA, SwitchB, and SwitchC.
Configure OSPF to advertise the IP addresses of the VLANIF interfaces between the Switches and routers, and between the Switches. The configuration procedure is not mentioned here.
Step 4 Configure static routes on SwitchA.
Configure static routes on SwitchA to specify that the packets destined for 192.168.1.1/24 pass through SwitchC and the packets destined for 100.55.1.1/24 pass through SwitchB.
<SwitchA> system-view
[SwitchA] ip route-static 100.55.1.1 255.255.255.0 vlanif 60 60.1.1.1
[SwitchA] ip route-static 192.168.1.1 255.255.255.0 vlanif 50 50.1.1.1
Step 5 Configure a routing policy and enable IP FRR.
# Configure an IP prefix list.
<SwitchB> system-view
[SwitchB] ip ip-prefix ip_frr_pre index 10 permit 60.1.1.0 24
# Configure a routing policy on SwitchB and specify the backup next hop and backup outgoing interface.
<SwitchB> system-view
[SwitchB] route-policy ip_frr_rp permit node 10
[SwitchB-route-policy] if-match ip-prefix ip_frr_pre
[SwitchB-route-policy] apply backup-nexthop 70.1.1.1
[SwitchB-route-policy] apply backup-interface vlanif 70
# Enable IP FRR of the public network.
[SwitchB] ip frr route-policy ip_frr_rp
Step 6 View information about the backup outgoing interface and the backup next hop.
Issue 01 (2011-10-26) 8
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
1 IP Routing Overview
# View information about the backup next hop and backup outgoing interface on SwitchB.
<SwitchB> display ip routing-table verbose
Destination: 100.55.1.1
Protocol: OSPF Process ID: 1
Preference: 10 Cost: 2
NextHop: 10.10.10.1 Interface: Vlanif10
RelyNextHop: 0.0.0.0 Neighbour: 0.0.0.0
Label: NULL Tunnel ID: 0x0
SecTunnel ID: 0x0
BkNextHop: 70.1.1.1 BkInterface: Vlanif70
BkLabel: 0 Tunnel ID: 0x0
SecTunnel ID: 0x0
State: Active Adv Age: 01h16m46s
Tag: 0
Step 7 Verify the configuration.
Shut down GE 1/0/0 of SwitchB and SwitchC, and then view the route convergence time on
SwitchB and SwitchC. The route convergence time on SwitchB is 3 seconds, and that on
SwitchC is 7 seconds. That is, the route convergence time is shortened after IP FRR is configured on SwitchB.
# Run the display ip routing-table command on SwitchA to view the routing table. You can find that the cost of the routes to 100.55.1.0/24 and 192.168.1.0/24 is 4, and traffic is switched to the backup route.
[SwitchA] display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 8 Routes : 8
Destination/Mask Proto Pre Cost Flags NextHop Interface
10.1.1.0/24 ospf 10 2 D 60.1.1.1 Vlanif60
20.1.1.0/24 ospf 10 2 D 60.1.1.1 Vlanif60
30.1.1.0/24 ospf 10 2 D 50.1.1.1 Vlanif50
40.1.1.0/24 ospf 10 2 D 50.1.1.1 Vlanif50
50.1.1.0/24 Direct 0 0 D 50.1.1.1 Vlanif50
50.1.1.2/32 Direct 0 0 D 127.0.0.1 InLoopBack0
50.1.1.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
60.1.1.0/24 Direct 0 0 D 60.1.1.1 Vlanif60
60.1.1.2/32 Direct 0 0 D 127.0.0.1 InLoopBack0
60.1.1.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
70.1.1.0/24 ospf 10 2 D 50.1.1.1 Vlanif50
ospf 10 2 D 60.1.1.1 Vlanif60
100.55.1.0/24 ospf 10 4 D 60.1.1.1 Vlanif60
192.168.1.0/24 ospf 10 4 D 60.1.1.1 Vlanif60
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
127.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
----End
Configuration Files
l Configuration file of SwitchA
#
sysname SwitchA
#
vlan batch 50 60
# interface Vlanif50
ip address 50.1.1.2 255.255.255.0
Issue 01 (2011-10-26) 9
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
# interface Vlanif60
ip address 60.1.1.2 255.255.255.0
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 50
port hybrid untagged vlan 50
# interface GigabitEthernet1/0/1
port hybrid pvid vlan 60
port hybrid untagged vlan 60
# ospf 1
area 0.0.0.0
network 50.1.1.0 0.0.0.255
network 60.1.1.0 0.0.0.255
# return l Configuration file of SwitchB
#
sysname SwitchB
#
vlan batch 10 20 60 70
#
ip frr route-policy ip_frr_rp
# interface Vlanif10
ip address 10.1.1.2 255.255.255.0
# interface Vlanif20
ip address 20.1.1.2 255.255.255.0
# interface Vlanif60
ip address 60.1.1.1 255.255.255.0
# interface Vlanif70
ip address 70.1.1.2 255.255.255.0
# interface GigabitEthernet1/0/0
port link-type trunk
port trunk allow-pass vlan 10
# interface GigabitEthernet1/0/1
port link-type trunk
port trunk allow-pass vlan 20
# interface GigabitEthernet1/0/2
port hybrid pvid vlan 70
port hybrid untagged vlan 70
# interface GigabitEthernet1/0/3
port hybrid pvid vlan 60
port hybrid untagged vlan 60
# ospf 1
area 0.0.0.0
network 10.1.1.0 0.0.0.255
network 20.1.1.0 0.0.0.255
network 60.1.1.0 0.0.0.255
network 70.1.1.0 0.0.0.255
# route-policy ip_frr_rp permit node 10
if-match ip-prefix ip_frr_pre
apply backup-nexthop 70.1.1.1
apply backup-interface Vlanif 70
# return l Configuration file of SwitchC
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
1 IP Routing Overview
10
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
#
sysname SwitchC
#
vlan batch 30 40 50 70
# interface Vlanif30
ip address 30.1.1.1 255.255.255.0
# interface Vlanif40
ip address 40.1.1.1 255.255.255.0
# interface Vlanif50
ip address 50.1.1.1 255.255.255.0
# interface Vlanif70
ip address 70.1.1.1 255.255.255.0
# interface GigabitEthernet1/0/0
port link-type trunk
port trunk allow-pass vlan 30
# interface GigabitEthernet1/0/1
port link-type trunk
port trunk allow-pass vlan 40
# interface GigabitEthernet1/0/2
port hybrid pvid vlan 70
port hybrid untagged vlan 70
# interface GigabitEthernet1/0/3
port hybrid pvid vlan 50
port hybrid untagged vlan 50
# ospf 1
area 0.0.0.0
network 30.1.1.0 0.0.0.255
network 40.1.1.0 0.0.0.255
network 50.1.1.0 0.0.0.255
network 70.1.1.0 0.0.0.255
# return
1 IP Routing Overview
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
11
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 2 IP Static Route Configuration
2
IP Static Route Configuration
About This Chapter
Static routes are applicable to simple networks. Properly configuring and using static routes improve the network performance and help ensure bandwidth for important services.
Static routes are a special type of routes that need to be manually configured.
2.2 Static Routing Features Supported by the S9300
2.3 Configuring an IPv4 Static Route
On an IPv4 network, you can accurately control route selection by configuring IPv4 static routes.
2.4 Configuring an IPv6 Static Route
On an IPv6 network, you can accurately control route selection by configuring IPv6 static routes.
2.5 Configuring BFD for IPv4 Static Routes on the Public Network
This section provides configuration examples of static routes and BFD for static routes.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
12
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 2 IP Static Route Configuration
2.1 Static Route
Static routes are a special type of routes that need to be manually configured.
On a simple network, you only need to configure static routes so that the network can run properly. Properly using static routes improves the network performance and provides the guaranteed bandwidth for important applications.
The disadvantage of static routes is that if a fault occurs on the network or the network topology changes, static routes cannot automatically change and must be changed manually by the administrator.
2.2 Static Routing Features Supported by the S9300
The system supports various static routes, including IPv4 static routes, IPv6 static routes, default routes, BFD for IPv4 static routes.
IPv4 Static Route
IPv4 static routes need to be manually configured by the administrator. IPv4 static routes are applicable to simple IPv4 networks.
If the destination address of an IPv4 static route is 0.0.0.0 with the mask length being 0, this
IPv4 static route is an IPv4 default route.
If the destination address of an IPv4 packet fails to match any entry in the routing table, the switch uses the IPv4 default route to forward the IPv4 packet.
The S9300 supports ordinary static routes and the static routes associated with Virtual Private
Network (VPN) instances. The static routes associated with VPN instances are used to manage
VPN routes . For details of VPN instances, see the Quidway S9300 Terabit Routing Switch
Feature Description - VPN.
IPv6 Static Route
Similar to IPv4 static routes, IPv6 static routes need to be manually configured by the administrator. IPv6 static routes are applicable to simple IPv6 networks.
If the destination address of an IPv6 static route is ::/0 with the mask length being 0, this IPv6 static route is an IPv6 default route.
If the destination address of an IPv6 packet fails to match any entry in the routing table, the switch uses the IPv6 default route to forward the IPv6 packet.
NOTE
The main differences between IPv6 static routes and IPv4 static routes are their destination addresses and next-hop addresses. The next-hop address of an IPv6 static route is an IPv6 address, whereas the next-hop address of an IPv4 static route is an IPv4 address.
Default Route
Default routes are a special type of routes. Generally, administrators can manually configure default routes. Default routes can also be generated by dynamic routing protocols such as Open
Shortest Path First (OSPF) or Intermediate System-to-Intermediate System (IS-IS).
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
13
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 2 IP Static Route Configuration
Default routes are used only when packets to be forwarded fail to match any entry in the routing table. In the routing table, the destination address and subnet mask of a default route are both
0.0.0.0. You can run the display ip routing-table command to check whether the default route is configured.
If the destination address of a packet does not match any entry in the routing table, the switch uses the default route to forward this packet. If no default route exists and the destination address of the packet does not match any entry in the routing table, the packet is discarded. An Internet
Control Message Protocol (ICMP) packet is then sent back to the originating host, informing that the destination host or network is unreachable.
BFD for IPv4 Static Route
Unlike dynamic routing, static routing does not have a detection mechanism. If a fault occurs on the network, administrator involvement is required. Bidirectional Forwarding Detection
(BFD) for IPv4 static route is used to bind BFD sessions to IPv4 static routes on the public network. The BFD sessions are used to detect the link status of a static route.
After BFD for IPv4 static route is configured, each static route can be bound to a BFD session.
l When the BFD session on the link of a static route detects that the link changes from Up to Down, BFD reports the fault to the routing management (RM), and then the RM sets the route to inactive. Subsequently, the route becomes unavailable and is deleted from the routing table.
l When a BFD session is established on the link of a static route (the link changes from Down to Up), BFD reports the success to the RM, and then the RM sets the route to active.
Subsequently, the route becomes available and is added to the IP routing table.
2.3 Configuring an IPv4 Static Route
On an IPv4 network, you can accurately control route selection by configuring IPv4 static routes.
2.3.1 Establishing the Configuration Task
Before configuring an IPv4 static route, familiarize yourself with the applicable environment, complete the pre-configuration tasks, and obtain the data required for the configuration. This will help you complete the configuration task quickly and accurately.
Applicable Environment
When configuring an IPv4 static route, note the following: l
Destination address and mask
In the ip route-static command, the IPv4 destination address is in dotted decimal notation, and the mask can be either expressed in dotted decimal notation or replaced by the mask length (namely, the number of consecutive 1s in the mask).
l Outbound interface and next-hop address
When configuring a static route, you can specify either interface-type interface-number or
nexthop-address according to the actual situation.
In practice, every routing entry requires a next-hop address. When sending a packet, the switch first searches for the matched route in the routing table according to the destination address.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
14
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 2 IP Static Route Configuration
In some cases, for example, the link layer is encapsulated with PPP, you can also specify outbound interfaces when configuring the switch even if the remote address is not known.
In this manner, it is unnecessary to modify the switch configuration when the remote address changes.
l Other attributes
Setting different preferences for static routes helps flexibly apply routing policies. For example, when configuring multiple routes to the same destination address, you can set the same preference for these routes to implement load balancing. You can also set different preferences to implement routing redundancy.
When the ip route-static command is run to configure a static route, if the destination address and the mask are set to all 0s (0.0.0.0 0.0.0.0), it indicates that a default route is configured.
Pre-configuration Tasks
Before configuring an IPv4 static route, complete the following task: l Configuring link layer protocol parameters and IP addresses for interfaces to ensure that the link layer protocol status of the interfaces is Up
Data Preparation
To configure an IPv4 static route, you need the following data.
2
3
No.
Data
1 Destination address and mask
Outbound interface or next-hop IPv4 address
Preference of the IPv4 static route
2.3.2 Configuring an IPv4 Static Route
When configuring an IPv4 static route, you need to correctly configure its destination address, outbound interface, and next hop.
Context
Do as follows on the switch to be configured with static route:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
ip route-static ip-address { mask | mask-length } { nexthop-address | interface-
type interface-number [ nexthop-address ] | vpn-instance vpn-instance-name nexthop-
address } [ preference preference | tag tag ]
*
[ description text ]
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
15
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 2 IP Static Route Configuration
An IPv4 static route is configured.
By default, no IPv4 static route is configured.
NOTE
If you configure the next hop as the outbound interface, you must specify the next hop address.
----End
2.3.3 (Optional) Setting the Default Preference for IPv4 Static
Routes
Setting the default preference for IPv4 static routes can affect route selection.
Context
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
ip route-static default-preference preference
The default preference is set for static routes.
By default, the preference of static routes is 60.
When a static route is configured, the default preference is used if no preference is explicitly specified for the static route. After a default preference is specified, the new default preference is valid for subsequent rather than existing IPv4 static routes.
----End
2.3.4 (Optional) Configuring Static Route Selection Based on Relay
Depth
After static route selection based on relay depths is configured, the static route module selects the static route with the smallest relay depth as the active route and delivers it to the FIB table.
The other routes become inactive.
Context
Do as follows on the switches that need to be configured with static routes and change the default priority for static routes:
After static routes are configured, multiple static routes with the same prefix and preference but different relay depths exist. After static route selection based on relay depths is configured, the static route module selects the route with the smallest relay depth as the active route and delivers it to the Forwarding Information Base (FIB) table. The other routes become inactive.
Do as follows on the switch to be configured with static routes:
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
16
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 2 IP Static Route Configuration
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
ip route-static selection-rule relay-depth
Static route selection based on relay depths is configured.
By default, static routes are not selected according to relay depths.
----End
2.3.5 Checking the Configuration
After an IPv4 static route is configured, you can check detailed information about the configured
IPv4 static route.
Prerequisite
The configurations of an IPv4 static route are complete.
Procedure
l Run the display ip routing-table command to check brief information about the IPv4 routing table.
l Run the display ip routing-table verbose command to check detailed information about the IPv4 routing table.
----End
2.4 Configuring an IPv6 Static Route
On an IPv6 network, you can accurately control route selection by configuring IPv6 static routes.
2.4.1 Establishing the Configuration Task
Before configuring an IPv6 static route, familiarize yourself with the applicable environment, complete the pre-configuration tasks, and obtain the data required for the configuration. This will help you complete the configuration task quickly and accurately.
Applicable Environment
On a small IPv6 network, you can implement network interconnection by configuring IPv6 static routes. Compared with using dynamic routes, using static routes saves the bandwidth.
Pre-configuration Tasks
Before configuring an IPv6 static route, complete the following task: l Configuring link layer protocol parameters and IP addresses for interfaces to ensure that the link layer protocol status of the interfaces is Up
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
17
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 2 IP Static Route Configuration
Data Preparation
To configure an IPv6 static route, you need the following data.
2
3
No.
Data
1 Destination address and mask
Outbound interface or next-hop IPv6 address
Preference of the IPv6 static route
2.4.2 Configuring an IPv6 Static Route
When configuring an IPv6 static route, you need to correctly configure its destination address, outbound interface, and next hop.
Context
Do as follows on the switch to be configured with static routes:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
ipv6 route-static dest-ipv6-address prefix-length { interface-type interface-
number nexthop-ipv6-address| nexthop-ipv6-address } [ preference preference | tag
tag ]
*
[ description text ]
An IPv6 static route is configured.
When configuring a static route, you need to specify either the outbound interface or the nexthop address according to the actual situation. If the outbound interface is a non-P2P interface, you must also specify the next-hop address in addition to specifying the outbound interface.
If preference is not specified, the default preference is 60.
By default, no IPv6 static route is configured.
----End
2.4.3 (Optional) Setting the Default Preference for IPv6 Static
Routes
By setting the default preference for an IPv6 static route, you can change the preference of the static route.
Context
Do as follows on the switch that need to be configured with IPv6 static routes and change the default priority for IPv6 static routes:
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
18
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 2 IP Static Route Configuration
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
ipv6 route-static default-preference preference
The default preference of IPv6 static routes is set.
By default, the preference of IPv6 static routes is 60.
When an IPv6 static route is configured, the default preference is used if the preference of the static route is not explicitly specified. After the default preference is specified, the default preference is valid for subsequent rather than existing IPv6 static routes.
----End
2.4.4 Checking the Configuration
After an IPv6 static route is configured, you can check detailed information about the configured route.
Prerequisite
The configurations of an IPv6 static route are complete.
Procedure
l Run the display ipv6 routing-table command to check brief information about the IPv6 routing table.
l Run the display ipv6 routing-table verbose command to check detailed information about the IPv6 routing table.
----End
2.5 Configuring BFD for IPv4 Static Routes on the Public
Network
On an IPv4 network, configuring BFD for IPv4 static routes on the public network can speed up route convergence and improve network reliability.
2.5.1 Establishing the Configuration Task
Before configuring BFD for static routes, familiarize yourself with the applicable environment, complete the pre-configuration tasks, and obtain the data required for the configuration. This will help you complete the configuration task quickly and accurately.
Applicable Environment
BFD can rapidly detect IPv4 forwarding failures, ensuring QoS for voice, video, and other videoon-demand (VoD) services on an IPv4 network. With BFD, service providers can provide voice over IP (VoIP) and other real-time services with high availability and scalability.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
19
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 2 IP Static Route Configuration
By binding IPv4 static routes to BFD sessions, you can use BFD sessions to provide link detection for IPv4 static routes on the public network. A static route can be bound to a BFD session.
Pre-configuration Tasks
Before configuring BFD for IPv4 static routes on the public network, complete the following task: l Configuring link layer protocol parameters and IP addresses for interfaces to ensure that the link layer protocol status of the interfaces is Up
Data Preparation
To configure BFD for IPv4 static routes on the public network, you need the following data.
2
3
No.
Data
1 Destination address and mask
4
Outbound interface or next-hop IPv4 address
IP address of the peer detected by BFD
Local discriminator and remote discriminator of a BFD session
2.5.2 Configuring an IPv4 Static Route
When configuring an IPv4 static route, you need to correctly configure its destination address, outbound interface, and next hop.
Context
Do as follows on the switch to be configured with static route:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
ip route-static ip-address { mask | mask-length } { nexthop-address | interface-
type interface-number [ nexthop-address ] | vpn-instance vpn-instance-name nexthop-
address } [ preference preference | tag tag ]
*
[ description text ]
An IPv4 static route is configured.
By default, no IPv4 static route is configured.
NOTE
If you configure the next hop as the outbound interface, you must specify the next hop address.
----End
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
20
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 2 IP Static Route Configuration
2.5.3 Configuring a BFD Session
BFD sessions are used to rapidly detect and monitor the connectivity of links on a network.
Background
See the Quidway S9300 Terabit Routing Switch Configuration Guide - Reliability.
2.5.4 Binding a Static Route to a BFD Session
When binding a static route to a BFD session, ensure that the static route resides on the same link as the BFD session.
Context
Do as follows on the switch to bind a static route to a BFD session:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
ip route-static ip-address { mask | mask-length } { nexthop-address | interface-
type interface-number [ nexthop-address ] } [ preference preference | tag tag ]
*
track bfd-session cfg-name [ description text ]
A BFD session is bound to the IPv4 static route on the public network.
NOTE
When binding a static route to a BFD session, ensure that the static route resides on the same link as the
BFD session.
----End
2.5.5 Checking the Configuration
After BFD for static route is configured, you can check BFD session information and information about BFD for static route.
Prerequisite
The configurations of BFD for IPv4 static routes are complete.
Procedure
l Run the display bfd session { all | discriminator discr-value } [ verbose ] command to check BFD session information.
l Run the display current-configuration | include bfd command to check the configuration of BFD for static routes.
You can check information about a BFD session only after parameters of the BFD session are set and the BFD session is established.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
21
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 2 IP Static Route Configuration
If BFD session negotiation succeeds, you can view that the status of the BFD session is
Up. You can also view that the BFD session is bound to the static route by running the
display current-configuration | include bfd command in the system view.
----End
2.6 Configuration Examples
This section provides configuration examples of static routes and BFD for static routes.
2.6.1 Example for Configuring Static Routes
Networking Requirements
Hosts in different network segments are connected through several Switches. You are required to configure static routes enable each two hosts in different network segments to communicate with each other.
Figure 2-1 Networking diagram for configuring static routes
PC2
1.1.2.2/24
Issue 01 (2011-10-26)
GE1/0/3
GE1/0/1
SwitchB
GE1/0/2
SwitchA
GE1/0/1
GE1/0/1
GE1/0/2
GE1/0/2
SwitchC
Switch
Switch A
Switch A
Switch B
Switch B
Switch B
Switch C
Switch C
PC1
1.1.1.2/24
PC3
1.1.3.2/24
Interface
GigabitEthernet1/0/1
GigabitEthernet1/0/2
GigabitEthernet1/0/1
GigabitEthernet1/0/2
GigabitEthernet1/0/3
GigabitEthernet1/0/1
GigabitEthernet1/0/1
VLANIF interface
VLANIF 10
VLANIF 30
VLANIF 10
VLANIF 20
VLANIF 40
VLANIF 20
VLANIF 50
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
IP address
1.1.4.1/30
1.1.1.1/24
1.1.4.2/30
1.1.4.5/30
1.1.2.1/24
1.1.4.6/30
1.1.3.1/24
22
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 2 IP Static Route Configuration
Configuration Roadmap
The configuration roadmap is as follows:
1.
Create VLANs and add corresponding interfaces to the VLANs.
2.
Assign an IP address to each VLANIF interface.
3.
Configure a default IP gateway on each host.
4.
Configure static routes and default routes on the Switches.
Data Preparation
To complete the configuration, you need the following data: l
IDs of the VLANs that the interfaces belong to, as shown in
l
VLANIF interfaces and the IP addresses of the hosts, as shown in
l Default route of Switch A, whose next hop address is 1.1.4.2
l Static route of Switch B, whose destination address is 1.1.1.0, and the next hop address is
1.1.4.1
l Static route of Switch B, whose destination address is 1.1.3.0, and the next hop address is
1.1.4.6
l Default route of Switch C, whose next hop address is 1.1.4.5
Procedure
Step 1 Configure VLANs that interfaces belong to.
<Quidway>system-view
[Quidway] sysname SwitchA
[SwitchA] vlan 10
[SwitchA-vlan10] quit
[SwitchA] vlan 30
[SwitchA-vlan30] quit
[SwitchA] interface gigabitethernet 1/0/1
[SwitchA-GigabitEthernet1/0/1] port hybrid pvid vlan 10
[SwitchA-GigabitEthernet1/0/1] port hybrid untagged vlan 10
[SwitchA-GigabitEthernet1/0/1] quit
[SwitchA] interface gigabitethernet 1/0/2
[SwitchA-GigabitEthernet1/0/1] port hybrid pvid vlan 30
[SwitchA-GigabitEthernet1/0/1] hybrid untagged vlan 30
[SwitchA-GigabitEthernet1/0/1] quit
The configurations of Switch B and Switch C are similar to the configuration of Switch A, and are not mentioned here.
Step 2 Assign an IP address to each VLANIF interface.
[SwitchA] interface vlanif 10
[SwitchA-Vlanif10] ip address 1.1.4.1 30
[SwitchA-Vlanif10] quit
[SwitchA] interface vlanif 30
[SwitchA-Vlanif30] ip address 1.1.1.1 24
[SwitchA-Vlanif30] quit
The configurations of Switch B and Switch C are similar to the configuration of Switch A, and are not mentioned here.
Step 3 Configure the hosts.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
23
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 2 IP Static Route Configuration
Configure the default gateway addresses of PC1, PC2, and PC3 to 1.1.1.1, 1.1.2.1, and 1.1.3.1
respectively.
Step 4 Configure static routes.
# Configure a default route on Switch A.
<SwitchA> system-view
[SwitchA] ip route-static 0.0.0.0 0.0.0.0 1.1.4.2
# Configure two static routes on Switch B.
<SwitchB> system-view
[SwitchB] ip route-static 1.1.1.0 255.255.255.0 1.1.4.1
[SwitchB] ip route-static 1.1.3.0 255.255.255.0 1.1.4.6
# Configure a default route on Switch C.
<SwitchC> system-view
[SwitchC] ip route-static 0.0.0.0 0.0.0.0 1.1.4.5
Step 5 Verify the configuration.
# Check the routing table of Switch A.
[SwitchA] display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 8 Routes : 8
Destination/Mask Proto Pre Cost Flags NextHop Interface
0.0.0.0/0 Static 60 0 RD 1.1.4.2 Vlanif10
1.1.1.0/24 Direct 0 0 D 1.1.1.1 Vlanif30
1.1.1.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
1.1.4.0/30 Direct 0 0 D 1.1.4.1 Vlanif10
1.1.4.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
1.1.4.2/32 Direct 0 0 D 1.1.4.2 Vlanif10
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
# Run the ping command to verify the connectivity.
[Switch A] ping 1.1.3.1
PING 1.1.3.1: 56 data bytes, press CTRL_C to break
Reply from 1.1.3.1: bytes=56 Sequence=1 ttl=254 time=62 ms
Reply from 1.1.3.1: bytes=56 Sequence=2 ttl=254 time=63 ms
Reply from 1.1.3.1: bytes=56 Sequence=3 ttl=254 time=63 ms
Reply from 1.1.3.1: bytes=56 Sequence=4 ttl=254 time=62 ms
Reply from 1.1.3.1: bytes=56 Sequence=5 ttl=254 time=62 ms
--- 1.1.3.1 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 62/62/63 ms
# Run the tracert command to verify the connectivity.
[Switch A]tracert 1.1.3.1
traceroute to 1.1.3.1(1.1.3.1) 30 hops max,40 bytes packet
1 1.1.4.2 31 ms 32 ms 31 ms
2 1.1.4.6 62 ms 63 ms 62 ms
----End
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
24
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Configuration Files
l
Configuration file of Switch A
# sysname Switch A
#
vlan batch 10 30
# interface Vlanif10
ip address 1.1.4.1 255.255.255.252
# interface Vlanif30
ip address 1.1.1.1 255.255.255.0
# interface GigabitEthernet1/0/1
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# interface GigabitEthernet1/0/2
port link-type access
port default vlan 30
# ip route-static 0.0.0.0 0.0.0.0 1.1.4.2
# return l Configuration file of Switch B
# sysname Switch B
#
vlan batch 10 20 40
# interface Vlanif10
ip address 1.1.4.2 255.255.255.252
# interface Vlanif20
ip address 1.1.4.5 255.255.255.252
# interface Vlanif40
ip address 1.1.2.1 255.255.255.0
# interface GigabitEthernet1/0/1
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# interface GigabitEthernet1/0/2
port hybrid pvid vlan 20
port hybrid untagged vlan 20
# interface GigabitEthernet1/0/3
port hybrid pvid vlan 40
port hybrid untagged vlan 40
# ip route-static 1.1.1.0 255.255.255.0 1.1.4.1
ip route-static 1.1.3.0 255.255.255.0 1.1.4.6
# return l Configuration file of Switch C
#
sysname Switch C
#
vlan batch 20 50
# interface Vlanif20
ip address 1.1.4.6 255.255.255.252
# interface Vlanif40
ip address 1.1.3.1 255.255.255.0
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
2 IP Static Route Configuration
25
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 2 IP Static Route Configuration
# interface GigabitEthernet1/0/1
port hybrid pvid vlan 20
port hybrid untagged vlan 20
# interface GigabitEthernet1/0/2
port hybrid pvid vlan 50
port hybrid untagged vlan 50
# ip route-static 0.0.0.0 0.0.0.0 1.1.4.5
# return
2.6.2 Example for Configuring IPv6 Static Routes
Networking Requirements
, the prefix length of all the IPv6 addresses is 64 bits. You need to
configure IPv6 static routes between the Switches to ensure that all the PCs and Switches can communicate with each other. The VLANIF interfaces connecting the Switches to PCs need to be configured with IPv6 global unicast addresses. The VLANIF interfaces connecting the
Switches need to be configured with IPv6 link-local addresses.
Figure 2-2 Networking diagram for configuring IPv6 static routes
PC2
2::2/64
GE3/0/0
VLANIF30
2::1/64
VLANIF20
FE80::218:20FF:FE00:80
GE1/0/0
VLANIF40
FE80::218:20FF:FE00:83
GE2/0/0
SwitchA
GE2/0/0
SwitchB
GE1/0/0
VLANIF20
FE80::218:20FF:FE00:81
GE1/0/0
FE80::218:20FF:FE00:82
VLANIF40
SwitchC
VLANIF10
1::1/64
GE2/0/0
VLANIF50
3::1/64
PC1
PC3
1::2/64
3::2/64
Device name
Switch A
Switch A
Switch B
Switch B
Switch B
Switch C
Switch C
Interface
GE2/0/0
GE1/0/0
GE1/0/0
GE2/0/0
GE3/0/0
GE1/0/0
GE2/0/0
VLANIF interface
VLANIF 10
VLANIF 20
VLANIF 20
VLANIF 40
VLANIF 30
VLANIF 40
VLANIF 50
IP address
1::1/64
Generated automatically
Generated automatically
Generated automatically
2::1/64
Generated automatically
3::1/64
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
26
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
2 IP Static Route Configuration
Configuration Roadmap
The configuration roadmap is as follows:
1.
Configure the VLAN that each interface belongs to.
2.
Assign IPv6 addresses to the VLANIF interfaces on the Switches so that the devices on the network can communicate with each other.
3.
Configure an IPv6 static route to the destination address and the default route on each
Switch.
4.
Configure the IPv6 default gateway on each PC so that any two PCs can communicate with each other.
Data Preparation
To complete the configuration, you need the following data: l
IDs of the VLANs that the interfaces belong to, as shown in
l Default route of Switch A with the outgoing interface being VLANIF 20 l Static route of Switch B with the destination address being 1:: 64 and outgoing interface being VLANIF 20 l Static route of Switch B with the destination address being 3:: 64 and outgoing interface being VLANIF 40 l Default route of Switch C with the outgoing interface being VLANIF 40 l Default gateway address (1::1) of PC1, default gateway address (2::1) of PC2, and default gateway address (3::1) of PC3
Procedure
Step 1 Add interfaces to VLANs.
<Quidway> system-view
[Quidway] sysname SwitchA
[SwitchA] vlan 10
[SwitchA-vlan10] quit
[SwitchA] interface gigabitethernet 2/0/0
[SwitchA-GigabitEthernet2/0/0] port hybrid pvid vlan 10
[SwitchA-GigabitEthernet2/0/0] port hybrid untagged vlan 10
[SwitchA-GigabitEthernet2/0/0] quit
[SwitchA] vlan 20
[SwitchA-vlan20] quit
[SwitchA] interface gigabitethernet 1/0/0
[SwitchA-GigabitEthernet1/0/0] port hybrid pvid vlan 20
[SwitchA-GigabitEthernet1/0/0] port hybrid untagged vlan 20
[SwitchA-GigabitEthernet1/0/0] quit
The configurations of Switch B and Switch C are similar to the configuration of Switch A and are not mentioned here.
Step 2 Assign IP addresses to the VLANIF interfaces.
[SwitchA] ipv6
[SwitchA] interface vlanif 10
[SwitchA-Vlanif10] ipv6 enable
[SwitchA-Vlanif10] ipv6 address 1::1/64
[SwitchA-Vlanif10] quit
[SwitchA] interface vlanif 20
[SwitchA-Vlanif20] ipv6 enable
[SwitchA-Vlanif20] ipv6 address auto link-local
[SwitchA-Vlanif20] quit
Issue 01 (2011-10-26) 27
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
2 IP Static Route Configuration
The configurations of Switch B and Switch C are similar to the configuration of Switch A and are not mentioned here.
Step 3 Configure the PCs.
Configure the default gateway addresses of PC1, PC2, and PC3 to 1.1.1.1, 1.1.2.1, and 1.1.3.1
respectively.
Step 4 Configure IPv6 static routes.
# Configure a default IPv6 route on Switch A.
[Switch A] ipv6 route-static :: 0 vlanif20 FE80::218:20FF:FE00:80
# Configure two IPv6 static routes on Switch B.
[Switch B] ipv6 route-static 1:: 64 vlanif20 FE80::218:20FF:FE00:81
[Switch B] ipv6 route-static 3:: 64 vlanif40 FE80::218:20FF:FE00:82
# Configure a default IPv6 route on Switch C.
[Switch C] ipv6 route-static :: 0 vlanif40 FE80::218:20FF:FE00:83
Step 5 Configure the addresses and the gateway addresses on the PCs.
Assign the IPv6 addresses to the PCs according to the networking diagram. Set the default gateway address on PC1 to 1::1, the default gateway address on PC2 to 2::1, and the default gateway address on PC3 to 3::1.
Step 6 Verify the configuration.
# Check the IPv6 routing table of Switch A.
[Switch A] display ipv6 routing-table
Routing Table :
Destinations : 5 Routes : 5
Destination : :: PrefixLength : 0
NextHop : FE80::218:20FF:FE00:80 Preference : 60
Interface : Vlanif20 Protocol : Static
State : Active Adv Cost : 0
Tunnel ID : 0x0 Label : NULL
Age : 685270sec
Destination : ::1 PrefixLength : 128
NextHop : ::1 Preference : 0
Interface : InLoopBack0 Protocol : Direct
State : Active NoAdv Cost : 0
Tunnel ID : 0x0 Label : NULL
Age : 523sec
Destination : 1:: PrefixLength : 64
NextHop : 1::1 Preference : 0
Interface : Vlanif10 Protocol : Direct
State : Active Adv Cost : 0
Tunnel ID : 0x0 Label : NULL
Age : 523sec
Destination : 1::1 PrefixLength : 128
NextHop : ::1 Preference : 0
Interface : InLoopBack0 Protocol : Direct
State : Active NoAdv Cost : 0
Tunnel ID : 0x0 Label : NULL
Age : 357sec
Destination : FE80:: PrefixLength : 10
NextHop : :: Preference : 0
Interface : NULL0 Protocol : Direct
Issue 01 (2011-10-26) 28
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
2 IP Static Route Configuration
State : Active NoAdv Cost : 0
Tunnel ID : 0x0 Label : NULL
Age : 407sec
# Run the ping command to verify the configuration.
[Switch A] ping ipv6 3::1
PING 3::1 : 56 data bytes, press CTRL_C to break
Reply from 3::1
bytes=56 Sequence=1 hop limit=254 time = 63 ms
Reply from 3::1
bytes=56 Sequence=2 hop limit=254 time = 62 ms
Reply from 3::1
bytes=56 Sequence=3 hop limit=254 time = 62 ms
Reply from 3::1
bytes=56 Sequence=4 hop limit=254 time = 63 ms
Reply from 3::1
bytes=56 Sequence=5 hop limit=254 time = 63 ms
--- 3::1 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 62/62/63 ms
# Run the tracert command to verify the configuration.
[Switch A] tracert ipv6 3::1
traceroute to 3::1 30 hops max,60 bytes packet
1 2::1 31 ms 32 ms 31 ms
2 3::1 62 ms 63 ms 62 ms
----End
Configuration Files
l Configuration file of Switch A
#
sysname Switch A
#
ipv6
#
vlan batch 10 20
# interface Vlanif10
ipv6 enable
ipv6 address 1::1/64
# interface Vlanif20
ipv6 enable
ipv6 address auto link-local
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 20
port hybrid untagged vlan 20
# interface GigabitEthernet2/0/0
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# ipv6 route-static :: 0 vlanif20
# return l Configuration file of Switch B
#
sysname Switch B
#
29
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 2 IP Static Route Configuration
ipv6
#
vlan batch 20 30 40
# interface Vlanif20
ipv6 enable
ipv6 address auto link-local
# interface Vlanif30
ipv6 enable
ipv6 address 2::1/64
# interface Vlanif40
ipv6 enable
ipv6 address auto link-local
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 20
port hybrid untagged vlan 20
# interface GigabitEthernet2/0/0
port hybrid pvid vlan 40
port hybrid untagged vlan 40
# interface GigabitEthernet3/0/0
port hybrid pvid vlan 30
port hybrid untagged vlan 30
# ipv6 route-static 1:: 64 Vlanif20 ipv6 route-static 3:: 64 Vlanif40
# return l Configuration file of Switch C
#
sysname Switch C
#
ipv6
#
vlan batch 40 50
# interface Vlanif40
ipv6 enable
ipv6 address auto link-local
# interface Vlanif50
ipv6 enable
ipv6 address 3::1/64
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 40
port hybrid untagged vlan 40
# interface GigabitEthernet2/0/0
port hybrid pvid vlan 50
port hybrid untagged vlan 50
# ipv6 route-static :: 0 Vlanif40
# return
2.6.3 Example for Configuring BFD for IPv4 Static Routes
Networking Requirements
, Switch A is connected to the network management system (NMS)
through Switch B. You need to configure static routes on Switch A so that Switch A can
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
30
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 2 IP Static Route Configuration communicate with the NMS. In addition, configure a BFD session between Switch A and Switch
B to detect link failure.
Figure 2-3 Networking diagram for configuring BFD for static routes
Switch
Switch A
Switch B
Switch B
GE1/0/1
SwitchA
GE1/0/1
SwitchB
GE1/0/2
2.2.2.1/24
Interface
GigabitEthernet1/0/1
GigabitEthernet1/0/1
GigabitEthernet1/0/2
NMS
VLANIF interface IP address
VLANIF 10
VLANIF 10
VLANIF 20
1.1.1.1/24
1.1.1.2/24
2.2.2.2/24
Configuration Roadmap
The configuration roadmap is as follows:
1.
Create a BFD session on Switch A and Switch B to detect the link between Switch A and
Switch B.
2.
Configure a static route from Switch A to the NMS and bind the static route to the BFD session.
Data Preparation
To complete the configuration, you need the following data: l
IDs of the VLANs that the interfaces belong to, as shown in
l VLANIF interfaces and the IP address of the NMS, as shown in
l Peer IP address of the BFD session l
Local discriminator and remote discriminator of the BFD session l Static route from Switch A to the NMS
Procedure
Step 1 Create VLANs and add corresponding interfaces to the VLANs.
<Quidway> system-view
[Quidway] sysname SwitchA
[SwitchA] vlan 10
[SwitchA-vlan10] quit
[SwitchA] interface gigabitethernet 1/0/1
[SwitchA-GigabitEthernet1/0/1] port hybrid pvid vlan 10
[SwitchA-GigabitEthernet1/0/1] port hybrid untagged vlan 10
[SwitchA-GigabitEthernet1/0/1] quit
The configuration on Switch B is similar to the configuration of Switch A, and is not mentioned here.
Step 2 Assign an IP address to each VLANIF interface.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
31
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
2 IP Static Route Configuration
[SwitchA] interface vlanif 10
[SwitchA-Vlanif10] ip address 1.1.1.1 24
[SwitchA-Vlanif10] quit
The configuration on Switch B is similar to the configuration on Switch A and is not mentioned here.
Step 3 Create a BFD session between Switch A and Switch B.
# On Switch A, create a BFD session with Switch B.
<SwitchA> system-view
[SwitchA] bfd
[SwitchA-bfd] quit
[SwitchA] bfd aa bind peer-ip 1.1.1.2
[SwitchA-bfd-session-aa] discriminator local 10
[SwitchA-bfd-session-aa] discriminator remote 20
[SwitchA-bfd-session-aa] commit
[SwitchA-bfd-session-aa] quit
# On Switch B, create a BFD session with Switch A.
<SwitchB> system-view
[SwitchB] bfd
[SwitchB-bfd] quit
[SwitchB] bfd bb bind peer-ip 1.1.1.1
[SwitchB-bfd-session-bb] discriminator local 20
[SwitchB-bfd-session-bb] discriminator remote 10
[SwitchB-bfd-session-bb] commit
[SwitchB-bfd-session-bb] quit
Step 4 Configure a static route and bind the route to the BFD session.
# On Switch A, configure a default static route to the external network and bind the default static route to the BFD session named aa.
[SwitchA]ip route-static 2.2.2.1 24 1.1.1.2 track bfd-session aa
[SwitchA]quit
Step 5 Verify the configuration.
# After the configuration is complete, run the display bfd session all command on Switch A and Switch B, and you can find that the BFD session is set up and its status is Up.
Take Switch A for example. The display is as follows:
<SwitchA> display bfd session all
--------------------------------------------------------------------------------
LocalRemote PeerIPAddressInterface NameStateType
--------------------------------------------------------------------------------
10201.1.1.2--UpS_IP
--------------------------------------------------------------------------------
Total UP/DOWN Session Number : 1/0
# Check the IP routing table on Switch A, and you can find that the static route exists in the routing table.
<SwitchA> display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 6 Routes : 6
Destination/Mask Proto Pre Cost Flags NextHop Interface
1.1.1.0/24 Direct 0 0 D 1.1.1.1 Vlanif10
1.1.1.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
1.1.1.2/32 Direct 0 0 D 1.1.1.2 Vlanif10
Issue 01 (2011-10-26) 32
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 2 IP Static Route Configuration
2.2.2.0/24 Static 60 0 RD 1.1.1.2 Vlanif10
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
# On Switch A, enable debugging on the terminal.
<SwitchA> terminal monitor
<SwitchA> terminal debugging
# Run the shutdown command on VLANIF 10 of Switch B to simulate a link fault.
[SwitchB] interface vlanif 10
[SwitchB-Vlanif10] shutdown
# The following debugging information is displayed on Switch A, indicating that BFD detects a link fault.
<SwitchA>
*0.27708400 SwitchA RM/3/RMDEBUG:
RM_USR_BFDRefreshRT_H:
BfdSessionID = 10
BfdEvent = 0X0
USR : UsrDbID = 0X6, DestAdd = 0X0, Mask = 0X0, NextHop = 0X1010102
URT : TableID = 0X1, EntryID = 0XB, ProcID = 0X2, FLAG = 0X8114000
# Check the routing table on Switch A, and you can find that default route 2.2.2.0/24 does not exist. The reason is that the default static route is bound to a BFD session, and BFD immediately notifies that the bound static route is unavailable when a fault is detected.
<SwitchA> display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 5 Routes : 5
Destination/Mask Proto Pre Cost Flags NextHop Interface
1.1.1.0/24 Direct 0 0 D 1.1.1.1 Vlanif10
1.1.1.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
1.1.1.2/32 Direct 0 0 D 1.1.1.2 Vlanif10
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
# Run the undo shutdown command on VLANIF 10 of Switch B to simulate link recovery.
[SwitchB-Vlanif10]undo shutdown
# Check the routing table on Switch A, and you can find default route 2.2.2.0/24 in the routing table. After BFD detects link recovery, it immediately notifies that the bound static route is reachable.
<SwitchA> display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 6 Routes : 6
Destination/Mask Proto Pre Cost Flags NextHop Interface
1.1.1.0/24 Direct 0 0 D 1.1.1.1 Vlanif10
1.1.1.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
1.1.1.2/32 Direct 0 0 D 1.1.1.2 Vlanif10
2.2.2.0/24 Static 60 0 RD 1.1.1.2 Vlanif10
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
----End
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
33
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 2 IP Static Route Configuration
Configuration Files
l Configuration file of Switch A
# sysname SwitchA
#
vlan batch 10
#
bfd
# interface Vlanif10
ip address 1.1.1.1 255.255.255.0
# interface GigabitEthernet1/0/1
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# bfd aa bind peer-ip 1.1.1.2
discriminator local 10
discriminator remote 20
commit
#
ip route-static 2.2.2.0 255.255.255.0 1.1.1.2 track bfd-session aa
# return l
Configuration file of Switch B
#
sysname SwitchB
#
vlan batch 10 20
#
bfd
# interface Vlanif10
ip address 1.1.1.2 255.255.255.0
# interface Vlanif20
ip address 2.2.2.2 255.255.255.0
# interface GigabitEthernet1/0/1
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# interface GigabitEthernet1/0/2
port hybrid pvid vlan 20
port hybrid untagged vlan 20
# bfd bb bind peer-ip 1.1.1.1
discriminator local 20
discriminator remote 10
commit
# return
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
34
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 3 RIP Configuration
3
RIP Configuration
About This Chapter
Issue 01 (2011-10-26)
RIP can advertise and receive routes to affect the selection of data forwarding paths, and can provide the network management function. RIP is applicable to small-scale networks.
3.2 RIP Features Supported by the S9300
3.3 Configuring Basic RIP Functions
3.4 Configuring RIP Route Attributes
3.5 Controlling the Advertising of RIP Routing Information
3.6 Controlling the Receiving of RIP Routing Information
3.7 Configuring RIP-2 Features
Different from RIP-1, RIP-2 supports VLSM, CIDR, and authentication, ensuring higher security.
3.9 Configuring the Network Management Function in RIP
By binding RIP to MIBs, you can view and configure RIP through the NMS.
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
35
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 3 RIP Configuration
This section describes how to reset RIP connections and clear RIP information.
This section provides several configuration examples of RIP.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
36
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 3 RIP Configuration
3.1 Overview of RIP
The implementation of RIP is simple, and its configuration and maintenance are easier than those of OSPF and IS-IS. Therefore, RIP is widely used on small-scale networks.
The Routing Information Protocol (RIP) is a simple Interior Gateway Protocol (IGP). RIP is mainly used on small-scale networks such as campus networks and simple regional networks rather than complex or large-scale networks.
RIP uses the distance-vector routing algorithm and exchanges routing information by using User
Datagram Protocol (UDP) packets through the port 520.
RIP employs the hop count to measure the distance to the destination. The distance is called the routing metric. In RIP, the hop count from a switch to its directly connected network is 0, and the hop count from a switch to a network, which can be reached through another switch, is 1.
To speed up route convergence, RIP defines the cost as an integer that ranges from 0 to 15. The hop count that is equal to or exceeds 16 is defined as infinity, indicating that the destination network or host is unreachable. This hop limit, however, makes RIP unable to be applied to large-scale networks.
To improve the network performance and prevent routing loops, RIP supports both split horizon and poison reverse.
l The principle of split horizon is that a route learnt by RIP on an interface is not sent to neighbors from the interface. This reduces bandwidth consumption and avoids route loops.
l The principle of poison reverse is that RIP sets the cost of the route learnt from an interface of a neighbor to 16 (specifying the route as unreachable) and then sends the route from the interface back to the neighbor. In this way, RIP can delete useless routes from the routing table of the neighbor.
The implementation of RIP is simple, and its configuration and maintenance is easier than those of Open Shortest Path First (OSPF) and Intermediate System-to-Intermediate System (IS-IS).
Therefore, RIP is widely used.
RIP has two versions: l RIPv1 l RIPv2
RIPv1 is a classful routing protocol, whereas RIPv2 is a classless routing protocol. In RIPv2, address 224.0.0.9 is the multicast address of a RIP router.
Compared with RIPv1, RIPv2 has the following advantages: l It supports route tag and can flexibly control routes on the basis of the tag in the routing policy.
l Its packets contain mask information and support route aggregation and Classless Interdomain Routing (CIDR).
l It supports the next hop address and can select the optimal next hop address in the broadcast network.
l It uses multicast routes to send update packets. Only RIPv2 routers can receive protocol packets. This reduces the resource consumption.
l To enhance the security, RIPv2 provides two authentication modes to enhance security: plain-text authentication and MD5 authentication.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
37
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 3 RIP Configuration
3.2 RIP Features Supported by the S9300
The RIP features supported by the S9300 include RIPv1, RIPv2, split horizon, poison reverse, and multi-instance.
The S9300 supports the following RIP features: l RIPv1 and RIPv2 l RIP multi-instance, which functions as an internal routing protocol of VPNs and runs between CEs and PEs in MPLS L3VPN networks
NOTE
For detailed configuration of a VPN instance, see the chapter "BGP MPLS IP VPN Configuration" in the
S9300 Terabit Routing Switch Configuration Guide - VPN.
3.3 Configuring Basic RIP Functions
To implement RIP features, you need to configure basic RIP functions, including enabling RIP and specifying the network segment where RIP runs, and setting the RIP version.
3.3.1 Establishing the Configuration Task
Before configuring basic RIP functions, familiarize yourself with the applicable environment, complete the pre-configuration tasks, and obtain the required data. This can help you complete the configuration task quickly and accurately.
Applicable Environment
Configuring basic RIP functions involves configuring basic RIP features. After the configuration, RIP features are available.
Pre-configuration Tasks
Before configuring basic RIP functions, complete the following tasks: l Configuring the link layer protocol l Configuring IP addresses for interfaces to ensure that neighboring nodes are reachable at the network layer
Data Preparation
To configure basic RIP functions, you need the following data.
2
3
No.
Data
1 RIP process ID
Network segment where the RIP interface resides
RIP version number
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
38
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
3 RIP Configuration
3.3.2 Enabling RIP
Creating RIP processes is the prerequisite to performing RIP configurations.
Context
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
rip [ process-id ]
The RIP is enabled and the RIP view is displayed.
RIP supports multi-instance. To associate RIP processes with VPN instances, you can run the
rip [ process-id ] vpn-instance vpn-instance-name command.
NOTE
For easy management and effective control, RIP supports multi-process and multi-instance. The multiprocess feature allows a set of interfaces to be associated with a specific RIP process. This ensures that the specific RIP process performs all the protocol operations only on this set of interfaces. Thus, multiple RIP processes can work on a single router and each process is responsible for a unique set of interfaces. In addition, the routing data is independent between RIP processes; however, routes can be imported between processes.
For the routers that support the VPN, each RIP process is associated with a specific VPN instance. In this case, all the interfaces attached to the RIP process should be associated with the RIP-process-related VPN instance.
----End
3.3.3 Enabling RIP on the Specified Network Segment
After enabling RIP, you need to specify the network segment where RIP runs. RIP runs only on the interfaces on the specified network segment. RIP does not receive, send, or forward routes on the interfaces that do not reside on the specified network segment.
Context
If you run RIP-related commands in the interface view before enabling RIP, the configurations take effect only after RIP is enabled.
Do as follows on the switch to be enabled with RIP:
By default, after RIP is enabled, it is disabled on all interfaces.
Do as follows on the switch to be enabled with RIP.
Procedure
Step 1 Run:
system-view
Issue 01 (2011-10-26) 39
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
3 RIP Configuration
The system view is displayed.
Step 2 Run:
rip [ process-id ]
The RIP process is enabled and the RIP view is displayed.
Step 3 Run:
network network-address
RIP is enabled on the specified network segment.
network-address specifies the address of a natural network segment.
NOTE
An interface can be associated with only one RIP process.
If any network segment where an interface configured with multiple sub-interface IP addresses resides to a RIP process, the interface cannot be associated with any other RIP processes.
----End
3.3.4 Configuring RIP Version Number
RIP versions include RIPv1 and RIPv2. The two versions have different functions.
Context
Do as follows on the RIP switch.
Procedure
l Configuring the Global RIP Version Number
1.
Run:
system-view
The system view is displayed.
2.
Run:
rip [ process-id ]
The RIP process is enabled and the RIP view is displayed.
3.
Run:
version { 1 | 2 }
The global RIP version number is specified.
l Configuring the RIP Version Number for an Interface
1.
Run:
system-view
The system view is displayed.
2.
Run:
interface vlanif interface-number
The interface view is displayed.
3.
Run:
rip version { 1 | 2 [ broadcast | multicast ] }
Issue 01 (2011-10-26) 40
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
3 RIP Configuration
The RIP version number of the packets received by the interface is specified.
NOTE
By default, an interface receives both RIPv1 and RIPv2 packets but sends only RIPv1 packets.
When configuring RIPv2 on an interface, you can specify the mode in which the interface sends packets. If no RIP version number is configured in the interface view, the global RIP version is used. The RIP version set on an interface takes precedence over the global RIP version.
----End
3.3.5 Checking the Configuration
After basic RIP functions are successfully configured, you can view the current running status, configuration, and routing information of RIP.
Prerequisite
The configurations of basic RIP functions are complete.
Procedure
l Run display rip [ process-id | vpn-instance vpn-instance-name ] command to check the running status and configuration of RIP.
l Run display rip process-id route command to check all activated and inactivated RIP routes.
l Run display default-parameter rip command to check the default RIP configuration.
l Run the display rip process-id statistics interface { all | interface-type interface-
number [ verbose | neighbor neighbor-ip-address ] } command to check statistics about
RIP interfaces.
----End
Example
Run the display rip [ process-id | vpn-instance vpn-instance-name ] command, and you can view the running status and configuration of the enabled RIP process. The command output shows that two VPN instances are running. The first VPN instance is a public network instance; the second VPN instance is named VPN-Instance-1.
<Quidway> display rip
Public VPN-instance
RIP process : 1
RIP version : 1
Preference : 100
Checkzero : Enabled
Default-cost : 0
Summary : Enabled
Hostroutes : Enabled
Maximum number of balanced paths : 3
Update time : 30 sec Age time : 180 sec
Suppress time : 0 sec Garbage-collect time : 120 sec
Graceful restart : Disabled
Silent interfaces : None
Default Route : Disabled
Verify-source : Enabled
Networks :
172.4.0.0
Configured peers : None
Number of routes in database : 4
Issue 01 (2011-10-26) 41
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
3 RIP Configuration
Number of interfaces enabled : 3
Triggered updates sent : 3
Number of route changes : 6
Number of replies to queries : 1
Number of routes in ADV DB : 6
Private VPN-instance name : VPN-Instance-1
RIP process : 2
RIP version : 1
Preference : 100
Checkzero : Enabled
Default-cost : 0
Summary : Enabled
Hostroutes : Enabled
Maximum number of balanced paths : 3
Update time : 30 sec Age time : 180 sec
Suppress time : 0 sec Garbage-collect time : 120 sec
Graceful restart : Disabled
Silent interfaces : None
Default Route : Disabled
Verify-source : Enabled
Networks :
192.4.5.0
Configured peers : None
Number of routes in database : 0
Number of interfaces enabled : 0
Triggered updates sent : 0
Number of route changes : 0
Number of replies to queries : 0
Number of routes in ADV DB : 6
Total count for 2 process :
Number of routes in database : 3
Number of interfaces enabled : 2
Number of routes sendable in a periodic update : 6
Number of routes sent in last periodic update : 4
Run the display rip process-id route command, and you can view all activated and inactivated routes of the specified RIP process.
<Quidway> display rip 1 route
Route Flags: R - RIP
A - Aging, S - Suppressed, G - Garbage-collect
----------------------------------------------------------------------------
Peer 192.4.5.1 on Vlanif10
Destination/Mask Nexthop Cost Tag Flags Sec
172.4.0.0/16 192.4.5.1 1 0 RA 15
192.13.14.0/24 192.4.5.1 2 0 RA 15
192.4.5.0/24 192.4.5.1 1 0 RA 15
Run the display default-parameter rip command, and you can view the default RIP configuration.
<Quidway> display default-parameter rip
--------------------------------------------
Protocol Level Default Configurations
--------------------------------------------
RIP version : 1
Preference : 100
Checkzero : Enabled
Default-cost : 0
Auto Summary : Enabled
Hostroutes : Enabled
Maximum Balanced Paths : 16
Update time : 30 sec Age time : 180 sec
Suppress time : 0 sec Garbage-collect time : 120 sec
Default Route : Disabled
Verify-source : Enabled
Graceful restart : Disabled
--------------------------------------------
Interface Level Default Configurations
42
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 3 RIP Configuration
--------------------------------------------
Metricin : 0
Metricout : 1
Input Packet Processing : Enabled
Output Packet Processing: Enabled
Poison Reverse : Disabled
Replay Protect : Disabled
Split Horizon
For Broadcast and P2P Interfaces : Enabled
For NBMA Interfaces : Disabled
Packet Transmit Interval : 200 msecs
Packet Transmit Number : 30
RIP Protocol Version : RIPv1 Compatible (Non-Standard)
Run the display rip process-id statistics interface { all | interface-type interface-number
[ verbose | neighbor neighbor-ip-address ] } command, and you can view statistics about the specified RIP interface.
<Quidway> display rip 1 statistics interface vlanif 10
Vlanif10(10.0.0.11)
Statistical information Last min Last 5 min Total
------------------------------------------------------------------
Periodic updates sent 5 23 259
Triggered updates sent 5 30 408
Response packet sent 10 34 434
Response packet received 15 38 467
Response packet ignored 0 0 0
Request packet sent 1 3 8
Request packet received 4 20 40
Request packet ignored 0 0 0
Bad packets received 0 0 0
Bad routes received 0 0 0
Packet authentication failed 0 0 0
3.4 Configuring RIP Route Attributes
In practice, by setting RIP route attributes, you can change RIP routing policies to meet the requirements of complex networks.
3.4.1 Establishing the Configuration Task
RIP route attributes include the RIP preference, additional metrics of an interface, and maximum number of equal-cost routes.
Applicable Environment
In practice, to meet the requirements of a complex network, you can change RIP routing policies by setting RIP route attributes. After performing configuration procedures in this section, you can: l
Affect route selection by changing the additional metric of a RIP interface.
l Change the matching order of by configuring the RIP preference when multiple routing protocols discover routes to the same destination.
l Implement load balancing among multiple equal-cost routes.
Pre-configuration Tasks
Before configuring RIP route attributes, complete the following tasks:
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
43
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 3 RIP Configuration l Configuring IP addresses for interfaces to ensure that neighboring nodes are reachable at the network layer l
Configuring Basic RIP Functions
Data Preparation
To configure RIP route attributes, you need the following data.
2
3
No.
Data
1 Additional metric of the interface
RIP preference
Maximum number of equal-cost routes
3.4.2 Configuring Additional Metrics of an Interface
The additional metric is the metric (hop count) to be added to the original metric of a RIP route.
You can set additional metrics for received and sent RIP routes by using different commands.
Context
The additional metric is added to the original metric of the RIP route.
l The rip metricin command is used to add an additional metric to a received route. After this route is added to the routing table, its metric in the routing table changes.Running this command affects route selection on the local device and other devices on the network.
l The rip metricout command is used to add an additional metric to a sent route. When this route is advertised, an additional metric is added to this route, but the metric of the route in the routing table does not change.Running this command does not affect route selection on the local device or other devices on the network.
Do as follows on the RIP switch:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
interface interface-type interface-number
The interface view is displayed.
The interface can be a VLANIF interface or a POS interface.
Step 3 Run:
rip metricin value
The metric added to a received route is set.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
44
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
3 RIP Configuration
Step 4 Run:
rip metricout { value | { acl-number | acl-name acl-name | ip-prefix ip-prefix-
name } value1 }
The metric added to a sent route is set.
NOTE
You can specify the value of the metric to be added to the RIP route that passes the filtering policy by specifying value1 through an ACL or an IP prefix list. If a RIP route does not pass the filtering, its metric is increased by 1.
----End
3.4.3 Configuring RIP Preference
When there are routes discovered by multiple routing protocols on the same Switch, you can make the Switch prefer RIP routes by setting the RIP preference.
Context
Do as follows on the RIP switch:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
rip [ process-id ]
The RIP process is enabled and the RIP view is displayed.
Step 3 Run:
preference { preference | route-policy route-policy-name } *
The RIP preference is set.
By default, the RIP preference is 100.
----End
3.4.4 Setting the Maximum Number of Equal-Cost Routes
By setting the maximum number of equal-cost RIP routes, you can change the number of routes for load balancing.
Context
Do as follows on the RIP switch:
Procedure
Step 1 Run:
system-view
Issue 01 (2011-10-26) 45
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 3 RIP Configuration
The system view is displayed.
Step 2 Run:
rip [ process-id ]
The RIP process is enabled and the RIP view is displayed.
Step 3 Run:
maximum load-balancing number
The maximum number of equal-cost routes is set.
----End
3.4.5 Checking the Configuration
After RIP route attributes are successfully set, you can view the current running status, configuration, and routing information of RIP.
Prerequisite
The configurations of RIP route attributes are complete.
Procedure
l
Run display rip [ process-id | vpn-instance vpn-instance-name ] command to check the running status and configuration of RIP.
l Run display rip process-id database command to check all activated routes in the RIP database.
l Run display rip process-id route command to check all activated and inactivated RIP routes.
----End
Example
Run the display rip process-id database command, and you can view information about the database of the specified RIP process.
<Quidway> display rip 100 database
10.0.0.0/8, cost 1, ClassfulSumm
10.0.0.0/24, cost 1, nexthop 10.0.0.1, Rip-interface
11.0.0.0/8, cost 1, ClassfulSumm
11.0.0.0/24, cost 1, nexthop 10.0.0.1, Imported
3.5 Controlling the Advertising of RIP Routing Information
To meet the requirements of complex networks, it is required to accurately control the advertising of RIP routing information.
3.5.1 Establishing the Configuration Task
RIP routing information can be advertised through default routes, Update packets, and imported external routes.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
46
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 3 RIP Configuration
Applicable Environment
In practice, to meet the requirements of a network, you need to control the advertising of RIP routing information accurately. After performing configuration procedures in this section, you can: l Advertise default routes to neighbors.
l Suppress interfaces from sending RIP Update packets.
l
Import external routes from various routing protocols and filter routes to be advertised.
Pre-configuration Tasks
Before configuring the switch to control the advertising of RIP routing information, complete the following tasks: l Configuring IP addresses for interfaces to ensure that neighboring nodes are reachable at the network layer l
Configuring Basic RIP Functions
Data Preparation
To control the advertising of RIP routing information, you need the following data.
2
3
No.
Data
1 Metric of the default route to be advertised
Number of the interface that is suppressed from sending RIP Update packets
Protocol name and process ID of the external route to be imported
3.5.2 Configuring RIP to Advertise Default Routes
A default route is a route destined for 0.0.0.0. By default, RIP does not advertise default routes to its neighbors.
Context
Do as follows on the RIP switch:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
rip [ process-id ]
The RIP process is enabled and the RIP view is displayed.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
47
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 3 RIP Configuration
Step 3 Run:
default-route originate [ cost cost ]
RIP is configured to advertise a default route.
You can configure a switch to advertise a default route with the specified metric to its RIP neighbors.
----End
3.5.3 Disabling an Interface from Sending Update Packets
Disabling interfaces from sending Update packets is a method of preventing routing loop and can be implemented in two ways.
Context
Do as follows on the RIP switch:
Procedure
l Configuration in a RIP Process (with a High Priority)
1.
Run:
system-view
The system view is displayed.
2.
Run:
rip [ process-id ]
The RIP process is enabled and the RIP view is displayed.
3.
Run the following command as required.
Run:
silent-interface all
All interfaces are disabled from sending Update packets.
Run:
silent-interface interface-type interface-number
An interface is disabled from sending Update packets.
You can set an interface to silent so that it only receives Update packets to update its routing table. The silent-interface command takes precedence over the rip output command in the interface view.
By default, an interface can receive and send Update packets.
l Configuration in the Interface View (with a Low Priority)
1.
Run:
system-view
The system view is displayed.
2.
Run:
interface interface-type interface-number
The interface view is displayed.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
48
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 3 RIP Configuration
The interface can be a VLANIF interface, a POS interface, or an IP-Trunk interface.
3.
Run:
undo rip output
The interface is disabled from sending RIP Update packets.
By running this command, you can specify whether to send RIP Update packets on an interface. The silent-interface command takes precedence over the undo rip
output command. By default, an interface is allowed to send RIP Update packets.
----End
3.5.4 Configuring RIP to Import External Routes
To enrich its routing information, RIP can import the routes learned by other processes or other routing protocols.
Context
Do as follows on the RIP switch:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
rip [ process-id ]
The RIP process is enabled and the RIP view is displayed.
Step 3 (Optional) Run:
default-cost cost
The default cost of imported routes is set.
If no cost is specified when external routes are imported, the default cost is used.
Step 4 Run:
import-route bgp [ cost { cost | transparent } | route-policy route-policy-name ]
*
or import-route { { static | direct } | { { rip | ospf | isis } [ process-id ] } }
[ cost cost | route-policy route-policy-name ]
*
External routes are imported.
Step 5 (Optional) Run:
filter-policy { acl-number | acl-name acl-name | ip-prefix ip-prefix-name } export
[ protocol [ process-id ] | interface-type interface-number ]
The imported routes are filtered when being advertised.
If the routing information to be advertised by RIP contains the routes imported from other routing protocols, you can specify protocol to filter the specified routes. If protocol is not specified, all the routing information to be advertised will be filtered, including the imported routes and local
RIP routes (directly connected routes).
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
49
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 3 RIP Configuration
NOTE
The Tag field in RIP is 16 bits in length, whereas the Tag field in other routing protocols is 32 bits in length.
If the routes of other routing protocols are imported and the tag is used in the routing policy, ensure that the tag value does not exceed 65535. Otherwise, the routing policy becomes invalid or the matching result is incorrect.
----End
3.5.5 Checking the Configuration
After the function of controlling the advertising of RIP routing information is successfully configured, you can view the current running status, configuration, and routing information of
RIP.
Prerequisite
The configurations of controlling the advertising of RIP routing information are complete.
Procedure
l
Run the display rip [ process-id | vpn-instance vpn-instance-name ] command to check the running status and configuration of RIP.
l Run the display rip process-id database command to check all activated routes in the RIP database.
l Run the display rip process-id route command to check all activated and inactivated RIP routes.
----End
Example
Run the display rip process-id database command, and you can view information about the database of the specified RIP process.
<Quidway> display rip 100 database
172.4.0.0/16, cost 1, ClassfulSumm
172.4.0.0/16, cost 1, nexthop 192.13.14.1
192.4.5.0/24, cost 2, ClassfulSumm
192.4.5.0/24, cost 2, nexthop 192.13.14.1
192.13.14.0/24, cost 0, ClassfulSumm
192.13.14.0/24, cost 0, Rip-interface
3.6 Controlling the Receiving of RIP Routing Information
To meet the requirements of complex networks, it is required to accurately control the receiving of RIP routing information.
3.6.1 Establishing the Configuration Task
You can obtain RIP routing information by receiving Update packets and host routes.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
50
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 3 RIP Configuration
Applicable Environment
In practice, to meet the requirements of a complex network, it is required to control the receiving of RIP routing information accurately. After performing configuration procedures in this section, you can: l Disable an interface from receiving RIP Update packets.
l Filter the received routing information.
l Import external routes from various routing protocols and filter the imported routes.
Pre-configuration Tasks
Before configuring a switch to control the receiving of RIP routing information, complete the following tasks: l Configuring IP addresses for interfaces to ensure that neighboring nodes are reachable at the network layer l
Configuring Basic RIP Functions
Data Preparation
To control the receiving of RIP routing information, you need the following data.
No.
Data
1 ACL used to filter the routing information
3.6.2 Disabling an Interface from Receiving RIP Update Packets
Disabling interfaces from receiving Update packets is a method of preventing routing loops.
Context
The undo rip input command can be used to disable an interface from receiving update packets.
Its priority is lower than that of the silent-interface command.
By default, an interface is allowed to receive RIP Update packets.
Do as follows on the RIP switch:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
interface interface-type interface-number
The interface view is displayed.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
51
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 3 RIP Configuration
The interface can be a VLANIF interface, a POS interface, or an IP-Trunk interface.
Step 3 Run:
undo rip input
The interface is disabled from receiving RIP Update packets.
----End
3.6.3 Disabling RIP from Receiving Host Routes
When you disable RIP from receiving host routes on a router, the router rejects to receive host routes. This prevents the router from receiving a large number of unnecessary routes and thus avoiding wasting network resources.
Context
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
rip [ process-id ]
The RIP process is enabled and the RIP view is displayed.
Step 3 Run:
undo host-route
RIP is disabled from adding host routes to the routing table.
----End
3.6.4 Configuring RIP to Filter the Received Routes
By specifying ACLs and IP prefix lists, you can configure the inbound policy to filter the routes to be received. You can also configure a router to receive only RIP packets from a specified neighbor.
Context
In certain situations, a switch may receive a large number of host routes from the same network segment. These routes are not required in route addressing, but consume many network resources. You can configure the switch to refuse to accept host routes by disabling RIP from accepting host routes.
By default, host routes are added to the routing table.
Do as follows on the RIP switch:
The switch can filter routing information. To filter the imported and advertised routes, you can configure inbound and outbound routing policies by specifying ACLs and IP prefix lists.
You can also configure the switch to receive RIP packets only from a specified neighbor.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
52
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 3 RIP Configuration
Do as follows on the RIP switch:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
rip [ process-id ]
The RIP process is enabled and the RIP view is displayed.
Step 3 Run the following commands to configure RIP to filter the received routes as required: l Run:
filter-policy { acl-number | acl-name acl-name } import
The learned routing information is filtered based on an ACL.
l Run:
filter-policy gateway ip-prefix-name import
The routing information advertised by neighbors is filtered based on the IP prefix list.
l Run:
filter-policy ip-prefix ip-prefix-name [ gateway ip-prefix-name ] import
[ interface-type interface-number ]
The routes learned by the specified interface are filtered based on the IP prefix list and neighbors.
NOTE
To filter routes to be advertised, run the filter-policy { acl-number | acl-name acl-name | ip-prefix ip-
prefix-name } export [ protocol [ process-id ] | interface-type interface-number ] command.
----End
3.6.5 Checking the Configuration
After the function of controlling the receiving of RIP routing information is successfully configured, you can view the current running status, configuration, and routing information of
RIP.
Procedure
l Run the display rip [ process-id | vpn-instance vpn-instance-name ] command to check the running status and configuration of RIP.
l Run the display rip process-id database [ verbose ] command to check all activated RIP routes in the database.
l Run the display rip process-id interface [ interface-type interface-number ] [ verbose ] command to check information about the RIP interface.
l Run the display rip process-id neighbor [ verbose ] command to check information about
RIP neighbors.
l Run the display rip process-id route command to check all activated and inactivated RIP routes.
----End
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
53
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Example
3 RIP Configuration
Run the display rip process-id database command, and you can view information about the database of the specified RIP process.
<Quidway> display rip 100 database
172.4.0.0/16, cost 1, ClassfulSumm
172.4.0.0/16, cost 1, nexthop 192.13.14.1
192.4.5.0/24, cost 2, ClassfulSumm
192.4.5.0/24, cost 2, nexthop 192.13.14.1
192.13.14.0/24, cost 0, ClassfulSumm
192.13.14.0/24, cost 0, Rip-interface
3.7 Configuring RIP-2 Features
Different from RIP-1, RIP-2 supports VLSM, CIDR, and authentication, ensuring higher security.
3.7.1 Establishing the Configuration Task
Before configuring RIP-2 features, familiarize yourself with the applicable environment, complete the pre-configuration tasks, and obtain the data required for the configuration. This will help you complete the configuration task quickly and accurately.
Applicable Environment
RIP-2 is a type of classless routing protocol. A RIP-2 packet carries subnet mask information.
Deploying a RIP-2 network saves IP addresses. On a network where the IP addresses of devices are not consecutive, only RIP-2 can be deployed, and RIP-1cannot be deployed.
RIP-2 features include: l
RIP-2 route summarization l
RIP-2 authentication mode
Pre-configuration Tasks
Before configuring RIP-2 features, complete the following tasks: l Configuring the link layer protocol l Configuring IP addresses for interfaces to ensure that neighboring nodes are reachable at the network layer
Data Preparation
To configure RIP-2 features, you need the following data.
No.
Data
1 RIP-2 process ID
2 Network segment where the RIP-2 interface resides
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
54
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 3 RIP Configuration
3.7.2 Configuring RIP-2 Route Summarization
Route summarization is enabled in RIP-1 by default, and cannot be manually configured. RIP-2 supports VLSM and CIDR. You can configure route summarization in RIP-2 to improve the flexibility of RIP-2. To broadcast all subnet routes, you can disable route summarization in
RIP-2.
Context
Route summarization indicates that multiple subnet routes on the same natural network segment are summarized into one route with the natural mask when being advertised to other network segments. Therefore, route summarization reduces the network traffic and the size of the routing table.
Route summarization does not take effect in RIP-1. RIP-2 supports Variable Length Subnet
Mask (VLSM) and Classless Interdomain Routing (CIDR). To broadcast all subnet routes, you can disable automatic route summarization of RIP-2.
Do as follows on the RIP switch:
Precautions
Route summarization is invalid when split horizon or poison reverse is configured. When the summarized routes are sent outside the natural network boundary, split horizon or poison reverse in related views needs to be disabled.
Procedure
l Enabling RIP-2 Automatic Route Summarization
1.
Run:
system-view
The system view is displayed.
2.
Run:
rip [ process-id ]
The RIP process is enabled and the RIP view is displayed.
3.
Run:
version 2
RIP-2 is configured.
4.
Run:
summary
RIP-2 automatic route summarization is enabled.
NOTE
The summary command is used in the RIP view to enable classful network-based route summarization.
l Configuring RIP-2 to Advertise the Summary Address
1.
Run:
system-view
The system view is displayed.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
55
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
3 RIP Configuration
2.
Run:
interface interface-type interface-number
The interface view is displayed.
The interface can be a VLANIF interface or a POS interface.
3.
Run:
rip summary-address ip-address mask [ avoid-feedback ]
The local summary address of RIP-2 is advertised.
NOTE
The rip summary-address ip-address mask [ avoid-feedback ] command is run in the interface view to enable classless network-based route summarization.
----End
3.7.3 Configuring Packet Authentication of RIP-2
RIP-2 supports the ability to authenticate protocol packets and provides two authentication modes, Simple authentication and Message Digest 5 (MD5) authentication, to enhance security.
Context
RIP-2 supports two authentication modes: l Simple authentication l MD5 authentication
In simple authentication mode, the unencrypted authentication key is sent in every RIP-2 packet.
Therefore, simple authentication does not guarantee security, and cannot meet the requirements for high security.
Do as follows on the RIP switch:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
interface interface-type interface-number
The interface view is displayed.
The interface can be a VLANIF interface, a POS interface, or an IP-Trunk interface.
Step 3 Run the following command as required: l Run:
rip authentication-mode simple password
Simple authentication in the plain text is configured for RIP-2 packets.
l Run:
rip authentication-mode md5 { nonstandard { password-key1 key-id | keychain
keychain-name } | usual password-key2 }
Issue 01 (2011-10-26) 56
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
MD5 authentication in the cipher text is configured for RIP-2 packets.
NOTE
The MD5 type must be specified if MD5 authentication is configured. The usual type supports IETF standard authentication packets, and the nonstandard type supports nonstandard authentication packets.
The MD5 authentication password that starts and ends with $@$@ is invalid, because $@$@ is used to distinguish old and new passwords.
----End
3.7.4 Checking the Configuration
After RIP-2 features are successfully configured, you can view the current running status, configuration, and routing information of RIP.
Prerequisite
3 RIP Configuration
The configurations of RIP-2 features are complete.
Procedure
l Run the display rip [ process-id | vpn-instance vpn-instance-name ] command to check the running status and configuration of RIP.
l Run the display rip process-id database [ verbose ] command to check all activated RIP routes in the database.
l Run the display rip process-id route command to check all activated and inactivated RIP routes.
----End
3.8 Optimizing a RIP Network
You can adjust and optimize the RIP network performance by configuring RIP functions in special network environments, such as configuring RIP timers, setting the interval for sending packets, and setting the maximum number of packets to be sent.
3.8.1 Establishing the Configuration Task
Before adjusting and optimizing the RIP network performance, familiarize yourself with the applicable environment, complete the pre-configuration tasks, and obtain the data required for the configuration. This will help you complete the configuration task quickly and accurately.
Applicable Environment
On certain networks, you need to configure RIP features and optimize the performance of a RIP network. After performing configuration procedures in this section, you can: l Change the convergence speed of the RIP network by adjusting the values of RIP timers.
l Reduce the consumption of device resources and network bandwidth by adjusting the number of packets to be sent by interfaces and the interval at which packets are sent.
l Configure split horizon or poison reverse to prevent routing loops.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
57
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 3 RIP Configuration l After the replay-protect function is enabled, neighbors can communicate after a RIP process is restarted.
l Check the validity of packets and authenticate packets on a network demanding high security.
l
Run RIP on a link that does not support broadcast or multicast packets.
Pre-configuration Tasks
Before optimizing a RIP network, complete the following tasks: l Configuring IP addresses for interfaces to ensure that neighboring nodes are reachable at the network layer l
Configuring Basic RIP Functions
Data Preparation
To optimize a RIP network, you need the following data.
4
5
No.
Data
1 Values of timers
2
3
Number of Update packets that an interface sends each time and interval for sending an Update packet
Maximum number of equal-cost routes
Packet authentication mode and password
IP addresses of RIP neighbors
3.8.2 Configuring RIP Timers
RIP has four timers: Update timer, Age timer, Suppress timer, and Garbage-collect timer.
Changing the values of the four timers affects the RIP convergence speed.
Context
RIP has four timers: Update timer, Age timer, Suppress timer, and Garbage-collect timer.
Changing the values of the four timers affects the RIP convergence speed. For details on timers, see corresponding description in the chapter "RIP" in the Quidway S9300 Terabit Routing Switch
Feature Description - IP Routing.
Do as follows on the RIP switch:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
58
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 3 RIP Configuration
Step 2 Run:
rip [ process-id ]
The RIP process is enabled and the RIP view is displayed.
Step 3 Run:
timers rip update age suppress garbage-collect
RIP timers are configured.
NOTE
l RIP timers take effect immediately after being changed.
l Route flapping occurs if the values of the four times are set improperly. The relationship between the values is as follows: update must be smaller than age and suppress must be smaller than garbage-
collect. For example, if the update time is longer than the aging time, and a RIP route changes within the update time, the switch cannot inform its neighbors of the change on time.
l You must configure RIP timers based on the network performance and uniformly on all the switches running RIP. This avoids unnecessary network traffic or route flapping.
l The Suppress timer does not take effect on the local system.
By default, the Update timer is 30s; the Age timer is 180s; the Suppress timer is 0s; the Garbagecollect timer is four times the Update timer, namely, 120s.
In practice, the Garbage-collect timer is not fixed. If the Update timer is set to 30s, the Garbagecollect timer may range from 90s to 120s.
Before permanently deleting an unreachable route from the routing table, RIP advertises this route (with the metric being set to 16) by periodically sending Update packets four times.
Subsequently, all the neighbors know that this route is unreachable. Because a route may not always become unreachable at the beginning of an Update period, the Garbage-collect timer is actually three or four times the Update timer.
----End
3.8.3 Setting the Interval for Sending Packets and the Maximum
Number of the Sent Packets
By setting the interval for sending RIP Update packets and the maximum number of Update packets to be sent each time, you can effectively control the memory used by a Switch to process
RIP Update packets.
Context
Do as follows on the RIP switch:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
interface interface-type interface-number
The interface view is displayed.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
59
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
The interface can be a VLANIF interface, a POS interface, or an IP-Trunk interface.
Step 3 Run:
rip pkt-transmit { interval interval | number pkt-count }
*
The interval for sending Update packets and the maximum number of packets sent each time are set on the interface.
----End
3.8.4 Configuring Split Horizon and Poison Reverse
You can configure split horizon and poison reverse to prevent routing loops.
Context
If both split horizon and poison reverse are configured, only poison reverse takes effect.
Do as follows on the RIP switch:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
interface interface-type interface-number
The interface view is displayed.
The interface can be a VLANIF interface or a POS interface.
Step 3 Run the following command as required: l Run:
rip split-horizon
Split horizon is enabled.
l Run:
rip poison-reverse
Poison reverse is enabled.
----End
3.8.5 Configuring RIP to Check the Validity of Update Packets
The check on RIP Update packets includes the check on zero fields in RIPv1 packets and the check on source addresses of RIP Update packets. The two types of check have different functions and applications.
Context
3 RIP Configuration
Do as follows on the RIP switch:
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
60
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 3 RIP Configuration
Procedure
l Configuring the Zero Field Check for RIPv1 Packets
1.
Run:
system-view
The system view is displayed.
2.
Run:
rip [ process-id ]
The RIP process is enabled and the RIP view is displayed.
3.
Run:
checkzero
The zero field check is configured for RIPv1 packets.
Certain fields in a RIPv1 packet must be 0s, and these fields are called zero fields.
RIPv1 checks the zero fields on receiving a packet. If the value of any zero field in a
RIPv1 packet is not 0, this packet is not processed.
As a RIPv2 packet does not contain any zero field, configuring the zero field check is invalid in RIPv2.
l Configuring the Source Address Check for RIP Update Packets
1.
Run:
system-view
The system view is displayed.
2.
Run:
rip [ process-id ]
The RIP process is enabled and the RIP view is displayed.
3.
Run:
verify-source
The source address check is configured for RIP Update packets.
When receiving a packet, RIP checks the source address of the packet. If the packet fails in the check, it is not processed.
By default, the source address check is enabled.
----End
3.8.6 Configuring RIP Neighbors
Generally, RIP sends packets by using broadcast or multicast addresses. To run RIP on the links that do not support the forwarding of broadcast or multicast packets, you need to specify RIP neighbors.
Context
Generally, RIP sends packets by using broadcast or multicast addresses. If RIP needs to run on the links that do not support the forwarding of broadcast or multicast packets, you need to configure the devices at both ends of the link as each other's neighbor.
Do as follows on the RIP switch:
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
61
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
3 RIP Configuration
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
rip [ process-id ]
The RIP process is enabled and the RIP view is displayed.
Step 3 Run:
peer ip-address
The RIP neighbor is configured.
NOTE
The S9300 of the current version supports up to 256 RIP neighbors.
----End
3.8.7 Checking the Configuration
After the function of adjusting and optimizing the RIP network performance is successfully configured, you can view the current running status, routing information, neighbor information, and interface information of RIP.
Prerequisite
The configurations of optimizing a RIP network are complete.
Procedure
l Run the display rip [ process-id | vpn-instance vpn-instance-name ] command to check the running status and configuration of RIP.
l Run the display rip process-id database [ verbose ] command to check all activated RIP routes in the database.
l Run the display rip process-id interface [ interface-type interface-number ] [ verbose ] command to check information about the RIP interface.
l Run the display rip process-id neighbor [ verbose ] command to check information about
RIP neighbors.
l Run the display rip process-id route command to check all activated and inactivated RIP routes.
----End
Example
Run the display rip process-id interface [ interface-type interface-number ] [ verbose ] command, and you can view RIP information about the specified interface. The command output shows that the interface status is Up.
<Quidway> display rip 1 interface vlanif 10
------------------------------------------------------------------
Interface IP Address State Protocol MTU
Issue 01 (2011-10-26) 62
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 3 RIP Configuration
------------------------------------------------------------------
Vlanif10 1.1.1.2 UP RIPv1 Compatible 500
3.9 Configuring the Network Management Function in RIP
By binding RIP to MIBs, you can view and configure RIP through the NMS.
3.9.1 Establishing the Configuration Task
Before binding RIP to MIBs, familiarize yourself with the applicable environment, complete the pre-configuration tasks, and obtain the data required for the configuration. This will help you complete the configuration task quickly and accurately.
Applicable Environment
After performing configuration procedures in this section, you can bind RIP to a MIB.
Pre-configuration Tasks
Before configuring the network management function in RIP, complete the following tasks: l Configuring IP addresses for interfaces to ensure that neighboring nodes are reachable at the network layer l
Configuring Basic RIP Functions
Data Preparation
None.
3.9.2 Binding RIP to MIBs
Before binding RIP to MIBs, you need to specify the RIP process ID.
Context
Do as follows on the RIP switch:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
rip mib-binding process-id
RIP is bound to MIBs.
This command is used to bind a RIP process ID to MIBs and specify the ID of the RIP process that accepts Simple Network Management Protocol (SNMP) requests.
----End
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
63
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 3 RIP Configuration
3.9.3 Checking the Configuration
After RIP and MIBs are successfully bound, you can view binding information in the current
RIP configuration.
Prerequisite
The configurations of the network management function in RIP are complete.
Procedure
Step 1 Run the display current-configuration command to check the parameters that take effect on the switch.
----End
3.10 Maintaining RIP
This section describes how to reset RIP connections and clear RIP information.
3.10.1 Resetting RIP
Restarting RIP can reset RIP.
Context
CAUTION
The RIP neighbor relationship is deleted after you reset RIP connections with the reset rip command. So, confirm the action before you use the command.
To reset RIP connections, run the following reset commands in the user view.
Procedure
l Run the reset rip process-id configuration command in the user view to reset the parameters of the specified RIP process. When the RIP process starts, all parameters use default values.
----End
3.10.2 Clearing RIP
This section describes how to clear statistics about RIP counters.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
64
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Context
3 RIP Configuration
CAUTION
RIP information cannot be restored after it is cleared. Exercise caution when running the commands.
To clear RIP information, run the following reset command in the user view.
Procedure
l Run the reset rip process-id statistics [ interface [ interface-type interface-number
[ neighbor [ neighbor-ip-address ] ] ] ] command in the user view to clear statistics about the counter that is maintained by a specified RIP process.
----End
3.10.3 Debugging RIP
Routers can generate debugging information after the debugging of a module is enabled in the user view. Debugging information shows the contents of the packets sent or received by the debugged module.
Context
CAUTION
Debugging affects system performance. After debugging is complete, run the undo debugging
all command to disable debugging immediately.
When a RIP fault occurs, run the following debugging commands in the user view to debug RIP and locate the fault.
For the procedure for displaying the debugging information, see the chapter "Information Center
Configuration" in the S9300 Terabit Routing Switch Configuration Guide - System
Management.
For the related debugging commands, see the S9300 Terabit Routing Switch Debugging
Reference.
Procedure
Issue 01 (2011-10-26) l Run the debugging rip process-id brief command in the user view to enable the brief debugging of RIP packets.
l Run the debugging rip process-id error command in the user view to enable the brief debugging of RIP errors.
l Run the debugging rip process-id event command in the user view to enable the debugging of RIP events.
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
65
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 3 RIP Configuration l Run the debugging rip process-id job command in the user view to enable the debugging of RIP jobs.
l Run the debugging rip process-id packet command in the user view to enable the debugging of RIP packets.
l Run the debugging rip process-id receive command in the user view to enable the debugging of the process of receiving RIP packets.
l Run the debugging rip process-id send command in the user view to enable the debugging of the process of sending RIP packets.
l
Run the debugging rip process-id timer command in the user view to enable the debugging of RIP timers.
----End
3.11 Configuration Examples
This section provides several configuration examples of RIP.
3.11.1 Example for Configuring the RIP Version
Networking Requirements
, RIP needs to be enabled on all the interfaces of Switch A, Switch B,
Switch C, and Switch D. The S9300s are interconnected through RIPv2.
Figure 3-1 Networking diagram for configuring the RIP version
SwitchC
GE1/0/1
Issue 01 (2011-10-26)
SwitchA
GE1/0/0
Switch
Switch A
Switch B
Switch B
Switch B
Switch C
Switch D
GE1/0/1
GE1/0/0
SwitchB
GE1/0/2
Interface
GigabitEthernet1/0/0
GigabitEthernet1/0/0
GigabitEthernet1/0/1
GigabitEthernet1/0/2
GigabitEthernet1/0/1
GigabitEthernet1/0/2
GE1/0/2
SwitchD
VLANIF interface IP address
VLANIF 10 192.168.1.1/24
VLANIF 10
VLANIF 20
VLANIF 30
VLANIF 20
VLANIF 30
192.168.1.2/24
172.16.1.1/24
10.1.1.1/24
172.16.1.2/24
10.1.1.2/24
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
66
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 3 RIP Configuration
Configuration Roadmap
The configuration roadmap is as follows:
1.
Assign IP addresses to all the interfaces to ensure network reachability.
2.
Enable RIP on each Switch and configure the basic RIP functions.
3.
Configure RIPv2 on each Switch and check the accurate subnet masks.
Data Preparation
To complete the configuration, you need the following data: l
IDs of the VLANs that the interfaces belong to, as shown in
l IP addresses of VLANIF interfaces, as shown in
l RIP version on the Switches, namely, RIPv2
Procedure
Step 1 Configure VLANs that the related interfaces belong to.
<Quidway> system-view
[Quidway] sysname SwitchA
[SwitchA] vlan 10
[SwitchA-vlan10] quit
[SwitchA] interface gigabitethernet 1/0/0
[SwitchA-GigabitEthernet1/0/0] port hybrid pvid vlan 10
[SwitchA-GigabitEthernet1/0/0] port hybrid untagged vlan 10
[SwitchA-GigabitEthernet1/0/0] quit
The configurations of Switch B, Switch C, and Switch D are similar to the configuration of
Switch A, and are not mentioned here.
Step 2 Assign an IP address to each VLANIF interface.
[SwitchA] interface vlanif 10
[SwitchA-Vlanif10] ip address 192.168.1.1 24
[SwitchA-Vlanif10] quit
The configurations of Switch B, Switch C, and Switch D are similar to the configuration of
Switch A, and are not mentioned here.
Step 3 Configure the basic RIP functions.
Configure Switch A.
[SwitchA] rip
[SwitchA-rip-1] network 192.168.1.0
[SwitchA-rip-1] quit
Configure Switch B.
[SwitchB] rip
[SwitchB-rip-1] network 192.168.1.0
[SwitchB-rip-1] network 172.16.0.0
[SwitchB-rip-1] network 10.0.0.0
[SwitchB-rip-1] quit
Configure Switch C.
[SwitchC] rip
[SwitchC-rip-1] network 172.16.0.0
[SwitchC-rip-1] quit
Configure Switch D.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
67
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
3 RIP Configuration
[SwitchD] rip
[SwitchD-rip-1] network 10.0.0.0
[SwitchD-rip-1] quit
# Check the RIP routing table of Switch A.
[SwitchA] display rip 1 route
Route Flags: R - RIP
A - Aging, S - Suppressed, G - Garbage-collect
-------------------------------------------------------------------------
Peer 192.168.1.2 on Vlanif10
Destination/Mask Nexthop Cost Tag Flags Sec
10.0.0.0/8 192.168.1.2 1 0 RA 14
172.16.0.0/16 192.168.1.2 1 0 RA 14
192.168.1.0/24 192.168.1.2 1 0 RA 14
From the routing table, you can find that the routes advertised by RIPv1 use natural masks.
Step 4 Configure the RIP version.
# Configure RIPv2 on Switch A.
[SwitchA] rip
[SwitchA-rip-1] version 2
[SwitchA-rip-1] quit
# Configure RIPv2 on Switch B.
[SwitchB] rip
[SwitchB-rip-1] version 2
[SwitchB-rip-1] quit
# Configure RIPv2 on Switch C.
[SwitchC] rip
[SwitchC-rip-1] version 2
[SwitchC-rip-1] quit
# Configure RIPv2 on Switch D.
[SwitchD] rip
[SwitchD-rip-1] version 2
[SwitchD-rip-1] quit
Step 5 Verify the configuration.
# Check the RIP routing table of Switch A.
[SwitchA] display rip 1 route
Route Flags: R - RIP
A - Aging, S - Suppressed, G - Garbage-collect
-------------------------------------------------------------------------
Peer 192.168.1.2 on Vlanif10
Destination/Mask Nexthop Cost Tag Flags Sec
10.1.1.0/24 192.168.1.2 1 0 RA 32
172.16.1.0/24 192.168.1.2 1 0 RA 32
192.168.1.0/24 192.168.1.2 1 0 RA 14
From the routing table, you can find that the routes advertised by RIPv2 contain more accurate subnet masks.
----End
Configuration Files
l Configuration file of Switch A
#
sysname SwitchA
Issue 01 (2011-10-26) 68
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
#
vlan 10
# interface Vlanif10
ip address 192.168.1.1 255.255.255.0
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# rip 1
version 2
network 192.168.1.0
# return l Configuration file of Switch B
#
sysname SwitchB
#
vlan batch 10 20 30
# interface Vlanif10
ip address 192.168.1.2 255.255.255.0
# interface Vlanif20
ip address 172.16.1.1 255.255.255.0
# interface Vlanif30
ip address 10.1.1.1 255.255.255.0
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# interface GigabitEthernet1/0/1
port hybrid pvid vlan 20
port hybrid untagged vlan 20
# interface GigabitEthernet1/0/2
port hybrid pvid vlan 30
port hybrid untagged vlan 30
# rip 1
version 2
network 192.168.1.0
network 172.16.0.0
network 10.0.0.0
# return l Configuration file of Switch C
#
sysname SwitchC
#
vlan batch 20
# interface Vlanif20
ip address 172.16.1.2 255.255.255.0
# interface GigabitEthernet1/0/1
port hybrid pvid vlan 20
port hybrid untagged vlan 20
# rip 1
version 2
network 172.16.0.0
# return
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
3 RIP Configuration
69
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 3 RIP Configuration l Configuration file of Switch D
#
sysname SwitchD
#
vlan batch 30
# interface Vlanif30
ip address 10.1.1.2 255.255.255.0
# interface GigabitEthernet1/0/2
port hybrid pvid vlan 30
port hybrid untagged vlan 30
# rip 1
version 2
network 10.0.0.0
# return
3.11.2 Example for Configuring RIP to Import Routes
Networking Requirements
, two RIP processes, RIP100 and RIP200, run on Switch B. Switch B
exchanges routing information with Switch A through RIP100 and exchanges routing information with Switch C through RIP200.
You must configure route import on Switch B so that the two RIP processes can import RIP routes of each other. By default, the metric of the imported routes of RIP200 is set to 3. In addition, you must configure a filtering policy on Switch B. Thus, Switch B can filter out a route imported from RIP200 (route to 192.168.4.0/24) and does not advertise the route to Switch A.
Figure 3-2 Networking diagram for configuring RIP to import external route
Issue 01 (2011-10-26)
GE2/0/0
SwitchA
GE1/0/0
RIP
100
switch
Switch A
Switch A
Switch B
Switch B
Switch C
Switch C
Switch C
GE1/0/0
SwitchB
Interface
GigabitEthernet1/0/0
GigabitEthernet2/0/0
GigabitEthernet1/0/0
GigabitEthernet1/0/1
GigabitEthernet1/0/1
GigabitEthernet1/0/2
GigabitEthernet1/0/3
GE1/0/1
GE1/0/2
GE1/0/1
SwitchC
GE1/0/3
RIP
200
VLANIF interface IP address
VLANIF 10 192.168.1.1/24
VLANIF 50 192.168.0.1/24
VLANIF 10
VLANIF 20
VLANIF 20
VLANIF 30
VLANIF 40
192.168.1.2/24
192.168.2.1/24
192.168.2.2/24
192.168.3.1/24
192.168.4.1/24
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
70
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 3 RIP Configuration
Configuration Roadmap
The configuration roadmap is as follows:
1.
Enable RIP100 and RIP200 on switch and specify the network segment.
2.
Configure Switch B to import routes of a RIP process into the routing table of the other
RIP process, and set the default metric of the routes imported from RIP200 to 3.
3.
Configure an ACL on Switch B to filter the routes imported from RIP200.
Data Preparation
To complete the configuration, you need the following data: l
IDs of the VLANs that the interfaces belong to, as shown in
l IP addresses of VLANIF interfaces, as shown in
l RIP100 enabled network segments on Switch A: 192.168.1.0 and 192.168.1.0
l Network segments with RIP100 and RIP200 enabled on Switch B: 192.168.1.0 and
192.168.2.0.
l
RIP200 enabled network segments on Switch C: 192.168.2.0, 192.168.3.0, and 192.168.4.0
l Default metric of routes that are imported to RIP100 from RIP200: 3 l ACL 2000 for the routes that are imported to RIP100 from RIP200, which denies the routes of network segment 192.168.4.0
Procedure
Step 1 Configure VLANs that the related interfaces belong to.
<Quidway> system-view
[Quidway] sysname Switch A
[Switch A] vlan 10
[Switch A-Vlan10] quit
[Switch A] interface gigabitethernet 1/0/0
[Switch A-GigabitEthernet1/0/0] port hybrid pvid vlan 10
[Switch A-GigabitEthernet1/0/0] port hybrid untagged vlan 10
[Switch A-GigabitEthernet1/0/0] quit
[Switch A] vlan 50
[Switch A-Vlan50] quit
[Switch A]interface gigabitethernet 2/0/0
[Switch A-GigabitEthernet2/0/0] port hybrid pvid vlan 50
[Switch A-GigabitEthernet2/0/0] port hybrid untagged vlan 50
[Switch A-GigabitEthernet2/0/0] quit
The configurations of Switch B and Switch C are similar to the configuration of Switch A, and are not mentioned here.
Step 2 Assign an IP address to each VLANIF interface.
[Switch A] interface vlanif 10
[Switch A-Vlanif10] ip address 192.168.1.1 24
[Switch A-Vlanif10] quit
[Switch A] interface vlanif 50
[Switch A-vlanif50] ip address 192.168.0.1 24
[Switch A-vlanif50] quit
The configurations of Switch B and Switch C are similar to the configuration of Switch A, and are not mentioned here.
Step 3 Configure the basic RIP functions.
# Enable RIP process 100 on Switch A.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
71
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 3 RIP Configuration
[Switch A] rip 100
[Switch A-rip-100] network 192.168.0.0
[Switch A-rip-100] network 192.168.1.0
[Switch A-rip-100] quit
# Enable RIP processes 100 and 200 on Switch B.
[Switch B] rip 100
[Switch B-rip-100] network 192.168.1.0
[Switch B-rip-100] quit
[Switch B] rip 200
[Switch B-rip-200] network 192.168.2.0
[Switch B-rip-200] quit
# Enable RIP process 200 on Switch C.
[Switch C] rip 200
[Switch C-rip-200] network 192.168.2.0
[Switch C-rip-200] network 192.168.3.0
[Switch C-rip-200] network 192.168.4.0
[Switch C-rip-200] quit
# Check the routing table of Switch A.
[Switch A] display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 7 Routes : 7
Destination/Mask Proto Pre Cost Flags NextHop Interface
192.168.0.0/24 Direct 0 0 D 192.168.0.1 Vlanif50
192.168.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
192.168.1.0/24 Direct 0 0 D 192.168.1.1 Vlanif10
192.168.1.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
192.168.1.2/32 Direct 0 0 D 192.168.1.2 Vlanif10
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
127.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
Step 4 Configure the RIP processes to import external routes.
# On Switch B, set the default metric of imported routes to 3 and configure the RIP processes to import routes into each other's routing table.
[Switch B] rip 100
[Switch B-rip-100] default-cost 3
[Switch B-rip-100] import-route rip 200
[Switch B-rip-100] quit
[Switch B] rip 200
[Switch B-rip-200] import-route rip 100
[Switch B-rip-200] quit
# View the routing table of Switch A after the routes are imported.
[Switch A] display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 10 Routes : 10
Destination/Mask Proto Pre Cost Flags NextHop Interface
192.168.0.0/24 Direct 0 0 D 192.168.0.1 Vlanif50
192.168.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
192.168.1.0/24 Direct 0 0 D 192.168.1.1 Vlanif10
192.168.1.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
72
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
3 RIP Configuration
192.168.1.2/32 Direct 0 0 D 192.168.1.2 Vlanif10
192.168.2.0/24 RIP 100 4 D 192.168.1.2 Vlanif10
192.168.3.0/24 RIP 100 4 D 192.168.1.2 Vlanif10
192.168.4.0/24 RIP 100 4 D 192.168.1.2 Vlanif10
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
127.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
Step 5 Configure Switch B to filter the imported routes.
# Configure an ACL on Switch B and add a rule to the ACL. The rule denies the packets sent from 192.168.4.0/24.
[Switch B] acl 2000
[Switch B-acl-basic-2000] rule deny source 192.168.4.0 0.0.0.255
[Switch B-acl-basic-2000] rule permit
[Switch B-acl-basic-2000] quit
# Configure Switch B to filter the route to 192.168.4.0/24 that is imported from RIP200 according to the ACL rule.
[Switch B] rip 100
[Switch B-rip-100] filter-policy 2000 export
[Switch B-rip-100] quit
Step 6 Verify the configuration.
# View the RIP routing table of Switch A after the routes are filtered.
[Switch A] display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 9 Routes : 9
Destination/Mask Proto Pre Cost Flags NextHop Interface
192.168.0.0/24 Direct 0 0 D 192.168.0.1 Vlanif50
192.168.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
192.168.1.0/24 Direct 0 0 D 192.168.1.1 Vlanif10
192.168.1.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
192.168.1.2/32 Direct 0 0 D 192.168.1.2 Vlanif10
192.168.2.0/24 RIP 100 4 D 192.168.1.2 Vlanif10
192.168.3.0/24 RIP 100 4 D 192.168.1.2 Vlanif10
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
127.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
----End
Configuration Files
l Configuration file of Switch A
#
sysname Switch A
#
vlan batch 10 50
# interface Vlanif10
ip address 192.168.1.1 255.255.255.0
# interface Vlanif50
ip address 192.168.0.1 255.255.255.0
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 10
Issue 01 (2011-10-26) 73
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Issue 01 (2011-10-26)
port hybrid untagged vlan 10
# interface GigabitEthernet2/0/0
port hybrid pvid vlan 50
port hybrid untagged vlan 50
# rip 100
network 192.168.0.0
network 192.168.1.0
# return l
Configuration file of Switch B
#
sysname Switch B
#
vlan batch 10 20
# acl number 2000
rule 5 deny source 192.168.4.0 0.0.0.255
rule 10 permit
# interface Vlanif10
ip address 192.168.1.2 255.255.255.0
# interface Vlanif20
ip address 192.168.2.1 255.255.255.0
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# interface GigabitEthernet1/0/1
port hybrid pvid vlan 20
port hybrid untagged vlan 20
# rip 100
default-cost 3
network 192.168.1.0
filter-policy 2000 export
import-route rip 200
# rip 200
network 192.168.2.0
import-route rip 100
# return l Configuration file of Switch C
#
sysname Switch C
# vlan batch 20 30 40
# interface Vlanif20
ip address 192.168.2.2 255.255.255.0
# interface Vlanif30
ip address 192.168.3.1 255.255.255.0
# interface Vlanif40
ip address 192.168.4.1 255.255.255.0
# interface GigabitEthernet1/0/1
port hybrid pvid vlan 20
port hybrid untagged vlan 20
# interface GigabitEthernet1/0/2
port hybrid pvid vlan 30
port hybrid untagged vlan 30
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
3 RIP Configuration
74
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
# interface GigabitEthernet1/0/3
port hybrid pvid vlan 40
port hybrid untagged vlan 40
# rip 200
network 192.168.2.0
network 192.168.3.0
network 192.168.4.0
# return
3 RIP Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
75
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 4 RIPng Configuration
4
RIPng Configuration
About This Chapter
RIPng is an extension of RIP for support of IPv6.
4.2 RIPng Features Supported by the S9300
The RIPng features supported by the S9300 include split horizon and poison reverse.
4.3 Configuring Basic RIPng Functions
To implement RIPng features, you need to configure basic RIPng functions, including creating
RIPng processes and enabling RIPng on interfaces.
4.4 Configuring RIPng Route Attributes
By setting RIP route attributes, you can change RIPng routing policies.
4.5 Controlling the Advertising of RIPng Routing Information
4.6 Controlling the Receiving of RIPng Routing Information
4.7 Optimizing a RIPng Network
This section provides a configuration example of RIPng.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
76
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 4 RIPng Configuration
4.1 RIPng Overview
RIPng is a distance-vector routing protocol, which measures the distance to the destination host by the hop count.
The Routing Information Protocol Next Generation (RIPng) protocol is an extension of RIPv2 that is applied to IPv4 networks. Most RIP-related concepts are applicable to RIPng.
Extension of RIP
For IPv6 applications, RIPng extends RIP as follows: l
UDP port number: In RIPng, UDP port number 521 is used to send and receive routing information.
l
Multicast group address: In RIPng, FF02::9 is used as the multicast group address of RIPng routers.
l
Prefix length: In RIPng, the prefix length of a destination address is 128 bits (the mask length).
l
Next-hop address: In RIPng, a next-hop address is a 128-bit IPv6 address.
l Source address: In RIPng, link-local address FE80::/10 is used as the source address to send
RIPng Update packets.
Operation Principle of RIPng
RIPng is a distance-vector routing protocol. It exchanges routing information by using User
Datagram Protocol (UDP) packets through the port 521.
RIPng employs the hop count to measure the distance to the destination. The distance is called the routing metric. In RIPng, the hop count from the switch to its directly connected network is
0, and the hop count from the switch to a network, which can be reached through another switch, is 1. The hop count that is equal to or exceeds 16 is defined as infinity, indicating that the destination network or host is unreachable.
By default, RIPng sends an Update packet every 30 seconds. If no Update packet is received from a neighbor in 180 seconds, RIPng marks all the routes learned from the neighbor as unreachable. If no Update packet is received from a neighbor in 300 seconds, RIPng deletes the routes of the neighbor from the routing table.
To prevent routing loops, RIPng supports split horizon and poison reverse. In addition, RIPng can import routes from other routing protocols.
Each switch running RIPng manages a routing database, which contains routing entries to all accessible destinations on a network. These routing entries contain the following information: l Destination address: indicates the IPv6 address of a host or network.
l Next-hop address: indicates the address of the next switch to the destination.
l Interface: indicates the interface through which an IP packet is forwarded.
l Cost: indicates the hop count to the destination. The value is an integer that ranges from 0 to 16. If the value is 16, it indicates that the destination host or network is unreachable.
l Timer: indicates the time since a routing entry is last updated. The timer is reset to 0 when a routing entry is updated.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
77
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 4 RIPng Configuration l Route tag: indicates a label that differentiates routes of interior routing protocols and those of exterior routing protocols.
4.2 RIPng Features Supported by the S9300
The RIPng features supported by the S9300 include split horizon and poison reverse.
In the S9300, you can modify the routing policy of RIPng by configuring RIPng route attributes.
You can also control the advertising and receiving of RIPng routing information to meet the requirements of a complex network. On certain networks, you can configure RIPng features to optimize the RIPng network performance.
4.3 Configuring Basic RIPng Functions
To implement RIPng features, you need to configure basic RIPng functions, including creating
RIPng processes and enabling RIPng on interfaces.
4.3.1 Establishing the Configuration Task
To make a Switch learn the routes to the network segment of an interface, ensure that the link status of the interface is Up.
Applicable Environment
The configuration of basic RIPng functions involves the configuration of basic RIPng features.
After the configuration, the RIPng features are available.
During the RIPng configuration, you must enable RIPng in the system view first. If you run
RIPng-related commands in the interface view, these commands take effect only after RIPng is enabled in the system view.
Pre-configuration Tasks
Before configuring basic RIPng functions, complete the following tasks: l Enabling IPv6 on the switch l Configuring IPv6 addresses for interfaces to ensure that neighboring nodes are reachable at the network layer
Data Preparation
To configure basic RIPng functions, you need the following data.
No.
Data
1 RIPng process ID
2 Interface to be enabled with RIPng
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
78
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
4 RIPng Configuration
4.3.2 Enabling RIPng and Entering the RIPng View
Creating RIPng processes is the prerequisite to performing RIPng configurations. When creating
RIPng processes, you can also enter the RIPng view to perform configurations.
Context
Do as follows on the switch to be enabled with RIPng:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
ripng [ process-id ]
The RIPng process is enabled and the RIPng view is displayed.
When only one RIPng process runs, process-id does not need to be specified. That is, process-
id defaults to 1.
After the RIPng process is cancelled, the ripng process-id enable command needs to be reconfigured on an interface.
----End
4.3.3 Enabling RIPng in the Interface View
After an interface is associated with a RIPng process, routing information on this interface can be exchanged through RIPng.
Context
Do as follows on the switch to be enabled with RIPng:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
interface interface-type interface-number
The interface view is displayed.
The interface is at the network side of the switch. That is, the switch is connected to other devices through this interface. To enable the switch to learn routes to the network segment where the interface resides, ensure that the link status of the interface is Up.
Step 3 Run:
ripng process-id enable
Issue 01 (2011-10-26) 79
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
4 RIPng Configuration
RIPng is enabled on the specified interface.
NOTE
In the interface view, this command cannot be executed if IPv6 is not enabled.
If the switch connects to other devices through multiple interfaces, repeatedly perform Step 2 and Step 3.
----End
4.3.4 Checking the Configuration
After basic RIPng functions are successfully configured, you can view the configuration and routing information of RIPng.
Prerequisite
The configurations of basic RIPng functions are complete.
Procedure
l
Run the display ripng [ process-id | vpn6-instance vpn6-instance-name ] command to check the configuration of the RIPng process.
l Run the display ripng process-id route command to check all activated and inactivated
RIPng routes.
l Run the display ripng process-id statistics interface { all | interface-type interface-
number [ verbose | neighbor neighbor-ipv6-address ] } command to check statistics about
RIPng interfaces.
----End
Example
Run the display ripng [ process-id | vpn6-instance vpn6-instance-name ] command, and you can view the configuration of the specified RIPng process.
<Quidway> display ripng 100
Public vpn6-instance name :
RIPng process : 100
Preference : 100
Checkzero : Enabled
Default Cost : 0
Maximum number of balanced paths : 6
Update time : 30 sec Age time : 180 sec
Suppress time : 0 sec Garbage-Collect time : 120 sec
Number of periodic updates sent : 0
Number of trigger updates sent : 1
Number of routes in database : 1
Number of interfaces enabled : 1
Total Number of routes : 0
Total Number of routes in ADV DB is : 0
Run the display ripng process-id route command, and you can view all activated and inactivated
RIPng routes of the specified RIPng process.
<Quidway> display ripng 100 route
Route Flags: A - Aging, S - Suppressed, G - Garbage-collect
----------------------------------------------------------------
Peer FE80::200:5EFF:FE04:B602 on Vlanif60
Dest 3FFE:C00:C18:1::/64,
Issue 01 (2011-10-26) 80
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 4 RIPng Configuration
via FE80::200:5EFF:FE04:B602, cost 2, tag 0, A, 34 Sec
Dest 3FFE:C00:C18:2::/64,
via FE80::200:5EFF:FE04:B602, cost 2, tag 0, A, 34 Sec
Peer FE80::200:5EFF:FE04:B601 on Vlanif60
Dest 3FFE:C00:C18:1::/64,
via FE80::200:5EFF:FE04:B601, cost 2, tag 0, A, 13 Sec
Dest 3FFE:C00:C18:3::/64,
via FE80::200:5EFF:FE04:B601, cost 2, tag 0, A, 13 Sec
Peer FE80::200:5EFF:FE04:3302 on Vlanif60
Dest 100::/32,
via FE80::200:5EFF:FE04:3302, cost 2, tag 0, A, 6 Sec
Dest 4000:1::/64,
via FE80::200:5EFF:FE04:3302, cost 2, tag 0, A, 6 Sec
Dest 4000:2::/64,
via FE80::200:5EFF:FE04:3302, cost 2, tag 0, A, 6 Sec
Dest 4000:3::/64,
via FE80::200:5EFF:FE04:3302, cost 2, tag 0, A, 6 Sec
Dest 4000:4::/64,
Run the display default-parameter ripng command, and you can view the default configuration of the specified RIPng process.
<Quidway> display default-parameter ripng
--------------------------------------------------
Protocol Level Default Configurations:
--------------------------------------------------
Preference : 100
Checkzero : Enabled
Default-cost : 0
Maximum number of balanced paths : 6
Update time : 30 sec Age time : 180 sec
Suppress time : 0 sec Garbage-collect time : 120 sec
--------------------------------------------------
Interface Level Default Configurations:
--------------------------------------------------
Metricin : 0
Metricout : 1
Poison Reverse : Disabled
Split-Horizon
For Broadcast and P2P Interfaces : Enabled
For NBMA Interfaces and LoopBack : Disabled
Default-route : Disabled
Packet Transmit Interval : 200 msecs
Packet Transmit Number : 30
Run the display ripng process-id statistics interface command, and you can view statistics about the specified RIPng interface.
<Quidway> display ripng 1 statistics interface Vlanif10
Vlanif10(10.0.0.11)
Statistical information Last min Last 5 min Total
------------------------------------------------------------------
Periodic updates sent 5 23 259
Triggered updates sent 5 30 408
Response packet sent 10 34 434
Response packet received 15 38 467
Response packet ignored 0 0 0
Request packet sent 1 3 8
Request packet received 4 20 40
Request packet ignored 0 0 0
Bad packets received 0 0 0
Bad routes received 0 0 0
Packet authentication failed 0 0 0
4.4 Configuring RIPng Route Attributes
By setting RIP route attributes, you can change RIPng routing policies.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
81
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 4 RIPng Configuration
4.4.1 Establishing the Configuration Task
RIPng route attributes include the RIPng preference and interface metric.
Applicable Environment
In practice, to meet the requirements of a complex network, you can change RIPng routing policies by configuring RIPng route attributes. After performing configuration procedures in this section, you can: l Affect route selection by changing the additional metric of a RIPng interface.
l Change the matching order of routing protocols by configuring the RIPng preference when multiple routing protocols discover routes to the same destination.
l Implement load balancing among multiple equal-cost routes.
Pre-configuration Tasks
Before configuring RIPng route attributes, complete the following tasks: l Configuring IPv6 addresses for interfaces to ensure that neighboring nodes are reachable at the network layer l
3.3 Configuring Basic RIP Functions
Data Preparation
To configure RIPng route attributes, you need the following data.
2
3
No.
Data
1 Additional metric of the interface
RIPng preference
Maximum number of equal-cost routes
4.4.2 Configuring the RIPng Preference
When there are routes discovered by multiple routing protocols on the same router, you can make the router prefer RIPng routes by setting the RIPng preference.
Context
Each routing protocol has its preference, according to which a routing policy selects the optimal route. The RIPng preference can be set manually. The greater the value is, the lower the preference is.
Do as follows on the RIPng switch:
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
82
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
4 RIPng Configuration
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
ripng [ process-id ]
The RIPng process is enabled and the RIPng view is displayed.
Step 3 Run:
preference { preference | route-policy route-policy-name } *
The RIPng preference is set.
----End
4.4.3 Configuring Additional Metrics of an Interface
The additional metric is the metric (hop count) to be added to the original metric of a RIPng route. You can set additional metrics for received and sent RIPng routes by using different commands.
Context
l
The ripng metricin command is used to configure a device to add an additional metric to a received route before the device adds the route to its routing table, causing the metric of the route in the routing table to change. Running this command affects route selection on the device and other devices.
l The ripng metricout command is used to configure a device to add an additional metric to a route before the device advertises the route, keeping the metric of the route in the routing table unchanged. Running this command does not affect route selection on the local device or other devices.
You can specify the value of the metric to be added to the RIPng route that passes the filtering policy by specifying value1 through an IPv6 ACL or an IPv6 prefix list. If a RIPng route does not pass the filtering, its metric is increased by 1.
Do as follows on the RIPng switch:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
interface vlanif interface-number
The interface view is displayed.
Step 3 Run:
ripng metricin value
Issue 01 (2011-10-26) 83
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 4 RIPng Configuration
The metric added to a received route is set.
Step 4 Run:
ripng metricout { value | { acl6-number | acl6-name acl6-name | ipv6-prefix ipv6-
prefix-name } value1 }
The metric added to a sent route is set.
NOTE
If the switch connects to other RIPng switches through multiple interfaces, repeatedly perform Step 2 to
Step 4 until metrics of all links are set.
----End
4.4.4 Configuring the Maximum Number of Equal-Cost Routes
By setting the maximum number of equal-cost RIPng routes, you can change the number of routes for load balancing.
Context
Do as follows on the RIPng switch:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
ripng [ process-id ]
The RIPng process is enabled and the RIPng view is displayed.
Step 3 Run:
maximum load-balancing number
The maximum number of equal-cost routes is set.
----End
4.4.5 Checking the Configuration
After RIPng route attributes are successfully set, you can view the configuration and routing information of RIPng.
Prerequisite
The configurations of RIPng route attributes are complete.
Procedure
l Run the display ripng [ process-id | vpn6-instance vpn6-instance-name ] command to check the configuration of the RIPng process.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
84
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 4 RIPng Configuration l Run the display ripng process-id database command to check routes in the RIPng database.
l Run the display ripng process-id route command to check all activated and inactivated
RIPng routes.
----End
4.5 Controlling the Advertising of RIPng Routing
Information
To meet the requirements of complex networks, it is required to accurately control the advertising of RIPng routing information.
4.5.1 Establishing the Configuration Task
RIPng routing information can be advertised through route summarization, default routes, and imported external routes.
Applicable Environment
In practice, to meet the requirements of a complex network, you need to control the advertising of RIPng routing information accurately. After performing configuration procedures in this section, you can: l Advertise default routes to neighbors.
l Suppress interfaces from sending RIPng Update packets.
l Import external routes from various routing protocols and filter routes to be advertised.
Pre-configuration Tasks
Before configuring the switch to control the advertising of RIPng routing information, complete the following tasks: l Configuring IPv6 addresses for interfaces to ensure that neighboring nodes are reachable at the network layer l
3.3 Configuring Basic RIP Functions
Data Preparation
To control the advertising of RIPng routing information, you need the following data.
No.
Data
1 Metric of the default route to be advertised
2 Protocol name and process ID of the external route to be imported
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
85
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
4 RIPng Configuration
4.5.2 Configuring RIPng Route Summarization
By configuring a RIPng router to advertise the summarized IPv6 address on an interface, you can save the space used by RIPng routes in the routing table. You can also set parameters to prevent an interface from learning the same summarized route.
Context
This configuration is to configure the RIPng switch to advertise the summarized IPv6 prefix rather than specific routes on an interface.
Do as follows on the RIPng switch:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
interface vlanif interface-number
The interface view is displayed.
Step 3 Run:
ripng summary-address ipv6-address prefix-length [ avoid-feedback ]
RIPng route summarization is configured.
----End
4.5.3 Configuring RIPng to Advertise the Default Routes
There are two methods of advertising RIPng default routes. You can configure a router to advertise RIPng default routes according to the actual networking. Additionally, you can specify the cost of the default routes to be advertised.
Context
Do as follows on the RIPng switch:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
interface vlanif vlan-id
The VLANIF interface view is displayed.
Step 3 Run:
ripng default-route { only | originate } [ cost cost ]
Issue 01 (2011-10-26) 86
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
4 RIPng Configuration
RIPng is configured to advertise a default route.
You can configure RIPng to advertise default routes as required: l only: advertises only IPv6 default routes (::/0) and suppresses the advertising of other routes.
l originate: advertises IPv6 default routes (::/0) and does not affect the advertising of other routes.
A RIPng default route is forcibly advertised by using an Update packet through a specified interface, regardless of whether this route exists in the IPv6 routing table.
----End
4.5.4 Configuring the Default Cost for External Routes Imported by
RIPng
If RIPng imports routes from other routing protocols, but no metric is specified, you can set the default metric for imported external routes.
Context
Do as follows on the RIPng switch:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
ripng [ process-id ]
The RIPng view is displayed.
Step 3 Run:
default-cost cost
The default cost is set for the external routes imported by RIPng.
If no metric is specified, this command can be used to set the default cost for the external routes imported by RIPng from other routing protocols.
----End
4.5.5 Configuring RIPng to Import External Routes
Similar to RIP, RIPng can import external routes to enrich routing information.
Context
Do as follows on the RIPng switch:
Procedure
Step 1 Run:
Issue 01 (2011-10-26) 87
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 4 RIPng Configuration
system-view
The system view is displayed.
Step 2 Run:
ripng [ process-id ]
The RIPng view is displayed.
Step 3 (Optional) Run:
default-cost cost
The default cost is set for imported external routes.
Step 4 Run:
import-route protocol [ process-id ] [ cost cost | route-policy route-policy-name ]
*
External routes are imported.
If no cost is specified for imported routes, the default cost is used.
Step 5 (Optional) Run:
filter-policy { acl6-number | acl6-name acl6-name | ipv6-prefix ipv6-prefix-name }
export [ protocol [ process-id ] ]
RIPng is configured to filter the imported routing information.
RIPng can filter the imported routes based on an IPv6 ACL or an IPv6 prefix list. Only the routes that meet the match conditions are advertised to neighbors. If protocol is not specified in the command, all the routing information to be advertised will be filtered, including the imported routes and local RIPng routes (directly connected routes).
----End
4.5.6 Checking the Configuration
After the function of controlling the advertising of RIPng routing information is successfully configured, you can view RIPng routing information.
Prerequisite
The configurations of controlling the advertising of RIPng routing information are complete.
Procedure
l Run the display ripng process-id database command to check routes in the RIPng database.
l Run the display ripng process-id route command to check all activated and inactivated
RIPng routes.
----End
4.6 Controlling the Receiving of RIPng Routing Information
To meet the requirements of complex networks, it is required to accurately control the receiving of RIPng routing information.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
88
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 4 RIPng Configuration
4.6.1 Establishing the Configuration Task
Before controlling the receiving of RIPng routes, familiarize yourself with the applicable environment, complete the pre-configuration tasks, and obtain the data required for the configuration. This will help you complete the configuration task quickly and accurately.
Applicable Environment
In practice, to meet the requirements of a complicated networking environment, you need to control the receiving of RIPng routing information accurately. After performing configuration procedures in this section, you can: l Disable an interface from receiving RIPng Update packets.
l Filter the received routing information.
l Import external routes from various routing protocols and filter the imported routes.
Pre-configuration Tasks
Before configuring the switch to control the receiving of RIPng routing information, complete the following tasks: l Configuring IPv6 addresses for interfaces to ensure that neighboring nodes are reachable at the network layer l
Configuring Basic RIPng Functions
Data Preparation
To control the receiving of RIPng routing information, you need the following data.
No.
Data
1 ACL used to filter routing information
4.6.2 Configuring RIPng to Filter the Received Routes
By configure an IPv6 ACL or an IPv6 prefix list to filter received routes, you can configure a router to selectively receive routes.
Context
Do as follows on the RIPng switch:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
ripng [ process-id ]
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
89
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 4 RIPng Configuration
The RIPng view is displayed.
Step 3 Run:
filter-policy { acl6-number | acl6-name acl6-name | ipv6-prefix ipv6-prefix-name }
import
The imported routes are filtered.
You can specify an IPv6 ACL or an IPv6 prefix list to filter the imported routes. Only the routes that pass the filtering can be added to the RIPng routing table.
----End
4.6.3 Checking the Configuration
After the function of controlling the receiving of RIPng routing information is successfully configured, you can view RIPng routing information.
Prerequisite
The configurations of controlling the receiving of RIPng routing information are complete.
Procedure
l
Run the display ripng process-id database command to check routes in the RIPng database.
l Run the display ripng process-id route command to check all activated and inactivated
RIPng routes.
----End
4.7 Optimizing a RIPng Network
You can adjust and optimize the RIPng network performance by configuring RIPng timers, split horizon, poison reverse, and zero field check.
4.7.1 Establishing the Configuration Task
Before adjusting and optimizing the RIPng network performance, familiarize yourself with the applicable environment, complete the pre-configuration tasks, and obtain the data required for the configuration. This will help you complete the configuration task quickly and accurately.
Applicable Environment
On certain networks, you need to configure RIPng features and optimize the performance of a
RIPng network. After performing configuration procedures in this section, you can: l Change the convergence speed of the RIPng network by adjusting RIPng timers.
l Configure split horizon and poison reverse to prevent routing loops.
Pre-configuration Tasks
Before optimizing a RIPng network, complete the following tasks:
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
90
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 4 RIPng Configuration l Configuring IPv6 addresses for interfaces to ensure that neighboring nodes are reachable at the network layer l
Configuring Basic RIPng Functions
Data Preparation
To optimize a RIPng network, you need the following data.
No.
Data
1 Values of timers
4.7.2 Configuring RIPng Timers
RIPng has four timers: Update timer, Age timer, Suppress timer, and Garbage-collect timer. If the four RIPng timers are configured improperly, routes become unstable.
Context
NOTE
Route flapping occurs if the values of the four RIPng timers are set improperly. The relationship between the values is as follows: update must be smaller than age and suppress must be smaller than garbage-
collect. For example, if the update time is longer than the aging time, and a RIPng route changes within the update time, the switch cannot inform its neighbors of the change on time.
The Suppress timer does not take effect on the local system.
By default, the Update timer is 30s; the Age timer is 180s; the Suppress timer is 0s; the Garbagecollect timer is 120s.
Do as follows on the RIPng switch:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
ripng [ process-id ]
The RIPng view is displayed.
Step 3 Run:
timers ripng update age suppress garbage-collect
RIPng timers are configured.
----End
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
91
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
4 RIPng Configuration
4.7.3 Setting the Interval for Sending Update Packets and the
Maximum Number of Packets Sent Each Time
By setting the interval for sending packets and the maximum number of packets to be sent each time, you can optimize the RIPng performance.
Context
Do as follows on the RIPng switch:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
interface vlanif interface-number
The interface view is displayed.
Step 3 Run:
ripng pkt-transmit { interval interval | number pkt-count }
*
The interval for sending RIPng Update packets and the maximum number of packets sent each time are set on the specified interface.
----End
4.7.4 Configuring Split Horizon and Poison Reverse
You can configure split horizon and poison reverse to prevent routing loops.
Context
Split horizon is a method of preventing routing loops by preventing the switch from advertising a route back onto the interface from which the route is learned. On NBMA networks such as FR networks and X.25 networks, if no sub-interface is configured, split horizon must be disabled to ensure that routes are advertised correctly.
Poison reverse is another method of preventing routing loops by enabling the switch to advertise a route as unreachable back through the interface from which the route is learned.
If both split horizon and poison reverse are configured, only poison reverse takes effect.
Do as follows on the RIPng switch:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
Issue 01 (2011-10-26) 92
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 4 RIPng Configuration
interface vlanif interface-number
The interface view is displayed.
Step 3 Run the following command as required: l Run:
ripng split-horizon
Split horizon is enabled.
l Run:
ripng poison-reverse
Poison reverse is enabled.
----End
4.7.5 Enabling the Zero Field Check for RIPng Packets
In a RIPng packet, there are certain fields whose values must be 0. These fields are called zero fields. If the values of these zero fields in some RIPng packets are not 0s, these RIPng packets are ignored.
Context
Certain fields in a RIPng packet must be 0s, and these fields are called zero fields. If the values of these zero fields in a packet are not 0s, the packet is not processed.
Do as follows on the RIPng switch:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
ripng [ process-id ]
The RIPng view is displayed.
Step 3 Run:
checkzero
The zero field check is configured for RIPng packets.
----End
4.7.6 Checking the Configuration
After the function of adjusting and optimizing the RIPng network performance is successfully configured, you can view routing information, neighbor information, and interface information of RIPng.
Prerequisite
The configurations of adjusting and optimizing the RIPng network performance are complete.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
93
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Procedure
4 RIPng Configuration l Run the display ripng [ process-id | vpn6-instance vpn6-instance-name ] command to check the configuration of the RIPng process.
l Run the display ripng process-id database [ verbose ] command to check routes in the
RIPng database.
l Run the display ripng process-id interface [ interface-type interface-number ]
[ verbose ] command to check information about the RIPng interface.
l Run the display ripng process-id neighbor [ verbose ] command to check information about RIPng neighbors.
l Run the display ripng process-id route command to check all activated and inactivated
RIPng routes.
----End
4.8 Maintaining RIPng
RIPng maintenance is implemented through debugging. You need to note that debugging affects system performance.
Context
CAUTION
Debugging affects system performance. After debugging is complete, run the undo debugging
all command to disable debugging immediately.
When a RIPng fault occurs, run the following debugging commands in the user view to debug
RIPng and locate the fault.
For the procedure for displaying the debugging information, see the Quidway S9300 Terabit
Routing Switch Debugging Reference.
For the related debugging commands, see the Quidway S9300 Terabit Routing Switch
Debugging Reference.
Action
Enable the debugging of the specified RIPng process.
Command
debugging ripng process-id [ brief | error | event | job |
packet | receive | route-processing | send | timer ] |
miscellaneous
4.9 Configuration Examples
This section provides a configuration example of RIPng.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
94
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 4 RIPng Configuration
4.9.1 Example for Configuring RIPng to Filter the Received Routes
Networking Requirements
, the prefix length of all the IPv6 addresses is 64 bits. In addition, the
VLANIF interfaces between the neighboring Switches are assigned IPv6 link-local addresses.
All the Switches must learn IPv6 routing information on the network through RIPng. Switch B should filter the routes received from Switch C (3::/64). That is, Switch B does not add the routes to its own routing table or advertise the routes to Switch A.
Figure 4-1 Networking diagram for configuring RIPng to filter the received routes
SwitchB
VLANIF20
GE1/0/0
VLANIF30
GE2/0/0
SwitchA
GE2/0/0
GE1/0/0
VLANIF20
VLANIF10
1::1/64
GE1/0/0
VLANIF30
VLANIF50
3::1/64
SwitchC
VLANIF40
2::1/64
GE2/0/0
GE3/0/0
Device name
Switch A
Switch A
Switch B
Switch B
Switch C
Switch C
Switch C
Interface
GE2/0/0
GE1/0/0
GE1/0/0
GE2/0/0
GE1/0/0
GE2/0/0
GE3/0/0
VLANIF interface IP address
VLANIF 10 1::1/64
VLANIF 20
VLANIF 20
VLANIF 30
VLANIF 30
VLANIF 40
VLANIF 50
Generated automatically
Generated automatically
Generated automatically
Generated automatically
2::1/64
3::1/64
Configuration Roadmap
The configuration roadmap is as follows:
1.
Enable RIPng on each Switch so that the Switches can communicate with each other.
2.
Configure an ACL on Switch B to filter the received routes.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
95
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
4 RIPng Configuration
Data Preparation
To complete the configuration, you need the following data: l
IDs of the VLANs that the interfaces belong to, as shown in
l
RIPng1 enabled on each Switch l ACL6 2000 on Switch B, which rejects the routes from network segment 3::/64
Procedure
Step 1 Add interfaces to VLANs.
<Quidway> system-view
[Quidway] sysname Switch A
[SwitchA] vlan 10
[SwitchA-vlan10] quit
[SwitchA] interface GigabitEthernet 2/0/0
[SwitchA-GigabitEthernet2/0/0] port hybrid pvid vlan 10
[SwitchA-GigabitEthernet2/0/0] port hybrid untagged vlan 10
[SwitchA-GigabitEthernet2/0/0] quit
[SwitchA] vlan 20
[SwitchA-vlan20] quit
[SwitchA] interface GigabitEthernet 1/0/0
[SwitchA-GigabitEthernet1/0/0] port hybrid pvid vlan 20
[SwitchA-GigabitEthernet1/0/0] port hybrid untagged vlan 20
[SwitchA-GigabitEthernet1/0/0] quit
The configurations of Switch B and Switch C are similar to the configuration of Switch A and are not mentioned here.
Step 2 Assign IP addresses to the VLANIF interfaces.
[SwitchA] ipv6
[SwitchA] interface vlanif 10
[SwitchA-Vlanif10] ipv6 enable
[SwitchA-Vlanif10] ipv6 address 1::1/64
[SwitchA-Vlanif10] quit
[SwitchA] interface vlanif 20
[SwitchA-Vlanif20] ipv6 enable
[SwitchA-Vlanif20] ipv6 address auto link-local
[SwitchA-Vlanif20] quit
The configurations of Switch B and Switch C are similar to the configuration of Switch A and are not mentioned here.
Step 3 Configure the basic RIPng functions.
# Configure Switch A.
[Switch A] ripng 1
[Switch A-ripng-1] quit
[Switch A] interface vlanif 10
[Switch A-Vlanif10] ripng 1 enable
[Switch A-Vlanif10] quit
[Switch A] interface vlanif 20
[Switch A-Vlanif20] ripng 1 enable
[Switch A-Vlanif20] quit
# Configure Switch B.
[Switch B] ripng 1
[Switch B-ripng-1] quit
[Switch B] interface vlaif 20
[Switch B-Vlanif20] ripng 1 enable
[Switch B-Vlanif20] quit
[Switch B] interface vlanif 30
Issue 01 (2011-10-26) 96
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
4 RIPng Configuration
[Switch B-Vlanif30] ripng 1 enable
[Switch B-Vlanif30] quit
# Configure Switch C.
[Switch C] ripng 1
[Switch C-ripng-1] quit
[Switch C] interface vlanif 30
[Switch C-Vlanif30] ripng 1 enable
[Switch C-Vlanif30] quit
[Switch C] interface vlanif 40
[Switch C-Vlanif40] ripng 1 enable
[Switch C-Vlanif40] quit
[Switch C] interface vlanif 50
[Switch C-Vlanif50] ripng 1 enable
[Switch C-Vlanif50] quit
# Display the RIPng routing table of Switch B.
[Switch B] display ripng 1 route
Route Flags: A - Aging, S - Suppressed, G - Garbage-collect
----------------------------------------------------------------
Peer FE80::F54C:0:9FDB:1 on Vlanif30
Dest 2::/64,
via FE80::F54C:0:9FDB:1, cost 1, tag 0, A, 3 Sec
Dest 3::/64,
via FE80::F54C:0:9FDB:1, cost 1, tag 0, A, 3 Sec
Peer FE80::D472:0:3C23:1 on Vlanif20
Dest 1::/64,
via FE80::D472:0:3C23:1, cost 1, tag 0, A, 4 Sec
The preceding information shows that the RIPng routing table of Switch B contains the routes of network segment 3::/64.
# Display the RIPng routing table of Switch A.
[Switch A] display ripng 1 route
Route Flags: A - Aging, S - Suppressed, G - Garbage-collect
----------------------------------------------------------------
Peer FE80::476:0:3624:1 on Vlanif20
Dest 2::/64,
via FE80::476:0:3624:1, cost 2, tag 0, A, 21 Sec
Dest 3::/64,
via FE80::476:0:3624:1, cost 2, tag 0, A, 21 Sec
The preceding information shows that the RIPng routing table of Switch A contains the routes of network segment 3::/64 advertised by Switch B.
Step 4 Configure Switch B to filter the received routes.
[Switch B] acl ipv6 number 2000
[Switch B-acl6-basic-2000] rule deny source 3:: 64
[Switch B-acl6-basic-2000] rule permit
[Switch B-acl6-basic-2000] quit
[Switch B] ripng 1
[Switch B-ripng-1] filter-policy 2000 import
[Switch B-ripng-1] quit
Step 5 Verify the configuration.
# Check the RIPng routing table of Switch B. The RIPng routing table should not contain the routes of network segment 3::/64.
[Switch B] display ripng 1 route
Route Flags: A - Aging, S - Suppressed, G - Garbage-collect
----------------------------------------------------------------
Issue 01 (2011-10-26) 97
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 4 RIPng Configuration
Peer FE80::F54C:0:9FDB:1 on Vlanif30
Dest 2::/64,
via FE80::F54C:0:9FDB:1, cost 1, tag 0, A, 14 Sec
Peer FE80::D472:0:3C23:1 on Vlanif20
Dest 1::/64,
via FE80::D472:0:3C23:1, cost 1, tag 0, A, 25 Sec
# Check the RIPng routing table of Switch A. The RIPng routing table should not contain the routes of network segment 3::/64.
[Switch A] display ripng 1 route
Route Flags: A - Aging, S - Suppressed, G - Garbage-collect
----------------------------------------------------------------
Peer FE80::476:0:3624:1 on Vlanif20
Dest 2::/64,
via FE80::476:0:3624:1, cost 2, tag 0, A, 7 Sec
----End
Configuration Files
l Configuration file of Switch A
#
sysname Switch A
#
ipv6
#
vlan batch 10 20
# interface Vlanif10
ipv6 enable
ipv6 address 1::1/64
ripng 1 enable
# interface Vlanif20
ipv6 enable
ipv6 address auto link-local
ripng 1 enable
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 20
port hybrid untagged vlan 20
# interface GigabitEthernet2/0/0
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# ripng 1
# return l Configuration file of Switch B
#
sysname Switch B
#
ipv6
#
vlan batch 20 30
# acl ipv6 number 2000
rule 0 deny source 3::/64
rule 1 permit
# interface Vlanif20
ipv6 enable
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
98
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
ipv6 address auto link-local
ripng 1 enable
# interface Vlanif30
ipv6 enable
ipv6 address auto link-local
ripng 1 enable
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 20
port hybrid untagged vlan 20
# interface GigabitEthernet2/0/0
port hybrid pvid vlan 30
port hybrid untagged vlan 30
# ripng 1
filter-policy 2000 import
# return l Configuration file of Switch C
#
sysname Switch C
#
ipv6
#
vlan batch 30 40 50
# interface Vlanif30
ipv6 enable
ipv6 address auto link-local
ripng 1 enable
# interface Vlanif40
ipv6 enable
ipv6 address 2::1/64
ripng 1 enable
# interface Vlanif50
ipv6 enable
ipv6 address 3::1/64
ripng 1 enable
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 30
port hybrid untagged vlan 30
# interface GigabitEthernet2/0/0
port hybrid pvid vlan 40
port hybrid untagged vlan 40
# interface GigabitEthernet3/0/0
port hybrid pvid vlan 50
port hybrid untagged vlan 50
# ripng 1
# return
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
4 RIPng Configuration
99
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 5 OSPF Configuration
5
OSPF Configuration
About This Chapter
Issue 01 (2011-10-26)
OSPF, which is developed by the IETF, is a link-state IGP. OSPF is widely used in access networks and MANs.
OSPF is a link-state IGP. At present, OSPFv2 is intended for IPv4.
5.2 OSPF Features Supported by the S9300
The S9300 supports various OSPF features, including multi-process, authentication, hot standby,
5.3 Configuring Basic OSPF Functions
Before building OSPF networks, you need to configure basic OSPF functions.
5.4 Establishing or Maintaining OSPF Neighbor Relationship
5.5 Configuring OSPF Stub Areas
5.6 Configuring OSPF NSSA Areas
5.7 Configuring OSPF Virtual Links
5.8 Configuring OSPF Attributes in Different Types of Networks
5.9 Configuring OSPF Route Attributes
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
100
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 5 OSPF Configuration
5.10 Controlling OSPF Routing Information
5.11 Optimizing an OSPF Network
5.15 Configuring the Network Management Function of OSPF
OSPF supports the network management function. You can bind the OSPF MIB to a certain
OSPF process, and configure the trap function and log function.
5.16 Improving Security of an OSPF Network
On a network demanding high security, you can configure OSPF authentication and adopt the
GTSM mechanism to improve the security of the OSPF network.
Maintaining OSPF involves resetting OSPF and clearing OSPF statistics.
This section provides several configuration examples of OSPF.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
101
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 5 OSPF Configuration
5.1 OSPF Overview
OSPF is a link-state IGP. At present, OSPFv2 is intended for IPv4.
Defined by the Internet Engineering Task Force (IETF), the Open Shortest Path First (OSPF) protocol is an Interior Gateway Protocol (IGP) implemented on the basis of the link status.
NOTE
In this chapter, OSPF refers to OSPFv2, unless otherwise specified.
OSPF Features
OSPF has the following features: l Wide applications
OSPF is applicable to networks of various sizes and even to the network consisting of hundreds of routers.
l
Fast convergence
Once the network topology changes, Update packets are transmitted to synchronize the link state databases (LSDBs) of all the routers within the Autonomous System (AS).
l Loop-free
According to the collected link status, OSPF calculates routes with the shortest path tree algorithm. This algorithm ensures the generation of loop-free routes.
l Area division
An AS can be divided into different areas to facilitate AS management. After the area partition, an LSDB stores routing information only of the local area. The reduce of LSDB size dramatically reduces memory and CPU usage. In addition, less bandwidth is consumed because of the decrease in routing information transmitted within the AS.
l Equal-cost routes
OSPF supports multiple equal-cost routes to the same destination.
l Routing hierarchy
Four types of routing are available. They are listed in the descending order of priority: intraarea routes, inter-area routes, Type 1 external routes, and Type 2 external routes.
l Authentication
Area-based and interface-based packet authentication guarantees the security of packet interaction.
l
Multicast
Multicast packets are transmitted only on certain types of links to reduce the interference for some devices.
Process of OSPF Route Calculation
The process of calculating OSPF routes is as follows:
1.
Based on the surrounding network topology, each OSPF device originates a Link State
Advertisement (LSA). The switch then transmits Update packets containing the LSAs to other OSPF devices.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
102
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 5 OSPF Configuration
2.
Each OSPF device collects the LSAs from other devices, and all these LSAs compose the
LSDB. An LSA describes the network topology around a switch, whereas an LSDB describes the network topology of the whole AS.
3.
OSPF devices transform the LSDB into a weighted directed map. The weighted directed map reflects the topology of the entire network. All switches in the same area have the same map.
4.
According to the directed map, each switch uses the Shortest Path First (SPF) algorithm to calculate the shortest path tree, regarding itself as the root. The tree displays the routes to each node in the AS.
Area Division
The number of switches increases with the unceasing expansion of the network scale. This leads to a large LSDB on each switch. As a result, the load of each switch is very heavy. OSPF solves this problem by dividing an AS into different areas. An area is regarded as a device group logically. Each group is identified by an area ID. On the border of an area resides a switch rather than a link. A network segment (or a link) belongs to only one area. That is, the area to which
each OSPF interface belongs must be specified, as shown in
Figure 5-1 OSPF area division
Area1
Area0
Area4
Area2 Area3
After area division, route aggregation can be performed on border routers to reduce the number of LSAs advertised to other areas. Route aggregation also minimizes the influence caused by changes in the topology.
Router Type
OSPF routers are classified into the following types according to their locations in the AS: l Internal routers
All interfaces of the switches of this type belong to the same OSPF area.
l Area border routers (ABRs)
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
103
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 5 OSPF Configuration
The switches of this type can belong to more than two areas, but one of the areas must be a backbone area. An ABR is used to connect the backbone area to the non-backbone areas.
An ABR can be physically or logically connected to the backbone area.
l
Backbone routers
A minimum of one interface on the switch of this type belongs to the backbone area.
Therefore, all ABRs and the internal nodes in Area 0 are backbone routers.
l AS boundary routers (ASBRs)
The switch that exchanges routing information with other ASs is called an ASBR. The
ASBR may not be located on the boundary of an AS. It can be an internal router or an ABR.
When an OSPF device imports the external routing information, the device becomes an
ASBR.
Figure 5-2 Types of OSPF routers
IS-IS ASBR
Area1
Internal
Router
Area0
Area4
Backbone
Router
Area2
ABR
Area3
OSPF Network Types
OSPF classifies networks into four types according to the link layer protocol: l Broadcast: If the link layer protocol is Ethernet or FDDI, OSPF defaults the network type to broadcast. In this type of networks, the following situations occur.
–
Hello packets and packets from the Designated Router (DR) are sent in multicast mode
(224.0.0.5: indicates the reserved IP multicast addresses for OSPF routers).
– Link State Update (LSU) packets are sent to the DR in multicast mode (224.0.0.6: indicates the reserved IP multicast address for the OSPF DR), and the DR forwards the
LSU packets to destination 224.0.0.5.
–
Database Description (DD) packets, Link State Request (LSR) packets, and all retransmission packets are sent in unicast mode.
– Link State Acknowledgement (LSAck) packets are usually sent in multicast mode
(224.0.0.5). When a switch receives repeated LSAs, or the LSAs are deleted due to the timeout of the maximum lifetime, LSAck packets are sent in unicast mode.
l Non-Broadcast Multi-Access (NBMA): If the link layer protocol is Frame Relay, ATM, or
X.25, OSPF defaults the network type to NBMA. In this type of networks, protocol packets,
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
104
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 5 OSPF Configuration such as Hello packets, DD packets, LSR packets, LSU packets, and LSAck packet, are transmitted in unicast mode.
l Point-to-Multipoint (P2MP): A P2MP network must be forcibly changed from other network types. In this type of networks, Hello packets are transmitted in multicast mode
(224.0.0.5); DD packets, LSR packets, LSU packets, and LSAck packets are transmitted in unicast mode.
l Point-to-Point (P2P): If the link layer protocol is PPP, HDLC, or LAPB, OSPF defaults the network type to P2P. In this type of networks, protocol packets, such as Hello packets, DD packets, LSR packets, LSU packets, and LSAck packets, are transmitted in multicast mode
(224.0.0.5).
5.2 OSPF Features Supported by the S9300
The S9300 supports various OSPF features, including multi-process, authentication, hot standby,
Smart-discover, local MT, GR, TE, DS-TE,VPN multi-instance, sham link, BFD, IGP Shortcut, forwarding adjacency, and GTSM.
Multi-process
OSPF supports multi-process. More than one OSPF process can run on the same switch because processes are mutually independent. Route interaction between different OSPF processes is similar to the interaction between different routing protocols.
An interface of a switch belongs to only a certain OSPF process.
A typical application of OSPF multi-process is to run OSPF between PEs and CEs in the VPN where OSPF is also adopted in the backbone network. On the PEs, the two OSPF processes are independent of each other.
Authentication
OSPF supports packet authentication. Only the OSPF packets that pass the authentication can be received. If the packets fail to pass the authentication, the neighbor relationship cannot be established.
The S9300 supports two authentication modes: l Area authentication mode l Interface authentication mode
If both modes are available, the latter is preferred.
Hot Backup and GR
The switch with a distributed structure supports OSPF hot standby (HSB). OSPF backs up necessary information from the active main board (AMB) to the standby main board (SMB).
When the AMB fails, the SMB replaces it to ensure the normal operation of OSPF.
OSPF supports two types of HSB: l Backing up all OSPF data: After the switchover between the AMB and the SMB, OSPF restores its normal work immediately.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
105
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing l Backing up only the OSPF configuration: After the switchover between the AMB and the
SMB, OSPF performs graceful restart (GR), obtains the adjacency relationship from neighbors, and synchronizes the LSDBs.
Smart-discover
Generally, switches periodically send Hello packets through interfaces that run OSPF, switches set up and maintain the neighbor relationship, and elect the DR and the Backup
Designated Router (BDR) on the multi-access network (broadcast or NBMA) by exchanging
Hello packets. When establishing the neighbor relationship or electing the DR and the BDR on the multi-access network, interfaces can send Hello packets only when the Hello timer expires.
This affects the speed for establishing the neighbor relationship and electing the DR and the
BDR.
NOTE
l The interval for sending Hello packets on an interface depends on the interval for sending Hello packets set on the interface.
l The default value of the interval for sending Hello packets varies with the network type.
The Smart-discover function can solve the preceding problem.
l In broadcast and NBMA networks, the neighbor relationship can be established rapidly and a DR and a BDR on the networks can be elected rapidly.
When the neighbor status becomes 2-way for the first time, or it returns to Init from the 2way or higher state as shown in
, the interface enabled with the Smart-discover
function sends Hello packets to the neighbor without waiting for the timeout of the Hello timer when the interface finds that the status of the neighbor changes.
When the interface status of the DR and the BDR in the multi-access network changes, the interface enabled with the Smart-discover function sends Hello packets to the network segment and takes part in the DR or BDR election.
Figure 5-3 Changes of the neighbor state machine
5 OSPF Configuration
Down Init 2-way Exstart Exchange Loading Full
Attempt
(NBMA) l On P2P and P2MP networks, the adjacency relationship can be established rapidly. The principle is the same as that in broadcast and NBMA networks.
Local MT
Issue 01 (2011-10-26)
When multicast and a MultiProtocol Label Switching (MPLS) Traffic Engineering (TE) tunnel are deployed in a network simultaneously, services become unavailable because the multicast function may be affected by the TE tunnel. This is because after the TE tunnel is enabled with
IGP Shortcut, the outgoing interface of the route calculated by IGP is not the actual physical interface but a TE tunnel interface. According to the unicast route to the multicast source address,
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
106
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 5 OSPF Configuration a switch sends a Join message through a TE tunnel interface. Routers spanned by the TE tunnel cannot sense the Join message, and thus multicast forwarding entries cannot be created. The TE tunnel is unidirectional, so multicast data packets sent by the multicast source are sent to the switches spanned by the TE tunnel through related physical interfaces. The switches, however, do not have multicast forwarding entries. As a result, the multicast data packets are discarded.
Services thus become unavailable.
When a network runs the OSPF protocol, you can enable OSPF local Multicast-Topology (MT) to solve the problem of multicast traffic interruption caused by the conflict between multicast and the TE tunnel. After local MT is enabled, multicast packets can be correctly forwarded. If the outgoing interface of the calculated route is a TE tunnel interface of IGP-Shortcut type, a switch adds a route of the physical outgoing interface to the MIGP routing table. Multicast uses routes in the MIGP routing table to forward packets.
NOTE
For details of local MT, refer to the chapter "IP Multicast Overview" in the Quidway S9300 Terabit Routing
Switch Feature Description - IP Multicast.
OSPF GR
When a switch restarts or performs the active/standby switchover, it directly ages all routing entries in the Forward Information Base (FIB) table. This results in route interruption. In addition, neighboring switches remove this switch from the neighbor list, and notify other switches. This causes the re-calculation of SPF. If this switch recovers within a few seconds, the neighbor relationship becomes unstable. This results in route flapping.
After being enabled with OSPF Graceful Restart (GR), a switch can ensure continuous packet forwarding if it restarts just for abnormities. In such a case, route flapping is avoided during the short restart of the switch.
NOTE
Unless otherwise specified, "protocol restart" in this document refers to restarting OSPF in GR mode.
When a switch restarts OSPF, the GR Restarter does not age the forwarding information. At the same time, the GR Helper keeps the topology information or routes obtained from the GR
Restarter for a period. This ensures that traffic forwarding is not interrupted when protocol restart occurs.
OSPF and DS-TE
OSPF TE supports the establishing and maintaining of the Label Switch Path (LSP) of the TE.
When constructing constraint-based routed LSP (CR LSP), MPLS needs information about the traffic attributes of all the links in the area. With the help of the OSPF, MPLS obtains traffic engineering information about the links.
OSPF supports a new type of LSAs called opaque LSA. The opaque LSA can carry TE information. You can use the related commands to configure OSPF to support or not support the originating and handling of the opaque LSA that carries TE information.
Difference service aware TE (DS-TE) is primarily used to optimize and assign network transmission resources, classify the traffic, and specify the percentage of each traffic to the link bandwidth. Traffic engineering is implemented based on each divided class (aggregated class with fine granularity) instead of an aggregated class (aggregated class with coarse granularity).
This enhances the performance and utility of the bandwidth.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
107
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 5 OSPF Configuration
To support DS-TE in MPLS, OSPF supports Local Overbooking Multiplier TLV and bandwidth constraint (BC) TLV.
NOTE
For details of OSPF TE configurations, refer to the Quidway S9300 Terabit Routing Switch Configuration
Guide - MPLS.
IGP Shortcut and Forwarding Adjacency
OSPF TE supports either IGP shortcut aor Forwarding Adjacency (FA). This two features allow
OSPF TE to establish an LSP to reach a specified destination. Without the two features, OSPF cannot use the LSP as an outgoing interface even if the LSP to the destination exists.
The differences between IGP Shortcut and forwarding adjacency are as follows: l If only forwarding adjacency is enabled, OSPF can reach the destination by using the LSP.
l If only IGP Shortcut is enabled, only the switch enabled with IGP Shortcut can use the
LSP.
NOTE
For detailed configuration of this feature, refer to the Quidway S9300 Terabit Routing Switch Configuration
Guide - MPLS.
OSPF VPN Multi-instance
OSPF supports multi-instance, which can run between PEs and CEs in VPN networks.
In BGP MPLS VPN, many sites of one VPN can use OSPF as the internal routing protocol. The sites, however, are handled as being from different ASs. In this way, the OSPF routes learned on one site are transmitted as external routes to another site. This causes a heavy OSPF traffic and some avoidable network management problems.
In the S9300 implementation, you can configure domain IDs on a PE to differentiate the VPNs where different sites reside. Different sites in one VPN consider each other as if they were connected directly. Thus, PEs exchange OSPF routing information as if they were directly connected through a leased line. This improves network management and enhances the validity of the OSPF application.
NOTE
For detailed configuration of this feature, refer to the Quidway S9300 Terabit Routing Switch Configuration
Guide - VPN.
OSPF Sham Links
OSPF sham links are unnumbered P2P links between two PEs over an MPLS VPN backbone network.
Generally, BGP extended community attributes carry routing information over the MPLS VPN backbone between BGP peers. OSPF running on the remote PE uses this information to generate
Type3 summary LSAs from PE to CE. These routes are considered as inter-area routes.
If a switch, however, connects to PEs in its own area and establishes an intra-area route (backdoor route) to a particular destination, the VPN traffic always traverses the backdoor route rather than the backbone route. This is because OSPF intra-area routes in the routing table have relatively higher priorities. To prevent this, an unnumbered P2P sham link is configured between the PEs.
This provides an intra-area path with a lower cost to the PE.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
108
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 5 OSPF Configuration
NOTE
For configurations of OSPF sham links, refer to the Quidway S9300 Terabit Routing Switch Configuration
Guide - VPN.
BFD for OSPF
By default, in broadcast networks, the interval for OSPF to send Hello packets is 10 seconds; in
NBMA networks, the interval for sending Hello packets is 30 seconds, and the period for advertising that the neighbor is Down is four times the interval for sending Hello packets. If the switch does not receive the Hello packet from the neighbor before the neighboring switch becomes invalid, it deletes the neighbor. That is, the switch detects the neighbor faults in seconds.
This leads to the loss of a large number of packets in a high-speed network.
To solve the preceding problem in the current detection mechanism, Bidirectional Forwarding
Detection (BFD) is developed. BFD can implement detection at the millisecond level. Instead of replacing the Hello mechanism of OSPF, BFD works with OSPF to fast detect the adjacency fault. BFD is used to notify OSPF of recalculating routes. This can correctly guide the packet forwarding.
Routing Management (RM) module exchanges routing information with the BFD module.
Through RM, OSPF notifies BFD of dynamically setting up or deleting BFD sessions. The Event message of BFD is delivered to OSPF through RM.
The process of establishing and deleting a BFD session is as follows: l Process of establishing a BFD session: If BFD feature is globally configured, BFD is enabled on an interface or a process, and the status of the OSPF neighbor is Full, OSPF uses RM to notify the BFD module of establishing the BFD session and negotiate related parameters of BFD.
l
Process of deleting a BFD session: When BFD detects a link fault, BFD generates a Down event and notifies the upper protocol of the fault through RM. OSPF then responds to the event and immediately deletes the adjacency relationship on the link. At this time, the status of the neighbor is not Full. This does not meet the requirements of establishing a BFD session. OSPF then uses RM to notify the BFD module of deleting the BFD session.
OSPF supports dynamically establishing or deleting a BFD session on broadcast, P2P, P2MP, and NBMA links.
Configure BFD according to the actual network environment. If time parameters are set incorrectly, network flapping occurs.
OSPF-BGP
When a new switch is connected to the network, or a switch restarts, the network traffic may be lost during BGP convergence. This is because the IGP route convergence is quicker than the
BGP route convergence.
If the backup link exists, OSPF-BGP linkage makes a switch that restarts or a switch that is connected to the network start the stub router timer during the OSPF-BGP linkage. During the set linkage period, the switch acts as the stub router by increasing the metrics of the links in the
LSA generated by the switch to 65535. Other OSPF routers are notified of not using the stub router to forward data. This ensures that the switch is not used as the spanned router. This avoids traffic loss during traffic switchback because route convergence speed is slower than that of
OSPF.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
109
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
GTSM
5 OSPF Configuration
The Generalized TTL Security Mechanism (GTSM) refers to the generic TTL security protection mechanism. GTSM protects services of the upper layer over the IP layer by checking whether the TTL value in the IP header is in a pre-defined range. In applications, GTSM is designed to protect the TCP/IP-based control plane (like routing protocols) from CPU-utilization attacks, such as CPU overload attacks.
5.3 Configuring Basic OSPF Functions
Before building OSPF networks, you need to configure basic OSPF functions.
5.3.1 Establishing the Configuration Task
You can run OSPF commands in the interface view regardless of whether OSPF is enabled.
When OSPF is disabled, the related commands configured in the interface view still exist.
Applicable Environment
Before configuring OSPF, enable OSPF after specifying the OSPF process and OSPF area ID.
NOTE
When multiple switches are configured in the same area, most configuration data (such as timer, filter, and aggregation) should be kept consistent in the entire area. Wrong configuration may make neighboring switches fail to send messages to each other, and even leads to path congestion or routing loop.
Pre-configuration Tasks
Before configuring basic OSPF functions, complete the following tasks: l Configuring a link layer protocol l Configuring IP addresses for interfaces to make neighboring nodes reachable
Data Preparation
To configure basic OSPF functions, you need the following data.
4
5
2
3
No.
Data
1 Router ID
OSPF process ID
VPN instance name (if OSPF VPN multi-instance is configured)
Areas to which each interface belongs
IP address of the network segment where the interface resides
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
110
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 5 OSPF Configuration
5.3.2 Enabling OSPF and Entering the OSPF View
Creating an OSPF process is a prerequisite for configuring all OSPF features. When creating an
OSPF process, you can manually specify the router ID for a router.
Context
To ensure the stability of OSPF, you need to manually set the router ID of each device during network planning. When configuring router IDs for switches, ensure that IDs of any two switches in the AS are different. Generally, you can set the router ID the same as the IP address of a certain interface on the switch.
The S9300 supports OSPF multi-processes. When multiple OSPF processes are enabled on the
S9300, you need to specify different process IDs. The OSPF process ID is valid in the local area, which does not affect packet exchange between other S9300s. Different S9300s, therefore, can also exchange packets even with different process IDs.
Do as follows on each OSPF router:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
ospf [ process-id | router-id router-id ]
The OSPF process is enabled and the OSPF view is displayed.
The S9300 supports OSPF multi-instance. To configure OSPF in a VPN instance, run the ospf
[ process-id | router-id router-id | vpn-instance vpn-instance-name ]
*
command. If the VPN instance is specified, the OSPF process belongs to the specified instance. Otherwise, the OSPF process belongs to the global instance.
NOTE
The router ID of each OSPF process must be unique on the entire network; otherwise, the OSPF neighbor relationship cannot be set up and routing information is incorrect. Configuring a unique router ID for each
OSPF process on each OSPF device is recommended.
----End
5.3.3 Configuring the Network Segments Included by Each Area
By dividing an AS into different areas, specifying OSPF interfaces, and specifying areas to which these interfaces belong, OSPF can discover and calculate routes in an AS.
Context
A network segment refers to one of the IP addresses of the interfaces that run the OSPF protocol.
A network segment belongs to only one area; that is, you must specify the area for each interface running OSPF.
Do as follows on each OSPF router.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
111
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 5 OSPF Configuration
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
ospf [ process-id ]
The OSPF process view is displayed.
Step 3 Run:
area area-id
The OSPF area view is displayed.
Step 4 Run:
network ip-address wildcard-mask [ description text ]
The network segments in the areas are configured. In the command, description is used to configure a description for the specified OSPF network segment.
OSPF can run on an interface only when the following conditions are satisfied: l Mask length of the IP address of an interface is not shorter than that in the network command.
l Master IP address of an interface must belong to the network segment specified by the
network command.
For a loopback interface, by default, OSPF advertises its IP address in 32-bit host route, regardless of the mask length of the IP address on the interface. To advertise the segment route of the loopback interface, configure the network type as NBMA or broadcast in the interface view. For details, see
5.8.2 Configuring Network Types of OSPF Interfaces
----End
5.3.4 Checking the Configuration
After basic OSPF functions are configured, you can check OSPF statistics, LSDB information, and information about neighbors in each area.
Prerequisite
The configurations of Configuration of Basic OSPF function are complete.
Procedure
l Run the display ospf [ process-id ] cumulative command to check the OSPF statistics.
l Run the display ospf [ process-id ] lsdb command to check LSDB information of OSPF.
l Run the display ospf [ process-id ] peer command to check information about OSPF neighboring routers.
l Run the display ospf [ process-id ] routing command to check information about the OSPF routing table.
----End
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
112
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Example
5 OSPF Configuration
Run the display ospf peer command. If the status of the OSPF neighbor is Full, it means that
OSPF neighbor is correctly established. For example:
<Quidway> display ospf peer
OSPF Process 1 with Router ID 10.1.1.2
Neighbors
Area 0.0.0.0 interface 10.1.1.2(Vlanif10)'s neighbors
Router ID: 10.1.1.1 Address: 10.1.1.1 GR State: Normal
State: Full Mode:Nbr is Slave Priority: 1
DR: 10.1.1.1 BDR: None MTU: 0
Dead timer due in 35 sec
Retrans timer interval: 5
Neighbor is up for 00:00:05
Authentication Sequence: [ 0 ]
5.4 Establishing or Maintaining OSPF Neighbor
Relationship
On an OSPF network, all routing information is transmitted and exchanged between neighboring or adjacent routers. By maintaining neighbor relationships or adjacencies, you can stabilize the entire network.
5.4.1 Establishing the Configuration Task
When setting parameters on an interface, ensure that these parameters are consistent with those on the adjacent router.
Applicable Environment
In actual applications, establishing or maintaining OSPF neighbor relationship is prerequisite to constructing an OSPF network.
Through the following procedures, you can: l Adjust convergence speed of the OSPF network and network load generated from protocol packets by modifying timers of OSPF packets.
l
Enable OSPF to disconnect with the neighbor when the number of times for OSPF to retransmit packets exceeds the threshold by configuring Retransmission Limitation for
OSPF (RL-OSPF). This avoids an infinite loop caused by non-stop packet retransmission when the neighbor does not receive packets.
l In the following types of networking, you can speed up the route convergence in the networks by rationally configuring the intervals for updating and receiving LSAs:
–
For the stable networking with high requirements on the route convergence time, you can set the interval for updating or receiving LSAs to 0. In this manner, the change of the topology or routes can be sensed immediately or be advertised to the network through LSAs. This speeds up the route convergence in the network.
– For the networking with frequent route flapping, you can rationally configure the interval for updating or receiving LSAs, or start an intelligent timer to suppress a large number of LSAs from being updated or received. This prevents OSPF from occupying excessive network bandwidth and router resources.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
113
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 5 OSPF Configuration
Pre-configuration Tasks
Before establishing or maintaining OSPF neighbor relationship, complete the following tasks: l Configuring IP addresses for interfaces to make neighboring nodes reachable l
Configuring Basic OSPF Functions
Data Preparation
To establish or maintain OSPF neighbor relationship, you need the following data.
4
5
2
3
No.
Data
1 Number of the interface running OSPF
Interval for sending Hello packets and Dead packets.
Maximum number of retransmission times
Interval for transmitting LSAs
Number of update LSAs to be flooded or interval for flooding update LSAs
5.4.2 Configuring the Interval for Sending Hello Packets
By adjusting the Hello interval set on OSPF neighbors, you can change the speed of establishing the neighbor relationship, thus changing the speed of network convergence.
Context
The Hello intervals set on the interfaces connecting two OSPF neighbors need to be the same.
Do as follows on the OSPF router:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
interface vlanif interface-number
The interface view is displayed.
Step 3 Run:
ospf timer hello interval
The interval for sending Hello packets on the interface is set.
By default, the Hello interval of a P2P or broadcast interface on the switch is 10 seconds; the
Hello interval of a P2MP or NBMA interface on the switch is 30 seconds.
A smaller value of interval means faster detection of topology changes and higher bandwidth consumption on the network.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
114
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
5 OSPF Configuration
The value of interval must be the same on the directly connected interfaces of two neighboring routers.
----End
5.4.3 Configuring Smart-discover
After Smart-discover is configured, when the neighbor status of a router changes or the DR or
BDR on the multi-address network (broadcast network or NBMA network) changes, a router sends Hello packets to its neighbor immediately without waiting for the Hello timer to expire.
Context
Do as follows on the switches in the area as required:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
interface vlanif interface-number
The interface view is displayed.
Step 3 Run:
ospf smart-discover
The Smart-discover function is enabled on the interface.
----End
5.4.4 Configuring Dead Time of Neighbor Relationship
If a router does not receive a Hello packet from its neighbor within the Holddown time, the router considers the neighbor relationship invalid.
Context
Do as follows on the OSPF router:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
interface vlanif interface-number
The interface view is displayed.
Step 3 Run:
ospf timer dead interval
Issue 01 (2011-10-26) 115
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 5 OSPF Configuration
The dead time during which the neighbor relationship becomes invalid is set.
If the switch does not receive Hello packets from a neighbor within the dead interval, the switch considers the neighbor as invalid. By default, the dead interval of a P2P or broadcast interface on the switch is 40 seconds; the dead time of a P2MP or NBMA interface on the switch is 120 seconds.
By default, the dead interval on the same interface should be four times the interval for sending
Hello packets.
NOTE
Setting the dead interval of an OSPF neighbor to be longer than 20s is recommended. If the dead interval of an OSPF neighbor is shorter than 20s, the session may be closed.
----End
5.4.5 Configuring OSPF Retransmission Limit
By limiting the number of DD packet retransmissions, Update packet retransmissions, or Request packet retransmissions, you can close the neighbor relationship when the number of packet retransmissions reaches the specified value.
Context
The OSPF packet retransmission mechanism is applicable to DD packets, LSU packets, and
LSR packets. When the response packets of the three types of packets are not received, the mechanism is used to limit the number of packet retransmission times. When the number of transmission times reaches the specified value, the neighbor relationship is interrupted.
Do as follows on the OSPF router.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
ospf [ process-id ]
The OSPF process view is displayed.
Step 3 Run:
retransmission-limit [ max-number ]
The OSPF retransmission limit is configured.
By default, the function is disabled.
----End
5.4.6 Configuring the Interval for Updating and Receiving LSAs
You can set the LSA interval according to network connections and router resources.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
116
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Context
5 OSPF Configuration
The OSPF protocol defines that the interval for updating LSAs is 5 seconds. The setting is expected to prevent network connections or frequent routing flapping from occupying excessive bandwidth and router resources.
When the network is stable and fast route convergence is required, you can cancel the interval for updating LSAs by setting the interval to 0. Thus, changes of the topology or routes can be immediately advertised to the network through LSAs. This speeds up route convergence in the network.
Do as follows on the OSPF router.
Procedure
l Configuring the Interval for Updating LSAs
1.
Run:
system-view
The system view is displayed.
2.
Run:
ospf [ process-id ]
The OSPF process view is displayed.
3.
Run:
lsa-originate-interval { 0 | intelligent-timer max-interval start-
interval hold-interval [ other-type interval ] | other-type interval
[ intelligent-timer max-interval start-interval hold-interval ] }
The interval for updating LSAs is set.
By default, the intelligent timer is enabled. The interval for updating LSAs is expressed in milliseconds. The maximum interval is 5000 milliseconds (ms), the initial interval is 500 ms, and the Holdtime interval is 1000 ms. After an intelligent timer is enabled, the interval for updating LSAs is as follows:
(1) The initial interval for updating LSAs is specified by the parameter start-
interval.
(2) The interval for updating LSAs for the nth (n≥2) time is equal to hold-
interval * 2(n-1).
(3) When the interval specified by hold-interval * 2(n-1) reaches the maximum interval specified by max-interval, OSPF updates LSAs at the maximum interval
for three consecutive times. Then, go back to Step
at the initial interval specified by start-interval.
l Configuring the Interval for Receiving LSAs
1.
Run:
system-view
The system view is displayed.
2.
Run:
ospf [ process-id ]
The OSPF process view is displayed.
3.
Run:
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
117
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
5 OSPF Configuration
lsa-arrival-interval { interval | intelligent-timer max-interval start-
interval hold-interval }
The interval for receiving LSAs is set.
When the network is stable and fast route convergence is required, you can cancel the interval for receiving LSAs by setting it to 0. Routers can thus feel the changes of the topology or routes in time. This speeds up route convergence.
By default, the intelligent timer is enabled. The interval for receiving LSAs is expressed in milliseconds. The maximum interval for receiving LSAs is 1000 ms, the initial interval is 500 ms, and the Holdtime interval is 500 ms. After an intelligent timer is enabled, the interval for receiving LSAs is as follows:
(1) The initial interval for receiving LSAs is specified by the parameter start-
interval.
(2) The interval for receiving LSAs for the nth (n≥2) time is equal to hold-
interval * 2(n-1).
(3) When the interval specified by hold-interval * 2(n-1) reaches the maximum interval specified by max-interval, OSPF receives LSAs at the maximum interval
for three consecutive times. Then, go back to Step
at the initial interval specified by start-interval.
----End
5.4.7 Restricting the Flooding of Update LSAs
When many LSAs need to be flooded, a router may be busy processing Update packets and discard the Hello packets that maintain neighbor relationships. By restricting the flooding of update LSAs, you can avoid this problem and maintain neighbor relationships.
Context
When many neighbors exist or many LSAs need to be flooded, a switch may receive a large number of Update packets in a short period. If the switch is busy processing these Update packets and discards the Hello packets that maintain neighbor relationships, neighbor relationships may be interrupted. During the setup of neighbor relationships, more packets need to be exchanged, which deteriorates the processing of packets. Restricting the flooding of update LSAs is introduced to prevent these problems by maintaining neighbor relationship.
Do as follows on the switch that runs OSPF:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
ospf [ process-id ]
The OSPF process view is displayed.
Step 3 Run:
flooding-control [ number transmit-number | timer-interval transmit-interval ]
*
Issue 01 (2011-10-26) 118
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 5 OSPF Configuration
When the number of neighbors in a process exceeds 256, the flooding of update LSAs is restricted.
By default, a maximum of 50 update LSAs can be flooded every 30 seconds.
NOTE
After the flooding-control command is run, the restriction over update LSAs immediately takes effect. If the flooding-control command is not configured, restricting the flooding of update LSAs is enabled after the number of OSPF neighbors exceeds 256.
----End
5.4.8 Checking the Configuration
After OSPF neighbor relationships or adjacencies are stable, you can check OSPF statistics and information about neighbors in each area.
Prerequisite
The configurations of Establishing or Maintaining OSPF Neighbor Relationship function are complete.
Procedure
l Run the display ospf [ process-id ] brief command to check brief information about OSPF.
l Run the display ospf [ process-id ] peer command to check neighboring Switch information about OSPF.
l
Run the display ospf [ process-id ] cumulative command to check the OSPF statistics.
l Run the display ospf [ process-id ] retrans-queue [ interface-type interface-number ]
[ neighbor-id ] command to check the OSPF retransmission queue.
----End
5.5 Configuring OSPF Stub Areas
By configuring non-backbone areas at the edge of ASs as stub areas, you can reduce the size of the routing table and reduce the number of LSAs to be transmitted.
5.5.1 Establishing the Configuration Task
Configuring a stub area is optional. Not all areas can be configured as stub areas. Generally, a stub area, which is located at the AS boundary, is a non-backbone area with only one ABR.
Applicable Environment
To reduce the number of LSAs in the network and enhance OSPF extensibility, define OSPF areas. For some non-backbone areas at the edge of ASs, you can define them as stub areas for further reducing the size of the routing table and the number of LSAs.
This section describes procedures for configuring stub areas.
Pre-configuration Tasks
Before configuring OSPF stub areas, complete the following tasks:
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
119
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 5 OSPF Configuration l Configuring IP addresses for interfaces to make neighboring nodes reachable l
Configuring Basic OSPF Functions
Data Preparation
To configure OSPF stub areas, you need the following data.
No.
Data
1 Cost of default routes sent to stub areas
5.5.2 Defining the Current Area to be a Stub Area
A stub area is a special area in which ABRs do not flood the received AS external routes. Thus, the number of LSAs is greatly reduced.
Context
Do as follows on the OSPF router:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
ospf [ process-id ]
The OSPF process view displayed.
Step 3 Run:
area area-id
The OSPF area view is displayed.
Step 4 Run:
stub [ no-summary ]
The current area is configured as a stub area.
The specified parameter no-summary takes effect only when the stub command is used on the
ABR.
For all the switches connected to a stub area, you must configure the area as a stub area by running the stub command.
----End
5.5.3 Configuring Metrics of Default Routes Sent to Stub Areas
On a border router connected to a stub area, you can set the cost of the default route to the stub area.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
120
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 5 OSPF Configuration
Context
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
ospf [ process-id ]
The OSPF process view displayed.
Step 3 Run:
area area-id
The OSPF area view is displayed.
Step 4 Run:
stub [ no-summary ]
The current area is configured as a stub area.
Step 5 Run:
default-cost cost
The cost of the default route to the stub area is set.
This command is applied to the ABR that is connected to a stub area or an NSSA.
----End
5.5.4 Checking the Configuration
After OSPF stub areas are configured, you can check OSPF LSDB information and routing table information.
Prerequisite
By default, the cost of the Type-3 default route that is transmitted to the stub area by OSPF is
1.
Do as follows on the OSPF router.
The configurations of the OSPF Stub Areas are complete.
Procedure
l Run the commands as follow to check the LSDB information of OSPF:
–
display ospf [ process-id ] lsdb [ brief ]
– display ospf [ process-id ] lsdb [ router | network | summary | asbr | ase | nssa |
opaque-link | opaque-area | opaque-as ] [ link-state-id ] [ originate-router
[ advertising-router-id ] | self-originate ] l Run the commands as follow to check the information about the OSPF routing table:
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
121
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 5 OSPF Configuration
– display ospf [ process-id ] routing [ ip-address [ mask | mask-length ] ] [ interface
interface-type interface-number ] [ nexthop nexthop-address ]
– display ospf [ process-id ] routing router-id [ router-id ] l Run the display ospf [ process-id ] abr-asbr [ router-id ] command to check the information about the OSPF ABR and ABSR.
----End
5.6 Configuring OSPF NSSA Areas
By configuring non-backbone areas as NSSA areas, external routes can be imported, and a new type of LSA, namely, Type 7 NSSA LSA is introduced.
5.6.1 Establishing the Configuration Task
There can be no Type 5 LSAs in NSSAs. Type 7 LSAs are generated by the ASBR in an NSSA and advertised only in the local NSSA.
Applicable Environment
The concept of NSSA is put forward because stub areas cannot import external routes. An NSSA allows the transmission of Type7 LSAs. Type7 LSAs are generated by an ASBR in an NSSA.
When reaching the ABR that is responsible for converting Type 7 LSAs into Type 5 LSAs in the NSSA, Type 7 LSAs with the P-bit being set and the forwarding address being a non-zero address are converted into AS-external LSAs and advertised to other areas.
This section describes procedures for configuring an NSSA.
Pre-configuration Tasks
Before configuring an OSPF NSSA, complete the following tasks: l Configuring IP addresses for interfaces to make neighboring nodes reachable l
Configuring Basic OSPF Functions
Data Preparation
To configure an OSPF NSSA, you need the following data.
No.
Data
1 Cost of default routes sent to the NSSA
5.6.2 Defining the Current Area to Be an NSSA Area
Derived from a stub area, an NSSA allows AS external routes to be imported; an ASBR advertises Type 7 NSSA LSAs in the local NSSA.
Context
Do as follows on the OSPF router.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
122
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
5 OSPF Configuration
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
ospf [ process-id ]
The OSPF process view is displayed.
Step 3 Run:
area area-id
The OSPF area view is displayed.
Step 4 Run:
nssa [ default-route-advertise | flush-waiting-timer interval-value | no-import-
route | no-summary | set-n-bit | suppress-forwarding-address | translator-always |
translator-interval interval-value | zero-address-forwarding ]
*
An area is configured as an NSSA.
For all the switches connected to the NSSA, you must configure the area as an NSSA by running the nssa command.
The area may be updated after NSSA attributes are configured or deleted. Thus, the NSSA attributes can be re-configured or deleted only after the last update of NSSA attributes is complete.
The parameters are valid only when the nssa command is used on specified switches.
By setting the parameter flush-waiting-timer, you can set the aging time to a maximum value
3600 seconds to delete invalid Type5 LSAs on other switches. When the ASBR also functions as an ABR, the parameter flush-waiting-timer does not take effect. This prevents Type5 LSAs in the non-NSSA from being deleted.
----End
5.6.3 Configuring Metrics of Default Routes Sent to NSSA Areas
On a border router connected to an NSSA, you can set the cost of the default route to the NSSA.
Context
Do as follows on the OSPF router:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
ospf [ process-id ]
Issue 01 (2011-10-26) 123
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 5 OSPF Configuration
The OSPF process view is displayed.
Step 3 Run:
area area-id
The OSPF area view is displayed.
Step 4 Run:
nssa [ default-route-advertise | flush-waiting-timer interval-value | no-import-
route | no-summary | set-n-bit | suppress-forwarding-address | translator-always |
translator-interval interval-value | zero-address-forwarding ]
*
An area is configured as an NSSA.
For all the switches connected to the NSSA, you must configure the area as an NSSA by running the nssa command.
The optional parameters are valid only when the nssa command is used on an ABR.
Step 5 Run:
default-cost cost
The cost of default Type-3 routes to the NSSA is set.
This command takes effect only when it is configured on the ABR.
----End
5.6.4 Checking the Configuration
After NSSAs are configured, you can check OSPF LSDB information and routing table information.
Prerequisite
The configurations of OSPF NSSA Areas are complete.
Procedure
l Run the commands as follow to check the LSDB information of OSPF:
–
display ospf [ process-id ] lsdb [ brief ]
–
display ospf [ process-id ] lsdb [ router | network | summary | asbr | ase | nssa |
opaque-link | opaque-area | opaque-as ] [ link-state-id ] [ originate-router
[ advertising-router-id ] | self-originate ] l Run the commands as follow to check the information about the OSPF routing table:
–
display ospf [ process-id ] routing [ ip-address [ mask | mask-length ] ] [ interface
interface-type interface-number ] [ nexthop nexthop-address ]
– display ospf [ process-id ] routing router-id [ router-id ] l Run the display ospf [ process-id ] interface [ all | interface-type interface-number ]
[ verbose ] command to check the information about OSPF interfaces.
----End
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
124
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 5 OSPF Configuration
5.7 Configuring OSPF Virtual Links
In actual applications, physical connectivity between non-backbone areas and backbone areas may not be ensured due to various limitations. To solve this problem, you can configure OSPF virtual links.
5.7.1 Establishing the Configuration Task
A virtual link also functions as a backup link. If the backbone area is partitioned because of a link fault, a virtual link provides the logical connectivity for the backbone area.
Applicable Environment
After OSPF areas are defined, OSPF route update between non-backbone areas is implemented through a backbone area. Then, OSPF requires that all non-backbone areas should maintain the connectivity with the backbone area and the backbone area should maintain its own connectivity.
In actual applications, this requirement may not be met because of some restrictions. To solve this problem, you can configure OSPF virtual links.
This section describes procedures for configuring OSPF virtual links.
Pre-configuration Tasks
Before configuring OSPF virtual links, complete the following tasks: l Configuring IP addresses for interfaces to make neighboring nodes reachable l
Configuring Basic OSPF Functions
Data Preparation
To configure OSPF virtual links, you need the following data.
4
5
2
3
No.
Data
1 ID of the neighboring switch on the virtual link
Interval for sending Hello packets
Retransmission interval and delay interval for LSAs
Dead time of switches on the virtual link
Authentication mode and password
5.7.2 Configuring OSPF Virtual Links
A virtual link refers to a logical channel established between two ABRs through a non-backbone area.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
125
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 5 OSPF Configuration
Context
Do as follows on the OSPF router:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
ospf [ process-id ]
The OSPF process view is displayed.
Step 3 Run:
area area-id
The OSPF area view is displayed.
Step 4 Run:
vlink-peer router-id [ dead dead-interval | hello hello-interval | retransmit
retransmit-interval | smart-discover | trans-delay trans-delay-interval | [ simple
[ [ plain ] plain-text | cipher cipher-text ] | [ md5 | hmac-md5 ]
*
[ key-id
{ plain plain-text | [ cipher ] cipher-text } ] | authentication-null ] ]
A virtual link is created and configured.
This command also needs to be used on the other end of the virtual link.
----End
5.7.3 Checking the Configuration
After OSPF virtual links are configured, you can check OSPF LSDB information and routing table information.
Prerequisite
The configurations of OSPF Virtual Links are complete.
Procedure
l Run the commands as follow to check the LSDB information of OSPF.
–
display ospf [ process-id ] lsdb [ brief ]
– display ospf [ process-id ] lsdb [ router | network | summary | asbr | ase | nssa |
opaque-link | opaque-area | opaque-as ] [ link-state-id ] [ originate-router
[ advertising-router-id ] | self-originate ] l Run the commands as follow to check the information about the OSPF routing table.
–
display ospf [ process-id ] routing [ ip-address [ mask | mask-length ] ] [ interface
interface-type interface-number ] [ nexthop nexthop-address ]
– display ospf [ process-id ] routing router-id [ router-id ] l Run the display ospf [ process-id ] vlink command to check the information about OSPF virtual links.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
126
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 5 OSPF Configuration l Run the display ospf [ process-id ] interface [ all | interface-type interface-number ]
[ verbose ] command to check the information about OSPF interfaces.
----End
Example
Run the display ospf vlink command. If the status of the local virtual link is Full, it means that the virtual link is created successfully. For example:
<Quidway> display ospf vlink
OSPF Process 1 with Router ID 1.1.1.1
Virtual Links
Virtual-link Neighbor-id -> 2.2.2.2, Neighbor-State: Full
Interface: 10.1.1.1 (GigabitEthernet1/0/0)
Cost: 1 State: P-2-P Type: Virtual
Transit Area: 0.0.0.1
Timers: Hello 10 , Dead 40 , Retransmit 5 , Transmit Delay 1
GR State: Normal
5.8 Configuring OSPF Attributes in Different Types of
Networks
By setting network types for OSPF interfaces and adjusting OSPF attributes, you can build OSPF networks flexibly.
5.8.1 Establishing the Configuration Task
OSPF does not support the configuration of network types on Null interfaces.
Applicable Environment
OSPF classifies networks into four types according to the link layer protocol. The NBMA network must be fully connected. That is, any two switches in the network must be directly reachable. In most cases, this requirement cannot be met. Then, you need to change the network type forcibly by running commands.
On a P2MP network, if the mask lengths of devices are different, the OSPF neighbor relationship cannot be established. Through the configuration, you can disable the devices from checking the network mask in Hello packets so that the OSPF neighbor relationship can be established.
In an NBMA network, if no reachable link exists between partial routers, configure the type of the interface to P2MP. If the switch has only one peer end in the NBMA network, change the interface type to P2P.
In addition, when configuring a broadcast network or an NBMA network, you can specify the
DR priority of each interface to affect the DR/BDR election in the network. Commonly, the switch with higher performance and reliability is selected as a DR or BDR.
Pre-configuration Tasks
Before configuring OSPF attributes in different types of networks, complete the following tasks: l Configuring IP addresses for interfaces to make neighboring nodes reachable l
Configuring Basic OSPF Functions
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
127
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 5 OSPF Configuration
Data Preparation
To configure OSPF attributes in different types of networks, you need the following data.
4
5
2
3
No.
Data
1 Number of the interface running OSPF
Network type
DR priority of an interface
IP address of a neighbor on an NBMA network
Poll interval on an NBMA network
5.8.2 Configuring Network Types of OSPF Interfaces
OSPF classifies networks into four types according to link layer protocols. By configuring network types for interfaces, you can change the network types of interfaces.
Context
Do as follows on the OSPF router.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
interface vlanif interface-number
The interface view is displayed.
Step 3 Run:
ospf network-type { broadcast | nbma | p2mp | p2p }
Network types are configured for OSPF interfaces.
Configuring the new network type for an interface will cause the OSPF session on the interface to be reestablished.
NOTE
Generally, the network types of two OSPF interfaces on the both ends of the link must be identical.
Otherwise, the two interfaces cannot set up the neighbor relationship. Only when the network type of one
OSPF interface is broadcast and the network type of the other OSPF interface is P2P, the two interfaces can still set up the neighbor relationship. The broadcast interface can learn the correct OSPF routing information, but the P2P interface cannot learn the OSPF routing information from the peer.
----End
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
128
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 5 OSPF Configuration
5.8.3 Configuring DR Priorities of OSPF Interfaces
When configuring a broadcast network or an NBMA network, you can specify the DR priority for each interface to change the results of DR/BDR election on the network.
Context
When configuring broadcast networks or NBMA networks, you can specify the DR priority for each interface to affect the DR/BDR election in the network. The greater the value is, the higher the priority is.
By default, the priority of the interface that candidates for the DR is 1.
Do as follows on the OSPF router.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
interface vlanif interface-number
The interface view is displayed.
Step 3 Run:
ospf dr-priority priority
DR priorities are set for OSPF interfaces.
----End
Follow-up Procedure
After the DR priority is changed, you can re-elect a DR or BDR through the following methods, which, however, will result in the interruption of the OSPF neighbor relationship between switches and therefore are used only when necessary.
l Restarting all switches.
l Running the shutdown and undo shutdown commands on the interface on which the OSPF neighbor relationship is set up.
5.8.4 Disabling the Function of Checking the Network Mask on a
P2MP Network
On a P2MP network, when the mask lengths of devices are different, you can disable devices from checking the network mask so that the OSPF neighbor relationship can be established.
Context
On a P2MP network, when the mask lengths of devices are different, use the ospf p2mp-mask-
ignore command to ignore the check on the network mask in Hello packets. In this manner, the
OSPF neighbor relationship can be established.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
129
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Do as follows on the OSPF router:
5 OSPF Configuration
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
interface vlanif interface-number
The interface view is displayed.
Step 3 Run:
ospf network-type p2mp
The network type is configured for an OSPF interface.
Step 4 Run:
ospf p2mp-mask-ignore
The device is configured not to check the network mask on a P2MP network.
----End
5.8.5 Configuring Neighbors for NBMA Networks
An NBMA interface cannot find neighbors by broadcasting Hello packets. Thus, you need to manually specify the IP addresses of neighbors for this interface and set the election rights for these neighbors.
Context
Do as follows on the OSPF router:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
ospf [ process-id ]
The OSPF process view is displayed.
Step 3 Run:
peer ip-address [ dr-priority priority ]
Neighbors are configured for NBMA networks.
----End
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
130
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 5 OSPF Configuration
5.8.6 Configuring the Interval for Sending Poll Packets in NBMA
Networks
On an NBMA network, after a neighbor becomes invalid, a router sends Hello packets at the set polling interval.
Context
Do as follows on the OSPF router:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
interface vlanif interface-number
The interface view is displayed.
Step 3 Run:
ospf timer poll interval
The interval for sending Poll packets on an NBMA interface is set.
----End
5.8.7 Checking the Configuration
After OSPF attributes in different types of network are set, you can check OSPF statistics, LSDB information, neighbor information, and interface information.
Prerequisite
The configurations of OSPF Attributes in Different Types of Networks are complete.
Procedure
l Run the commands as follow to check the LSDB information of OSPF:
– display ospf [ process-id] lsdb [ brief ]
–
display ospf [ process-id ] lsdb [ router | network | summary | asbr | ase | nssa |
opaque-link | opaque-area | opaque-as ] [ link-state-id ] [ originate-router
[ advertising-router-id ] | self-originate ] l Run the display ospf [ process-id ] peer [ [ interface-type interface-number ] neighbor-
id | brief | last-nbr-down ] command to check the information about OSPF neighboring nodes.
l Run the display ospf [ process-id ] nexthop command to check the information about
OSPF next hops.
l Run the commands as follow to check the information about the OSPF routing table:
–
display ospf [ process-id ] routing [ ip-address [ mask | mask-length ] ] [ interface
interface-type interface-number ] [ nexthop nexthop-address ]
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
131
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 5 OSPF Configuration
– display ospf [ process-id ] routing router-id [ router-id ] l Run the display ospf [ process-id ] interface [ all | interface-type interface-number ]
[ verbose ] command to check the information about OSPF interfaces.
----End
Example
Run the display ospf interface command. If OSPF interface types and interface priorities (used for the DR election) are displayed, it means that the configuration succeeds. For example:
<Quidway> display ospf interface vlanif 10
OSPF Process 1 with Router ID 1.1.1.1
Interfaces
Interface: 11.1.1.1 (Vlanif10)
Cost: 1 State: BDR Type: Broadcast MTU: 1500
Priority: 1
Designated Router: 11.1.1.2
Backup Designated Router: 11.1.1.1
Timers: Hello 10 , Dead 40 , Poll 120 , Retransmit 5 , Transmit Delay 1
5.9 Configuring OSPF Route Attributes
By setting OSPF route attributes, you can change OSPF routing policies to meet the requirements of complex networks.
5.9.1 Establishing the Configuration Task
Before configuring OSPF route attributes, familiarize yourself with the applicable environment, complete pre-configuration tasks, and obtain the required data. This can help you complete the configuration task quickly and accurately.
Applicable Environment
In actual applications, to meet requirements of a complicated networking environment, you can change OSPF routing policies by configuring OSPF route attributes. Through the following procedures, you can: l Set the cost of OSPF routes on the interface.
l Change the matching order of routing protocols by configuring the OSPF priority when multiple routing protocols provide routes to the same destination.
l Configure load balancing among multiple equal-cost routes.
Pre-configuration Tasks
Before configuring OSPF route attributes, complete the following tasks: l Configuring IP addresses for interfaces to make neighboring nodes reachable l
Configuring Basic OSPF Functions
Data Preparation
To configure OSPF route attributes, you need the following data.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
132
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 5 OSPF Configuration
2
3
No.
Data
1 Link cost
OSPF priority
Maximum number of equal-cost routes
5.9.2 Configuring the Link Cost of OSPF
OSPF can automatically calculate the link cost for an interface according to the interface bandwidth. You can also set the link cost for the interface by using the related command.
Context
To configure the cost of an OSPF link, you can directly configure the cost of an OSPF interface.
If you do not set the cost of the OSPF interface directly, OSPF calculates the cost according to the bandwidth of the interface. The calculation formula is as follows: cost of the interface = bandwidth reference value/interface bandwidth. The integer of the calculated result is the cost of the interface. If the result is smaller than 1, the cost value is 1. You can indirectly change the cost of the interface by changing the bandwidth reference value.
By default, the bandwidth reference value is 100 of an OSPF process for an OSPF interface without a set cost. Therefore, interfaces with different bandwidths can obtain different cost values according to the calculation formula.
Do as follows on the OSPF router.
Procedure
l Configuring the Link Cost on an OSPF Interfaces
1.
Run:
system-view
The system view is displayed.
2.
Run:
interface vlanif interface-number
The interface view is displayed.
3.
Run:
ospf cost cost
The cost of OSPF interfaces is set.
l
Configuring Bandwidth Reference Value
1.
Run:
system-view
The system view is displayed.
2.
Run:
ospf [ process-id ]
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
133
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 5 OSPF Configuration
The OSPF process view is displayed.
3.
Run:
bandwidth-reference value
The bandwidth reference value is set.
When setting the bandwidth reference value, ensure that the bandwidth reference values of all the switches in the process are consistent.
----End
5.9.3 Configuring OSPF Precedence
When multiple routing protocols discover the routes to the same destination, you can set the
OSPF priorities of the routes discovered by these routing protocols.
Context
Multiple dynamic routing protocol may run on a switch at the same time. Thus, there is the problem of routing information sharing and routing selection among routing protocols. The system sets the priority for each routing protocol. When different protocols detect the same route, the route with a higher priority is selected.
After OSPF calculates equal-cost routes, you can run the nexthop command to select the route with the highest priority from the equal-cost routes as the next hop. The smaller the weight, the higher the priority of the route. By default, the weight is 255. It indicates that load balancing is carried out among the equal-cost routes without distinguishing their priorities.
Do as follows on the OSPF router:
Procedure
l Configuring OSPF Priority
1.
Run:
system-view
The system view is displayed.
2.
Run:
ospf [ process-id ]
The OSPF process view is displayed.
3.
Run:
preference [ ase ] { preference | route-policy route-policy-name }
*
The priority of OSPF is set.
l Configuring the Priority for OSPF Equal-Cost Routes
1.
Run:
system-view
The system view is displayed.
2.
Run:
ospf [ process-id ]
The OSPF process view is displayed.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
134
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 5 OSPF Configuration
3.
Run:
nexthop ip-address weight value
The priority for load balancing of OSPF is set.
----End
5.9.4 Setting the Convergence Priority of OSPF Routes
By setting convergence priorities for OSPF routes, you can set priorities for specific routes so that these routes converge preferentially. This thus shortens the interruption of key services and improves the reliability of the entire network.
Context
With the integration of network services, different services such as data, voice, and video run on the same network infrastructure, and have different requirements for the network. For Video on Demand (VoD) services, the route convergence speed of the multicast source server is the most critical factor that affects multicast services. It is required that the routes to the multicast source should converge rapidly when network faults occur. On the BGP or MPLS VPN bearer network where OSPF is used to implement the IP connectivity of the backbone network, endto-end routes between PEs need to be converged rapidly.
You can set priorities for specific routes by setting the convergence priority of OSPF routes so that these routes converge preferentially. This shortens the interruption of key services and improves the reliability of the entire network.
Do as follows on the switch that runs OSPF:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
ospf [ process-id ]
The OSPF view is displayed.
Step 3 Run:
prefix-priority { critical | high | medium } ip-prefix ip-prefix-name
The convergence priority of OSPF routes is set.
After the convergence priority of OSPF routes is set, OSPF can calculate and flood LSAs, and synchronize LSDBs according to priorities. This speeds up route convergence. This speeds up route convergence. When an LSA meets multiple priorities, the highest priority takes effect.
OSPF calculates LSAs in the sequence of intra-area routes, inter-area routes, and AS external routes. This command makes OSPF calculate the three types of routes separately according to the specified route calculation priorities. Convergence priorities are critical, high, and medium.
To speed up the processing of LSAs with the higher priority, during LSA flooding, the LSAs need to be placed into the corresponding critical, high, and medium queues according to priorities.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
135
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 5 OSPF Configuration
NOTE
This command takes effect only on the public network.
Step 4 (Optional) Run:
quit
The system view is displayed.
Step 5 (Optional)Run:
ip route prefix-priority-scheduler critical-weight high-weight medium-weight low-
weight
The scheduling ratio of IPv4 routes by priority is set.
By default, the scheduling ratio of IPv4 routes by priority is 8:4:2:1.
----End
5.9.5 Configuring the Maximum Number of Equal-Cost Routes
You can set the maximum number of intra-area, inter-area, or external routes.
Context
Do as follows on the OSPF router:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
ospf [ process-id ]
The OSPF process view is displayed.
Step 3 Run:
maximum load-balancing number
The maximum number of equal-cost routes is set.
NOTE
The range and default value of the number of equal-cost routes may vary with products and protocols. You can adjust the range and default value of the number of equal-cost routes after purchasing the License.
----End
5.9.6 Checking the Configuration
After OSPF route attributes are configured, you can check OSPF routing table information, interface information, and next hop information.
Prerequisite
The configurations of OSPF Route Attributes are complete.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
136
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Procedure
5 OSPF Configuration l Run the display ospf [ process-id ] routing [ [ ip-address [ mask | mask-length ] |
interface interface-type interface-number | nexthop nexthop-address ] | router-id [ router-
id ] ] command to check the information about the OSPF routing table.
l
Run the display ospf [ process-id ] interface [ all | interface-type interface-number ]
[ verbose ] command to check the information about OSPF interfaces.
----End
Example
Run the display ospf [ process-id ] routing ip-address command. If the convergence priority of the route is displayed, it means that the configuration succeeds.
<Quidway> display ospf routing 100.1.1.1
OSPF Process 1 with Router ID 1.1.1.1
Destination : 100.1.1.0/24
AdverRouter : 100.1.1.2 Area : 0.0.0.0
Cost : 1 Type : Transit
NextHop : 100.1.1.2 Interface : Vlanif10
5.10 Controlling OSPF Routing Information
This section describes how to control the advertising and receiving of OSPF routing information and import routes from other protocols.
5.10.1 Establishing the Configuration Task
Before controlling OSPF routing information, familiarize yourself with the applicable environment, complete pre-configuration tasks, and obtain the required data. This can help you complete the configuration task quickly and accurately.
Applicable Environment
Through the following procedures, you can configure switches to control the advertising and receiving of OSPF routing information and import routes from other protocols.
Pre-configuration Tasks
Before configuring to control OSPF routing information, complete the following tasks: l Configuring IP addresses for interfaces to make neighboring nodes reachable l
Configuring Basic OSPF Functions
Data Preparation
To control OSPF routing information, you need the following data.
No.
Data
1 Link costs
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
137
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 5 OSPF Configuration
No.
Data
2 ACL used to filter routing information
3 Protocol names, process IDs, and default values of the routes to be imported
5.10.2 Configuring OSPF Route Aggregation
After an AS is divided into areas, configuring route aggregation can reduce routing information transmitted between areas, thus reducing the size of the routing table and improving route performance.
Context
Do as follows on the OSPF router.
Procedure
l Configuring ABR Route Aggregation
Do as follows on the OSPF ABR:
1.
Run:
system-view
The system view is displayed.
2.
Run:
ospf [ process-id ]
The OSPF process view is displayed.
3.
Run:
area area-id
The OSPF area view is displayed.
4.
Run:
abr-summary ip-address mask [ [ advertise | not-advertise ] | cost cost ]
*
ABR route aggregation of OSPF is configured.
l
Configuring ASBR Route Aggregation
Do as follows on the OSPF ASBR:
1.
Run:
system-view
The system view is displayed.
2.
Run:
ospf [ process-id ]
The OSPF process view is displayed.
3.
Run:
asbr-summary ip-address mask [ not-advertise | tag tag | cost cost |
distribute-delay interval ] *
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
138
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
5 OSPF Configuration
ASBR route aggregation of OSPF is configured.
----End
5.10.3 Configuring OSPF to Filter the Received Routes
By configuring filtering conditions for the received routes, you can allow only the routes that pass the filtering to be installed into the routing table.
Context
Do as follows on the OSPF router.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
ospf [ process-id ]
The OSPF process view is displayed.
Step 3 Run:
filter-policy { acl-number | acl-name acl-name | ip-prefix ip-prefix-name } import
OSPF is configured to filter the received routes.
OSPF is a dynamic routing protocol based on the link state, and routing information is hidden in the link state. Therefore, the filter-policy command cannot be used to filter the advertised and received LSAs. You can then run the filter-policy command to filter the routes calculated by OSPF. Only the routes that match the filtering rules are added to the routing table.
The filter-policy command is used to filter only the routes that match OSPF and are installed to the local routing table. Routes that do not pass the filtering are neither added to the OSPF routing table nor advertised. Therefore, whether the received routes pass the filtering or not, the
LSDB is not affected.
----End
5.10.4 Configuring OSPF to Filter ABR Type3 LSA
By configuring filtering conditions for Type 3 LSAs, you can allow only the routes that pass the filtering to be received or advertised.
Context
Do as follows on the OSPF router.
Procedure
Step 1 Run:
system-view
Issue 01 (2011-10-26) 139
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 5 OSPF Configuration
The system view is displayed.
Step 2 Run:
ospf [ process-id ]
The OSPF process view is displayed.
Step 3 Run:
area area-id
The OSPF area view is displayed.
Step 4 Run:
filter { acl-number | acl-name acl-name | ip-prefix ip-prefix-name | route-policy
route-policy-name } import
The received and advertised rule of filtering Type3 LSAs originated by the ABR is configured.
filter { acl-number | acl-name acl-name | ip-prefix ip-prefix-name | route-policy
route-policy-name } export
The rejected received or advertised rule of filtering Type3 LSAs originated by the ABR is configured.
----End
5.10.5 Configuring OSPF to Import External Routes
Importing the routes discovered by other routing protocols can enrich OSPF routing information.
Context
OSPF can ensure loop-free intra-area routes and inter-area routes; however, OSPF cannot prevent external routes from loops. Therefore, you should be cautious when configuring OSPF to import external routes, avoid the loops caused by manual configurations. For detailed information, refer to "OSPF VPN Extension" in the Quidway S9300 Terabit Routing Switch
Feature Description - VPN.
Do as follows on the OSPF ASBR.
Procedure
l Configuring OSPF to Import Routes of Other Protocols
1.
Run:
system-view
The system view is displayed.
2.
Run:
ospf [ process-id ]
The OSPF process view is displayed.
3.
Run:
import-route { limit limit-number | { bgp [ permit-ibgp ] | direct | rip
[ process-id-rip ] | static | isis [ process-id-isis ] | ospf [ process-id-
ospf ] } [ cost cost | type type | tag tag | route-policy route-policy-
name ]
*
}
Routes of other protocols are imported.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
140
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 5 OSPF Configuration
4.
(Optional)Run:
filter-policy { acl-number | acl-name acl-name | ip-prefix ip-prefix-
name } export [ protocol [ process-id ] ]
Only the routes that pass the filtering can be advertised.
You can configure OSPF to filter the routing information of a protocol or a process by specifying the parameter protocol [ process-id ]. If protocol [ process-id ] is not specified, OSPF filters all the imported routing information.
NOTE
l The import-route command cannot be used to import the default routes of external routes.
l OSPF filters the imported routes; that is, OSPF transforms only eligible external routes to
Type5 LSAs and advertises them.
l Configuring OSPF to Import Default Routes
1.
Run:
system-view
The system view is displayed.
2.
Run:
ospf [ process-id ]
The OSPF process view is displayed.
3.
Run the following commands as required:
– Run:
default-route-advertise [ [ always | permit-calculate-other ] | cost
cost | type type | route-policy route-policy-name ]
*
The default routes are imported to the OSPF process.
To add the imported default routes to the current routing table, ensure that the priority of the configured static default route is lower than that of the default route imported by OSPF if an OSPF router is configured with static default routes.
– Run:
default-route-advertise summary cost cost
The default cost is specified for Type 3 summary LSAs.
Enable VPN before selecting parameters. Otherwise, this command cannot be configured.
l Configuring Related Parameters for OSPF to Import Routes
1.
Run:
system-view
The system view is displayed.
2.
Run:
ospf [ process-id ]
The OSPF process view is displayed.
3.
Run:
default { cost { cost | inherit-metric } | limit limit | tag tag | type
type } *
The default values of the parameters (cost, the upper limit of the imported external routes within the specified period, tag, and type) related to imported routes are set.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
141
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 5 OSPF Configuration
When OSPF imports external routes, you can configure the default values for some additional parameters, such as the cost, number of routes, tag, and type. The route tag is used to tag the protocol related information. For example, it is used to differentiate the number of the ASs when OSPF receives BGP.
By default, the metric of the external routes imported by OSPF is 1; a maximum of
2147483647 routes can be imported each time; the type of the imported external routes is Type 2; the default tag value of the imported routes is 1.
NOTE
You can run one of the following commands to set the cost of the imported route. The following commands are listed in the descending order of priorities.
l Run the apply cost command to set the cost of a route.
l Run the import-route command (OSPF) to set the cost of the imported route.
l Run the default command to set the default cost of the imported route.
----End
5.10.6 Checking the Configuration
After OSPF routing information is controlled, you can check OSPF routing table information, interface information, and ASBR route aggregation information.
Prerequisite
The configurations of Controlling OSPF Routing Information are complete.
Procedure
l Run the commands as follow to check the information about the OSPF routing table:
– display ospf [ process-id ] routing [ ip-address [ mask | mask-length ] ] [ interface
interface-type interface-number ] [ nexthop nexthop-address ]
– display ospf [ process-id ] routing router-id [ router-id ] l Run the display ospf [ process-id ] interface [ all | interface-type interface-number ]
[ verbose ] command to check the information about OSPF interfaces.
l
Run the display ospf [ process-id ] asbr-summary [ ip-address mask ] command to check the information about OSPF ASBR route aggregation.
----End
Example
Run the display ospf interface command. If information about OSPF interfaces is displayed, it means that the configuration succeeds. For example:
<Quidway> display ospf interface vlanif 10
OSPF Process 1 with Router ID 1.1.1.1
Interfaces
Interface: 11.1.1.1 (Vlanif10)
Cost: 1 State: BDR Type: Broadcast MTU: 1500
Priority: 1
Designated Router: 1.1.1.2
Backup Designated Router: 1.1.1.1
Timers: Hello 10 , Dead 40 , Poll 120 , Retransmit 5 , Transmit Delay 1
Run the display ospf asbr-summary command. If information about aggregation of the routes imported by the local router is displayed, it means that the configuration succeeds. For example:
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
142
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 5 OSPF Configuration
<Quidway> display ospf asbr-summary
OSPF Process 1 with Router ID 192.168.1.2
Summary Addresses
Total summary address count: 1
Summary Address
net : 10.0.0.0
mask : 255.0.0.0
tag : 10
status : Advertise
Cost : 0 (Not Configured)
delay : 0 (Not Configured)
The Count of Route is : 2
Destination Net Mask Proto Process Type Metric
10.1.0.0 255.255.0.0 Static 1 2 10
10.2.0.0 255.255.0.0 Static 1 2 10
5.11 Optimizing an OSPF Network
By configuring OSPF functions in special network environments, you can adjust and optimize the OSPF network performance.
5.11.1 Establishing the Configuration Task
Before optimizing an OSPF network, familiarize yourself with the applicable environment, complete pre-configuration tasks, and obtain the required data. This can help you complete the configuration task quickly and accurately.
Applicable Environment
In some special networking environments, you need to configure OSPF features and optimize the performance of the OSPF network. Through the following procedures, you can: l Adjust convergence speed of the OSPF network and network load generated from protocol packets by modifying timers of OSPF packets. On some low-speed links, the delay of transmitting LSAs must be considered.
l
Avoid resource consumption caused by frequent network changes by adjusting the SPF interval.
l When the backup link exists, you can enable OSPF-BGP linkage on the stub router so that the restarted router or the newly joined router does not use the stub router to forward packets during the linkage of OSPF and BGP. This avoids traffic loss caused by BGP route convergence, which is slower than OSPF route convergence, during traffic switchback.
Pre-configuration Tasks
Before configuring to optimize an OSPF network, complete the configuration tasks: l Configuring IP addresses for interfaces to make neighboring nodes reachable l
Configuring Basic OSPF Functions
Data Preparation
To optimize an OSPF network, you need the following data.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
143
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 5 OSPF Configuration
2
3
No.
Data
1 Values of timers of packets
4
MTU carried in DD packets
Maximum number of external LSAs in the LSDB
Authentication modes and passwords used in authentication
5.11.2 Configuring the Delay for Transmitting LSAs on the
Interface
It takes time to transmit OSPF packets on a link. Therefore, a certain delay is added to the aging time of an LSA before the LSA is sent.
Context
By default, the delay is 1 second.
NOTE
On low-speed links, you should focus on this configuration.
Do as follows on the OSPF router.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
interface vlanif interface-number
The interface view is displayed.
Step 3 Run:
ospf trans-delay interval
The delay of transmitting LSAs on the interface is set.
----End
5.11.3 Configuring the Interval for Retransmitting LSAs
After a router sends an LSA to its neighbor, the router expects to receive an LSAck packet from its neighbor. If the router does not receive an LSAck packet within the LSA retransmission interval, it retransmits the LSA to the neighbor.
Context
Do as follows on the OSPF router.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
144
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 5 OSPF Configuration
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
interface vlanif interface-number
The interface view is displayed.
Step 3 Run:
ospf timer retransmit interval
The interval for retransmitting LSAs between neighboring routers is set.
By default, the interval for retransmitting LSAs is 5 seconds.
NOTE
Do not set the LSA retransmission interval to a very small value; otherwise, unnecessary retransmission is caused. The retransmission interval must be longer than the time for a packet to be transmitted to and from between two switches.
----End
5.11.4 Configuring the Local Router to Filter the LSAs to Be Sent
When multiple links exist between two routers, you can filter the outgoing LSAs on certain links.
This reduces the unnecessary retransmission of LSAs and saves bandwidth resources.
Context
Filtering the LSAs to be sent on the local router can prevent useless LSAs from being sent to neighbors. This can reduce the size of the LSDB of neighbors and speed up the network convergence.
Do as follows on the switch that runs OSPF:
Procedure
l Configure the switch to filter the LSAs that are sent to the specified neighbors in a P2MP network:
1.
Run:
system-view
The system view is displayed.
2.
Run:
ospf [ process-id ]
The OSPF process view is displayed.
3.
Run:
filter-lsa-out peer ip-address { all | { summary [ acl { acl-number | acl-
name } ] | ase [ acl { acl-number | acl-name } ] | nssa [ acl { acl-
number | acl-name } ] }
*
}
In a P2MP network, the local router filters the LSAs to be sent.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
145
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
5 OSPF Configuration
By default, the local router does not filter the LSAs to be sent.
l Configure the specified interface enabled with OSPF to filter outgoing LSAs in a broadcast,
NBMA, P2P, or P2MP network:
1.
Run:
system-view
The system view is displayed.
2.
Run:
interface vlanif interface-number
The interface view is displayed.
3.
Run:
ospf filter-lsa-out { all | { summary [ acl { acl-number | acl-name } ] |
ase [ acl { acl-number | acl-name } ] | nssa [ acl { acl-number | acl-
name } ] } * }
The local router filters the LSAs to be sent.
By default, the local router does not filter the LSAs to be sent.
----End
5.11.5 Suppressing the Interface from Receiving and Sending OSPF
Packets
By suppressing the OSPF interface from receiving and sending OSPF packets, you can prevent routers on a certain network from obtaining OSPF routing information and prevent the local router from receiving the routing updates advertised by other routers.
Context
To prevent OSPF routing information from being obtained by the switches on a certain network, and prevent the local switch from receiving the routing updates advertised by other switches, run the silent-interface command to suppress the interface from receiving and sending OSPF packets.
Different processes can suppress the same interface from sending and receiving OSPF packets, but the silent-interface command is valid only for the OSPF interface on which the specified process is enabled, and has no effect on the interfaces of other processes.
Do as follows on the OSPF router:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
ospf [ process-id ]
The OSPF process view is displayed.
Step 3 Run:
silent-interface { all | interface-type interface-number }
Issue 01 (2011-10-26) 146
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 5 OSPF Configuration
An interface is suppressed from receiving and sending OSPF packets.
----End
Follow-up Procedure
After an OSPF interface is set to be in the silent state, the interface can still advertise its direct route. The Hello packets on the interface, however, are blocked, and thus no neighbor relationship can be established on the interface. This can enhance the OSPF capability to adapt to the networking and reduce the consumption of system resources.
5.11.6 Configuring the Interval for SPF Calculation
By setting the interval for SPF calculation, you can reduce resource consumption caused by frequent network changes.
Context
When the OSPF LSDB changes, the shortest path need be recalculated. Frequent network changes occupy many system resources and affect the efficiency of switches. You can configure an intelligent timer and rationally set the interval for the SPF calculation to avoid excessive router memory and bandwidth resources from being occupied.
By default, the intelligent timer is enabled. The interval for the SPF calculation is expressed in milliseconds. The maximum interval for the SPF calculation is 10000 ms, the initial interval is
500 ms, and the Holdtime interval is 1000 ms.
Do as follows on the OSPF router.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
ospf [ process-id ]
The OSPF process view is displayed.
Step 3 Run:
spf-schedule-interval { interval1 | intelligent-timer max-interval start-interval
hold-interval | millisecond interval2 }
The interval for the SPF calculation is set.
After an intelligent timer is enabled, the interval for the SPF calculation is as follows:
1.
The initial interval for the SPF calculation is specified by the parameter start-interval.
2.
The interval for the SPF calculation for the nth (n≥2) time is equal to hold-interval × 2
(n-1).
3.
When the interval specified by hold-interval × 2(n-1) reaches the maximum interval specified by max-interval, OSPF performs the SPF calculation at the maximum interval for
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
147
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 5 OSPF Configuration
three consecutive times. Then, go back to Step
, and OSPF performs the SPF calculation at the initial interval specified by start-interval.
----End
5.11.7 Configuring Stub Routers
When a router has a heavy load and cannot forward any other packets, you can configure it as a stub router. After the router is configured as a stub router, other OSPF routers do not use this router to forward data but they can have a route to this stub router.
Context
The metric of the links in the router LSAs generated by the stub router is set to a higher value
(65535).
Do as follows on the OSPF router:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
ospf [ process-id ]
The OSPF process view is displayed.
Step 3 Run:
stub-router [ on-startup [ interval ] ]
A stub router is configured.
By default, the period during which a switch keeps being a stub router is 500 seconds.
NOTE
There is no correlation between the stub router configured through this command and the switch in the stub area.
----End
5.11.8 Enabling the Mesh-Group Function
When concurrent links exist between a switch and its neighbor, you can enable the mesh-group function to reduce the load on the links.
Context
The router ID of a neighbor uniquely identifies a mesh group. Interfaces can belong to the same mesh-group only when the interfaces belong to the same area and OSPF process, the interface statuses are higher than Exchange, and each interface is connected with only one neighbor.
If multiple concurrent links exist between the switch and its neighbor that are enabled with the mesh-group function, the switch selects a primary link to flood the received LSAs, without performing reverse flooding.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
148
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Do as follows on the switch that runs OSPF:
5 OSPF Configuration
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
ospf [ process-id ]
The OSPF process view is displayed.
Step 3 Run:
mesh-group enable
The mesh-group function is enabled.
By default, the mesh-group function is disabled.
----End
5.11.9 Configuring the MTU in DD Packets
You can configure OSPF to fill in the Interface MTU field of the DD packet with the actual
MTU.
Context
CAUTION
After the MTU value in a DD packet is configured, the neighbor relationship is reestablished.
Do as follows on the OSPF router:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
interface vlanif interface-number
The interface view is displayed.
Step 3 Run:
ospf mtu-enable
The interface is enabled to fill in the MTU value in a DD packet when sending the DD packets.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
149
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
5 OSPF Configuration
Generally, an interface replaces the actual MTU value with 0 when sending DD packets. After this command is configured, the interface fills in the Interface MTU field of the DD packets with the actual MTU value.
----End
5.11.10 Configuring the Maximum Number of External LSAs in the
LSDB
By setting the maximum number of external LSAs in the LSDB, you can restrict the number of routes within a proper range.
Context
Do as follows on the OSPF router:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
ospf [ process-id ]
The OSPF process view is displayed.
Step 3 Run:
lsdb-overflow-limit number
The maximum number of external LSAs in the LSDB is set.
----End
5.11.11 Configuring RFC 1583 Compatible External Routing
The routing rule defined in RFC 2328 is different from that in RFC 1583. When the same external route is calculated according to multiple LSAs, the routing rule configured through the rfc1583 compatible command is compatible with that defined in RFC 1583.
Context
Do as follows on the OSPF router.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
ospf [ process-id ]
Issue 01 (2011-10-26) 150
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
5 OSPF Configuration
The OSPF process view is displayed.
Step 3 Run:
rfc1583 compatible
The external routing rule compatible with RFC 1583 is set.
By default, the routing rule of compatible 1583 is enabled.
----End
5.11.12 Checking the Configuration
After the OSPF network is optimized, you can check OSPF statistics, request and retransmission queues, and brief information about mesh-groups.
Prerequisite
The configurations of Optimizing an OSPF Network are complete.
Procedure
l Run the display ospf [ process-id ] brief command to check the brief information about
OSPF.
l Run the display ospf [ process-id ] cumulative command to check the OSPF statistics.
l Run the display ospf [ process-id ] request-queue [ interface-type interface-number ]
[neighbor-id ] command to check the OSPF request queue.
l
Run the display ospf [ process-id ] retrans-queue [ interface-type interface-number ]
[ neighbor-id ] command to check the OSPF retransmission queue.
l Run the commands as follow to check the OSPF error information:
– display ospf [ process-id ] error [ lsa ]
– display ospf error [ packet [ number ] ] l Run the display ospf global-statistic { process process-id | vpn-instance vpn-instance-
name | public-instance | timewheel | brief } command to check the global statistics information about OSPF.
l
Run the display ospf [ process-id ] mesh-group [ brief ] command to check the brief information about OSPF mesh-groups.
----End
Example
Run the display ospf brief command. If details about the OSPF timer and delay in sending LSAs are displayed, it means that the configuration succeeds. For example:
<Quidway> display ospf brief
OSPF Process 1 with Router ID 10.1.1.1
OSPF Protocol Information
RouterID: 10.1.1.1 Border Router: AREA AS NSSA
Route Tag: 0
Multi-VPN-Instance is not enabled
Opaque Capable
Global DS-TE Mode: Non-Standard IETF Mode
Graceful-restart capability: planned and un-planned, totally
Issue 01 (2011-10-26) 151
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 5 OSPF Configuration
Helper support capability : enabled
filter capability : disabled
policy capability : strict lsa check, planned and un-planned
Applications Supported: MPLS Traffic-Engineering
Spf-schedule-interval: max 10000ms, start 500ms, hold 1000ms
Default ASE parameters: Metric: 1 Tag: 1 Type: 2
Route Preference: 10
ASE Route Preference: 150
SPF Computation Count: 4
RFC 1583 Compatible
Retransmission limitation is disabled
Import routes limitation is enabled, the maximal limitation value: 4294967295
Area Count: 2 Nssa Area Count: 1
ExChange/Loading Neighbors: 0
Area: 0.0.0.0 (MPLS TE not enabled)
Authtype: MD5 Area flag: Normal
SPF scheduled Count: 4
ExChange/Loading Neighbors: 0
Interface: 10.1.1.1 (Vlanif10)
Cost: 1 State: Waiting Type: Broadcast MTU: 1500
Priority: 1
Designated Router: 0.0.0.0
Backup Designated Router: 0.0.0.0
Timers: Hello 10 , Dead 40 , Poll 120 , Retransmit 5 , Transmit Delay 1
Area: 0.0.0.6 (MPLS TE not enabled)
Authtype: None Area flag: NSSA
SPF scheduled Count: 0
ExChange/Loading Neighbors: 0
5.12 Configuring Local MT
By configuring local MT, you can prevent multicast services from becoming unavailable when both multicast and an MPLS TE tunnel are deployed on a network.
5.12.1 Establishing the Configuration Task
Local MT supports only OSPF processes of the public network instance.
Applicable Environment
If multicast and an MPLS TE tunnel are deployed in a network simultaneously and the TE tunnel is configured with IGP Shortcut, multicast packets are forwarded through the TE tunnel. The switches spanned by the TE tunnel cannot sense the multicast packets, so the switches do not create any multicast forwarding entry. As a result, the multicast service is interrupted. To avoid the preceding problem, local MT is configured. Therefore, the correct multicast routing table can be created to guide the forwarding of multicast packets.
NOTE
l Local MT supports only OSPF processes of the public network instance.
l Local MT does not support forwarding adjacency.
Pre-configuration Tasks
Before configuring local MT, complete the following tasks: l Configuring IP addresses for interfaces to make neighboring nodes reachable
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
152
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing l
5.3 Configuring Basic OSPF Functions
l Enabling the TE tunnel of the OSPF process
Data Preparation
To configure local MT, you need the following data.
No.
Data
1 Filtering list used to filter OSPF routing information
5 OSPF Configuration
5.12.2 Enabling Local MT
When both multicast and an MPLS TE tunnel are deployed on a network, you need to enable local MT for multicast packet forwarding.
Context
Do as follows on the switch that needs to forward multicast packets and is configured with the
TE tunnel that is enabled with IGP Shortcut:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
ospf [ process-id ]
The OSPF view is displayed.
Step 3 Run:
local-mt enable
Local MT is enabled.
----End
5.12.3 (Optional) Controlling the Scale of the MIGP Routing Table
To properly control the size of the MIGP routing table and accelerate the search of the MIGP routing table, you can configure the filtering policy based on multicast source addresses. Only the routes that are destined to multicast source addresses and match the filtering policy are installed into the MIGP routing table.
Context
After creating the MIGP routing table by
, OSPF performs route calculation.
When the calculated outgoing interface of the next hop is a TE tunnel interface enabled with
IGP shortcut, a switch uses the physical interface as the outgoing interface of the next hop and stores it to the MIGP routing table. To make the size of the MIGP routing table reasonable and
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
153
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing accelerate the speed for searching the MIGP routing table, you can configure the filtering policy for the multicast source address. Thus, only the routes that head towards the multicast source address and match the policy are added to the MIGP routing table.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
ospf [ process-id ]
The OSPF view is displayed.
Step 3 Run:
local-mt filter-policy {acl acl-number | ip-prefix ip-prefix-name }
The local MT filtering policy of OSPF is configured.
NOTE
You are recommended to configure the routing policy before enabling local MT. This can prevent the excessive routes to the not-multicast source address from being added to the MIGP routing table and thus keeps the number of routes in the MIGP routing table within the upper limit.
----End
5.12.4 Checking the Configuration
After local MT is configured, you can check the OSPF MIGP routing table, routing table, and brief information.
Prerequisite
5 OSPF Configuration
The configurations of the OSPF Local MT are complete.
Procedure
l Run the display ospf [ process-id ] migp-routing [ ip-address [ mask | mask-length ] ]
[ interface interface-type interface-number ] [ nexthop nexthop-address ] command to check the OSPF MIGP routing table.
l Run the display ospf [ process-id ] routing command to check the OSPF routing information.
l
Run the display ospf [ process-id ] brief command to check the brief information about
OSPF.
----End
5.13 Configuring OSPF GR
To avoid traffic interruption and route flapping caused by the active/standby switchover, you can enable OSPF GR.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
154
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 5 OSPF Configuration
5.13.1 Establishing the Configuration Task
In practical applications, you can configure OSPF GR on dual main control boards to prevent service forwarding from being affected by the fault on the main control board.
Applicable Environment
To avoid traffic interruption and route flapping caused by the active/standby switchover, you can enable OSPF GR.
After the OSPF process is restarted through GR, the Restarter and the Helper reestablish the neighbor relationship, exchange routing information, synchronize the LSDB, and update the routing table and forwarding table. These operations ensure the fast convergence of OSPF and the stability the network topology.
NOTE
In practical applications, you can configure OSPF GR on the dual main control boards to avoid service forwarding from being affected by the fault occurred on the main control board.
Pre-configuration Tasks
Before configuring OSPF GR, complete the following tasks: l
Configuring IP addresses for interfaces to make neighboring nodes reachable l Configuring basic OSPF functions to establish the neighbor relationship successfully
Data Preparation
To configure OSPF GR, you need the following data.
No.
Data
1 OSPF process number
2 Parameters for establishing GR sessions
5.13.2 Enabling the Opaque-LSA of OSPF
The opaque-LSA capability of OSPF needs to be enabled first because OSPF supports GR through Type 9 LSAs.
Context
Do as follows on the switch where GR is enabled:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
155
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
5 OSPF Configuration
Step 2 Run:
ospf [ process-id ]
The OSPF view is displayed.
Step 3 Run:
opaque-capability enable
The opaque-LSA function is enabled.
The opaque-LSA feature of OSPF needs to be enabled first because OSPF supports GR through
Type 9 LSAs.
----End
5.13.3 Enabling the Default Feature of OSPF GR
This part describes how to enable the default feature of OSPF GR, namely, totally GR.
Context
Do as follows on the switch where GR is enabled:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
ospf [ process-id ]
The OSPF view is displayed.
Step 3 Run:
graceful-restart
The OSPF GR feature is enabled.
----End
5.13.4 (Optional) Configuring the GR Session Parameters on the
Restarter
This part describes how to set GR session parameters (including GR period, planned GR, and totally GR) on the Restarter.
Context
If you have special requirements for the Restarter, do as follows on the Restarter:
Procedure
Step 1 Run:
system-view
Issue 01 (2011-10-26) 156
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
5 OSPF Configuration
The system view is displayed.
Step 2 Run:
ospf [ process-id ]
The OSPF view is displayed.
Step 3 Run:
graceful-restart period period
The GR period on the Restarter is set.
By default, the restart time is 120 seconds.
Step 4 Run:
graceful-restart planned-only
The Restarter supports only the planned GR.
By default, the Restarter supports both the planned GR and unplanned GR.
Step 5 Run:
graceful-restart partial
The Restarter supports the partial GR.
By default, the Restarter supports the totally GR.
NOTE
If multiple parameters need to be configured at the same time, you can run the graceful-restart [ period
period | planned-only | partial ]
*
command.
----End
5.13.5 (Optional) Configuring GR Session Parameters on the Helper
After an OSPF process is restarted through GR, the Restarter and the Helper reestablish the neighbor relationship, exchange routing information, synchronize the LSDB, and update the routing table and forwarding table. This implements OSPF fast convergence and stabilizes the network topology.
Context
If you have special requirements for the Helper, do as follows on the Helper.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
ospf [ process-id ]
The OSPF view is displayed.
Step 3 Run:
Issue 01 (2011-10-26) 157
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 5 OSPF Configuration
graceful-restart helper-role { ip-prefix ip-prefix-name | acl-number acl-number |
acl-name acl-name }
The local switch can enter the Helper mode only after neighbors pass the filtering policies of
ip-prefix or acl.
Step 4 Run:
graceful-restart helper-role ignore-external-lsa
The Helper does not check the LSAs outside the AS (AS-external LSA).
By default, the Helper checks the LSAs outside the AS.
Step 5 Run:
graceful-restart helper-role planned-only
The Helper supports only the planned GR.
By default, the Helper supports both the planned GR and unplanned GR.
NOTE
To configure multiple parameters at the same time, run the graceful-restart helper-role { [ { ip-prefix
ip-prefix-name | acl-number acl-number | acl-name acl-name } | ignore-external-lsa | planned-only ]
*
| never } command.
----End
5.13.6 (Optional) Configuring the Switch not to Enter the Helper
Mode
If a router is not expected to enter the Helper mode, you can disable the router from entering the
Helper mode.
Context
If a switch is not expected to enter the Helper mode, you can do as follows on the switch:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
ospf [ process-id ]
The OSPF view is displayed.
Step 3 Run:
graceful-restart helper-role never
The switch does not support the Helper mode.
----End
5.13.7 Checking the Configuration
After OSPF GR is configured, you can check the OSPF GR status.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
158
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 5 OSPF Configuration
Prerequisite
The configurations of the OSPF GR are complete.
Procedure
l Run the display ospf [ process-id ] graceful-restart [ verbose ] command to check the restart status of OSPF GR.
----End
Example
Run the display ospf graceful-restart command. If the OSPF GR configuration is displayed, it means that the configuration succeeds. For example:
<Quidway> display ospf graceful-restart
OSPF Process 1 with Router ID 1.1.1.1
Graceful-restart capability : enabled
Graceful-restart support : planned and un-planned, totally
Helper-policy support : planned and un-planned, strict lsa check
Current GR state : normal
Graceful-restart period : 120 seconds
Number of neighbors under helper:
Normal neighbors : 0
Virtual neighbors : 0
Sham-link neighbors : 0
Total neighbors : 0
Number of restarting neighbors : 0
Last exit reason:
On graceful restart : successful exit
On Helper : none
5.14 Configuring BFD for OSPF
If there are high requirements for data transmission, and OSPF convergence needs to be speeded up when the link status changes, you can configure BFD on OSPF links. After detecting a link failure, BFD notifies the routing protocol of the failure, which triggers fast convergence. When the neighbor relationship is Down, the BFD session is deleted dynamically.
5.14.1 Establishing the Configuration Task
After BFD is enabled, OSPF establishes a BFD session with only the neighbor whose neighbor relationship is in the Full state.
Applicable Environment
To increase the convergence speed of OSPF when the link status changes, you can configure
BFD on OSPF links.
Pre-configuration Tasks
Before configuring BFD for OSPF, complete the following tasks: l Configuring IP addresses for interfaces to make neighboring nodes reachable l Configuring basic OSPF functions to establish the neighbor relationship successfully l Enabling BFD globally
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
159
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Data Preparation
To configure BFD for OSPF, you need the following data.
2
3
No.
Data
1 Number of the OSPF process enabled with BFD
Type and number of the interface enabled with BFD
Values of BFD session parameters
5 OSPF Configuration
5.14.2 Configuring Global BFD
Before creating a BFD session, you need to enable BFD globally.
Context
To set up a BFD session, you need to enable global BFD first. Do as follows on the switch:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
bfd
Global BFD is enabled.
----End
5.14.3 Configuring BFD for OSPF
On the two switches that need to establish a BFD session, you can configure BFD for all the interfaces in a certain OSPF process.
Context
To configure BFD for all interfaces in an OSPF process, do as follows on the switches at the two ends of the link.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
ospf process-id
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
160
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 5 OSPF Configuration
The OSPF view is displayed.
Step 3 Run:
bfd all-interfaces enable
BFD for OSPF is enabled to establish a BFD session.
If all the interfaces in a certain process are configured with BFD and neighbors in this process are in the Full state, OSPF sets the default values of BFD parameters for the interfaces.
You can run the bfd all-interfaces { min-rx-interval receive-interval | min-tx-interval
transmit-interval | detect-multiplier multiplier-value }
*
command to specify the value for each parameter used to establish a BFD session.
NOTE
If only the bfd all-interfaces { min-rx-interval receive-interval | min-tx-interval transmit-interval |
detect-multiplier multiplier-value } * command is used and the bfd all-interfaces enable command is not used, BFD cannot be enabled.
----End
5.14.4 (Optional)Preventing an Interface from Dynamically Setting
Up a BFD Session
To disable BFD on some interfaces, you need to prevent these interfaces from dynamically setting up BFD sessions.
Context
After the bfd all-interfaces enable command is used in an OSPF process, BFD sessions are created on all the OSPF interfaces whose neighbor status is Full. If you do not want to enable
BFD on an interface, do as follows on the interface:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
interface vlanif interface-number
The interface view is displayed.
Step 3 Run:
ospf bfd block
An interface is prevented from dynamically creating a BFD session.
----End
5.14.5 (Optional)Configuring BFD on the Specified Interface
To configure BFD only on some interfaces and not to enable OSPF BFD globally, or to require some interfaces to fast detect link failures after configuring OSPF BFD on them, you can configure BFD on the specified interface.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
161
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 5 OSPF Configuration
Context
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
interface vlanif interface-number
The interface view is displayed.
Step 3 Run:
ospf bfd enable
BFD is enabled on the interface to establish a BFD session.
When BFD is configured globally and the neighbor status is Full, the default values of BFD parameters used to establish a BFD session are set.
You can run the ospf bfd { min-rx-interval receive-interval | min-tx-interval transmit-
interval | detect-multiplier multiplier-value }
* command to specify the value for each parameter used to establish a BFD session.
NOTE
l The priority of BFD configured on an interface is higher than that of BFD configured in a process. That is, if BFD is enabled on an interface, the parameters of the interface are used to establish BFD sessions.
l If the parameters of a BFD session are set but the ospf bfd enable command is not run, BFD cannot be enabled.
----End
5.14.6 Checking the Configuration
After BFD for OSPF is configured, you can check information about the BFD session.
Prerequisite
To configure BFD on the specified interface and not to enable OSPF BFD, or to require the interface to fast detect link faults after configuring OSPF BFD on the interface, do as follows on the interface.
The configurations of the BFD for OSPF are complete.
Procedure
l Run the display ospf [process-id ] bfd session interface-type interface-number [ router-
id ] or display ospf [process-id ] bfd session { router-id | all } command to check the information about the BFD session.
----End
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
162
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Example
5 OSPF Configuration
Run the display ospf bfd session all command. If a BFD session is correctly established, you can see that the BFD status of the local switch is Up. For example:
<Quidway> display ospf bfd session all
OSPF Process 1 with Router ID 3.3.3.3
Area 0.0.0.0 interface 100.2.1.2(Vlanif10)'s BFD Sessions
NeighborId:2.2.2.2 AreaId:0.0.0.0 Interface:Vlanif10
BFDState:up rx :1000 tx :100
Multiplier:3 BFD Local Dis:8194 LocalIpAdd:100.2.1.2
RemoteIpAdd:100.2.1.1 Diagnostic Info: Init
5.15 Configuring the Network Management Function of
OSPF
OSPF supports the network management function. You can bind the OSPF MIB to a certain
OSPF process, and configure the trap function and log function.
5.15.1 Establishing the Configuration Task
Before configuring the network management function for OSPF, familiarize yourself with the applicable environment, complete pre-configuration tasks, and obtain the required data. This can help you complete the configuration task quickly and accurately.
Applicable Environment
OSPF supports the network management function. You can bind OSPF MIB and a certain OSPF process. In addition, OSPF also supports the trap function and the log function.
Pre-configuration Tasks
Before configuring the network management function of OSPF, complete the following tasks: l Configuring IP addresses for interfaces to make neighboring nodes reachable l
Configuring Basic OSPF Functions
Data Preparation
None.
5.15.2 Configuring OSPF MIB Binding
The MIB is a virtual database of the device status maintained by the managed devices.
Context
Issue 01 (2011-10-26)
When multiple OSPF processes are enabled, you can configure OSPF MIB to select the process to be processed, that is, configure OSPF MIB to select the process to which it is bound.
Do as follows on the OSPF router:
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
163
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 5 OSPF Configuration
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
ospf mib-binding process-id
OSPF MIB binding is configured.
----End
5.15.3 Configuring OSPF Trap
Traps are the notifications sent from a router to inform the NMS of the fault detected by the system.
Context
Do as follows on the OSPF router.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
snmp-agent trap enable feature-name ospf [ trap-name { ospfifauthfailure |
ospfifconfigerror | ospfifrxbadpacket | ospfifstatechange |
ospflsdbapproachingoverflow | ospflsdboverflow | ospfmaxagelsa |
ospfnbrrestarthelperstatuschange | ospfnbrstatechange |
ospfnssatranslatorstatuschange | ospforiginatelsa | ospfrestartstatuschange |
ospftxretransmit | ospfvirtifauthfailure | ospfvirtifconfigerror |
ospfvirtifrxbadpacket | ospfvirtifstatechange | ospfvirtiftxretransmit |
ospfvirtnbrrestarthelperstatuschange | ospfvirtnbrstatechange } ]
----End
5.15.4 Configuring OSPF Log
Logs record the operations (such as configuring commands) and specific events (such as the network connection failure) on switches.
Context
Do as follows on the OSPF switch:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
164
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 5 OSPF Configuration
Step 2 Run:
ospf [ process-id ]
The OSPF process view is displayed.
Step 3 Run:
enable log [ config | error | state | snmp-trap ]
The log function is enabled.
----End
5.15.5 Checking the Configuration
After the network management function is configured for OSPF, you can check the contents of the information channel, information recorded in the information center, log buffer, and trap buffer.
Prerequisite
The configurations of the network management function of OSPF are complete.
Procedure
l Run the display ospf [ process-id ] brief command to view information about the binding of OSPF MIBs and OSPF processes.
l Run the display snmp-agent trap feature-name ospf all command to view all trap messages of the OSPF module.
----End
5.16 Improving Security of an OSPF Network
On a network demanding high security, you can configure OSPF authentication and adopt the
GTSM mechanism to improve the security of the OSPF network.
5.16.1 Establishing the Configuration Task
Before improving the security of an OSPF network, familiarize yourself with the applicable environment, complete pre-configuration tasks, and obtain the required data. This can help you complete the configuration task quickly and accurately.
Applicable Environment
In a network demanding high security, you can configure OSPF authentication and adopt the
GTSM mechanism to improve the security of the OSPF network.
The GTSM mechanism defends against attacks by checking the TTL value. If an attacker keeps sending packets to a switch by simulating real OSPF unicast packets, the switch finds itself is the destination of the packets after the interface board receives these packets. The switch directly sends the packets to the control plane for OSPF processing without checking the validity of the packets. The switch busies itself with processing these "valid" packets. As a result, the system is busy, and the CPU is highly occupied.
The GTSM mechanism protects a switch by checking whether the TTL value in the IP packet header is in a pre-defined range to enhance the system security.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
165
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 5 OSPF Configuration
NOTE
GTSM supports only unicast addresses; therefore, in OSPF, GTSM takes effect on the virtual link and the sham link.
Pre-configuration Tasks
Before improving the security of an OSPF network, complete the following tasks: l Configuring IP addresses for interfaces to make neighboring nodes reachable l
Configuring Basic OSPF Functions
Data Preparation
To improve the security of an OSPF network, you need the following data.
4
5
6
2
3
No.
Data
1 OSPF process ID
(Optional) Names of VPN instances of OSPF
(Optional) TTL value to be checked
ID of an OSPF area that needs to be configured with authentication
Number of an OSPF interface that needs to be configured with authentication
Authentication mode and password
5.16.2 Configuring the OSPF GTSM Functions
The GTSM defends against attacks by checking the TTL value.
Context
To apply GTSM functions, enable GTSM on the two ends of the OSPF connection.
The valid TTL range of the detected packets is [255 -hops + 1, 255].
Do as follows on the GTSM switches on the two ends of the virtual link or sham link.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
ospf valid-ttl-hops hops [ vpn-instance vpn-instance-name ]
OSPF GTSM functions are configured.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
166
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 5 OSPF Configuration
NOTE
The ospf valid-ttl-hops command has two functions: l Enabling OSPF GTSM l Configuring the TTL value to be detected
The parameter vpn-instance is valid only for the latter function.
Thus, if the private network policy or the public network policy is configured only, it is recommended to set the default action performed on the packets that do not match the GTSM policy as pass. This prevents the OSPF packets of other processes from being discarded incorrectly.
----End
5.16.3 Adjusting GTSM
GTSM checks the TTL value of only the packet that matches the GTSM policy. You can enable the log function to record information about the discarded packets for fault location.
Context
GTSM checks the TTL value of only the packet that matches the GTSM policy. For the packets that do not match the GTSM policy, you can set them as "pass" or "drop". If the GTSM default action performed on the packet is set as "drop", you need to configure all the switch connections for GTSM. If the packets sent from a switch do not match the GTSM policy, they are dropped.
The connection thus cannot be established. This ensures security but reduces the ease of use.
You can enable the log function to record the information that the packets are dropped. This is convenient for fault location.
Do as follows on the switch configured with GTSM functions.
Procedure
l Setting the GTSM Default Action
1.
Run:
system-view
The system view is displayed.
2.
Run:
gtsm default-action { drop | pass }
The default action performed on the packets that do not match the GTSM policy is set.
By default, the packets that do not match the GTSM policy can pass the filtering.
NOTE
If the default action is configured but the GTSM policy is not configured, GTSM does not take effect.
----End
5.16.4 Configuring the Area Authentication Mode
OSPF supports packet authentication. Only the packets that pass the authentication can be received. If packets fail to pass the authentication, the neighbor relationship cannot be established.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
167
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 5 OSPF Configuration
Context
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
ospf [ process-id ]
The OSPF process view is displayed.
Step 3 Run:
area area-id
The OSPF area view is displayed.
Step 4 Run the following commands to configure the authentication mode of the OSPF area as required: l Run:
authentication-mode simple [ plain plain-text | cipher cipher-text ]
The simple authentication is configured for the OSPF area.
l Run:
authentication-mode { md5 | hmac-md5 } [ key-id { plain plain-text | cipher
cipher-text } ]
The MD5 authentication is configured for the OSPF area.
OSPF supports packet authentication. Only the OSPF packets passing the authentication can be received; otherwise, the neighbor relationship cannot be established normally.
All the switches in an area must agree on the same area authentication mode and password.
For example, the authentication mode of all switches in area 0 is simple authentication, and the password is abc.
----End
5.16.5 Configuring the Interface Authentication Mode
The interface authentication mode is used among neighbor routers to set the authentication mode and password. Its priority is higher than that of the area authentication mode.
Context
OSPF supports packet authentication. Only the OSPF packets passing the authentication can be received; otherwise, packets cannot be received and the neighbor relationship cannot be established normally. In area authentication, all the switches in an area must use the same area authentication mode and password. For example, the authentication mode of all devices in Area
0 is simple authentication and the password is abc.
Do as follows on the OSPF router:
Do as follows on the OSPF router:
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
168
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 5 OSPF Configuration
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
interface interface-type interface-number
The interface view is displayed.
Step 3 Run the following commands to configure the interface authentication mode as required: l Run:
ospf authentication-mode simple [ plain plain-text | cipher cipher-text ]
The simple authentication is configured for the OSPF interface.
l Run:
ospf authentication-mode { md5 | hmac-md5 } [ key-id { plain plain-text |
cipher cipher-text } ]
The MD5 authentication is configured for the OSPF interface.
l Run:
ospf authentication-mode null
The non-authentication mode is configured for the OSPF interface.
The interface authentication mode is used among neighbor routers to set the authentication mode and password. Its priority is higher than that of the area authentication mode.
The authentication mode and password of interfaces in the same network segment must be consistent. If the interfaces are in different network segments, the authentication mode and password of the interfaces can be different.
----End
5.16.6 Checking the Configuration
After OSPF features are configured to improve the stability of an OSPF network, you can check
GTSM statistics and brief statistics.
Prerequisite
The configurations of Improving Security of an OSPF Network are complete.
Procedure
l Run the display gtsm statistics all command to check the GTSM statistics.
l Run the display ospf [ process-id ] request-queue [ interface-type interface-number ]
[neighbor-id ] command to check the OSPF request queue.
l Run the display ospf [ process-id ] retrans-queue [ interface-type interface-number ]
[ neighbor-id ] command to check the OSPF retransmission queue.
l
Run the display ospf [ process-id ] error [ lsa ] or display ospf error [ packet
[ number ] ] command to check the OSPF error information.
----End
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
169
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Example
5 OSPF Configuration
Run the display gtsm statistics command. If the GTSM statistics on each slot, including the total number of OSPF packets, the number of passed packets, and the number of dropped packets, are displayed, it means that the configuration succeeds. For example:
<Quidway> display gtsm statistics all
GTSM Statistics Table
----------------------------------------------------------------
SlotId Protocol Total Counters Drop Counters Pass Counters
----------------------------------------------------------------
0 BGP 0 0 0
0 BGPv6 0 0 0
0 OSPF 0 0 0
0 LDP 0 0 0
----------------------------------------------------------------
5.17 Maintaining OSPF
Maintaining OSPF involves resetting OSPF and clearing OSPF statistics.
5.17.1 Resetting OSPF
Restarting OSPF can reset OSPF. In addition, you can reset OSPF through GR.
Context
CAUTION
The OSPF neighbor relationship is deleted after you reset OSPF connections with the reset
ospf command. So, confirm the action before you use the command.
To reset OSPF connections, run the following reset ospf commands in the user view.
Procedure
l Run the reset ospf [ process-id ] process [ flush-waiting-timer time ] command in the user view to Restart the OSPF process.
l Run the reset ospf [ process-id ] process [ graceful-restart ] command in the user view to Restart the OSPF process in GR mode.
----End
5.17.2 Clearing OSPF
This section describes how to clear OSPF statistics, including OSPF counters, imported routes, and GTSM statistics on the board.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
170
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Context
5 OSPF Configuration
CAUTION
OSPF information cannot be restored after you clear it. So, confirm the action before you use the command.
To clear the OSPF information, run the following reset ospf commands in the user view.
Procedure
l Run the reset ospf [ process-id ] counters [ neighbor [ interface-type interface-number ]
[ router-id ] ] command in the user view to clear OSPF counters.
l Run the reset ospf [ process-id ] redistribution command in the user view to clear the routes imported by OSPF.
l Run the reset gtsm statistics all command in the user view to clear the GTSM statistics on the board.
----End
5.17.3 Debugging OSPF
Routers can generate debugging information after the debugging of a module is enabled in the user view. Debugging information shows the contents of the packets sent or received by the debugged module.
Context
CAUTION
Debugging affects the performance of the system. So, after debugging, run the undo debugging
all command to disable it immediately.
When an OSPF fault occurs, run the following debugging commands in the user view to debug
OSPF and locate the fault.
For the procedure of displaying the debugging information, refer to the chapter "Information
Center Configuration" in the Quidway S9300 Terabit Routing Switch Configuration Guide -
System Management.
For the related debugging commands, refer to the Quidway S9300 Terabit Routing Switch
Debugging Reference.
Procedure
Issue 01 (2011-10-26) l
Run the commands as follow in the user view to enable the debugging of OSPF packets.
–
debugging ospf [ process-id ] packet [ ack | dd | hello | request | update ] [ brief ]
[ filter { src | nbr } { acl-number | ip-prefix ip-prefix-name } ]
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
171
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 5 OSPF Configuration
– debugging ospf packet [ rcv-dump [ error ] | snd-dump ] [ filter { src | nbr } { acl-
number | ip-prefix ip-prefix-name } ]
NOTE
When the parameter filter is used to filter OSPF packet debugging information, to filter debugging information through IP addresses, only IP addresses with 32-bit mask are effective.
l Run the debugging ospf [ process-id ] hot-standby command in the user view to enable the debugging of OSPF hot standby.
l
Run the debugging ospf [ process-id ] event command in the user view to enable the debugging of OSPF events.
l
Run the debugging ospf [ process-id ] lsa-originate command in the user view to enable the debugging of OSPF LSA packets.
l Run the commands as follow in the user view to enable the debugging of OSPF SPF.
– debugging ospf [ process-id ] spf { all | brief | intra }
– debugging ospf [ process-id ] spf { asbr-summary | ase | net-summary | nssa }
[ filter { acl acl-number | ip-prefix ip-prefix-name } ] l Run the debugging ospf [ process-id ] graceful-restart command in the user view to enable the debugging of OSPF GR.
l Run the debugging ospf [ process-id ] bfd command in the user view to enable the debugging of BFD for OSPF.
l Run the debugging ospf retrans-backoff { all | nbr-retrans | old-lsa-ack-ignore | router-
lsa-retrans } command in the user view to enable the debugging of OSPF intelligent retransmission.
l Run the debugging ospf press-event command in the user view to enable the debugging of CPU usage change events in OSPF.
l Run the debugging ospf timewheel event command in the user view to enable the debugging of OSPF time wheel events.
----End
5.18 Configuration Examples
This section provides several configuration examples of OSPF.
5.18.1 Example for Configuring Basic OSPF Functions
Networking Requirements
, all Switch s run OSPF, and the entire AS is partitioned into three areas.
Switch A and Switch B function as ABRs to forward routes between areas.
You must ensure that every Switch can learn the routes to all network segments in the AS.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
172
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 5 OSPF Configuration
Figure 5-4 Networking diagram for configuring the basic OSPF functions
GE1/0/2
SwitchA
Area 0
GE1/0/1
GE1/0/1
SwitchB
GE1/0/2
SwitchC
GE1/0/1
Area 1
GE1/0/2
GE1/0/1
Area 2
GE1/0/2
SwitchD
GE1/0/1 GE1/0/1
SwitchE
SwitchF
Switch
Switch A
Switch A
Switch B
Switch B
Switch C
Switch C
Switch D
Switch D
Switch E
Switch F
Interface
GigabitEthernet1/0/1
GigabitEthernett1/0/2
GigabitEthernet1/0/1
GigabitEthernet1/0/2
GigabitEthernet1/0/1
GigabitEthernet1/0/2
GigabitEthernet1/0/1
GigabitEthernet1/0/2
GigabitEthernet1/0/1
GigabitEthernet1/0/1
VLANIF interface
VLANIF 10
VLANIF 20
VLANIF 10
VLANIF 30
VLANIF 20
VLANIF 40
VLANIF 30
VLANIF 50
VLANIF 40
VLANIF 50
IP address
192.168.0.1/24
192.168.1.1/24
192.168.0.2/24
192.168.2.1/24
192.168.1.2/24
172.16.1.1/24
192.168.2.2/24
172.17.1.1/24
172.16.1.2/24
172.17.1.2/24
Configuration Roadmap
The configuration roadmap is as follows:
1.
Create VLANs and add corresponding interfaces to the VLANs.
2.
Assign an IP address to each VLANIF interface.
3.
Enable OSPF on each Switch and specify network segments in different areas.
4.
View the routing table and database information.
Data Preparation
l ID of the VLAN that each interface belongs to, as shown in
l
IP address of each VLANIF interface, as shown in
l Router ID and OSPF process ID of each Switch and the area that each interface belongs to:
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
173
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 5 OSPF Configuration
– On Switch A, the router ID is 1.1.1.1; the OSPF process ID is 1; the network segment of Area 0 is 192.168.0.0/24; the network segment of Area 1 is 192.168.1.0/24.
– On Switch B, the router ID is 2.2.2.2; the OSPF process ID is 1; the network segment of Area 0 is 192.168.0.0/24; the network segment of Area 2 is 192.168.2.0/24.
– On Switch C, the router ID is 3.3.3.3; the OSPF process ID is 1; the network segments of Area 1 are 192.168.1.0/24 and 172.16.1.0/24.
– On Switch D, the router ID is 4.4.4.4; the OSPF process ID is 1; the network segments of Area 2 are 192.168.2.0/24 and 172.17.1.0/24.
– On Switch E, the router ID is 5.5.5.5; the OSPF process ID is 1; the network segment of Area 1 is 172.16.1.0/24.
– On Switch F, the router ID is 6.6.6.6; the OSPF process ID is 1; the network segment of Area 2 is 172.17.1.0/24.
Procedure
Step 1 Configure VLANs that the related interfaces belong to.
<Quidway> system-view
[Quidway] sysname SwitchA
[SwitchA] vlan batch 10 20
[SwitchA] interface gigabitethernet 1/0/1
[SwitchA-GigabitEthernet1/0/1] port hybrid pvid vlan 10
[SwitchA-GigabitEthernet1/0/1] port hybrid untagged vlan 10
[SwitchA-GigabitEthernet1/0/1] quit
[SwitchA] interface gigabitethernet 1/0/2
[SwitchA-GigabitEthernet1/0/2] port hybrid pvid vlan 20
[SwitchA-GigabitEthernet1/0/2] port hybrid untagged vlan 20
[SwitchA-GigabitEthernet1/0/2] quit
The configurations of Switch B, Switch C, Switch E, and Switch F are similar to the configuration of Switch A, and are not mentioned here.
Step 2 Assign an IP address to each VLANIF interface.
[SwitchA] interface vlanif 10
[SwitchA-Vlanif10] ip address 192.168.0.1 24
[SwitchA-Vlanif10] quit
[SwitchA] interface vlanif 20
[SwitchA-Vlanif20] ip address 192.168.1.1 24
[SwitchA-Vlanif20] quit
The configurations on Switch B, Switch C, Switch E, and Switch F are similar to the configuration of Switch A, and are not mentioned here.
Step 3 Configure the basic OSPF functions.
# Configure Switch A.
[SwitchA] router id 1.1.1.1
[SwitchA] ospf
[SwitchA-ospf-1] area 0
[SwitchA-ospf-1-area-0.0.0.0] network 192.168.0.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 192.168.1.0 0.0.0.255
[SwitchA-ospf-1-area-0.0.0.1] quit
[SwitchA-ospf-1] quit
# Configure Switch B.
[SwitchB] router id 2.2.2.2
[SwitchB] ospf
[SwitchB-ospf-1] area 0
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
174
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
5 OSPF Configuration
[SwitchB-ospf-1-area-0.0.0.0] network 192.168.0.0 0.0.0.255
[SwitchB-ospf-1-area-0.0.0.0] quit
[SwitchB-ospf-1] area 2
[SwitchB-ospf-1-area-0.0.0.2] network 192.168.2.0 0.0.0.255
[SwitchB-ospf-1-area-0.0.0.2] quit
[SwitchB-ospf-1] quit
# Configure Switch C.
[SwitchC] router id 3.3.3.3
[SwitchC] ospf
[SwitchC-ospf-1] area 1
[SwitchC-ospf-1-area-0.0.0.1] network 192.168.1.0 0.0.0.255
[SwitchC-ospf-1-area-0.0.0.1] network 172.16.1.0 0.0.0.255
[SwitchC-ospf-1-area-0.0.0.1] quit
[SwitchC-ospf-1] quit
# Configure Switch D.
[SwitchD] router id 4.4.4.4
[SwitchD] ospf
[SwitchD-ospf-1] area 2
[SwitchD-ospf-1-area-0.0.0.2] network 192.168.2.0 0.0.0.255
[SwitchD-ospf-1-area-0.0.0.2] network 172.17.1.0 0.0.0.255
[SwitchD-ospf-1-area-0.0.0.2] quit
[SwitchD-ospf-1] quit
# Configure Switch E.
[SwitchE] router id 5.5.5.5
[SwitchE] ospf
[SwitchE-ospf-1] area 1
[SwitchE-ospf-1-area-0.0.0.1] network 172.16.1.0 0.0.0.255
[SwitchE-ospf-1-area-0.0.0.1] quit
[SwitchE-ospf-1] quit
# Configure Switch F.
[SwitchF] router id 6.6.6.6
[SwitchF] ospf
[SwitchF-ospf-1] area 2
[SwitchF-ospf-1-area-0.0.0.2] network 172.17.1.0 0.0.0.255
[SwitchF-ospf-1-area-0.0.0.2] quit
[SwitchF-ospf-1] quit
Step 4 Verify the configuration.
# View information about OSPF neighbors of Switch A.
[SwitchA] display ospf peer
OSPF Process 1 with Router ID 1.1.1.1
Neighbors
Area 0.0.0.0 interface 192.168.0.1(Vlanif10)'s neighbors
Router ID: 2.2.2.2 Address: 192.168.0.2 GR State: Normal
State: Full Mode:Nbr is Master Priority: 1
DR: 192.168.0.1 BDR: 192.168.0.2 MTU: 0
Dead timer due in 36 sec
Neighbor is up for 00:15:04
Authentication Sequence: [ 0 ]
Neighbors
Area 0.0.0.1 interface 192.168.1.1(Vlanif20)'s neighbors
Router ID: 3.3.3.3 Address: 192.168.1.2 GR State: Normal
State: Full Mode:Nbr is Master Priority: 1
DR: 192.168.1.1 BDR: 192.168.1.2 MTU: 0
Dead timer due in 39 sec
175
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
5 OSPF Configuration
Neighbor is up for 00:07:32
Authentication Sequence: [ 0 ]
# Check the OSPF routing table of 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
172.16.1.0/24 2 Transit 192.168.1.2 3.3.3.3 0.0.0.1
172.17.1.0/24 3 Inter-area 192.168.0.2 2.2.2.2 0.0.0.0
192.168.0.0/24 1 Transit 192.168.0.1 1.1.1.1 0.0.0.0
192.168.1.0/24 1 Transit 192.168.1.1 1.1.1.1 0.0.0.1
192.168.2.0/24 2 Inter-area 192.168.0.2 2.2.2.2 0.0.0.0
Total Nets: 5
Intra Area: 3 Inter Area: 2 ASE: 0 NSSA: 0
# View the LSDB of Switch A.
[SwitchA] display ospf lsdb
OSPF Process 1 with Router ID 1.1.1.1
Link State Database
Area: 0.0.0.0
Type LinkState ID AdvRouter Age Len Sequence Metric
Router 2.2.2.2 2.2.2.2 317 48 80000003 1
Router 1.1.1.1 1.1.1.1 316 48 80000002 1
Network 192.168.0.1 1.1.1.1 316 32 80000001 0
Sum-Net 172.16.1.0 1.1.1.1 250 28 80000001 2
Sum-Net 172.17.1.0 2.2.2.2 203 28 80000001 2
Sum-Net 192.168.2.0 2.2.2.2 237 28 80000002 1
Sum-Net 192.168.1.0 1.1.1.1 295 28 80000002 1
Area: 0.0.0.1
Type LinkState ID AdvRouter Age Len Sequence Metric
Router 192.168.1.2 192.168.1.2 188 48 80000002 1
Router 5.5.5.5 5.5.5.5 214 36 80000004 1
Router 3.3.3.3 3.3.3.3 217 60 80000008 1
Router 1.1.1.1 1.1.1.1 289 48 80000002 1
Network 172.16.1.1 3.3.3.3 670 32 80000001 0
Sum-Net 172.17.1.0 1.1.1.1 202 28 80000001 3
Sum-Net 192.168.2.0 1.1.1.1 242 28 80000001 2
Sum-Net 192.168.0.0 1.1.1.1 300 28 80000001 1
# View the routing table of Switch D and run the ping command to check the network connectivity.
[SwitchD] display ospf routing
OSPF Process 1 with Router ID 4.4.4.4
Routing Tables
Routing for Network
Destination Cost Type NextHop AdvRouter Area
172.16.1.0/24 4 Inter-area 192.168.2.1 2.2.2.2 0.0.0.2
172.17.1.0/24 1 Transit 172.17.1.1 4.4.4.4 0.0.0.2
192.168.0.0/24 2 Inter-area 192.168.2.1 2.2.2.2 0.0.0.2
192.168.1.0/24 3 Inter-area 192.168.2.1 2.2.2.2 0.0.0.2
192.168.2.0/24 1 Transit 192.168.2.2 4.4.4.4 0.0.0.2
Total Nets: 5
Intra Area: 2 Inter Area: 3 ASE: 0 NSSA: 0
[SwitchD] ping 172.16.1.1
PING 172.16.1.1: 56 data bytes, press CTRL_C to break
176
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
5 OSPF Configuration
Reply from 172.16.1.1: bytes=56 Sequence=1 ttl=253 time=62 ms
Reply from 172.16.1.1: bytes=56 Sequence=2 ttl=253 time=16 ms
Reply from 172.16.1.1: bytes=56 Sequence=3 ttl=253 time=62 ms
Reply from 172.16.1.1: bytes=56 Sequence=4 ttl=253 time=94 ms
Reply from 172.16.1.1: bytes=56 Sequence=5 ttl=253 time=63 ms
--- 172.16.1.1 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 16/59/94 ms
----End
Configuration Files
l Configuration file of Switch A
#
sysname SwitchA
#
router id 1.1.1.1
#
vlan batch 10 20
# interface Vlanif10
ip address 192.168.0.1 255.255.255.0
# interface Vlanif20
ip address 192.168.1.1 255.255.255.0
# interface GigabitEthernet1/0/1
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# interface GigabitEthernet1/0/2
port hybrid pvid vlan 20
port hybrid untagged vlan 20
# ospf 1
area 0.0.0.0
network 192.168.0.0 0.0.0.255
area 0.0.0.1
network 192.168.1.0 0.0.0.255
# return l Configuration file of Switch B
#
sysname SwitchB
#
router id 2.2.2.2
#
vlan batch 10 30
# interface Vlanif10
ip address 192.168.0.2 255.255.255.0
# interface Vlanif30
ip address 192.168.2.1 255.255.255.0
# interface GigabitEthernet1/0/1
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# interface GigabitEthernet1/0/2
port hybrid pvid vlan 30
port hybrid untagged vlan 30
#
177
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Issue 01 (2011-10-26) ospf 1
area 0.0.0.0
network 192.168.0.0 0.0.0.255
area 0.0.0.2
network 192.168.2.0 0.0.0.255
# return l Configuration file of Switch C
#
sysname SwitchC
#
router id 3.3.3.3
#
vlan batch 20 40
# interface Vlanif20
ip address 192.168.1.2 255.255.255.0
# interface Vlanif40
ip address 172.16.1.1 255.255.255.0
# interface GigabitEthernet1/0/1
port hybrid pvid vlan 20
port hybrid untagged vlan 20
# interface GigabitEthernet1/0/2
port hybrid pvid vlan 40
port hybrid untagged vlan 40
# ospf 1
area 0.0.0.1
network 192.168.1.0 0.0.0.255
network 172.16.1.0 0.0.0.255
# return l
Configuration file of Switch D
#
sysname SwitchD
#
router id 4.4.4.4
#
vlan batch 30 50
# interface Vlanif30
ip address 192.168.2.2 255.255.255.0
# interface Vlanif50
ip address 172.17.1.1 255.255.255.0
# interface GigabitEthernet1/0/1
port hybrid pvid vlan 30
port hybrid untagged vlan 30
# interface GigabitEthernet1/0/2
port hybrid pvid vlan 50
port hybrid untagged vlan 50
# ospf 1
area 0.0.0.2
network 192.168.2.0 0.0.0.255
network 172.17.1.0 0.0.0.255
# return l Configuration file of Switch E
#
sysname SwitchE
#
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
5 OSPF Configuration
178
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 5 OSPF Configuration router id 5.5.5.5
#
vlan batch 40
# interface Vlanif40
ip address 172.16.1.2 255.255.255.0
# interface GigabitEthernet1/0/1
port hybrid pvid vlan 40
port hybrid untagged vlan 40
# ospf 1
area 0.0.0.1
network 172.16.1.0 0.0.0.255
# return l Configuration file of Switch F
#
sysname SwitchF
#
router id 6.6.6.6
#
vlan batch 50
# interface Vlanif50
ip address 172.17.1.2 255.255.255.0
# interface GigabitEthernet1/0/1
port hybrid pvid vlan 40
port hybrid untagged vlan 40
# ospf 1
area 0.0.0.2
network 172.17.1.0 0.0.0.255
# return
5.18.2 Example for Configuring an OSPF Stub Area
Networking Requirements
, OSPF is enabled on all Switches and the AS is divided into three areas.
Switch A and Switch B function as ABRs to forward routes between areas; Switch D functions as the ASBR to import external routes, that is, static routes.
You need to configure Area 1 as a stub area. The LSAs advertised to this area can thus be reduced, without affecting the route reachability.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
179
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Figure 5-5 Networking diagram for configuring a stub area
GE1/0/2
SwitchA
Area 0
GE1/0/1
GE1/0/1
SwitchB
GE1/0/2
SwitchD
SwitchC
GE1/0/1
Area 1
GE1/0/2
GE1/0/1
Area 2
GE1/0/2
GE1/0/1 GE1/0/1
SwitchE
SwitchF
5 OSPF Configuration
Switch
SwitchA
SwitchA
SwitchB
SwitchB
SwitchC
SwitchC
SwitchD
SwitchD
SwitchE
SwitchF
Interface
GigabitEthernet1/0/1
GigabitEthernet1/0/2
GigabitEthernett1/0/1
GigabitEthernet1/0/2
GigabitEthernet1/0/1
GigabitEthernet1/0/2
GigabitEthernet1/0/1
GigabitEthernet1/0/2
GigabitEthernet1/0/1
GigabitEthernet1/0/1
VLANIF interface IP address
VLANIF 10 192.168.0.1/24
VLANIF 20
VLANIF 10
VLANIF 30
192.168.1.1/24
192.168.0.2/24
192.168.2.1/24
VLANIF 20
VLANIF 40
VLANIF 30
VLANIF 50
VLANIF 40
VLANIF 50
192.168.1.2/24
172.16.1.1/24
192.168.2.2/24
172.17.1.1/24
172.16.1.2/24
172.17.1.2/24
Configuration Roadmap
The configuration roadmap is as follows:
1.
Enable OSPF on each Switch and configure the basic OSPF functions.
2.
Configure static routes on Switch D and import them into OSPF.
3.
Configure Area 1 as a stub area by running the stub command on all Switch s in Area 1.
4.
Configure Switch A not to advertise Type 3 LSAs to the stub area.
Data Preparation
To complete the configuration, you need the following data: l ID of the VLAN that each interface belongs to, as shown in
l
IP address of each VLANIF interface, as shown in
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
180
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
5 OSPF Configuration l Router ID and OSPF process ID of each Switch and area that each interface belongs to:
–
On Switch A, the router ID is 1.1.1.1; the OSPF process ID is 1; the network segment of Area 0 is 192.168.0.0/24, the network segment of Area 1 is 192.168.1.0/24.
–
On Switch B, the router ID is 2.2.2.2; the OSPF process ID is 1; the network segment of Area 0 is 192.168.0.0/24; the network segment of Area 2 is 192.168.2.0/24.
–
On Switch C, the router ID is 3.3.3.3; the OSPF process ID is 1; the network segments of Area 1 are 192.168.1.0/24 and 172.16.1.0/24.
–
On Switch D, the router ID is 4.4.4.4; the OSPF process ID is 1; the network segments of Area 2 are 192.168.2.0/24 and 172.17.1.0/24.
–
On Switch E, the router ID is 5.5.5.5; the OSPF process ID is 1; the network segment of Area 1 is 172.16.1.0/24.
–
On Switch F, the router ID is 6.6.6.6; the OSPF process ID is 1; the network segment of Area 2 is 172.17.1.0/24.
Procedure
Step 1 Configure the basic OSPF functions. See
5.18.1 Example for Configuring Basic OSPF
.
Step 2 Configure Switch D to import static routes.
# Import static routes on Switch D.
[SwitchD] ip route-static 200.0.0.0 8 null 0
[SwitchD] ospf
[SwitchD-ospf-1] import-route static type 1
[SwitchD-ospf-1] quit
# View information about the ABR or ASBR on Switch C.
[SwitchC] display ospf abr-asbr
OSPF Process 1 with Router ID 3.3.3.3
Routing Table to ABR and ASBR
Type Destination Area Cost Nexthop RtType
Intra-area 1.1.1.1 0.0.0.1 1 192.168.1.1 ABR
Inter-area 4.4.4.4 0.0.0.1 3 192.168.1.1 ASBR
# View the OSPF routing table of Switch C.
[SwitchC] display ospf routing
OSPF Process 1 with Router ID 3.3.3.3
Routing Tables
Routing for Network
Destination Cost Type NextHop AdvRouter Area
172.16.1.0/24 1 Transit 172.16.1.1 3.3.3.3 0.0.0.1
172.17.1.0/24 4 Inter-area 192.168.1.1 1.1.1.1 0.0.0.1
192.168.0.0/24 2 Inter-area 192.168.1.1 1.1.1.1 0.0.0.1
192.168.1.0/24 1 Transit 192.168.1.2 3.3.3.3 0.0.0.1
192.168.2.0/24 3 Inter-area 192.168.1.1 1.1.1.1 0.0.0.1
Routing for ASEs
Destination Cost Type Tag NextHop AdvRouter
200.0.0.0/8 4 Type1 1 192.168.1.1 4.4.4.4
Total Nets: 6
Intra Area: 2 Inter Area: 3 ASE: 1 NSSA: 0
Issue 01 (2011-10-26) 181
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
5 OSPF Configuration
If Switch C resides in a common area, you can find AS external routes in the routing table.
Step 3 Configure Area 1 as a stub area.
# Configure Switch A.
[SwitchA] ospf
[SwitchA-ospf-1] area 1
[SwitchA-ospf-1-area-0.0.0.1] stub
[SwitchA-ospf-1-area-0.0.0.1] quit
[SwitchA-ospf-1] quit
# Configure Switch C.
[SwitchC] ospf
[SwitchC-ospf-1] area 1
[SwitchC-ospf-1-area-0.0.0.1] stub
[SwitchC-ospf-1-area-0.0.0.1] quit
[SwitchC-ospf-1] quit
# Configure Switch E.
[SwitchE] ospf
[SwitchE-ospf-1] area 1
[SwitchE-ospf-1-area-0.0.0.1] stub
[SwitchE-ospf-1-area-0.0.0.1] quit
[SwitchE-ospf-1] quit
# View the routing table of Switch C.
[SwitchC] display ospf routing
OSPF Process 1 with Router ID 3.3.3.3
Routing Tables
Routing for Network
Destination Cost Type NextHop AdvRouter Area
0.0.0.0/0 2 Inter-area 192.168.1.1 1.1.1.1 0.0.0.1
172.16.1.0/24 1 Transit 172.16.1.1 3.3.3.3 0.0.0.1
172.17.1.0/24 4 Inter-area 192.168.1.1 1.1.1.1 0.0.0.1
192.168.0.0/24 2 Inter-area 192.168.1.1 1.1.1.1 0.0.0.1
192.168.1.0/24 1 Transit 192.168.1.2 3.3.3.3 0.0.0.1
192.168.2.0/24 3 Inter-area 192.168.1.1 1.1.1.1 0.0.0.1
Total Nets: 6
Intra Area: 2 Inter Area: 4 ASE: 0 NSSA: 0
When the area where Switch C resides is configured as a stub area, you cannot find the AS external route but a default route out of the AS.
# Disable Switch A from advertising Type 3 LSAs to the stub area.
[SwitchA] ospf
[SwitchA-ospf-1] area 1
[SwitchA-ospf-1-area-0.0.0.1] stub no-summary
[SwitchA-ospf-1-area-0.0.0.1] quit
[SwitchA-ospf-1] quit
Step 4 Verify the configuration.
# View the OSPF routing table of Switch C.
[SwitchC] display ospf routing
OSPF Process 1 with Router ID 3.3.3.3
Routing Tables
Routing for Network
Destination Cost Type NextHop AdvRouter Area
Issue 01 (2011-10-26) 182
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
5 OSPF Configuration
0.0.0.0/0 2 Inter-area 192.168.1.1 1.1.1.1 0.0.0.1
172.16.1.0/24 1 Transit 172.16.1.1 3.3.3.3 0.0.0.1
192.168.1.0/24 1 Transit 192.168.1.2 3.3.3.3 0.0.0.1
Total Nets: 3
Intra Area: 2 Inter Area: 1 ASE: 0 NSSA: 0
After the advertisement of summary LSA to the stub area is disabled, the route entries are further reduced. External routes are not found in the routing table. Instead, there is a default route out of the AS.
----End
Configuration Files
l Configuration file of Switch A
#
sysname SwitchA
#
router id 1.1.1.1
#
vlan batch 10 20
# interface Vlanif10
ip address 192.168.0.1 255.255.255.0
# interface Vlanif20
ip address 192.168.1.1 255.255.255.0
# interface GigabitEthernet1/0/1
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# interface GigabitEthernet1/0/2
port hybrid pvid vlan 20
port hybrid untagged vlan 20
# ospf 1
area 0.0.0.0
network 192.168.0.0 0.0.0.255
area 0.0.0.1
network 192.168.1.0 0.0.0.255
stub no-summary
# return
NOTE
Configuration files of Switch B and Switch F are similar to the configuration file of Switch A, and are not mentioned here.
l Configuration file of Switch C
#
sysname SwitchC
#
router id 3.3.3.3
#
vlan batch 20 40
# interface Vlanif20
ip address 192.168.1.2 255.255.255.0
# interface Vlanif40
ip address 172.16.1.1 255.255.255.0
# interface GigabitEthernet1/0/1
port hybrid pvid vlan 20
port hybrid untagged vlan 20
Issue 01 (2011-10-26) 183
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
# interface GigabitEthernet1/0/2
port hybrid pvid vlan 40
port hybrid untagged vlan 40
# ospf 1 area 0.0.0.1
network 192.168.1.0 0.0.0.255
network 172.16.1.0 0.0.0.255
stub
# return l Configuration file of Switch D
#
sysname SwitchD
#
vlan batch 30 50
#
router id 4.4.4.4
# interface Vlanif30
ip address 192.168.2.2 255.255.255.0
# interface Vlanif50
ip address 172.17.1.1 255.255.255.0
# interface GigabitEthernet1/0/1
port hybrid pvid vlan 30
port hybrid untagged vlan 30
# interface GigabitEthernet1/0/2
port hybrid pvid vlan 30
port hybrid untagged vlan 30
# ospf 1
import-route static type 1
area 0.0.0.2
network 192.168.2.0 0.0.0.255
network 172.17.1.0 0.0.0.255
#
ip route-static 200.0.0.0 255.0.0.0 NULL0
# return l Configuration file of Switch E
#
sysname SwitchE
#
router id 5.5.5.5
#
vlan batch 40
# interface Vlanif40
ip address 172.16.1.2 255.255.255.0
# interface GigabitEthernet1/0/1
port hybrid pvid vlan 40
port hybrid untagged vlan 40
# ospf 1
area 0.0.0.1
network 172.16.1.0 0.0.0.255
stub
# return
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
5 OSPF Configuration
184
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 5 OSPF Configuration
5.18.3 Example for Configuring an NSSA Area
Networking Requirements
, OSPF is enabled on all Switches and the AS is divided into three areas.
Switch A and Switch B function as ABRs to forward routes between areas; Switch D functions as the ASBR to import external routes, that is, static routes.
You need to configure Area 1 as an NSSA area and configure
import external routes (static routes). The routing information can be transmitted correctly in the AS.
Figure 5-6 Networking diagram for configuring an NSSA area
GE1/0/2
SwitchA
Area 0
GE1/0/1
GE1/0/1
SwitchB
GE1/0/2
SwitchC
GE1/0/1
Area 1
GE1/0/2
GE1/0/1
Area 2
GE1/0/2
SwitchD
GE1/0/1 GE1/0/1
SwitchE
SwitchF
Switch
SwitchA
SwitchA
SwitchB
SwitchB
SwitchC
SwitchC
SwitchD
SwitchD
SwitchE
SwitchF
Interface
GigabitEthernet1/0/1
GigabitEthernet1/0/2
GigabitEthernet1/0/1
GigabitEthernet1/0/2
GigabitEthernet1/0/1
GigabitEthernet1/0/2
GigabitEthernet1/0/1
GigabitEthernet1/0/2
GigabitEthernet1/0/1
GigabitEthernet1/0/1
VLANIF interface
VLANIF 10
VLANIF 20
VLANIF 10
VLANIF 30
VLANIF 20
VLANIF 40
VLANIF 30
VLANIF 50
VLANIF 40
VLANIF 50
Configuration Roadmap
The configuration roadmap is as follows:
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
IP address
192.168.0.1/24
192.168.1.1/24
192.168.0.2/24
192.168.2.1/24
192.168.1.2/24
172.16.1.1/24
192.168.2.2/24
172.17.1.1/24
172.16.1.2/24
172.17.1.2/24
185
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 5 OSPF Configuration
1.
Enable OSPF on each Switch and configure the basic OSPF functions.
2.
Configure static routes on Switch D and import them into OSPF.
3.
Configure Area 1 as an NSSA area and check the OSPF routing information of Switch C.
You must run the nssa command on all the devices in Area 1.
4.
Configure static routes on Switch C, import them into OSPF, and check the OSPF routing information of Switch D.
Data Preparation
To complete the configuration, you need the following data: l
ID of the VLAN that each interface belongs to, as shown in
l
IP address of each VLANIF interface, as shown in
l Router ID and OSPF process ID of each Switch and the area that each interface belongs to:
–
On Switch A, the router ID is 1.1.1.1; the OSPF process ID is 1; the network segment of Area 0 is 192.168.0.0/24, and the network segment of Area 1 is 192.168.1.0/24.
–
On Switch B, the router ID is 2.2.2.2; the OSPF process ID is 1; the network segment of Area 0 is 192.168.0.0/24; the network segment of Area 2 is 192.168.2.0/24.
–
On Switch C, the router ID is 3.3.3.3; the OSPF process ID is 1; the network segments of Area 1 are 192.168.1.0/24 and 172.16.1.0/24.
– On Switch D, the router ID is 4.4.4.4; the OSPF process ID is 1; the network segments of Area 2 are 192.168.2.0/24 and 172.17.1.0/24.
– On Switch E, the router ID is 5.5.5.5; the OSPF process ID is 1; the network segment of Area 1 is 172.16.1.0/24.
– On Switch F, the router ID is 6.6.6.6; the OSPF process ID is 1; the network segment of Area 2 is 172.17.1.0/24.
Procedure
Step 1 Configure the basic OSPF functions. See
5.18.1 Example for Configuring Basic OSPF
.
Step 2 Configure Switch D to import static routes. See
5.18.2 Example for Configuring an OSPF
.
Step 3 Configure Area 1 as an NSSA area.
# Configure Switch A.
[SwitchA] ospf
[SwitchA-ospf-1] area 1
[SwitchA-ospf-1-area-0.0.0.1] nssa default-route-advertise no-summary
[SwitchA-ospf-1-area-0.0.0.1] quit
[SwitchA-ospf-1] quit
# Configure Switch C.
[SwitchC] ospf
[SwitchC-ospf-1] area 1
[SwitchC-ospf-1-area-0.0.0.1] nssa
[SwitchC-ospf-1-area-0.0.0.1] quit
[SwitchC-ospf-1] quit
# Configure Switch E.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
186
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 5 OSPF Configuration
[SwitchE] ospf
[SwitchE-ospf-1] area 1
[SwitchE-ospf-1-area-0.0.0.1] nssa
[SwitchE-ospf-1-area-0.0.0.1] quit
[SwitchE-ospf-1] quit
NOTE
The default-route-advertise and no-summary keywords are recommend on the ABR (Switch A). In this manner, the size of the routing table of devices in an NSSA area can be reduced. For the other devices in the NSSA area, you need to run only the nssa command.
# View the OSPF routing table of Switch C.
[SwitchC] display ospf routing
OSPF Process 1 with Router ID 3.3.3.3
Routing Tables
Routing for Network
Destination Cost Type NextHop AdvRouter Area
0.0.0.0/0 2 Inter-area 192.168.1.1 1.1.1.1 0.0.0.1
172.16.1.0/24 1 Transit 172.16.1.1 3.3.3.3 0.0.0.1
192.168.1.0/24 1 Transit 192.168.1.2 3.3.3.3 0.0.0.1
Total Nets: 3
Intra Area: 2 Inter Area: 1 ASE: 0 NSSA: 0
Step 4 Configure Switch C to import static routes.
# Import static routes on Switch C.
[SwitchC] ip route-static 100.0.0.0 8 null 0
[SwitchC] ospf
[SwitchC-ospf-1] import-route static
[SwitchC-ospf-1] quit
Step 5 Verify the configuration.
# View the OSPF routing table of Switch D.
[SwitchD] display ospf routing
OSPF Process 1 with Router ID 4.4.4.4
Routing Tables
Routing for Network
Destination Cost Type NextHop AdvRouter Area
172.16.1.0/24 4 Inter-area 192.168.2.1 2.2.2.2 0.0.0.2
172.17.1.0/24 1 Transit 172.17.1.1 4.4.4.4 0.0.0.2
192.168.0.0/24 2 Inter-area 192.168.2.1 2.2.2.2 0.0.0.2
192.168.1.0/24 3 Inter-area 192.168.2.1 2.2.2.2 0.0.0.2
192.168.2.0/24 1 Transit 192.168.2.2 4.4.4.4 0.0.0.2
Routing for ASEs
Destination Cost Type Tag NextHop AdvRouter
100.0.0.0/8 1 Type2 1 192.168.2.1 1.1.1.1
Total Nets: 6
Intra Area: 2 Inter Area: 3 ASE: 1 NSSA: 0
From the routing table of Switch D, you can find that an AS external route is imported to the
NSSA area.
----End
Configuration Files
l Configuration file of SwitchA
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
187
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 5 OSPF Configuration
#
sysname SwitchA
#
router id 1.1.1.1
#
vlan batch 10 20
# interface Vlanif10
ip address 192.168.0.1 255.255.255.0
# interface Vlanif20
ip address 192.168.1.1 255.255.255.0
# interface GigabitEthernet1/0/1
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# interface GigabitEthernet1/0/2
port hybrid pvid vlan 20
port hybrid untagged vlan 20
# ospf 1
area 0.0.0.0
network 192.168.0.0 0.0.0.255
area 0.0.0.1
network 192.168.1.0 0.0.0.255
nssa default-route-advertise no-summary
# return
NOTE
Configuration files of Switch B, Switch D, and Switch F are similar to the configuration file of Switch
A, and are not mentioned here.
l Configuration file of Switch C
#
sysname SwitchC
#
router id 3.3.3.3
#
vlan batch 20 40
# interface Vlanif20
ip address 192.168.1.2 255.255.255.0
# interface Vlanif40
ip address 172.16.1.1 255.255.255.0
# interface GigabitEthernet1/0/1
port hybrid pvid vlan 20
port hybrid untagged vlan 20
# interface GigabitEthernet1/0/2
port hybrid pvid vlan 40
port hybrid untagged vlan 40
# ospf 1
import-route static
area 0.0.0.1
network 192.168.1.0 0.0.0.255
network 172.16.1.0 0.0.0.255
nssa
#
ip route-static 100.0.0.0 255.0.0.0 NULL0
# return l Configuration file of Switch E
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
188
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 5 OSPF Configuration
#
sysname SwitchE
#
router id 5.5.5.5
#
vlan batch 40
# interface Vlanif40
ip address 172.16.1.2 255.255.255.0
# interface GigabitEthernet1/0/1
port hybrid pvid vlan 40
port hybrid untagged vlan 40
# ospf 1
area 0.0.0.1
network 172.16.1.0 0.0.0.255
nssa
# return
5.18.4 Example for Configuring DR Election of OSPF
Networking Requirements
, Switch A has the highest priority of 100 on the network and is elected
as the DR; Switch C has the second highest priority and is elected as the BDR; The priority of
Switch B is 0 and therefore cannot be elected as a DR or a BDR; the priority of Switch D is not set, so Switch D uses the default value 1.
Figure 5-7 Networking diagram for configuring DR election of an OSPF process
SwitchA
SwitchB
GE1/0/1
GE1/0/1
GE1/0/1
GE1/0/1
SwitchC
Switch
Switch A
Switch B
Switch C
Switch D
SwitchD
Interface
GigabitEthernet1/0/1
GigabitEthernet1/0/1
GigabitEthernet1/0/1
GigabitEthernet1/0/1
Configuration Roadmap
The configuration roadmap is as follows:
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
VLANIF interface IP address
VLANIF 10 192.168.1.1/24
VLANIF 10 192.168.1.2/24
VLANIF 10
VLANIF 10
192.168.1.3/24
192.168.1.4/24
189
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
5 OSPF Configuration
1.
Configure the ID of the VLAN that each interface belongs to.
2.
Assign an IP address to each VLANIF interface.
3.
Configure the router ID, enable OSPF, and specify network segments on each Switch.
4.
Check whether an Switch is the DR or BDR with its default DR priority.
5.
Set the DR priority of the interface on each Switch and check whether the Switch becomes the DR or BDR.
Data Preparation
To complete the configuration, you need the following data: l ID of the VLAN that each interface belongs to, as shown in
l
IP address of each VLANIF interface, as shown in
l Router ID, OSPF process ID, and DR priority of each Switch, and area that each interface belongs to:
– On Switch A, the router ID is 1.1.1.1; the OSPF process ID is 1; the network segment of Area 0 is 192.168.1.0/24; the DR priority is 100.
– On Switch B, the router ID is 2.2.2.2; the OSPF process ID is 1; the network segment of Area 0 is 192.168.1.0/24; the DR priority is 0.
– On Switch C, the router ID is 3.3.3.3; the OSPF process ID is 1; the network segment of Area 0 is 192.168.1.0/24; the DR priority is 2.
– On Switch D, the router ID is 4.4.4.4; the OSPF process ID is 1; the network segment of Area 0 is 192.168.1.0/24; the DR priority is 1.
Procedure
Step 1 Configure the VLAN that each interface belongs to.
<Quidway> system-view
[Quidway] sysname SwitchA
[SwitchA] vlan 10
[SwitchA-vlan10] quit
[SwitchA] interface GigabitEthernet 1/0/1
[SwitchA-GigabitEthernet1/0/1] port hybrid pvid vlan 10
[SwitchA-GigabitEthernet1/0/1] port hybrid untagged vlan 10
[SwitchA-GigabitEthernet1/0/1] quit
The configurations of Switch B, Switch C, and Switch D are similar to the configuration of
Switch A, and are not mentioned here.
Step 2 Assign an IP address to each VLANIF interface.
[SwitchA] interface vlanif 10
[SwitchA-Vlanif10] ip address 192.168.1.1 24
The configurations of Switch B, Switch C, and Switch D are similar to the configuration of
Switch A, and are not mentioned here.
Step 3 Configure the basic OSPF functions.
# Configure Switch A.
[SwitchA] router id 1.1.1.1
[SwitchA] ospf
[SwitchA-ospf-1] area 0
[SwitchA-ospf-1-area-0.0.0.0] network 192.168.1.0 0.0.0.255
[SwitchA-ospf-1-area-0.0.0.0] quit
[SwitchA-ospf-1] quit
Issue 01 (2011-10-26) 190
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
5 OSPF Configuration
# Configure SwitchB.
[SwitchB] router id 2.2.2.2
[SwitchB] ospf
[SwitchB-ospf-1] area 0
[SwitchB-ospf-1-area-0.0.0.0] network 192.168.1.0 0.0.0.255
[SwitchB-ospf-1-area-0.0.0.0] quit
[SwitchB-ospf-1] quit
# Configure Switch C.
[SwitchC] router id 3.3.3.3
[SwitchC] ospf
[SwitchC-ospf-1] area 0
[SwitchC-ospf-1-area-0.0.0.0] network 192.168.1.0 0.0.0.255
[SwitchC-ospf-1-area-0.0.0.0] quit
[SwitchC-ospf-1] quit
# Configure Switch D.
[SwitchD] router id 4.4.4.4
[SwitchD] ospf
[SwitchD-ospf-1] area 0
[SwitchD-ospf-1-area-0.0.0.0] network 192.168.1.0 0.0.0.255
[SwitchD-ospf-1-area-0.0.0.0] quit
[SwitchD-ospf-1] quit
# Check information about neighbors of Switch A to find the DR and BDR.
[SwitchA] display ospf peer
OSPF Process 1 with Router ID 1.1.1.1
Neighbors
Area 0.0.0.0 interface 192.168.1.1(Vlanif10)'s neighbors
Router ID: 2.2.2.2 Address: 192.168.1.2 GR State: Normal
State: 2-Way Mode:Nbr is Master Priority: 1
DR: 192.168.1.4 BDR: 192.168.1.3 MTU: 0
Dead timer due in 32 sec
Neighbor is up for 00:00:00
Authentication Sequence: [ 0 ]
Router ID: 3.3.3.3 Address: 192.168.1.3 GR State: Normal
State: Full Mode:Nbr is Master Priority: 1
DR: 192.168.1.4 BDR: 192.168.1.3 MTU: 0
Dead timer due in 37 sec
Neighbor is up for 00:04:06
Authentication Sequence: [ 0 ]
Router ID: 4.4.4.4 Address: 192.168.1.4 GR State: Normal
State: Full Mode:Nbr is Master Priority: 1
DR: 192.168.1.4 BDR: 192.168.1.3 MTU: 0
Dead timer due in 37 sec
Neighbor is up for 00:03:53
Authentication Sequence: [ 0 ]
Check the neighbors of Switch A. You can view the DR priority and the neighbor status. By default, the DR priority is 1. Now Switch D functions as the DR and Switch C functions as the
BDR.
NOTE
When two routers have the save priority, the router with a greater router ID is elected as the DR. If an
Ethernet interface of an S9300 becomes the DR, the other broadcast interfaces of the S9300 have a high priority in the future DR election. That is, the S9300 is still elected as the DR in later election and the DR cannot be preempted.
Step 4 Set the DR priority on each VLANIF interface.
Issue 01 (2011-10-26) 191
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
5 OSPF Configuration
# Configure Switch A.
[SwitchA] interface vlanif 10
[SwitchA-Vlanif10] ospf dr-priority 100
[SwitchA-Vlanif10] quit
Configure SwitchB.
[SwitchB] interface vlanif 10
[SwitchB-Vlanif10] ospf dr-priority 0
[SwitchB-Vlanif10] quit
# Configure Switch C.
[SwitchC] interface vlanif 10
[SwitchC-Vlanif10] ospf dr-priority 2
[SwitchC-Vlanif10] quit
# Check the status of the DR or BDR.
[SwitchD] display ospf peer
OSPF Process 1 with Router ID 4.4.4.4
Neighbors
Area 0.0.0.0 interface 192.168.1.4(Vlanif10)'s neighbors
Router ID: 1.1.1.1 Address: 192.168.1.1 GR State: Normal
State: Full Mode:Nbr is Slave Priority: 100
DR: 192.168.1.4 BDR: 192.168.1.3 MTU: 0
Dead timer due in 31 sec
Neighbor is up for 00:11:17
Authentication Sequence: [ 0 ]
Router ID: 2.2.2.2 Address: 192.168.1.2 GR State: Normal
State: Full Mode:Nbr is Slave Priority: 0
DR: 192.168.1.4 BDR: 192.168.1.3 MTU: 0
Dead timer due in 35 sec
Neighbor is up for 00:11:19
Authentication Sequence: [ 0 ]
Router ID: 3.3.3.3 Address: 192.168.1.3 GR State: Normal
State: Full Mode:Nbr is Slave Priority: 2
DR: 192.168.1.4 BDR: 192.168.1.3 MTU: 0
Dead timer due in 33 sec
Neighbor is up for 00:11:15
Authentication Sequence: [ 0 ]
NOTE
The DR priorities configured on the interfaces do not take effect immediately.
Step 5 Restart the OSPF process.
In the user view of each S9300, run the reset ospf 1 process command to restart the OSPF process.
Step 6 Verify the configuration.
# Check the status of OSPF neighbors.
[SwitchD] display ospf peer
OSPF Process 1 with Router ID 4.4.4.4
Neighbors
Area 0.0.0.0 interface 192.168.1.4(Vlanif10)'s neighbors
Router ID: 1.1.1.1 Address: 192.168.1.1 GR State: Normal
State: Full Mode:Nbr is Slave Priority: 100
DR: 192.168.1.1 BDR: 192.168.1.3 MTU: 0
Dead timer due in 35 sec
Neighbor is up for 00:07:19
192
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
5 OSPF Configuration
Authentication Sequence: [ 0 ]
Router ID: 2.2.2.2 Address: 192.168.1.2 GR State: Normal
State: 2-Way Mode:Nbr is Master Priority: 0
DR: 192.168.1.1 BDR: 192.168.1.3 MTU: 0
Dead timer due in 35 sec
Neighbor is up for 00:00:00
Authentication Sequence: [ 0 ]
Router ID: 3.3.3.3 Address: 192.168.1.3 GR State: Normal
State: Full Mode:Nbr is Slave Priority: 2
DR: 192.168.1.1 BDR: 192.168.1.3 MTU: 0
Dead timer due in 37 sec
Neighbor is up for 00:07:17
Authentication Sequence: [ 0 ]
# Check the status of OSPF interfaces.
[SwitchA] display ospf interface
OSPF Process 1 with Router ID 1.1.1.1
Interfaces
Area: 0.0.0.0 (MPLS TE not enabled)
IP Address Type State Cost Pri DR BDR
192.168.1.1 Broadcast DR 1 100 192.168.1.1 192.168.1.3
[SwitchB] display ospf interface
OSPF Process 1 with Router ID 2.2.2.2
Interfaces
Area: 0.0.0.0 (MPLS TE not enabled)
IP Address Type State Cost Pri DR BDR
192.168.1.2 Broadcast DROther 1 0 192.168.1.1 192.168.1.3
If all neighbors are in Full state, it indicates that the local device establishes adjacencies with all its neighbors. If a neighbor stays in 2-Way state, it indicates the local S9300 and the neighbor are not the DR or BDR. Therefore, they do not need to exchange LSAs.
If the status of an OSPF interface is DROther, it indicates that the router is neither the DR nor the BDR.
----End
Configuration Files
l Configuration file of Switch A
#
sysname SwitchA
#
router id 1.1.1.1
#
vlan batch 10
# interface Vlanif10
ip address 192.168.1.1 255.255.255.0
ospf dr-priority 100
# interface GigabitEthernet1/0/1
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# ospf 1
area 0.0.0.0
network 192.168.1.0 0.0.0.255
Issue 01 (2011-10-26) 193
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
# return l Configuration file of Switch B
#
sysname SwitchB
#
router id 2.2.2.2
#
vlan batch 10
# interface Vlanif10
ip address 192.168.1.2 255.255.255.0
ospf dr-priority 0
# interface GigabitEthernet1/0/1
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# ospf 1
area 0.0.0.0
network 192.168.1.0 0.0.0.255
# return l Configuration file of Switch C
#
sysname SwitchC
#
router id 3.3.3.3
#
vlan batch 10
# interface Vlanif10
ip address 192.168.1.3 255.255.255.0
ospf dr-priority 2
# interface GigabitEthernet1/0/1
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# ospf 1
area 0.0.0.0
network 192.168.1.0 0.0.0.255
# return l Configuration file of Switch D
#
sysname SwitchD
#
router id 4.4.4.4
#
vlan batch 10
# interface Vlanif10
ip address 192.168.1.4 255.255.255.0
# interface GigabitEthernet1/0/1
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# ospf 1
area 0.0.0.0
network 192.168.1.0 0.0.0.255
# return
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
5 OSPF Configuration
194
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 5 OSPF Configuration
5.18.5 Example for Configuring an OSPF virtual link
Networking Requirements
, Area 2 is not directly connected to the backbone area. Area 1 functions
as a transit area to connect Area 2 to Area 0. A virtual link is set up between Switch A and Switch
B.
Figure 5-8 Networking for configuring an OSPF virtual link
SwitchA
GE1/0/2
SwitchC
GE1/0/1
Area 0
Area 1
GE1/0/1 GE1/0/1
Virtual
Link
SwitchB
GE1/0/2
SwitchD
GE1/0/1
Area 2
Switch
Switch A
Switch A
Switch B
Switch B
Switch C
Switch D
Interface
GigabitEthernet1/0/1
GigabitEthernet1/0/2
GigabitEthernet1/0/1
GigabitEthernet1/0/2
GigabitEthernet1/0/1
GigabitEthernet1/0/1
VLANIF interface IP address
VLANIF 10 192.168.1.1/24
VLANIF 20
VLANIF 10
VLANIF 30
10.1.1.1/8
192.168.1.2/24
172.16.1.1/16
VLANIF 20
VLANIF 30
10.1.1.2/8
172.16.1.2/16
Configuration Roadmap
The configuration roadmap is as follows:
1.
Enable OSPF on each Switch and configure the basic OSPF functions.
2.
Configure a virtual link between Switch A and Switch B to connect the non-backbone areas and the backbone area.
Data Preparation
To complete the configuration, you need the following data: l ID of the VLAN that each interface belongs to, as shown in
l
IP address of each VLANIF interface, as shown in
l Router ID and OSPF process ID of each Switch and area that each interface belongs to:
–
On Switch A, the router ID is 1.1.1.1; OSPF process ID is 1; the network segment of
Area 1 is 192.168.1.0/24; the network segment of Area 0 is 10.0.0.0/8.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
195
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 5 OSPF Configuration
– On Switch B, the router ID is 2.2.2.2; OSPF process ID is 1; the network segment of
Area 1 is 192.168.1.0/24; the network segment of Area 2 is 172.16.0.0/16.
– On Switch C, the router ID is 3.3.3.3; OSPF process ID is 1; the network segment of
Area 0 is 10.0.0.0/8.
– On Switch D, the router ID4.4.4.4; OSPF process ID is 1; the network segment of Area
2 is 172.16.0.0/16.
Procedure
Step 1 Configure VLANs that the related interfaces belong to.
<Quidway> system-view
[Quidway] sysname SwitchA
[SwitchA] vlan batch 10 20
[SwitchA] interface GigabitEthernet 1/0/1
[SwitchA-GigabitEthernet1/0/1]port hybrid pvid vlan 10
[SwitchA-GigabitEthernet1/0/1]port hybrid untagged vlan 10
[SwitchA-GigabitEthernet1/0/1] quit
[SwitchA] interface GigabitEthernet 1/0/2
[SwitchA-GigabitEthernet1/0/2] port hybrid pvid vlan 20
[SwitchA-GigabitEthernet1/0/2] port hybrid untagged vlan 20
[SwitchA-GigabitEthernet1/0/2] quit
The configurations of SwitchB, SwitchC, and SwitchD are similar to the configuration of
SwitchA, and are not mentioned here.
Step 2 Assign an IP address to each VLANIF interface.
[SwitchA] interface vlanif 10
[SwitchA-Vlanif10] ip address 192.168.1.1 24
[SwitchA-Vlanif10] quit
[SwitchA] interface vlanif 20
[SwitchA-Vlanif20] ip address 10.1.1.1 8
[SwitchA-Vlanif20] quit
The configurations of SwitchB, SwitchC, and SwitchD are similar to the configuration of
SwitchA, and are not mentioned here.
Step 3 Configure the basic OSPF functions.
# Configure Switch A.
[SwitchA] ospf 1 router-id 1.1.1.1
[SwitchA-ospf-1] area 0
[SwitchA-ospf-1-area-0.0.0.0] network 10.0.0.0 0.255.255.255
[SwitchA-ospf-1-area-0.0.0.0] quit
[SwitchA-ospf-1] area 1
[SwitchA-ospf-1-area-0.0.0.1] network 192.168.1.0 0.0.0.255
[SwitchA-ospf-1-area-0.0.0.1] quit
[SwitchA-ospf-1] quit
Configure SwitchB.
[SwitchB] ospf 1 router-id 2.2.2.2
[SwitchB-ospf-1] area 1
[SwitchB-ospf-1-area-0.0.0.1] network 192.168.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 172.16.0.0 0.0.255.255
[SwitchB-ospf-1-area-0.0.0.2] quit
[SwitchB-ospf-1] quit
# Configure Switch C.
[SwitchC] ospf 1 router-id 3.3.3.3
[SwitchC-ospf-1] area 0
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
196
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 5 OSPF Configuration
[SwitchC-ospf-1-area-0.0.0.0] network 10.0.0.0 0.255.255.255
[SwitchC-ospf-1-area-0.0.0.0] quit
[SwitchC-ospf-1] quit
# Configure SwitchD.
[SwitchD] ospf 1 router-id 4.4.4.4
[SwitchD-ospf-1] area 2
[SwitchD-ospf-1-area-0.0.0.2] network 172.16.0.0 0.0.255.255
[SwitchD-ospf-1-area-0.0.0.2] quit
[SwitchD-ospf-1] quit
# View the OSPF routing table of SwitchC.
[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
10.0.0.0/8 1 Transit 10.1.1.1 3.3.3.3 0.0.0.0
192.168.1.0/24 1 Transit 192.168.1.1 2.2.2.2 0.0.0.1
Total Nets: 2
Intra Area: 2 Inter Area: 0 ASE: 0 NSSA: 0
Area 2 is not directly connected to Area 0. Therefore, the routing table of SwitchA does not contain any route to Area 2.
Step 4 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 SwitchB.
[SwitchB] ospf 1
[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
[SwitchB-ospf-1] quit
Step 5 Verify the configuration.
# View the OSPF routing table of SwitchC.
[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
172.16.0.0/16 2 Inter-area 192.168.1.2 2.2.2.2 0.0.0.0
10.0.0.0/8 1 Transit 10.1.1.1 1.1.1.1 0.0.0.0
192.168.1.0/24 1 Transit 192.168.1.1 2.2.2.2 0.0.0.1
Total Nets: 3
Intra Area: 2 Inter Area: 1 ASE: 0 NSSA: 0
----End
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
197
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Configuration Files
l
Configuration file of SwitchA
#
sysname SwitchA
#
vlan batch 10 20
# interface Vlanif10
ip address 192.168.1.1 255.255.255.0
# interface Vlanif20
ip address 10.1.1.1 255.0.0.0
# interface GigabitEthernet1/0/1
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# interface GigabitEthernet1/0/2
port hybrid pvid vlan 20
port hybrid untagged vlan 20
# ospf 1 router-id 1.1.1.1
area 0.0.0.0
network 10.0.0.0 0.255.255.255
area 0.0.0.1
network 192.168.1.0 0.0.0.255
vlink-peer 2.2.2.2
# return l Configuration file of SwitchB
#
sysname SwitchB
#
vlan batch 10 30
# interface Vlanif10
ip address 192.168.1.2 255.255.255.0
# interface Vlanif30
ip address 172.16.1.1 255.255.0.0
# interface GigabitEthernet1/0/1
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# interface GigabitEthernet1/0/2
port hybrid pvid vlan 30
port hybrid untagged vlan 30
# ospf 1 router-id 2.2.2.2
area 0.0.0.1
network 192.168.1.0 0.0.0.255
vlink-peer 1.1.1.1
area 0.0.0.2
network 172.16.0.0 0.0.255.255
# return l Configuration file of Switch C
#
sysname SwitchC
#
vlan 20
# interface Vlanif20
ip address 10.1.1.2 255.0.0.0
#
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
5 OSPF Configuration
198
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 5 OSPF Configuration interface GigabitEthernet1/0/1
port hybrid pvid vlan 20
port hybrid untagged vlan 20
# ospf 1 router-id 3.3.3.3
area 0.0.0.0
network 10.0.0.0 0.255.255.255
# return l Configuration file of Switch D
#
sysname SwitchD
#
vlan 30
# interface Vlanif30
ip address 172.16.1.2 255.255.0.0
# interface GigabitEthernet1/0/1
port hybrid pvid vlan 30
port hybrid untagged vlan 30
# ospf 1 router-id 4.4.4.4
area 0.0.0.2
network 172.16.0.0 0.0.255.255
# return
5.18.6 Example for Configuring Load Balancing Among OSPF
Routes
Networking Requirements
, the networking requirements are as follows:
l Switch A, Switch B, Switch C, and Switch D connect to each other through OSPF.
l Switch A, Switch B, Switch C, and Switch D belong to Area 0.
l
Load balancing needs is configured so that the traffic of Switch A can be sent to Switch D through Switch B and Switch C.
Figure 5-9 Networking diagram for configuring load balancing among OSPF routes
GE1/0/3
SwitchA
GE1/0/1 GE1/0/2
SwitchB
GE1/0/1
GE1/0/2
GE1/0/1
Area0
GE1/0/2
GE1/0/3
SwitchD
Switch
Switch A
GE1/0/1
SwitchC
GE1/0/2
Interface
GigabitEthernet1/0/1
VLANIF interface
VLANIF 10
IP address
10.1.1.1/24
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
199
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Switch A
Switch A
Switch B
Switch B
Switch C
Switch C
Switch D
Switch D
Switch D
GigabitEthernet1/0/2
GigabitEthernet1/0/3
GigabitEthernet1/0/1
GigabitEthernet1/0/2
GigabitEthernet1/0/1
GigabitEthernet1/0/2
GigabitEthernet1/0/1
GigabitEthernet1/0/2
GigabitEthernet1/0/3
VLANIF 20
VLANIF 50
VLANIF 10
VLANIF 30
VLANIF 20
VLANIF 40
VLANIF 30
VLANIF 40
VLANIF 60
5 OSPF Configuration
10.1.2.1/24
172.16.1.1/24
10.1.1.2/24
192.168.0.1/24
10.1.2.2./24
192.168.1.1/24
192.168.0.2/24
192.168.1.2/24
172.17.1.1/24
Configuration Roadmap
The configuration roadmap is as follows:
1.
Configure the basic OSPF functions on each Switch to implement interconnection.
2.
Disable load balancing on Switch A and check the routing table of Switch A.
3.
(Optional) Set the weight of equal-cost routes on Switch A.
Data Preparation
To complete the configuration, you need the following data: l ID of the VLAN that each interface belongs to, as shown in
l
IP address of each VLANIF interface, as shown in
l Router ID and OSPF process ID of each Switch and area that each interface belongs to:
– On Switch A, the router ID is 1.1.1.1; the OSPF process ID is 1; the network segments of Area 1 are 10.1.1.0/24, 10.1.2.0/24, and 172.16.1.0/24.
– On Switch B, the router ID is 2.2.2.2; the OSPF process ID is 1; the network segments of Area 0 are 10.1.1.0/24 and 192.168.0.0/24.
– The router ID of SwitchC is 3.3.3.3; the OSPF process ID is 1; the network segments of Area 0 are 10.1.2.0/24 and 192.168.1.0/24.
–
On Switch D, the router ID is 4.4.4.4; the OSPF process ID is 1; the network segments of Area 0 are 172.17.1.0/24, 192.168.0.0/24, and 192.168.1.0/24.
l Number of routes for load balancing on Switch A: 1 l Weight of the equal-cost route whose next hop is Switch C: 1
Procedure
Step 1 Configure VLANs that the related interfaces belong to.
<Quidway> system-view
[Quidway] sysname SwitchA
[SwitchA] vlan batch 10 20 50
[SwitchA] interface GigabitEthernet 1/0/1
[SwitchA-GigabitEthernet1/0/1] port hybrid pvid vlan 10
[SwitchA-GigabitEthernet1/0/1] port hybrid untagged vlan 10
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
200
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
5 OSPF Configuration
[SwitchA-GigabitEthernet1/0/1] quit
[SwitchA] interface GigabitEthernet 1/0/2
[SwitchA-GigabitEthernet1/0/2] port hybrid pvid vlan 20
[SwitchA-GigabitEthernet1/0/2] port hybrid untagged vlan 20
[SwitchA-GigabitEthernet1/0/2] quit
[SwitchA] interface GigabitEthernet 1/0/3
[SwitchA-GigabitEthernet1/0/3] port hybrid pvid vlan 50
[SwitchA-GigabitEthernet1/0/3] port hybrid untagged vlan 50
[SwitchA-GigabitEthernet1/0/3] quit
The configurations of Switch B, Switch C, and Switch D are similar to the configuration of
Switch A, and are not mentioned here.
Step 2 Assign an IP address to each VLANIF interface.
[SwitchA] interface vlanif 10
[SwitchA-Vlanif10] ip address 10.1.1.1 24
[SwitchA-Vlanif10] quit
[SwitchA] interface vlanif 20
[SwitchA-Vlanif20] ip address 10.1.2.1 24
[SwitchA-Vlanif20] quit
[SwitchA] interface vlanif 50
[SwitchA-Vlanif50] ip address 172.16.1.1 24
[SwitchA-Vlanif50] quit
The configurations of Switch B, Switch C, and Switch D are similar to the configuration of
Switch A, and are not mentioned here.
Step 3 Configure the basic OSPF functions. See
5.18.1 Example for Configuring Basic OSPF
.
Step 4 Disable load balancing on Switch A.
[SwitchA] ospf
[SwitchA-ospf-1] maximum load-balancing 1
[SwitchA-ospf-1] quit
# View the routing table of Switch A.
[SwitchA] display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 11 Routes : 11
Destination/Mask Proto Pre Cost Flags NextHop Interface
10.1.1.0/24 Direct 0 0 D 10.1.1.1 Vlanif10
10.1.1.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
10.1.2.0/24 Direct 0 0 D 10.1.2.1 Vlanif20
10.1.2.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
172.16.1.0/24 Direct 0 0 D 172.16.1.1 Vlanif50
172.16.1.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
172.17.1.0/24 OSPF 10 3 D 10.1.1.2 Vlanif10
192.168.0.0/24 OSPF 10 2 D 10.1.1.2 Vlanif10
192.168.1.0/24 OSPF 10 2 D 10.1.2.2 Vlanif20
As shown in the routing table, when the maximum number of equal-cost routes for load balancing is set to 1, OSPF selects 10.1.1.2 as the next hop to the destination network 172.17.1.0.
NOTE
In the preceding example, 10.1.1.2 is selected as the optimal next hop. This is because OSPF selects the next hop randomly among equal-cost routes.
Step 5 Restore the default number of equal-cost routes for load balancing on Switch A.
Issue 01 (2011-10-26) 201
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 5 OSPF Configuration
[SwitchA] ospf
[SwitchA-ospf-1] undo maximum load-balancing
[SwitchA-ospf-1] quit
# View the routing table of SwitchA.
[SwitchA] display ip routing-table
Route Flags: R - relay, D - download to fib
----------------------------------------------------------------------------
Routing Tables: Public
Destinations : 11 Routes : 12
Destination/Mask Proto Pre Cost Flags NextHop Interface
10.1.1.0/24 Direct 0 0 D 10.1.1.1 Vlanif10
10.1.1.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
10.1.2.0/24 Direct 0 0 D 10.1.2.1 Vlanif20
10.1.2.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
172.16.1.0/24 Direct 0 0 D 172.16.1.1 Vlanif50
172.16.1.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
172.17.1.0/24 OSPF 10 3 D 10.1.1.2 Vlanif10
OSPF 10 3 D 10.1.2.2 Vlanif20
192.168.0.0/24 OSPF 10 2 D 10.1.1.2 Vlanif10
192.168.1.0/24 OSPF 10 2 D 10.1.2.2 Vlanif20
As shown in the routing table, when the default setting of load balancing is restored, the next hops of Switch A, that is, 10.1.1.2 (Switch B) and 10.1.2.2 (Switch C), become valid routes.
This is because the default number of equal-cost routes is 6.
Step 6 (Optional) Set the weight of equal-cost routes on Switch A.
If you do not want to implement load balancing between Switch B and Switch C, set the weight of equal-cost routes to specify the next hop.
[SwitchA] ospf
[SwitchA-ospf-1] nexthop 10.1.2.2 weight 1
[SwitchA-ospf-1] quit
# View the routing table of Switch A.
[SwitchA] display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 11 Routes : 11
Destination/Mask Proto Pre Cost Flags NextHop Interface
10.1.1.0/24 Direct 0 0 D 10.1.1.1 Vlanif10
10.1.1.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
10.1.2.0/24 Direct 0 0 D 10.1.2.1 Vlanif20
10.1.2.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
172.16.1.0/24 Direct 0 0 D 172.16.1.1 Vlanif50
172.16.1.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
172.17.1.0/24 OSPF 10 3 D 10.1.2.2 Vlanif20
192.168.0.0/24 OSPF 10 2 D 10.1.1.2 Vlanif10
192.168.1.0/24 OSPF 10 2 D 10.1.2.2 Vlanif20
As shown in the routing table, the priority of the next hop 10.1.2.2 (Switch C) with the weight as 1 is higher than that of 10.1.1.2 (Switch B), after the weight is set for equal-cost routes. Thus,
OSPF selects the route with the next hop 10.1.2.2 as the optimal route.
----End
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
202
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Configuration Files
l
Configuration file of Switch A
#
sysname SwitchA
#
vlan batch 10 20 50
# interface Vlanif10
ip address 10.1.1.1 255.255.255.0
# interface Vlanif20
ip address 10.1.2.1 255.255.255.0
# interface Vlanif50
ip address 172.16.1.1 255.255.255.0
# interface GigabitEthernet1/0/1
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# interface GigabitEthernet1/0/2
port hybrid pvid vlan 20
port hybrid untagged vlan 20
# interface GigabitEthernet1/0/3
port hybrid pvid vlan 50
port hybrid untagged vlan 50
# ospf 1 router-id 1.1.1.1
nexthop 10.1.2.2 weight 1
area 0.0.0.0
network 10.1.1.0 0.0.0.255
network 10.1.2.0 0.0.0.255
network 172.16.1.0 0.0.0.255
# return l Configuration file of Switch B sysname SwitchB
#
vlan batch 10 30
# interface Vlanif10
ip address 10.1.1.2 255.255.255.0
# interface Vlanif30
ip address 192.168.0.1 255.255.255.0
# interface GigabitEthernet1/0/1
port link-type access
port default vlan 10
# interface GigabitEthernet1/0/2
port link-type access
port default vlan 30
# ospf 1 router-id 2.2.2.2
area 0.0.0.0
network 10.1.1.0 0.0.0.255
network 192.168.0.0 0.0.0.255
# return l Configuration file of Switch C
#
sysname SwitchC
#
vlan batch 20 40
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
5 OSPF Configuration
203
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
# interface Vlanif20
ip address 10.1.2.2 255.255.255.0
# interface Vlanif40
ip address 192.168.1.1 255.255.255.0
# interface GigabitEthernet1/0/1
port hybrid pvid vlan 20
port hybrid untagged vlan 20
# interface GigabitEthernet1/0/2
port hybrid pvid vlan 40
port hybrid untagged vlan 40
# ospf 1 router-id 3.3.3.3
area 0.0.0.0
network 10.1.2.0 0.0.0.255
network 192.168.1.0 0.0.0.255
# return l
Configuration file of Switch D
#
sysname SwitchD
#
vlan batch 30 40 60
# interface Vlanif30
ip address 192.168.0.2 255.255.255.0
# interface Vlanif40
ip address 192.168.1.2 255.255.255.0
# interface Vlanif60
ip address 172.17.1.1 255.255.255.0
# interface GigabitEthernet1/0/1
port hybrid pvid vlan 30
port hybrid untagged vlan 30
# interface GigabitEthernet1/0/2
port hybrid pvid vlan 40
port hybrid untagged vlan 40
# interface GigabitEthernet1/0/3
port hybrid pvid vlan 60
port hybrid untagged vlan 60
# ospf 1 router-id 4.4.4.4
area 0.0.0.0
network 192.168.0.0 0.0.0.255
network 192.168.1.0 0.0.0.255
network 172.17.1.0 0.0.0.255
# return
5.18.7 Example for Configuring Local MT
Networking Requirements
shows: l Switch A, Switch B, Switch C, Switch D, and Switch E run OSPF.
l A TE tunnel is established from Switch B to Switch D.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
5 OSPF Configuration
204
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing l IGP Shortcut is enabled on Switch B.
Figure 5-10 Networking diagram for configuring OSPF local MT
5 OSPF Configuration
Switch
SwitchA
SwitchA
SwitchB
SwitchB
SwitchC
SwitchC
SwitchD
SwitchD
SwitchE
SwitchE
172.16.1.2/24
GE1/0/0
172.16.1.1/24
GE2/0/0
10.0.0.1/24
GE1/0/0
10.0.0.2/24
Switch B
Router-id
2.2.2.2
Tunnel1/0/0
Client Server
192.168.3.2/24
GE2/0/0
192.168.3.1/24
Switch A
Router-id
1.1.1.1
GE1/0/0
10.0.1.1/24
GE2/0/0
10.0.1.2/24
Interface
GigabitEthernet1/0/0
GigabitEthernet2/0/0
GigabitEthernet1/0/0
GigabitEthernet2/0/0
GigabitEthernet1/0/0
GigabitEthernet2/0/0
GigabitEthernet2/0/0
GigabitEthernet1/0/0
GigabitEthernet1/0/0
GigabitEthernet2/0/0
GE2/0/0
10.0.2.2/24
Switch C
Router-id
3.3.3.3
Tunnel1/0/0
Switch E
Router-id
5.5.5.5
GE2/0/0
10.0.2.1/24
GE1/0/0
10.0.3.3/24
GE1/0/0
10.0.3.1/24
Switch D
Router-id
4.4.4.4
Join
Multicast packets
VLANIF interface
VLANIF 10
VLANIF 20
VLANIF 20
VLANIF 30
VLANIF 30
VLANIF 40
VLANIF 40
VLANIF 50
VLANIF 50
VLANIF 60
IP address
172.16.1.1/24
10.0.0.1/24
10.0.0.2/24
10.0.1.2/24
10.0.1.1/24
10.0.2.2/24
10.0.2.1/24
10.0.3.1/24
10.0.3.3/24
192.168.3.1/24
Configuration Roadmap
The configuration roadmap is as follows:
1.
Enable basic OSPF functions on each switch.
2.
Configure Protocol Independent Multicast Sparse Mode (PIM-SM).
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
205
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 5 OSPF Configuration
3.
Configure an MPLS Resource Reservation Protocol (RSVP) TE tunnel and enable OSPF
IGP Shortcut.
4.
Enable local MT.
Data Preparation
To complete the configuration, you need the following data: l IP address of each switch interface, as shown in
.
l The tunnel interface is TE tunnel 1/0/0; the tunnel interface borrows the IP address of
Loopback 0; the tunnel encapsulation protocol is MPLS TE; the destination address is
4.4.4.4; the tunnel ID is 100; the tunnel signaling protocol is RSVP-TE.
Table 5-1 IP address of Loopback 0
switch
SwitchA
SwitchB
SwitchC
SwitchD
SwitchE
IP address of Loopback 0
1.1.1.1/32
2.2.2.2/32
3.3.3.3/32
4.4.4.4/32
5.5.5.5/32
Procedure
Step 1 Configure VLANs that interfaces belong to.
<Quidway> system-view
[Quidway] sysname SwitchA
[SwitchA] vlan batch 10 20
[SwitchA] interface gigabitethernet 1/0/0
[SwitchA-GigabitEthernet1/0/0] port hybrid pvid vlan 10
[SwitchA-GigabitEthernet1/0/0] port hybrid untagged vlan 10
[SwitchA-GigabitEthernet1/0/0] quit
[SwitchA] interface gigabitethernet 2/0/0
[SwitchA-GigabitEthernet2/0/0] port hybrid pvid vlan 20
[SwitchA-GigabitEthernet2/0/0] port hybrid untagged vlan 20
[SwitchA-GigabitEthernet2/0/0] quit
The configurations of SwitchB, SwitchC,SwitchD and SwitchE are similar to the configuration of SwitchA, and are not mentioned here.
Step 2 Configure an IP address for each VLANIF interface and enable OSPF on each interface.
, configure an IP address and the mask for each interface and enable
OSPF. The configuration details are not mentioned here.
Step 3 Configure PIM-SM.
# Enable multicast on all switches and PIM-SM on all interfaces . The configurations on Switch
B, Switch C, Switch D, and Switch E are similar to those on Switch A and are not mentioned here.
[SwitchA] multicast routing-enable
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
206
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 5 OSPF Configuration
[SwitchA] interface vlanif 20
[SwitchA-Vlanif20] pim sm
[SwitchA-Vlanif20] quit
[SwitchA] interface vlanif 10
[SwitchA-Vlanif10] pim sm
[SwitchA-Vlanif10] quit
# Enable the Internet Group Management Protocol (IGMP) on the interface connecting Switch
A and hosts.
[SwitchA] interface vlanif 10
[SwitchA-Vlanif10] igmp enable
[SwitchA-Vlanif10] igmp version 3
[SwitchA-Vlanif10] quit
# Configure the C-BSR and C-RP. Set the service range of the RP on Switch D and specify the locations of the C-BSR and C-RP.
[SwitchD] pim
[SwitchD-pim] c-bsr vlanif 10
[SwitchD-pim] c-rp vlanif 10
[SwitchD-pim] quit
# Run the display multicast routing-table command to view the multicast routing table of a switch. Take the display of Switch C as an example:
[SwitchC] display multicast routing-table
Multicast routing table of VPN-Instance: public net
Total 3 entries
00001. (192.168.3.8, 224.31.31.31)
Uptime: 15:03:04
Upstream Interface: Vlanif20
List of 1 downstream interface
1: Vlanif10
00002. (192.168.3.9, 224.31.31.31)
Uptime: 15:03:04
Upstream Interface: Vlanif20
List of 1 downstream interface
1: Vlanif10
00003. (192.168.3.10, 224.31.31.31)
Uptime: 15:03:04
Upstream Interface: Vlanif20
List of 1 downstream interface
1: Vlanif10
Step 4 Configure an MPLS RSVP-TE tunnel.
# Configure Switch B.
[SwitchB] mpls lsr-id 2.2.2.2
[SwitchB] mpls
[SwitchB-mpls] mpls te
[SwitchB-mpls] mpls rsvp-te
[SwitchB-mpls] mpls te cspf
[SwitchB-mpls] quit
[SwitchB] interface vlanif 30
[SwitchB-Vlanif30] mpls
[SwitchB-Vlanif30] mpls te
[SwitchB-Vlanif30] mpls rsvp-te
[SwitchB-Vlanif30] quit
[SwitchB] ospf 1
[SwitchB-ospf-1] enable traffic-adjustment
[SwitchB-ospf-1] opaque-capability enable
[SwitchB-ospf-1] area 0.0.0.0
[SwitchB-ospf-1-area-0.0.0.0] mpls-te enable
[SwitchB-ospf-1-area-0.0.0.0] quit
# Configure Switch C.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
207
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
5 OSPF Configuration
[SwitchC] mpls lsr-id 3.3.3.3
[SwitchC] mpls
[SwitchC-mpls] mpls te
[SwitchC-mpls] mpls rsvp-te
[SwitchC-mpls] quit
[SwitchC] interface vlanif 30
[SwitchC-Vlanif30] mpls
[SwitchC-Vlanif30] mpls te
[SwitchC-Vlanif30] mpls rsvp-te
[SwitchC-Vlanif30] quit
[SwitchC] interface vlanif 40
[SwitchC-Vlanif40] mpls
[SwitchC-Vlanif40] mpls te
[SwitchC-Vlanif40] mpls rsvp-te
[SwitchC-Vlanif40] quit
[SwitchC] ospf 1
[SwitchC-ospf-1] opaque-capability enable
[SwitchC-ospf-1] area 0.0.0.0
[SwitchC-ospf-1-area-0.0.0.0] mpls-te enable
[SwitchC-ospf-1-area-0.0.0.0] quit
# Configure Switch D.
[SwitchD] mpls lsr-id 4.4.4.4
[SwitchD] mpls
[SwitchD-mpls] mpls te
[SwitchD-mpls] mpls rsvp-te
[SwitchD-mpls] quit
[SwitchD] interface vlanif 50
[SwitchD-Vlanif50] mpls
[SwitchD-Vlanif50] mpls te
[SwitchD-Vlanif50] mpls rsvp-te
[SwitchD-Vlanif50] quit
[SwitchD] ospf 1
[SwitchD-ospf-1] opaque-capability enable
[SwitchD-ospf-1] area 0.0.0.0
[SwitchD-ospf-1-area-0.0.0.0] mpls-te enable
[SwitchD-ospf-1-area-0.0.0.0] quit
# Configure an MPLS TE tunnel and enable IGP Shortcut.
Configure an MPLS TE tunnel on Switch B and enable IGP Shortcut.
[SwitchB] interface tunnel 1/0/0
[SwitchB-Tunnel1/0/0] ip address unnumbered interface loopback 0
[SwitchB-Tunnel1/0/0] tunnel-protocol mpls te
[SwitchB-Tunnel1/0/0] destination 4.4.4.4
[SwitchB-Tunnel1/0/0] mpls te tunnel-id 100
[SwitchB-Tunnel1/0/0] mpls te commit
[SwitchB-Tunnel1/0/0] mpls te igp shortcut ospf
[SwitchB-Tunnel1/0/0] mpls te igp metric relative -10
[SwitchB-Tunnel1/0/0] quit
# View the OSPF routing table on Switch B. You can find that the MPLS TE tunnel is established.
[SwitchB] display ip routing-table
Routing Tables: Public
Destinations : 14 Routes : 14
Destination/Mask Proto Pre Cost Flags NextHop Interface
2.2.2.2/32 Direct 0 0 D 127.0.0.1 InLoopBack0
3.3.3.3/32 OSPF 10 1 D 10.0.1.1 Vlanif30
4.4.4.4/32 OSPF 10 1 D 2.2.2.2 Tunnel1/0/0
5.5.5.5/32 OSPF 10 2 D 2.2.2.2 Tunnel1/0/0
10.0.0.0/24 Direct 0 0 D 10.0.0.2 Vlanif20
10.0.0.2/32 Direct 0 0 D 127.0.0.1 InLoopBack0
10.0.1.0/24 Direct 0 0 D 10.0.1.2 Vlanif30
10.0.1.2/32 Direct 0 0 D 127.0.0.1 InLoopBack0
10.0.2.0/24 OSPF 10 2 D 10.0.1.1 Vlanif30
OSPF 10 2 D 10.0.1.1 Tunnel1/0/0
10.0.3.0/24 OSPF 10 2 D 2.2.2.2 Tunnel1/0/0
208
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
5 OSPF Configuration
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
172.16.1.0/24 OSPF 10 2 D 10.0.0.1 Vlanif30
192.168.3.0/24 OSPF 10 3 D 2.2.2.2 Tunnel1/0/0
# View the multicast routing table on Switch C spanned by the TE tunnel.
[SwitchC] display multicast routing-table
No multicast routing entry is displayed. This indicates that multicast packets are discarded.
Step 5 Configure local MT on Switch B.
[SwitchB] ospf
[SwitchB-ospf-1] local-mt enable
[SwitchB-ospf-1] quit
Step 6 Verify the configuration.
# View the multicast routing table on Switch C again. You can find that multicast routes are displayed.
[SwitchC] display multicast routing-table
Multicast routing table of VPN-Instance: public net
Total 3 entries
00001. (192.168.3.8, 224.31.31.31)
Uptime: 00:00:19
Upstream Interface: Vlanif40
List of 1 downstream interface
1: Vlanif30
00002. (192.168.3.9, 224.31.31.31)
Uptime: 00:00:19
Upstream Interface: Vlanif40
List of 1 downstream interface
1: Vlanif30
00003. (192.168.3.10, 224.31.31.31)
Uptime: 00:00:19
Upstream Interface: Vlanif40
List of 1 downstream interface
1: Vlanif30
# View the MIGP routing table on Switch B.
[SwitchB] display migp routing-table
Route Flags: R - relied, D - download to fib
------------------------------------------------------------------------------
Routing Tables: MIGP
Destinations : 4 Routes : 4
Destination/Mask Proto Pre Cost Flags NextHop Interface
4.4.4.4/32 OSPF 10 2 10.0.1.1 Vlanif30
5.5.5.5/32 OSPF 10 3 10.0.1.1 Vlanif30
10.0.3.0/24 OSPF 10 2 10.0.1.1 Vlanif30
192.168.3.0/24 OSPF 10 3 10.0.1.1 Vlanif30
The physical outgoing interface of the next hop of the route with the previous outgoing interface as a TE tunnel interface is calculated in the MIGP routing table.
----End
Configuration Files
l Configuration file of Switch A
#
sysname SwitchA
#
router id 1.1.1.1
# vlan batch 10 20
Issue 01 (2011-10-26) 209
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Issue 01 (2011-10-26)
# multicast routing-enable
# interface Vlanif10
ip address 172.16.1.1 255.255.255.0
pim sm
igmp enable
# interface Vlanif20
ip address 10.0.0.1 255.255.255.0
pim sm
igmp version 3
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# interface GigabitEthernet2/0/0
port hybrid pvid vlan 20
port hybrid untagged vlan 20
# interface LoopBack0
ip address 1.1.1.1 255.255.255.255
# ospf 1
area 0.0.0.0
network 172.16.1.0 0.0.0.255
network 10.0.0.0 0.0.0.255
# return l Configuration file of Switch B
#
sysname SwitchB
#
router id 2.2.2.2
# vlan batch 20 30
# multicast routing-enable
# interface Vlanif20
ip address 10.0.0.2 255.255.255.0
pim sm
mpls
mpls te mpls rsvp-te
# interface Vlanif30
ip address 10.0.1.2 255.255.255.0
pim sm
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 20
port hybrid untagged vlan 20
# interface GigabitEthernet2/0/0
port hybrid pvid vlan 30
port hybrid untagged vlan 30
#
mpls lsr-id 2.2.2.2
mpls
mpls te
mpls rsvp-te
mpls te cspf
# interface LoopBack0
ip address 2.2.2.2 255.255.255.255
pim sm
#
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
5 OSPF Configuration
210
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Issue 01 (2011-10-26) interface Tunnel1/0/0
ip address unnumbered interface LoopBack0
tunnel-protocol mpls te
destination 4.4.4.4
mpls te tunnel-id 100
mpls te igp shortcut ospf
mpls te igp metric relative -10
mpls te commit
# ospf 1
opaque-capability enable
enable traffic-adjustment
local-mt enable
area 0.0.0.0
network 10.0.0.0 0.0.0.255
network 10.0.1.0 0.0.0.255
network 2.2.2.2 0.0.0.0
mpls-te enable
# pim
C-BSR LoopBack0
C-RP LoopBack0
# return l Configuration file of Switch C
#
sysname SwitchC
# vlan batch 30 40
# multicast routing-enable
# interface Vlanif30
ip address 10.0.1.1 255.255.255.0
pim sm
mpls
mpls te mpls rsvp-te
# interface Vlanif40
ip address 10.0.2.2 255.255.255.0
pim sm
mpls
mpls te
mpls rsvp-te
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 30
port hybrid untagged vlan 30
# interface GigabitEthernet2/0/0
port hybrid pvid vlan 40
port hybrid untagged vlan 40
#
mpls lsr-id 3.3.3.3
mpls
mpls te
mpls rsvp-te
# ospf 1
opaque-capability enable
area 0.0.0.0
network 10.0.1.0 0.0.0.255
network 10.0.2.0 0.0.0.255
network 3.3.3.3 0.0.0.0
mpls-te enable
# interface LoopBack0
ip address 3.3.3.3 255.255.255.255
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
5 OSPF Configuration
211
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Issue 01 (2011-10-26)
# return l Configuration file of Switch D
#
sysname SwitchD
#
router id 4.4.4.4
# vlan batch 40 50
# multicast routing-enable
# interface Vlanif40
ip address 10.0.2.1 255.255.255.0
pim sm
# interface Vlanif50
ip address 10.0.3.1 255.255.255.0
pim sm
mpls
mpls te
mpls rsvp-te
# interface GigabitEthernet2/0/0
port hybrid pvid vlan 40
port hybrid untagged vlan 40
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 50
port hybrid untagged vlan 50
#
mpls lsr-id 4.4.4.4
mpls
mpls te
mpls rsvp-te
# interface LoopBack0
ip address 4.4.4.4 255.255.255.255
pim sm
# ospf 1
opaque-capability enable
area 0.0.0.0
network 10.0.2.0 0.0.0.255
network 10.0.3.0 0.0.0.255
network 4.4.4.4 0.0.0.0
mpls-te enable
# pim
C-BSR Vlanif50
C-RP Vlanif50
# return l Configuration file of Switch E
#
sysname SwitchE
#
router id 5.5.5.5
# vlan batch 50 60
# multicast routing-enable
# interface Vlanif50
ip address 10.0.3.3 255.255.255.0
pim sm
# interface Vlanif60
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
5 OSPF Configuration
212
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 5 OSPF Configuration
ip address 192.168.3.1 255.255.255.0
pim sm
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 50
port hybrid untagged vlan 50
# interface GigabitEthernet2/0/0
port hybrid pvid vlan 60
port hybrid untagged vlan 60
# interface LoopBack0
ip address 5.5.5.5 255.255.255.255
pim sm
# ospf 1
area 0.0.0.0
network 10.0.3.0 0.0.0.255
network 192.168.3.0 0.0.0.255
network 5.5.5.5 0.0.0.0
# return
5.18.8 Example for Configuring OSPF GR
Networking Requirements
, Switch A and Switch B have two main control boards, which work
in active/standby mode. Switch A and Switch B belong to Area 0 and are connected through
OSPF. They also provide the GR feature.
Figure 5-11 Networking diagram for configuring OSPF GR
SwitchA
GE1/0/1
GE1/0/1
Area 0
SwitchB
Switch
Switch A
Switch B
Interface
GigabitEthernet1/0/1
GigabitEthernet1/0/1
VLANIF interface IP address
VLANIF 10
VLANIF 10
1.1.1.1/24
1.1.1.2/24
Configuration Roadmap
The configuration roadmap is as follows:
1.
Configure the basic OSPF functions on each Switch to implement interconnection.
2.
Enable the Opaque LSA function.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
213
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
5 OSPF Configuration
3.
Configure GR on each Switch.
Data Preparation
To complete the configuration, you need the following data: l
ID of the VLAN that each interface belongs to, as shown in
l
IP address of each VLANIF interface, as shown in
l Router ID and OSPF process ID of each Switch and area that each interface belongs to:
– On Switch A, the router ID is 1.1.1.1; the OSPF process ID is 1; the network segment of Area 0 is 1.1.1.0/24.
–
On Switch B, the router ID is 2.2.2.2; OSPF process ID is 1; the network segment of
Area 0 is 1.1.1.0/24.
Procedure
Step 1 Configure the basic OSPF functions. See
5.18.1 Example for Configuring Basic OSPF
.
Step 2 Configure the Opaque LSA function.
[SwitchA] ospf
[SwitchA-ospf-1] opaque-capability enable
# Configure SwitchB.
[SwitchB] ospf
[SwitchB-ospf-1] opaque-capability enable
Step 3 Configure the OSPF GR feature.
# Configure Switch A.
[SwitchA] ospf
[SwitchA-ospf-1] graceful-restart
# Configure SwitchB.
[SwitchB] ospf
[SwitchB-ospf-1] graceful-restart
Step 4 Verify the configuration.
# View the GR status of Switch A.
[SwitchA] display ospf graceful-restart
OSPF Process 1 with Router ID 1.1.1.1
Graceful-restart capability : enabled
Graceful-restart support : planned and un-planned, totally
Helper-policy support : planned and un-planned, strict lsa check
Current GR state : normal
Graceful-restart period : 120 seconds
Number of neighbors under helper:
Normal neighbors : 0
Virtual neighbors : 0
Sham-link neighbors : 0
Total neighbors : 0
Number of restarting neighbors : 0
Last exit reason:
Issue 01 (2011-10-26) 214
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
5 OSPF Configuration
On graceful restart : none
On Helper : none
# Verify the GR feature of Switch A.
[SwitchA] quit
<SwitchA> reset ospf process graceful-restart
# View the neighbor status on SwitchB.
[SwitchB] display ospf peer
OSPF Process 1 with Router ID 1.1.1.2
Neighbors
Area 0.0.0.0 interface 1.1.1.2(Vlanif10)'s neighbors
Router ID: 1.1.1.1 Address: 1.1.1.1 GR State: Doing GR
State: Full Mode:Nbr is Slave Priority: 1
DR: 1.1.1.2 BDR: 1.1.1.1 MTU: 0
Dead timer due in 29 sec
Neighbor is up for 00:01:01
Authentication Sequence: [ 0 ]
The status of the neighbor is Full.
----End
Configuration Files
l Configuration file of Switch A
#
sysname SwitchA
#
router id 1.1.1.1
#
vlan batch 10
# interface Vlanif10
ip address 1.1.1.1 255.255.255.0
# interface GigabitEthernet1/0/1
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# ospf 1
opaque-capability enable
graceful-restart
area 0.0.0.0
network 1.1.1.0 0.0.0.255
# return l Configuration file of Switch B
#
sysname SwitchB
#
router id 2.2.2.2
#
vlan batch 10
# interface Vlanif10
ip address 1.1.1.2 255.255.255.0
# interface GigabitEthernet1/0/1
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# ospf 1
215
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 5 OSPF Configuration
opaque-capability enable
graceful-restart
area 0.0.0.0
network 1.1.1.0 0.0.0.255
# return
5.18.9 Example for Configuring BFD for OSPF
Networking Requirements
, the networking requirements are as follows:
l Switch A, Switch B, and Switch C run OSPF.
l BFD for OSPF is enabled on Switch A, Switch B, and Switch C.
l Service traffic is transmitted on the main link Switch A→Switch B. Link Switch A→Switch
C→Switch B is a backup link.
l BFD is configured on the interfaces between Switch A and Switch B. When a fault occurs on the link between the Switch s, BFD can quickly detect the fault and notify OSPF of the fault. Then, the service flow is transmitted on the backup link.
Figure 5-12 Networking diagram for configuring BFD for OSPF
SwitchA
GE2/0/0
GE1/0/0
GE2/0/0
SwitchB
GE3/0/0
GE1/0/0
Issue 01 (2011-10-26)
Switch
Switch A
Switch A
Switch B
Switch B
Switch B
Switch C
Switch C
GE1/0/0
SwitchC
GE2/0/0
Interface
GigabitEthernet1/0/0
GigabitEthernet2/0/0
GigabitEthernet1/0/0
GigabitEthernet2/0/0
GigabitEthernet3/0/0
GigabitEthernet1/0/0
GigabitEthernet2/0/0
VLANIF interface IP address
VLANIF 10
VLANIF 20
VLANIF 30
VLANIF 20
VLANIF 40
VLANIF 10
VLANIF 30
1.1.1.1/24
3.3.3.1/24
2.2.2.2/24
3.3.3.2/24
172.16.1.1/24
1.1.1.2/24
2.2.2.1/24
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
216
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 5 OSPF Configuration
Configuration Roadmap
The configuration roadmap is as follows:
1.
Configure the basic OSPF functions on the Switch s.
2.
Enable the BFD feature globally.
3.
Enable BFD for OSPF on Switch A and Switch B.
Data Preparation
To complete the configuration, you need the following data: l ID of the VLAN that each interface belongs to, as shown in
l
IP address of each VLANIF interface, as shown in
l Router ID and OSPF process ID of each Switch and network segments that OSPF interfaces belong to:
–
On Switch A, the router ID is 1.1.1.1; OSPF process ID is 1; the network segments of
Area 0 are 3.1.1.0/24 and 1.1.1.0/24.
– On Switch B, the router ID is 2.2.2.2; OSPF process ID is 1; the network segments of
Area 0 are 3.1.1.0/24, 2.2.2.0/24, and 172.16.1.0/24.
–
On Switch C, the router ID is 3.3.3.3; the OSPF process ID is 1; the network segments of Area 0 are 192.168.1.0/24 and 172.16.1.0/24.
l Minimum interval for sending the BFD packets, minimum interval for receiving the BFD packets, and local detection time multiplier on Switch A and Switch B
Procedure
Step 1 Create VLANs and add corresponding interfaces to the VLANs.
<Quidway> system-view
[Quidway] sysname SwitchA
[SwitchA] vlan 10
[SwitchA-vlan10] quit
[SwitchA] vlan 20
[SwitchA-vlan20] quit
[SwitchA] interface GigabitEthernet 1/0/0
[SwitchA-GigabitEthernet1/0/0] port hybrid pvid vlan 10
[SwitchA-GigabitEthernet1/0/0] port hybrid untagged vlan 10
[SwitchA-GigabitEthernet1/0/0] quit
[SwitchA] interface GigabitEthernet 2/0/0
[SwitchA-GigabitEthernet2/0/0] port hybrid pvid vlan 20
[SwitchA-GigabitEthernet1/0/0] port hybrid untagged vlan 20
[SwitchA-GigabitEthernet2/0/0] quit
The configurations of Switch B and Switch C are similar to the configuration of Switch A, and are not mentioned here.
Step 2 Assign an IP address to each VLANIF interface.
[SwitchA] interface vlanif 10
[SwitchA-Vlanif10] ip address 1.1.1.1 24
[SwitchA-Vlanif10] quit
[SwitchA] interface vlanif 20
[SwitchA-Vlanif20] ip address 3.3.3.1 24
[SwitchA-Vlanif20] quit
The configurations of Switch B and Switch C are similar to the configuration of Switch A, and are not mentioned here.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
217
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 5 OSPF Configuration
Step 3 Configure the basic OSPF functions. See
5.18.1 Example for Configuring Basic OSPF
.
Step 4 Configure BFD for OSPF.
# Enable BFD globally on Switch A.
[SwitchA] bfd
[SwitchA-bfd] quit
[SwitchA] ospf
[SwitchA-ospf-1] bfd all-interfaces enable
[SwitchA-ospf-1] quit
# Enable BFD globally on Switch B.
[SwitchB] bfd
[SwitchB-bfd] quit
[SwitchB] ospf
[SwitchB-ospf-1] bfd all-interfaces enable
[SwitchB-ospf-1] quit
# Run the display ospf bfd session all command on Switch A or Switch B. You can see that the
BFD state is Up.
Take Switch A for example. The display is as follows:
[SwitchA] display ospf bfd session all
OSPF Process 1 with Router ID 1.1.1.1
Area 0.0.0.0 interface 3.3.3.1(Vlanif20)'s BFD Sessions
NeighborId:2.2.2.2 AreaId:0.0.0.0 Interface:Vlanif20
BFDState:up rx :1000 tx :1000
Multiplier:3 BFD Local Dis:8195 LocalIpAdd:3.3.3.1
RemoteIpAdd:3.3.3.2 Diagnostic Info:No diagnostic information
Area 0.0.0.0 interface 1.1.1.1(Vlanif10)'s BFD Sessions
NeighborId:3.3.3.3 AreaId:0.0.0.0 Interface:Vlanif10
BFDState:up rx :1000 tx :1000
Multiplier:3 BFD Local Dis:8194 LocalIpAdd1:1.1.1.1
RemoteIpAdd:1.1.1.2 Diagnostic Info:No diagnostic information
Step 5 Configure the BFD feature of interfaces.
# Configure BFD on VLANIF 20 of Switch A, set the minimum interval for sending the packets and the minimum interval for receiving the packets to 100 ms, and set the local detection time multiplier to 4.
[SwitchA] interface vlanif 20
[SwitchA-Vlanif20] ospf bfd enable
[SwitchA-Vlanif20] ospf bfd min-tx-interval 100 min-rx-interval 100 detect-
multiplier 4
[SwitchA-Vlanif20] quit
# Configure BFD on VLANIF20 of Switch B and set the minimum interval for sending the packets and the minimum interval for receiving the packets to 100 ms and the local detection time multiplier to 4.
[SwitchB] bfd
[SwitchB-bfd] quit
[SwitchB] interface vlanif 20
[SwitchB-Vlanif20] ospf bfd enable
[SwitchB-Vlanif20] ospf bfd min-tx-interval 100 min-rx-interval 100 detect-
multiplier 4
[SwitchB-Vlanif20] quit
# Run the display ospf bfd session all command on Switch A or Switch B. You can see that the
BFD state is Up.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
218
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
5 OSPF Configuration
Take Switch B for example. The display is as follows:
[SwitchB] display ospf bfd session all
OSPF Process 1 with Router ID 2.2.2.2
Area 0.0.0.0 interface 3.3.3.2(Vlanif20)'s BFD Sessions
NeighborId:1.1.1.1 AreaId:0.0.0.0 Interface: Vlanif20
BFDState:up rx :100 tx :100
Multiplier:4 BFD Local Dis:8198 LocalIpAdd:3.3.3.2
RemoteIpAdd:3.3.3.1 Diagnostic Info:No diagnostic information
Area 0.0.0.0 interface 2.2.2.2(Vlanif30)'s BFD Sessions
NeighborId:3.3.3.3 AreaId:0.0.0.0 Interface: Vlanif30
BFDState:up rx :1000 tx :1000
Multiplier:3 BFD Local Dis:8199 LocalIpAdd:2.2.2.2
RemoteIpAdd:2.2.2.1 Diagnostic Info:No diagnostic information
Step 6 Verify the configuration.
# Run the shutdown command on VLANIF 20 of Switch B to simulate a link fault.
[SwitchB] interface vlanif 20
[SwitchB-Vlanif20] shutdown
# View the routing table of 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
172.16.1.1/24 3 Stub 1.1.1.2 2.2.2.2 0.0.0.0
3.3.3.0/24 1 Stub 3.3.3.1 1.1.1.1 0.0.0.0
2.2.2.0/24 2 Transit 1.1.1.2 3.3.3.3 0.0.0.0
1.1.1.0/24 1 Transit 1.1.1.1 1.1.1.1 0.0.0.0
Total Nets: 4 Intra Area: 4 Inter Area: 0 ASE: 0 NSSA: 0
As shown in the OSPF routing table, the backup link Switch A→Switch C→Switch B takes effect after the main link fails. The next hop address of the route to 172.16.1.0/24 becomes
1.1.1.2.
----End
Configuration Files
l Configuration file of Switch A
#
sysname SwitchA
#
router id 1.1.1.1
#
vlan batch 10 20
#
bfd
# interface Vlanif10
ip address 1.1.1.1 255.255.255.0
# interface Vlanif20
ip address 3.3.3.1 255.255.255.0
ospf bfd enable
ospf bfd min-tx-interval 100 min-rx-interval 100 detect-multiplier 4
#
Issue 01 (2011-10-26) 219
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
5 OSPF Configuration interface GigabitEthernet1/0/0
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# interface GigabitEthernet2/0/0
port hybrid pvid vlan 20
port hybrid untagged vlan 20
# ospf 1
bfd all-interface enable
area 0.0.0.0
network 3.3.3.0 0.0.0.255
network 1.1.1.0 0.0.0.255
# return l Configuration file of Switch B
#
sysname SwitchB
#
router id 2.2.2.2
# vlan batch 20 30 40
#
bfd
# interface Vlanif20
ip address 3.3.3.2 255.255.255.0
ospf bfd enable
ospf bfd min-tx-interval 100 min-rx-interval 100 detect-multiplier 4
# interface Vlanif30
ip address 2.2.2.2 255.255.255.0
# interface Vlanif40
ip address 172.16.1.1 255.255.255.0
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 30
port hybrid untagged vlan 30
# interface GigabitEthernet2/0/0
port link-type access
port default vlan 20
# interface GigabitEthernet3/0/0
port hybrid pvid vlan 40
port hybrid untagged vlan 40
# ospf 1
bfd all-interface enable
area 0.0.0.0
network 3.3.3.0 0.0.0.255
network 2.2.2.0 0.0.0.255
network 172.16.1.0 0.0.0.255
# return l Configuration file of Switch C
#
sysname SwitchC
#
router id 3.3.3.3
#
vlan batch 10 30
#
bfd
# interface Vlanif10
ip address 1.1.1.2 255.255.255.0
220
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 5 OSPF Configuration
# interface Vlanif30
ip address 2.2.2.1 255.255.255.0
ospf bfd enable
ospf bfd min-tx-interval 100 min-rx-interval 100 detect-multiplier 4
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# interface GigabitEthernet2/0/0
port hybrid pvid vlan 30
port hybrid untagged vlan 30
# ospf 1
bfd all-interface enable
area 0.0.0.0
network 1.1.1.0 0.0.0.255
network 2.2.2.0 0.0.0.255
# return
5.18.10 Example for Configuring OSPF-BGP
Network Requirements
, all switches run BGP. An EBGP connection is established between
Switch D and Switch E. IBGP full connections are established between partial switches in AS
10, and OSPF is used as an IGP protocol.
It is required to enable OSPF-BGP linkage on Switch B so that the traffic from Switch A to AS
20 is not interrupted after Switch B restarts.
Figure 5-13 Networking diagram for configuring OSPF-BGP linkage
GE2/0/0
10.1.2.2/30
SwitchC
GE1/0/0
10.1.4.1/30
GE2/0/0
10.1.2.1/30
GE1/0/0
10.1.1.1/30
SwitchA
GE1/0/0
10.1.4.2/30
SwitchD
EBGP
GE3/0/0
10.2.1.1/30
GE2/0/0
10.1.3.2/30
GE1/0/0 GE2/0/0
10.1.1.2/30
SwitchB
10.1.3.1/30
AS 10
AS 20
SwitchF
GE1/0/0
10.3.1.2/30
GE2/0/0
10.3.1.1/30
SwitchE
GE1/0/0
10.2.1.2/30
Switch
SwitchA
SwitchA
Interface
GigabitEthernet 1/0/0
GigabitEthernet 2/0/0
VLANIF interface
VLANIF 10
VLANIF 20
IP address
10.1.1.1/30
10.1.2.1/30
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
221
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
SwitchB
SwitchB
SwitchC
SwitchC
SwitchD
SwitchD
SwitchD
SwitchE
SwitchE
SwitchF
GigabitEthernet 1/0/0
GigabitEthernet 2/0/0
GigabitEthernet 2/0/0
GigabitEthernet 1/0/0
GigabitEthernet 1/0/0
GigabitEthernet 2/0/0
GigabitEthernet 3/0/0
GigabitEthernet 1/0/0
GigabitEthernet 2/0/0
GigabitEthernet 1/0/0
VLANIF 10
VLANIF 40
VLANIF 20
VLANIF 30
VLANIF 30
VLANIF 40
VLANIF 50
VLANIF 50
VLANIF 60
VLANIF 60
5 OSPF Configuration
10.1.1.2/30
10.1.3.1/30
10.1.2.2/30
10.1.4.1/30
10.1.4.2/30
10.1.3.2/30
10.2.1.1/30
10.2.1.2/30
10.3.1.1/30
10.3.1.2/30
Configuration Roadmap
The configuration roadmap is as follows:
1.
Enable OSPF on Switch A, Switch B, Switch C, and Switch D (except 10.2.1.1/30) and specify the same area for all OSPF interfaces.
2.
Establish IBGP full connections between Switch A, Switch B, Switch C, and Switch D
(except 10.2.1.1/30).
3.
Set the OSPF cost on Switch C.
4.
Establish the EBGP connection between Switch D and Switch E.
5.
Configure the OSPF process and configure BGP to import directly connected routes on
Switch D.
6.
Configure BGP on Switch E.
Data Preparation
To complete the configuration, you need the following data: l The router ID of Switch A is 1.1.1.1, the AS number is 10, the OSPF process number is 1, and the network segments in Area 0 are 10.1.1.0/30 and 10.1.2.0/30.
l The router ID of Switch B is 2.2.2.2, the AS number is 10, the OSPF process number is 1, and the network segments in Area 0 are 10.1.1.0/30 and 10.1.3.0/30.
l The router ID of Switch C is 3.3.3.3, the AS number is 10, the OSPF process number is 1, and the network segments in Area 0 are 10.1.2.0/30 and 10.1.4.0/30.
l The router ID of Switch D is 4.4.4.4, the AS number is 10, the OSPF process number is 1, and the network segments in Area 0 are 10.1.3.0/30 and 10.1.4.0/30.
l The router ID of Switch E is 5.5.5.5, and the AS number is 20.
Procedure
Step 1 Configure VLANs that interfaces belong to.
<Quidway> system-view
[Quidway] sysname SwitchA
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
222
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
5 OSPF Configuration
[SwitchA] vlan batch 10 20
[SwitchA] interface gigabitethernet 1/0/0
[SwitchA-GigabitEthernet1/0/0] port hybrid pvid vlan 10
[SwitchA-GigabitEthernet1/0/0] port hybrid untagged vlan 10
[SwitchA-GigabitEthernet1/0/0] quit
[SwitchA] interface gigabitethernet 2/0/0
[SwitchA-GigabitEthernet2/0/0] port hybrid pvid vlan 20
[SwitchA-GigabitEthernet2/0/0] port hybrid untagged vlan 20
[SwitchA-GigabitEthernet2/0/0] quit
The configurations of SwitchB, SwitchC, SwitchD, SwitchE and SwitchF are similar to the configuration of SwitchA, and are not mentioned here.
Step 2 Assign an IP address to each VLANIF interface.
[SwitchA] interface vlanif 10
[SwitchA-Vlanif10] ip address 10.1.1.1 30
[SwitchA-Vlanif10] quit
[SwitchA] interface vlanif 20
[SwitchA-Vlanif20] ip address 10.1.2.1 30
[SwitchA-Vlanif20] quit
The configurations of SwitchB, SwitchC, SwitchD, SwitchE and SwitchF are similar to the configuration of SwitchA, and are not mentioned here.
Step 3 Configure basic OSPF functions.
The configuration details are not mentioned here.
Step 4 Configure an IBGP full connection.
# Configure Switch A.
<SwitchA> system-view
[SwitchA] interface LoopBack 0
[SwitchA-LoopBack0] ip address 1.1.1.1 32
[SwitchA-LoopBack0] quit
[SwitchA] bgp 10
[SwitchA-bgp] router-id 1.1.1.1
[SwitchA-bgp] peer 2.2.2.2 as-number 10
[SwitchA-bgp] peer 2.2.2.2 connect-interface LoopBack 0
[SwitchA-bgp] peer 3.3.3.3 as-number 10
[SwitchA-bgp] peer 3.3.3.3 connect-interface LoopBack 0
[SwitchA-bgp] peer 4.4.4.4 as-number 10
[SwitchA-bgp] peer 4.4.4.4 connect-interface LoopBack 0
[SwitchA-bgp] quit
# Configure Switch B.
<SwitchB> system-view
[SwitchB] interface LoopBack 0
[SwitchB-LoopBack0] ip address 2.2.2.2 32
[SwitchB-LoopBack0] quit
[SwitchB] bgp 10
[SwitchB-bgp] router-id 2.2.2.2
[SwitchB-bgp] peer 1.1.1.1 as-number 10
[SwitchB-bgp] peer 1.1.1.1 connect-interface LoopBack 0
[SwitchB-bgp] peer 3.3.3.3 as-number 10
[SwitchB-bgp] peer 3.3.3.3 connect-interface LoopBack 0
[SwitchB-bgp] peer 4.4.4.4 as-number 10
[SwitchB-bgp] peer 4.4.4.4 connect-interface LoopBack 0
[SwitchB-bgp] quit
# Configure Switch C.
<SwitchC> system-view
[SwitchC] interface LoopBack 0
[SwitchC-LoopBack0] ip address 3.3.3.3 32
[SwitchC-LoopBack0] quit
Issue 01 (2011-10-26) 223
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
5 OSPF Configuration
[SwitchC] bgp 10
[SwitchC-bgp] router-id 3.3.3.3
[SwitchC-bgp] peer 1.1.1.1 as-number 10
[SwitchC-bgp] peer 1.1.1.1 connect-interface LoopBack 0
[SwitchC-bgp] peer 2.2.2.2 as-number 10
[SwitchC-bgp] peer 2.2.2.2 connect-interface LoopBack 0
[SwitchC-bgp] peer 4.4.4.4 as-number 10
[SwitchC-bgp] peer 4.4.4.4 connect-interface LoopBack 0
[SwitchC-bgp] quit
# Configure Switch D.
<SwitchD> system-view
[SwitchD] interface LoopBack 0
[SwitchD-LoopBack0] ip address 4.4.4.4 32
[SwitchD-LoopBack0] quit
[SwitchD] bgp 10
[SwitchD-bgp] router-id 4.4.4.4
[SwitchD-bgp] peer 1.1.1.1 as-number 10
[SwitchD-bgp] peer 1.1.1.1 connect-interface LoopBack 0
[SwitchD-bgp] peer 2.2.2.2 as-number 10
[SwitchD-bgp] peer 2.2.2.2 connect-interface LoopBack 0
[SwitchD-bgp] peer 3.3.3.3 as-number 10
[SwitchD-bgp] peer 3.3.3.3 connect-interface LoopBack 0
[SwitchD-bgp] quit
Step 5 Configure an EBGP connection.
# Configure Switch D.
[SwitchD] bgp 10
[SwitchD-bgp] peer 10.2.1.2 as-number 20
[SwitchD-bgp] import-route direct
[SwitchD-bgp] import-route ospf 1
[SwitchD-bgp] quit
# Configure Switch E.
[SwitchE] bgp 20
[SwitchE-bgp] peer 10.2.1.1 as-number 10
[SwitchE-bgp] ipv4-family unicast
[SwitchE-bgp-af-ipv4] network 10.3.1.0 30
[SwitchE-bgp-af-ipv4] quit
Step 6 Set the cost of OSPF on Switch C.
[SwitchC] interface vlanif 30
[SwitchC-Vlanif30] ospf cost 2
[SwitchC-Vlanif30] quit
[SwitchC] interface vlanif 20
[SwitchC-Vlanif20] ospf cost 2
[SwitchC-Vlanif20] quit
NOTE
After the cost of OSPF on Switch C is set to 2, Switch A chooses only Switch B as the intermediate router to the network segment 10.2.1.0. Switch C becomes the backup router of Switch B.
# View the routing table of Switch A. As shown in the routing table, the route to the network segment 10.3.1.0 can be learned through BGP, and the outgoing interface is Vlanif10.
[SwitchA] display ip routing-table
Route Flags: R - relied, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 16 Routes : 17
Destination/Mask Proto Pre Cost Flags NextHop Interface
1.1.1.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
2.2.2.2/32 OSPF 10 3 D 10.1.1.2 Vlanif10
4.4.4.0/24 BGP 255 0 RD 4.4.4.4 Vlanif10
Issue 01 (2011-10-26) 224
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 5 OSPF Configuration
4.4.4.4/32 OSPF 10 3 D 10.1.1.2 Vlanif10
5.5.5.0/24 BGP 255 0 RD 10.2.1.2 Vlanif10
10.1.1.0/30 Direct 0 0 D 10.1.1.1 Vlanif10
10.1.1.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
10.1.1.2/32 Direct 0 0 D 10.1.1.2 Vlanif10
10.1.2.0/30 Direct 0 0 D 10.1.2.1 Vlanif20
10.1.2.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
10.1.2.2/32 Direct 0 0 D 10.1.2.2 Vlanif20
10.1.3.0/30 OSPF 10 2 D 10.1.1.2 Vlanif10
10.1.3.1/32 BGP 255 0 RD 4.4.4.4 Vlanif10
10.1.4.0/30 OSPF 10 3 D 10.1.1.2 Vlanif10
OSPF 10 3 D 10.1.2.2 Vlanif20
10.1.4.1/32 BGP 255 0 RD 4.4.4.4 Vlanif10
10.2.1.0/30 BGP 255 0 RD 4.4.4.4 Vlanif10
10.2.1.2/32 BGP 255 0 RD 4.4.4.4 Vlanif10
10.3.1.0/30 BGP 255 0 RD 4.4.4.4 Vlanif10
# View the routing table of Switch B.
[SwitchB] display ip routing-table
Route Flags: R - relied, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 15 Routes : 15
Destination/Mask Proto Pre Cost Flags NextHop Interface
2.2.2.2/32 Direct 0 0 D 127.0.0.1 InLoopBack0
1.1.1.1/32 OSPF 10 2 D 10.1.1.1 Vlanif10
4.4.4.0/24 BGP 255 0 RD 10.1.3.2 Vlanif40
4.4.4.4/32 OSPF 10 2 D 10.1.3.2 Vlanif40
5.5.5.0/24 BGP 255 0 RD 10.2.1.2 Vlanif40
10.1.1.0/30 Direct 0 0 D 10.1.1.2 Vlanif10
10.1.1.1/32 Direct 0 0 D 10.1.1.1 Vlanif10
10.1.1.2/32 Direct 0 0 D 127.0.0.1 InLoopBack0
10.1.2.0/30 OSPF 10 2 D 10.1.1.1 Vlanif10
10.1.3.0/30 Direct 0 0 D 10.1.3.1 Vlanif40
10.1.3.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
10.1.3.2/32 Direct 0 0 D 10.1.3.2 Vlanif40
10.1.4.0/30 OSPF 10 2 D 10.1.3.2 Vlanif40
10.1.4.1/32 BGP 255 0 RD 10.1.3.2 Vlanif40
10.2.1.0/30 BGP 255 0 RD 10.1.3.2 Vlanif40
10.2.1.2/32 BGP 255 0 RD 10.1.3.2 Vlanif40
10.3.1.0/30 BGP 255 0 RD 10.1.3.2 Vlanif40
As shown in the routing table, Switch B learns the route to the network segment 10.3.1.0 through
BGP, and the outgoing interface is Vlanif40. The routes to the network segments 10.1.2.0 and
10.1.4.0 respectively can be learned through OSPF. The costs of the two routes are 2.
Step 7 Enable OSPF-BGP linkage on Switch B.
[SwitchB] ospf 1
[SwitchB-ospf-1] stub-router on-startup
[SwitchB-ospf-1] quit
[SwitchB] quit
Step 8 Verify the configuration.
# Restart Switch B.
NOTE
Confirm the action before you use the command because the command leads to the breakdown of the network in a short time. In addition, when restarting a switch, ensure that the configuration file of the switch is saved.
<SwitchB> reboot
System will reboot! Continue?[Y/N] y
# View the routing table of Switch A. As shown in the routing table, the route to the network
10.3.1.0 can be learned through BGP, and the outgoing interface is Vlanif40.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
225
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
5 OSPF Configuration
[SwitchA] display ip routing-table
Route Flags: R - relied, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 17 Routes : 17
Destination/Mask Proto Pre Cost Flags NextHop Interface
1.1.1.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
2.2.2.2/32 OSPF 10 4 D 10.1.2.2 Vlanif40
4.4.4.0/24 BGP 255 0 RD 4.4.4.4 Vlanif40
4.4.4.4/32 OSPF 10 4 D 10.1.2.2 Vlanif40
5.5.5.0/24 BGP 255 0 RD 10.2.1.2 Vlanif40
10.1.1.0/30 Direct 0 0 D 10.1.1.1 Vlanif10
10.1.1.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
10.1.1.2/32 Direct 0 0 D 10.1.1.2 Vlanif10
10.1.2.0/30 Direct 0 0 D 10.1.2.1 Vlanif40
10.1.2.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
10.1.2.2/32 Direct 0 0 D 10.1.2.2 Vlanif40
10.1.3.0/30 OSPF 10 2 D 10.1.1.2 Vlanif10
10.1.3.1/32 BGP 255 0 RD 4.4.4.4 Vlanif40
10.1.4.0/30 OSPF 10 3 D 10.1.2.2 Vlanif40
10.1.4.1/32 BGP 255 0 RD 4.4.4.4 Vlanif40
10.2.1.0/30 BGP 255 0 RD 4.4.4.4 Vlanif40
10.2.1.2/32 BGP 255 0 RD 4.4.4.4 Vlanif40
10.3.1.0/30 BGP 255 0 RD 4.4.4.4 Vlanif40
# View the routing table of Switch B. As shown in the routing table, only OSPF routes exist in the routing table temporarily and their costs are equal to or greater than 65535. This is because
IGP route convergence is faster than BGP route convergence.
[SwitchB] display ip routing-table
Route Flags: R - relied, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 13 Routes : 13
Destination/Mask Proto Pre Cost Flags NextHop Interface
1.1.1.1/32 OSPF 10 65536 D 10.1.1.1 Vlanif10
2.2.2.2/32 Direct 0 0 D 127.0.0.1 InLoopBack0
4.4.4.4/32 OSPF 10 65536 D 10.1.3.2 Vlanif40
10.1.1.0/30 Direct 0 0 D 10.1.1.2 Vlanif10
10.1.1.1/32 Direct 0 0 D 10.1.1.1 Vlanif10
10.1.1.2/32 Direct 0 0 D 127.0.0.1 InLoopBack0
10.1.2.0/30 OSPF 10 65536 D 10.1.1.1 Vlanif40
10.1.3.0/30 Direct 0 0 D 10.1.3.1 Vlanif40
10.1.3.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
10.1.3.2/32 Direct 0 0 D 10.1.3.2 Vlanif40
10.1.4.0/30 OSPF 10 65536 D 10.1.3.2 Vlanif40
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
# View the routing table of Switch B.
[SwitchB] display ip routing-table
Route Flags: R - relied, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 15 Routes : 15
Destination/Mask Proto Pre Cost Flags NextHop Interface
2.2.2.2/32 Direct 0 0 D 127.0.0.1 InLoopBack0
1.1.1.1/32 OSPF 10 2 D 10.1.1.1 Vlanif10
4.4.4.0/24 BGP 255 0 RD 10.1.3.2 Vlanif40
4.4.4.4/32 OSPF 10 2 D 10.1.3.2 Vlanif40
5.5.5.0/24 BGP 255 0 RD 10.2.1.2 Vlanif40
10.1.1.0/30 Direct 0 0 D 10.1.1.2 Vlanif10
10.1.1.1/32 Direct 0 0 D 10.1.1.1 Vlanif10
10.1.1.2/32 Direct 0 0 D 127.0.0.1 InLoopBack0
10.1.2.0/30 OSPF 10 2 D 10.1.1.1 Vlanif10
10.1.3.0/30 Direct 0 0 D 10.1.3.1 Vlanif40
10.1.3.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
10.1.3.2/32 Direct 0 0 D 10.1.3.2 Vlanif40
226
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
5 OSPF Configuration
10.1.4.0/30 OSPF 10 2 D 10.1.3.2 Vlanif40
10.1.4.1/32 BGP 255 0 RD 10.1.3.2 Vlanif40
10.2.1.0/30 BGP 255 0 RD 10.1.3.2 Vlanif40
10.2.1.2/32 BGP 255 0 RD 10.1.3.2 Vlanif40
10.3.1.0/30 BGP 255 0 RD 10.1.3.2 Vlanif40
As shown in the routing table, after BGP route convergence on Switch B is complete, the contents of the routing information are the same as those before the switch restarts.
----End
Configuration Files
l Configuration file of Switch A
#
sysname SwitchA
# vlan batch 10 20
# router id 1.1.1.1
# interface Vlanif10
ip address 10.1.1.1 255.255.255.252
# interface Vlanif20
ip address 10.1.2.1 255.255.255.252
# interface LoopBack0
ip address 1.1.1.1 255.255.255.255
# bgp 10
router-id 1.1.1.1
peer 2.2.2.2 as-number 10
peer 2.2.2.2 connect-interface LoopBack 0
peer 3.3.3.3 as-number 10
peer 3.3.3.3 connect-interface LoopBack 0
peer 4.4.4.4 as-number 10
peer 4.4.4.4 connect-interface LoopBack 0
# ipv4-family unicast
undo synchronization
peer 4.4.4.4 enable
peer 10.1.1.2 enable
peer 10.1.2.2 enable
# ospf 1
area 0.0.0.0
network 1.1.1.1 0.0.0.0
network 10.1.1.0 0.0.0.3
network 10.1.2.0 0.0.0.3
# return l Configuration file of Switch B
# sysname SwitchB
# vlan batch 10 40
# router id 2.2.2.2
# interface Vlanif10
ip address 10.1.1.2 255.255.255.252
# interface Vlanif40
ip address 10.1.3.1 255.255.255.252
# interface LoopBack0
Issue 01 (2011-10-26) 227
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Issue 01 (2011-10-26)
ip address 2.2.2.2 255.255.255.255
# bgp 10
router-id 2.2.2.2
peer 1.1.1.1 as-number 10
peer 1.1.1.1 connect-interface LoopBack 0
peer 3.3.3.3 as-number 10
peer 3.3.3.3 connect-interface LoopBack 0
peer 4.4.4.4 as-number 10
peer 4.4.4.4 connect-interface LoopBack 0
# ipv4-family unicast
undo synchronization
peer 10.1.1.1 enable
peer 10.1.3.2 enable
# ospf 1
area 0.0.0.0
network 10.1.1.0 0.0.0.3
network 10.1.3.0 0.0.0.3
network 2.2.2.2 0.0.0.0
# return l Configuration file of Switch C
#
sysname SwitchC
# vlan batch 30 20
# router id 3.3.3.3
interface Vlanif30
ip address 10.1.4.1 255.255.255.252
# interface Vlanif20
ip address 10.1.2.2 255.255.255.252
# interface LoopBack0
ip address 3.3.3.3 255.255.255.255
# bgp 10
router-id 3.3.3.3
peer 1.1.1.1 as-number 10
peer 1.1.1.1 connect-interface LoopBack 0
peer 2.2.2.2 as-number 10
peer 2.2.2.2 connect-interface LoopBack 0
peer 4.4.4.4 as-number 10
peer 4.4.4.4 connect-interface LoopBack 0
# ipv4-family unicast
undo synchronization
peer 10.1.4.2 enable
peer 10.1.2.1 enable
# ospf 1
area 0.0.0.0
network 10.1.2.0 0.0.0.3
network 10.1.4.0 0.0.0.3
network 3.3.3.3 0.0.0.0
# return l Configuration file of Switch D
#
sysname SwitchD
# vlan batch 30 40 50
# router id 4.4.4.4
#
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
5 OSPF Configuration
228
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing interface Vlanif30
ip address 10.1.4.2 255.255.255.252
# interface Vlanif40
ip address 10.1.3.2 255.255.255.252
# interface Vlanif50
ip address 10.2.1.1 255.255.255.252
# interface LoopBack0
ip address 4.4.4.4 255.255.255.255
# bgp 10
router-id 4.4.4.4
peer 10.2.1.2 as-number 20
peer 1.1.1.1 as-number 10
peer 1.1.1.1 connect-interface LoopBack 0
peer 2.2.2.2 as-number 10
peer 2.2.2.2 connect-interface LoopBack 0
peer 3.3.3.3 as-number 10
peer 3.3.3.3 connect-interface LoopBack 0
# ipv4-family unicast
undo synchronization
import-route direct
import-route ospf 1
peer 2.2.2.2 enable
peer 1.1.1.1 enable
peer 5.5.5.5 enable
peer 3.3.3.3 enable
# ospf 1
area 0.0.0.0
network 4.4.4.4 0.0.0.0
network 10.1.3.0 0.0.0.3
network 10.1.4.0 0.0.0.3
# return l Configuration file of Switch E
#
sysname SwitchE
# vlan batch 50 60
# router id 5.5.5.5
# interface Vlanif50
ip address 10.2.1.2 255.255.255.252
# interface Vlanif60
ip address 10.3.1.1 255.255.255.252
# interface LoopBack0
ip address 5.5.5.5 255.255.255.255
# bgp 20
router-id 5.5.5.5
peer 10.2.1.1 as-number 10
# ipv4-family unicast
undo synchronization
network 10.3.1.0 255.255.255.252
peer 10.2.1.1 enable
# return
5.18.11 Example for Configuring OSPF GTSM
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
5 OSPF Configuration
229
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 5 OSPF Configuration
Networking Requirements
, OSPF is run between switches, and GTSM is enabled on Switch C.
The following are the valid TTL ranges of the packets sent from each switch to Switch C: l
Switch A and Switch E are the neighboring switches of Switch C. The valid TTL range of packets is [255, 255].
l The valid TTL ranges of the packets sent from Switch B, Switch D, and Switch F to Switch
C are [254, 255], [253, 255], and [252, 255] respectively.
Figure 5-14 Networking diagram for configuring OSPF GTSM
Switch
SwitchA
SwitchA
SwitchB
SwitchB
SwitchC
SwitchC
SwitchD
SwitchD
SwitchE
SwitchF
Switch A
Area0
GE1/0/0
192.168.0.1/24
GE1/0/0
192.168.0.2/24
GE2/0/0
192.168.1.1/24
GE1/0/0
192.168.1.2/24
Switch C
GE2/0/0
172.16.1.1/24
GE2/0/0
172.16.1.2/24
Switch E
Area1
PC
Switch B
GE2/0/0
192.168.2.1/24
GE1/0/0
192.168.2.2/24
Switch D
GE2/0/0
172.17.1.1/24
GE2/0/0
172.17.1.2/24
Switch F
Area2
Interface
GigabitEthernet1/0/0
GigabitEthernet2/0/0
GigabitEthernet1/0/0
GigabitEthernet2/0/0
GigabitEthernet1/0/0
GigabitEthernet2/0/0
GigabitEthernet1/0/0
GigabitEthernet2/0/0
GigabitEthernet2/0/0
GigabitEthernet2/0/0
VLANIF interface
VLANIF 10
VLANIF 20
VLANIF 10
VLANIF 30
VLANIF 20
VLANIF 40
VLANIF 30
VLANIF 50
VLANIF 40
VLANIF 50
IP address
192.168.0.1/24
192.168.1.1/24
192.168.0.2/24
192.168.2.1/24
192.168.1.2/24
172.16.1.1/24
192.168.2.2/24
172.17.1.1/24
172.16.1.2/24
172.17.1.2/24
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
230
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
5 OSPF Configuration
Configuration Roadmap
The configuration roadmap is as follows:
1.
Configure basic OSPF functions.
2.
Enable GTSM on each switch and specify the valid TTL range of packets.
Data Preparation
To complete the configuration, you need the following data: l OSPF process number of each switch l Valid TTL range of packets between switches
Procedure
Step 1 Configure VLANs that interfaces belong to.
<Quidway> system-view
[Quidway] sysname SwitchA
[SwitchA] vlan batch 10 20
[SwitchA] interface gigabitethernet 1/0/0
[SwitchA-GigabitEthernet1/0/0] port hybrid pvid vlan 10
[SwitchA-GigabitEthernet1/0/0] port hybrid untagged vlan 10
[SwitchA-GigabitEthernet1/0/0] quit
[SwitchA] interface gigabitethernet 2/0/0
[SwitchA-GigabitEthernet2/0/0] port hybrid pvid vlan 20
[SwitchA-GigabitEthernet2/0/0] port hybrid untagged vlan 20
[SwitchA-GigabitEthernet2/0/0] quit
The configurations of SwitchB, SwitchC, SwitchD, SwitchE, and SwitchF are similar to the configuration of SwitchA, and are not mentioned here.
Step 2 Assign an IP address to each VLANIF interface.
[SwitchA] interface vlanif 10
[SwitchA-Vlanif10] ip address 192.168.0.1 24
[SwitchA-Vlanif10] quit
[SwitchA] interface vlanif 20
[SwitchA-Vlanif20] ip address 192.168.1.1 24
[SwitchA-Vlanif20] quit
The configurations of SwitchB, SwitchC, SwitchD, SwitchE, and SwitchF are similar to the configuration of SwitchA, and are not mentioned here.
Step 3 Configure basic OSPF functions. The configuration details see
5.18.1 Example for Configuring
.
Step 4 Configure OSPF GTSM.
# Configure the valid TTL range of packets from Switch C to other switches as [252, 255].
[SwitchC] ospf valid-ttl-hops 4
# Configure the valid TTL range of packets from Switch A to Switch C as [255, 255].
[SwitchA] ospf valid-ttl-hops 1
# Configure the valid TTL range of packets from Switch B to Switch C as [254, 255].
[SwitchB] ospf valid-ttl-hops 2
# Configure the valid TTL range of packets from Switch D to Switch C as [253, 255].
[SwitchD] ospf valid-ttl-hops 3
Issue 01 (2011-10-26) 231
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
5 OSPF Configuration
# Configure the valid TTL range of packets from Switch E to Switch C as [255, 255].
[SwitchE] ospf valid-ttl-hops 1
# Configure the valid TTL range of packets from Switch F to Switch C as [252, 255].
[SwitchF] ospf valid-ttl-hops 4
Step 5 Verify the configuration.
# Check whether OSPF neighbors between switches are established normally. Take Switch A as an example. You can view the status of the neighbor relationship is Full, that is, neighbors are established normally.
[SwitchA] display ospf peer
OSPF Process 1 with Router ID 1.1.1.1
Neighbors
Area 0.0.0.0 interface 192.168.0.1(Vlanif10)'s neighbors
Router ID: 2.2.2.2 Address: 192.168.0.2
State: Full Mode:Nbr is Master Priority: 1
DR: None BDR: None MTU: 0
Dead timer due in 36 sec
Neighbor is up for 00:15:04
Authentication Sequence: [ 0 ]
Neighbors
Area 0.0.0.1 interface 192.168.1.1(Vlanif20)'s neighbors
Router ID: 3.3.3.3 Address: 192.168.1.2
State: Full Mode:Nbr is Master Priority: 1
DR: None BDR: None MTU: 0
Dead timer due in 39 sec
Neighbor is up for 00:07:32
Authentication Sequence: [ 0 ]
# Run the display gtsm statistics all command on Switch C. You can view the GTSM statistics.
If the default action performed on packets is "pass" and all the packets are valid, the number of dropped packets is 0.
<SwitchC> display gtsm statistics all
GTSM Statistics Table
----------------------------------------------------------------
SlotId Protocol Total Counters Drop Counters Pass Counters
----------------------------------------------------------------
1 BGP 0 0 0
1 BGPv6 0 0 0
1 OSPF 0 0 0
1 LDP 0 0 0
2 BGP 0 0 0
2 BGPv6 0 0 0
2 OSPF 0 0 0
2 LDP 0 0 0
3 BGP 0 0 0
3 BGPv6 0 0 0
3 OSPF 0 0 0
3 LDP 0 0 0
4 BGP 0 0 0
4 BGPv6 0 0 0
4 OSPF 0 0 0
4 LDP 0 0 0
5 BGP 0 0 0
5 BGPv6 0 0 0
5 OSPF 0 0 0
5 LDP 0 0 0
7 BGP 0 0 0
7 BGPv6 0 0 0
7 OSPF 0 0 0
7 LDP 0 0 0
----------------------------------------------------------------
Issue 01 (2011-10-26) 232
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
5 OSPF Configuration
If the host simulates the OSPF packets of Switch A to attack Switch C, the packets are dropped because the TTL value is not 255 when the packets reach Switch C. In the GTSM statistics of
Switch C, the number of dropped packets also increases.
----End
Configuration Files
l Configuration file of Switch A
#
sysname SwitchA
# vlan batch 10 20
# interface Vlanif10
ip address 192.168.0.1 255.255.255.0
# interface Vlanif20
ip address 192.168.1.1 255.255.255.0
# interface GigabitEthernet 1/0/0
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# interface GigabitEthernet 2/0/0
port hybrid pvid vlan 20
port hybrid untagged vlan 20
# ospf 1
area 0.0.0.0
network 192.168.0.0 0.0.0.255
area 0.0.0.1
network 192.168.1.0 0.0.0.255
# ospf valid-ttl-hops 1
# return l Configuration file of Switch B
#
sysname SwitchB
# vlan batch 10 30
# router id 2.2.2.2
# interface Vlanif10
ip address 192.168.0.2 255.255.255.0
# interface Vlanif30
ip address 192.168.2.1 255.255.255.0
# interface GigabitEthernet 1/0/0
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# interface GigabitEthernet 2/0/0
port hybrid pvid vlan 30
port hybrid untagged vlan 30
# ospf 1
area 0.0.0.0
network 192.168.0.0 0.0.0.255
area 0.0.0.2
network 192.168.2.0 0.0.0.255
# ospf valid-ttl-hops 2
Issue 01 (2011-10-26) 233
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Issue 01 (2011-10-26)
# return l Configuration file of Switch C
#
sysname SwitchC
# vlan batch 20 40
# router id 3.3.3.3
# interface Vlanif20
ip address 192.168.1.2 255.255.255.0
# interface Vlanif40
ip address 172.16.1.1 255.255.255.0
# interface GigabitEthernet 1/0/0
port hybrid pvid vlan 20
port hybrid untagged vlan 20
# interface GigabitEthernet 2/0/0
port hybrid pvid vlan 40
port hybrid untagged vlan 40
# ospf 1
area 0.0.0.1
network 192.168.1.0 0.0.0.255
network 172.16.1.0 0.0.0.255
# ospf valid-ttl-hops 4
# return l Configuration file of Switch D
#
sysname SwitchD
# vlan batch 30 50
# router id 4.4.4.4
# interface Vlanif30
ip address 192.168.2.2 255.255.255.0
# interface Vlanif50
ip address 172.17.1.1 255.255.255.0
# interface GigabitEthernett 1/0/0
port hybrid pvid vlan 30
port hybrid untagged vlan 30
# interface GigabitEthernet 2/0/0
port hybrid pvid vlan 50
port hybrid untagged vlan 50
# ospf 1
area 0.0.0.2
network 192.168.2.0 0.0.0.255
network 172.17.1.0 0.0.0.255
# ospf valid-ttl-hops 3
# return l Configuration file of Switch E
#
sysname SwitchE
# vlan batch 40
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
5 OSPF Configuration
234
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
# router id 5.5.5.5
# interface Vlanif40
ip address 172.16.1.2 255.255.255.0
# interface GigabitEthernet 2/0/0
port hybrid pvid vlan 40
port hybrid untagged vlan 40
# ospf 1
area 0.0.0.1
network 172.16.1.0 0.0.0.255
# ospf valid-ttl-hops 1
# return l Configuration file of Switch F
#
sysname SwitchF
# vlan batch 50
# router id 6.6.6.6
# interface Vlanif50
ip address 172.17.1.2 255.255.255.0
# interface GigabitEthernet 2/0/0
port hybrid pvid vlan 50
port hybrid untagged vlan 50
# ospf 1
area 0.0.0.2
network 172.17.1.0 0.0.0.255
# ospf valid-ttl-hops 4
# return
5 OSPF Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
235
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 6 OSPFv3 Configuration
6
OSPFv3 Configuration
About This Chapter
Issue 01 (2011-10-26)
By building Open Shortest Path First Version 3 (OSPFv3) networks, you can enable OSPFv3 to discover and calculate routes in ASs. OSPFv3 is applicable to a large-scale network that consists of hundreds of routers.
OSPFv3 uses the same implementation mechanism as OSPFv2 but is not compatible with
6.2 OSPFv3 Features Supported by S9300
The S9300 supports various OSPFv3 features, including multi-process and GR.
6.3 Configuring Basic OSPFv3 Functions
Before building OSPFv3 networks, you need to configure basic OSPFv3 functions.
6.4 Establishing or Maintaining OSPFv3 Neighbor Relationship
By establishing and maintaining OSPFv3 neighbor relationships or adjacencies, you can build
6.6 Configuring OSPFv3 NSSA Areas
6.7 Configuring OSPFv3 Route Attributes
6.8 Controlling OSPFv3 Routing Information
6.9 Optimizing an OSPFv3 Network
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
236
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 6 OSPFv3 Configuration
6.11 Configuring the Network Management Function of OSPFv3
OSPFv3 supports the network management function. You can bind the OSPFv3 MIB to a certain
Maintaining OSPFv3 and Debugging OSPFv3 involve resetting OSPFv3.
This section provides several configuration examples of OSPFv3.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
237
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 6 OSPFv3 Configuration
6.1 OSPFv3
OSPFv3 uses the same implementation mechanism as OSPFv2 but is not compatible with
OSPFv2.
The Open Shortest Path First Version 3.0 (OSPFv3) supports the version 6 of the Internet
Protocol (IPv6). OSPFv3 conforms to RFC 2740 (OSPF for IPv6).
OSPFv3 and OSPFv2 have the following in common: l 32-bit Router ID, Area ID, and Link State Advertisement (LSA) link-state ID l Five types of packets such as Hello, Database Description (DD), Link State Request (LSR),
Link State Update (LSU), and Link State Acknowledgement (LSAck) packets l Neighbor discovery and adjacency establishment mechanisms l Flooding and aging mechanisms of LSAs l LSA types
OSPFv3 and OSPFv2 differ as follows: l OSPFv3 runs based on a link; OSPFv2 runs based on a network segment.
l OSPFv3 can run multiple instances on the same link.
l The topology of OSPFv3 is independent of IPv6 address prefixes.
l OSPFv3 identifies its neighbors with the IPv6 link-local addresses.
l
OSPFv3 has three new types of LSA flooding scopes.
6.2 OSPFv3 Features Supported by S9300
The S9300 supports various OSPFv3 features, including multi-process and GR.
The S9300 supports the following OSPFv3 features: l Basic features stipulated in RFC 2740 l OSPFv3 stub areas l
OSFPv3 multi-process l Multiple OSPFv3 processes can run on a switch.
l OSPFv3 GR
– If a switch restarts or performs the active/standby switchover, it directly ages all the entries in the Forward Information Base (FIB). This interrupts the routing. The neighboring switches remove the switch from the neighbor list and inform other switches of the switch failure. Then, SPF needs to be calculated again. If the switch recovers after a short period of time, the neighbor relationship becomes unstable. This results in route flapping.
–
If a switch restarts because of abnormalities, you can enable OSPFv3 Graceful Restart
(GR) to avoid service interruption during the restart of the switch.
6.3 Configuring Basic OSPFv3 Functions
Before building OSPFv3 networks, you need to configure basic OSPFv3 functions.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
238
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 6 OSPFv3 Configuration
6.3.1 Establishing the Configuration Task
You need to enable OSPFv3 and specify interfaces and area IDs before configuring other functions.
Applicable Environment
Enable the OSPFv3 process and specify its router ID before configuring OSPFv3; otherwise, other functions cannot take effect.
You must enable OSPFv3 and specify the interface and area ID before configuring other functions. OSPFv3 configurations, however, are independent of interface-related features.
Pre-configuration Tasks
Before configuring basic OSFPv3 functions, complete the following tasks: l Making the network layers of the adjacent nodes accessible l Enabling IPv6 capabilities
Data Preparation
To configure basic OSPFv3 functions, you need the following data.
2
3
No.
Data
1 Router ID
OSPFv3 process ID
Interfaces on which OSPFv3 needs to be enabled and their areas
6.3.2 Enabling OSPFv3
Creating an OSPFv3 process is a prerequisite for configuring all OSPFv3 features. By creating an OSPFv3 process, you can manually specify the router ID for a router.
Context
OSPFv3 supports multiple processes. Multiple OSPFv3 processes running on one switch are differentiated by process IDs. OSPFv3 process ID is set when OSPFv3 is enabled and is only locally valid. It does not affect the packet exchange with other switches.
In the format of an IPv4 address, a router ID is a 32-bit unsigned integer that uniquely identifies a switch within an AS. The router ID of OSPFv3 must be manually set. If no router ID is set,
OSPFv3 fails to run normally.
When manually setting the router ID, ensure that the router IDs of any two switches in an AS are different. When multiple processes are enabled on a switch, it is necessary to specify a unique route ID for each process.
To ensure the stable running of OSPFv3, you need to allocate router IDs and set them in network planning.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
239
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
6 OSPFv3 Configuration
Do as follows on the switch that runs OSPFv3.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
ospfv3 [ process-id ] [ vpn6-instance vpn-instance-name ]
OSPFv3 is enabled and the OSPFv3 view is displayed.
Step 3 Run:
router-id router-id
A Router ID is set.
----End
6.3.3 Enabling OSPFv3 on an Interface
For an interface with multiple instances, you need to specify which instance of the interface is enabled in the OSPFv3 process when enabling OSPFv3 on the interface.
Context
After enabling OSPFv3 in the system view, you need to enable OSPFv3 on the interface.
Because an interface has multiple instances, you need to specify which instance of the interface is enabled in the OSPFv3 process when OSPFv3 is enabled on the interface. If no instance ID is specified, the value defaults to 0. The same instance must be enabled on the interfaces between which the neighbor relationship is set up.
Do as follows on the switch that runs OSPFv3.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
interface vlanif vlan-id
The VLANIF interface view is displayed.
Step 3 (Optional) Run the ospfv3 network-type { broadcast | nbma | p2mp [ non-broadcast ] |
p2p } [ instance instance-id ] command to configure the network type of an interface.
When an interface supports multi-instances, you must specify the value of instance-id when enabling OSPFv3 on the interface. If the value of instance-id is not specified, the default value
0 is adopted. In this case, the configured network type of an interface mismatches the actual network type of the interface. This step is mandatory in such a case.
Step 4 Run:
Issue 01 (2011-10-26) 240
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 6 OSPFv3 Configuration
ospfv3 process-id area area-id [ instance instance-id ]
OSPFv3 is enabled on the VLANIF interface.
The area ID can be a decimal integer or in the IPv4 address format, but it is displayed in the IPv4 address format.
----End
6.3.4 Entering the OSPFv3 Area View
By dividing an AS into different areas, specifying OSPFv3 interfaces, and specifying areas to which these interfaces belong, OSPFv3 can discover and calculate routes in an AS.
Context
You must configure the switches in the same area based on the area. Otherwise, the neighbor switches cannot exchange information with each other. The congestion of routing information or routing loop is thus caused.
Do as follows on the switch that runs OSPFv3.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
ospfv3 [ process-id ]
The OSPFv3 view is displayed.
Step 3 Run:
area area-id
The OSPFv3 area view is displayed.
The area ID can be a decimal integer or in the IPv4 address format, but it is displayed in the IPv4 address format.
An OSPFv3 area cannot be deleted directly. Only after all the configurations in the area view are removed and the status of the related interfaces in this area become Down, this area is automatically removed.
----End
6.3.5 Checking the Configuration
After basic OSPFv3 functions are configured, you can check OSPFv3 brief information, LSDB information, neighbor information, and OSPFv3 routing table.
Prerequisite
The configurations of the Basic OSPFv3 Functions are complete.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
241
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Procedure
6 OSPFv3 Configuration l Run the display ospfv3 [ process-id ] command to check the summary information about the OSPFv3 process.
l Run the display ospfv3 interface [ area area-id ] [ interface-type interface-number ] command to check the OSPFv3 interface information.
l Run the commands as follow to check the LSDB information about OSPFv3:
–
display ospfv3 [ process-id ] lsdb [ area area-id ] [ originate-router advertising-
router-id | self-originate ] [ { router | network | inter-router [ asbr-router asbr-
router-id ] | { inter-prefix | nssa } [ ipv6-address prefix-length ] | link | intra-prefix |
grace } [ link-state-id ] ]
–
display ospfv3 [ process-id ] lsdb [ originate-router advertising-router-id | self-
originate ] external [ ipv6-address prefix-length ] [ link-state-id ] l Run the display ospfv3 [ process-id ] [ area area-id ] peer [ interface-type interface-
number [ verbose ] | neighbor-id ] command to check the information about the OSPFv3 neighbor.
l Run the commands as follow to check the OSPFv3 routing table:
– display ospfv3 [ process-id ] routing uninstalled
– display ospfv3 [ process-id ] routing [ abr-routes | asbr-routes | statistics
[ uninstalled ] | ipv6-address prefix-length | intra-routes | inter-routes | ase-routes |
nssa-routes ] l Run the display ospfv3 [ process-id ] path command to check the paths to a destination adress.
l Run the display default-parameter ospfv3 command to check the default OSPFv3 configuration.
----End
6.4 Establishing or Maintaining OSPFv3 Neighbor
Relationship
By establishing and maintaining OSPFv3 neighbor relationships or adjacencies, you can build
OSPFv3 networks.
6.4.1 Establishing the Configuration Task
When setting parameters on an interface, ensure that these parameters are consistent with those on the adjacent router.
Applicable Environment
In applications, establishing or maintaining the OSPFv3 neighbor relationship is a premise for the construction of an OSPFv3 network. After the configuration in this section, you can: l Adjust the convergence speed of the OSPFv3 network and network load posed by protocol packets by modifying OSPFv3 timers.
l Enable OSPFv3 to be disconnected from its neighbor when the number of OSPFv3 packet retransmissions exceeds the threshold by configuring Retransmission Limitation for OSPF
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
242
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 6 OSPFv3 Configuration
(RL-OSPF) of OSPFv3. This prevents non-stop packet retransmissions if the neighbor does not receive packets.
l Speed up the convergence of an OSPFv3 network by adjusting the intervals for updating and receiving LSAs.
Pre-configuration Tasks
Before establishing or maintaining the OSPFv3 neighbor relationship, complete the following tasks: l Enabling IPv6 capability l
Configuring Basic OSPFv3 Functions
Data Preparation
To establish or maintain the OSPFv3 neighbor relationship, you need the following data.
2
3
No.
Data
1 Interval for sending Hello packets
4
Dead time of the neighbor relationship
Interval for retransmitting LSAs to adjacent routers
Delay in sending LSAs
6.4.2 Configuring the Interval for Sending Hello Packets
By adjusting the Hello interval set on OSPFv3 neighbors, you can change the speed of establishing the neighbor relationship, thus changing the speed of network convergence.
Context
Hello packets are periodically sent to the neighbor switch to detect and maintain the neighbor relationship and to elect the DR and the BDR. RFC 2328 requires that the Hello timer values of neighbors be consistent. The value of the Hello timer is inversely proportional to the route convergence speed and network load.
Do as follows on the switch that runs OSPFv3.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
interface vlanif interface-number
The interface view is displayed.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
243
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
6 OSPFv3 Configuration
Step 3 Run:
ospfv3 timer hello interval [ instance instance-id ]
The interval for sending Hello packets is set on the interface.
----End
6.4.3 Configuring Dead Time of Neighbor Relationship
If a router does not receive a Hello packet from its neighbor within the Holddown time, the router considers the neighbor relationship invalid.
Context
If a switch does not receive any Hello packet from its neighbor during a specified period, the neighbor switch is considered invalid. The specified period is called the dead time of the neighbor relationship. The dead time must be at least four times the Hello interval on an interface.
Do as follows on the switch that runs OSPFv3.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
interface vlanif interface-number
The interface view is displayed.
Step 3 Run:
ospfv3 timer dead interval [ instance instance-id ]
The dead time of the neighbor relationship is specified.
----End
6.4.4 Configuring the Interval for Retransmitting LSAs to
Neighboring Switches
After a switch sends an LSA to its neighbor, the switch expects to receive an LSAck packet from its neighbor. If the router does not receive an LSAck packet within the LSA retransmission interval, it retransmits the LSA to the neighbor.
Context
Do as follows on the switch that runs OSPFv3.
Procedure
Step 1 Run:
system-view
Issue 01 (2011-10-26) 244
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 6 OSPFv3 Configuration
The system view is displayed.
Step 2 Run:
interface vlanif interface-number
The interface view is displayed.
Step 3 Run:
ospfv3 timer retransmit interval [ instance instance-id ]
The interval for retransmitting LSAs to the adjacent routers is set.
The value of seconds must be greater than the time taken to transmit a packet between two switches.
NOTE
Do not set a value which is too small, for the interval between LSA retransmissions. Otherwise, unnecessary retransmissions may occur.
----End
6.4.5 Configuring the Delay for Transmitting LSAs on the Interface
It takes time to transmit OSPFv3 packets on a link. Therefore, a certain delay is added to the aging time of an LSA before the LSA is sent.
Context
The LSA ages out in the LSDB of a local switch instead of in the transmission process. You need to set the delay for an LSA before sending it. For a low-speed network, this configuration is necessary.
Do as follows on the switch that runs OSPFv3.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
interface vlanif interface-number
The interface view is displayed.
Step 3 Run:
ospfv3 trans-delay interval [ instance instance-id ]
The delay in transmitting LSAs on the interface is set.
----End
6.4.6 Checking the Configuration
After OSPFv3 neighbor relationships or adjacencies are stable, you can check OSPFv3 interface information and neighbor information.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
245
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Prerequisite
6 OSPFv3 Configuration
The configurations of the Establishing or Maintaining OSPFv3 Neighbor Relationship are complete.
Procedure
l Run the display ospfv3 interface [ area area-id ] [ interface-type interface-number ] command to check the OSPFv3 interface information.
----End
6.5 Configuring OSPFv3 Areas
OSPFv3 supports stub areas and virtual links, the principle and applicable environment of which are similar to those in OSPFv2.
6.5.1 Establishing the Configuration Task
Configuring a stub area is optional. Not all areas can be configured as stub areas. Generally, a stub area, which is located at the AS boundary, is a non-backbone area with only one ABR.
Applicable Environment
To reduce the number of LSAs in the network and enhance OSPFv3 extensibility, define OSPFv3 areas. For some non-backbone areas at the edge of ASs, you can define them as stub areas for further reducing the size of the routing table and the number of LSAs.
Pre-configuration Tasks
Before configuring OSPFv3 area attributes, complete the following tasks: l Enabling IPv6 capability l
Configuring Basic OSPFv3 Functions
Data Preparation
To configure OSPFv3 area attributes, you need the following data.
No.
Data
1 Areas to be defined as stub areas
2 Metrics of default routes sent to stub areas
6.5.2 Configuring OSPFv3 Stub Areas
A stub area is a special area in which ABRs do not flood the received AS external routes. Thus, the number of LSAs is greatly reduced.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
246
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 6 OSPFv3 Configuration
Context
Do as follows on each switch that runs OSPFv3 in the stub area:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
ospfv3 [ process-id ]
The OSPFv3 view is displayed.
Step 3 Run:
area area-id
The OSPFv3 area view is displayed.
Step 4 Run:
stub [ no-summary ]
The area is configured as a stub area.
Step 5 (Optional) Run:
default-cost cost
The cost of the default route sent to the stub area is set.
By default, the cost of the default route sent to the stub area is 1.
This command is configured on the ABR of the stub area only to set the cost of the default route to be sent to the stub area. This command does not need to be configured on other switches in the stub area.
The parameter no-summary takes effect only when the stub command is configured on the
ABR. If this parameter is configured, the ABR only sends the summary-LSA of a default route to the stub area without originating other summary-LSAs. The stub area without AS-external-
LSAs or Summary-LSAs is called a totally stub area.
----End
6.5.3 Configuring OSPFv3 Virtual Links
You can establish the logical connectivity between backbone areas and the non-backbone areas that are not physically connected to the backbone area.
Context
After OSPFv3 areas are defined, OSPFv3 route update between non-backbone areas is implemented through a backbone area. Then, OSPFv3 requires that all non-backbone areas should maintain the connectivity with the backbone area and the backbone area should maintain its own connectivity. In actual applications, this requirement may not be met because of some restrictions. To solve this problem, you can configure OSPFv3 virtual links.
A virtual link must be configured at both ends of the link; otherwise, it does not take effect.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
247
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 6 OSPFv3 Configuration
Do as follows on the switch that runs OSPFv3.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
ospfv3 [ process-id ]
The OSPFv3 view is displayed.
Step 3 Run:
area area-id
The OSPFv3 area view is displayed.
Step 4 Run:
vlink-peer router-id [ hello hello-interval | retransmit retransmit-interval |
trans-delay trans-delay-interval | dead dead-interval | | instance instance-id ]
*
A virtual link is created and configured.
----End
6.5.4 Checking the Configuration
After OSPFv3 area attributes are configured, you can check the OSPFv3 LSDB, routing table, and virtual links.
Prerequisite
The configurations of the OSPFv3 Areas are complete.
Procedure
l Run the commands as follow to check the LSDB information about OSPFv3:
–
display ospfv3 [ process-id ] lsdb [ area area-id ] [ originate-router advertising-
router-id | self-originate ] [ { router | network | inter-router [ asbr-router asbr-
router-id ] | { inter-prefix | nssa } [ ipv6-address prefix-length ] | link | intra-prefix |
grace } [ link-state-id ] ]
–
display ospfv3 [ process-id ] lsdb [ originate-router advertising-router-id | self-
originate ] external [ ipv6-address prefix-length ] [ link-state-id ] l Run the commands as follow to check the OSPFv3 routing table:
– display ospfv3 [ process-id ] routing uninstalled
–
display ospfv3 [ process-id ] routing [ abr-routes | asbr-routes | statistics
[ uninstalled ] | ipv6-address prefix-length | intra-routes | inter-routes | ase-routes |
nssa-routes ] l Run the display ospfv3 [ process-id ] vlink command to check the information about
OSPFv3 virtual links.
----End
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
248
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 6 OSPFv3 Configuration
6.6 Configuring OSPFv3 NSSA Areas
By configuring areas as NSSA areas, external routes can be imported, and a new type of LSA, namely, Type 7 NSSA LSA is introduced.
6.6.1 Establishing the Configuration Task
NSSAs are introduced because stub areas cannot import external routes. An NSSA allows the transmission of Type 7 LSAs.
Applicable Environment
An NSSA allows the transmission of Type 7 LSAs, which are generated by ASBRs in an NSSA.
The Type 7 LSAs converting into Type 5 LSAs in the NSSA and advertised to other areas.
Pre-configuration Tasks
Before configuring an OSPFv3 NSSA, complete the following tasks: l Configuring IP addresses for interfaces to make neighboring nodes reachable l
Configuring basic OSPFv3 functions
Data Preparation
To configure an OSPFv3 NSSA, you need the following data.
No.
Data
1 Cost of the default route sent to an NSSA
6.6.2 Defining the Current Area to Be an NSSA Area
Derived from a stub area, an NSSA allows AS external routes to be imported; an ASBR advertises Type 7 NSSA LSAs in the local NSSA.
Context
Do as follows on the OSPFv3 router:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
ospfv3 [ process-id ]
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
249
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 6 OSPFv3 Configuration
The OSPFv3 process view is displayed.
Step 3 Run:
area area-id
The OSPFv3 area view is displayed.
Step 4 Run:
nssa [ default-route-advertise [ cost cost | type type | tag tag ]
*
| no-import-
route | no-summary | translator-always | translator-interval translator-interval |
set-n-bit ]
*
An area is configured as an NSSA.
----End
Follow-up Procedure
To connect switches to an NSSA, you need to run the nssa command to configure NSSA attributes for the area to which the switches belong.
The area may be updated after NSSA attributes are configured or deleted. Thus, the NSSA attributes can be re-configured or deleted only after the last update of NSSA attributes is complete.
6.6.3 Checking the Configuration
After OSPFv3 NSSAs are configured, you can check OSPFv3 routing table information.
Prerequisite
The configurations of OSPFv3 NSSAs are complete.
Procedure
l Run the display ospfv3 area command to check information about OSPFv3 areas.
l
Run the commands as follow to check the OSPFv3 routing table.
– display ospfv3 [ process-id ] routing uninstalled
–
display ospfv3 [ process-id ] routing [ abr-routes | asbr-routes | statistics
[ uninstalled ] | ipv6-address prefix-length | intra-routes | inter-routes | ase-routes |
nssa-routes ]
----End
6.7 Configuring OSPFv3 Route Attributes
By setting OSPFv3 route attributes, you can change OSPFv3 routing policies to meet the requirements of complex networks.
6.7.1 Establishing the Configuration Task
Before configuring OSPFv3 route attributes, familiarize yourself with the applicable environment, complete pre-configuration tasks, and obtain the required data. This can help you complete the configuration task quickly and accurately.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
250
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 6 OSPFv3 Configuration
Applicable Environment
In actual applications, to meet the requirements of a complicated networking environment, you can change OSPFv3 routing policies by configuring OSPFv3 route attributes. Through the following procedures, you can: l Set the cost on the OSPFv3 interface.
l Configure load balancing among equal-cost routes.
Pre-configuration Tasks
Before configuring OSPFv3 route attributes, complete the following tasks: l Enabling IPv6 capability l
Configuring Basic OSPFv3 Functions
Data Preparation
To configure OSPFv3 route attributes, you need the following data.
No.
Data
1 Link cost
2 Maximum number of equal-cost routes
6.7.2 Setting the Cost of the OSPFv3 Interface
OSPFv3 can automatically calculate the link cost for an interface according to the interface bandwidth. You can also set the link cost for the interface by using the related command.
Context
You can control route calculation by setting the link cost of OSPFv3 on different interfaces.
Do as follows on the switch that runs OSPFv3.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
interface vlanif interface-number
The interface view is displayed.
Step 3 Run:
ospfv3 cost cost [ instance instance-id ]
The cost is set on the OSPFv3 interface.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
251
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 6 OSPFv3 Configuration
By default, the link cost on an OSPFv3 interface is 1.
----End
6.7.3 Setting the Maximum Number of Equal-Cost Routes
If the destinations and costs of the multiple routes discovered by one routing protocol are the same, load balancing can be performed among these routes.
Context
Do as follows on the switch that runs OSPFv3:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
ospfv3 [ process-id ]
The OSPFv3 view is displayed.
Step 3 Run:
maximum load-balancing number
The maximum number of equal-cost routes is set.
The value is an integer ranging from 1 to 3. The default value is 3.
----End
6.7.4 Checking the Configuration
After OSPFv3 route attributes are configured, you can check the OSPFv3 interface, LSDB, and routing table.
Prerequisite
The configurations of the OSPFv3 Route Attributes are complete.
Procedure
l Run the display ospfv3 interface [ area area-id ] [ interface-type interface-number ] command to check the OSPFv3 interface information.
l Run the commands as follow to check the LSDB information about OSPFv3:
–
display ospfv3 [ process-id ] lsdb [ area area-id ] [ originate-router advertising-
router-id | self-originate ] [ { router | network | inter-router [ asbr-router asbr-
router-id ] | { inter-prefix | nssa } [ ipv6-address prefix-length ] | link | intra-prefix |
grace } [ link-state-id ] ]
–
display ospfv3 [ process-id ] lsdb [ originate-router advertising-router-id | self-
originate ] external [ ipv6-address prefix-length ] [ link-state-id ] l Run the commands as follow to check the OSPFv3 routing table:
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
252
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 6 OSPFv3 Configuration
– display ospfv3 [ process-id ] routing uninstalled
– display ospfv3 [ process-id ] routing [ abr-routes | asbr-routes | statistics
[ uninstalled ] | ipv6-address prefix-length | intra-routes | inter-routes | ase-routes |
nssa-routes ]
----End
6.8 Controlling OSPFv3 Routing Information
This section describes how to control OSPF routing information. Detailed operations include configuring route aggregation, filtering the received routes, and importing external routes.
6.8.1 Establishing the Configuration Task
Before controlling OSPFv3 routing information, familiarize yourself with the applicable environment, complete pre-configuration tasks, and obtain the required data. This can help you complete the configuration task quickly and accurately.
Applicable Environment
Through the configuration in this section, you can control the advertising and receiving of
OSPFv3 routing information and configure OSPFv3 to import external routes.
Pre-configuration Tasks
Before controlling OSPFv3 routing information, complete the following tasks: l Enabling IPv6 capability l
Configuring Basic OSPFv3 Functions
Data Preparation
To control OSPFv3 routing information, you need the following data.
4
5
2
3
No.
Data
1 Prefix of IPv6 routes after aggregation
Filtering list or name used to filter routing information
Link cost on an OSPFv3 interface
Maximum number of equal-cost routes
Name, process ID, and metric of external routes to be imported
6.8.2 Configuring OSPFv3 Route Aggregation
An ABR can summarize routes with the same prefix into one LSA and advertise the summarized route in other areas. This can reduce the size of the LSDB in other areas.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
253
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
6 OSPFv3 Configuration
Context
If multiple continuous network segments exist in this area, use the abr-summary command to summarize them into one network segment. In this way, the ABR only sends an LSA after summarization. No LSA that belongs to the summarization network segment is separately transmitted, thus reducing the LSDB size of other areas.
Procedure
l Configure route summarization on an ABR.
Do as follows on the ABR that runs OSPFv3:
1.
Run:
system-view
The system view is displayed.
2.
Run:
ospfv3 [ process-id ]
The OSPFv3 view is displayed.
3.
Run:
area area-id
The OSPFv3 area view is displayed.
4.
Run:
abr-summary ipv6-address prefix-length [ not-advertise ]
Route summarization is configured in the OSPFv3 area.
If not-advertise is set, no routing information of the network segment is advertised.
----End
6.8.3 Configuring OSPFv3 to Filter the Received Routes
By configuring filtering conditions for routing information, you can allow only the routes that pass the filtering to be received or advertised.
Context
After receiving LSAs, OSPFv3 determines whether to add the calculated routes to the local routing table according to the filtering policy.
Do as follows on the switch that runs OSPFv3.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
ospfv3 [ process-id ]
Issue 01 (2011-10-26) 254
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 6 OSPFv3 Configuration
The OSPFv3 view is displayed.
Step 3 Run:
filter-policy { acl6-number | acl6-name acl6-name | ipv6-prefix ipv6-prefix-name }
import
OSPFv3 is configured to filter the imported routes.
----End
6.8.4 Configuring OSPFv3 to Import External Routes
Importing the routes discovered by other routing protocols can enrich OSPFv3 routing information.
Context
Because OSPFv3 is a link state-based routing protocol and cannot directly filter the advertised
LSAs, OSPFv3 must filter the routes when importing them. Then, only the routes that pass the filtering can be advertised.
Do as follows on the switch that runs OSPFv3.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
ospfv3 [ process-id ]
The OSPFv3 view is displayed.
Step 3 Run:
default { cost cost | tag tag | type type }
*
The default cost of the imported route is set.
Step 4 Run:
import-route protocol [ process-id ] [ cost cost | type type | tag tag | route-
policy route-policy-name ]
*
External routes are imported.
Step 5 (Optional) Run:
default-route-advertise [ always | cost cost | type type | tag tag | route-policy
route-policy-name ]
*
Default routes are advertised to the OSPFv3 route area.
Step 6 (Optional) Run:
filter-policy { acl6-number | acl6-name acl6-name | ipv6-prefix ipv6-prefix-name }
export [ protocol [ process-id ] ]
The imported external routes are filtered.
After you run the import-route command on an OSPFv3 router to import external routes, the switch becomes an ASBR.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
255
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 6 OSPFv3 Configuration
You can configure OSPFv3 to filter a certain type of routing information by specifying the
protocol. If protocol is not specified, OSPFv3 filters all the imported routes.
NOTE
The filter-policy command takes effect only on the routes imported through the import-route command by the ASBR, that is, filters the imported routes. The routes that are filtered out do not generate LSAs and cannot be advertised by OSPFv3. If the import-route command is not configured to import other external routes (including OSPFv3 routes in different processes), the filter-policy command does not takes effect.
----End
6.8.5 Checking the Configuration
After OSPFv3 route attributes are configured, you can check the OSPFv3 interface, LSDB, and routing table.
Prerequisite
The configurations of Controlling OSPFv3 Routing Information are complete.
Procedure
l Run the commands as follow to check the OSPFv3 route aggregation:
– display ospfv3 [ process-id ] abr-summary-list [ ipv6-address prefix-length ] l Run the commands as follow to check the LSDB information about OSPFv3:
– display ospfv3 [ process-id ] lsdb [ area area-id ] [ originate-router advertising-
router-id | self-originate ] [ { router | network | inter-router [ asbr-router asbr-
router-id ] | { inter-prefix | nssa } [ ipv6-address prefix-length ] | link | intra-prefix |
grace } [ link-state-id ] ]
–
display ospfv3 [ process-id ] lsdb [ originate-router advertising-router-id | self-
originate ] external [ ipv6-address prefix-length ] [ link-state-id ] l Run the commands as follow to check the OSPFv3 routing table:
– display ospfv3 [ process-id ] routing uninstalled
–
display ospfv3 [ process-id ] routing [ abr-routes | asbr-routes | statistics
[ uninstalled ] | ipv6-address prefix-length | intra-routes | inter-routes | ase-routes |
nssa-routes ]
----End
6.9 Optimizing an OSPFv3 Network
By configuring OSPFv3 functions in special network environments, you can adjust and optimize the OSPFv3 network performance.
6.9.1 Establishing the Configuration Task
Before optimizing an OSPFv3 network, familiarize yourself with the applicable environment, complete pre-configuration tasks, and obtain the required data. This can help you complete the configuration task quickly and accurately.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
256
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 6 OSPFv3 Configuration
Applicable Environment
By adjusting the OSPFv3 timer, you can change the convergence speed of an OSPFv3 network and the network overload caused by protocol packets. On low-speed links, you need to consider the delay in transmitting LSAs on the interface. By adjusting the SPF calculation interval, you can mitigate resource consumption due to frequent network changes.
You can specify the DR priority of an interface to affect the DR/BDR election in a broadcast network.
Pre-configuration Tasks
Before optimizing an OSPFv3 network, complete the configuration tasks: l
Enabling IPv6 capability l
Configuring Basic OSPFv3 Functions
Data Preparation
To optimize an OSPF network, you need the following data.
2
3
No.
Data
1 Values of OSPFv3 timers
Values of SPF timers
DR priority of the interface
6.9.2 Configuring the SPF Timer
By setting the interval for SPF calculation, you can reduce resource consumption caused by frequent network changes.
Context
Whenever the LSDB of OSPFv3 changes, the shortest path should be recalculated. Calculating the shortest path each time the LSDB changes consumes enormous resources and lowers the efficiency of a switch.
Adjusting the SPF delay and hold interval can suppress frequent network changes to avoid resource consumption.
Do as follows on the switch that runs OSPFv3.
Procedure
l Configure an SPF normal timer.
Do as follows on the switch that runs OSPFv3:
1.
Run:
system-view
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
257
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 6 OSPFv3 Configuration
The system view is displayed.
2.
Run:
ospfv3 [ process-id ]
The OSPFv3 view is displayed.
3.
Run:
spf timers delay-interval hold-interval
An SPF normal timer is configured.
----End
6.9.3 Suppressing an Interface from Sending and Receiving OSPFv3
Packets
By suppressing the OSPFv3 interface from receiving and sending OSPFv3 packets, you can prevent routers on a certain network from obtaining OSPFv3 routing information and prevent the local router from receiving routing information from other routers.
Context
To prevent a switch from advertising routes to the switch on a certain network and from importing the routes of other switches, you can suppress the interface on which OSPFv3 is enabled from receiving and sending OSPFv3 packets.
Do as follows on the switch that runs OSPFv3.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
ospfv3 [ process-id ]
The OSPFv3 view is displayed.
Step 3 Run:
silent-interface interface-type interface-number
The interface is suppressed from sending and receiving OSPFv3 packets.
----End
Follow-up Procedure
Different processes can suppress the same interface from sending and receiving OSPFv3 packets, but the silent-interface command is valid only for the OSPFv3 interface on which the specified process is enabled, and does not take effect on the interface of other processes.
After an OSPFv3 interface is set to be silent, the interface can still advertise its direct routes through the Intra-Area-Prefix-LSA of the same router. No OSPFv3 neighbor relationship can be set up on the interface. Therefore, the OSPFv3 adaptability is enhanced.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
258
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 6 OSPFv3 Configuration
6.9.4 Configuring DR Priority of an Interface
When configuring a broadcast network or an NBMA network, you can specify the DR priority for each interface to change the results of DR/BDR election on the network.
Context
The DR priority on a switch interface qualifies the interface for the DR election. If the DR priority is 0, the switch cannot be elected as a DR or BDR.
Do as follows on the switch that runs OSPFv3.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
interface vlanif interface-number
The interface view is displayed.
Step 3 Run:
ospfv3 dr-priority priority [ instance instance-id ]
The DR priority of the interface is set.
----End
Follow-up Procedure
After the DR priority is changed, you can re-elect a DR or BDR through the following methods, which, however, will result in the interruption of the OSPFv3 neighbor relationship between switches and therefore are used only when necessary.
l Restarting all switches.
l Running the shutdown and undo shutdown commands on the interface on which the
OSPFv3 neighbor relationship is set up.
6.9.5 Configuring Stub Routers
When a router has a heavy load and cannot forward any other packets, you can configure it as a stub router. After the router is configured as a stub router, other OSPF routers do not use this router to forward data but they can have a route to this stub router.
Context
A stub router is used to control traffic. It notifies OSPFv3 routers not to forward data by the stub router, but they can have a route to the stub router.
Do as follows on the switch that runs OSPFv3:
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
259
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 6 OSPFv3 Configuration
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
ospfv3 [ process-id ]
The OSPFv3 process view is displayed.
Step 3 Run:
stub-router [ on-startup [ interval ] ]
The stub router is configured.
NOTE
There is no correlation between the stub router configured through this command and the router in the stub area.
----End
6.9.6 Ignoring MTU Check on DD Packets
By disabling an interface from checking the MTU field in the received DD packet, you can enable an OSPFv3 router to receive the packet with the MTU field being 0.
Context
Do as follows on the switch that runs OSPFv3:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
interface vlanif interface-number
The interface view is displayed.
Step 3 Run:
ospfv3 mtu-ignore [ instance instance-id ]
The MTU check on DD packets is ignored.
After the command is used, the interface does not check the MTU field of a received DD packet.
----End
6.9.7 Checking the Configuration
After an OSPFv3 network is optimized, you can check the OSPFv3 interface, LSDB, and routing table.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
260
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Prerequisite
The configurations of Optimizing an OSPFv3 Network are complete.
6 OSPFv3 Configuration
Procedure
l Run the display ospfv3 interface [ area area-id ] [ interface-type interface-number ] command to check the OSPFv3 interface information.
l
Run the commands as follow to check the LSDB information about OSPFv3:
– display ospfv3 [ process-id ] lsdb [ area area-id ] [ originate-router advertising-
router-id | self-originate ] [ { router | network | inter-router [ asbr-router asbr-
router-id ] | { inter-prefix | nssa } [ ipv6-address prefix-length ] | link | intra-prefix |
grace } [ link-state-id ] ]
– display ospfv3 [ process-id ] lsdb [ originate-router advertising-router-id | self-
originate ] external [ ipv6-address prefix-length ] [ link-state-id ] l Run the commands as follow to check the OSPFv3 routing table:
– display ospfv3 [ process-id ] routing uninstalled
–
display ospfv3 [ process-id ] routing [ abr-routes | asbr-routes | statistics
[ uninstalled ] | ipv6-address prefix-length | intra-routes | inter-routes | ase-routes |
nssa-routes ]
----End
6.10 Configuration OSPFv3 GR
By configuring OSPFv3 GR, you can avoid inaccurate route calculation and packet loss after an OSPFv3 router restarts.
6.10.1 Establishing the Configuration Task
By default, the OSPFv3 GR capability and Helper capability are disabled.
Applicable Environment
To prevent route flapping and service interruption due to the restart of OSPFv3, you can enable
OSPFv3 GR.
After OSPFv3 restarts, the GR restarter and the GR helper keep the neighbor relationship, exchange routing information, synchronize the database, and update the routing table and the forwarding table. OSPFv3 fast convergence is thus realized.
Pre-configuration Tasks
Before configuring OSPFv3 GR, complete the following task: l
Configuring Basic OSPFv3 Functions
Data Preparation
To optimize an OSPF network, you need the following data.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
261
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 6 OSPFv3 Configuration
No.
Data
1 OSPFv3 process ID
2 Filtering rule of the helper mode of OSPFv3 peers
6.10.2 Enabling OSPFv3 GR
After an OSPFv3 process restarts through GR, the Restarter and the Helper reestablish the neighbor relationship, exchange routing information, synchronize the LSDB, and update the routing table and forwarding table. This implements OSPFv3 fast convergence and stabilizes the network topology.
Context
Do as follows on the switch that runs OSPFv3:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
ospfv3 process-id
The OSPFv3 view is displayed.
Step 3 Run:
graceful-restart [ period period | ack-time time | retransmit-interval interval |
lsa-checking-ignore | planned-only ]
*
OSPFv3 GR is enabled.
By default, OSPFv3 GR is disabled.
ack-time is optional. After ack-time is specified, the restarter can discover more neighbors in the time period.
----End
6.10.3 Enabling the Helper of OSPFv3 GR
The GR Helper, which is a neighbor of the GR Restarter, can identify GR signaling, maintain the adjacency with the Restarter during the active/standby switchover of the Restarter, and help the Restarter to restore the network topology.
Context
Do as follows on the switch that runs OSPFv3:
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
262
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 6 OSPFv3 Configuration
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
ospfv3 process-id
The OSPFv3 view is displayed.
Step 3 Run:
helper-role [ { ip-prefix ip-prefix-name | acl-number acl-number | acl-name acl-
name } | max-grace-period period | planned-only | lsa-checking-ignore ]
*
The helper of OSPFv3 GR is enabled.
By default, the helper of OSPFv3 GR is disabled.
----End
6.10.4 Check the Configuration
After OSPFv3 GR is configured, you can check GR information.
Prerequisite
The configurations of OSPFv3 GR are complete.
Procedure
l Run the display ospfv3 [ process-id ] graceful-restart-information command to check the status of OSPFv3 GR.
----End
Example
Run the display ospfv3 graceful-restart-information command, and you can view that the local switch is enabled with GR.
<Quidway> display ospfv3 graceful-restart-information
OSPFv3 Router with ID (0.0.0.0) (Process 1)
Graceful-restart capability : enabled
Graceful-restart support : planned and unplanned, strict lsa check
Grace-Period Configured : 120 Sec
Last Restart-exit Reason : none
Helper capability : enabled
Helper support : planned and unplanned, strict lsa check
Max Grace-Period Configured : 1800 Sec
Last Helper-exit Reason : none
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
263
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 6 OSPFv3 Configuration
6.11 Configuring the Network Management Function of
OSPFv3
OSPFv3 supports the network management function. You can bind the OSPFv3 MIB to a certain
OSPFv3 process.
6.11.1 Establishing the Configuration Task
Before configuring the network management function for OSPFv3, familiarize yourself with the applicable environment, complete pre-configuration tasks, and obtain the required data. This can help you complete the configuration task quickly and accurately.
Applicable Environment
OSPFv3 supports the network management function. You can bind OSPFv3 MIB and a certain
OSPFv3 process. In addition, OSPFv3 also supports the trap function and the log function.
Pre-configuration Tasks
Before configuring the network management function of OSPFv3, complete the following tasks: l Configuring IP addresses for interfaces to make neighboring nodes reachable l
Configuring Basic OSPFv3 Functions
Data Preparation
None.
6.11.2 Configuring OSPFv3 MIB Binding
The MIB is a virtual database of the device status maintained by the managed devices.
Context
When multiple OSPFv3 processes are enabled, you can configure OSPFv3 MIB to select the process to be processed, that is, that is, configure OSPFv3 MIB to select the process to which it is bound.
Do as follows on the OSPFv3 router.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
ospfv3 mib-binding process-id
OSPFv3 MIB binding is configured.
----End
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
264
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 6 OSPFv3 Configuration
6.11.3 Configuring OSPFv3 Trap
Traps are the notifications sent from a router to inform the NMS of the fault detected by the system.
Context
Do as follows on the OSPFv3 router.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
snmp-agent trap enable feature-name ospfv3 [ trap-name { ifconfigerror |
ifrxbadpacket | ifstatechange | nbrrestarthelperstatuschange | nbrstatechange |
nssatranslatorstatuschange | restartstatuschange | virtifconfigerror |
virtifrxbadpacket | virtifstatechange | virtnbrrestarthelperstatuschange |
virtnbrstatechange } ]
The trap function for the OSPFv3 module is enabled.
----End
6.11.4 Check the Configuration
After the network management function is configured for OSPFv3, you can check the contents of the information channel, and information recorded in the information center, log buffer, and trap buffer.
Prerequisite
The configurations of the Network Management Function of OSPFv3 are complete.
Procedure
l Run the display current-configuration command to check the configuration parameters currently validated on the switch.
----End
6.12 Maintaining OSPFv3
Maintaining OSPFv3 and Debugging OSPFv3 involve resetting OSPFv3.
6.12.1 Resetting OSPFv3
Restarting OSPFv3 can reset OSPFv3. In addition, you can reset OSPFv3 through GR.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
265
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Context
6 OSPFv3 Configuration
CAUTION
The OSPFv3 adjacency is removed when you reset the OSPFv3 connection by using the reset
ospfv3 command. So, confirm the action before you use the command.
After modifying the OSPFv3 routing policy or protocol, reset the OSPFv3 connection to validate the modification. To reset OSPFv3 connections, run the following reset ospfv3 command in the user view.
Procedure
l
To validate the new configuration, run the following commands:
– reset ospfv3 { process-id | all } [ graceful-restart [ extend-period period ] ]
–
reset ospfv3 { process-id | all } counters [ neighbor [ interface-type interface-
number ] [ router-id ] ]
----End
6.12.2 Debugging OSPFv3
Switches can generate debugging information after the debugging of a module is enabled in the user view. Debugging information shows the contents of the packets sent or received by the debugged module.
Context
CAUTION
Debugging affects the performance of the system. So, after debugging, run the undo debugging
all command to disable it immediately.
When an OSPFv3 fault occurs, run the following debugging commands in the user view to debug OSPFv3 and locate the fault.
For the procedure of displaying the debugging information, refer to the chapter "Information
Center Configuration" in the Quidway S9300 Terabit Routing Switch Configuration Guide -
System Management.
For the related debugging command, refer to the Quidway S9300 Terabit Routing Switch
Debugging Reference.
Procedure
Issue 01 (2011-10-26) l Run the debugging ospfv3 [ process-id ] event { abr | asbr | vlink | all } command in the user view to debug OSPFv3 events.
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
266
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 6 OSPFv3 Configuration l Run the debugging ospfv3 [ process-id ] ifsm [ status | event | timer ] command in the user view to debug the OSPFv3 interface status.
l Run the debugging ospfv3 [ process-id ] lsa { all | flooding | generate | install | maxage
| refresh } [ verbose ]command in the user view to debug OSPFv3 LSAs.
l Run the debugging ospfv3 [ process-id ] nfsm [ status | event | timer ] command in the user view to debug the OSPFv3 neighbor status.
l Run the command in the user view to debug OSPFv3 packets.
– debugging ospfv3 [ process-id ] packet all [ verbose ]
–
debugging ospfv3 [ process-id ] packet { hello | dd | request | update | ack }
[ verbose ] l Run the debugging ospfv3 [ process-id ] route [ ase | install | ia | nssa | spf ] command in the user view to debug the OSPFv3 route calculation.
----End
6.13 Configuration Examples
This section provides several configuration examples of OSPFv3.
6.13.1 Example for Configuring OSPFv3 Areas
Networking Requirements
, OSPFv3 is enabled on all Switches and the AS is divided into three
areas. Switch B and Switch C serve as ABRs to forward the inter-area routes.
You need to configure Area 2 as a stub area. The LSAs advertised to this area can thus be reduced, without affecting the reachability of routes.
Figure 6-1 Networking diagram for configuring an OSPFv3 area
SwitchB
GE1/0/0
VLANIF20
1001::1/64
VLANIF30
1000::1/64
GE2/0/0
Area 0
VLANIF30
1000::2/64
GE2/0/0
SwitchC
GE1/0/0
VLANIF40
1002::1/64
GE1/0/0
VLANIF20
1001::2/64
SwitchA
GE3/0/0
VLANIF10
2000::1/64
GE2/0/0
VLANIF40
1002::2/64
SwitchD
Area 2
Stub
Area 1
Device name Interface VLANIF interface IP address
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
267
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Switch A
Switch B
Switch B
Switch C
Switch C
Switch D
GE1/0/0
GE1/0/0
GE2/0/0
GE2/0/0
GE1/0/0
GE2/0/0
VLANIF 20
VLANIF 20
VLANIF 30
VLANIF 30
VLANIF 40
VLANIF 40
6 OSPFv3 Configuration
1001::2/64
1001::1/64
1000::1/64
1000::2/64
1002::1/64
1002::2/64
Configuration Roadmap
The configuration roadmap is as follows:
1.
Configure IPv6 addresses for interfaces.
2.
Enable the basic OSPFv3 functions on each Switch.
3.
Configure Area 2 as a stub area by running the stub command on all the Switches in Area
2 and check the OSPFv3 routing table of Switch D.
4.
Configure the Area 2 as a totally stub area and check the OSPFv3 routing table of Switch
D.
Data Preparation
To complete the configuration, you need the following data: l
IDs of the VLANs that the interfaces belong to, as shown in
l Router ID (1.1.1.1) of Switch A and area (Area 1) where Switch A is located l Router ID (2.2.2.2) of Switch B and areas (Area 0 and Area 1) where Switch B is located l Router ID (3.3.3.3) of Switch C and areas (Area 0 and Area 2) where Switch C is located l Router ID (4.4.4.4) of Switch D and area (Area 2) where Switch D is located
Procedure
Step 1 Add interfaces to VLANs.
<Quidway> system-view
[Quidway] sysname SwitchA
[SwitchA] vlan 20
[SwitchA-vlan20] quit
[SwitchA] interface GigabitEthernet 1/0/0
[SwitchA-GigabitEthernet1/0/0] port hybrid pvid vlan 20
[SwitchA-GigabitEthernet1/0/0] port hybrid untagged vlan 20
[SwitchA-GigabitEthernet1/0/0] quit
The configurations of Switch B, Switch C, Switch D are similar to the configuration of Switch
A and are not mentioned here.
Step 2 Assign IPv6 addresses to the VLANIF interfaces.
[SwitchA] ipv6
[SwitchA] interface vlanif 20
[SwitchA-Vlanif20] ipv6 enable
[SwitchA-Vlanif20] ipv6 address 1001::2/64
[SwitchA-Vlanif20] quit
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
268
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
6 OSPFv3 Configuration
The configurations of Switch B, Switch C, Switch D are similar to the configuration of Switch
A and are not mentioned here.
Step 3 Configure the basic OSPFv3 functions.
# Configure Switch A.
[Switch A] ospfv3
[Switch A-ospfv3-1] router-id 1.1.1.1
[Switch A-ospfv3-1] quit
[Switch A] interface vlanif 10
[Switch A-Vlanif10] ospfv3 1 area 1
[Switch A-Vlanif10] quit
[Switch A] interface vlanif 20
[Switch A-Vlanif20] ospfv3 1 area 1
[Switch A-Vlanif20] quit
# Configure Switch B.
[Switch B] ospfv3
[Switch B-ospfv3-1] router-id 2.2.2.2
[Switch B-ospfv3-1] quit
[Switch B] interface vlanif 20
[Switch B-Vlanif20] ospfv3 1 area 1
[Switch B-Vlanif20] quit
[Switch B] interface vlanif 30
[Switch B-Vlanif30] ospfv3 1 area 0
[Switch B-Vlanif30] quit
# Configure Switch C.
[Switch C] ospfv3
[Switch C-ospfv3-1] router-id 3.3.3.3
[Switch C-ospfv3-1] quit
[Switch C] interface vlanif 30
[Switch C-Vlanif30] ospfv3 1 area 0
[Switch C-Vlanif30] quit
[Switch C] interface vlanif 40
[Switch C-Vlanif40] ospfv3 1 area 2
[Switch C-Vlanif40] quit
# Configure Switch D.
[Switch D] ospfv3
[Switch D-ospfv3-1] router-id 4.4.4.4
[Switch D-ospfv3-1] quit
[Switch D] interface vlanif 40
[Switch D-Vlanif40] ospfv3 1 area 2
[Switch D-Vlanif40] quit
# View the status of the OSPFv3 neighbors of Switch B.
[Switch B] display ospfv3 peer
OSPFv3 Process (1)
OSPFv3 Area (0.0.0.1)
Neighbor ID Pri State Dead Time Interface Instance ID
1.1.1.1 1 Full/ - 00:00:34 Vlanif20 0
OSPFv3 Area (0.0.0.0)
Neighbor ID Pri State Dead Time Interface Instance ID
3.3.3.3 1 Full/ - 00:00:32 Vlanif30 0
# View the status of the OSPFv3 neighbors of Switch C.
[Switch C] display ospfv3 peer
OSPFv3 Process (1)
OSPFv3 Area (0.0.0.0)
Neighbor ID Pri State Dead Time Interface Instance ID
Issue 01 (2011-10-26) 269
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
6 OSPFv3 Configuration
2.2.2.2 1 Full/ - 00:00:37 Vlanif30 0
OSPFv3 Area (0.0.0.2)
Neighbor ID Pri State Dead Time Interface Instance ID
4.4.4.4 1 Full/ - 00:00:33 Vlanif40 0
# View the OSPFv3 routing table of Switch D.
[Switch D] display ospfv3 routing
OSPFv3 Process (1)
Destination Metric
Next-hop
IA 1000::/64 2
via FE80::1572:0:5EF4:1, Vlanif40
IA 1001::/64 3
via FE80::1572:0:5EF4:1, Vlanif40
1002::/64 1
directly-connected, Vlanif40
IA 2000::/64 4
via FE80::1572:0:5EF4:1, Vlanif40
Step 4 Configure the stub areas.
# Configure the stub area of Switch D.
[Switch D] ospfv3
[Switch D-ospfv3-1] area 2
[Switch D-ospfv3-1-area-0.0.0.2] stub
[Switch D-ospfv3-1-area-0.0.0.2] quit
# Configure the stub area of Switch C, and set the cost of the default route advertised to the stub area to 10.
[Switch C] ospfv3
[Switch C-ospfv3-1] area 2
[Switch C-ospfv3-1-area-0.0.0.2] stub
[Switch C-ospfv3-1-area-0.0.0.2] default-cost 10
[Switch C-ospfv3-1-area-0.0.0.2] quit
# View the OSPFv3 routing table of Switch D, and you can see a new default route in the routing table. The cost of the default route is the sum of the cost of the directly connected routes and the configured cost.
[Switch D] display ospfv3 routing
OSPFv3 Process (1)
Destination Metric
Next-hop
IA ::/0 11
via FE80::1572:0:5EF4:1, vlanif40
IA 1000::/64 2
via FE80::1572:0:5EF4:1, vlanif40
IA 1001::/64 3
via FE80::1572:0:5EF4:1, vlanif40
1002::/64 1
directly-connected, vlanif40
IA 2000::/64 4
via FE80::1572:0:5EF4:1, vlanif40
Step 5 Configure the totally sub area.
# On Switch C, configure Area 2 as the totally stub area.
[Switch C] ospfv3
[Switch C-ospfv3-1] area 2
[Switch C-ospfv3-1-area-0.0.0.2] stub no-summary
[Switch C-ospfv3-1-area-0.0.0.2] quit
Issue 01 (2011-10-26) 270
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
6 OSPFv3 Configuration
Step 6 Verify the configuration.
# View the OSPFv3 routing table of Switch D, and you can see that the entries in the routing table are reduced; other non-directly connected routes are suppressed; only the default route is reserved.
[Switch D] display ospfv3 routing
OSPFv3 Process (1)
Destination Metric
Next-hop
IA ::/0 11
via FE80::1572:0:5EF4:1, vlanif40
1002::/64 1
directly-connected, vlanif40
----End
Configuration Files
l Configuration file of Switch A
#
sysname Switch A
#
ipv6
#
vlan batch 20
# interface Vlanif20
ipv6 enable
ipv6 address 1001::2/64
ospfv3 1 area 0.0.0.1
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 20
port hybrid untagged vlan 20
# ospfv3 1
router-id 1.1.1.1
# return l Configuration file of Switch B
#
sysname Switch B
#
ipv6
#
vlan batch 20 30
# interface Vlanif20
ipv6 enable
ipv6 address 1001::1/64
ospfv3 1 area 0.0.0.1
# interface Vlanif30
ipv6 enable
ipv6 address 1000::1/64
ospfv3 1 area 0.0.0.0
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 20
port hybrid untagged vlan 20
# interface GigabitEthernet2/0/0
port hybrid pvid vlan 30
port hybrid untagged vlan 30
Issue 01 (2011-10-26) 271
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 6 OSPFv3 Configuration
# ospfv3 1
router-id 2.2.2.2
# return l Configuration file of Switch C
#
sysname Switch C
#
ipv6
#
vlan batch 30 40
# interface Vlanif30
ipv6 enable
ipv6 address 1000::2/64
ospfv3 1 area 0.0.0.0
#
interface Vlanif40
ipv6 enable
ipv6 address 1002::1/64
ospfv3 1 area 0.0.0.2
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 40
port hybrid untagged vlan 40
# interface GigabitEthernet2/0/0
port hybrid pvid vlan 30
port hybrid untagged vlan 30
# ospfv3 1
router-id 3.3.3.3
stub no-summary
default-cost 10
# return l Configuration file of Switch D
#
sysname Switch D
#
ipv6
#
vlan batch 40
# interface Vlanif40
ipv6 enable
ipv6 address 1002::2/64
ospfv3 1 area 0.0.0.2
# interface GigabitEthernet2/0/0
port hybrid pvid vlan 40
port hybrid untagged vlan 40
# ospfv3 1
router-id 4.4.4.4
stub
# return
6.13.2 Example for Configuring DR Election Through OSPFv3
Networking Requirements
, the priority of Switch A is 100, which is the highest priority on the
network; therefore, Switch A is elected as the DR. Switch C, which has the second highest
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
272
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 6 OSPFv3 Configuration priority, is elected as the BDR. The priority of Switch B is 0, which means that it cannot become the DR. Switch D is not configured with a priority, that is, Switch D uses the default priority, namely, 1.
Figure 6-2 Networking diagram for configuring DR election through OSPFv3
SwitchA
SwitchB
VLANIF10
1001::3/64
VLANIF10
1001::1/64
GE1/0/0
GE1/0/0
GE1/0/0
GE1/0/0
VLANIF10
1001::2/64
VLANIF10
1001::4/64
SwitchC
Device name
Switch A
Switch B
Switch C
Switch D
Interface
GE1/0/0
GE1/0/0
GE1/0/0
GE1/0/0
SwitchD
VLANIF interface IP address
VLANIF 10 1001::1/64
VLANIF 10
VLANIF 10
VLANIF 10
1001::2/64
1001::3/64
1001::4/64
Configuration Roadmap
The configuration roadmap is as follows:
1.
Configure IPv6 addresses for interfaces.
2.
Configure the router ID of each Switch , enable OSPFv3, and specify the network segments.
3.
Check the DR/BDR status of each Switch when the default priority is used.
4.
Set the DR priority of the interface on each Switch and check whether the Switch becomes the DR or BDR.
Data Preparation
To complete the configuration, you need the following data: l Router ID (1.1.1.1) and DR priority (100) of Switch A l Router ID (2.2.2.2) and DR priority (0) of Switch B l Router ID (3.3.3.3) and DR priority (2) of Switch C l Router ID (4.4.4.4) and DR priority (1) of Switch D
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
273
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 6 OSPFv3 Configuration
Procedure
Step 1 Add interfaces to VLANs.
<Quidway> system-view
[Quidway] sysname SwitchA
[SwitchA] vlan 10
[SwitchA-vlan10] quit
[SwitchA] interface GigabitEthernet 1/0/0
[SwitchA-GigabitEthernet1/0/0] port hybrid pvid vlan 10
[SwitchA-GigabitEthernet1/0/0] port hybrid untagged vlan 10
[SwitchA-GigabitEthernet1/0/0] quit
The configurations of Switch B, Switch C, Switch D are similar to the configuration of Switch
A and are not mentioned here.
Step 2 Assign IPv6 addresses to the VLANIF interfaces.
[SwitchA] ipv6
[SwitchA] interface vlanif 10
[SwitchA-Vlanif10] ipv6 enable
[SwitchA-Vlanif10] ipv6 address 1001::1/64
[SwitchA-Vlanif10] quit
The configurations of Switch B, Switch C, Switch D are similar to the configuration of Switch
A and are not mentioned here.
Step 3 Configure the basic OSPFv3 functions.
# On Switch A, enable OSPFv3 and set the router ID to 1.1.1.1.
[Switch A] ospfv3
[Switch A-ospfv3-1] router-id 1.1.1.1
[Switch A-ospfv3-1] quit
[Switch A] interface vlanif 10
[Switch A-Vlanif10] ospfv3 1 area 0
[Switch A-Vlanif10] quit
# On Switch B, enable OSPFv3 and set the router ID to 2.2.2.2.
[Switch B] ospfv3
[Switch B-ospfv3-1] router-id 2.2.2.2
[Switch B-ospfv3-1] quit
[Switch B] interface vlanif 10
[Switch B-Vlanif10] ospfv3 1 area 0
[Switch B-Vlanif10] quit
# On Switch C, enable OSPFv3 and set the router ID to 3.3.3.3.
[Switch C] ospfv3
[Switch C-ospfv3-1] router-id 3.3.3.3
[Switch C-ospfv3-1] quit
[Switch C] interface vlanif 10
[Switch C-Vlanif10] ospfv3 1 area 0
[Switch C-Vlanif10] quit
# On Switch D, enable OSPFv3 and set the router ID to 4.4.4.4.
[Switch D] ospfv3
[Switch D-ospfv3-1] router-id 4.4.4.4
[Switch D-ospfv3-1] quit
[Switch D] interface vlanif 10
[Switch D-Vlanif10] ospfv3 1 area 0
[Switch D-Vlanif10] quit
Check the neighbors of Switch A. You can view the DR priority and the neighbor status. By default, the DR priority is 1. Now Switch D functions as the DR and Switch C functions as the
BDR.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
274
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 6 OSPFv3 Configuration
NOTE
When the priorities of two Switches are the same, the Switch that has a greater router ID is elected as the
DR. If the VLANIF interface of an Switch becomes the DR, the other broadcast interfaces of this Switch have a high priority in the future DR election. That is, the Switch still functions as the DR. The DR cannot be preempted.
[Switch A] display ospfv3 peer
OSPFv3 Process (1)
OSPFv3 Area (0.0.0.0)
Neighbor ID Pri State Dead Time Interface Instance ID
2.2.2.2 1 2-Way/DROther 00:00:32 Vlanif10 0
3.3.3.3 1 Full/Backup 00:00:36 Vlanif10 0
4.4.4.4 1 Full/DR 00:00:38 Vlanif10 0
# View the neighbors of Switch D, and you can see that the status of the neighbor relationship between Switch D and other devices is Full.
[Switch D] display ospfv3 peer
OSPFv3 Process (1)
OSPFv3 Area (0.0.0.0)
Neighbor ID Pri State Dead Time Interface Instance ID
1.1.1.1 1 Full/DROther 00:00:32 Vlanif10 0
2.2.2.2 1 Full/DROther 00:00:35 Vlanif10 0
3.3.3.3 1 Full/Backup 00:00:30 Vlanif10 0
Step 4 Configure the DR priorities of interfaces.
# Configure the DR priority of Switch A to 100.
[Switch A] interface vlanif 10
[Switch A-Vlanif10] ospfv3 dr-priority 100
[Switch A-Vlanif10] quit
# Configure the DR priority of Switch B to 0.
[Switch B] interface vlanif 10
[Switch B-Vlanif10] ospfv3 dr-priority 0
[Switch B-Vlanif10] quit
# Configure the DR priority of Switch C to 2.
[Switch C] interface vlanif 10
[Switch C-Vlanif10] ospfv3 dr-priority 2
[Switch C-Vlanif10] quit
# View the neighbors of Switch A, and you can see that the DR priority is updated but the DR and BDR are unchanged.
[Switch A] display ospfv3 peer
OSPFv3 Process (1)
OSPFv3 Area (0.0.0.0)
Neighbor ID Pri State Dead Time Interface Instance ID
2.2.2.2 0 2-Way/DROther 00:00:34 Vlanif10 0
3.3.3.3 2 Full/Backup 00:00:38 Vlanif10 0
4.4.4.4 1 Full/DR 00:00:31 Vlanif10 0
# View the neighbors of Switch D, and you can see that Switch D is still the DR.
[Switch D] display ospfv3 peer
OSPFv3 Process (1)
OSPFv3 Area (0.0.0.0)
Neighbor ID Pri State Dead Time Interface Instance ID
1.1.1.1 100 Full/DROther 00:00:36 Vlanif10 0
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
275
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
6 OSPFv3 Configuration
2.2.2.2 0 Full/DROther 00:00:30 Vlanif10 0
3.3.3.3 2 Full/Backup 00:00:36 Vlanif10 0
Step 5 Perform DR/BDR election again.
# Restart all Switches (or run the shutdown and undo shutdown commands on the VLANIF interface that establishes the OSPFv3 neighbor relationship) to re-elect the DR and BDR.
Step 6 Verify the configuration.
# View the neighbors of Switch A, and you can see that Switch C is the BDR.
[Switch A] display ospfv3 peer
OSPFv3 Process (1)
OSPFv3 Area (0.0.0.0)
Neighbor ID Pri State Dead Time Interface Instance ID
2.2.2.2 0 Full/DROther 00:00:31 Vlanif10 0
3.3.3.3 2 Full/Backup 00:00:36 Vlanif10 0
4.4.4.4 1 Full/DROther 00:00:39 Vlanif10 0
# View the neighbors of Switch D, and you can see that Switch A is the DR.
[Switch D] display ospfv3 peer
OSPFv3 Process (1)
OSPFv3 Area (0.0.0.0)
Neighbor ID Pri State Dead Time Interface Instance ID
1.1.1.1 100 Full/DR 00:00:39 Vlanif10 0
2.2.2.2 0 2-Way/DROther 00:00:35 Vlanif10 0
3.3.3.3 2 Full/Backup 00:00:39 Vlanif10 0
----End
Configuration Files
l Configuration file of Switch A
#
sysname Switch A
#
ipv6
#
vlan batch 10
# interface Vlanif10
ipv6 enable
ipv6 address 1001::1/64
ospfv3 1 area 0.0.0.0
ospfv3 dr-priority 100
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# ospfv3 1
router-id 1.1.1.1
area 0.0.0.0
# return l
Configuration file of Switch B
#
sysname Switch B
#
ipv6
#
vlan batch 10
#
Issue 01 (2011-10-26) 276
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing interface Vlanif10
ipv6 enable
ipv6 address 1001::2/64
ospfv3 1 area 0.0.0.0
ospfv3 dr-priority 0
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# ospfv3 1
router-id 2.2.2.2
area 0.0.0.0
# return l Configuration file of Switch C
#
sysname Switch C
#
ipv6
#
vlan batch 10
# interface Vlanif10
ipv6 enable
ipv6 address 1001::3/64
ospfv3 1 area 0.0.0.0
ospfv3 dr-priority 2
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# ospfv3 1
router-id 3.3.3.3
area 0.0.0.0
# return l Configuration file of Switch D
#
sysname Switch D
#
ipv6
#
vlan batch 10
# interface Vlanif10
ipv6 enable
ipv6 address 1001::4/64
ospfv3 1 area 0.0.0.0
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# ospfv3 1
router-id 4.4.4.4
area 0.0.0.0
# return
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
6 OSPFv3 Configuration
277
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 6 OSPFv3 Configuration
6.13.3 Example for Configuring the OSPFv3 Virtual Link
Networking Requirements
, OSPFv3 is enabled on all Switches and the AS is divided into three
areas. Switch B and Switch C serve as ABRs to forward the inter-area routes. Area 2 is not directly connected to the backbone area, Area 0. Area 1 is the area between Area 0 and Area 2.
You need to configure a virtual link in Area 1 where Switch B and Switch C are located so that
Switch A and Switch D can communicate with each other.
Figure 6-3 Networking diagram for configuring OSPFv3 virtual links
SwitchA
Device name
Switch A
Switch B
Switch B
Switch C
Switch C
Switch D
Area 2
VLANIF10
1001::2/64
GE1/0/0
GE1/0/0
VLANIF10
1001::1/64
SwitchB
Interface
GE1/0/0
GE1/0/0
GE2/0/0
GE2/0/0
GE1/0/0
GE2/0/0
Area 1
VLANIF20
1000::2/64
GE2/0/0
GE2/0/0
VLANIF20
1000::1/64
Area 0
VLANIF30
1002::2/64
GE2/0/0
GE1/0/0
VLANIF30
1002::1/64
SwitchC
VLANIF interface
VLANIF 10
VLANIF 10
VLANIF 20
VLANIF 20
VLANIF 30
VLANIF 30
SwitchD
IP address
1001::2/64
1001::1/64
1000::1/64
1000::2/64
1002::1/64
1002::2/64
Configuration Roadmap
The configuration roadmap is as follows:
1.
Configure IPv6 addresses for interfaces.
2.
Enable the basic OSPFv3 functions on each Switch.
3.
Configure a virtual link between Switch B and Switch C to connect the non-backbone areas to the backbone area.
Data Preparation
To complete the configuration, you need the following data: l Router ID (1.1.1.1) of Switch A and area (Area 2) where Switch A is located l Router ID (2.2.2.2) of Switch B and areas (Area 1 and Area 2) where Switch B is located
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
278
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
6 OSPFv3 Configuration l Router ID (3.3.3.3) of Switch C and areas (Area 1 and Area 0) where Switch C is located l Router ID (4.4.4.4) of Switch D and area (Area 0) where Switch D is located
Procedure
Step 1 Add interfaces to VLANs.
<Quidway> system-view
[Quidway] sysname SwitchA
[SwitchA] vlan 10
[SwitchA-vlan10] quit
[SwitchA] interface GigabitEthernet 1/0/0
[SwitchA-GigabitEthernet1/0/0] port hybrid pvid vlan 10
[SwitchA-GigabitEthernet1/0/0] port hybrid untagged vlan 10
[SwitchA-GigabitEthernet1/0/0] quit
The configurations of Switch B, Switch C, Switch D are similar to the configuration of Switch
A and are not mentioned here.
Step 2 Assign IPv6 addresses to the VLANIF interfaces.
[SwitchA] ipv6
[SwitchA] interface vlanif 10
[SwitchA-Vlanif10] ipv6 enable
[SwitchA-Vlanif10] ipv6 address 1001::2/64
[SwitchA-Vlanif10] quit
The configurations of Switch B, Switch C, Switch D are similar to the configuration of Switch
A and are not mentioned here.
Step 3 Configure the basic OSPFv3 functions.
# On Switch A, enable OSPFv3 and set the router ID to 1.1.1.1.
[Switch A] ospfv3
[Switch A-ospfv3-1] router-id 1.1.1.1
[Switch A-ospfv3-1] quit
[Switch A] interface Vlanif 10
[Switch A-Vlanif10] ospfv3 1 area 2
[Switch A-Vlanif10] quit
# On Switch B, enable OSPFv3 and set the router ID to 2.2.2.2.
[Switch B] ospfv3
[Switch B-ospfv3-1] router-id 2.2.2.2
[Switch B-ospfv3-1] quit
[Switch B] interface vlanif 10
[Switch B-Vlanif10] ospfv3 1 area 2
[Switch B-Vlanif10] quit
[Switch B] interface vlanif 20
[Switch B-Vlanif20] ospfv3 1 area 1
[Switch B-Vlanif20] quit
# On Switch C, enable OSPFv3 and set the router ID to 3.3.3.3.
[Switch C] ospfv3
[Switch C-ospfv3-1] router-id 3.3.3.3
[Switch C-ospfv3-1] quit
[Switch C] interface vlanif 20
[Switch C-Vlanif20] ospfv3 1 area 1
[Switch C-Vlanif20] quit
[Switch C] interface vlanif 30
[Switch C-Vlanif30] ospfv3 1 area 0
[Switch C-Vlanif30] quit
# On Switch D, enable OSPFv3 and set the router ID to 4.4.4.4.
[Switch D] ospfv3
[Switch D-ospfv3-1] router-id 4.4.4.4
Issue 01 (2011-10-26) 279
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
6 OSPFv3 Configuration
[Switch D-ospfv3-1] quit
[Switch D] interface vlanif 30
[Switch D-Vlanif30] ospfv3 1 area 0
[Switch D-Vlanif30] quit
# View the OSPFv3 routing table of Switch C, and you can see that the routing table of Switch
C does not contain the routes of Area 2 because Area 2 is not directly connected to Area 0.
[Switch C] display ospfv3 routing
OSPFv3 Process (1)
Destination Metric
Next-hop
1000::/64 1
directly-connected, Vlanif20
1002::/64 1
directly-connected, Vlanif30
Step 4 Configure a vritual link in Area 1 where Switch B and Switch C are located.
# Configure Switch B.
[Switch B] ospfv3
[Switch B-ospfv3-1] area 1
[Switch B-ospfv3-1-area-0.0.0.1] vlink-peer 3.3.3.3
[Switch B-ospfv3-1-area-0.0.0.1] quit
# Configure Switch C.
[Switch C] ospfv3
[Switch C-ospfv3-1] area 1
[Switch C-ospfv3-1-area-0.0.0.1] vlink-peer 2.2.2.2
[Switch C-ospfv3-1-area-0.0.0.1] quit
Step 5 Verify the configuration.
# Check the OSPFv3 routing table of Switch C.
[Switch C] display ospfv3 routing
OSPFv3 Process (1)
Destination Metric
Next-hop
1000::/64 1
directly-connected, Vlanif20
1000::1/128 1
via FE80::4D67:0:EB7D:2, Vlanif20
1000::2/128 1
directly-connected, Vlanif20
IA 1001::/64 2
via FE80::4D67:0:EB7D:2, Vlanif20
1002::/64 1
directly-connected, Vlanif30
----End
Configuration Files
l
Configuration file of Switch A
#
sysname Switch A
#
ipv6
#
vlan batch 10
# interface Vlanif10
ipv6 enable
Issue 01 (2011-10-26) 280
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Issue 01 (2011-10-26)
ipv6 address 1001::2/64
ospfv3 1 area 0.0.0.2
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# ospfv3 1
router-id 1.1.1.1
area 0.0.0.2
# return l Configuration file of Switch B
#
sysname Switch B
#
ipv6
#
vlan batch 10 20
# interface Vlanif10
ipv6 enable
ipv6 address 1001::1/64
ospfv3 1 area 0.0.0.2
# interface Vlanif20
ipv6 enable
ipv6 address 1000::1/64
ospfv3 1 area 0.0.0.1
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# interface GigabitEthernet2/0/0
port hybrid pvid vlan 20
port hybrid untagged vlan 20
# ospfv3 1
router-id 2.2.2.2
area 0.0.0.0
area 0.0.0.1
vlink-peer 3.3.3.3
area 0.0.0.2
# return l Configuration file of Switch C
#
sysname Switch C
#
ipv6
#
vlan batch 20 30
# interface Vlanif20
ipv6 enable
ipv6 address 1000::2/64
ospfv3 1 area 0.0.0.1
# interface Vlanif30
ipv6 enable
ipv6 address 1002::1/64
ospfv3 1 area 0.0.0.0
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 30
port hybrid untagged vlan 30
#
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
6 OSPFv3 Configuration
281
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 6 OSPFv3 Configuration interface GigabitEthernet2/0/0
port hybrid pvid vlan 20
port hybrid untagged vlan 20
# ospfv3 1
router-id 3.3.3.3
area 0.0.0.0
area 0.0.0.1
vlink-peer 2.2.2.2
# return l Configuration file of Switch D
#
sysname Switch D
#
ipv6
#
vlan batch 30
# interface Vlanif30
ipv6 enable
ipv6 address 1002::2/64
ospfv3 1 area 0.0.0.0
# interface GigabitEthernet2/0/0
port hybrid pvid vlan 30
port hybrid untagged vlan 30
# ospfv3 1
router-id 4.4.4.4
area 0.0.0.0
# return
6.13.4 Example for Configuring OSPFv3 GR
Networking Requirements
, Switch A, Switch B, and Switch C belong to the same OSPFv3 area.
They communicate with each other through the OSPFv3 protocol and are enabled with GR.
When OSPFv3 adjacencies are established between Switch A, Switch C, and Switch B, the three switches can exchange routing information. If the OSPFv3 protocol restarts on Switch A, Switch
A synchronizes data with the neighboring switches through GR.
Figure 6-4 Networking diagram for configuring OSPFv3 GR
VLANIF10 VLANIF10
1000::1/64 1000::2/64
GE1/0/0
GE1/0/0
VLANIF20
2000::1/64
GE2/0/0
VLANIF20
2000::2/64
GE1/0/0
SwitchB
2.2.2.2
SwitchA
1.1.1.1
Device name
Switch A
Switch B
Switch B
Interface
GE1/0/0
GE1/0/0
GE2/0/0
SwitchC
3.3.3.3
VLANIF interface IP address
VLANIF 10 1000::1/64
VLANIF 10
VLANIF 20
1000::2/64
2000::1/64
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
282
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Switch C GE1/0/0 VLANIF 20
6 OSPFv3 Configuration
2000::2/64
Configuration Roadmap
The configuration roadmap is as follows:
1.
Configure IPv6 addresses for interfaces.
2.
Enable the basic OSPFv3 functions on each Switch.
3.
Enable the OSPFv3 helper in the OSPFv3 view of Switch B.
4.
Enable the OSPFv3 GR in the OSPFv3 view of Switch A.
Data Preparation
To complete the configuration, you need the following data: l IPv6 addresses of the interfaces l
Process ID of the OSPFv3 protocol l Router ID (1.1.1.1) of Switch A and area (Area 0) where Switch A is located l Router ID (2.2.2.2) of Switch B and area (Area 0) where Switch B is located l Router ID (3.3.3.3) of Switch C and area (Area 0) where Switch C is located
Procedure
Step 1 Add interfaces to VLANs.
<Quidway> system-view
[Quidway] sysname SwitchA
[SwitchA] vlan 10
[SwitchA-vlan10] quit
[SwitchA] interface GigabitEthernet 1/0/0
[SwitchA-GigabitEthernet1/0/0] port hybrid pvid vlan 10
[SwitchA-GigabitEthernet1/0/0] port hybrid untagged vlan 10
[SwitchA-GigabitEthernet1/0/0] quit
The configurations of Switch B and Switch C are similar to the configuration of Switch A and are not mentioned here.
Step 2 Assign IPv6 addresses to the VLANIF interfaces.
[SwitchA] ipv6
[SwitchA] interface vlanif 10
[SwitchA-Vlanif10] ipv6 enable
[SwitchA-Vlanif10] ipv6 address 1000::1/64
[SwitchA-Vlanif10] quit
The configurations of Switch B and Switch C are similar to the configuration of Switch A and are not mentioned here.
Step 3 Configure the basic OSPFv3 functions.
# On Switch A, enable OSPFv3 and set the router ID to 1.1.1.1.
[Switch A] ospfv3 100
[Switch A-ospfv3-100] router-id 1.1.1.1
[Switch A-ospfv3-100] quit
[Switch A] interface Vlanif 10
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
283
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
6 OSPFv3 Configuration
[Switch A-Vlanif10] ospfv3 100 area 0
[Switch A-Vlanif10] quit
# On Switch B, enable OSPFv3 and set the router ID to 2.2.2.2.
[Switch B] ospfv3 100
[Switch B-ospfv3-100] router-id 2.2.2.2
[Switch B-ospfv3-100] quit
[Switch B] interface vlanif 10
[Switch B-Vlanif10] ospfv3 100 area 0
[Switch B-Vlanif10] quit
[Switch B] interface vlanif 20
[Switch B-Vlanif20] ospfv3 100 area 0
[Switch B-Vlanif20] quit
# On Switch C, enable OSPFv3 and set the router ID to 3.3.3.3.
[Switch C] ospfv3 100
[Switch C-ospfv3-100] router-id 3.3.3.3
[Switch C-ospfv3-100] quit
[Switch C] interface vlanif 20
[Switch C-Vlanif20] ospfv3 100 area 0
[Switch C-Vlanif20] quit
Step 4 Enable OSPFv3 GR for Switch A.
[Switch A] ospfv3 100
[Switch A-ospfv3-100] graceful-restart
[Switch A-ospfv3-100] quit
Step 5 Enable OSPFv3 helper for Switch B.
[Switch B] ospfv3 100
[Switch B-ospfv3-100] helper-role
[Switch B-ospfv3-100] quit
Step 6 Verify the configuration.
# Run the display ipv6 fib 1 command on Switch A to view the FIB information.
<Switch A> display ipv6 fib 1
IPv6 FIB Table:
Total number of Routes : 2
Destination: 1000:: PrefixLength: 64
NextHop : 1000::1 Flag : U
Label : NULL Tunnel ID : 0
TimeStamp : Date- 25:6:2007, Time- 17:31:46 reference : 1
Interface : Vlanif10
Destination: 2000:: PrefixLength : 64
NextHop : FE80::200:1FF:FE00:200 Flag : DGU
Label : NULL Tunnel ID : 0
TimeStamp : Date- 26:6:2007, Time- 14:6:3 reference : 1
Interface : Vlanif10
# Restart OSPFv3 process 100 on Switch A without using the GR mechanism.
<Switch A> reset ospfv3 100
# Run the display ipv6 fib 1 command on Switch A immediately to view the FIB information.
<Switch A> display ipv6 fib 1
IPv6 FIB Table:
Total number of Routes : 1
Destination: 1000:: PrefixLength :64
NextHop : 1000::1 Flag : U
Label : NULL Tunnel ID : 0
TimeStamp : Date- 25:6:2007, Time- 17:31:46 reference : 1
Interface : Vlanif10
Issue 01 (2011-10-26) 284
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
6 OSPFv3 Configuration
The preceding information shows that the FIB information on Switch A is modified and the forwarding service is affected.
# Restart OSPFv3 process 100 on Switch A by using the GR mechanism.
<Switch A> reset ospfv3 100 graceful-restart
# Run the display ipv6 fib 1 command on Switch A immediately to view the FIB information.
Check whether GR functions normally. If GR functions normally, the FIB information is not modified and the forwarding is not affected when you restart the OSPFv3 process through GR on Switch A.
<Switch A> display ipv6 fib 1
IPv6 FIB Table:
Total number of Routes : 2
Destination: 1000:: PrefixLength : 64
NextHop : 1000::1 Flag : U
Label : NULL Tunnel ID : 0
TimeStamp : Date- 25:6:2007, Time- 17:31:46 reference : 1
Interface : Vlanif10
Destination: 2000:: PrefixLength : 64
NextHop : FE80::200:1FF:FE00:200 Flag : DGU
Label : NULL Tunnel ID : 0
TimeStamp : Date- 26:6:2007, Time- 14:6:3 reference : 1
Interface : Vlanif10
The preceding information shows that the FIB information on Switch A is not modified and the forwarding is not affected.
----End
Configuration Files
l Configuration file of Switch A
#
sysname Switch A
#
ipv6
#
vlan batch 10
# interface Vlanif10
ipv6 enable
ipv6 address 1000::1/64
ospfv3 100 area 0.0.0.0
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# ospfv3 100
router-id 1.1.1.1
graceful-restart
area 0.0.0.0
# return l
Configuration file of Switch B
#
sysname Switch B
#
ipv6
#
vlan batch 10 20
Issue 01 (2011-10-26) 285
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
# interface Vlanif10
ipv6 enable
ipv6 address 1000::2/64
ospfv3 100 area 0.0.0.0
# interface Vlanif20
ipv6 enable
ipv6 address 2000::1/64
ospfv3 100 area 0.0.0.0
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# interface GigabitEthernet2/0/0
port hybrid pvid vlan 20
port hybrid untagged vlan 20
# ospfv3 100
router-id 2.2.2.2
helper-role
area 0.0.0.0
# return l Configuration file of Switch C
#
sysname Switch C
#
ipv6
#
vlan batch 20
# interface Vlanif20
ipv6 enable
ipv6 address 2000::2/64
ospfv3 100 area 0.0.0.0
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 20
port hybrid untagged vlan 20
# ospfv3 100
router-id 3.3.3.3
area 0.0.0.0
# return
6 OSPFv3 Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
286
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 7 IS-IS Configuration
7
IS-IS Configuration
About This Chapter
Issue 01 (2011-10-26)
This chapter describes the basic principle of IS-IS and procedures for configuring IS-IS, and provides configuration examples.
7.2 IS-IS Features Supported by the S9300
7.3 Configuring Basic IS-IS Functions
IS-IS networks can be built only after basic IS-IS functions are configured.
7.4 Establishing or Maintaining IS-IS Neighbor Relationships or Adjacencies
This section describes how to configure the parameters that affect the IS-IS neighbor relationship.
7.5 Configuring IS-IS Attributes in Different Types of Networks
This section describes how to configure IS-IS attributes in different types of networks because
IS-IS attributes vary with network types.
7.6 Configuring IS-IS Route Attributes
Setting IS-IS route attributes affects IS-IS route selection.
7.7 Controlling the Advertisement of IS-IS Routes
7.8 Controlling the Receiving of IS-IS Routes
7.9 Adjusting and Optimizing an IS-IS Network
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
287
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 7 IS-IS Configuration
7.12 Configuring IS-IS Auto FRR
7.14 Configuring Static BFD for IS-IS
BFD can provide channel fault detection featuring light load and high speed (millisecond level).
Static BFD needs to be configured manually.
7.15 Configuring Dynamic BFD for IS-IS
BFD can provide channel fault detection featuring light load and high speed (millisecond level).
Routing protocols can dynamically trigger the establishment of BFD sessions.
7.16 Improving Security of an IS-IS Network
Maintaining IS-IS involves resetting IS-IS and clearing IS-IS statistics.
This section provides examples of IS-IS configuration.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
288
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 7 IS-IS Configuration
7.1 Basic Concepts of IS-IS
As an IGP, IS-IS is used inside an AS. IS-IS is a link-state protocol. It uses the SPF algorithm to calculate routes.
The Intermediate System-to-Intermediate System (IS-IS) is a dynamic routing protocol initially issued by the International Organization for Standardization (ISO) for its Connectionless
Network Protocol (CLNP).
To support the IP routing, the Internet Engineering Task Force (IETF) extends and modifies IS-
IS in RFC 1195. IS-IS can thus be applied to both TCP/IP and OSI environments. This type of
IS-IS is called the Integrated IS-IS or Dual IS-IS.
As an Interior Gateway Protocol (IGP), IS-IS is used in Autonomous Systems (ASs). IS-IS is a link-state protocol. It uses the Shortest Path First (SPF) algorithm to calculate routes. It resembles the Open Shortest Path First (OSPF) protocol.
IS-IS Areas
To support the large-scale networks, the IS-IS adopts a two-level structure in a Routing Domain
(RD). A large RD is divided into one or more areas. The intra-area routes are managed by the
Level-1 routers, whereas the inter-area routes is managed by the Level-2 routers.
shows an IS-IS network. Its topology is similar to that of a multi-area OSPF network.
Area 1 is a backbone area. All routers in this area are Level-2 routers. The other four areas are non-backbone areas. They are connected to Area 1 through Level-1-2 routers.
Figure 7-1 IS-IS topology
Area2
L1
L1/2
L2
L1/2
Area3
L2 Area1
L1
Area4
L1/2
L2
L2
L1
L1/2
L1
Area5
L1
L1
Issue 01 (2011-10-26)
shows another type of IS-IS topology. The Level-1-2 routers are used to connect the
Level-1 and the Level-2 routers, and are used to establish the backbone network together with
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
289
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 7 IS-IS Configuration the other Level-2 routers. In this topology, no area is specified as a backbone area. All the Level-2 routers constitute an IS-IS backbone network. The devices may belong to different areas, but the areas must be successive.
Figure 7-2 IS-IS topology II
Area1
L1
L1
L2
Area2
L1/L2
L1/L2
Area4
L1
L2
Area3
L2
NOTE
The IS-IS backbone network does not refer to a specific area.
This type of networking shows differences between IS-IS and OSPF. For OSPF, the inter-area routes are forwarded by the backbone area, and the SPF algorithm is used in the same area. For
IS-IS, both Level-1 routers and Level-2 routers use the SPF algorithm to generate Shortest Path
Trees (SPTs).
Network Types
IS-IS supports only two network types, which can classified as follows according to physical links: l Broadcast links such as Ethernet and Token-Ring l Point-to-point links such as PPP and HDLC
NOTE
For a Non-Broadcast Multi-Access (NBMA) network such as ATM, you need to configure sub-interfaces for it. The type of subnets cannot be Point-to-Multipoint (P2MP). IS-IS cannot run on P2MP networks.
7.2 IS-IS Features Supported by the S9300
The S9300 supports various IS-IS features, including multi-instance, multi-process, hot standby, multi-topology, local MT, GR, TE, DS-TE, administrative tags, LSP fragment extension, dynamic hostname exchange, fast convergence, BFD, and 3-way handshake.
Multi-Process and Multi-Instance
For easy management and effective control, IS-IS supports the multi-process and multi-instance features.
l Multi-Process
A set of interfaces are associated with a specific IS-IS process. This ensures that the specific
IS-IS process performs all the operations only on the set of interfaces. Multiple IS-IS
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
290
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 7 IS-IS Configuration processes then can work on a single Switch and each process is responsible for a unique set of interfaces.
l Multi-Instance
For a switch that supports the Virtual Private Network (VPN), each IS-IS process is associated with a specified VPN-instance. All the interfaces attached to an IS-IS process are associated with the VPN-instance.
IS-IS Hot Standby
Switch with distributed architecture support the IS-IS Hot Standby (HSB) feature. IS-IS backs up data from the Active Main Board (AMB) to the Standby Main Board (SMB). When the AMB fails, the SMB becomes active and replaces the AMB. IS-IS can thus work normally.
In the running process of IS-IS HSB, IS-IS configurations on the AMB and SMB must be consistent. When the active/standby switchover occurs, IS-IS on the new AMB performs
Graceful Restart (GR). The new AMB resends a request for setting up the neighbor relationship to neighbors to synchronize LSDBs. Traffic, therefore, is not affected.
NOTE
For details of IS-IS HSB and GR, refer to the Quidway S9300 Terabit Routing Switch Configuration Guide
- Reliability.
IS-IS Multicast-Topology (MT)
IS-IS IPv6 implementation has the limitation that a mixed topology of IPv4 and IPv6 is considered as an integrated topology during the SPF calculation. This requires that information about all IPv6 topologies and IPv4 topologies be consistent.
The deployment of IPv6 and IPv4 in the network, however, may be inconsistent; therefore, information about all IPv6 topologies and IPv4 topologies may be different. If the SPF calculation is performed in an integrated topology and the same shortest paths are used to forward packets, switches that do not support IPv6 discard received IPv6 packets.
IS-IS Multi-Topology (MT) can be used to solve the preceding problems. IS-IS MT refers to multiple separate IP topologies that are run in an IS-IS AS, such as IPv4 topology and IPv6 topology. Topologies adopt separate SPF calculation. Through MT, the routes are calculated respectively according to the actual IPv4 or IPv6 networks. Thus, network shielding is realized.
Local Multicast-Topology
When multicast and an MPLS TE tunnel are deployed in a network, the multicast function may be affected by the TE tunnel, and the multicast services may become unavailable.
This is because the outgoing interface of the route calculated by an IGP may not be the actual physical interface but a TE tunnel interface, after the TE tunnel is configured with IGP Shortcut.
According to the unicast route to the multicast source address, a switch sends a Join message through a TE tunnel interface. Switch spanned by the TE tunnel cannot sense the Join message.
The Switch, therefore, do not create any multicast forwarding entry. Because the TE tunnel is unidirectional, multicast data packets sent by the multicast source are sent to the Switch spanned by the tunnel through the related physical interfaces. The Switch discard the multicast data packets, because they do not have any multicast forwarding entry. Thus, services become unavailable.
After the local MT is enabled, the separate MIGP routing table can be created for multicast to guide the forwarding of multicast packets.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
291
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 7 IS-IS Configuration
NOTE
For details of the local MT, refer to the chapter "IS-IS" in the Quidway S9300 Terabit Routing Switch
Feature Description - IP Routing.
IS-IS GR
Graceful Restart (GR) is a function that is used to restart the Switch gracefully. GR ensures uninterrupted traffic forwarding and avoids route flapping during short time Switch restart.
If IS-IS does not restart in GR mode, IS-IS sessions are reset and Link State Protocol Data Units
(LSPs) are regenerated and flooded. This causes the SPF calculation, route flapping, and forwarding interruption in the entire area. In this case, IETF works out IS-IS GR standards (RFC
3847). The standards deal with protocol restart keeping FIB tables or not keeping FIB tables.
NOTE
For details of IS-IS GR, refer to the chapter "IS-IS" in the Quidway S9300 Terabit Routing Switch Feature
Description - IP Routing.
IS-IS TE
The IS-IS Traffic Engineering (TE) supports the establishment and maintenance of the Label
Switched Path (LSP).
When constructing the Constraint-based Routed (CR) LSP, MPLS needs to learn the traffic attributes of all the links in this area. MPLS can acquire the TE information of the links through
IS-IS.
NOTE
For details of the IS-IS TE configurations, refer to the Quidway S9300 Terabit Routing Switch
Configuration Guide - MPLS.
In this chapter, LSP, excluding the Label Switch Path (LSP) mentioned in this part, is short for the Link
State Protocol Data Unit. Note the differences in the two abbreviations.
Administrative Tags
Administrative tags simplify management. IS-IS implements the control function by advertising the prefixes carrying administrative tags. Administrative tags carry administrative information about IP prefixes. They are used to control the route import of different levels and areas, and control the different routing protocols and multiple IS-IS instances running on the same
Switch. They are also used to carry tags.
Administrative tag values are associated with some attributes. When an IS-IS router advertises an IP prefix with these attributes, the switch adds the administrative tag to the TLV in the prefix.
In this way, sticking to the prefix, the tag is flooded throughout routing domain.
LSP Fragments Extension
When LSPs to be advertised by IS-IS contain too much information, they are advertised through multiple LSP fragments of the same system. Each LSP fragment is identified by the LSP identifier field of each LSP. The LSP identifier field is 1 byte long. Thus, the maximum number of fragments that can be generated by any IS-IS router is 256.
The IS-IS LSP fragment extension feature allows an IS-IS router to generate more LSP fragments. To implement this feature, you can configure additional system IDs with the network manager for a Switch. Each system ID represents a virtual system that can generate 256 LSP
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
292
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 7 IS-IS Configuration fragments. With more additional system IDs (up to 50 virtual systems), the IS-IS router can generate a maximum of 13056 LSP fragments.
l
Related terms
–
Originating System
It is a switch that runs the IS-IS protocol. As mentioned in this manual, a single IS-IS process can advertise its LSPs as multiple "virtual" Switch, and the originating system represents the "real" IS-IS process.
– Normal System ID
It is the system ID of an originating system.
–
Additional System ID
Additional system IDs are assigned by the network manager. Each additional system
ID can generate up to 256 additional or extended LSP fragments. Like the normal system
ID, the additional system ID should be unique in a routing domain.
– Virtual System
The system, identified by an additional system ID, is used to generate extended LSP fragments. These fragments carry the additional system IDs in their LSP IDs.
l Operating modes
A IS-IS router can run the LSP fragment extension feature in the following two modes:
–
Mode-1: is used when some older Switch in the network do not support this feature.
In this mode, the originating system advertises a link to each of the virtual systems in its LSPs. Similarly, each of the virtual systems advertises a link to the originating system. In this way, the virtual systems look like the actual Switch that are connected to the originating system in the network. One restriction in this mode is that only routing information can be advertised through the LSPs of the virtual systems.
–
Mode-2: is used when all of the switches in the network support this feature.
In this mode, all the switches in the network know that the LSPs generated by the virtual systems actually belong to the originating system. There is no restriction on the linkstate information advertised through the LSPs of the virtual systems.
Dynamic Hostname Exchange Mechanism
To manage and maintain IS-IS networks more conveniently, the dynamic hostname exchange mechanism is introduced. The mechanism provides a mapping service from the hostname to system ID for switches in an IS-IS domain. This dynamic name information is advertised in the form of a dynamic hostname TLV.
The dynamic hostname exchange mechanism also provides a service of associating a hostname with the Designated Intermediate System (DIS) in a broadcast network. This mechanism then advertises this association information through the pseudo node LSP of the switch in the form of a dynamic hostname TLV.
The hostname is easier to identify and memorize than the system ID. After this function is configured, the switch on which the display command of IS-IS is used displays its hostname rather than system ID.
IS-IS Fast Convergence
l I-SPF
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
293
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 7 IS-IS Configuration
Incremental SPF (I-SPF) calculates only the changed routes at a time rather than all the routes.
In ISO-10589, the Dijkstra algorithm is defined to calculate the routes. When a node changes in the network, this algorithm needs to be used to recalculate all the nodes. Thus, it takes a long time, occupies too many CPU resources, and affects the convergence speed.
I-SPF improves this algorithm. After calculating all the nodes at the first time, it calculates only changed nodes subsequently. The SPT generated at last is the same as that generated through the previous algorithm. This reduces the CPU utilization and speeds up the network convergence.
l
PRC
Similar to I-SPF, the Partial Route Calculation (PRC) calculates only changed nodes, but it updates leaves (routes) calculated by I-SPF, instead of calculating the shortest path.
In route calculation, a route represents a leaf, and a switch represents a node. If the SPT calculated by I-SPF changes, PRC processes all the leaves on changed nodes. If the SPT remains unchanged, PRC processes only changed leaves.
For example, if only IS-IS is enabled only on an interface of a node, the SPT calculated by
I-SPF remains unchanged. In this case, PRC updates only the routes of this interface, thus occupying less CPU.
PRC together with I-SPF further improves the convergence performance of the network.
As an improvement of the original SPF algorithm, RPC and I-SPF replace the original algorithm.
NOTE
In the S9300 implementation, only I-SPF and PRC are used to calculate routes.
l LSP fast flooding
When an IS-IS router receives new LSPs from the other Switch, it floods out the LSPs in its own LSDB periodically according to the RFC. Thus, the LSDB is synchronized slowly.
LSP fast flooding solves the problem. When a switch configured with this feature receives one or more LSPs, it floods out the LSPs less than the specified ones before route calculation. The LSDB can thus be synchronized quickly. This improves the network convergence speed significantly.
l Intelligent timer
Although the route calculation algorithm is improved, the long interval for triggering the route calculation also affects the convergence speed. You can shorten the interval by using a millisecond-level timer. Frequent network changes, however, also occupy too many CPU resources. The SPF intelligent timer solves these problems. It responds to burst events quickly, and avoids the occupation of too many CPU resources.
Generally, an IS-IS network running normally is stable. Too many network changes occur rarely, and an IS-IS router does not calculate routes frequently. Thus, set a short time period
(in milliseconds) for the first time for triggering the route calculation. If the network changes frequently, the intelligent timer increases with the calculation times and thus the interval becomes longer. This avoids the occupation of too many CPU resources.
The LSP generation intelligent timer is similar to the SPF intelligent timer. When the LSP generation intelligent timer times out, the system generates a new LSP according to the current topology. The original mechanism adopts a timer with a certain interval, and thus cannot achieve fast convergence and low CPU utilization. Thus, the LSP generation timer is thus designed as an intelligent timer to respond to the burst events (for example, an interface is Up or Down) quickly and speed up the network convergence. In addition, when the network changes frequently, the interval for the intelligent timer becomes longer automatically to avoid too much CPU occupation.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
294
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 7 IS-IS Configuration
NOTE
Be cautious to configure the timers according to the practical networks and the Switch performances.
BFD for IS-IS
In the S9300, Bidirectional Forwarding Detection (BFD) is used to detect IS-IS neighbor relationships.
BFD can fast detect the faults on links between IS-IS neighbors and reports them to IS-IS. The fast convergence of IS-IS is thus implemented.
NOTE
BFD detects only the one-hop link between IS-IS neighbors. This is because IS-IS establishes only onehop neighbors.
l
Static BFD
Static BFD refers to configuring BFD session parameters manually including local and remote identifiers and delivering BFD session setup requests manually.
The defect of this feature is that BFD sessions are created and deleted manually, which lacks flexibility. In addition, manual configuration errors may be generated. For example, a wrong local or remote identifiers may be configured, therefore, BFD sessions cannot work normally.
l Dynamic BFD
Dynamic BFD refers to that routing protocols dynamically trigger the establishment of
BFD sessions.
When setting up new neighbor relationship, routing protocols send parameters of neighbors and detection parameters (including source and destination IP addresses) to the BFD module. BFD then sets up sessions according to the received parameters between neighbors.
Dynamic BFD is more flexible than static BFD.
Generally, the interval for an IS-IS router to send Hello messages is 10 seconds. The interval for declaring that a neighbor is invalid, that is, the Holddown time for keeping the neighbor relationship, is three times as long as the interval for sending Hello messages. The minimum
Holddown time, however, can be only of second level. IS-IS can thus provide only secondlevel period for sensing the fault of neighbors. As a result, a large number of packets may be lost in the high-speed network environment.
Dynamic BFD can provide channel fault detection of light load and high speed (millisecond level). Dynamic BFD cannot substitute the Hello mechanism of IS-IS. BFD helps IS-IS to detect the faults that occur on neighboring devices or links more quickly, and notifies IS-
IS to recalculate routes to correctly guide packet forwarding in time.
On the
S9300, dynamic BFD for IS-IS can be used to detect faults on IPv4 networks.
NOTE
For details of BFD for IS-IS, refer to the chapter "IS-IS" in the Quidway S9300 Terabit Routing
Switch Feature Description - IP Routing.
3-Way Handshake
IS-IS needs a reliable data link layer protocol on a P2P link. The 2-Way Handshake defined in
ISO 10589 uses Hello messages to establish adjacencies on the P2P interfaces of adjacent
Switch. In this mechanism, when a switch receives Hello message from a neighbor, the switch establish an adjacency with the neighbor and declares that the neighbor is Up.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
295
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 7 IS-IS Configuration
This mechanism has obvious defects. For example, if the link goes Up and Down frequently after the adjacency is established, CSNPs are lost and the LSDB cannot be synchronized in a full refresh cycle of LSPs; when two or more links exist between two switches, the two switches can still set up an adjacency even if one link is Down but another link is Up. SPF uses parameters of another link for route calculation. As a result, the switch that fails to detect fault tries forwarding packets through the link which is down.
The 3-way handshake resolves these issues on P2P links. In this mode, a switch declares that its neighbor is Up only when the switch knows that its neighbor receives a packet from the switch. The extended circuit ID (32 bits) used in the 3-way handshake identifies more links than the local circuit ID (8 bits) that identifies 255 links.
7.3 Configuring Basic IS-IS Functions
IS-IS networks can be built only after basic IS-IS functions are configured.
7.3.1 Establishing the Configuration Task
Before configuring basic IS-IS functions, familiarize yourself with the applicable environment, complete the pre-configuration tasks, and obtain the required data. This can help you complete the configuration task quickly and accurately.
Applicable Environment
Start an IS-IS process first before configuring IS-IS. Specify an Network Entity Title (NET) and enable IS-IS on related interfaces before configuring the other functions.
Pre-configuration Tasks
Before configuring basic IS-IS functions, complete the following tasks: l Configuring a link layer protocol l
Configuring IP addresses of interfaces to make neighboring nodes reachable at the network layer
Data Preparation
To configure basic IS-IS functions, you need the following data.
2
3
No.
Data
1 Process number
NET
Levels of switches and interfaces
7.3.2 Starting an IS-IS Process
The first step to configure IS-IS features is to create IS-IS processes.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
296
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Context
7 IS-IS Configuration
To enable IS-IS, you should create an IS-IS process and activate it on the interfaces that may be associate with other switches.
Do as follows on the switch that runs IS-IS:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
isis [ process-id ]
An IS-IS process is started and the IS-IS view is displayed.
process-id identifies an IS-IS process. If process-id is not set, the system uses process 1 by default. To associate the IS-IS process to a VPN instance, you can run the isis [ process-id ]
[ vpn-instance | vpn6-instance vpn6-instance-name ]
*
command.
----End
7.3.3 Configuring an NET
The second step to configure IS-IS features is to configure the NET by specifying the area address and system ID.
Context
An NET defines the current IS-IS area address and the system ID of a switch. You can configure a maximum of three NETs on a process of a switch. The area addresses of the NETs can be different, but their system IDs must be the same.
Do as follows on the switch that runs IS-IS:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
isis [ process-id ]
The IS-IS view is displayed.
Step 3 Run:
network-entity net
An NET is configured.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
297
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 7 IS-IS Configuration
CAUTION
Converting the address of a loopback network to a NET is recommended to ensure that the NET is unique on the network. If a NET is not unique, route flapping may occur. Therefore, plan the network properly.
During the establishment of the Level-2 neighbor relationship, IS-IS does not check whether area addresses are the same. During the establishment of the Level-1 neighbor relationship, area addresses must be the same; otherwise, the Level-1 neighbor relationship cannot be established.
----End
7.3.4 Configuring the Level of a Switch
By configuring the IS-IS level of a Switch, you can determine the IS-IS level of the adjacency.
Context
Do as follows on the switch that runs IS-IS:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
isis [ process-id ]
The IS-IS view is displayed.
Step 3 Run:
is-level { level-1 | level-1-2 | level-2 }
The level of a switch is set.
By default, the level of the switch is level-1-2.
----End
7.3.5 Enabling IS-IS on a Specified Interface
Before running IS-IS, you need to enable an IS-IS process on a specific interface.
Context
Do as follows on the switch that runs IS-IS:
Procedure
Step 1 Run:
system-view
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
298
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 7 IS-IS Configuration
The system view is displayed.
Step 2 Run:
interface interface-type interface-number
The interface view is displayed.
Step 3 Run:
isis enable [ process-id ]
IS-IS is enabled on a specified interface.
To enable the peer end to learn routes of the network segment where the interface resides, ensure that the status of the interface is Up.
If process-id is not specified, an interface is added to IS-IS process 1 by default.
----End
7.3.6 Checking the Configuration
After configuring basic IS-IS functions, you can check information about the IS-IS interface,
LSDB, neighbor, routes, and statistics about the IS-IS process.
Prerequisite
The configurations of Basic IS-IS Functions are complete.
Procedure
l Run display isis interface [ [ verbose | traffic-eng ]
*
| tunnel ] [ process-id | [ vpn-
instance vpn-instance-name | vpn6-instance vpn6-instance-name ]
*
] command to check information about the interface enabled with IS-IS.
l Run display isis lsdb [ { level-1 | level-2 } | verbose | { local | lsp-id | is-name symbolic-
name } ]
*
[ process-id | [ vpn-instance vpn-instance-name | vpn6-instance vpn6-instance-
name ]
*
] command to check information about the LSDB.
l
Run display isis peer [ verbose ] [ process-id | [ vpn-instance vpn-instance-name | vpn6-
instance vpn6-instance-name ]
*
] command to check information about the IS-IS neighbors.
l Run display isis route [ process-id | [ vpn-instance vpn-instance-name | vpn6-instance
vpn6-instance-name ]
*
] [ ipv4 ] [ verbose | [ level-1 | level-2 ] | ip-address [ mask | mask-
length ] ]
*
command to check IS-IS routing information.
l Check the statistics about the IS-IS process:
–
display isis statistics [ level-1 | level-2 | level-1-2 ] [ process-id | [ vpn-instance vpn-
instance-name | vpn6-instance vpn6-instance-name ]
*
]
–
display isis statistics packet [ interface interface-type interface-number ]
– display isis process-id statistics [ level-1 | level-2 | level-1-2 | packet ]
----End
Example
Run the display isis interface command. If the IS-IS neighbor relationship is correctly set up, you can find that the IPv4 neighbor of the local router is Up.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
299
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 7 IS-IS Configuration
<Quidway> display isis interface
Interface information for ISIS(1)
---------------------------------
Interface Id IPV4.State IPV6.State MTU Type DIS
Vlanif10 001 Up Down 1497 L1/L2 No/No
7.4 Establishing or Maintaining IS-IS Neighbor
Relationships or Adjacencies
This section describes how to configure the parameters that affect the IS-IS neighbor relationship.
7.4.1 Establishing the Configuration Task
Before configuring the parameters that affect the IS-IS neighbor relationship, familiarize yourself with the applicable environment, complete the pre-configuration tasks, and obtain the required data. This can help you complete the configuration task quickly and accurately.
Applicable Environment
This section describes how to establish or maintain the IS-IS neighbor relationship, covering: l Adjusting timers of various IS-IS packets, including Hello packets, CSNPs, and LSPs l Adjusting parameters of LSPs
Pre-configuration Tasks
Before establishing or maintaining IS-IS neighbor relationships or adjacencies, complete the following tasks: l
Configuring IP addresses of interfaces to make neighboring nodes reachable l
7.3 Configuring Basic IS-IS Functions
Data Preparation
To establish or maintain IS-IS neighbor relationships or adjacencies, you need the following data.
No.
Data
1 Parameters of IS-IS timers
2 LSP parameters
7.4.2 Configuring IS-IS Timers for Packets
This part describes how to set the intervals for sending Hello packets, Complete Sequence
Number PDUs (CSNPs), and Link State PDUs (LSPs).
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
300
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Context
Do as follows on the switch that runs IS-IS:
Procedure
7 IS-IS Configuration l Configuring the Interval for Sending Hello Packets
1.
Run:
system-view
The system view is displayed.
2.
Run:
interface vlanif vlan-id
The VLANIF interface view is displayed.
3.
Run:
isis timer hello hello-interval [ level-1 | level-2 ]
The interval for sending the Hello packets is set on an interface.
On a broadcast link, there are Level-1 and Level-2 Hello packets. For different types of packets, you can set different intervals. If no level is specified, both the Level-1 timer and Level-2 timer are configured. On a P2P link, there are only one type of Hello packets. Thus, neither level-1 nor level-2 is required.
NOTE
Parameters level-1 and level-2 are configured only on a broadcast interface.
l Configuring the Invalid Number of Hello Packets
1.
Run:
system-view
The system view is displayed.
2.
Run:
interface vlanif vlan-id
The VLANIF interface view is displayed.
3.
Run:
isis timer holding-multiplier number [ level-1 | level-2 ]
The invalid number of Hello packets is set.
If no level is specified, both the Level-1 timer and Level-2 timer are configured.
NOTE
level-1 and level-2 can be found only on the broadcast interface.
IS-IS maintains neighbor relationships with neighbors through Hello packets. If the local router does not receive any Hello packet from a neighbor within holding time, the local router declares that the neighbor is invalid.
In IS-IS, the period during which the local router and its neighbor keep the neighbor relationship is determined by the invalid number of Hello packets and the interval for sending Hello packets.
l Configuring the Interval for Sending CSNPs
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
301
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
7 IS-IS Configuration
1.
Run:
system-view
The system view is displayed.
2.
Run:
interface vlanif vlan-id
The VLANIF interface view is displayed.
3.
Run:
isis timer csnp csnp-interval [ level-1 | level-2 ]
The interval for sending CSNPs is set.
CSNPs are transmitted by the Designated IS (DIS) to synchronize an LSDB in a broadcast network. If the level is not specified, the timer of the current level is configured.
l
Configuring the Interval for Retransmitting LSPs
1.
Run:
system-view
The system view is displayed.
2.
Run:
interface vlanif vlan-id
The VLANIF interface view is displayed.
3.
Run:
isis enable
Enable IS-IS on the VLANIF interface
4.
Run:
isis circuit-type p2p
Sets the interface network type as P2P.
5.
Run:
isis timer lsp-retransmit retransmit-interval
The interval for retransmitting LSPs on a P2P link is set.
On a P2P link, if the local router does not receive the response within a period of time after it sends an LSP, it considers that the LSP is lost or dropped. To ensure the reliable transmission, .the local router retransmits the LSP according to the retransmit-interval. By default, the interval for retransmitting the LSP packet on the P2P link is 5 seconds.
The LSPs sent on a broadcast link do not need any response.
l Configuring the Minimum Interval for Sending LSPs
1.
Run:
system-view
The system view is displayed.
2.
Run:
interface vlanif vlan-id
The VLANIF interface view is displayed.
3.
Run:
isis timer lsp-throttle throttle-interval [ count count ]
302
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
7 IS-IS Configuration
The minimum interval for sending LSPs is set.
count: specifies the maximum number of LSP packets to be sent within the period specified by throttle-interval. The value ranges from 1 to 1000.
You can set the minimum interval for sending LSPs on an IS-IS interface, that is, the delay between two consecutive LSPs. The value is also the interval for sending fragments of a
CSNP.
----End
7.4.3 Configuring LSP Parameters
By configuring the LSP generation timer, you can adjust the time that an IS-IS network generates
LSPs. Setting the size of the LSP to be generated or received by IS-IS can affect the transmission of LSPs.
Context
Do as follows on the switch that runs IS-IS:
Procedure
l Configuring the Interval for Refreshing LSPs
1.
Run:
system-view
The system view is displayed.
2.
Run:
isis [ process-id ]
The IS-IS view is displayed.
3.
Run:
timer lsp-refresh refresh-time
The LSP refreshment period is set.
To synchronize all the LSPs in an area, the switches in the area periodically send all the current LSPs.
By default, the LSP refreshment period is 900 seconds, and the maximum lifetime of an
LSP is 1200 seconds. When performing configurations, ensure that the LSP refresh interval is 300 seconds shorter than the maximum LSP Keepalive time. In this way, new LSPs can reach all switches in an area before existing LSPs expire.
NOTE
It is recommended to adjust the difference between the LSP refresh period and the maximum
Keepalive time of the LSP depending on the network scale.
l Configuring the Max Lifetime of an LSP
1.
Run:
system-view
The system view is displayed.
2.
Run:
isis [ process-id ]
Issue 01 (2011-10-26) 303
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
7 IS-IS Configuration
The IS-IS view is displayed.
3.
Run:
timer lsp-max-age age-time
The lifetime of an LSP is set.
When a switch generates an LSP, it sets the max lifetime for the LSP. After the LSP is received by other switches, its lifetime decreases as time passes. If a switch does not receive any updated LSP and the lifetime of this LSP decreases to 0, the lifetime of the LSP lasts
60s. If a new LSP is still not received, this LSP is deleted from the LSDB.
l Configuring the Intelligent Timer Used to Generate LSPs
1.
Run:
system-view
The system view is displayed.
2.
Run:
isis [ process-id ]
The IS-IS view is displayed.
3.
Run:
timer lsp-generation max-interval [ init-interval [ incr-interval ] ]
[ level-1 | level-2 ]
The intelligent timer used to generate LSPs is set.
If no level is configured, both Level-1 and Level-2 are configured.
The initial delay for generating the same LSPs (or LSP fragments) is init-interval. The delay for generating the same LSPs (or LSP fragments) secondly is incr-interval. When the routes change each time, the delay for generating the same LSPs (or LSP fragments) is twice as the previous value until the delay is up to max-interval. After the delay reaches max-
interval for three times or reset the IS-IS process, the interval is reduced to init-interval.
When incr-interval is not used and generating the same LSPs (or LSP fragments) for the first time, init-interval is used as the initial delay. Then, the delay for generating the same
LSPs (or LSP fragments) is max-interval. After the delay reaches max-interval for three times or the IS-IS process is reset, the interval is reduced to init-interval.
When only max-interval is used, the intelligent timer changes into a normal one-short timer.
l Configuring the Size of an LSP
1.
Run:
system-view
The system view is displayed.
2.
Run:
isis [ process-id ]
The IS-IS view is displayed.
3.
Run:
lsp-length originate max-size
The size of an LSP generated by the system is set.
4.
Run:
lsp-length receive max-size
304
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 7 IS-IS Configuration
The size of a received LSP is set.
NOTE
When using max-size, ensure that the value of the max-size of the generated LSP packet (or the forwarded LSP packet) must be smaller than or equal to that of the received LSP packet.
The value of max-size set by using the lsp-length command must meet the following conditions.
– The MTU value of an Ethernet interface must be greater than or equal to the sum of
max-size and 3.
– The MTU value of a P2P interface must be greater than or equal to the value of max-
size.
l Adding an Interface to a Mesh Group
1.
Run:
system-view
The system view is displayed.
2.
Run:
interface vlanif vlan-id
The VLANIF interface view is displayed.
3.
Run:
isis mesh-group { mesh-group-number | mesh-blocked }
The interface is added to a mesh group.
On the Non Broadcast Multiple Access (NBMA) network, after receiving an LSP, the interface of a switch floods the LSP to the other interfaces. In a network with higher connectivity and multiple P2P links, however, the flooding method causes repeated LSP flooding and wastes bandwidth.
To avoid the preceding problem, you can configure several interfaces to form a mesh group.
The switch in the mesh group does not flood the LSP received from an interface of the group to the other interfaces of the group, but floods it to interfaces of other groups or interfaces that do not belong to any group.
When mesh-blocked is configured on an interface, the interface is blocked and cannot flood LSPs outside. All the interfaces added to a mesh group implement global LSDB synchronization through CSNP and PSNP mechanisms.
NOTE
In an ATM or FR network, IS-IS routers are connected through Virtual Circuits (VCs), and the interface here is the logical P2P sub-interface.
l
Configuring LSP Fragments Extension
1.
Run:
system-view
The system view is displayed.
2.
Run:
isis [ process-id ]
The IS-IS view is displayed.
3.
Run:
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
305
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
7 IS-IS Configuration
lsp-fragments-extend [ { level-1 | level-2 | level-1-2 } | { mode-1 |
mode-2 } ]
*
LSP fragments extension is enabled in an IS-IS process.
4.
Run:
virtual-system virtual-system-id
A virtual system is configured.
To configure a switch to generate extended LSP fragments, you must configure at least one virtual system. The ID of the virtual system must be unique in the domain.
An IS-IS process can be configured with up to 50 virtual system IDs.
If neither the mode nor the level is specified when LSP fragments extension is configured, mode-1 and Level-1-2 are used by default.
----End
7.4.4 Checking the Configuration
After configuring parameters that affect the IS-IS neighbor relationship, you can check information about the IS-IS interface and statistics about the IS-IS process.
Prerequisite
The configurations of Establishing or Maintaining IS-IS Neighbor Relationships or Adjacencies are complete.
Procedure
l Run display isis interface [ [ verbose | traffic-eng ]
*
| tunnel ] [ process-id | [ vpn-
instance vpn-instance-name | vpn6-instance vpn6-instance-name ]
*
] command to check information about the interface enabled with IS-IS.
l
Check the statistics of the IS-IS process:
– display isis statistics [ level-1 | level-2 | level-1-2 ] [ process-id | [ vpn-instance vpn-
instance-name | vpn6-instance vpn6-instance-name ]
*
]
– display isis statistics packet [ interface interface-type interface-number ]
–
display isis process-id statistics [ level-1 | level-2 | level-1-2 | packet ]
----End
Example
On VLANIF10, set the interval for sending Hello packets to 15, the invalid number of Hello packets to 10, the interval for sending Level-1 CSNPs to 123, and the minimum interval for sending LSPs to 159. Run the display isis interface verbose command. The display is as follows:
<Quidway> display isis interface verbose
Interface information for ISIS(1)
---------------------------------
Interface Id IPV4.State IPV6.State MTU Type DIS
Vlanif10 001 Mtu:Up/Lnk:Dn/IP:Dn Down 1497 L1/L2 No/No
Description : HUAWEI, Quidway Series, Vlanif10 Interface
SNPA Address : 00e0-095b-4201
IP Address : 123.1.1.1
IPV6 Link Local Address :
Issue 01 (2011-10-26) 306
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
IPV6 Global Address(es) :
Csnp Timer Value : L1 123 L2 10
Hello Timer Value : L1 15 L2 15
DIS Hello Timer Value : L1 5 L2 5
Hello Multiplier Value : L1 10 L2 10
LSP-Throttle Timer : L12 159
Cost : L1 10 L2 10
Ipv6 Cost : L1 10 L2 10
Priority : L1 64 L2 64
Retransmit Timer Value : L12 5
Bandwidth-Value : Low 100000000 High 0
Static Bfd : NO
Dynamic Bfd : NO
Fast-Sense Rpr : NO
7 IS-IS Configuration
7.5 Configuring IS-IS Attributes in Different Types of
Networks
This section describes how to configure IS-IS attributes in different types of networks because
IS-IS attributes vary with network types.
7.5.1 Establishing the Configuration Task
Before configuring IS-IS attributes in different types of networks, familiarize yourself with the applicable environment, complete the pre-configuration tasks, and obtain the required data. This can help you complete the configuration task quickly and accurately.
Applicable Environment
IS-IS attributes are different in different types of networks. This section describes how to configure IS-IS attributes in different types of networks, covering: l Simulating a P2P interface on an Ethernet interface by changing the link type of the Ethernet interface to P2P l Controlling the DIS election l Checking the OSI network negotiation status on a PPP link l Enabling two P2P interfaces on two switches in different network segments to establish the neighbor relationship by configuring the interfaces not to perform the IP address check
Pre-configuration Tasks
Before configuring IS-IS attributes in different types of networks, complete the following tasks: l Configuring IP addresses of interfaces to make neighboring nodes reachable l
7.3 Configuring Basic IS-IS Functions
Data Preparation
To configure IS-IS attributes in different types of networks, you need the following data.
No.
Data
1 Network type of an interface
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
307
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 7 IS-IS Configuration
No.
Data
2 DIS priority of an interface
7.5.2 Configuring the Network Type of IS-IS Interface
By simulating the network type of an IS-IS interface as P2P, you can ensure that the network types of the two interfaces are the same so that the IS-IS neighbor relationship can be successfully established.
Context
Do as follows on the switch that runs IS-IS:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
interface vlanif interface-number
The interface view is displayed.
Step 3 Run:
isis circuit-type p2p
The network type of the interface is set to P2P.
By default, the network type of an interface is determined by the physical interface.
For an interface enabled with IS-IS, when the network type of the interface changes, its related configurations change. Details are as follows: l After a broadcast interface is simulated as a P2P interface through the isis circuit-type
p2p command, the interval for sending Hello packets, number of Hello packets that IS-IS does not receive from a neighbor before the neighbor is declared Down, interval for retransmitting LSPs on a P2P link, and various IS-IS authentication modes are restored to the default settings; other configurations such as the DIS priority, DIS name, and interval for sending CSNPs on a broadcast network become invalid.
l After the undo isis circuit-type command is run to restore the network type of the interface, the interval for sending Hello packets, number of Hello packets that IS-IS does not receive from a neighbor before the neighbor is declared Down, interval for retransmitting LSPs on a P2P link, various IS-IS authentication modes, DIS priority, and interval for sending CSNPs on a broadcast network are restored to the default settings.
NOTE
Network types of the IS-IS interfaces on both ends of the link must be consistent; otherwise, the neighbor relationship cannot be established.
----End
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
308
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 7 IS-IS Configuration
7.5.3 Configuring the DIS Priority of an Interface
By setting the DIS priority of an interface on a broadcast network, you can control the DIS election on the broadcast network.
Context
Level-1 DISs and the Level-2 DISs are elected respectively, and you can configure different priorities for them. If neither Level-1 nor Level-2 is specified in the command, configure the same priority for Level-1 and Level-2.
The DIS election is based on priorities of interfaces. The interface with the highest priority is elected as the DIS. In the case of the same DIS priority, the interface with the highest MAC address is elected as the DIS. Different from OSPF, an interface with the DIS priority as 0 still takes part in the DIS election in IS-IS.
Do as follows on the switch that runs IS-IS:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
interface vlanif vlan-id
The VLANIF interface view is displayed.
Step 3 Run:
isis dis-priority priority [ level-1 | level-2 ]
The DIS priority of the interface is set.
The greater the value is, the higher the priority is.
----End
Follow-up Procedure
NOTE
The DIS priority is valid only to the broadcast network.
If the isis circuit-type command is run to emulate the interface as a P2P interface, the isis dis-
priority command becomes invalid on the interface; after the undo isis circuit-type command is run to restore the broadcast interface, the default DIS priority is used.
7.5.4 Configuring the Negotiation Model on a P2P Link
With the 3-way handshake mechanism, you can detect the fault of a unidirectional link and detect the unreliable peer status on P2P interfaces caused by other link faults.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
309
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 7 IS-IS Configuration
Context
The command is used to specify the negotiation mode for setting up the neighbor relationship on a P2P link. The 3-way handshake mechanism can be used to detect faults on a unidirectional link and detect the unreliable peer status on P2P interfaces of a link with other faults.
Do as follows on the switch that runs IS-IS:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
interface interface-type interface-number
The interface view is displayed.
Step 3 Run:
isis ppp-negotiation { 2-way | 3-way [ only ]}
The negotiation model used by the interface is specified.
By default, the 3-way negotiation model is used.
This command is only used to set up the neighbor relationship on a P2P link. For a broadcast link, you can run the isis circuit-type p2p command to change the link type to P2P, and then run this command to set the negotiation model.
----End
7.5.5 Configuring OSICP Check on PPP Interfaces
After OSICP negotiation check is configured on PPP interfaces, the OSI network negotiation status of PPP will affect the IS-IS interface status.
Context
Do as follows on the switch that runs IS-IS:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
interface interface-type interface-number
The interface view is displayed.
Step 3 Run:
isis ppp-osicp-check
The PPP interface is configured to perform the OSICP status check.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
310
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 7 IS-IS Configuration
By default, PPP OSCIP status does not affect the status of the IS-IS interface.
This command is applicable only to PPP interfaces, and does not take effect for P2P interfaces on other types of links. For the point-to-point interfaces running other link protocols, this command is invalid.
----End
Follow-up Procedure
After this command is configured, OSI network negotiation status of PPP affects IS-IS interface status. When PPP senses that the OSI network fails to work, the link status of the IS-IS interface turns Down. In this way, IS-IS no longer advertises routes to the network segment where this
IS-IS interface resides through LSPs.
7.5.6 Configuring IS-IS Not to Check the IP Address in a Received
Hello Packet
By configuring IS-IS not to check the IP addresses in the received Hello packets, you can establish the IS-IS neighbor relationship between the two interfaces that are on the same link but on different network segments.
Context
In general, IS-IS checks the IP address of a received Hello packet. Only the IP address and the local interface that receives the packet belong to the same network segment, the two interfaces can set up the neighbor relationship.
If the IP addresses of the two interfaces are not in the same network segment and the isis peer-
ip-ignore command is used on the two interfaces, the two interfaces do not check the IP addresses of received Hello packets. The two interfaces then can set up the neighbor relationship normally.
The routing table has routes of the two different network segments, but they cannot ping through each other.
Do as follows on the switch that runs IS-IS:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
interface interface-type interface-number
The interface view is displayed.
Step 3 (Optional) Run:
isis circuit-type p2p
The network type of the interface is set to P2P.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
311
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 7 IS-IS Configuration
NOTE
l For broadcast interfaces, you need to run the isis circuit-type p2p command in the interface view before running the isis peer-ip-ignore command. The isis circuit-type p2p command is valid only for broadcast interfaces.
l For P2P and NBMA interfaces, you can directly run the isis peer-ip-ignore command without running the isis circuit-type p2p command.
Step 4 Run:
isis peer-ip-ignore
IS-IS does not check the IP address in the Hello packet received by the interface.
----End
7.5.7 Checking the Configuration
After configuring IS-IS attributes in different types of networks, you can check information about the interfaces enabled with IS-IS.
Prerequisite
The configurations of IS-IS Attributes in Different Types of Networks are complete.
Procedure
l Run display isis interface [ [ verbose | traffic-eng ]
*
| tunnel ] [ process-id | [ vpn-
instance vpn-instance-name | vpn6-instance vpn6-instance-name ]
*
] command to check the information about an interface enabled with IS-IS.
----End
Example
On VLANIF10, set its network type to BROADCAST and the DIS priority to 100. Run the
display isis interface verbose command. The display is as follows:
<Quidway> display isis interface verbose
Interface information for ISIS(1)
---------------------------------
Interface Id IPV4.State IPV6.State MTU Type DIS
Vlanif10 001 Mtu:Up/Lnk:Dn/IP:Dn Down 1497 L1/L2 No/No
Description : HUAWEI, Quidway Series, Vlanif10 Interface
SNPA Address : 00e0-095b-4201
IP Address : 123.1.1.1
IPV6 Link Local Address :
IPV6 Global Address(es) :
Csnp Timer Value : L1 123 L2 10
Hello Timer Value : L1 15 L2 15
DIS Hello Timer Value : L1 5 L2 5
Hello Multiplier Value : L1 10 L2 10
LSP-Throttle Timer : L12 159
Cost : L1 10 L2 10
Ipv6 Cost : L1 10 L2 10
Priority : L1 100 L2 100
Retransmit Timer Value : L12 5
Bandwidth-Value : Low 100000000 High 0
Static Bfd : NO
Dynamic Bfd : NO
Fast-Sense Rpr : NO
Extended-Circuit-Id Value : 0000000001
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
312
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 7 IS-IS Configuration
7.6 Configuring IS-IS Route Attributes
Setting IS-IS route attributes affects IS-IS route selection.
7.6.1 Establishing the Configuration Task
Before configuring IS-IS route attributes, familiarize yourself with the applicable environment, complete the pre-configuration tasks, and obtain the required data. This can help you complete the configuration task quickly and accurately.
Applicable Environment
This section describes how to change attributes of routing information, including IS-IS preference, costs of IS-IS interfaces, and convergence priorities of IS-IS routes.
Pre-configuration Tasks
Before configuring IS-IS route attributes, complete the following tasks: l Configuring IP addresses of interfaces to make neighboring nodes reachable l
Configuring Basic IS-IS Functions
Data Preparation
To configure IS-IS route attributes, you need the following data.
No.
Data
1 IS-IS preference
2 Cost of each IS-IS interface
7.6.2 Configuring the Cost of an IS-IS Interface
Setting the cost of an IS-IS interface affects the cost of IS-IS routes and then affects IS-IS route selection.
Context
IS-IS determines the cost of an interface in following three ways in the descending order: l Interface cost: indicates the link cost configured for a single interface.
l Global cost: indicates the link cost configured for all the interfaces.
l Auto-cost: indicates the link cost calculated automatically based on the interface bandwidth.
If no command is used explicitly, the default cost of an IS-IS interface is 10, and cost type is narrow.
Do as follows on the switch that runs IS-IS:
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
313
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Procedure
7 IS-IS Configuration l Configuring the IS-IS Cost Type
1.
Run:
system-view
The system view is displayed.
2.
Run:
isis [ process-id ]
The IS-IS view is displayed.
3.
Run:
cost-style { narrow | wide | wide-compatible | { { narrow-compatible |
compatible } [ relax-spf-limit ] } }
The IS-IS cost type is configured.
For different cost types, the cost range of an interface is different, and the cost range of the received route is also different:
–
If the cost type is narrow, the cost of the interface ranges from 1 to 63. The maximum cost of the received route is 1023.
– If the cost type is narrow-compatible or compatible, the cost of the interface ranges from 1 to 63. The cost of the received route is related to relax-spf-limit.
–
If relax-spf-limit is not set, the following situations may occur:
If the cost of the route is smaller than or equal to 1023 and the link costs of all interfaces that the route passes through are smaller than or equal to 63, The cost of the route received on the interface adopts the actual cost.
If the cost of the route is smaller than or equal to 1023 but the link costs of the interfaces that the route passes through are greater than 63, the switch can learn only the routes of the network segment where the interface resides and the routes imported by the interface. The cost of the route received on the interface adopts the actual cost and then the routes forwarded by the interface are discarded.
If the cost of the route is greater than 1023, the switch can learn the routes of the interface whose link cost exceeds 1023 for the first time. The link cost of each interface before this interface is not greater than 63. The routes of the network segment where the interface resides and routes imported by the interface can be learned by the switch. The cost of the route received on the interface adopts 1023. The routes forwarded by the interface are discarded.
– If relax-spf-limit is set, there is no limit to the link costs of interfaces and route costs. The cost of the route is the actual one.
– If the cost type is wide or wide-compatible, the cost of the interface ranges from
1 to 16777215. If the cost is 16777215, the Neighbor TLV (cost is 16777215) generated on the link cannot be used for route calculation and can be used only to deliver the information related to TE. The maximum cost of the received route is
0x FFFFFFFF.
l Configuring the Cost of an the IS-IS Interface
1.
Run:
system-view
The system view is displayed.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
314
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 7 IS-IS Configuration
2.
Run:
interface interface-type interface-number
The interface view is displayed.
3.
Run:
isis cost cost [ level-1 | level-2 ]
The cost of the IS-IS interface is set.
You can use the command to configure the cost of a specific interface.
l Configuring IS-IS Global Cost
1.
Run:
system-view
The system view is displayed.
2.
Run:
isis [ process-id ]
The IS-IS view is displayed.
3.
Run:
circuit-cost cost [ level-1 | level-2 ]
The global IS-IS cost is set.
You can use the command to change the costs of all the interfaces at a time.
l Enabling Auto-Cost
1.
Run:
system-view
The system view is displayed.
2.
Run:
isis [ process-id ]
The IS-IS view is displayed.
3.
Run:
bandwidth-reference value
The reference value of the bandwidth is set.
By default, the reference value of the bandwidth is 100.
4.
Run:
auto-cost enable
The interface is configured to automatically calculate the cost of its bandwidth.
The bandwidth reference value configured in Step 3 is valid only when the cost type is wide or wide-compatible. Then, the cost of each interface is calculated through the formula, the cost = (bandwidth-reference/interface bandwidth) × 10.
When the cost type is narrow, narrow-compatible, or compatible, the cost of each interface can be obtained from the following table.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
315
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 7 IS-IS Configuration
Table 7-1 Relationship between the interface cost and the bandwidth
Cost Interface Bandwidth Range
60 interface bandwidth ≤ 10Mbit/s
50
40
30
20
10
10Mbit/s < interface bandwidth ≤ 100Mbit/s
100Mbit/s < interface bandwidth ≤ 155Mbit/s
155Mbit/s < interface bandwidth ≤ 622Mbit/s
622Mbit/s < interface bandwidth ≤ 2.5Gbit/s
2.5Gbit/s < interface bandwidth
NOTE
To change the cost of a loopback interface, run the isis cost command in the interface view.
----End
7.6.3 Configuring the Preference of IS-IS
Setting the priorities of IS-IS and IS-IS routes affects IS-IS route selection and route convergence.
Context
Do as follows on the switch that runs IS-IS:
Procedure
l Configuring the Preference of IS-IS
1.
Run:
system-view
The system view is displayed.
2.
Run:
isis [ process-id ]
The IS-IS view is displayed.
3.
Run:
preference preference
The preference of IS-IS is set.
This command is used to set the preference for IS-IS. The smaller the value is, the higher the preference is.
By default, the preference of IS-IS is 15.
A switch can run multiple routing protocols at the same time. When multiple routing protocols discover routes to the same destination, the protocol with the highest preference takes effect.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
316
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 7 IS-IS Configuration l Configuring the Preference of a Specified IS-IS Route
1.
Run:
system-view
The system view is displayed.
2.
Run:
isis [ process-id ]
The IS-IS view is displayed.
3.
Run:
preference route-policy route-policy-name
The preference of a specified IS-IS route is set according to the routing policy.
l Configuring the Preference of IS-IS Equal-Cost Routes
1.
Run:
system-view
The system view is displayed.
2.
Run:
isis [ process-id ]
The IS-IS view is displayed.
3.
Run:
nexthop ip-address weight value
The preference of IS-IS load balancing is set.
After the equal-cost routes of IS-IS are calculated through the SPF algorithm, you can run the nexthop command to choose the route of the highest preference among the equal-cost routes as the next hop. The smaller the weight is, the higher the routing preference is.
By default, the weight is 255. It indicates that the load balancing is performed among the equal-cost routes without distinguishing preferences.
l Configuring the Convergence Priority of IS-IS Routes
1.
Run:
system-view
The system view is displayed.
2.
Run:
isis [ process-id ]
The IS-IS view is displayed.
3.
Run:
prefix-priority [ level-1 | level-2 ] { critical | high | medium } { ip-
prefix prefix-name | tag tag-value }
Convergence priorities are set for IS-IS routes.
By default, the convergence priority of 32-bit IS-IS host routes is medium and that of other IS-IS routes is low.
The application rule of the convergence priority for IS-IS routes are as follows:
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
317
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
7 IS-IS Configuration
– For the existing IS-IS routes, IS-IS resets the convergence priority for the routes according to the configuration results of the prefix-priority command.
–
For the new IS-IS routes, IS-IS sets the convergence priority for the routes according to the filtering results of the prefix-priority command.
–
If an IS-IS route conforms to the matching rules of multiple convergence priorities, the convergence priority of this IS-IS route is the top convergence priority.
– The convergence priority of Level-1 routes is higher than that of Level-2 routes.
– If Level is not specified, IS-IS configured the convergence priority of Level-1 routes and Level-2 routes.
NOTE
4.
Run:
quit
This command takes effect only on the public network.
If the convergence priority of IS-IS routes except the 32-bit IS-IS host routes is set by using the prefix-priority command, the default convergence priority of 32-bit IS-IS host routes changes from medium to low. The convergence priorities of IS-IS routes are changes with the configuration of the prefix-priority command.
The system view is displayed.
5.
(Optional) Run:
ip route prefix-priority-scheduler critical-weight high-weight medium-
weight low-weight
The scheduling ratio of IPv4 routes by priority is set.
By default, the scheduling ratio of IPv4 routes by priority is 8:4:2:1.
----End
7.6.4 Checking the Configuration
After configuring IS-IS route attributes, you can check the cost of IS-IS interfaces and preferences of IS-IS routes.
Prerequisite
The configurations of IS-IS Route Attributes are complete.
Procedure
l Run display isis interface [ [ verbose | traffic-eng ]
*
| tunnel ] [ process-id | [ vpn-
instance vpn-instance-name | vpn6-instance vpn6-instance-name ]
*
] command to check information about the interface enabled with IS-IS.
l Run display isis route [ process-id | [ vpn-instance vpn-instance-name | vpn6-instance
vpn6-instance-name ]
*
] [ ipv4 ] [ verbose | [ level-1 | level-2 ] | ip-address [ mask | mask-
length ] ]
*
command to check information about the convergence priority of IS-IS routes.
----End
Example
Set IPv4 cost and IPv6 cost to 20 on VLANIF10. Run the display isis interface verbose command. The display is as follows:
Issue 01 (2011-10-26) 318
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 7 IS-IS Configuration
<Quidway> display isis interface verbose
Interface information for ISIS(1)
---------------------------------
Interface Id IPV4.State IPV6.State MTU Type DIS
Vlanif10 001 Mtu:Up/Lnk:Dn/IP:Dn Down 1497 L1/L2 No/No
Description : HUAWEI, Quidway Series, Vlanif10 Interface
SNPA Address : 00e0-c72d-da01
IP Address : 123.1.1.1
IPV6 Link Local Address :
IPV6 Global Address(es) :
Csnp Timer Value : L1 10 L2 10
Hello Timer Value : L1 20 L2 10
DIS Hello Timer Value : L1 3 L2 3
Hello Multiplier Value : L1 3 L2 3
LSP-Throttle Timer : L12 50
Cost : L1 20 L2 20
Ipv6 Cost : L1 20 L2 20
Priority : L1 64 L2 64
Retransmit Timer Value : L12 5
Bandwidth-Value : Low1000000000 High 0
Static Bfd : NO
Dynamic Bfd : NO
Fast-Sense Rpr : NO
Set the convergence priorities of the imported routes 10.10.10.0/24 to Critical. The display is as follows:
<Quidway> display isis route verbose
Route information for ISIS(1)
-----------------------------
ISIS(1) Level-2 Forwarding Table
--------------------------------
IPV4 Dest : 10.10.10.0/24 Int. Cost : 20 Ext. Cost : NULL
Admin Tag : - Src Count : 2 Flags : A/-/-
Priority : Critical
NextHop : Interface : ExitIndex :
1.1.1.2 Vlanif10 0x80000001
IPV4 Dest : 1.1.1.0/24 Int. Cost : 10 Ext. Cost : NULL
Admin Tag : - Src Count : 2 Flags : D/-/L
Priority : Medium
NextHop : Interface : ExitIndex :
Direct Vlanif10 0x00000000
IPV4 Dest : 20.20.20.0/24 Int. Cost : 20 Ext. Cost : NULL
Admin Tag : - Src Count : 2 Flags : A/-/-
Priority : Low
NextHop : Interface : ExitIndex :
1.1.1.2 Vlanif10 0x80000001
Flags: D-Direct, A-Added to URT, L-Advertised in LSPs, U-Up/Down Bit Set
7.7 Controlling the Advertisement of IS-IS Routes
By configuring route leaking and route aggregation and configuring routers to generate default routes, you can control the advertisement of IS-IS routes with different levels in different areas, and control the number of IS-IS routing entries.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
319
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 7 IS-IS Configuration
7.7.1 Establishing the Configuration Task
Before controlling the advertisement of IS-IS routes, familiarize yourself with the applicable environment, complete the pre-configuration tasks, and obtain the required data. This can help you complete the configuration task quickly and accurately.
Applicable Environment
This section describes how to control the advertisement of IS-IS routing information, such as the advertisement of aggregated routes, generation of default routes, and configurations of route leaking.
Pre-configuration Tasks
Before configuring to control the advertisement of IS-IS routing information, complete the following tasks: l Configuring IP addresses of interfaces to make neighboring nodes reachable l
7.3 Configuring Basic IS-IS Functions
Data Preparation
To control the advertisement of IS-IS routing information, you need the following data.
No.
Data
1 Routes to be aggregated
2 Types of route leaking
7.7.2 Configuring IS-IS Route Aggregation
Summarizing multiple routes with the same IP prefix into one route can reduce the number of
IS-IS routing entries.
Context
Do as follows on the switch that runs IS-IS:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
isis [ process-id ]
The IS-IS view is displayed.
Step 3 Run:
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
320
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 7 IS-IS Configuration
summary ip-address mask [ avoid-feedback | generate_null0_route | tag tag |
[ level-1 | level-1-2 | level-2 ]]
*
IS-IS route aggregation is configured.
----End
7.7.3 Configuring IS-IS to Generate Default Routes
By configuring IS-IS to generate default routes, you can control the advertisement of IS-IS routes.
Context
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
isis [ process-id ]
The IS-IS view is displayed.
Step 3 Run:
default-route-advertise [ always | match default | route-policy route-policy-name ]
[ cost cost | tag tag | [ level-1 | level-1-2 | level-2 ] ]
*
[ avoid-learning ]
IS-IS is configured to generate default routes.
----End
7.7.4 Controlling the Route Leaking from a Level-2 Area to a Level-1
Area
By configuring IS-IS route leaking from a Level-2 area to a Level-1 area, you can leak Level-2 routes and level-1 routes in other areas to a Level-1 area.
Context
The level of the switch determines the level of the default routes. The default routes generated through this command are advertised only to the switches of the same level. Through the routing policy, you can configure the switch to generate a default route forcibly only when there is a route matching the policy in the routing table.
Do as follows on the switch that runs IS-IS:
After IS-IS route leaking is enabled, a Level-1-2 router can leak its routes that meet the requirements from a Level-2 area to a Level-1 area, and can advertise routing information through Level-1 LSPs.
Do as follows on the Level-1-2 router that runs IS-IS:
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
321
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 7 IS-IS Configuration
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
isis [ process-id ]
The IS-IS view is displayed.
Step 3 Run:
import-route isis level-2 into level-1 [ tag tag | filter-policy { acl-number | acl-
name acl-name | ip-prefix ip-prefix-name | route-policy route-policy-name } ]
*
IS-IS route leaking is enabled.
Routes of Level-2 area and those of other Level-1 areas can be leaked to the Level-1 area where the router resides.
The command is run on the Level-1-2 router which is connected to external areas. By default,
Level-2 routes are not leaked to a Level-1 area.
----End
7.7.5 Controlling the Route Leaking from a Level-1 Area to a Level-2
Area
By configuring IS-IS route leaking from a Level-1 area to a Level-2 area, you can prevent route leaking from a Level-1 area to a Level-2 area, and thus effectively control Level-2 routes.
Context
Do as follows on the Level-1-2 router that runs IS-IS:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
isis [ process-id ]
The IS-IS view is displayed.
Step 3 Run:
import-route isis level-1 into level-2 [ tag tag | filter-policy { acl-number | acl-
name acl-name | ip-prefix ip-prefix-name | route-policy route-policy-name } ]
*
The routing policy is configured to prevent route leaking from Level-1 area to Level-2 area.
You can use the undo import-route isis level-1 into level-2 command to prevent route leaking from Level-1 area to Level-2 area.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
322
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 7 IS-IS Configuration
This command is run on the Level-1-2 router that is connected to external areas. By default, all the routing information (except information about the default route) leaked from a Level-1 area to a Level-2 area.
----End
7.7.6 Checking the Configuration
After configuring route leaking and route aggregation and configuring routers to generate default routes, you can check the configuration by viewing detailed information about the IS-IS routing table and IS-IS routes.
Prerequisite
The configurations of Controlling the Advertisement of IS-IS Routes are complete.
Procedure
l Run display isis route [ process-id | [ vpn-instance vpn-instance-name | vpn6-instance
vpn6-instance-name ]
*
] [ ipv4 ] [ verbose | [ level-1 | level-2 ] | ip-address [ mask | mask-
length ]
*
] command to check the IS-IS routing information.
l Run display isis lsdb [ { level-1 | level-2 } | verbose | { local | lsp-id | is-name symbolic-
name } ]
*
[ process-id | [ vpn-instance vpn-instance-name | vpn6-instance vpn6-instance-
name ]
*
] command to check the information about the IS-IS LSDB.
----End
Example
Configure IS-IS process 1 to leak routes from a Level-2 area to a Level-1 area. Run display isis
route the command. The display is as follows:
<Quidway> display isis route
Route information for ISIS(1)
-----------------------------
ISIS(1) Level-1 Forwarding Table
--------------------------------
IPV4 Destination IntCost ExtCost ExitInterface NextHop Flags
--------------------------------------------------------------------------------
10.10.20.0/24 20 NULL Vlanif10 10.10.10.1 A/-/L
10.10.10.0/24 10 NULL Vlanif10 Direct D/-/L
Flags: D-Direct, A-Added to URT, L-Advertised in LSPs,U-Up/Down Bit Set
ISIS(1) Level-2 Forwarding Table
--------------------------------
IPV4 Destination IntCost ExtCost ExitInterface NextHop Flags
--------------------------------------------------------------------------------
10.10.20.0/24 20 NULL Vlanif10 10.10.10.1 A/-/L
10.10.10.0/24 10 NULL Vlanif10 Direct D/-/L
Flags: D-Direct, A-Added to URT, L-Advertised in LSPs, U-Up/Down Bit Set
7.8 Controlling the Receiving of IS-IS Routes
By configuring IS-IS to filter routing information, you can control the number of IS-IS routes to be added to the IP routing table and the number of imported routes to be added to the IS-IS routing table.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
323
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 7 IS-IS Configuration
7.8.1 Establishing the Configuration Task
Before controlling the receiving of IS-IS routes, familiarize yourself with the applicable environment, complete the pre-configuration tasks, and obtain the required data. This can help you complete the configuration task quickly and accurately.
Applicable Environment
This section describes how to control the receiving of IS-IS routing information, such as filtering of the received routes and importing external routes.
Pre-configuration Tasks
Before controlling the receiving of IS-IS routing information, complete the following tasks: l
Configuring IP addresses of interfaces to make neighboring nodes reachable l
7.3 Configuring Basic IS-IS Functions
Data Preparation
To control the receiving of IS-IS routing information, you need the following data.
No.
Data
1 Filtering list used to filter routing information
2 Protocol name and the process number of the external routes to be imported
7.8.2 Configuring IS-IS to Filter the Received Routes
By configuring IS-IS to filter the received routes, you can control the number of IS-IS routes to be added to the IP routing table, and thus reduce the size of the IP routing table.
Context
Do as follows on the switch that runs IS-IS:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
isis [ process-id ]
The IS-IS view is displayed.
Step 3 Run:
filter-policy { acl-number | acl-name acl-name | ip-prefix ip-prefix-name | route-
policy route-policy-name } import
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
324
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 7 IS-IS Configuration
IS-IS is configured to filter the received routes to determine which routes are to be added to the
IP routing table.
----End
7.8.3 Configuring IS-IS to Import External Routes
By configuring IS-IS to import routes, you can enable IS-IS to learn routing information of other protocols or other IS-IS processes.
Context
IS-IS regards the routes discovered by the other routing protocols or other IS-IS processes as external routes. When routes of other protocols are imported, the default costs of the imported routes can be specified.
Do as follows on the switch that runs IS-IS:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
isis [ process-id ]
The IS-IS view is displayed.
Step 3 Configuring IS-IS to Import External Routes
If you want to set the cost for the imported route, you can run the import-route protocol
[ process-id ] [ cost-type { external | internal } | cost cost | tag tag | route-policy route-policy-
name | [ level-1 | level-2 | level-1-2 ] ]
*
command to import the external routes.
If you want to keep the original cost for the imported route, you can run the import-route
{ { rip | isis | ospf } [ process-id ] | bgp } inherit-cost [ tag tag | route-policy route-policy-
name | [ level-1 | level-2 | level-1-2 ] ]
*
command to import the external routes.
Step 4 Run:
filter-policy
{ acl-number | acl-name acl-name | ip-prefix ip-prefix-name | route-policy route-
policy-name } export [ protocol [ process-id ] ]
Imported routes are filtered before being advertised.
If no level is specified in the import-route command, the routes are imported to the Level-2 routing table by default.
----End
7.8.4 Checking the Configuration
After configuring IS-IS to filter the received routes and the imported external routes, you can check the configuration by viewing the IS-IS routing table and IP routing table.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
325
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Prerequisite
7 IS-IS Configuration
The configurations of Controlling the Receiving of IS-IS Routes are complete.
Procedure
l Run display isis lsdb [ { level-1 | level-2 } | verbose | { local | lsp-id | is-name symbolic-
name } ]
*
[ process-id | [ vpn-instance vpn-instance-name | vpn6-instance vpn6-instance-
name ]
*
] command to check information about IS-IS LSDB.
l Run display isis route [ process-id | [ vpn-instance vpn-instance-name | vpn6-instance
vpn6-instance-name ]
*
] [ ipv4 ] [ verbose | [ level-1 | level-2 ] | ip-address [ mask | mask-
length ] ]
*
command to check IS-IS routing information.
----End
Example
Run the display isis route command. If the IS-IS neighbor relationship is correctly set up, you can find that IS-IS process 1 on the local switch imports static route 169.1.1.0/24.
<Quidway> display isis route
ISIS(1) Level-2 Forwarding Table
--------------------------------
IPV4 Destination IntCost ExtCost ExitInterface NextHop Flags
--------------------------------------------------------------------------------
123.1.1.0/24 10 NULL Vlanif10 Direct D/-/L/-
Flags: D-Direct, A-Added to URT, L-Advertised in LSPs, S-IGP Shortcut,
U-Up/Down Bit Set
ISIS(1) Level-2 Redistribute Table
----------------------------------
Type IPV4 Destination IntCost ExtCost Tag
--------------------------------------------------------------------------------
S 169.1.1.0/24 0 NULL
Type: D-Direct, I-ISIS, S-Static, O-OSPF, B-BGP, R-RIP, U-UNR
7.9 Adjusting and Optimizing an IS-IS Network
By adjusting and optimizing IS-IS, you can enable IS-IS to meet the requirements of complicated networks.
7.9.1 Establishing the Configuration Task
Before adjusting and optimizing IS-IS, familiarize yourself with the applicable environment, complete the pre-configuration tasks, and obtain the required data. This can help you complete the configuration task quickly and accurately.
Applicable Environment
This section mainly describes the adjustment and optimization of an IS-IS network. The details are as follows: l Configuring levels of IS-IS interfaces and interface status l Adjusting SPF parameters l Configuring the IS-IS dynamic hostname mapping and the authentication functions to meet the requirements of users for security and maintenance
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
326
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 7 IS-IS Configuration
Pre-configuration Tasks
Before adjusting and optimizing an IS-IS network, complete the following tasks: l Configuring IP addresses of interfaces to make neighboring nodes reachable l
7.3 Configuring Basic IS-IS Functions
Data Preparation
To adjust and optimize an IS-IS network, you need the following data.
No.
Data
1 Levels of IS-IS interfaces
2 Mapping between a system ID and a hostname
7.9.2 Configuring the Level of an IS-IS Interface
By configuring the level of an IS-IS interface, you can determine the level of the neighbor relationship established between the IS-IS interface and its remote end.
Context
Do as follows on the switch that runs IS-IS:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
interface vlanif interface-number
The interface view is displayed.
Step 3 Run:
isis circuit-level [ level-1 | level-1-2 | level-2 ]
The level of the interface is set.
By default, the level of the interface is level-1-2.
NOTE
Only the current router is a Level-1-2 router, changing the circuit level of the interface is useful. If the current router is not a Level-1-2 router, the level of the router determines the level of the established adjacency.
----End
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
327
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 7 IS-IS Configuration
7.9.3 Setting the Status of IS-IS Interface to Suppressed
By setting the status of an IS-IS interface to silent, you can enable the interface to advertise only direct routes and not to receive or send IS-IS routes. In this manner, the propagation of unnecessary packets on IS-IS networks is controlled.
Context
When an IS-IS network is connected to other ASs, IS-IS needs to be enabled on the outgoing interface, so that the switches inside the area can learn the routes to other ASs. The interface, however, sends IS-IS Hello packets to the network segment where the interface resides, which is unnecessary. You can then run the isis silent command to enable the suppression function on the IS-IS interface.
Do as follows on the switch that runs IS-IS:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
interface interface-type interface-number
The interface view is displayed.
Step 3 Run:
isis silent
The status of the IS-IS interface is set to suppressed.
When the status of the IS-IS interface becomes suppressed, the interface does not send or receives any IS-IS packet. The routes of the network segment where the interface resides can still be advertised to other switches inside the AS.
NOTE
If the status of IS-IS protocol on the interfaces in the area is Down, the switches within the area cannot learn the routes to other ASs.
----End
7.9.4 Configuring SPF Parameters
By setting SPF parameters, you can adjust the interval for calculating IS-IS routes, and thus avoid the network flapping caused by frequent route calculation.
Context
Do as follows on the switch that runs IS-IS:
Procedure
l Configuring SPF Intelligent Timer
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
328
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 7 IS-IS Configuration
1.
Run:
system-view
The system view is displayed.
2.
Run:
isis [ process-id ]
The IS-IS view is displayed.
3.
Run:
timer spf max-interval [ init-interval [ incr-interval ]]
The SPF intelligent timer is configured.
The change regularity of the intelligent timer is as follows:
–
The delay time for the first SPF calculation is init-interval; the delay time for the second
SPF calculation is incr-interval. Then, each time the route changes, the delay time for
SPF calcultion is twice as the previous value until the delay time reches max-interval.
When the delay time for SPF calculation is max-interval for three times, or the ISIS process is restarted, the delay time decreases to init-interval.
– When incr-interval is unavailable, the delay time of the first SPF calculation is init-
interval; the delay time of the rest SPF calculation is max-interval. When the delay time of SPF calculation is max-interval for three times, or the ISIS process is restarted, the delay time decreases to init-interval.
–
When only max-interval is used, the intelligent timer becomes an one-short triggered timer.
l Configuring the Duration for SPF Calculation
1.
Run:
system-view
The system view is displayed.
2.
Run:
isis [ process-id ]
The IS-IS view is displayed.
3.
Run:
spf-slice-size duration-time
The duration for each SPF calculation is set.
When there are many routing entries (more than 150,000) in a routing table, the SPF calculation occupies the CPU for a long time. To avoid this, you can set the duration for each SPF calculation.
----End
7.9.5 Configuring LSP Fast Flooding
By configuring LSP fast flooding, you can speed up the convergence of IS-IS networks.
Context
Do as follows on the switch that runs IS-IS:
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
329
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
isis [ process-id ]
The IS-IS view is displayed.
Step 3 Run:
flash-flood [ lsp-count | max-timer-interval interval | [ level-1 | level-2 ] ]
*
LSP flash-flood is enabled.
You can run the flash-flood command to speed up LSP flooding. The parameter lsp-count is used to specify the number of LSPs flooded each time, which is applicable for all interfaces. If the number of the LSPs to be sent is greater than lsp-count, the value of lsp-count takes effect.
You can specify the number of LSPs flooded each time for all the interfaces. If the number of
LSPs to be sent exceeds this number, the specified number LSPs are flooded. If the configured timer does not time out before route calculation, the LSPs are flooded immediately; otherwise, the LSPs are sent when the timer times out.
When LSP fast flooding is configured, Level-1 LSPs and Level-2 LSPs are fast flooded if the level is not specified.
----End
7.9.6 Configuring IS-IS Dynamic Hostname Mapping
By configuring IS-IS dynamic hostname mapping, you can improve the maintainability and facilitate the maintenance of IS-IS networks.
Context
7 IS-IS Configuration
Do as follows on the switch that runs IS-IS:
Procedure
l Configuring the Hostname for the Local IS
1.
Run:
system-view
The system view is displayed.
2.
Run:
isis [ process-id ]
The IS-IS view is displayed.
3.
Run:
is-name symbolic-name
The hostname of the local IS is configured.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
330
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 7 IS-IS Configuration
This command is used to configure a name for the local IS-IS process and to enable the mapping from the system ID to the hostname. The configured name is advertised to the other switches in the area through LSPs.
You must run the is-name command before enabling the dynamic hostname mapping for the IS-IS process; otherwise, the display command cannot display the mapping between the system ID and the hostname.
l Configuring the Hostname for the Remote IS
1.
Run:
system-view
The system view is displayed.
2.
Run:
isis [ process-id ]
The IS-IS view is displayed.
3.
Run:
is-name map system-id symbolic-name
The hostname for the remote IS is configured.
This command is used to locally configure the name for the remote IS-IS router. Each system ID is corresponding to only one name.
If any switch in the network advertises the mapping between the hostname and the system ID in its LSPs, that mapping overrides the static mapping on the local router.
l Configuring the Hostname for the DIS
1.
Run:
system-view
The system view is displayed.
2.
Run:
interface interface-type interface-number
The interface view is displayed.
3.
Run:
isis dis-name symbolic-name
The hostname of the DIS is configured.
This configuration takes effect only on the DIS. The interface on which isis dis-
name command is used advertises the configured name to the network connected to the interface through a pseudo-node LSP. The configured name is thus associated with the system ID of a specified switch. This command does not take effect on P2P interfaces.
----End
7.9.7 Configuring the LSDB Overload Bit
LSPs with the overload bit are still flooded on the network, but the LSPs are not used when routes that pass through a Switch configured with the overload bit are calculated.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
331
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
7 IS-IS Configuration
Context
Do as follows on the switch that runs IS-IS:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
isis [ process-id ]
The IS-IS view is displayed.
Step 3 Run:
set-overload [ on-startup [ timeout1 | start-from-nbr system-id [ timeout1
[ timeout2 ] ] | wait-for-bgp [ timeout1 ] ] ] [ allow ] ] [ allow { interlevel |
external }
*
]
The overload bit is configured.
----End
Follow-up Procedure
Though the LSPs configured with the overload bit are flooded in the network, the LSPs are not used when the routes that pass the overload Switch are calculated. That is, after a switch is configured with the overload flag, other switches ignore the switch when performing SPF calculation. The direct routes on the switch, however, cannot be ignored.
If a switch in an IS-IS domain is faulty, route calculation is incorrect in the entire area. To avoid this problem, you can set the overload bit for this switch to isolate it from the IS-IS network temporarily. You can thus locate the fault easily.
7.9.8 Configuring the Output of the Adjacency Status
After the output of the IS-IS adjacency status is enabled, the changes in IS-IS adjacencies are output to the configuration terminal until the output of the adjacency status is disabled.
Context
After the local terminal monitor is enabled and the output of the adjacency status is enabled, the changes of the IS-IS adjacency status are output on the terminal until the output is disabled.
Do as follows on the switch that runs IS-IS:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
isis [ process-id ]
Issue 01 (2011-10-26) 332
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 7 IS-IS Configuration
The IS-IS view is displayed.
Step 3 Run:
log-peer-change
The output of the adjacency status is enabled.
----End
7.9.9 Checking the Configuration
After adjusting and optimizing IS-IS, you can check the IS-IS mesh group, dynamic hostname,
SPF logs, SPF tree, TE information, and IS-IS statistics.
Prerequisite
The configurations of Adjusting and Optimizing an IS-IS Network are complete.
Procedure
l Run display isis mesh-group [ process-id | [ vpn-instance vpn-instance-name | vpn6-
instance vpn6-instance-name ]
*
] command to check the IS-IS mesh-group.
l Run display isis name-table [ process-id | [ vpn-instance vpn-instance-name | vpn6-
instance vpn6-instance-name ]
*
] command to check the mapping table in which the hostname of the local router is mapped to a system ID.
l Run display isis spf-log [ process-id | [ vpn-instance vpn-instance-name | vpn6-
instance vpn6-instance-name ]
*
] [ ipv6 | [ level-1 | level-2 ] | verbose ]
*
command to check SPF logs of IS-IS.
l Run display isis [ process-id ] spf-tree statistics [ [ level-1 | level-2 ] | ipv6 ]
*
[ vpn-
instance vpn-instance-name | vpn6-instance vpn6-instance-name ]
*
command to check the SPF tree of IS-IS.
l Check the statistics about the Traffic Engineering:
– display isis traffic-eng advertisements [ { level-1 | level-2 | level-1-2 } | { lsp-id |
local } ]
*
[ process-id | [ vpn-instance vpn-instance-name | vpn6-instance vpn6-
instance-name ]
*
]
– display isis traffic-eng link [ { level-1 | level-2 | level-1-2 } | verbose ]
*
[ process-id
| [ vpn-instance vpn-instance-name | vpn6-instance vpn6-instance-name ]
*
]
– display isis traffic-eng network [ level-1 | level-2 | level-1-2 ] [ process-id | [ vpn-
instance vpn-instance-name | vpn6-instance vpn6-instance-name ]
*
]
–
display isis traffic-eng statistics [ process-id | [ vpn-instance vpn-instance-name |
vpn6-instance vpn6-instance-name ]
*
]
– display isis traffic-eng sub-tlvs [ process-id | [ vpn-instance vpn-instance-name |
vpn6-instance vpn6-instance-name ]
*
] l Check the statistics about the IS-IS process:
–
display isis statistics [ level-1 | level-2 | level-1-2 ] [ process-id | [ vpn-instance vpn-
instance-name | vpn6-instance vpn6-instance-name ]
*
]
–
display isis statistics packet [ interface interface-type interface-number ]
– display isis process-id statistics [ level-1 | level-2 | level-1-2 | packet ]
----End
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
333
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Example
7 IS-IS Configuration
Run the display isis name-table 1 command, and you can find that the IS hostname of the local router is abc.
<Quidway> display isis name-table 1
Name table information for ISIS(1)
System ID Hostname Type
-------------------------------------------------------------------------------
1111.1111.1111 abc DYNAMIC
7.10 Configuring Local MT
By configuring local MT, you can enable multicast packets to be forwarded through TE tunnels on IS-IS networks.
7.10.1 Establishing the Configuration Task
Before configuring IS-IS local MT, familiarize yourself with the applicable environment, complete the pre-configuration tasks, and obtain the required data. This can help you complete the configuration task quickly and accurately.
Applicable Environment
If multicast and an MPLS TE tunnel are deployed in a network, multicast packets may be forwarded through the TE tunnel. As a result, the switches spanned by the TE tunnel cannot detect the transmission of multicast packets, and thus the switches cannot create any multicast forwarding entry. You can configure local MT function and enable IGP Shortcut on the TE tunnel to avoid the preceding problem. In this manner, a correct MIGP routing table can be created to guide the forwarding of multicast packets.
NOTE
Local MT can be configured only in the IS-IS process of the public network instance. In this case,
Forwarding Advertise cannot be configured.
Pre-configuration Tasks
Before configuring IS-IS local MT, complete the following tasks: l Configuring IP addresses for interfaces to ensure network connectivity between neighboring nodes l
Configuring Basic IS-IS Functions
Data Preparation
To configure local MT, you need the following data.
No.
Data
1 Filtering list used to filter IS-IS routing information
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
334
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 7 IS-IS Configuration
7.10.2 Enabling Local MT
The nodes along the TE tunnel can detect multicast packets and create multicast forwarding entries only after local MT is enabled.
Context
Do as follows on the switch that needs to forward multicast packets and is configured with the
TE tunnel enabled with IGP-Shortcut:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
isis [ process-id ]
The IS-IS view is displayed.
Step 3 Run:
cost-style { compatible [ relax-spf-limit ] | wide | wide-compatible }
The cost type is configured.
Step 4 Run:
traffic-eng
TE is configured.
Step 5 Run:
local-mt enable
Local MT is enabled.
----End
7.10.3 Controlling the Scale of the MIGP Routing Table
By configuring the filtering policy based on multicast source addresses, you can configure routers to add only the routes destined to the specified multicast source address to the MIGP routing table, thus controlling the size of the MIGP routing table.
Context
After creating the MIGP routing table by
, IS-IS performs route calculation.
When the outgoing interface of the next hop calculated is an interface of the TE tunnel enabled with IGP Shortcut, a switch uses the physical interface as the outgoing interface of the next hop and saves it to the MIGP routing table.
To make the scale of the MIGP routing table reasonable and accelerate the speed for searching the MIGP routing table, you can configure the filtering policy based on multicast source addresses. Only the routes to multicast source addresses are added to the MIGP table.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
335
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 7 IS-IS Configuration
NOTE
You can configure the routing policy before enabling local MT. This prevents the routes that are not sent to the multicast source address from being added to the MIGP routing table.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
isis [ process-id ]
The IS-IS view is displayed.
Step 3 Run:
local-mt filter-policy { acl { acl-number | acl-name } | ip-prefix ip-prefix-name }
The local MT routing policy is configured.
----End
7.10.4 Checking the Configuration
After configuring local MT, you can check the MIGP routing table, routing information, SPF tree, and IS-IS statistics.
Prerequisite
The configurations of Local MT are complete.
Procedure
l Run display isis [ process-id ] migp-routing [ ip-address [ mask | mask-length ] |
{ level-1 | level-2 } | verbose ]
*
command to check the IS-IS MIGP routing table.
l Run display isis route [ process-id | [ vpn-instance vpn-instance-name | vpn6-instance
vpn6-instance-name ]
*
] [ ipv4 ] [ verbose | [ level-1 | level-2 ] | ip-address [ mask | mask-
length ] ]
*
command to check the IS-IS routing information.
l Run display isis [ process-id ] spf-tree statistics [ [ level-1 | level-2 ] | ipv6 ]
*
[ vpn-
instance vpn-instance-name | vpn6-instance vpn6-instance-name ]
*
command to check the SPF tree of IS-IS.
l Check the statistics of the IS-IS process.
–
display isis statistics [ level-1 | level-2 | level-1-2 ] [ process-id | [ vpn-instance vpn-
instance-name | vpn6-instance vpn6-instance-name ]
*
]
– display isis statistics packet [ interface interface-type interface-number ]
– display isis process-id statistics [ level-1 | level-2 | level-1-2 | packet ]
----End
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
336
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Example
7 IS-IS Configuration
Configure the MIGP routing table to allow only the routes to the destination 192.168.3.0/24 to pass. Run the display isis migp-routing command. The display is as follows:
<Quidway> display isis migp-routing
MIGP Route information for ISIS(1)
----------------------------------
ISIS(1) Level-2 Forwarding Table
--------------------------------
IPV4 Destination IntCost ExtCost ExitInterface NextHop Flags
--------------------------------------------------------------------------------
192.168.3.0/24 40 NULL GE2/0/0 10.0.1.1 A/-
Flags: A-Added to MIGP, U-Up/Down Bit Set
7.11 Configuring IS-IS IPv6
This section describes how to enable the IPv6 capability for IS-IS and adjust IS-IS IPv6 route selection.
7.11.1 Establishing the Configuration Task
Before configuring IS-IS IPv6, familiarize yourself with the applicable environment, complete the pre-configuration tasks, and obtain the required data. This can help you complete the configuration task quickly and accurately.
Applicable Environment
IS-IS supports multiple types networking layer protocols, including IPv6. In an IPv6 network, you can implement interconnection by configuring IS-IS.
The functions and configurations of most attributes of IS-IS IPv6 routes are similar to those of
IS-IS IPv4 routes. This section lists only configuration procedures.
Pre-configuration Tasks
Before configure IS-IS IPv6, complete the following tasks: l Enabling global IPv6 in the system view l Configuring IPv6 addresses of interfaces to make neighboring nodes reachable l
7.3.2 Starting an IS-IS Process
l
Data Preparation
To configure IS-IS IPv6, you need the following data.
2
3
No.
Data
1 Preference value of IS-IS
Aggregated IS-IS route
The filtering list that is needed to filter the IS-IS routing information and the name of the routing policy
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
337
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 7 IS-IS Configuration
No.
Data
4 The name and the process number of the external IPv6 routing protocol to be imported
7.11.2 Enabling IPv6 on an IS-IS Process
Before configuring IS-IS IPv6, you need to enable the IPv6 capability of an IS-IS process.
Context
To enable IS-IS, you must first create an IS-IS process and then enable IPv6.
Do as follows on the switch that runs IS-IS:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
isis [ process-id ]
An IS-IS process is enabled and the IS-IS view is displayed.
Step 3 Run:
ipv6 enable
IPv6 is enabled on the IS-IS process.
----End
7.11.3 Enabling IPv6 on an IS-IS Interface
Enabling IPv6 for an interface can associate the interface with the IS-IS process ID.
Context
After IPv6 is enabled in the IS-IS process, you also need to enable IPv6 of a specified IS-IS interface.
Do as follows on the switch that runs IS-IS:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
interface interface-type interface-number
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
338
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
The interface view is displayed.
Step 3 Run:
isis ipv6 enable [ process-id ]
IS-IS IPv6 is enabled on the interfaces.
----End
7.11.4 Configuring the IPv6 Route Cost on an Interface
Setting the IPv6 route cost for an interface affects IS-IS route selection.
Context
Do as follows on the switches that runs IS-IS:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
interface interface-type interface-number
The interface view is displayed.
Step 3 Run:
isis ipv6 cost cost
The IPv6 route cost of the link is set.
The cost is used for SPF calculation in an IPv6 topology.
----End
7.11.5 Configuring the Attributes of IS-IS IPv6 Routes
Configuring IS-IS IPv6 routing features affects IS-IS route selection.
Context
To perform IPv6-related configurations, you must enable IPv6.
Do as follows on the switch that runs IS-IS:
Procedure
l Configuring the preference of IS-IS IPv6 routes
1.
Run:
system-view
The system view is displayed.
2.
Run:
isis [ process-id ]
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
7 IS-IS Configuration
339
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 7 IS-IS Configuration
The IS-IS view is displayed.
3.
Run:
ipv6 preference {route-policy route-policy-name | preference }
*
The preference of IS-IS IPv6 routes is set.
l Configuring IS-IS IPv6 route aggregation
1.
Run:
system-view
The system view is displayed.
2.
Run:
isis [ process-id ]
The IS-IS view is displayed.
3.
Run:
ipv6 summary ipv6-address prefix-length [ avoid-feedback |
generate_null0_route | tag tag | [ level-1 | level-1-2 | level-2 ]]
*
IS-IS IPv6 route aggregation is configured.
If no level is specified during IS-IS route aggregation, Level-2 routes are aggregated by default.
l Configuring IS-IS to generate default IPv6 routes
1.
Run:
system-view
The system view is displayed.
2.
Run:
isis [ process-id ]
The IS-IS view is displayed.
3.
Run:
ipv6 default-route-advertise [ always | match default | route-policy route-
policy-name ] [ cost cost | tag tag | [ level-1 | level-2 | level-1-2 ] ]
*
[ avoid-learning ]
IS-IS is configured to generate default IPv6 routes.
After this command is used, IS-IS generates default IPv6 routes and advertises them to IS-IS switches of related levels.
When IS-IS is configured to generate default IPv6 routes, the level of default IPv6 routes is Level-2 if no level is specified.
l Configuring IS-IS to filter the received routes to determine which routes are to be added to the IP routing table
1.
Run:
system-view
The system view is displayed.
2.
Run:
isis [ process-id ]
The IS-IS view is displayed.
3.
Run:
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
340
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
7 IS-IS Configuration
ipv6 filter-policy { acl6-name acl6-name | acl6-number | ipv6-prefix ipv6-
prefix-name | route-policy route-policy-name } import
IS-IS is configured to filter received IPv6 routes to determine which routes to be added to the IPv6 routing table.
l Configuring IS-IS to import IPv6 routes of other protocols
1.
Run:
system-view
The system view is displayed.
2.
Run:
isis [ process-id ]
The IS-IS view is displayed.
3.
Configuring IS-IS to import external IPv6 routes
If you want to set the cost for the imported IPv6 route, you can run the ipv6 import-
route protocol [ process-id ] [ cost cost ] [ tag tag ] [ route-policy route-policy-
name ] [ level-1 | level-2 | level-1-2 ] command to import the external IPv6 routes.
If you want to keep the original cost for the imported IPv6 route, you can run the ipv6
import-route { { ripng | isis | ospfv3 } [ process-id ] | bgp } inherit-cost [ tag tag |
route-policy route-policy-name | [ level-1 | level-2 | level-1-2 ] ]
*
command to import the external IPv6 routes.
4.
Run:
ipv6 filter-policy { acl6-name acl6-name | acl6-number | ipv6-prefix ipv6-
prefix-name | route-policy route-policy-name } export [ protocol [ process-
id ] ]
IS-IS is enabled to filter imported IPv6 routes when advertising them to other switches.
The ipv6 filter-policy export command usually works with the ipv6 import-route command. It filters only imported IPv6 routes to be advertised to other switches. If
protocol is not specified, the command filters the IPv6 routes imported from all the protocols. If protocol is specified, it filters only the IPv6 routes imported from a certain protocol.
If no level is specified in the ipv6 import-route command, IPv6 routes are imported to the Level-2 routing table.
l Configuring IS-IS route leaking
1.
Run:
system-view
The system view is displayed.
2.
Run:
isis [ process-id ]
The IS-IS view is displayed.
3.
Run:
ipv6 import-route isis level-2 into level-1 [ tag tag | filter-policy
{ acl6-number | acl6-name acl6-name | ipv6-prefix ipv6-prefix-name | route-
policy route-policy-name } ]
*
341
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
7 IS-IS Configuration
IS-IS IPv6 route leaking is enabled. IPv6 routes in Level-2 areas and other Level-1 areas can be leaked to the Level-1 area where the Level-1-2 router resides. This command is used on Level-1-2 routers connected to external areas.
NOTE
By default, IS-IS IPv6 routes in Level-1 areas are leaked to Level-2 areas.
----End
7.11.6 Checking the Configuration
After configuring IS-IS IPv6, you can check information about the IS-IS interface, LSDB, neighbor, routes, and statistics about the IS-IS process.
Prerequisite
The configurations of IS-IS IPv6 are complete.
Procedure
l Run the display isis interface [ [ verbose | traffic-eng ]
*
| tunnel ] [ process-id | [ vpn-
instance vpn-instance-name | vpn6-instance vpn6-instance-name ]
*
] command to check information about the IS-IS interface.
l
Run the display isis lsdb [ { level-1 | level-2 } | verbose | { local | lsp-id | is-name symbolic-
name } ]
*
[ process-id | [ vpn-instance vpn-instance-name | vpn6-instance vpn6-instance-
name ]
*
] command to check information about the LSDB.
l
Run the display isis peer [ verbose ] [ process-id | [ vpn-instance vpn-instance-name |
vpn6-instance vpn6-instance-name ]
*
] command to check information about the IS-IS neighbor.
l Run the display isis route [ process-id | [ vpn-instance vpn-instance-name | vpn6-
instance vpn6-instance-name ]
*
] ipv6 [ verbose | [ level-1 | level-2 ] | ipv6-address
[ prefix-length ] ]
*
command to check the IS-IS routing information.
l Check statistics about the IS-IS process.
– display isis statistics [ level-1 | level-2 | level-1-2 ] [ process-id | [ vpn-instance vpn-
instance-name | vpn6-instance vpn6-instance-name ]
*
]
–
display isis statistics packet [ interface interface-type interface-number ]
– display isis process-id statistics [ level-1 | level-2 | level-1-2 | packet ]
----End
Example
Run the display isis interface verbose command, and you can see that the cost of the IPv6 route on Gigabit Ethernet 1/0/0 is 15.
<Quidway> display isis interface verbose
Interface information for ISIS(1)
---------------------------------
Interface Id IPV4.State IPV6.State MTU Type DIS
GE1/0/0 001 Down Up 1497 L1/L2 No/No
Description : HUAWEI, Quidway Series, GE1/0/0 Interface
Circuit MT State : Standard
SNPA Address : 00e0-c72d-da01
Issue 01 (2011-10-26) 342
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
IP Address :
IPV6 Link Local Address : FF80::FFE0:FFFF:FE2D:DA01
IPV6 Global Address(es) : 2001::1/64
Csnp Timer Value : L1 10 L2 10
Hello Timer Value : L1 10 L2 10
DIS Hello Timer Value : L1 3 L2 3
Hello Multiplier Value : L1 3 L2 3
LSP-Throttle Timer : L12 50
Cost : L1 10 L2 10
Ipv6 Cost : L1 15 L2 15
Priority : L1 64 L2 64
Retransmit Timer Value : L12 5
Bandwidth-Value : Low 100000000 High 0
Static Bfd : NO
Dynamic Bfd : NO
Fast-Sense Rpr : NO
7 IS-IS Configuration
7.12 Configuring IS-IS Auto FRR
With IS-IS Auto FRR, traffic on a faulty link can be quickly switched to the backup link of the faulty link. This ensures that the traffic interruption time is within 50 ms and improves the reliability of IS-IS networks.
7.12.1 Establishing the Configuration Task
Before configuring IS-IS Auto FRR, familiarize yourself with the applicable environment, complete the pre-configuration tasks, and obtain the required data. This can help you complete the configuration task quickly and accurately.
Applicable Environment
At present, the VoIP and on-line video services require high-quality real-time transmission.
Nevertheless, if an IS-IS fault occurs, multiple processes, including fault detection, LSP update,
LSP flooding, route calculation, and FIB entry delivery, must be performed to switch the traffic to a new link. As a result, it takes much more than 50 ms to recover the link from the fault, which cannot meet the requirement for real-time services on the network.
IS-IS Auto FRR ensures fast switchover of traffic to the backup link before the network convergence, avoiding traffic interruption. This protects traffic and improves reliability of an
IS-IS network. The S9300 supports IPv4 IS-IS Auto FRR.
IS-IS Auto FRR is suitable for IP services that require a low delay and low packet loss ratio.
IS-IS Auto FRR supports the following scenarios: l IP protecting IP
, the link cost satisfies the inequality Distance_opt(B, D) <
Distance_opt(B, A) + Distance_opt(A, D). Distance_opt(X,Y) indicates the shortest path between node X and node Y. after IS-IS Auto FRR is configured, when the link between
Switch A and Switch C becomes faulty, traffic forwarded by Switch A is rapidly switched to the backup link.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
343
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 7 IS-IS Configuration
Figure 7-3 Networking diagram of IS-IS Auto FRR (IP protecting IP)
SwitchC
IS
-IS
co st
=
10
IS
-IS
co st =
10
SwitchA
SwitchD
IS
-IS
co st =
30
IS
-IS
c os t =
1
0
SwitchB
Traffic in normal
Traffic in case of failure l TE protecting IP
, the physical path Switch A->Switch B->Switch C has the smallest
IS-IS cost among all the paths from Switch A to Switch C. Therefore, Switch A selects this path as the primary path to Switch C. The TE tunnel has the second smallest IS-IS cost, and thus it becomes the backup path. When the link between Switch A and Switch B becomes faulty, configuring IS-IS auto FRR enables traffic to be rapidly switched to the backup path (TE tunnel).
Figure 7-4 Networking diagram of IS-IS Auto FRR (TE protecting IP)
SwitchA
TE Tunnel: IS-IS cost = 12
SwitchC
IS
-IS
co st =
10
IS-IS cost = 13
IS
-IS
c os t =
1
SwitchB
Traffic in normal
Traffic in case of failure
Issue 01 (2011-10-26) l IP protecting TE
, the TE tunnel has the smallest IS-IS cost among all the paths from
Switch A to Switch C. Therefore, Switch A selects the TE tunnel as the primary path to
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
344
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 7 IS-IS Configuration
Switch C. The path Switch A->Switch B->Switch C has the second smallest IS-IS cost.
Therefore, Switch A selects the path Switch A->Switch B->Switch C as the backup path, with the backup outbound interface being the physical outbound interface that connects
Switch A to Switch B. When the TE tunnel becomes faulty, configuring IS-IS auto FRR enables traffic to be rapidly switched to the backup path Switch A->Switch B->Switch C.
Figure 7-5 Networking diagram of IS-IS Auto FRR (IP protecting TE)
SwitchA
TE Tunnel: IS-IS cost = 1
SwitchC
IS
-IS
co st =
10
IS-IS cost = 13
IS
-IS
c os t =
1
SwitchB
Traffic in normal
Traffic in case of failure
Pre-configuration Tasks
Before configuring IS-IS Auto FRR, complete the following tasks: l Configuring IP addresses for interfaces to make neighboring nodes reachable at the network layer l
Configuring basic IS-IS functions
l Configuring the link cost to ensure that the backup path is the sub-optimal route.
Data Preparation
To configure IS-IS Auto FRR, you need the following data.
No.
1
2
Data
IS-IS process ID
Interface to be enabled with IS-IS Auto FRR
7.12.2 Enabling IS-IS Auto FRR
IS-IS can create the loop-free backup route only when the interface cost is in compliance with the traffic protection inequality of IS-IS Auto FRR.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
345
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
7 IS-IS Configuration
Context
Do as follows on the switch that needs the protection for the forwarded traffic:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
isis [ process-id ]
The IS-IS process is enabled and the IS-IS view is displayed.
Step 3 Run:
frr
The IS-IS FRR view is displayed.
Step 4 Run:
loop-free-alternate
IS-IS Auto FRR is enabled and the loop-free backup route is created.
If the IS-IS level is not specified, IS-IS Auto FRR is enabled on Level-1 and Level-2 to create the backup route.
For detailed information about IS-IS Auto FRR, refer to the Feature Description - IP Routing.
NOTE
IS-IS can create the loop-free backup route only if the interface cost is in compliance with the traffic protection inequality of IS-IS Auto FRR.
----End
7.12.3 (Optional) Disabling an Interface from Being Involved in
LFA Calculation
To facilitate network management and fault location, you can prevent certain interfaces from participating in the LFA calculation and specify the interfaces that can function as backup outbound interfaces.
Context
Do as follows on the IS-IS interface to be disabled from participating in the Loop-Free Alternate
(LFA) calculation:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
Issue 01 (2011-10-26) 346
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
7 IS-IS Configuration
interface interface-type interface-number
The interface view is displayed.
Step 3 Run:
undo isis lfa-backup
The interface is disabled from participating in the LFA calculation.
----End
7.12.4 Checking the Configuration
After configuring IS-IS Auto FRR, you can check the IS-IS backup route and traffic protection type.
Prerequisite
All IS-IS Auto FRR configurations are complete.
Procedure
l Run the display isis route [ process-id | [ vpn-instance vpn-instance-name | vpn6-
instance vpn6-instance-name ]
*
] [ ipv4 ] [ verbose | [ level-1 | level-2 ] | ip-address
[ mask | mask-length ] ]
*
command to check information about the primary link and backup link after IS-IS Auto FRR is enabled.
l Run the display isis spf-tree [ systemid systemid | dname dname ] [ [ level-1 | level-2 ] |
ipv6 | verbose ]
*
[ process-id | [ vpn-instance vpn-instance-name | vpn6-instance vpn6-
instance-name ]
*
] command to check the traffic protection type of IS-IS Auto FRR.
----End
Example
Enable IS-IS Auto FRR, and then check and find information about the backup outbound interface and the backup next hop of the route with the destination address as 100.1.1.0/24. The following is the check result:
<Quidway> display isis route 100.1.1.1 verbose
Route information for ISIS(1)
-----------------------------
ISIS(1) Level-1 Forwarding Table
--------------------------------
IPV4 Dest : 100.1.1.0/24 Int. Cost : 30 Ext. Cost : NULL
Admin Tag : - Src Count : 1 Flags : A/-/L/-/-
Priority : Low
NextHop : Interface : ExitIndex :
1.0.0.2 GE1/0/0 0x00000003
(B)2.0.0.2 GE2/0/0 0x00000004
Flags: D-Direct, A-Added to URT, L-Advertised in LSPs, S-IGP Shortcut,
U-Up/Down Bit Set, C-In Computing
ISIS(1) Level-2 Forwarding Table
--------------------------------
Issue 01 (2011-10-26) 347
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 7 IS-IS Configuration
IPV4 Dest : 100.1.1.0/24 Int. Cost : 30 Ext. Cost : NULL
Admin Tag : - Src Count : 3 Flags : -/-/-/-/-
Priority : Low
Flags: D-Direct, A-Added to URT, L-Advertised in LSPs, S-IGP Shortcut,
U-Up/Down Bit Set, C-In Computing
Enable IS-IS Auto FRR, and then check and find the traffic protection type for the switch with the system ID as 0000.0000.0004. The following is the check result:
<Quidway> display isis spf-tree systemid 0000.0000.0004 verbose
Shortest Path Tree for ISIS(1)
------------------------------
ISIS(1) Level-1 Shortest Path Tree
----------------------------------
0000.0000.0004.00
Distance : 20
Distance-URT : 20
Flags : SPT/V6_Islt
IPv4 Nexthops-URT : 1
(1) 1.0.0.2 IF:GE1/0/0 NBR:0000.0000.0003.00
(B) 2.0.0.2 IF:GE2/0/0 NBR:0000.0000.0002.00 TYPE:LOOP-FREE
PROTECT:LINK-NODE
IPv4 Nexthops-MIGP : 0
IPv6 Nexthops : 0
Neighbors: 2 (Children:1 Parents:1 Others:0)
(1) 0000.0000.0003.02
Cost : 10
Flags : Parent
(2) 0000.0000.0004.03
Cost : 10
Flags : Child
ISIS(1) Level-2 Shortest Path Tree
----------------------------------
0000.0000.0004.00
Distance : 20
Distance-URT : 20
Flags : SPT/V6_Islt
IPv4 Nexthops-URT : 1
(1) 1.0.0.2 IF:GE1/0/0 NBR:0000.0000.0003.00
(B) 2.0.0.2 IF:GE2/0/0 NBR:0000.0000.0002.00 TYPE:LOOP-FREE
PROTECT:LINK-NODE
IPv4 Nexthops-MIGP : 0
IPv6 Nexthops : 0
Neighbors: 2 (Children:1 Parents:1 Others:0)
(1) 0000.0000.0003.02
Cost : 10
Flags : Parent
(2) 0000.0000.0004.03
Cost : 10
Flags : Child
7.13 Configuring IS-IS GR
By configuring IS-IS GR, you can enable Switch to restart gracefully and avoid temporary black holes.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
348
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 7 IS-IS Configuration
7.13.1 Establishing the Configuration Task
Before configuring IS-IS GR, familiarize yourself with the applicable environment, complete the pre-configuration tasks, and obtain the required data. This can help you complete the configuration task quickly and accurately.
Applicable Environment
The restart of an IS-IS router causes the temporary interruption of the network, because the adjacency relationship between the switch and its neighbor is torn down. The LSPs packets of the switch are deleted, which makes route calculation inaccurate. Packets are thus lost.
You can configure IS-IS GR to solve this problem. After IS-IS GR is enabled, the switch notifies the neighbor of the restart status, and reestablishes the adjacency relationship with its neighbor without interrupting the forwarding.
The advantages of IS-IS GR are as follows: l When IS-IS restarts, the switch can resend connection requests to its neighbor. The adjacency relationship is not torn down.
l
Before LSPs packets are generated, GR minimizes the interference caused by waiting for the database synchronization.
l If the switch starts for the first time, the switch sets the overload bit in LSPs until the LSDB synchronization is complete. This avoids route black holes.
Pre-configuration Tasks
Before configuring IS-IS GR, complete the following tasks: l Configuring IP addresses for interfaces to ensure network connectivity between neighboring nodes l
Configuring Basic IS-IS Functions
Data Preparation
To configure IS-IS GR, you need the following data.
2
3
No.
Data
1 ID of an IS-IS process
Interval for reestablishing GR sessions
Whether to suppress the advertisement of the adjacency when the GR restarter restarts
7.13.2 Enabling IS-IS GR
Before configuring IS-IS GR, you need to enable the GR capability for IS-IS.
Context
Do as follows on the switch that runs IS-IS:
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
349
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 7 IS-IS Configuration
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
isis [ process-id ]
The IS-IS view is displayed.
Step 3 Run:
graceful-restart
IS-IS GR is enabled.
By default, IS-IS GR is disabled.
----End
7.13.3 Configuring Parameters of an IS-IS GR Session
By setting IS-IS GR parameters, you can avoid temporary black holes on the network.
Context
The switch that starts for the first time does not maintain the forwarding status. If the switch restarts, the LSPs generated when the switch runs last time may exist in the LSDB of other switches in the network.
The sequence number of an LSP fragment is reinitialized when the switch starts. Therefore, the switch considers that the previously advertised LSP stored on other switches is newer than the
LSP generated locally after the switch starts. This leads to the temporary black hole in the network, which lasts until the normal LSDB update process finishes. The switch then regenerates its LSPs and advertises the LSPs with the highest sequence number.
When this switch starts, if the neighbor of the switch suppresses the advertisement of the adjacency until this switch advertises the updated LSPs, the preceding case can thus be avoided.
Do as follows on the switch that runs IS-IS:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
isis [ process-id ]
The IS-IS view is displayed.
Step 3 Run:
graceful-restart interval interval-value
The interval for reestablishing an IS-IS GR session is set.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
350
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
The restart interval is set to the Holdtime in an IS-IS Hello PDU. Thus, the adjacency relationship is not torn down when the switch restarts. By default, the restart period is 300 seconds.
Step 4 (Optional) Run:
graceful-restart suppress-sa
The GR restarter is configured to suppress the Suppress-Advertisement (SA) bit of the restart
TLV.
To prevent a switch from suppressing the SA bit in a Hello PDU during the active/standby switchover, the administrator can run the undo graceful-restart suppress-sa command.
By default, the SA bit is not suppressed.
----End
7.13.4 Checking the Configuration
After configuring IS-IS GR, you can check the IS-IS GR status and parameters.
Prerequisite
7 IS-IS Configuration
The configurations of IS-IS GR are complete.
Procedure
Step 1 Run display isis graceful-restart status [ level-1 | level-2 ] [ process-id | [ vpn-instance vpn-
instance-name | vpn6-instance vpn6-instance-name ]
*
] command to check the status of IS-IS
GR.
----End
Example
Run the display isis graceful-restart status command, and you can find that IS-IS process 1 on the local switch is enabled with GR and the default values of all GR parameters are used.
<Quidway> display isis graceful-restart status
Restart information for ISIS(1)
-------------------------------
IS-IS(1) Level-1 Restart Status
Restart Interval: 300
SA Bit Supported
Total Number of Interfaces = 1
Restart Status: RESTART COMPLETE
IS-IS(1) Level-2 Restart Status
Restart Interval: 300
SA Bit Supported
Total Number of Interfaces = 1
Restart Status: RESTART COMPLETE
7.14 Configuring Static BFD for IS-IS
BFD can provide channel fault detection featuring light load and high speed (millisecond level).
Static BFD needs to be configured manually.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
351
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 7 IS-IS Configuration
7.14.1 Establishing the Configuration Task
Before configuring static BFD for IS-IS, familiarize yourself with the applicable environment, complete the pre-configuration tasks, and obtain the required data. This can help you complete the configuration task quickly and accurately.
Applicable Environment
To accelerate IS-IS convergence speed when the link status changes, you can configure BFD on the IS-IS link. To configure a static BFD session, you need to enable BFD and then manually configure the BFD session parameters including local identifier and remote identifier through related commands.
NOTE
BFD can only detect one-hop links between IS-IS neighbors because IS-IS can establish only the one-hop neighbor relationship.
Pre-configuration Tasks
Before configuring static BFD for IS-IS, complete the following tasks: l Configuring IP addresses of interfaces to make neighboring nodes reachable l
Configuring Basic IS-IS Functions
Data Preparation
To configure static BFD for IS-IS, you need the following data.
No.
Data
1 Type and ID of the interface enabled with BFD
7.14.2 Configuring BFD One-hop Detection
Before enabling static BFD for IS-IS, you need to enable BFD globally and on the interface and configure BFD session parameters.
Context
NOTE
Configuring BFD one-hop detection before configuring IS-IS fast detection.
Do as follows on the two switches between which a BFD session is established:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
352
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
7 IS-IS Configuration
Step 2 Run:
bfd
The global BFD capability is enabled for the node.
Step 3 Run:
quit
Back to the system view.
Step 4 Run:
interface interface-type interface-number
The interface view is displayed.
Step 5 Run:
isis enable[ process-id ]
IS-IS is enabled on the current interface.
Step 6 Run:
isis bfd static
Static BFD is enabled on the current interface.
Step 7 Run:
quit
Back to the system view.
Step 8 Run:
bfd cfg-name bind peer-ip ip-address [ interface interface-type interface-number ]
BFD binding is created.
If peer-ip and interface are specified, it indicates that BFD is configured to detect a one-hop link. That is, the fixed route with interface as the outgoing interface and peer-ip as the next hop is to be detected.
Step 9 Perform the following to configure identifiers for both nodes;
Run:
discriminator local discr-value
The local identifier is configured.
And
Run:
discriminator remote discr-value
The remote identifier is configured.
The corresponding relation between local identifier and remote identifier of devices at the both end of the BFD session should be correct; otherwise, the session cannot be established. After the configuration of local identifier and the remote identifier succeeds, you can not change them.
NOTE
Local identifier of the local switch corresponds to the remote identifier of the remote switch, and the remote identifier of the local switch corresponds to the local identifier of the remote switch.
Issue 01 (2011-10-26) 353
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 7 IS-IS Configuration
Step 10 Run:
commit
The configuration is committed.
----End
7.14.3 Enabling IS-IS Fast Detection
IS-IS fast detection is used to process the fault reported by static BFD.
Context
Do as follows on the switch on which IS-IS fast detection need to be enabled:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
interface interface-type interface-number
The interface view of a specified interface is displayed.
Step 3 Enable IS-IS fast detection as required.
l Run:
isis bfd static
BFD is configured.
And Run: l Run:
isis fast-sense
IS-IS fast detection is enabled.
----End
7.14.4 Checking the Configuration
After configuring static BFD for IS-IS, you can check BFD session information and static BFD for IS-IS information on an interface.
Prerequisite
The configurations of Static BFD for IS-IS are complete.
Procedure
l Run display isis [ process-id | vpn-instance vpn-instance-name ] bfd session { all | peer
ip-address | interface interface-type interface-number } command to check information about the BFD session.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
354
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 7 IS-IS Configuration l Run display isis interface verbose command to check the BFD for IS-IS configuration on the interface.
----End
Example
Only after parameters of BFD session are set and the BFD session is established, you can check the information about the BFD session.
If the configurations are correct, you can find that the status of the Fast-Sense field is YES.
Run the display isis interface verbose command, and you can find that the status of static BFD of IS-IS process 1 is YES.
<Quidway> display isis interface verbose
Interface information for ISIS(1)
---------------------------------
Interface Id IPV4.State IPV6.State MTU Type DIS
GE1/0/0 001 Up Down 1497 L1/L2 No/No
SNPA Address : 00e0-c72d-da01
IP Address : 123.1.1.1
IPV6 Link Local Address :
IPV6 Global Address(es) :
Csnp Timer Value : L1 10 L2 10
Hello Timer Value : L1 10 L2 10
DIS Hello Timer Value : L1 3 L2 3
Hello Multiplier Value : L1 3 L2 3
LSP-Throttle Timer : L12 50
Cost : L1 20 L2 20
Ipv6 Cost : L1 20 L2 20
Priority : L1 64 L2 64
Retransmit Timer Value : L12 5
Bandwidth-Value : Low 100000000 High 0
Static Bfd : YES
Dynamic Bfd : NO
Fast-Sense Rpr : NO
7.15 Configuring Dynamic BFD for IS-IS
BFD can provide channel fault detection featuring light load and high speed (millisecond level).
Routing protocols can dynamically trigger the establishment of BFD sessions.
7.15.1 Establishing the Configuration Task
Before configuring dynamic BFD for IS-IS, familiarize yourself with the applicable environment, complete the pre-configuration tasks, and obtain the required data. This can help you complete the configuration task quickly and accurately.
Applicable Environment
When the requirement for data transmission is high and IS-IS convergence needs to be speeded up when the link status changes, you can configure dynamic BFD on IS-IS links.
Dynamic BFD should be configured according to the actual network environment. If time parameters are set improperly, network flapping may occur.
Pre-configuration Tasks
Before configuring dynamic BFD for IS-IS, complete the following tasks:
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
355
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 7 IS-IS Configuration l Configuring IP addresses for interfaces to make neighboring nodes reachable l
7.3 Configuring Basic IS-IS Functions
Data Preparation
To configure dynamic BFD for IS-IS, you need the following data.
2
3
No.
Data
1 ID of the IS-IS process enabled with BFD
Type and ID of the interface on which BFD is enabled
Parameters of a BFD session
7.15.2 Configuring Global BFD
Before configuring dynamic BFD for IS-IS, you need to enable BFD globally.
Context
To dynamically set up a BFD session, you need to enable global BFD first. Do as follows on the switch:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
bfd
Global BFD is enabled.
----End
7.15.3 Configuring Dynamic BFD for an IS-IS Process
By configuring dynamic BFD for an IS-IS process, you can configure parameters for dynamic
BFD sessions and enable dynamic BFD for IS-IS on all IS-IS interfaces.
Context
To configure dynamic BFD on all interfaces of an IS-IS process, do as follows on the two switches on which the BFD session needs to be set up:
Procedure
Step 1 Run:
system-view
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
356
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
7 IS-IS Configuration
The system view is displayed.
Step 2 Run:
isis process-id
The IS-IS view is displayed.
Step 3 Run:
bfd all-interfaces enable
Dynamic BFD of the IS-IS process is enabled to set up a dynamic BFD session.
When global BFD is enabled and the neighbor status is Up, IS-IS sets up BFD sessions on all the interfaces that meet the preceding conditions by using default values of BFD parameters.
Step 4 (Optional) Run:
bfd all-interfaces { min-rx-interval receive-interval | min-tx-interval transmit-
interval | detect-multiplier multiplier-value | frr-binding }
*
The values of BFD parameters used to set up the dynamic BFD session are set.
----End
7.15.4 (Optional) Preventing an Interface from Dynamically Setting
Up a BFD Session
If you do not want certain IS-IS interfaces to set up dynamic BFD sessions, you can disable these interfaces from dynamically setting Up BFD sessions.
Context
After the bfd all-interfaces enable command is used in an IS-IS process, the following situations occur: l In a P2P network, all IS-IS interfaces whose neighbor status is Up set up dynamic BFD sessions.
l In a broadcast network, all IS-IS interfaces whose neighbor status is Up set up dynamic sessions between DISs and non-DISs.
If you do not want certain interfaces to set up dynamic BFD sessions, do as follows on the interfaces:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
interface interface-type interface-number
The interface view is displayed.
Step 3 Run:
isis bfd block
Issue 01 (2011-10-26) 357
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
The interface is prevented from dynamically setting up a BFD session.
----End
7.15.5 Configuring BFD for a Specified Interface
To configure different dynamic BFD session parameters for certain interfaces, you can configure
BFD for the specified interface. The priority of BFD configured on an interface is higher than that of BFD configured in a process.
Context
7 IS-IS Configuration
To configure BFD only on certain interfaces and not to enable dynamic BFD in an IS-IS process, or to configure the interfaces to fast detect link faults by using different dynamic BFD session parameters after dynamic BFD is configured for the IS-IS process, do as follows on the two interfaces at both ends of the link:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
interface interface-type interface-number
The interface view is displayed.
Step 3 Run:
isis bfd enable
BFD is enabled on the interface to dynamically set up a BFD session.
When global BFD is configured and the neighbor status is Up (in the broadcast network, the
DIS is in the Up state), the default values of BFD parameters are used to dynamically set up a
BFD session.
Step 4 (Optional) Run:
isis bfd { min-rx-interval receive-interval | min-tx-interval transmit-interval |
detect-multiplier multiplier-value | frr-binding }
*
The values of BFD parameters are set to set up a dynamic BFD session.
NOTE
The priority of BFD configured on an interface is higher than that of BFD configured in a process. That is, if BFD is enabled on an interface, the parameters on the interface are used to set up a BFD session.
----End
7.15.6 Checking the Configuration
After configuring dynamic BFD for IS-IS, you can check BFD session information and BFD for IS-IS information on an interface.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
358
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Prerequisite
The configurations of Dynamic BFD for IS-IS are complete.
Procedure
7 IS-IS Configuration l Run display isis [ process-id | vpn-instance vpn-instance-name ] bfd session { peer ip-
address | all } command to check information about the BFD session.
l Run display isis [ process-id ] bfd interface command to check the BFD configuration on the interface.
----End
Example
When the two ends of a link are enabled with BFD, you can find that the BFD status is Up after you run the display isis [ process-id | vpn-instance vpn-instance-name ] bfd session { peer ip-
address | all } command. The display is as follows:
<Quidway> display isis bfd session all
BFD session information for ISIS(1)
-----------------------------------
Peer System ID : 0000.0000.0002 Interface : Pos1/0/0
TX : 1000 BFD State : up Peer IP Address : 1.1.1.2
RX : 1000 LocDis : 8192 Local IP Address: 1.1.1.1
Multiplier : 3 RemDis : 8192 Type : L2
Diag : No diagnostic information
Run the display isis [ process-id ] bfd interface command, and you can view all the interfaces enabled with BFD and the values of the BFD session parameters on the interface.
<Quidway> display isis bfd interface
BFD information of interface for ISIS(1)
-----------------------------------------
Interface BFD.State Min-Tx Min-Rx Mul
Pos1/0/0 enable 1000 1000 3
Total interfaces: 1 Total bfd enabled interfaces: 1
7.16 Improving Security of an IS-IS Network
On a network that requires high security, you can configure IS-IS authentication to improve the security of the IS-IS network.
7.16.1 Establishing the Configuration Task
Before improving the security of an IS-IS network, familiarize yourself with the applicable environment, complete the pre-configuration tasks, and obtain the required data. This can help you complete the configuration task quickly and accurately.
Applicable Environment
In a network that has a high requirement for security, you can configure IS-IS authentication to improve security of the IS-IS network. IS-IS authentication consists of area authentication, route domain authentication, and interface authentication.
Pre-configuration Tasks
Before configuring IS-IS authentication, complete the following tasks:
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
359
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 7 IS-IS Configuration l Configuring IP addresses of interfaces to make neighboring nodes reachable l
7.3 Configuring Basic IS-IS Functions
Data Preparation
To configure IS-IS authentication, you need the following data.
No.
Data
1 Authentication mode and password used in the authentication
7.16.2 Configuring the Area or Domain Authentication
After the IS-IS area or domain authentication is configured, authentication information can be encapsulated into LSPs or SNPs to ensure the security of packet transmission.
Context
By default, sent IS-IS packets are not encapsulated with authentication information, and received packets are not authenticated.
If the area authentication is required, the area authentication password is encapsulated in Level-1
LSPs, CSNPs, and PSNPs in a specified mode. The area authentication modes and passwords of the switches in the same area must be consistent; otherwise, IS-IS packets cannot be flooded normally.
Similarly, in domain authentication, the password is also encapsulated in Level-2 LSPs in a specified mode. Configuration procedures and parameter configuration of the domain authentication are the same as those of the area authentication. The domain authentication modes and passwords of the switches in the same domain must be consistent; otherwise, IS-IS packets cannot be flooded normally.
Regardless of whether packets pass the area or domain authentication, the establishment of
Level-1 or Level-2 neighbor relationship is not affected.
Do as follows on the switch that runs IS-IS:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
isis [ process-id ]
The IS-IS view is displayed.
Step 3 Run the following commands as required: l To configure simple or md5 password, run:
area-authentication-mode { simple password | md5 password-key } [ ip | osi ]
[ snp-packet { authentication-avoid | send-only } | all-send-only ]
The area authentication mode is configured.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
360
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 7 IS-IS Configuration
NOTE
The MD5 authentication password that starts and ends with $@$@ is invalid, because $@$@ is used to distinguish old and new passwords.
l To configure keychain password, run:
area-authentication-mode keychain keychain-name [ snp-packet { authentication-
avoid | send-only } | all-send-only ]
The area authentication mode is configured.
Step 4 Run the following commands as required: l To configure simple or md5 password, run:
domain-authentication-mode { simple password | md5 password-key } [ ip | osi ]
[ snp-packet { authentication-avoid | send-only } | all-send-only ]
The routing domain authentication mode is configured.
NOTE
The MD5 authentication password that starts and ends with $@$@ is invalid, because $@$@ is used to distinguish old and new passwords.
l To configure keychain password, run:
domain-authentication-mode keychain keychain-name [ snp-packet { authentication-
avoid | send-only } | all-send-only ]
The routing domain authentication mode is configured.
The authentication involves the following situations: l Authentication information is encapsulated in the sent LSPs and SNPs. The received LSPs and SNPs should pass the authentication, and the ones that do not pass the authentication are discarded. In this case, snp-packet or all-send-only is inapplicable.
l Authentication information is encapsulated in the sent LSPs and received LSPs are checked; however, authentication information is not encapsulated in the sent SNPs and the received
SNPs are not checked. In this case, snp-packet authentication-avoid needs to be configured.
l Authentication information is encapsulated in the sent LSPs and SNPs. The received LSPs are checked and the received SNPs are not checked. In this case, snp-packet send-only needs to be configured.
l Authentication information is encapsulated in the sent LSPs and SNPs and the received LSPs and SNPs are not checked. In this case, all-send-only needs to be configured.
When you configure the area or domain authentication, ip and osi are not affected by the actual network environment.
----End
7.16.3 Configuring the Interface Authentication
After IS-IS interface authentication is configured, encapsulation information can be encapsulated in the Hello packet to confirm the validity and correctness of neighbors.
Context
The authentication set on the interface is mainly used in the Hello packet to confirm the validity and correctness of its neighbors.
Do as follows on the switch that runs IS-IS:
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
361
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 7 IS-IS Configuration
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
interface interface-type interface-number
The interface view is displayed.
Step 3 Run the following commands as required: l To configure simple or md5 password, run:
isis authentication-mode { simple password | md5 password-key } [ level-1 |
level-2 ] [ ip | osi ] [ send-only ]
The IS-IS authentication mode and password are configured on the interface.
NOTE
The MD5 authentication password that starts and ends with $@$@ is invalid, because $@$@ is used to distinguish old and new passwords.
l To configure keychain password, run:
isis authentication-mode keychain keychain-name [ level-1 | level-2 ] [ send-
only ]
The IS-IS authentication mode and password are configured on the interface.
l If send-only is specified correctly, it indicates that the switch only encapsulates the sent
Hello packets with authentication information rather than check whether the received Hello packets pass authentication. The neighbor relationship can be set up when the authentication is not necessary or packets pass the authentication.
l If send-only is not configured, ensure that passwords of all interfaces with the same level in the same network are consistent.
When IS-IS interfaces are Level-1-2 interfaces and level-1 or level-2 is not specified in the command, authentication modes and passwords are configured for both Level-1 and Level-2
Hello packets.
When the interface authentication is configured, ip and osi are not affected by the actual network environment.
NOTE
Run the isis enable command to enable IS-IS on the interface. level-1 and level-2 can be set only on Ethernet interfaces.
----End
7.16.4 Checking the Configuration
By configuring various IS-IS authentication modes, you can improve the security of the IS-IS network.
Prerequisite
Issue 01 (2011-10-26)
The configurations of Improving Security of an IS-IS Network are complete.
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
362
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 7 IS-IS Configuration
Procedure
Step 1 Run display isis peer [ verbose ] [ process-id | [ vpn-instance vpn-instance-name | vpn6-
instance vpn6-instance-name ]
*
] command to check information about the IS-IS neighbor.
----End
Example
On VLANIF20, set the interface authentication mode to simple and password to 123. Neighbor relationship can be established when authentication information on the two switches are consistent. Run the display isis 1 peer verbose command. The display is as follows:
<Quidway> display isis peer 1 verbose
Peer information for ISIS(1)
System Id Interface Circuit Id State HoldTime Type PRI
---------------------------------------------------------------------------------
0000.0000.0040 Vlanif20 0000.0000.0040.04 Up 7s L1(L1L2) 64
MT IDs supported : 0(UP)
Area Address(es) :10
Peer IP Address(es): 12.40.41.1
Uptime : 00:01:08
Adj Protocol : IPV4
Restart Capable : Yes
Suppressed Adj : NO
0000.0000.0040 Vlanif20 0000.0000.0040.04 Up 8s L2(L1L2) 64
MT IDs supported : 0(UP)
Area Address(es) :10
Peer IP Address(es): 12.40.41.1
Uptime : 00:01:14
Adj Protocol : IPV4
Restart Capable : Yes
Suppressed Adj : NO
Total Peer(s): 2
7.17 Maintaining IS-IS
Maintaining IS-IS involves resetting IS-IS and clearing IS-IS statistics.
7.17.1 Resetting IS-IS Data Structure
By restarting IS-IS, you can reset IS-IS. You can also reset IS-IS in GR mode.
Context
CAUTION
The IS-IS data structure cannot be restored after you reset it. All the previous structure information and the neighbor relationship are reset. So, confirm the action before you use the command.
Issue 01 (2011-10-26)
To clear the IS-IS data structure, run the following reset command in the user view.
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
363
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 7 IS-IS Configuration
Procedure
Step 1 Run reset isis all [ process-id | [ vpn-instance vpn-instance-name | vpn6-instance vpn6-
instance-name ]
*
] command to reset the IS-IS data structure.
By default, the IS-IS data structure is not reset.
----End
7.17.2 Resetting a Specific IS-IS Neighbor
By restarting IS-IS neighbors, you can reset the IS-IS neighbor relationship, and thus make the new configuration take effect.
Context
CAUTION
The specified IS-IS neighbor relationship is deleted after you reset a specified IS-IS neighbor by using the reset isis peer command. So, confirm the action before you use the command.
Procedure
Step 1 Run reset isis peer system-id [ process-id | [ vpn-instance vpn-instance-name | vpn6-
instance vpn6-instance-name ]
*
] command to reset a specific IS-IS neighbor.
----End
7.17.3 Debugging IS-IS
Switch can generate debugging information after the debugging of a module is enabled in the user view. Debugging information shows the contents of packets sent or received by the debugged module.
Context
After the IS-IS routing policy or the protocol changes, you can reset a specific IS-IS neighbor to validate the new configuration.
To reset a specific IS-IS neighbor, run the following reset command in the user view.
CAUTION
Debugging affects the performance of the system. So, after debugging, run the undo debugging
all command to disable it immediately.
Issue 01 (2011-10-26)
When an IS-IS fault occurs, run the following debugging commands in the user view to debug
IS-IS and locate the fault.
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
364
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 7 IS-IS Configuration
For the procedure of displaying the debugging information, refer to the Quidway S9300 Terabit
Routing Switch Configuration Guide - System Management.
For details of debugging commands, refer to the Quidway S9300 Terabit Routing Switch -
Debugging Reference.
Procedure
l Run debugging isis all [ process-id ] command to debug IS-IS.
l Run debugging isis adjacency [ process-id | interface interface-type interface-number ] command to debug IS-IS adjacencies.
l Run debugging isis authentication-error [ process-id ] command to debug IS-IS authentication errors.
l Run debugging isis bfd [ process-id ] command to debug BFD for IS-IS.
l Run debugging isis checksum-error [ process-id ] command to debug LSP checksum errors.
l Run debugging isis circuit-information [ process-id | interface interface-type interface-
number ] command to debug the levels of IS-IS interfaces.
l Run debugging isis configuration-error [ process-id ] command to debug IS-IS configuration errors.
l Run debugging isis datalink-receiving-packet [ process-id | interface interface-type
interface-number ] command to debug received IS-IS packets at the data link layer.
l Run debugging isis datalink-sending-packet [ process-id | interface interface-type
interface-number ] command to debug sent IS-IS packets at the data link layer.
l
Run debugging isis event [ process-id ] command to debug IS-IS events.
l Run debugging isis general-error [ process-id ] command to debug IS-IS general errors.
l Run debugging isis graceful-restart [ process-id ] command to debug IS-IS GR processes.
l Run debugging isis ha-events [ process-id ] command to debug IS-IS HSB events.
l Run debugging isis interface-information [ process-id | interface interface-type
interface-number ] command to debug IS-IS interfaces.
l Run debugging isis memory-allocating [ process-id ] command to debug IS-IS memory allocation.
l Run debugging isis miscellaneous-errors command to debug IS-IS miscellaneous errors.
l Run the debugging isis nsr command to debug IS-IS NSR.
l Run debugging isis receiving-packet-content [ process-id | interface interface-type
interface-number ] command to debug the contents of received packets.
l Run debugging isis receiving-packet-regular-content [ process-id ] command to debug the general information of received IS-IS packets.
l Run debugging isis self-originate-update [ process-id ] command to debug locally updated IS-IS packets.
l Run debugging isis sending-packet-content [ process-id | interface interface-type
interface-number ] command to debug the contents of sent packets.
l Run debugging isis sending-packet-regular-content [ process-id ] command to debug the general information of sent IS-IS packets.
l Run debugging isis snp-packet [ process-id | interface interface-type interface-number ] command to debug SNPs.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
365
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 7 IS-IS Configuration l Run debugging isis spf-event [ process-id ] command to debug SPF events.
l Run debugging isis [ process-id ] spf-prc [ policy [ ipv4-acl acl-number | ipv6-acl acl-
number | ip-prefix ip-prefix-name ] ] command to debug IS-IS SPF-PRC.
l Run debugging isis spf-summary [ process-id ] command to debug IS-IS SPF summary.
l Run debugging isis spf-timer [ process-id ] command to debug IS-IS SPF timers.
l Run debugging isis task-error [ process-id ] command to debug IS-IS task errors.
l Run debugging isis timer [ process-id | interface interface-type interface-number ] command to debug IS-IS timers.
l Run debugging isis traffic-eng { advertisement | event | receiving-packet | sending-
packet } [ process-id ] command to debug TE.
l Run debugging isis update-packet [ process-id | interface interface-type interface-
number ] command to debug IS-IS update packets.
l Debug IS-IS update processes.
–
debugging isis [ process-id ] update-process [ policy [ ipv4-acl acl-number | ipv6-
acl acl-number | ip-prefix ip-prefix-name ] ]
–
debugging isis update-process interface [ interface-type interface-number ]
----End
7.18 Configuration Examples
This section provides examples of IS-IS configuration.
7.18.1 Example for Configuring Basic IS-IS Functions
Networking Requirements
, the networking requirements are as follows:
l Switch A, Switch B, Switch C, and Switch D belong to the same AS. The IS-IS protocol runs on them to ensure connectivity on an IP network.
l The area IDs of Switch A, Switch B, and Switch C are all 10, and the area ID of Switch D is 20.
l Switch A and SwitchX-B are Level-1 devices. Switch C is a Level-1-2 device. Switch D is the Level-2 device.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
366
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Figure 7-6 Networking diagram for configuring basic functions of IS-IS
7 IS-IS Configuration
SwitchA
L1
GE1/0/1
GE1/0/1
IS-IS
Area 10
GE1/0/2
SwitchC
L1/2
GE1/0/3
GE1/0/2
GE1/0/1
SwitchD
L2
IS-IS
Area 20
GE1/0/1
SwitchB
L1
Switch
Switch A
Switch B
Switch C
Switch C
Switch C
Switch D
Switch D
Interface
GigabitEthernet1/0/1
GigabitEthernet1/0/1
GigabitEthernet1/0/1
GigabitEthernet1/0/2
GigabitEthernet1/0/3
GigabitEthernet1/0/1
GigabitEthernet1/0/2
VLANIF interface
VLANIF 10
VLANIF 20
VLANIF 10
VLANIF 20
VLANIF 30
VLANIF 30
VLANIF 40
IP address
10.1.1.2/24
10.1.2.2/24
10.1.1.1/24
10.1.2.1/24
192.168.0.1/24
192.168.0.2/24
172.16.1.1/24
Configuration Roadmap
The configuration roadmap is as follows:
1.
Configure the VLANs that the physical interfaces belong to.
2.
Assign an IP address to each VLANIF interface.
3.
Run the IS-IS progress on each Switch , specify the network entity title, and configure the level.
4.
Check the IS-IS database and routing table of each Switch .
Data Preparation
To complete the configuration, you need the following data: l ID of the VLAN that each interface belongs to, as shown in
l
IP address of each VLANIF interface, as shown in
l System ID, level, and area ID of each Switch :
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
367
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 7 IS-IS Configuration
– Switch A: The system ID is 0000.0000.0001; the area ID is 10; the level is Level-1.
–
Switch B: The system ID is 0000.0000.0002; the area ID is 10; the level is Level-1.
–
Switch C: The system ID is 0000.0000.0003; the area ID is 10; the level is Level-1-2.
–
Switch D: The system ID is 0000.0000.0004; the area ID is 20; the level is Level-2.
Procedure
Step 1 Create VLANs and add corresponding interfaces to the VLANs.
<Quidway> system-view
[Quidway] sysname SwitchA
[SwitchA] vlan 10
[SwitchA-vlan10] quit
[SwitchA] interface GigabitEthernet 1/0/1
[SwitchA-GigabitEthernet1/0/1] port hybrid pvid vlan 10
[SwitchA-GigabitEthernet1/0/1] port hybrid untagged vlan 10
[SwitchA-GigabitEthernet1/0/1] quit
The configurations of Switch B, Switch C, and Switch D are similar to the configuration of
Switch A, and are not mentioned here.
Step 2 Assign an IP address to each VLANIF interface.
[SwitchA] interface vlanif 10
[SwitchA-Vlanif10] ip address 10.1.1.2 24
[SwitchA-Vlanif10] quit
The configurations of Switch B, Switch C, and Switch D are similar to the configuration of
Switch A, and are not mentioned here.
Step 3 Run the IS-IS progress on each Switch, specify the network entity title, and configure the level.
# Configure Switch A.
[SwitchA] isis 1
[SwitchA-isis-1] is-level level-1
[SwitchA-isis-1] network-entity 10.0000.0000.0001.00
[SwitchA-isis-1] quit
# Configure Switch B.
[SwitchB] isis 1
[SwitchB-isis-1] is-level level-1
[SwitchB-isis-1] network-entity 10.0000.0000.0002.00
[SwitchB-isis-1] quit
# Configure Switch C.
[SwitchC] isis 1
[SwitchC-isis-1] network-entity 10.0000.0000.0003.00
[SwitchC-isis-1] quit
# Configure Switch D.
[SwitchD] isis 1
[SwitchD-isis-1] is-level level-2
[SwitchD-isis-1] network-entity 20.0000.0000.0004.00
[SwitchD-isis-1] quit
Step 4 Enable the IS-IS progress on each interface.
# Configure Switch A.
[SwitchA] interface vlanif 10
[SwitchA-Vlanif10] isis enable 1
[SwitchA-Vlanif10] quit
# Configure Switch B.
[SwitchB] interface vlanif 20
[SwitchB-Vlanif20] isis enable 1
[SwitchB-Vlanif20] quit
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
368
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
7 IS-IS Configuration
# Configure Switch C.
[SwitchC] interface vlanif 10
[SwitchC-Vlanif10] isis enable 1
[SwitchC-Vlanif10] quit
[SwitchC] interface vlanif 20
[SwitchC-Vlanif20] isis enable 1
[SwitchC-Vlanif20] quit
[SwitchC] interface vlanif 30
[SwitchC-Vlanif30] isis enable 1
[SwitchC-Vlanif30] quit
# Configure Switch D.
[SwitchD] interface vlanif 30
[SwitchD-Vlanif30] isis enable 1
[SwitchD-Vlanif30] quit
[SwitchD] interface vlanif 40
[SwitchD-Vlanif40] isis enable 1
[SwitchD-Vlanif40] quit
Step 5 Verify the configuration.
# View the IS-IS LSDB of each Switch.
[SwitchA] display isis lsdb
Database information for ISIS(1)
--------------------------------
Level-1 Link State Database
LSPID Seq Num Checksum Holdtime Length ATT/P/OL
-------------------------------------------------------------------------
0000.0000.0001.00-00* 0x00000006 0xbf7d 649 68 0/0/0
0000.0000.0002.00-00 0x00000003 0xef4d 545 68 0/0/0
0000.0000.0003.00-00 0x00000008 0x3340 582 111 1/0/0
0000.0000.0003.01-00 0x00000004 0xa7dd 582 55 0/0/0
0000.0000.0003.02-00 0x00000002 0xc0c4 524 55 0/0/0
*(In TLV)-Leaking Route, *(By LSPID)-Self LSP, +-Self LSP(Extended),
ATT-Attached, P-Partition, OL-Overload
[SwitchB] display isis lsdb
Database information for ISIS(1)
--------------------------------
Level-1 Link State Database
LSPID Seq Num Checksum Holdtime Length ATT/P/OL
-------------------------------------------------------------------------
0000.0000.0001.00-00 0x00000006 0xbf7d 642 68 0/0/0
0000.0000.0002.00-00* 0x00000003 0xef4d 538 68 0/0/0
0000.0000.0003.00-00 0x00000008 0x3340 574 111 1/0/0
*(In TLV)-Leaking Route, *(By LSPID)-Self LSP, +-Self LSP(Extended),
ATT-Attached, P-Partition, OL-Overload
[SwitchC] display isis lsdb
Database information for ISIS(1)
--------------------------------
Level-1 Link State Database
LSPID Seq Num Checksum Holdtime Length ATT/P/OL
-------------------------------------------------------------------------
0000.0000.0001.00-00 0x00000006 0xbf7d 638 68 0/0/0
0000.0000.0002.00-00 0x00000003 0xef4d 533 68 0/0/0
0000.0000.0003.00-00* 0x00000008 0x3340 569 111 1/0/0
0000.0000.0003.01-00* 0x00000005 0xa5de 569 55 0/0/0
0000.0000.0003.02-00* 0x00000003 0xbec5 569 55 0/0/0
Issue 01 (2011-10-26) 369
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
7 IS-IS Configuration
*(In TLV)-Leaking Route, *(By LSPID)-Self LSP, +-Self LSP(Extended),
ATT-Attached, P-Partition, OL-Overload
Level-2 Link State Database
LSPID Seq Num Checksum Holdtime Length ATT/P/OL
-------------------------------------------------------------------------
0000.0000.0003.00-00* 0x00000008 0x55bb 650 100 0/0/0
0000.0000.0003.03-00* 0x00000003 0xef91 650 55 0/0/0
0000.0000.0004.00-00 0x00000005 0x651 629 84 0/0/0
*(In TLV)-Leaking Route, *(By LSPID)-Self LSP, +-Self LSP(Extended),
ATT-Attached, P-Partition, OL-Overload
[SwitchD] display isis lsdb
Database information for ISIS(1)
--------------------------------
Level-2 Link State Database
LSPID Seq Num Checksum Holdtime Length ATT/P/OL
-------------------------------------------------------------------------
0000.0000.0003.00-00 0x00000008 0x55bb 644 100 0/0/0
0000.0000.0003.03-00 0x00000003 0xef91 644 55 0/0/0
0000.0000.0004.00-00* 0x00000005 0x651 624 84 0/0/0
*(In TLV)-Leaking Route, *(By LSPID)-Self LSP, +-Self LSP(Extended),
ATT-Attached, P-Partition, OL-Overload
# View the IS-IS routing table of each Switch. A default route is available in the routing table of the Level-1 Switches and the next hop is a Level-1-2 Switch. The routing table of the Level-2
Switch contains all Level-1 and Level-2 routes.
[SwitchA] display isis route
Route information for ISIS(1)
-----------------------------
ISIS(1) Level-1 Forwarding Table
--------------------------------
IPV4 Destination IntCost ExtCost ExitInterface NextHop Flags
-------------------------------------------------------------------------
0.0.0.0/0 10 NULL Vlanif10 10.1.1.1 A/-/-/-
10.1.1.0/24 10 NULL Vlanif10 Direct D/-/L/-
10.1.2.0/24 20 NULL Vlanif10 10.1.1.1 A/-/-/-
192.168.0.0/24 20 NULL Vlanif10 10.1.1.1 A/-/-/-
Flags: D-Direct, A-Added to URT, L-Advertised in LSPs, S-IGP Shortcut,
U-Up/Down Bit Set
[SwitchB] display isis route
Route information for ISIS(1)
-----------------------------
ISIS(1) Level-1 Forwarding Table
--------------------------------
IPV4 Destination IntCost ExtCost ExitInterface NextHop Flags
-------------------------------------------------------------------------
0.0.0.0/0 10 NULL Vlanif20 10.1.2.1 A/-/-/-
10.1.1.0/24 10 NULL Vlanif20 Direct D/-/L/-
10.1.2.0/24 20 NULL Vlanif20 10.1.2.1 A/-/-/-
192.168.0.0/24 20 NULL Vlanif20 10.1.2.1 A/-/-/-
Flags: D-Direct, A-Added to URT, L-Advertised in LSPs, S-IGP Shortcut,
U-Up/Down Bit Set
[SwitchC] display isis route
Route information for ISIS(1)
370
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 7 IS-IS Configuration
-----------------------------
ISIS(1) Level-1 Forwarding Table
--------------------------------
IPV4 Destination IntCost ExtCost ExitInterface NextHop Flags
-------------------------------------------------------------------------
10.1.1.0/24 10 NULL Vlanif10 Direct D/-/L/-
10.1.2.0/24 10 NULL Vlanif20 Direct D/-/L/-
192.168.0.0/24 10 NULL Vlanif30 Direct D/-/L/-
Flags: D-Direct, A-Added to URT, L-Advertised in LSPs, S-IGP Shortcut,
U-Up/Down Bit Set
ISIS(1) Level-2 Forwarding Table
--------------------------------
IPV4 Destination IntCost ExtCost ExitInterface NextHop Flags
-------------------------------------------------------------------------
10.1.1.0/24 10 NULL Vlanif10 Direct D/-/L/-
10.1.2.0/24 10 NULL Vlanif20 Direct D/-/L/-
192.168.0.0/24 10 NULL Vlanif30 Direct D/-/L/-
172.16.0.0/16 20 NULL Vlanif40 192.168.0.2 A/-/-/-
Flags: D-Direct, A-Added to URT, L-Advertised in LSPs, S-IGP Shortcut,
U-Up/Down Bit Set
[SwitchD] display isis route
Route information for ISIS(1)
-----------------------------
ISIS(1) Level-2 Forwarding Table
--------------------------------
IPV4 Destination IntCost ExtCost ExitInterface NextHop Flags
-------------------------------------------------------------------------
192.168.0.0/24 10 NULL Vlanif30 Direct D/-/L/-
10.1.1.0/24 20 NULL Vlanif30 192.168.0.1 A/-/-/-
10.1.2.0/24 20 NULL Vlanif30 192.168.0.1 A/-/-/-
172.16.0.0/16 10 NULL Vlanif40 Direct A/-/-/-
Flags: D-Direct, A-Added to URT, L-Advertised in LSPs, S-IGP Shortcut,
U-Up/Down Bit Set
----End
Configuration Files
l Configuration file of Switch A
#
sysname SwitchA
#
vlan batch 10
# isis 1
is-level level-1
network-entity 10.0000.0000.0001.00
# interface Vlanif10
ip address 10.1.1.2 255.255.255.0
isis enable 1
# interface GigabitEthernet1/0/1
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# return
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
371
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Issue 01 (2011-10-26) l Configuration file of Switch B
#
sysname SwitchB
#
vlan batch 20
# isis 1
is-level level-1
network-entity 10.0000.0000.0002.00
# interface Vlanif20
ip address 10.1.2.2 255.255.255.0
isis enable 1
# interface GigabitEthernet1/0/1
port hybrid pvid vlan 20
port hybrid untagged vlan 20
# return l Configuration file of Switch C
#
sysname SwitchC
#
vlan batch 10 20 30
# isis 1
network-entity 10.0000.0000.0003.00
# interface Vlanif10
ip address 10.1.1.1 255.255.255.0
isis enable 1
# interface Vlanif20
ip address 10.1.2.1 255.255.255.0
isis enable 1
# interface Vlanif30
ip address 192.168.0.1 255.255.255.0
isis enable 1
# interface GigabitEthernet1/0/1
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# interface GigabitEthernet1/0/2
port hybrid pvid vlan 20
port hybrid untagged vlan 20
# interface GigabitEthernet1/0/3
port hybrid pvid vlan 30
port hybrid untagged vlan 30
# return l
Configuration file of Switch D
#
sysname SwitchD
#
vlan batch 30 40
# isis 1
is-level level-2
network-entity 20.0000.0000.0004.00
# interface Vlanif30
ip address 192.168.0.2 255.255.255.0
isis enable 1
# interface Vlanif40
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
7 IS-IS Configuration
372
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 7 IS-IS Configuration
ip address 172.16.1.1 255.255.255.0
isis enable 1
# interface GigabitEthernet1/0/1
port hybrid pvid vlan 30
port hybrid untagged vlan 30
# interface GigabitEthernet1/0/2
port hybrid pvid vlan 40
port hybrid untagged vlan 40
#
Return
7.18.2 Example for Configuring IS-IS Route Aggregation
Networking Requirements
, the networking requirements are as follows:
l Switch A, Switch B, and Switch C run the IS-IS protocol to communicate with each other.
l Switch A belongs to Area 20. Switch B and Switch C belong to Area 10.
l Switch A is a Level-2 device. Switch B is a Level-1-2 device. Switch C is a Level-1 device.
l
The addresses in Area 10 can be aggregated as 172.1.0.0/16.
Figure 7-7 Networking diagram for configuring IS-IS route aggregation
network 1
172.1.1.0/24
SwitchA
L2
Area 10
GE1/0/2
GE1/0/1
Area 20
GE1/0/2
SwitchB
L1/L2
GE1/0/1
GE1/0/1
SwitchC
L1
GE1/0/3
GE1/0/4
network 2
172.1.2.0/24
network 3
172.1.3.0/24
Issue 01 (2011-10-26)
Switch
Switch A
Switch B
Switch B
Switch C
Switch C
Switch C
Switch C
Interface
GigabitEthernet1/0/1
GigabitEthernet1/0/1
GigabitEthernet1/0/2
GigabitEthernet1/0/1
GigabitEthernet1/0/2
GigabitEthernet1/0/3
GigabitEthernet1/0/4
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
VLANIF interface IP address
VLANIF 50 172.2.1.1/24
VLANIF 10 172.1.4.2/24
VLANIF 50
VLANIF 10
VLANIF 20
VLANIF 30
VLANIF 40
172.2.1.2/24
172.1.4.1/24
172.1.1.1/24
172.1.2.1/24
172.1.3.1/24
373
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
7 IS-IS Configuration
Configuration Roadmap
The configuration roadmap is as follows:
1.
Enable IS-IS on each Switch so that the Switches can be interconnected.
2.
Check the IS-IS routing table of Switch A.
3.
Configure route aggregation on Switch B.
Data Preparation
To complete the configuration, you need the following data: l ID of the VLAN that each interface belongs to, as shown in
l
IP address of each VLANIF interface, as shown in
l System ID, level, and area ID of each Switch: l Switch A: The system ID is 0000.0000.0001; the area ID is 10; the level is Level-2.
l Switch B: The system ID is 0000.0000.0002; the area ID is 10; the level is Level-1.
l Switch C: The system ID is 0000.0000.0003; the area ID is 10; the level is Level-1.
Procedure
Step 1 Create VLANs and add corresponding interfaces to the VLANs.
<Quidway> system-view
[Quidway] sysname SwitchA
[SwitchA] interface GigabitEthernet 1/0/1
[SwitchA-GigabitEthernet1/0/1] port link-type access
[SwitchA-GigabitEthernet1/0/1] quit
[SwitchA] vlan 50
[SwitchA-vlan50] port GigabitEthernet 1/0/1
[SwitchA-vlan50] quit
The configurations of Switch B and Switch C are similar to the configuration of Switch A, and are not mentioned here.
Step 2 Assign an IP address to each VLANIF interface.
[SwitchA] interface vlanif 50
[SwitchA-Vlanif50] ip address 172.2.1.1 24
[SwitchA-Vlanif50] quit
The configurations of Switch B and Switch C are similar to the configuration of Switch A, and are not mentioned here.
Step 3 Configure the basic IS-IS functions.
# Configure Switch A.
[SwitchA] isis 1
[SwitchA-isis-1] is-level level-2
[SwitchA-isis-1] network-entity 20.0000.0000.0001.00
[SwitchA-isis-1] quit
[SwitchA] interface vlanif 50
[SwitchA-Vlanif50] isis enable 1
[SwitchA-Vlanif50] quit
# Configure Switch B.
[SwitchB] isis 1
[SwitchB-isis-1] network-entity 10.0000.0000.0002.00
[SwitchB-isis-1] quit
[SwitchB] interface vlanif 10
Issue 01 (2011-10-26) 374
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
7 IS-IS Configuration
[SwitchB-Vlanif10] isis enable 1
[SwitchB-Vlanif10] quit
[SwitchB] interface vlanif 50
[SwitchB-Vlanif50] isis enable 1
[SwitchB-Vlanif50] quit
# Configure Switch C.
[SwitchC] isis 1
[SwitchC-isis-1] is-level level-1
[SwitchC-isis-1] network-entity 10.0000.0000.0003.00
[SwitchC-isis-1] quit
[SwitchC] interface vlanif 10
[SwitchC-Vlanif10] isis enable 1
[SwitchC-Vlanif10] quit
The configurations of the VLANIF 20, VLANIF 30, and VLANIF 40 interfaces are similar to the configuration of VLANIF 10, and are not mentioned here.
Step 4 Check the IS-IS routing table of Switch A.
[SwitchA]display isis route
Route information for ISIS(1)
-----------------------------
ISIS(1) Level-2 Forwarding Table
--------------------------------
IPV4 Destination IntCost ExtCost ExitInterface NextHop Flags
-------------------------------------------------------------------------
172.1.1.0/24 20 NULL Vlanif50 172.2.1.2 A/-/-/-
172.1.2.0/24 20 NULL Vlanif50 172.2.1.2 A/-/-/-
172.1.3.0/24 20 NULL Vlanif50 172.2.1.2 A/-/-/-
172.1.4.0/24 20 NULL Vlanif50 172.2.1.2 A/-/-/-
172.2.1.0/24 10 NULL Vlanif50 Direct D/-/L/-
Flags: D-Direct, A-Added to URT, L-Advertised in LSPs, S-IGP Shortcut,
U-Up/Down Bit Set
Step 5 Configure route aggregation on Switch B.
# Aggregate 172.1.1.0/24, 172.1.2.0/24, 172.1.3.0./24, and 172.1.4.0/24 as 172.1.0.0/16 on
Switch B.
[SwitchB] isis 1
[SwitchB-isis-1] summary 172.1.0.0 255.255.0.0 level-1-2
[SwitchB-isis-1] quit
Step 6 Verify the configuration.
# Check the routing table of Switch A, and you can find that 172.1.1.0/24, 172.1.2.0/24,
172.1.3.0./24 and 172.1.4.0/24 are aggregated as 172.1.0.0/16.
[SwitchA] display isis route
Route information for ISIS(1)
-----------------------------
ISIS(1) Level-2 Forwarding Table
--------------------------------
IPV4 Destination IntCost ExtCost ExitInterface NextHop Flags
-------------------------------------------------------------------------
172.1.0.0/16 20 NULL Vlanif50 172.2.1.2 A/-/-/-
172.2.1.0/24 10 NULL Vlanif50 Direct D/-/L/-
Issue 01 (2011-10-26) 375
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
7 IS-IS Configuration
Flags: D-Direct, A-Added to URT, L-Advertised in LSPs, S-IGP Shortcut,
U-Up/Down Bit Set
----End
Configuration Files
l Configuration file of Switch A
#
sysname SwitchA
#
vlan batch 50
# isis 1
is-level level-2
network-entity 20.0000.0000.0001.00
# interface Vlanif50
ip address 172.2.1.1 255.255.255.0
isis enable 1
# interface GigabitEthernet1/0/1
port link-type access
port default vlan 50
# return l Configuration file of Switch B
#
sysname SwitchB
#
vlan batch 10 50
# isis 1
network-entity 10.0000.0000.0002.00
summary 172.1.0.0 255.255.0.0 level-1-2
# interface Vlanif10
ip address 172.1.4.2 255.255.255.0
isis enable 1
# interface Vlanif50
ip address 172.2.1.2 255.255.255.0
isis enable 1
# interface GigabitEthernet1/0/1
port link-type access
port default vlan 10
# interface GigabitEthernet1/0/2
port link-type access
port default vlan 50
# return l Configuration file of Switch C
#
sysname SwitchC
#
vlan batch 10 20 30 40
# isis 1
is-level level-1
network-entity 10.0000.0000.0003.00
# interface Vlanif10
ip address 172.1.4.1 255.255.255.0
isis enable 1
#
376
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 7 IS-IS Configuration interface Vlanif20
ip address 172.1.1.1 255.255.255.0
isis enable 1
# interface Vlanif30
ip address 172.1.2.1 255.255.255.0
isis enable 1
# interface Vlanif40
ip address 172.1.3.1 255.255.255.0
isis enable 1
# interface GigabitEthernet1/0/1
port link-type access
port default vlan 10
# interface GigabitEthernet1/0/2
port link-type access
port default vlan 20
# interface GigabitEthernet1/0/3
port link-type access
port default vlan 30
# interface GigabitEthernet1/0/4
port link-type access
port default vlan 40
# return
7.18.3 Example for Configuring the DIS Election
Networking Requirements
, the networking requirements are as follows:
l
Switch A, Switch B, Switch C, and Switch D run the IS-IS protocol to communicate with each other.
l Switch A, Switch B, Switch C, and Switch D belong to Area 10.
l
Switch A and Switch B are Level-1-2 devices. Switch C is a Level-1 device. Switch D is a Level-2 device.
l You need to change the DIS priority of the related interface to configure Switch A to a
Level-1-2 DIS.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
377
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Figure 7-8 Networking diagram for configuring the DIS election
SwitchA
L1/L2
SwitchB
L1/L2
GE1/0/1
GE1/0/1
GE1/0/1
GE1/0/1
7 IS-IS Configuration
SwitchC
L1
Switch
Switch A
Switch B
Switch C
Switch D
SwitchD
L2
Interface
GigabitEthernet1/0/1
GigabitEthernet1/0/1
GigabitEthernet1/0/1
GigabitEthernet1/0/1
VLANIF interface IP address
VLANIF 10 10.1.1.1/24
VLANIF 10
VLANIF 10
VLANIF 10
10.1.1.2/24
10.1.1.3/24
10.1.1.4/24
Configuration Roadmap
The configuration roadmap is as follows:
1.
Enable IS-IS on each switch so that the switches can be interconnected.
2.
Check information about the IS-IS interface on each switch with the default priority.
3.
Configure the DIS priority on Switch A.
Data Preparation
To complete the configuration, you need the following data: l ID of the VLAN that each interface belongs to, as shown in
l
IP address of each VLANIF interface, as shown in
l System ID, level, and area ID of each switch:
–
Switch A: The system ID is 0000.0000.0001; the area ID is 10; the DIS priority is 100; the level is Level-1-2.
–
Switch B: The system ID is 0000.0000.0002; the area ID is 10; the level is Level-1.
– Switch C: The system ID is 0000.0000.0003; the area ID is 10; the level is Level-1.
– Switch D: The system ID is 0000.0000.0004; the area ID is 10; the level is Level-2.
Procedure
Step 1 Create VLANs and add corresponding interfaces to the VLANs.
<Quidway> system-view
[Quidway] sysname SwitchA
[SwitchA] vlan 10
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
378
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
7 IS-IS Configuration
[SwitchA-vlan10] quit
[SwitchA] interface GigabitEthernet 1/0/1
[SwitchA-GigabitEthernet1/0/1] port hybrid pvid vlan 10
[SwitchA-GigabitEthernet1/0/1] port hybrid untagged vlan 10
[SwitchA-GigabitEthernet1/0/1] quit
The configurations of SwitchB, SwitchC, and SwitchD are similar to the configuration of
SwitchA, and are not mentioned here.
Step 2 Assign an IP address to each VLANIF interface.
[SwitchA] interface vlanif 10
[SwitchA-Vlanif10] ip address 10.1.1.1 24
[SwitchA-Vlanif10] quit
The configurations of Switch B, SwitchC, and Switch D are similar to the configuration of
Switch A, and are not mentioned here.
Step 3 View the MAC address of the VLANIF 10 interface on each Switch.
# View the MAC address of the VLANIF 10 interface on Switch A.
[SwitchA] display arp interface vlanif 10
IP ADDRESS MAC ADDRESS EXPIRE(M) TYPE INTERFACE VPN-INSTANCE
VLAN/CEVLAN PVC
------------------------------------------------------------------------------
10.1.1.1 00e0-fc10-afec I - Vlanif10
------------------------------------------------------------------------------
Total:1 Dynamic:0 Static:0 Interface:1
# View the MAC address of the VLANIF 10 interface on Switch B.
[SwitchB] display arp interface vlanif 10
IP ADDRESS MAC ADDRESS EXPIRE(M) TYPE INTERFACE VPN-INSTANCE
VLAN/CEVLAN PVC
------------------------------------------------------------------------------
10.1.1.2 00e0-fccd-acdf I - Vlanif10
------------------------------------------------------------------------------
Total:1 Dynamic:0 Static:0 Interface:1
# View the MAC address of the VLANIF 10 interface on Switch C.
[SwitchC] display arp interface vlanif 10
IP ADDRESS MAC ADDRESS EXPIRE(M) TYPE INTERFACE VPN-INSTANCE
VLAN/CEVLAN PVC
------------------------------------------------------------------------------
10.1.1.3 00e0-fc50-25fe I - Vlanif10
------------------------------------------------------------------------------
Total:1 Dynamic:0 Static:0 Interface:1
# View the MAC address of the VLANIF 10 interface on Switch D.
[SwitchD] display arp interface vlanif 10
IP ADDRESS MAC ADDRESS EXPIRE(M) TYPE INTERFACE VPN-INSTANCE
VLAN/CEVLAN PVC
------------------------------------------------------------------------------
10.1.1.4 00e0-fcfd-305c I - Vlanif10
------------------------------------------------------------------------------
Total:1 Dynamic:0 Static:0 Interface:1
Step 4 Configure the basic IS-IS functions.
# Configure Switch A.
[SwitchA] isis 1
[SwitchA-isis-1] network-entity 10.0000.0000.0001.00
[SwitchA-isis-1] quit
[SwitchA] interface vlanif 10
[SwitchA-Vlanif10] isis enable 1
[SwitchA-Vlanif10] quit
# Configure Switch B.
[SwitchB] isis 1
[SwitchB-isis-1] network-entity 10.0000.0000.0002.00
Issue 01 (2011-10-26) 379
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
7 IS-IS Configuration
[SwitchB-isis-1] quit
[SwitchB] interface vlanif 10
[SwitchB-Vlanif10] isis enable 1
[SwitchB-Vlanif10] quit
# Configure Switch C.
[SwitchC] isis 1
[SwitchC-isis-1] network-entity 10.0000.0000.0003.00
[SwitchC-isis-1] is-level level-1
[SwitchC-isis-1] quit
[SwitchC] interface vlanif 10
[SwitchC-Vlanif10] isis enable 1
[SwitchC-Vlanif10] quit
# Configure Switch D.
[SwitchD] isis 1
[SwitchD-isis-1] network-entity 10.0000.0000.0004.00
[SwitchD-isis-1] is-level level-2
[SwitchD-isis-1] quit
[SwitchD] interface vlanif 10
[SwitchD-Vlanif10] isis enable 1
[SwitchD-Vlanif10] quit
# View information about the IS-IS neighbors of Switch A.
[SwitchA] display isis peer
Peer information for ISIS(1)
----------------------------
System Id Interface Circuit Id State HoldTime Type
PRI
0000.0000.0002 Vlanif10 0000.0000.0002.01 Up 9s L1(L1L2) 64
0000.0000.0003 Vlanif10 0000.0000.0002.01 Up 27s L1 64
0000.0000.0002 Vlanif10 0000.0000.0004.01 Up 28s L2(L1L2) 64
0000.0000.0004 Vlanif10 0000.0000.0004.01 Up 8s L2 64
# View information about the IS-IS interface of Switch A.
[SwitchA] display isis interface
Interface information for ISIS(1)
---------------------------------
Interface Id IPV4.State IPV6.State MTU Type DIS
Vlanif10 001 Up Down 1497 L1/L2 No/No
# View information about the IS-IS interface of Switch B.
[SwitchB] display isis interface
Interface information for ISIS(1)
---------------------------------
Interface Id IPV4.State IPV6.State MTU Type DIS
Vlanif10 001 Up Down 1497 L1/L2 Yes/No
# View information about the IS-IS interface of Switch D.
[SwitchD] display isis interface
Interface information for ISIS(1)
---------------------------------
Interface Id IPV4.State IPV6.State MTU Type DIS
Vlanif10 001 Up Down 1497 L1/L2 No/Yes
NOTE
When the default DIS priority is used, the interface on Switch B has the greatest MAC address among all the interfaces on the Level-1 Switches. Therefore, Switch B is elected as the Level-1 DIS. The interface on Switch D has the greatest MAC address among all the interfaces on the Level-2 Switches. Therefore,
Switch D is elected as the Level-2 DIS. The Level-1 pseudonode is 0000.0000.0002.01. The Level-2 pseudonode is 0000.0000.0004.01.
Step 5 Set the DIS priority of Switch A.
Issue 01 (2011-10-26) 380
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 7 IS-IS Configuration
[SwitchA] interface vlanif 10
[SwitchA-Vlanif10] isis dis-priority 100
[SwitchA-Vlanif10] quit
# View information about the IS-IS neighbors of SwitchA.
[SwitchA] display isis peer
Peer information for ISIS(1)
----------------------------
System Id Interface Circuit Id State HoldTime Type
PRI
0000.0000.0002 Vlanif10 0000.0000.0001.01 Up 21s L1(L1L2) 64
0000.0000.0003 Vlanif10 0000.0000.0001.01 Up 27s L1 64
0000.0000.0002 Vlanif10 0000.0000.0001.01 Up 28s L2(L1L2) 64
0000.0000.0004 Vlanif10 0000.0000.0001.01 Up 30s L2 64
Step 6 Verify the configuration.
# View information about the IS-IS interface of Switch A.
[SwitchA] display isis interface
Interface information for ISIS(1)
---------------------------------
Interface Id IPV4.State IPV6.State MTU Type DIS
Vlanif10 001 Up Down 1497 L1/L2 Yes/Yes
As shown in the output information, after the DIS priority of the IS-IS interface is changed,
Switch A immediately becomes a Level-1 and Level-2 DIS and its pseudonode is
0000.0000.0001.01.
# View information about the IS-IS neighbors and IS-IS interfaces on Switch B.
[SwitchB] display isis peer
Peer information for ISIS(1)
----------------------------
System Id Interface Circuit Id State HoldTime Type
PRI
0000.0000.0001 Vlanif10 0000.0000.0001.01 Up 7s L1(L1L2)
100
0000.0000.0003 Vlanif10 0000.0000.0001.01 Up 25s L1
64
0000.0000.0001 Vlanif10 0000.0000.0001.01 Up 7s L2(L1L2)
100
0000.0000.0004 Vlanif10 0000.0000.0001.01 Up 25s L2
64
[SwitchB] display isis interface
Interface information for ISIS(1)
---------------------------------
Interface Id IPV4.State IPV6.State MTU Type DIS
Vlanif10 001 Up Down 1497 L1/L2 No/No
# View information about the IS-IS neighbors and IS-IS interfaces on SwitchD.
[SwitchD] display isis peer
Peer information for ISIS(1)
----------------------------
System Id Interface Circuit Id State HoldTime Type PRI
0000.0000.0001 Vlanif10 0000.0000.0001.01 Up 9s L2 100
0000.0000.0002 Vlanif10 0000.0000.0001.01 Up 28s L2 64
[SwitchD] display isis interface
Interface information for ISIS(1)
---------------------------------
Interface Id IPV4.State IPV6.State MTU Type DIS
Vlanif10 001 Up Down 1497 L1/L2 No/No
----End
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
381
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Configuration Files
l Configuration file of Switch A
#
#
sysname SwitchA
#
vlan batch 10
# isis 1
network-entity 10.0000.0000.0001.00
# interface Vlanif10
ip address 10.1.1.1 255.255.255.0
isis enable 1
isis dis-priority 100
# interface GigabitEthernet1/0/1
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# return l Configuration file of Switch B
#
#
sysname SwitchB
#
vlan batch 10
# isis 1
network-entity 10.0000.0000.0002.00
# interface Vlanif10
ip address 10.1.1.2 255.255.255.0
isis enable 1
# interface GigabitEthernet1/0/1
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# return l Configuration file of Switch C
#
sysname SwitchC
#
vlan batch 10
# isis 1
is-level level-1
network-entity 10.0000.0000.0003.00
# interface Vlanif10
ip address 10.1.1.3 255.255.255.0
isis enable 1
# interface GigabitEthernet1/0/1
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# return l Configuration file of Switch D
#
sysname SwitchD
#
vlan batch 10
#
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
7 IS-IS Configuration
382
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 7 IS-IS Configuration isis 1
is-level level-2
network-entity 10.0000.0000.0004.00
# interface Vlanif10
ip address 10.1.1.4 255.255.255.0
isis enable 1
# interface GigabitEthernet1/0/1
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# return
7.18.4 Example for Configuring IS-IS Load Balancing
Networking Requirements
, the networking requirements are as follows:
l Switch A, Switch B, Switch C, and Switch D run IS-IS to communicate with each other.
l Switch A, Switch B, Switch C, and Switch D are Level-2 Switches in Area 10.
l Load balancing needs to be configured so that the traffic of Switch A is sent to Switch D through Switch B and Switch C.
Figure 7-9 Networking diagram for configuring IS-IS load balancing
Issue 01 (2011-10-26)
Switch
SwitchA
SwitchA
SwitchA
SwitchB
SwitchB
SwitchC
SwitchC
SwitchD
SwitchD
GE1/0/3
GE1/0/1
GE1/0/2
GE1/0/1 GE1/0/2
SwitchB
L2
SwitchA
L2
SwitchD
Area 10
L2
GE1/0/1
GE1/0/3
GE1/0/2
GE1/0/1
SwitchC
L2
GE1/0/2
Interface
GigabitEthernet1/0/1
GigabitEthernet1/0/2
GigabitEthernet1/0/3
GigabitEthernet1/0/1
GigabitEthernet1/0/2
GigabitEthernet1/0/1
GigabitEthernet1/0/2
GigabitEthernet1/0/1
GigabitEthernet1/0/2
VLANIF interface
VLANIF 10
VLANIF 20
VLANIF 50
VLANIF 10
VLANIF 30
VLANIF 20
VLANIF 40
VLANIF 30
VLANIF 40
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
IP address
10.1.1.1/24
10.1.2.1/24
172.16.1.1/24
10.1.1.2/24
192.168.0.1/24
10.1.2.2./24
192.168.1.1/24
192.168.0.2/24
192.168.1.2/24
383
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
SwitchD GigabitEthernet1/0/3 VLANIF 60
7 IS-IS Configuration
172.17.1.1/24
Configuration Roadmap
The configuration roadmap is as follows:
1.
Enable IS-IS on each Switch so that the Switches can be interconnected.
2.
Set the number of equal-cost routes to 1 and check the routing table.
3.
Configure load balancing on Switch A and check the routing table.
4.
(Optional) Set the weight of equal-cost routes on Switch A.
Data Preparation
To complete the configuration, you need the following data: l ID of the VLAN that each interface belongs to, as shown in
l
IP address of each VLANIF interface, as shown in
l
System ID, level, and area ID of each Switch :
– Switch A: The system ID is 0000.0000.0001; the area ID is 10; the level is Level-2.
– Switch B: The system ID is 0000.0000.0002; the area ID is 10; the level is Level-2.
–
Switch C: The system ID is 0000.0000.0003; the area ID is 10; the level is Level-2.
–
Switch D: The system ID is 0000.0000.0004; the area ID is 10; the level is Level-2.
l Number of routes for load balancing on Switch A: 1 l Load balancing mode on Switch A l Weight of the equal-cost route with Switch C as the next hop: 1
Procedure
Step 1 Configure VLANs that the related interfaces belong to.
<Quidway> system-view
[Quidway] sysname SwitchA
[Quidway] vlan batch 10 20 50
[SwitchA] interface GigabitEthernet 1/0/1
[SwitchA-GigabitEthernet1/0/1] port hybrid pvid vlan 10
[SwitchA-GigabitEthernet1/0/1] port hybrid untagged vlan 10
[SwitchA-GigabitEthernet1/0/1] quit
[SwitchA] interface GigabitEthernet 1/0/2
[SwitchA-GigabitEthernet1/0/2] port hybrid pvid vlan 20
[SwitchA-GigabitEthernet1/0/2] port hybrid untagged vlan 20
[SwitchA-GigabitEthernet1/0/2] quit
[SwitchA] interface GigabitEthernet 1/0/3
[SwitchA-GigabitEthernet1/0/3] port hybrid pvid vlan 50
[SwitchA-GigabitEthernet1/0/3] port hybrid untagged vlan 50
[SwitchA-GigabitEthernet1/0/3] quit
The configurations of Switch B, Switch C, and Switch D are similar to the configuration of
Switch A, and are not mentioned here.
Step 2 Assign an IP address to each VLANIF interface.
[SwitchA] interface vlanif 10
[SwitchA-Vlanif10] ip address 10.1.1.1 24
[SwitchA-Vlanif10] quit
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
384
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
7 IS-IS Configuration
[SwitchA] interface vlanif 20
[SwitchA-Vlanif20] ip address 10.1.2.1 24
[SwitchA-Vlanif20] quit
[SwitchA] interface vlanif 50
[SwitchA-Vlanif50] ip address 172.16.1.1 24
[SwitchA-Vlanif50] quit
The configurations of Switch B, Switch C, and Switch D are similar to the configuration of
Switch A, and are not mentioned here.
Step 3 Configure basic IS-IS functions.
# Configure Switch A.
[SwitchA] isis 1
[SwitchA-isis-1] network-entity 10.0000.0000.0001.00
[SwitchA-isis-1] quit
[SwitchA] interface vlanif 10
[SwitchA-Vlanif10] isis enable 1
[SwitchA-Vlanif10] quit
# Configure Switch B.
[SwitchB] isis 1
[SwitchB-isis-1] network-entity 10.0000.0000.0002.00
[SwitchB-isis-1] quit
[SwitchB] interface vlanif 30
[SwitchB-Vlanif30] isis enable 1
[SwitchB-Vlanif30] quit
The configurations of Switch C and Switch D are similar to the configuration of Switch A, and are not mentioned here.
Step 4 Set the number of equal-cost routes for load balancing to 1 on Switch A.
[SwitchA] isis 1
[SwitchA-isis-1] maximum load-balancing 1
[SwitchA-isis-1] quit
# View the routing table of Switch A.
[SwitchA] display isis route
Route information for ISIS(1)
-----------------------------
ISIS(1) Level-2 Forwarding Table
--------------------------------
IPV4 Destination IntCost ExtCost ExitInterface NextHop Flags
-------------------------------------------------------------------------
192.168.1.0/24 20 NULL Vlanif20 10.1.2.2 A/-/-/-
10.1.1.0/24 10 NULL Vlanif10 Direct D/-/L/-
172.16.1.0/24 10 NULL Vlanif50 Direct D/-/L/-
172.17.1.0/24 30 NULL Vlanif10 10.1.1.2 A/-/-/-
10.1.2.0/24 10 NULL Vlanif20 Direct D/-/L/-
192.168.0.0/24 20 NULL Vlanif10 10.1.1.2 A/-/-/-
Flags: D-Direct, A-Added to URT, L-Advertised in LSPs, S-IGP Shortcut,U-Up/
Down Bit Set
As shown in the routing table, when the maximum number of equal-cost routes for load balancing is set to 1, IS-IS selects 10.1.1.2 as the next hop to the destination network 172.17.1.0. This is because Switch B has a smaller system ID.
Step 5 Restore the default number of equal-cost routes for load balancing on Switch A.
[SwitchA] isis 1
[SwitchA-isis-1] undo maximum load-balancing
[SwitchA-isis-1] quit
Issue 01 (2011-10-26) 385
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
7 IS-IS Configuration
# View the routing table of Switch A.
[SwitchA] display isis route
Route information for ISIS(1)
-----------------------------
ISIS(1) Level-2 Forwarding Table
--------------------------------
IPV4 Destination IntCost ExtCost ExitInterface NextHop Flags
-------------------------------------------------------------------------
192.168.1.0/24 20 NULL Vlanif20 10.1.2.2 A/-/-/-
10.1.1.0/24 10 NULL Vlanif10 Direct D/-/L/-
172.16.1.0/24 10 NULL Vlanif50 Direct D/-/L/-
172.17.1.0/24 30 NULL Vlanif10 10.1.1.2 A/-/-/-
Vlanif20 10.1.2.2
10.1.2.0/24 10 NULL Vlanif20 Direct D/-/L/-
192.168.0.0/24 20 NULL Vlanif10 10.1.1.2 A/-/-/-
Flags: D-Direct, R-Added to RM, L-Advertised in LSPs, U-Up/Down Bit Set
As shown in the routing table, the number of equal-cost routes for load balancing is restored to the default value 6. Both the next hops of Switch A, 10.1.1.2 (Switch B) and 10.1.2.2 (Switch
C) now become valid.
Step 6 (Optional) Set the preference for equal-cost routes on Switch A.
[SwitchA] isis
[SwitchA-isis-1] nexthop 10.1.2.2 weight 1
[SwitchA-isis-1] quit
Step 7 Verify the configuration.
# View the routing table of Switch A.
[SwitchA] display isis route
Route information for ISIS(1)
-----------------------------
ISIS(1) Level-2 Forwarding Table
--------------------------------
IPV4 Destination IntCost ExtCost ExitInterface NextHop Flags
--------------------------------------------------------------------------------
192.168.1.0/24 20 NULL Vlanif20 10.1.2.2 A/-/-/-
10.1.1.0/24 10 NULL Vlanif10 Direct D/-/L/-
172.16.1.0/24 10 NULL Vlanif50 Direct D/-/L/-
172.17.1.0/24 30 NULL Vlanif20 10.1.2.2 A/-/-/-
10.1.2.0/24 10 NULL Vlanif20 Direct D/-/L/-
192.168.0.0/24 20 NULL Vlanif10 10.1.1.2 A/-/-/-
Flags: D-Direct, R-Added to RM, L-Advertised in LSPs, U-Up/Down Bit Set
As shown in the routing table, the preference of the next hop 10.1.2.2 (Switch C) with the weight as 1, is higher than that of 10.1.1.2 (Switch B), after the weight is set for equal-cost routes.
Therefore, IS-IS selects route with the next hop 10.1.2.2 as the optimal route.
----End
Configuration Files
l Configuration file of Switch A
#
sysname SwitchA
#
vlan batch 10 20 50
# isis 1
Issue 01 (2011-10-26) 386
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
is-level level-2
network-entity 10.0000.0000.0001.00
nexthop 10.1.2.2 weight 1
# interface Vlanif10
ip address 10.1.1.1 255.255.255.0
isis enable 1
# interface Vlanif20
ip address 10.1.2.1 255.255.255.0
isis enable 1
# interface Vlanif50
ip address 172.16.1.1 255.255.255.0
isis enable 1
# interface GigabitEthernet1/0/1
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# interface GigabitEthernet1/0/2
port hybrid pvid vlan 20
port hybrid untagged vlan 20
# interface GigabitEthernet1/0/3
port hybrid pvid vlan 50
port hybrid untagged vlan 50
# return l Configuration file of Switch B
#
sysname SwitchB
#
vlan batch 10 30
# isis 1
is-level level-2
network-entity 10.0000.0000.0002.00
# interface Vlanif10
ip address 10.1.1.2 255.255.255.0
isis enable 1
# interface Vlanif30
ip address 192.168.0.1 255.255.255.0
isis enable 1
# interface GigabitEthernet1/0/1
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# interface GigabitEthernet1/0/2
port hybrid pvid vlan 30
port hybrid untagged vlan 30
# return l Configuration file of Switch C
#
sysname SwitchC
#
vlan batch 20 40
# isis 1
is-level level-2
network-entity 10.0000.0000.0003.00
# interface Vlanif20
ip address 10.1.2.2 255.255.255.0
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
7 IS-IS Configuration
387
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 7 IS-IS Configuration
isis enable 1
# interface Vlanif40
ip address 192.168.1.1 255.255.255.0
isis enable 1
# interface GigabitEthernet1/0/1
port hybrid pvid vlan 20
port hybrid untagged vlan 20
# interface GigabitEthernet1/0/2
port hybrid pvid vlan 40
port hybrid untagged vlan 40
# return l Configuration file of Switch D
#
sysname SwitchD
#
vlan batch 30 40 60
# isis 1
is-level level-2
network-entity 10.0000.0000.0004.00
# interface Vlanif30
ip address 192.168.0.2 255.255.255.0
isis enable 1
# interface Vlanif40
ip address 192.168.1.2 255.255.255.0
isis enable 1
# interface Vlanif60
ip address 172.17.1.1 255.255.255.0
isis enable 1
# interface GigabitEthernet1/0/1
port hybrid pvid vlan 30
port hybrid untagged vlan 30
# interface GigabitEthernet1/0/2
port hybrid pvid vlan 40
port hybrid untagged vlan 40
# interface GigabitEthernet1/0/3
port hybrid pvid vlan 60
port hybrid untagged vlan 60
# return
7.18.5 Example for Configuring IS-IS to Interact with BGP
Networking Requirements
l
Switch A and Switch B belong to the same AS, and the IS-IS neighbor relationship is established between Switch A and Switch B; Switch A is a non-BGP router in the AS.
l
EBGP connections are established between Switch B and Switch C. It is required to change the cost of a route by applying the routing policy when IS-IS imports BGP routes.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
388
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 7 IS-IS Configuration
Figure 7-10 Networking diagram for configuring IS-IS to interact with BGP
Switch
SwitchA
SwitchB
SwitchB
SwitchC
GE1/0/0
10.1.1.1/24
SwitchA
GE1/0/0
10.1.1.2/24
Loopback0
1.1.1.1/32
GE2/0/0
10.2.1.1/24
SwitchB
AS 65008
Interface
GigabitEthernet1/0/0
GigabitEthernet1/0/0
GigabitEthernet2/0/0
GigabitEthernet1/0/0
Loopback0
2.2.2.2/32
GE1/0/0
10.2.1.2/24
SwitchC
AS 65009
VLANIF interface IP address
VLANIF 10
VLANIF 10
VLANIF 20
VLANIF 20
10.1.1.1/24
10.1.1.2/24
10.2.1.1/24
10.2.1.2/24
Configuration Roadmap
The configuration roadmap is as follows:
1.
Enable IS-IS on Switch A and Switch B and specify a network entity.
2.
Configure EBGP connections on Switch B and Switch C.
3.
Configure IS-IS to interact with BGP on Switch B, and check route information.
Data Preparation
To complete the configuration, you need the following data: l Area addresses of Switch A and Switch B l Router ID and AS number of Switch B l Router ID and AS number of Switch C
Procedure
Step 1 Configure VLANs that interfaces belong to.
<Quidway> system-view
[Quidway] sysname SwitchB
[SwitchB] vlan batch 10 20
[SwitchB] interface GigabitEthernet 1/0/0
[SwitchB-GigabitEthernet1/0/0] port hybrid pvid vlan 10
[SwitchB-GigabitEthernet1/0/0] port hybrid untagged vlan 10
[SwitchB-GigabitEthernet1/0/0] quit
[SwitchB] interface GigabitEthernet 2/0/0
[SwitchB-GigabitEthernet2/0/0] port hybrid pvid vlan 20
[SwitchB-GigabitEthernet2/0/0] port hybrid untagged vlan 20
[SwitchB-GigabitEthernet2/0/0] quit
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
389
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
7 IS-IS Configuration
The configurations of Switch A and Switch C are similar to the configuration of Switch B, and are not mentioned here.
Step 2 Assign an IP address to each VLANIF interface.
[SwitchB] interface vlanif 10
[SwitchB-Vlanif10] ip address 10.1.1.2/24
[SwitchB-Vlanif10] quit
[SwitchB] interface vlanif 20
[SwitchB-Vlanif20] ip address 10.2.1.1/24
[SwitchB-Vlanif20] quit
The configurations of Switch A and Switch C are similar to the configuration of Switch B, and are not mentioned here.
Step 3 Configure basic IS-IS functions.
# Configure Switch A.
[SwitchA] isis 1
[SwitchA-isis-1] network-entity 10.0000.0000.0001.00
[SwitchA-isis-1] quit
[SwitchA] interface vlanif 10
[SwitchA-Vlanif10] isis enable 1
[SwitchA-Vlanif10] quit
# Configure Switch B.
[SwitchB] isis 1
[SwitchB-isis-1] network-entity 10.0000.0000.0002.00
[SwitchB-isis-1] quit
[SwitchB] interface vlanif 20
[SwitchB-Vlanif20] isis enable 1
[SwitchB-Vlanif20] quit
Step 4 Configure an EBGP connection.
# Configure Switch B.
[SwitchB] bgp 65008
[SwitchB-bgp] router-id 1.1.1.1
[SwitchB-bgp] peer 10.2.1.2 as-number 65009
[SwitchB-bgp] ipv4-family unicast
[SwitchB-bgp-af-ipv4] network 10.2.1.0 255.255.255.0
# Configure Switch C.
[SwitchC] bgp 65009
[SwitchC-bgp] router-id 2.2.2.2
[SwitchC-bgp] peer 10.2.1.1 as-number 65008
[SwitchC-bgp] ipv4-family unicast
[SwitchC-bgp-af-ipv4] network 10.2.1.0 255.255.255.0
Step 5 Configure IS-IS to import BGP routes.
# Configure a static route on Switch C.
[SwitchC] ip route-static 200.1.1.1 32 NULL 0
# On Switch C, configure BGP to import the static route.
[SwitchC] bgp 65009
[SwitchC-bgp] import-route static
# On Switch B, configure IS-IS to import the BGP route.
[SwitchB] isis 1
[SwitchB-isis-1] import-route bgp
[SwitchB-isis-1] quit
Issue 01 (2011-10-26) 390
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
7 IS-IS Configuration
# View the routing table of Switch A, and you can find that IS-IS successfully imports the BGP route 200.1.1.1/32.
[SwitchA] display ip routing-table
Route Flags: R - relied, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 6 Routes : 6
Destination/Mask Proto Pre Cost Flags NextHop Interface
10.1.1.0/24 Direct 0 0 D 10.1.1.1 Vlanif10
10.1.1.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
10.1.1.2/32 Direct 0 0 D 10.1.1.2 Vlanif10
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
200.1.1.1/32 ISIS 15 74 D 10.1.1.2 Vlanif10
# On Switch B, configure the AS-Path filter, and apply the filter in the routing policy named
RTC.
[SwitchB] ip as-path-filter 1 permit 65009
[SwitchB] route-policy RTC permit node 0
[SwitchB-route-policy] if-match as-path-filter 1
[SwitchB-route-policy] apply cost 20
[SwitchB-route-policy] quit
# On Switch B, configure IS-IS to import the BGP route on Switch C.
[SwitchB] isis 1
[SwitchB-isis-1] import-route bgp route-policy RTC
[SwitchB-isis-1] quit
# View the routing table of Switch A, and you can find that the AS-Path filter is successfully applied and the cost of the imported route 200.1.1.1/32 changes from 74 to 94.
[SwitchA] display ip routing-table
Route Flags: R - relied, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 6 Routes : 6
Destination/Mask Proto Pre Cost Flags NextHop Interface
10.1.1.0/24 Direct 0 0 D 10.1.1.1 Vlanif10
10.1.1.1/32 Direct 0 0 D 127.0.0.1 Vlanif10
10.1.1.2/32 Direct 0 0 D 10.1.1.2 Vlanif10
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
200.1.1.1/32 ISIS 15 94 D 10.1.1.2 Vlanif10
Step 6 Configure BGP to import an IS-IS route.
[SwitchB] bgp 65008
[SwitchB-bgp] import-route isis 1
[SwitchB-bgp] quit
# View the routing table of Switch C, and you can find that BGP successfully imports the IS-IS route 10.1.1.0/24.
[SwitchC] display ip routing-table
Route Flags: R - relied, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 7 Routes : 7
Destination/Mask Proto Pre Cost Flags NextHop Interface
10.1.1.0/24 BGP 255 0 D 10.2.1.1 Vlanif20
Issue 01 (2011-10-26) 391
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
7 IS-IS Configuration
10.2.1.0/24 Direct 0 0 D 10.2.1.2 Vlanif20
10.2.1.1/32 Direct 0 0 D 10.2.1.1 Vlanif20
10.2.1.2/32 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
200.1.1.1/32 Static 60 0 D 0.0.0.0 NULL0
----End
Configuration Files
l Configuration file of Switch A
#
sysname SwitchA
# vlan batch 10
# isis 1 network-entity 10.0000.0000.0001.00
# interface Vlanif10
ip address 10.1.1.1 255.255.255.0
isis enable 1
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 10
port hybrid untagged vlan 10 isis enable 1
# return l Configuration file of Switch B
#
sysname SwitchB
# vlan batch 10 20
# isis 1 network-entity 10.0000.0000.0002.00
import-route bgp route-policy RTC
# interface Vlanif10
ip address 10.1.1.2 255.255.255.0
isis enable 1
# interface Vlanif20
ip address 10.2.1.1 255.255.255.0
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# interface GigabitEthernet2/0/0
port hybrid pvid vlan 20
port hybrid untagged vlan 20
# interface LoopBack0
ip address 1.1.1.1 255.255.255.255
# bgp 65008
router-id 1.1.1.1
peer 10.2.1.2 as-number 65009
#
ipv4-family unicast
undo synchronization
network 10.2.1.0 255.255.255.0
import-route static
import-route isis 1
392
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
peer 10.2.1.2 enable
# route-policy RTC permit node 0
if-match as-path-filter 1
apply cost 20
#
ip as-path-filter 1 permit 65009
# return l Configuration file of Switch C
#
sysname SwitchC
#
vlan batch 20
# interface Vlanif20
ip address 10.2.1.2 255.255.255.0
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 20
port hybrid untagged vlan 20
# interface LoopBack0
ip address 2.2.2.2 255.255.255.255
# bgp 65009
router-id 2.2.2.2
peer 10.2.1.1 as-number 65008
#
ipv4-family unicast
undo synchronization
network 10.2.1.0 255.255.255.0
import-route static
peer 10.2.1.1 enable
#
ip route-static 200.1.1.1 255.255.255.255 NULL0
# return
7.18.6 Example for Configuring IS-IS MT
7 IS-IS Configuration
Networking Requirements
IP address and link cost of each interface on switches are shown in
supports only IPv4. It is required that Loopback1 of Switch C is reachable. If the network does not support IS-IS MT, the shortest path computed by SPF passes by Switch B and IPv6 packets cannot reach the destination. To forward IPv6 packets successfully, enable IS-IS MT and perform SPF calculation in the IPv6 topology.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
393
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Switch
SwitchA
SwitchA
SwitchB
SwitchB
SwitchC
SwitchC
SwitchD
SwitchD
Figure 7-11 Networking diagram of IS-IS MT
SwitchA
IPv4/IPv6
GE2/0/0
2001::1/64
GE1/0/0
192.168.1.1/24
SwitchB
cost=4
GE1/0/0
192.168.1.2/24
IPv4
GE2/0/0
192.168.2.1/24 cost=6
GE1/0/0
2001::2/64
IPv4/IPv6
Loopback1
GE2/0/0
2003::1/64
2008::1/64 cost=14
SwitchD
GE1/0/0
2003::2/64 cost=3
GE2/0/0
192.168.2.2/24
SwitchC
IPv4/IPv6
Interface
GigabitEthernet1/0/0
GigabitEthernet2/0/0
GigabitEthernet1/0/0
GigabitEthernet2/0/0
GigabitEthernet1/0/0
GigabitEthernet2/0/0
GigabitEthernet1/0/0
GigabitEthernet2/0/0
VLANIF interface
VLANIF 10
VLANIF 20
VLANIF 10
VLANIF 40
VLANIF 30
VLANIF 40
VLANIF 20
VLANIF 30
7 IS-IS Configuration
IP address
192.168.1.1/24
2001::1/64
192.168.1.2/24
192.168.2.1/24
2003::2/64
192.168.2.2/24
2001::2/64
2003::1/64
Configuration Roadmap
The configuration roadmap is as follows:
1.
Configure the IPv4/IPv6 address of each interface.
2.
Enable IPv6 on switches that supporting IPv4/IPv6 dual stack protocol.
3.
Enable IS-IS globally and configure the name of the network entity.
4.
Enable IPv6 of the IPv6 topology type on switches that support the IPv4/IPv6 dual stack protocol.
5.
Enable IS-IS on each interface and configure the link cost according to networking requirements.
Data Preparation
To complete the configuration, you need the following data: l
IP address of each switch interface is needed. For example, in
is 86; the system ID of Switch A is 0000.0000.0001; system IDs of other switches increase based on that of Switch A; all the switches are Level-1 routers.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
394
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 7 IS-IS Configuration l The link cost of Switch D → Switch A, Switch A → Switch B, Switch B → Switch C and
Switch D → Switch C is 6, 4, 3 and 14 respectively. The cost of Loopback1 on Switch D defaults to be 0. The costs of other links default to be 10.
Procedure
Step 1 Configure VLANs that interfaces belong to.
<Quidway> system-view
[Quidway] sysname SwitchA
[SwitchA] vlan batch 10 20
[SwitchA] interface gigabitethernet 1/0/0
[SwitchA-GigabitEthernet1/0/0] port hybrid pvid vlan 10
[SwitchA-GigabitEthernet1/0/0] port hybrid untagged vlan 10
[SwitchA-GigabitEthernet1/0/0] quit
[SwitchA] interface gigabitethernet 2/0/0
[SwitchA-GigabitEthernet2/0/0] port hybrid pvid vlan 20
[SwitchA-GigabitEthernet2/0/0] port hybrid untagged vlan 20
[SwitchA-GigabitEthernet2/0/0] quit
The configurations of Switch B, Switch C and Switch D are similar to the configuration of
SwitchA, and are not mentioned here.
Step 2 Assign an IP address to each VLANIF interface.
[SwitchA] interface vlanif 10
[SwitchA-Vlanif10] ip address 192.168.1.1 24
[SwitchA-Vlanif10] quit
[SwitchA] interface vlanif 20
[SwitchA-Vlanif20] ipv6 enable
[SwitchA-Vlanif20] ipv6 address 2001::1 64
[SwitchA-Vlanif20] quit
The configurations of Switch B, Switch C and Switch D are similar to the configuration of
SwitchA, and are not mentioned here.
Step 3 Enable IPv6 of the IPv4/ IPv6 dual stack router.
# Enable IPv6 of Switch A.
[SwitchA] ipv6
Configurations of Switch C and Switch D are the same as Switch A.
Step 4 Configure IS-IS to advertise routes.
# Configure basic IS-IS functions on Switch A, enable IS-IS and adopt the IPv6 topology type.
[SwitchA] isis 1
[SwitchA-isis-1] network-entity 86.0000.0000.0001.00
[SwitchA-isis-1] is-level level-1
[SwitchA-isis-1] ipv6 enable topology ipv6
[SwitchA-isis-1] quit
# Enable IS-IS on each interface and set the link cost from Switch A to Switch B to 4.
[SwitchA] interface vlanif 10
[SwitchA-Vlanif10] isis enable 1
[SwitchA-Vlanif10] isis cost 4
[SwitchA-Vlanif10] quit
[SwitchA] interface vlanif 20
[SwitchA-Vlanif20] isis ipv6 enable 1
[SwitchA-Vlanif20] quit
# Configure basic IS-IS functions on Switch B.
[SwitchB] isis 1
[SwitchB-isis-1] network-entity 86.0000.0000.0002.00
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
395
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
7 IS-IS Configuration
[SwitchB-isis-1] is-level level-1
[SwitchB-isis-1] quit
# Enable IS-IS on each interface and set the link cost from Switch B to Switch C to 3.
[SwitchB] interface vlanif 10
[SwitchB-Vlanif10] isis enable 1
[SwitchB-Vlanif10] quit
[SwitchB] interface vlanif 40
[SwitchB-Vlanif40] isis enable 1
[SwitchB-Vlanif40] isis cost 3
[SwitchB-Vlanif40] quit
# Configure basic IS-IS functions on Switch C, enable IS-IS and adopt the IPv6 topology type.
[SwitchC] isis 1
[SwitchC-isis-1] network-entity 86.0000.0000.0003.00
[SwitchC-isis-1] is-level level-1
[SwitchC-isis-1] ipv6 enable topology ipv6
[SwitchC-isis-1] quit
# Enable IS-IS on each interface.
[SwitchC] interface vlanif 30
[SwitchC-Vlanif30] isis ipv6 enable 1
[SwitchC-Vlanif30] quit
[SwitchC] interface vlanif 40
[SwitchC-Vlanif40] isis enable 1
[SwitchC-Vlanif40] quit
[SwitchC] interface loopback 1
[SwitchC-LoopBack1] isis ipv6 enable 1
# Configure basic IS-IS functions on Switch D, enable IS-IS and adopt the IPv6 topology type.
[SwitchD] isis 1
[SwitchD-isis-1] network-entity 86.0000.0000.0004.00
[SwitchD-isis-1] is-level level-1
[SwitchD-isis-1] ipv6 enable topology ipv6
[SwitchD-isis-1] quit
# Enable IS-IS on each interface; set the link cost from Switch D to Switch A to 6 and the link cost from Switch D to Switch C to 14.
[SwitchD] interface vlanif 20
[SwitchD-Vlanif20] isis ipv6 enable 1
[SwitchD-Vlanif20] isis cost 6
[SwitchD-Vlanif20] isis ipv6 cost 6
[SwitchD-Vlanif20] quit
[SwitchD] interface vlanif 30
[SwitchD-Vlanif30] isis ipv6 enable 1
[SwitchD-Vlanif30] isis cost 14
[SwitchD-Vlanif30] isis ipv6 cost 14
[SwitchD-Vlanif30] quit
Step 5 Verify the configuration.
After the configuration, run display isis route command on each switch, and you can find that each switch learns related routes. Take the display of Switch D as an example:
# View routing information of Switch D.
[SwitchD] display isis route
Route information for ISIS(1)
-----------------------------
ISIS(1) Level-1 Forwarding Table
--------------------------------
IPV6 Dest. ExitInterface NextHop Cost Flags
---------------------------------------------------------------------------
2008::/64 Vlanif30 FE80::D11:0:36D4:1 14 A/-/-
Issue 01 (2011-10-26) 396
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
7 IS-IS Configuration
2003::/64 Vlanif30 Direct 14 D/L/-
2001::/64 Vlanif20 Direct 6 D/L/-
Flags: D-Direct, A-Added to URT, L-Advertised in LSPs, S-IGP Shortcut,
U-Up/Down Bit Set
Because IPv6 routes are calculated only on the IPv6 topology, the outgoing interface to 2008::/64 on Switch D is Vlanif30.
# Run the tracert command on Switch D.
[SwitchD] tracert ipv6 2008::1 traceroute to 2003::1 30 hops max,60 bytes packet
1 2008::1 62 ms 63 ms 31 ms
You can compare this with the routing information when IS-IS is enabled and IPv4/IPv6 integrated topology type is adopted.
[SwitchD] isis 1
[SwitchD-isis-1] ipv6 enable
The modification of Switch A and Switch C is the same as that of Switch D.
After modifying the configuration, run display isis route command to view the routes again.
Take the display of Switch D as an example:
# View routing information of Switch D.
[SwitchD] display isis route
Route information for ISIS(1)
-----------------------------
ISIS(1) Level-1 Forwarding Table
--------------------------------
IPV6 Dest. ExitInterface NextHop Cost Flags
--------------------------------------------------------------------------
2008::/64 Vlanif30 FE80::200:5EFF:FE01:100 13 A/-/-
2003::/64 Vlanif20 Direct 14 D/L/-
2001::/64 Vlanif20 Direct 6 D/L/-
Flags: D-Direct, A-Added to URT, L-Advertised in LSPs, S-IGP Shortcut,
U-Up/Down Bit Set
From the preceding information, you can see that the route to 2003::/64 can be calculated on
Switch D and the outgoing interface is Vlanif20. Outgoing interface Vlanif20 is selected because the cost of link from this outgoing interface to destination 2003::1/64 is smaller in integrated topology calculation.
[SwitchD] tracert ipv6 2003::1
traceroute to 2003::1 30 hops max,60 bytes packet
1 2001::1 31 ms !N 31 ms !N 32 ms !N
Run the tracert command, and you can find that IPv6 packets fail to reach the destination.
# View routing information of Switch A
[SwitchA] display isis route
Route information for ISIS(1)
-----------------------------
ISIS(1) Level-1 Forwarding Table
--------------------------------
IPV4 Destination IntCost ExtCost ExitInterface NextHop Flags
------------------------------------------------------------------------
192.168.2.0/24 7 NULL Vlanif10 192.168.1.2 A/-/-/-
192.168.1.0/24 4 NULL Vlanif10 Direct D/-/L/-
IPV6 Dest. ExitInterface NextHop Cost Flags
----------------------------------------------------------------------------
2003::/64 Vlanif10 FE80::2E0:A9FF:FE47:8302 24 A/-/-
2001::/64 Vlanif20 Direct 10 D/L/-
Flags: D-Direct, A-Added to URT, L-Advertised in LSPs, S-IGP Shortcut,
U-Up/Down Bit Set
397
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
7 IS-IS Configuration
From the preceding information, you can see that Switch A does not have information the outgoing interface to 2008::/64. This is because the link between Switch A and Switch B does not support IPv6 and IPv6 packets sent by Switch D are discarded here.
----End
Configuration Files
l Configuration file of Switch A
sysname SwitchA
# vlan batch 10 20
#
ipv6
# isis 1
is-level level-1
network-entity 86.0000.0000.0001.00
#
ipv6 enable topology ipv6
# interface Vlanif10
ip address 192.168.1.1 255.255.255.0
isis enable 1
isis cost 4
# interface Vlanif20
ipv6 enable
ipv6 address 2001::1/64 isis ipv6 enable 1
# interface GigabitEthernet 1/0/0
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# interface GigabitEthernet 2/0/0
port hybrid pvid vlan 20
port hybrid untagged vlan 20
# return l Configuration file of Switch B
#
sysname SwitchB
sysname SwitchB
# vlan batch 10 40
# isis 1
is-level level-1
network-entity 86.0000.0000.0002.00
# interface Vlanif10
ip address 192.168.1.2 255.255.255.0
isis enable 1
# interface Vlanif40
ip address 192.168.2.1 255.255.255.0
isis enable 1
isis cost 3
# interface GigabitEthernet 1/0/0
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# interface GigabitEthernet 2/0/0
port hybrid pvid vlan 40
port hybrid untagged vlan 40
Issue 01 (2011-10-26) 398
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Issue 01 (2011-10-26)
# return l Configuration file of Switch C
# sysname SwitchC
# vlan batch 30 40
#
ipv6
# isis 1
is-level level-1
network-entity 86.0000.0000.0003.00
#
ipv6 enable topology ipv6
# interface Vlanif30
ipv6 enable
ipv6 address 2003::2/64
isis ipv6 enable 1
# interface Vlanif40
ip address 192.168.2.2 255.255.255.0
isis enable 1
# interface GigabitEthernet 1/0/0
port hybrid pvid vlan 30
port hybrid untagged vlan 30
# interface GigabitEthernet 2/0/0
port hybrid pvid vlan 40
port hybrid untagged vlan 40
# interface LoopBack1
ipv6 enable
ipv6 address 2008::1/64
isis ipv6 enable 1
# return l Configuration file of Switch D
#
sysname SwitchD
# vlan batch 20 30
#
ipv6
# isis 1
is-level level-1
network-entity 86.0000.0000.0004.00
#
ipv6 enable topology ipv6
#
# interface Vlanif20
ipv6 enable
ipv6 address 2001::2/64
isis ipv6 enable 1
isis ipv6 cost 6
isis cost 6
# interface Vlanif30
ipv6 enable
ipv6 address 2003::1/64
isis ipv6 enable 1
isis ipv6 cost 14
isis cost 14
#
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
7 IS-IS Configuration
399
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing interface GigabitEthernet 1/0/0
port hybrid pvid vlan 20
port hybrid untagged vlan 20
# interface GigabitEthernet 2/0/0
port hybrid pvid vlan 30
port hybrid untagged vlan 30
# return
7.18.7 Example for Configuring Local MT
7 IS-IS Configuration
Networking Requirements
l Switch A, Switch B, Switch C, Switch D, and Switch E run IS-IS, and they are Level-2 switches.
l A TE tunnel is established between Switch B and Switch D.
l IGP Shortcut is enabled on Switch B.
Figure 7-12 Configuring local MT
172.16.1.2/24
Client
Server
192.168.3.2/24
Switch
SwitchA
SwitchA
SwitchB
SwitchB
SwitchC
GE1/0/0
172.16.1.1/24
SwitchA
GE2/0/0
10.0.0.1/24
GE1/0/0
10.0.0.2/24
Router-id
2.2.2.2
Tunnel1/0/0
Router-id
1.1.1.1
SwitchB
GE2/0/0
10.0.1.2/24
GE1/0/0
10.0.1.1/24
Tunnel1/0/0
SwitchC
Router-id
3.3.3.3
GE2/0/0
192.168.3.1/24
Router-id
5.5.5.5
SwitchE
GE1/0/0
10.0.3.3/24
SwitchD
GE1/0/0
10.0.3.1/24
Router-id
4.4.4.4
GE2/0/0
10.0.2.1/24
GE2/0/0
10.0.2.2/24
Join
Multicast
Packets
Interface
GigabitEthernet1/0/0
GigabitEthernet2/0/0
GigabitEthernet1/0/0
GigabitEthernet2/0/0
GigabitEthernet1/0/0
VLANIF interface
VLANIF 10
VLANIF 20
VLANIF 20
VLANIF 30
VLANIF 30
IP address
172.16.1.1/24
10.0.0.1/24
10.0.0.2/24
10.0.1.2/24
10.0.1.1/24
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
400
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
SwitchC
SwitchD
SwitchD
SwitchE
SwitchE
GigabitEthernet2/0/0
GigabitEthernet2/0/0
GigabitEthernet1/0/0
GigabitEthernet1/0/0
GigabitEthernet2/0/0
VLANIF 40
VLANIF 40
VLANIF 50
VLANIF 50
VLANIF 60
7 IS-IS Configuration
10.0.2.2/24
10.0.2.1/24
10.0.3.1/24
10.0.3.3/24
192.168.3.1/24
Configuration Roadmap
The configuration roadmap is as follows:
1.
Enable basic IS-IS functions on each switch.
2.
Configure the Protocol Independent Multicast Sparse Mode (PIM-SM).
3.
Configure an MPLS Resource Reservation Protocol (RSVP) TE tunnel and enable IGP
Shortcut.
4.
Enable local MT.
Data Preparation
To complete the configuration, you need the following data: l
IP address of each switch interface is shown in
originating system ID is 0000.0000.0001 and is incremental, and the switches are Level-2 routers.
l Tunnel interface is TE tunnel 1/0/0, the tunnel interface borrows the IP address of Loopback
0, the tunnel encapsulation protocol is MPLS TE, the destination address is 4.4.4.4, the tunnel ID is 100, and the tunnel signaling protocol is RSVP-TE.
Procedure
Step 1 Configure VLANs that interfaces belong to.
<Quidway> system-view
[Quidway] sysname SwitchA
[SwitchA] vlan batch 10 20
[SwitchA] interface gigabitethernet 1/0/0
[SwitchA-GigabitEthernet1/0/0] port hybrid pvid vlan 10
[SwitchA-GigabitEthernet1/0/0] port hybrid untagged vlan 10
[SwitchA-GigabitEthernet1/0/0] quit
[SwitchA] interface gigabitethernet 2/0/0
[SwitchA-GigabitEthernet2/0/0] port hybrid pvid vlan 20
[SwitchA-GigabitEthernet2/0/0] port hybrid untagged vlan 20
[SwitchA-GigabitEthernet2/0/0] quit
The configurations of SwitchB, SwitchC, SwitchD and SwitchE are similar to the configuration of SwitchA, and are not mentioned here.
Step 2 Assign an IP address for each VLANIF interface and enable IS-IS.
, assign an IP address and the mask for each VLANIF interface and
enable IS-IS. The configuration details are not mentioned here.
Step 3 Configure PIM-SM.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
401
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
7 IS-IS Configuration
# Enable multicast on all switches and enable PIM-SM on all interfaces except GigabitEthernet
1/0/0 on Switch A. The configurations on Switch B, Switch C, Switch D, and Switch E are similar to those on Switch A and are not mentioned here.
[SwitchA] multicast routing-enable
[SwitchA] interface vlanif 20
[SwitchA-Vlanif20] pim sm
[SwitchA-Vlanif20] quit
# Enable IGMP on the interface through which Switch A is connected to hosts.
[SwitchA] interface vlanif 10
[SwitchA-Vlanif10] igmp enable
[SwitchA-Vlanif10] igmp version 3
# Configure a C-BSR and a C-RP. Set the service range of the RP on Switch D and specify the locations of the C-BSR and the C-RP.
[SwitchD] pim
[SwitchD-pim] c-bsr vlanif 50
[SwitchD-pim] c-rp vlanif 50
# Run the display multicast routing-table command to view the multicast routing table of a switch. The multicast routing table on Switch C is as follows:
[SwitchC] display multicast routing-table
Multicast routing table of VPN-Instance: public net
Total 1 entry
00001. (192.168.3.2, 224.31.31.31)
Uptime: 15:03:04
Upstream Interface: Vlanif40
List of 1 downstream interface
1: Vlanif30
Step 4 Configure an MPLS RSVP-TE tunnel.
# Configure Switch B.
[SwitchB] mpls lsr-id 2.2.2.2
[SwitchB] mpls
[SwitchB-mpls] mpls te
[SwitchB-mpls] mpls rsvp-te
[SwitchB-mpls] mpls te cspf
[SwitchB-mpls] quit
[SwitchB] interface vlanif 30
[SwitchB-Vlanif30] mpls
[SwitchB-Vlanif30] mpls te
[SwitchB-Vlanif30] mpls rsvp-te
[SwitchB-Vlanif30] quit
[SwitchB] isis 1
[SwitchB-isis-1] cost-style wide
[SwitchB-isis-1] traffic-eng level-2
[SwitchB-isis-1] quit
# Configure Switch C.
[SwitchC] mpls lsr-id 3.3.3.3
[SwitchC] mpls
[SwitchC-mpls] mpls te
[SwitchC-mpls] mpls rsvp-te
[SwitchC-mpls] mpls te cspf
[SwitchC-mpls] quit
[SwitchC] interface vlanif 30
[SwitchC-Vlanif30] mpls
[SwitchC-Vlanif30] mpls te
[SwitchC-Vlanif30] mpls rsvp-te
[SwitchC-Vlanif30] quit
[SwitchC] interface vlanif 40
[SwitchC-Vlanif40] mpls
Issue 01 (2011-10-26) 402
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 7 IS-IS Configuration
[SwitchC-Vlanif40] mpls te
[SwitchC-Vlanif40] mpls rsvp-te
[SwitchC-Vlanif40] quit
[SwitchC] isis 1
[SwitchC-isis-1] cost-style wide
[SwitchC-isis-1] traffic-eng level-2
[SwitchC-isis-1] quit
# Configure Switch D.
[SwitchD] mpls lsr-id 4.4.4.4
[SwitchD] mpls
[SwitchD-mpls] mpls te
[SwitchD-mpls] mpls rsvp-te
[SwitchD-mpls] mpls te cspf
[SwitchD-mpls] quit
[SwitchD] interface vlanif 50
[SwitchD-Vlanif50] mpls
[SwitchD-Vlanif50] mpls te
[SwitchD-Vlanif50] mpls rsvp-te
[SwitchD-Vlanif50] quit
[SwitchD] isis 1
[SwitchD-isis-1] cost-style wide
[SwitchD-isis-1] traffic-eng level-2
[SwitchD-isis-1] quit
# Configure an MPLS TE tunnel and enable IGP Shortcut.
Configure an MPLS TE tunnel on Switch B and enable IGP Shortcut.
[SwitchB] interface tunnel 1/0/0
[SwitchB-Tunnel1/0/0] ip address unnumbered interface loopback 0
[SwitchB-Tunnel1/0/0] tunnel-protocol mpls te
[SwitchB-Tunnel1/0/0] destination 4.4.4.4
[SwitchB-Tunnel1/0/0] mpls te tunnel-id 100
[SwitchB-Tunnel1/0/0] mpls te igp shortcut isis
[SwitchB-Tunnel1/0/0] mpls te igp metric relative -10
[SwitchB-Tunnel1/0/0] isis enable 1
[SwitchB-Tunnel1/0/0] mpls te commit
[SwitchB-Tunnel1/0/0] quit
# View the routing table on Switch B. You can find that IGP Shortcut is enabled.
[SwitchB] display isis route
Route information for ISIS(1)
-----------------------------
ISIS(1) Level-2 Forwarding Table
--------------------------------
IPV4 Destination IntCost ExtCost ExitInterface NextHop Flags
--------------------------------------------------------------------------------
3.3.3.3/32 10 NULL Vlanif30 10.0.1.1 A/-/-/-
172.16.1.0/24 20 NULL Vlanif20 10.0.0.1 A/-/-/-
2.2.2.2/32 0 NULL Loop0 Direct D/-/L/-
192.168.3.0/24 25 NULL Tun1/0/0 2.2.2.2 A/S/-/-
5.5.5.5/32 15 NULL Tun1/0/0 2.2.2.2 A/S/-/-
10.0.0.0/24 10 NULL Vlanif20 Direct D/-/L/-
10.0.1.0/24 10 NULL Vlanif30 Direct D/-/L/-
4.4.4.4/32 5 NULL Tun1/0/0 2.2.2.2 A/S/-/-
10.0.2.0/24 15 NULL Tun1/0/0 2.2.2.2 A/S/-/-
10.0.3.0/24 15 NULL Tun1/0/0 2.2.2.2 A/S/-/-
Flags: D-Direct, A-Added to URT, L-Advertised in LSPs, S-IGP Shortcut,
U-Up/Down Bit Set
# View the multicast routing table on Switch C spanned by the TE tunnel.
[SwitchC] display multicast routing-table
No multicast routing entry is displayed. This indicates that the multicast packet is discarded.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
403
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
7 IS-IS Configuration
Step 5 Configure local MT.
# Enable local MT on Switch B.
[SwitchB] isis 1
[SwitchB-isis-1] local-mt enable
Step 6 Verify the configuration.
# View the multicast routing table on Switch C again. You can find that multicast routes are displayed.
[SwitchC] display multicast routing-table
Multicast routing table of VPN-Instance: public net
Total 1 entry
00001. (192.168.3.2, 224.31.31.31)
Uptime: 00:00:19
Upstream Interface: Vlanif40
List of 1 downstream interface
1: Vlanif30
# View the MIGP routing table on Switch B.
[SwitchB] display migp routing-table
Route Flags: R - relied, D - download to fib
------------------------------------------------------------------------------
Routing Tables: MIGP
Destinations : 5 Routes : 5
Destination/Mask Proto Pre Cost Flags NextHop Interface
4.4.4.4/32 ISIS 15 20 10.0.1.1 Vlanif30
5.5.5.5/32 ISIS 15 30 10.0.1.1 Vlanif30
10.0.2.0/24 ISIS 15 20 10.0.1.1 Vlanif30
10.0.3.0/24 ISIS 15 30 10.0.1.1 Vlanif30
192.168.3.0/24 ISIS 15 40 10.0.1.1 Vlanif30
The physical outgoing interface of the next hop of the route with the previous outgoing interface being a TE tunnel interface is found in the MIGP routing table.
----End
Configuration Files
l Configuration file of Switch A
#
sysname SwitchA
# vlan batch 10 20
#
router id 1.1.1.1
#
multicast routing-enable
# isis 1
is-level level-2
cost-style wide
network-entity 10.0000.0000.0001.00
# interface Vlanif10
ip address 172.16.1.1 255.255.255.0
isis enable 1
igmp enable
# interface Vlanif20
ip address 10.0.0.1 255.255.255.0
isis enable 1
pim sm
#
Issue 01 (2011-10-26) 404
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Issue 01 (2011-10-26) interface GigabitEthernet1/0/0
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# interface LoopBack0
ip address 1.1.1.1 255.255.255.255
# return l Configuration file of Switch B
#
sysname SwitchB
# vlan batch 20 30
#
router id 2.2.2.2
#
multicast routing-enable
#
mpls lsr-id 2.2.2.2
mpls
mpls te
mpls rsvp-te
mpls te cspf
# isis 1
is-level level-2
cost-style wide
network-entity 10.0000.0000.0002.00
traffic-eng level-2
local-mt enable
# interface Vlanif20
ip address 10.0.0.2 255.255.255.0
isis enable 1
pim sm
# interface Vlanif30
ip address 10.0.1.2 255.255.255.0
isis enable 1
pim sm
mpls
mpls te
mpls rsvp-te
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 20
port hybrid untagged vlan 20
# interface GigabitEthernet2/0/0
port hybrid pvid vlan 30
port hybrid untagged vlan 30
# interface LoopBack0
ip address 2.2.2.2 255.255.255.255
isis enable 1
pim sm
# interface Tunnel1/0/0
ip address unnumbered interface LoopBack0
tunnel-protocol mpls te
destination 4.4.4.4
mpls te tunnel-id 100
mpls te igp shortcut isis
mpls te igp metric relative -10
mpls te commit
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
7 IS-IS Configuration
405
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Issue 01 (2011-10-26)
isis enable 1
pim sm
# pim
C-BSR LoopBack0
C-RP LoopBack0
# return l Configuration file of Switch C
#
sysname SwitchC
# vlan batch 30 40
#
router id 3.3.3.3
#
multicast routing-enable
#
mpls lsr-id 3.3.3.3
mpls
mpls te
mpls rsvp-te
mpls te cspf
# isis 1
is-level level-2
cost-style wide
network-entity 10.0000.0000.0003.00
traffic-eng level-2
# interface Vlanif30
ip address 10.0.1.1 255.255.255.0
isis enable 1
pim sm
mpls
mpls te
mpls rsvp-te
# interface Vlanif40
ip address 10.0.2.2 255.255.255.0
isis enable 1
pim sm
mpls
mpls te
mpls rsvp-te
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 30
port hybrid untagged vlan 30
# interface GigabitEthernet2/0/0
port hybrid pvid vlan 40
port hybrid untagged vlan 40
# interface LoopBack0
ip address 3.3.3.3 255.255.255.255
isis enable 1
# return l Configuration file of Switch D
#
sysname SwitchD
# vlan batch 50 40
#
router id 4.4.4.4
#
multicast routing-enable
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
7 IS-IS Configuration
406
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Issue 01 (2011-10-26)
#
mpls lsr-id 4.4.4.4
mpls
mpls te
mpls rsvp-te
mpls te cspf
# isis 1
is-level level-2
cost-style wide
network-entity 10.0000.0000.0004.00
traffic-eng level-2
# interface Vlanif50
ip address 10.0.3.1 255.255.255.0
isis enable 1
pim sm
# interface Vlanif40
ip address 10.0.2.1 255.255.255.0
isis enable 1
pim sm
mpls
mpls te
mpls rsvp-te
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 50
port hybrid untagged vlan 50
# interface GigabitEthernet2/0/0
port hybrid pvid vlan 40
port hybrid untagged vlan 40
# interface LoopBack0
ip address 4.4.4.4 255.255.255.255
isis enable 1
pim sm
# pim
C-BSR GigabitEthernet1/0/0
C-RP GigabitEthernet1/0/0
# return l Configuration file of Switch E
#
sysname SwitchE
# vlan batch 50 60
#
router id 5.5.5.5
#
multicast routing-enable
# isis 1
is-level level-2
cost-style wide
network-entity 10.0000.0000.0005.00
# interface Vlanif50
ip address 10.0.3.3 255.255.255.0
isis enable 1
pim sm
# interface Vlanif60
ip address 192.168.3.1 255.255.255.0
isis enable 1
pim sm
#
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
7 IS-IS Configuration
407
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 7 IS-IS Configuration interface GigabitEthernet1/0/0
port hybrid pvid vlan 50
port hybrid untagged vlan 50
# interface GigabitEthernet2/0/0
port hybrid pvid vlan 60
port hybrid untagged vlan 60
# interface LoopBack0
ip address 5.5.5.5 255.255.255.255
isis enable 1
pim sm
# pim
c-bsr GigabitEthernet
1/0/0
c-rp GigabitEthernet
1/0/0
# return
7.18.8 Example for Configuring Basic IS-IS IPv6 Functions
Networking Requirements
l Switch A, Switch B, Switch C, and Switch D belong to the same AS. They are interconnected through IS-IS in the IPv6 network.
l Switch A, Switch B, and Switch C belong to area 10. Switch D belongs to area 20.
l Switch A and Switch B are Level-1 routers. Switch C is a Level-1-2 router. Switch D is a
Level-2 router.
Figure 7-13 Networking diagram of basic IS-IS IPv6 feature
Issue 01 (2011-10-26)
GE1/0/0
10:1::2/64
SwitchA
L1
GE1/0/0
10:1::1/64
IS-IS
Area10
GE2/0/0
10:2::1/64
SwitchC
L1/L2
GE1/0/0
10:2::2/64
GE3/0/0
30::1/64
GE2/0/0
20::1/64
GE1/0/0
30::2/64
SwitchD
L2
IS-IS
Area20
SwitchB
L1
Switch
SwitchA
Interface
GigabitEthernet1/0/0
VLANIF interface IP address
VLANIF 10 10:1::2/64
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
408
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
SwitchB
SwitchC
SwitchC
SwitchC
SwitchD
SwitchD
GigabitEthernet1/0/0
GigabitEthernet1/0/0
GigabitEthernet2/0/0
GigabitEthernet3/0/0
GigabitEthernet1/0/0
GigabitEthernet2/0/0
VLANIF 20
VLANIF 10
VLANIF 20
VLANIF 30
VLANIF 30
VLANIF 40
7 IS-IS Configuration
10:2::2/64
10:1::1/64
10:2::1/64
30::1/64
30::2/64
20::1/64
Configuration Roadmap
The configuration roadmap is as follows:
1.
Enable the capability of IPv6 forwarding on each switch.
2.
Configure an IPv6 address for each interface.
3.
Enable IS-IS on each switch.
4.
Configure the level.
5.
Specify the network entity.
Data Preparation
To complete the configuration, you need the following data: l IPv6 address of each interface on Switch A, Switch B, Switch C, and Switch D l
Area numbers of Switch A, Switch B, Switch C, and Switch D l Levels of Switch A, Switch B, Switch C, and Switch D
Procedure
Step 1 Configure VLANs that interfaces belong to.
<Quidway> system-view
[Quidway] sysname SwitchA
[SwitchA] vlan batch 10
[SwitchA] interface gigabitethernet 1/0/0
[SwitchA-GigabitEthernet1/0/0] port hybrid pvid vlan 10
[SwitchA-GigabitEthernet1/0/0] port hybrid untagged vlan 10
[SwitchA-GigabitEthernet1/0/0] quit
The configurations of SwitchB, SwitchC and SwitchD are similar to the configuration of
SwitchA, and are not mentioned here.
Step 2 Enable the capability of IPv6 forwarding, and configure IPv6 address for each interface. Take the display on Switch A as an example. The configurations of Switch B, Switch C and Switch
D are similar to that of Switch A. The detailed configurations are not mentioned here.
<Quidway> system-view
[Quidway] sysname SwitchA
[SwitchA] ipv6
[SwitchA] interface vlanif 10
[SwitchA-Vlanif10] ipv6 enable
[SwitchA-Vlanif10] ipv6 address 10:1::2/64
Step 3 Configure IS-IS.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
409
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 7 IS-IS Configuration
# Configure Switch A.
[SwitchA] isis 1
[SwitchA-isis-1] is-level level-1
[SwitchA-isis-1] network-entity 10.0000.0000.0001.00
[SwitchA-isis-1] ipv6 enable
[SwitchA-isis-1] quit
[SwitchA] interface vlanif 10
[SwitchA-Vlanif10] isis ipv6 enable 1
[SwitchA-Vlanif10] quit
# Configure Switch B.
[SwitchB] isis 1
[SwitchB-isis-1] is-level level-1
[SwitchB-isis-1] network-entity 10.0000.0000.0002.00
[SwitchB-isis-1] ipv6 enable
[SwitchB-isis-1] quit
[SwitchB] interface vlanif 20
[SwitchB-Vlanif20] isis ipv6 enable 1
[SwitchB-Vlanif20] quit
# Configure Switch C.
[SwitchC] isis 1
[SwitchC-isis-1] network-entity 10.0000.0000.0003.00
[SwitchC-isis-1] ipv6 enable
[SwitchC-isis-1] quit
[SwitchC] interface vlanif 10
[SwitchC-Vlanif10] isis ipv6 enable 1
[SwitchC-Vlanif10] quit
[SwitchC] interface vlanif 20
[SwitchC-Vlanif20] isis ipv6 enable 1
[SwitchC-Vlanif20] quit
[SwitchC] interface vlanif 30
[SwitchC-Vlanif30] isis ipv6 enable 1
[SwitchC-Vlanif30] isis circuit-level level-2
[SwitchC-Vlanif30] quit
# Configure Switch D.
[SwitchD] isis 1
[SwitchD-isis-1] is-level level-2
[SwitchD-isis-1] network-entity 20.0000.0000.0004.00
[SwitchD-isis-1] ipv6 enable
[SwitchD-isis-1] quit
[SwitchD] interface vlanif 30
[SwitchD-Vlanif30] isis ipv6 enable 1
[SwitchD-Vlanif30] quit
[SwitchD] interface vlanif 40
[SwitchD-Vlanif40] isis ipv6 enable 1
[SwitchD-Vlanif40] quit
Step 4 Verify the configuration.
# Display the IS-IS routing table of Switch A.
[SwitchA] display isis route
Route information for ISIS(1)
-----------------------------
ISIS(1) Level-1 Forwarding Table
--------------------------------
IPV6 Destination IntCost ExtCost ExitInterface NextHop Flags
----------------------------------------------------------------------------------
::/0 10 NULL Vlanif10 FE80::A83E:0:3ED2:1 A/-/-
10:1::/64 10 NULL Vlanif10 Direct D/L/-
10:2::/64 20 NULL Vlanif20 FE80::A83E:0:3ED2:1 A/-/-
Flags: D-Direct, A-Added to URT, L-Advertised in LSPs, S-IGP Shortcut,
# Display the IS-IS neighbors of Switch C.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
410
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
7 IS-IS Configuration
[SwitchC] display isis peer verbose
Peer information for ISIS(1)
----------------------------
System Id Interface Circuit Id State HoldTime Type PRI
0000.0000.0001 Vlanif10 0000000001 Up 24s L1 --
MT IDs supported : 0(UP)
Area Address(es) : 10
Peer IPv6 Address(es): FE80::996B:0:9419:1
Uptime : 00:44:43
Adj Protocol : IPV6
0000.0000.0002 Vlanif20 0000000001 Up 28s L1 --
MT IDs supported : 0(UP)
Area Address(es) : 10
Peer IPv6 Address(es): FE80::DC40:0:47A9:1
Uptime : 00:46:13
Adj Protocol : IPV6
0000.0000.0004 Vlanif30 0000000001 Up 24s L2 --
MT IDs supported : 0(UP)
Area Address(es) : 20
Peer IPv6 Address(es): FE80::F81D:0:1E24:2
Uptime : 00:53:18
Adj Protocol : IPV6
Total Peer(s): 3
# Display the IS-IS LSDB of Switch C.
[SwitchC] display isis lsdb verbose
Database information for ISIS(1)
--------------------------------
Level-1 Link State Database
LSPID Seq Num Checksum Holdtime Length ATT/P/OL
----------------------------------------------------------------------------
0000.0000.0001.00-00 0x0000000c 0x4e06 1117 113 0/0/0
SOURCE 0000.0000.0001.00
NLPID IPV6
AREA ADDR 10
INTF ADDR V6 10:1::2
Topology Standard
NBR ID 0000.0000.0003.00 COST: 10
IPV6 10:1::/64 COST: 10
0000.0000.0002.00-00 0x00000009 0x738c 1022 83 0/0/0
SOURCE 0000.0000.0002.00
NLPID IPV6
AREA ADDR 10
INTF ADDR V6 10:2::2
Topology Standard
NBR ID 0000.0000.0003.00 COST: 10
IPV6 10:2::/64 COST: 10
0000.0000.0003.00-00* 0x00000020 0x6b10 771 140 1/0/0
SOURCE 0000.0000.0003.00
NLPID IPV6
AREA ADDR 10
INTF ADDR V6 30::1
INTF ADDR V6 10:2::1
INTF ADDR V6 10:1::1
Topology Standard
NBR ID 0000.0000.0002.00 COST: 10
NBR ID 0000.0000.0001.00 COST: 10
IPV6 10:2::/64 COST: 10
IPV6 10:1::/64 COST: 10
Level-2 Link State Database
LSPID Seq Num Checksum Holdtime Length ATT/P/OL
-------------------------------------------------------------------------
0000.0000.0003.00-00* 0x00000017 0x61b4 771 157 0/0/0
SOURCE 0000.0000.0003.00
NLPID IPV6
AREA ADDR 10
INTF ADDR V6 30::1
INTF ADDR V6 10:2::1
INTF ADDR V6 10:1::1
411
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
7 IS-IS Configuration
Topology Standard
NBR ID 0000.0000.0004.00 COST: 10
IPV6 30::/64 COST: 10
IPV6 10:2::/64 COST: 10
IPV6 10:1::/64 COST: 10
0000.0000.0004.00-00 0x0000000b 0x6dfa 1024 124 0/0/0
SOURCE 0000.0000.0004.00
NLPID IPV6
AREA ADDR 20
INTF ADDR V6 30::2
INTF ADDR V6 20::1
Topology Standard
NBR ID 0000.0000.0003.00 COST: 10
NBR ID 0000.0000.0005.00 COST: 10
IPV6 30::/64 COST: 10
IPV6 20::/64 COST: 10
----End
Configuration Files
l Configuration file of Switch A
#
sysname SwitchA
# vlan batch 10
#
ipv6
# isis 1
is-level level-1
network-entity 10.0000.0000.0001.00
#
ipv6 enable topology standard
# interface Vlanif10
ipv6 enable
ipv6 address 10:1::2/64
isis ipv6 enable 1
# interface GigabitEthernet 1/0/0
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# return l
Configuration file of Switch B
#
sysname SwitchB
# vlan batch 20
#
ipv6
# isis 1
is-level level-1
network-entity 10.0000.0000.0002.00
#
ipv6 enable topology standard
#
# interface Vlanif20
ipv6 enable
ipv6 address 10:2::2/64
isis ipv6 enable 1
# interface GigabitEthernet 1/0/0
port hybrid pvid vlan 20
port hybrid untagged vlan 20
412
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Issue 01 (2011-10-26)
# return l Configuration file of Switch C
#
sysname SwitchC
# vlan batch 10 20 30
#
ipv6
# isis 1
network-entity 10.0000.0000.0003.00
#
ipv6 enable topology standard
#
# interface Vlanif10
ipv6 enable
ipv6 address 10:1::1/64
isis ipv6 enable 1
# interface Vlanif20
ipv6 enable
ipv6 address 10:2::1/64
isis ipv6 enable 1
# interface Vlanif30
ipv6 enable
ipv6 address 30::1/64
isis ipv6 enable 1
isis circuit-level level-2
# interface GigabitEthernet 1/0/0
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# interface GigabitEthernet 2/0/0
port hybrid pvid vlan 20
port hybrid untagged vlan 20
# interface GigabitEthernet 3/0/0
port hybrid pvid vlan 30
port hybrid untagged vlan 30
# return l Configuration file of Switch D
#
sysname SwitchD
# vlan batch 30 40
#
ipv6
# isis 1
is-level level-2
network-entity 20.0000.0000.0004.00
#
ipv6 enable topology standard
#
# interface Vlanif40
ipv6 enable
ipv6 address 20::1/64
isis ipv6 enable 1
# interface Vlanif30
ipv6 enable
ipv6 address 30::2/64
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
7 IS-IS Configuration
413
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 7 IS-IS Configuration
isis ipv6 enable 1
# interface GigabitEthernet 2/0/0
port hybrid pvid vlan 40
port hybrid untagged vlan 40
# interface GigabitEthernet 1/0/0
port hybrid pvid vlan 30
port hybrid untagged vlan 30
# return
7.18.9 Example for Configuring IS-IS Fast Convergence
Networking Requirements
l Switch A and Switch B run IS-IS.
l Switch A and Switch B belong to area 10.
l A Layer 2 switch, which need not be configured, connects Switch A and Switch B.
Figure 7-14 Networking diagram of IS-IS fast convergence
GE1/0/0
100.1.1.2/24
SwitchA
GE1/0/0
100.1.1.1/24
SwitchB
Switch
SwitchA
SwitchB
Interface
GigabitEthernet1/0/0
GigabitEthernet1/0/0
VLANIF interface
VLANIF 10
VLANIF 20
IP address
100.1.1.1/24
100.1.1.2/24
Configuration Roadmap
The configuration roadmap is as follows:
1.
Enable basic IS-IS functions on each switch.
2.
Enable BFD on Switch A and Switch B.
3.
Set the time parameters of fast convergence on Switch A and Switch B.
Data Preparation
To configure IS-IS fast convergence, you need the following data: l Levels and area addresses of the two switches l Time parameters of fast convergence
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
414
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
7 IS-IS Configuration
Procedure
Step 1 Configure VLANs that interfaces belong to.
<Quidway> system-view
[Quidway] sysname SwitchA
[SwitchA] vlan batch 10
[SwitchA] interface gigabitethernet 1/0/0
[SwitchA-GigabitEthernet1/0/0] port hybrid pvid vlan 10
[SwitchA-GigabitEthernet1/0/0] port hybrid untagged vlan 10
[SwitchA-GigabitEthernet1/0/0] quit
The configurations of SwitchB is similar to the configuration of SwitchA, and is not mentioned here.
Step 2 Assign an IP address to each VLANIF interface.
[SwitchA] interface vlanif 10
[SwitchA-Vlanif10] ip address 100.1.1.1 24
[SwitchA-Vlanif10] quit
The configurations of SwitchB is similar to the configuration of SwitchA, and is not mentioned here.
Step 3 Configure basic IS-IS functions.
# Configure Switch A.
[SwitchA] isis 1
[SwitchA-isis-1] is-level level-2
[SwitchA-isis-1] network-entity 10.0000.0000.0001.00
[SwitchA-isis-1] quit
[SwitchA] interface vlanif 10
[SwitchA-Vlanif10] isis enable 1
[SwitchA-Vlanif10] quit
# Configure Switch B.
[SwitchB] isis 1
[SwitchB-isis-1] is-level level-2
[SwitchB-isis-1] network-entity 10.0000.0000.0002.00
[SwitchB-isis-1] quit
[SwitchB] interface vlanif 20
[SwitchB-Vlanif20] isis enable 1
[SwitchB-Vlanif20] quit
Step 4 Simulate the link in the Down state on Switch B. View the neighbor status and the time of route calculation on Switch A.
# Enable the debugging on Switch A and output information to the VTY channel.
[SwitchA] info-center source bfd channel 1 log level debugging state on
[SwitchA] quit
<SwitchA> debugging isis spf-summary
<SwitchA> terminal debugging
<SwitchA> terminal monitor
Run the shutdown command on Vlanif20 of Switch B.
[SwitchB] interface vlanif 20
[SwitchB-Vlanif20] shutdown
# View the information about neighbors of Switch A.
<SwitchA> display isis peer
Peer information for ISIS(1)
----------------------------
System Id Interface Circuit Id State HoldTime Type PRI
0000.0000.0002 GE1/0/0 0000.0000.0001.01 Up 7s L2 64
Issue 01 (2011-10-26) 415
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 7 IS-IS Configuration
After the link goes Down, the system does not immediately advertise that the neighbor becomes invalid but deletes the neighbor after the Holdtime timer times out, and then starts route calculation. You can view the time of the SPF calculation through the following debugging information.
*0.670620 SwitchA ISIS/6/ISIS:
*0.670620 SwitchA ISIS/6/ISIS:
Signal SPF at Sec = 00670, MSec = 620.
*0.670750 SwitchA ISIS/6/ISIS:
Signal SPF at Sec = 00670, MSec = 620.
*0.670750 SwitchA ISIS/6/ISIS:
ISpf starts at Sec = 00670, MSec = 680.ISIS-1-SPF-STATS: RT Calculation: Elaps ed time: 0 Milliseconds(IS09_8227)
*0.670750 SwitchA ISIS/6/ISIS:
ISIS-1-SPF-PRC: Received L2 System Change Event for 0000.0000.0001.01, Change =
2(IS10_7213)
*0.670750 SwitchA ISIS/6/ISIS:
ISIS-1-SPF-PRC: Received L2 System Change Event for 0000.0000.0002.00, Change =
2(IS10_7213)
*0.670750 SwitchA ISIS/6/ISIS:
*0.670750 SwitchA ISIS/6/ISIS:
ISpf ends(and prc starts) at Sec = 00670, MSec = 680.
*0.670750 SwitchA ISIS/6/ISIS:
ISpf for IPv6 starts at Sec = 00670, MSec = 680.
*0.670750 SwitchA ISIS/6/ISIS:
ISpf for IPv6 ends(and prc starts) at Sec = 00670, MSec = 680.
*0.670750 SwitchA ISIS/6/ISIS:
Prc job starts to run at Sec = 00670, MSec = 680.ISIS-1-SPF-PRC: Processing Mt
0, L2 LSPs of System :0000.0000.0002, Change Type = 2(IS10_7649)
*0.670750 SwitchA ISIS/6/ISIS:
In the Holdtime period, packets cannot correctly reach the destination because the route passing through VLANIF10 is discarded. You then need to enable BFD and set the time parameters of fast convergence. The switches can quickly sense the changes of the topology and recalculate routes when the network changes.
Step 5 Restart the interface on Switch B to make the link become Up.
# Run the undo shutdown command on Vlanif20 of Switch B.
[SwitchB-Vlanif20] undo shutdown
Step 6 Configure BFD.
# Configure Switch A.
[SwitchA] bfd
[SwitchA-bfd] quit
[SwitchA] bfd atob bind peer-ip 100.1.1.2 interface vlanif 10
[SwitchA-bfd-session-atob] discriminator local 1
[SwitchA-bfd-session-atob] discriminator remote 2
[SwitchA-bfd-session-atob] commit
[SwitchA-bfd-session-atob] quit
[SwitchA] interface vlanif 10
[SwitchA-Vlanif10] isis bfd static
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
416
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 7 IS-IS Configuration
[SwitchA-Vlanif10] quit
# Configure Switch B.
[SwitchB] bfd
[SwitchB-bfd] quit
[SwitchB] bfd btoa bind peer-ip 100.1.1.1 interface vlanif 20
[SwitchB-bfd-session-btoa] discriminator local 2
[SwitchB-bfd-session-btoa] discriminator remote 1
[SwitchB-bfd-session-btoa] commit
[SwitchB-bfd-session-btoa] quit
[SwitchB] interface vlanif 20
[SwitchB-Vlanif20] isis bfd static
[SwitchB-Vlanif20] quit
Step 7 Set the time parameters of fast convergence.
# Configure Switch A.
[SwitchA] isis
[SwitchA-isis-1] flash-flood
[SwitchA-isis-1] timer spf 1 20 100
[SwitchA-isis-1] timer lsp-generation 1 1 120
[SwitchA-isis-1] quit
# Configure Switch B.
[SwitchB] isis
[SwitchB-isis-1] flash-flood
[SwitchB-isis-1] timer spf 1 20 100
[SwitchB-isis-1] timer lsp-generation 1 1 120
[SwitchB-isis-1] quit
NOTE
l In IS-IS, if LSDB changes, routes are calculated and then a new LSP is generated to report this change.
Frequent route calculations consume lots of system resources and degrades the system performance.
Delaying SPF calculation, generating a new LSP time, and LSP fast flooding improves the efficiency in route calculation and reduces the consumption of system resources.
l Using the flash-flood command, you can enable LSP fast flooding to speed up the convergence of an
IS-IS network.
l Run the timer spf command to set the interval of the SPF calculation. By default, the interval is 5 seconds.
l Run the timer lsp-generation command to set the delay for generating an LSP. By default, the delay is 2 seconds.
Step 8 Verify the configuration.
# Run the shutdown command on Vlanif20 of Switch B to simulate the link in the Down state.
[SwitchB] interface vlanif 20
[SwitchB-Vlanif20] shutdown
# View the information about neighbors of Switch A.
<SwitchA> display isis peer
Information about neighbors of Switch A does not exist.
When BFD detects that the link goes Down, it notifies the route management (RM) module immediately. IS-IS then deletes neighbors immediately and triggers the route calculation. This results in the fast convergence of the network. You can view that the time of the SPF calculation is shortened by comparing debugging information displayed before and after fast convergence.
*0.1318910 SwitchA ISIS/6/ISIS:
Prc job completed at Sec = 00962, MSec = 280.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
417
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 7 IS-IS Configuration
*0.1318910 SwitchA ISIS/6/ISIS:
Signal SPF at Sec = 01318, MSec = 800.
*0.1318910 SwitchA ISIS/6/ISIS:
Signal SPF at Sec = 01318, MSec = 800.
# The initial interval for the ISPF calculation is shortened to 20 ms.
*0.1318910 SwitchA ISIS/6/ISIS:
ISpf starts at Sec = 01318, MSec = 820.ISIS-1-SPF-STATS: RT Calculation: Elaps ed time: 0 Milliseconds(IS09_8227)
*0.1318910 SwitchA ISIS/6/ISIS:
ISIS-1-SPF-PRC: Received L2 System Change Event for 0000.0000.0001.01, Change =
2(IS10_7213)
*0.1318910 SwitchA ISIS/6/ISIS:
ISIS-1-SPF-PRC: Received L2 System Change Event for 0000.0000.0002.00, Change =
2(IS10_7213)
*0.1318910 SwitchA ISIS/6/ISIS:
*0.1318910 SwitchA ISIS/6/ISIS:
ISpf ends(and prc starts) at Sec = 01318, MSec = 820.
*0.1318910 SwitchA ISIS/6/ISIS:
ISpf for IPv6 starts at Sec = 01318, MSec = 820.
*0.1318910 SwitchA ISIS/6/ISIS:
ISpf for IPv6 ends(and prc starts) at Sec = 01318, MSec = 820.
*0.1318910 SwitchA ISIS/6/ISIS:
Prc job starts to run at Sec = 01318, MSec = 820.ISIS-1-SPF-PRC: Processing Mt
0, L2 LSPs of System :0000.0000.0002, Change Type = 2(IS10_7649)
*0.1318910 SwitchA ISIS/6/ISIS:
----End
Configuration Files
l
Configuration file of Switch A
#
sysname SwitchA
# vlan batch 10
#
info-center source BFD channel 1 log level debugging
#
bfd
# isis 1
is-level level-2
timer lsp-generation 1 1 120 level-1
timer lsp-generation 1 1 120 level-2
network-entity 10.0000.0000.0001.00
flash-flood
timer spf 1 20 100
# interface Vlanif10
ip address 100.1.1.1 255.255.255.0
isis enable 1
isis bfd static
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 10
port hybrid untagged vlan 10
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
418
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
# bfd atob bind peer-ip 100.1.1.2 interface Vlanif10
discriminator local 1
discriminator remote 2
commit
# return l Configuration file of Switch B
#
sysname SwitchB
# vlan batch 20
#
bfd
# isis 1
is-level level-2
timer lsp-generation 1 1 120 level-1
timer lsp-generation 1 1 120 level-2
network-entity 10.0000.0000.0002.00
flash-flood
timer spf 1 20 100
# interface Vlanif20
ip address 100.1.1.2 255.255.255.0
isis enable 1
isis bfd static
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 20
port hybrid untagged vlan 20
# bfd btoa bind peer-ip 100.1.1.2 interface Vlanif20
discriminator local 2
discriminator remote 1
commit
# return
7.18.10 Example for Configuring IS-IS Auto FRR
7 IS-IS Configuration
Networking Requirements
When a fault occurs on a network, IS-IS Auto FRR fast switches traffic to a backup link before the route convergence. This prevents traffic interruption.
In
: l
IS-IS runs between four switches.
l
The four switches are all Level-1-2 switches.
l
If Switch C or Link T fails, it is required that the traffic forwarded by Switch A is rapidly switched to the backup link.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
419
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 7 IS-IS Configuration
Switch
SwitchA
SwitchA
SwitchB
SwitchB
SwitchC
SwitchC
SwitchD
SwitchD
SwitchD
Figure 7-15 Networking diagram for configuring IS-IS Auto FRR
GE1/0/0
1.0.0.2/24
SwitchC
L12
GE2/0/0
GE1/0/0
1.0.0.1/24 co st
=
10
SwitchA
L12
GE2/0/0
2.0.0.1/24 co st =
30
GE1/0/0
2.0.0.2/24
Link T co st =
10
GE1/0/0
4.0.0.2/24
SwitchD
L12
GE3/0/0
100.1.1.1/24 cost = 10 co st
=
10
GE2/0/0
3.0.0.2/24
SwitchB
L12
GE2/0/0
3.0.0.1/24
Interface
GigabitEthernet1/0/0
GigabitEthernet2/0/0
GigabitEthernet1/0/0
GigabitEthernet2/0/0
GigabitEthernet1/0/0
GigabitEthernet2/0/0
GigabitEthernet1/0/0
GigabitEthernet2/0/0
GigabitEthernet3/0/0
VLANIF interface
VLANIF 10
VLANIF 20
VLANIF 20
VLANIF 30
VLANIF 10
VLANIF 50
VLANIF 50
VLANIF 30
VLANIF 40
IP address
1.0.0.1/24
2.0.0.1/24
2.0.0.2/24
3.0.0.1/24
1.0.0.2/24
4.0.0.1/24
4.0.0.2/24
3.0.0.2/24
100.1.1.1/24
Configuration Roadmap
The configuration roadmap is as follows:
1.
Enable basic IS-IS functions on each switch.
2.
Set a larger link cost (in compliance with the traffic protection inequality of IS-IS Auto
FRR) on GE 2/0/0 of Switch A, and ensure that Link T is preferentially selected.
3.
Enable IS-IS Auto FRR on Switch A that forwards the protected traffic.
Data Preparation
To complete the configuration, you need the following data: l IP addresses of interfaces on each switch l NET of each switch
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
420
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
7 IS-IS Configuration l Level of each switch l Costs of interfaces on each switch
Procedure
Step 1 Configure VLANs that interfaces belong to.
<Quidway> system-view
[Quidway] sysname SwitchA
[SwitchA] vlan batch 10 20
[SwitchA] interface gigabitethernet 1/0/0
[SwitchA-GigabitEthernet1/0/0] port hybrid pvid vlan 10
[SwitchA-GigabitEthernet1/0/0] port hybrid untagged vlan 10
[SwitchA-GigabitEthernet1/0/0] quit
[SwitchA] interface gigabitethernet 2/0/0
[SwitchA-GigabitEthernet2/0/0] port hybrid pvid vlan 20
[SwitchA-GigabitEthernet2/0/0] port hybrid untagged vlan 20
[SwitchA-GigabitEthernet2/0/0] quit
The configurations of SwitchB, SwitchC and SwitchD are similar to the configuration of
SwitchA, and are not mentioned here.
Step 2 Assign an IP address to each VLANIF interface.
[SwitchA] interface vlanif 10
[SwitchA-Vlanif10] ip address 10.0.0.1 24
[SwitchA-Vlanif10] quit
[SwitchA] interface vlanif 20
[SwitchA-Vlanif20] ip address 2.0.0.1 24
[SwitchA-Vlanif20] quit
The configurations of SwitchB, SwitchC and SwitchD are similar to the configuration of
SwitchA, and are not mentioned here.
Step 3 Configure basic IS-IS functions.
# Configure Switch A.
[SwitchA] isis 1
[SwitchA-isis-1] is-level level-1-2
[SwitchA-isis-1] network-entity 10.0000.0000.0001.00
[SwitchA-isis-1] quit
[SwitchA] interface vlanif 10
[SwitchA-Vlanif10] isis enable 1
[SwitchA-Vlanif10] quit
[SwitchA] interface vlanif 20
[SwitchA-Vlanif20] isis enable 1
[SwitchA-Vlanif20] quit
# Configure Switch B.
[SwitchB] isis 1
[SwitchB-isis-1] is-level level-1-2
[SwitchB-isis-1] network-entity 10.0000.0000.0002.00
[SwitchB-isis-1] quit
[SwitchB] interface vlanif 20
[SwitchB-Vlanif20] isis enable 1
[SwitchB-Vlanif20] quit
[SwitchB] interface vlanif 30
[SwitchB-Vlanif30] isis enable 1
[SwitchB-Vlanif30] quit
# Configure Switch C.
[SwitchC] isis 1
[SwitchC-isis-1] is-level level-1-2
[SwitchC-isis-1] network-entity 10.0000.0000.0003.00
[SwitchC-isis-1] quit
421
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
7 IS-IS Configuration
[SwitchC] interface vlanif 10
[SwitchC-Vlanif10] isis enable 1
[SwitchC-Vlanif10] quit
[SwitchC] interface vlanif 50
[SwitchC-Vlanif50] isis enable 1
[SwitchC-Vlanif50] quit
# Configure Switch D.
[SwitchD] isis 1
[SwitchD-isis-1] is-level level-1-2
[SwitchD-isis-1] network-entity 10.0000.0000.0004.00
[SwitchD-isis-1] quit
[SwitchD] interface vlanif 50
[SwitchD-Vlanif50] isis enable 1
[SwitchD-Vlanif50] quit
[SwitchD] interface vlanif 30
[SwitchD-Vlanif30] isis enable 1
[SwitchD-Vlanif30] quit
[SwitchD] interface vlanif 40
[SwitchD-Vlanif40] isis enable 1
[SwitchD-Vlanif40] quit
Step 4 Set the cost of Vlanif20 on SwitchA to 30, and then check routing information.
# Configure the cost of Vlanif20 on Switch A to 30.
[SwitchA] interface vlanif 20
[SwitchA-Vlanif20] isis cost 30
[SwitchA-Vlanif20] quit
# Check information about the link from Switch A to Switch D. Link T has a lower cost, and thereby IS-IS optimally selects Link T to send traffic that is forwarded by Switch A.
<SwitchA> display isis route 100.1.1.1 verbose
Route information for ISIS(1)
-----------------------------
ISIS(1) Level-1 Forwarding Table
--------------------------------
IPV4 Dest : 100.1.1.0/24 Int. Cost : 30 Ext. Cost : NULL
Admin Tag : - Src Count : 1 Flags : A/-/L/-
Priority : Low
NextHop : Interface : ExitIndex :
1.0.0.2 Vlanif10 0x00000003
Flags: D-Direct, A-Added to URT, L-Advertised in LSPs, S-IGP Shortcut,
U-Up/Down Bit Set
ISIS(1) Level-2 Forwarding Table
--------------------------------
IPV4 Dest : 100.1.1.0/24 Int. Cost : 30 Ext. Cost : NULL
Admin Tag : - Src Count : 3 Flags : -/-/-/-
Priority : Low
Flags: D-Direct, A-Added to URT, L-Advertised in LSPs, S-IGP Shortcut,
U-Up/Down Bit Set
# Run the display fib 100.1.1.1 verbose command on Switch A to check the forwarding entry from Switch A to Switch D.
<SwitchA> display fib 100.1.1.1 verbose
Route Entry Count: 1
Issue 01 (2011-10-26) 422
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
7 IS-IS Configuration
Destination: 100.1.1.0 Mask : 255.255.255.0
Nexthop : 1.0.0.2 OutIf : Vlanif10
LocalAddr : 1.0.0.1 LocalMask: 0.0.0.0
Flags : DGU Age : 26sec
ATIndex : 0 Slot : 0
LspFwdFlag : 0 LspToken : 0x0
InLabel : NULL OriginAs : 0
BGPNextHop : 0.0.0.0 PeerAs : 0
QosInfo : 0x0 OriginQos: 0x0
NexthopBak : 0.0.0.0 OutIfBak : [No Intf]
LspTokenBak: 0x0 InLabelBak : NULL
LspToken_ForInLabelBak : 0x0
EntryRefCount : 0
rt_ulVlanId : 0x0
LspType : 0 Label_ForLspTokenBak : 0
MplsMtu : 0 Gateway_ForLspTokenBak : 0
NextToken : 0 IfIndex_ForLspTokenBak : 0
Label_NextToken : 0 Label : 0
LspBfdState : 0
As shown in the command output, the traffic from Switch A to Switch D is only forwarded through Link T.
Step 5 Enable IS-IS Auto FRR on Switch A, and then check the routing information.
# Enable IS-IS Auto FRR on Switch A.
<SwitchA> isis
[SwitchA-isis-1] frr
[SwitchA-isis-1-frr]loop-free-alternate
# Check information about the link from Switch A to Switch D. You can find that IS-IS creates a backup link because IS-IS Auto FRR is enabled.
<SwitchA> display isis route 100.1.1.1 verbose
Route information for ISIS(1)
-----------------------------
ISIS(1) Level-1 Forwarding Table
--------------------------------
IPV4 Dest : 100.1.1.0/24 Int. Cost : 30 Ext. Cost : NULL
Admin Tag : - Src Count : 1 Flags : A/-/L/-
Priority : Low
NextHop : Interface : ExitIndex :
1.0.0.2 Vlanif10 0x00000003
(B)2.0.0.2 Vlanif20 0x00000004
Flags: D-Direct, A-Added to URT, L-Advertised in LSPs, S-IGP Shortcut,
U-Up/Down Bit Set
ISIS(1) Level-2 Forwarding Table
--------------------------------
IPV4 Dest : 100.1.1.0/24 Int. Cost : 30 Ext. Cost : NULL
Admin Tag : - Src Count : 3 Flags : -/-/-/-
Priority : Low
Flags: D-Direct, A-Added to URT, L-Advertised in LSPs, S-IGP Shortcut,
U-Up/Down Bit Set
# Check the protection type for the traffic from Switch A to Switch D.
<SwitchA> display isis spf-tree systemid 0000.0000.0004 verbose
Shortest Path Tree for ISIS(1)
Issue 01 (2011-10-26) 423
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
7 IS-IS Configuration
------------------------------
ISIS(1) Level-1 Shortest Path Tree
----------------------------------
0000.0000.0004.00
Distance : 20
Distance-URT : 20
Flags : SPT/V6_Islt
IPv4 Nexthops-URT : 1
(1) 1.0.0.2 IF:Vlanif10 NBR:0000.0000.0003.00
(B) 2.0.0.2 IF:Vlanif20 NBR:0000.0000.0002.00
TYPE:LOOP-FREE PROTECT:LINK-NODE
IPv4 Nexthops-MIGP : 0
IPv6 Nexthops : 0
Neighbors: 2 (Children:1 Parents:1 Others:0)
(1) 0000.0000.0003.02
Cost : 10
Flags : Parent
(2) 0000.0000.0004.03
Cost : 10
Flags : Child
ISIS(1) Level-2 Shortest Path Tree
----------------------------------
0000.0000.0004.00
Distance : 20
Distance-URT : 20
Flags : SPT/V6_Islt
IPv4 Nexthops-URT : 1
(1) 1.0.0.2 IF:Vlanif10 NBR:0000.0000.0003.00
(B) 2.0.0.2 IF:Vlanif20 NBR:0000.0000.0002.00
TYPE:LOOP-FREE PROTECT:LINK-NODE
IPv4 Nexthops-MIGP : 0
IPv6 Nexthops : 0
Neighbors: 2 (Children:1 Parents:1 Others:0)
(1) 0000.0000.0003.02
Cost : 10
Flags : Parent
(2) 0000.0000.0004.03
Cost : 10
Flags : Child
As shown in the preceding command output, link-node dual protection is enabled from Switch
A to Switch D.
# Run the display fib 100.1.1.1 verbose command on Switch A to check the backup forwarding entry from Switch A to Switch D.
<SwitchA> display fib 100.1.1.1 verbose
Route Entry Count: 1
Destination: 100.1.1.0 Mask : 255.255.255.0
Nexthop : 1.0.0.2 OutIf : Vlanif10
LocalAddr : 1.0.0.1 LocalMask: 0.0.0.0
Flags : DGU Age : 6sec
ATIndex : 0 Slot : 0
LspFwdFlag : 0 LspToken : 0x0
InLabel : NULL OriginAs : 0
BGPNextHop : 0.0.0.0 PeerAs : 0
QosInfo : 0x0 OriginQos: 0x0
NexthopBak : 2.0.0.2 OutIfBak : Vlanif20
LspTokenBak: 0x0 InLabelBak : NULL
LspToken_ForInLabelBak : 0x0
EntryRefCount : 0
rt_ulVlanId : 0x0
LspType : 0 Label_ForLspTokenBak : 0
424
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 7 IS-IS Configuration
MplsMtu : 0 Gateway_ForLspTokenBak : 0
NextToken : 0 IfIndex_ForLspTokenBak : 0
Label_NextToken : 0 Label : 0
LspBfdState : 0
As shown in the command output, the master link from Switch A to Switch D is Link T, the relevant backup link follows the route with Vlanif20 as the outbound interface and 2.0.0.2 as the next hop.
Step 6 Verify the configuration.
# Run the shutdown command on Vlanif50 of Switch C to make the link down.
[SwitchC] interface vlanif 50
[SwitchC-Vlanif50] shutdown
# Run the display fib 100.1.1.1 verbose command immediately on Switch A to check information about the route from Switch A to Switch D.
<SwitchA> display fib 100.1.1.1 verbose
Route Entry Count: 1
Destination: 100.1.1.0 Mask : 255.255.255.0
Nexthop : 2.0.0.2 OutIf : Vlanif20
LocalAddr : 2.0.0.1 LocalMask: 0.0.0.0
Flags : DGU Age : 124sec
ATIndex : 0 Slot : 0
LspFwdFlag : 0 LspToken : 0x0
InLabel : NULL OriginAs : 0
BGPNextHop : 0.0.0.0 PeerAs : 0
QosInfo : 0x0 OriginQos: 0x0
NexthopBak : 0.0.0.0 OutIfBak : [No Intf]
LspTokenBak: 0x0 InLabelBak : NULL
LspToken_ForInLabelBak : 0x0
EntryRefCount : 0
rt_ulVlanId : 0x0
LspType : 0 Label_ForLspTokenBak : 0
MplsMtu : 0 Gateway_ForLspTokenBak : 0
NextToken : 0 IfIndex_ForLspTokenBak : 0
Label_NextToken : 0 Label : 0
LspBfdState : 0
As shown in the command output, the traffic forwarded by the Switch A is switched to the backup link, with Vlanif20 as the outbound interface and 2.0.0.2 as the next hop.
NOTE
If a fault occurs on the network, IS-IS Auto FRR ensures the fast switchover of the traffic to the backup link before the network convergence, and consequently protects traffic.
----End
Configuration Files
l
Configuration file of Switch A
#
sysname SwitchA
# vlan batch 10 20
# isis 1
frr
loop-free-alternate level-1
loop-free-alternate level-2
network-entity 10.0000.0000.0001.00
# interface Vlanif10
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
425
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Issue 01 (2011-10-26)
ip address 1.0.0.1 255.255.255.0
isis enable 1
# interface Vlanif20
ip address 2.0.0.1 255.255.255.0
isis enable 1
isis cost 30
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# interface GigabitEthernet2/0/0
port hybrid pvid vlan 20
port hybrid untagged vlan 20
# return l Configuration file of Switch B
#
sysname SwitchB
# vlan batch 20 30
# isis 1
network-entity 10.0000.0000.0002.00
# interface Vlanif20
ip address 2.0.0.2 255.255.255.0
isis enable 1
# interface Vlanif30
ip address 3.0.0.1 255.255.255.0
isis enable 1
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 20
port hybrid untagged vlan 20
# interface GigabitEthernet2/0/0
port hybrid pvid vlan 30
port hybrid untagged vlan 30
# return l Configuration file of Switch C
#
sysname SwitchC
# vlan batch 10 50
# isis 1
network-entity 10.0000.0000.0003.00
# interface Vlanif10
ip address 1.0.0.2 255.255.255.0
isis enable 1
# interface Vlanif50
shutdown
ip address 4.0.0.1 255.255.255.0
isis enable 1
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# interface GigabitEthernet2/0/0
port hybrid pvid vlan 50
port hybrid untagged vlan 50
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
7 IS-IS Configuration
426
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 7 IS-IS Configuration
# return l Configuration file of Switch D
#
sysname SwitchD
# vlan batch 50 30 40
# isis 1
network-entity 10.0000.0000.0004.00
# interface Vlanif50
ip address 4.0.0.2 255.255.255.0
isis enable 1
# interface Vlanif30
ip address 3.0.0.2 255.255.255.0
isis enable 1
# interface Vlanif40
ip address 100.1.1.1 255.255.255.0
isis enable 1
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 50
port hybrid untagged vlan 50
# interface GigabitEthernet2/0/0
port hybrid pvid vlan 30
port hybrid untagged vlan 30
# interface GigabitEthernet3/0/0
port hybrid pvid vlan 40
port hybrid untagged vlan 40
# return
7.18.11 Example for Configuring IS-IS Auto FRR (TE Protecting IP)
Networking Requirements
Figure 7-16 Networking diagram for configuring IS-IS Auto FRR
PE1 P1 P3 PE3
P5
Plane A
Issue 01 (2011-10-26)
P2
Plane B
P6
P4
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
Traffic in normal
Traffic in case of failure
427
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 7 IS-IS Configuration
is the simplified networking diagram of MPLS VPN double planes, and PEs are dual-homed to the two planes. It is required that: l IS-IS should be configured to implement IP connectivity between nodes.
l Traffic between P nodes should be transmitted through the direct link when no link fault occurs.
l The MPLS TE tunnel should be configured as the backup path so that traffic between P nodes can be switched to the other plane when the link between P nodes fails.
l IS-IS Auto FRR should be configured so that service traffic between P nodes can be rapidly switched to the TE tunnel when the direct link fails.
l Traffic between P nodes should be transmitted only between the P nodes to prevent traffic between P nodes from going back to PE nodes.
NOTE
In this configuration example, PE1 and PE3 are used for illustration, only three P nodes of each plane are illustrated, and only the MPLS TE tunnel between P1 and P3 is illustrated. In practice, there are far more
PE nodes, P nodes, and MPLS TE tunnels.
Configuration Roadmap
The configuration roadmap is as follows:
1.
Assign IP addresses to interfaces on each node, configure the loopback addresses that are used as LSR IDs, and configure IS-IS to implement IP connectivity.
2.
Configure an MPLS TE tunnel between P nodes as the backup path in Loop-Free Alternate
(LFA) calculation.
3.
Enable forwarding adjacency.
4.
Enable IS-IS Auto FRR so that traffic can be rapidly switched in the case of a link fault.
5.
Run the undo isis lfa-backup command on the interfaces that connect P nodes to PE nodes to disable these interfaces from becoming the backup interfaces in LFA calculation and prevent traffic between P nodes from going back to PE nodes.
Data Preparation
To complete the configuration, you need the following data.
Table 7-2 IP addresses of physicial interfaces
Device Name Interface and
IP Address
P1 GE1/0/0
10.1.1.1/30
P1
Remote IP
Address
GE1/0/0
10.1.1.2/30
P1
GE2/0/0
10.1.2.1/30
GE3/0/0
10.1.3.1/30
GE2/0/0
10.1.2.2/30
GE2/0/0
10.1.3.2/30
Remote
Device
P2
P3
P5
VLANIF interface
VLANIF 10
VLANIF 30
VLANIF 20
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
428
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 7 IS-IS Configuration
Issue 01 (2011-10-26)
Device Name Interface and
IP Address
P2 GE2/0/0
10.1.4.1/30
P2
P3
P3
GE3/0/0
10.1.5.1/30
GE1/0/0
10.1.6.1/30
GE3/0/0
10.1.7.1/30
P4
P5
PE1
PE1
GE3/0/0
10.1.8.1/30
GE1/0/0
10.1.9.1/30
GE1/0/0
10.1.10.1/30
GE2/0/0
10.1.11.1/30
PE3
PE3
GE1/0/0
10.1.12.1/30
GE2/0/0
10.1.13.1/30
Remote IP
Address
GE2/0/0
10.1.4.2/30
GE2/0/0
10.1.5.2/30
GE1/0/0
10.1.6.2/30
GE3/0/0
10.1.7.2/30
GE3/0/0
10.1.8.2/30
GE1/0/0
10.1.9.2/30
GE3/0/1
10.1.10.2/30
GE3/0/1
10.1.11.2/30
GE3/0/1
10.1.12.2/30
GE3/0/1
10.1.13.2/30
P4
P5
P6
PE1
PE3
Table 7-3 IP address of Loopback 0
Device Name
P1
P2
P3
Remote
Device
P4
P6
P4
P5
P6
P6
P1
P2
P3
P4
IP Address of Loopback 0
1.1.1.1/32
2.2.2.2/32
3.3.3.3/32
4.4.4.4/32
5.5.5.5/32
6.6.6.6/32
7.7.7.7/32
8.8.8.8/32
VLANIF interface
VLANIF 70
VLANIF 60
VLANIF 100
VLANIF 90
VLANIF 130
VLANIF 80
VLANIF 40
VLANIF 50
VLANIF 110
VLANIF 120
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
429
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Table 7-4 IS-IS parameters
Parameter
Router ID
IS-IS process ID
Level
NET
IS-IS name
Metric type
Metric value
7 IS-IS Configuration
Value
IP address of Loopback 0
64
2
In the format of Area-ID.System-ID.00
l Area-ID: 86.0010
l System-ID: is based on the expansion of the IP address of Loopback 0. For example, if the IP address of Loopback 0 is 1.1.1.1, the system ID becomes
0010.0100.1001.
Same as the device name
Wide
Physical interface: 5
Tunnel interface: 6
Default values
Issue 01 (2011-10-26)
Other parameters
Table 7-5 MPLS parameter
Parameter
LSR ID
Tunnel interface number
Tunnel interface description
Tunnel interface address
Tunnel ID
Name of the explicit path
Tunnel metric value
Tunnel bandwidth
Name of the LDP peer
Other parameters
Value
IP address of Loopback 0
Number of the physical outbound interface of the tunnel to_destination node
IP address of Loopback 0
100
Tunnel description
Smaller than the metric value of the primary path and greater than the metric values of other paths so that the tunnel can become the backup path and LDP over TE can be implemented
200 Mbit/s to_destination node
Default values
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
430
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
7 IS-IS Configuration
Procedure
Step 1 Configure VLANs that interfaces belong to.
<Quidway> system-view
[Quidway] sysname P1
[P1] vlan batch 10 20 30 40
[P1] interface gigabitethernet 1/0/0
[P1-GigabitEthernet1/0/0] port hybrid pvid vlan 10
[P1-GigabitEthernet1/0/0] port hybrid untagged vlan 10
[P1-GigabitEthernet1/0/0] quit
[P1] interface gigabitethernet 3/0/0
[P1-GigabitEthernet3/0/0] port hybrid pvid vlan 20
[P1-GigabitEthernet3/0/0] port hybrid untagged vlan 20
[P1-GigabitEthernet3/0/0] quit
[P1] interface gigabitethernet 2/0/0
[P1-GigabitEthernet2/0/0] port hybrid pvid vlan 30
[P1-GigabitEthernet2/0/0] port hybrid untagged vlan 30
[P1-GigabitEthernet2/0/0] quit
[P1] interface gigabitethernet 3/0/1
[P1-GigabitEthernet3/0/1] port hybrid pvid vlan 40
[P1-GigabitEthernet3/0/1] port hybrid untagged vlan 40
[P1-GigabitEthernet3/0/1] quit
The configurations of P2, P3, P4, P5, P6, PE1 and PE3 are similar to the configuration of P1, and are not mentioned here.
Step 2 Configure IP addresses for VLANIF interfaces.
Configure the IP address and mask for each interface according to
and
.
[P1] interface vlanif 10
[P1-Vlanif10] ip address 10.1.1.1 30
[P1-Vlanif10] quit
[P1] interface vlanif 20
[P1-Vlanif20] ip address 10.1.3.1 30
[P1-Vlanif20] quit
[P1] interface vlanif 30
[P1-Vlanif30] ip address 10.1.2.1 30
[P1-Vlanif30] quit
[P1] interface vlanif 40
[P1-Vlanif40] ip address 10.1.10.2 30
[P1-Vlanif40] quit
The configurations of P2, P3, P4, P5, P6, PE1 and PE3 are similar to the configuration of P1, and are not mentioned here.
Step 3 Configure IS-IS.
Configure IS-IS on all the PE and P nodes, and configure P1 and PE1. The configurations of other nodes are similar to the configurations of P1 and PE1 and thus are not mentioned here.
# Configure P1.
[P1] router id 1.1.1.1
[P1] isis 64
[P1-isis-64] network-entity 86.0010.0010.0100.1001.00
[P1-isis-64] is-level level-2
[P1-isis-64] cost-style wide
[P1-isis-64] is-name P1
[P1-isis-64] quit
[P1] interface loopback 0
[P1-LoopBack0] isis enable 64
[P1-LoopBack0] quit
[P1] interface vlanif 10
[P1-Vlanif10] isis enable 64
[P1-Vlanif10] isis cost 5
[P1-Vlanif10] quit
Issue 01 (2011-10-26) 431
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
7 IS-IS Configuration
[P1] interface vlanif 30
[P1-Vlanif30] isis enable 64
[P1-Vlanif30] isis cost 5
[P1-Vlanif30] quit
[P1] interface vlanif 20
[P1-Vlanif20] isis enable 64
[P1-Vlanif20] isis cost 5
[P1-Vlanif20] quit
[P1] interface vlanif 40
[P1-Vlanif40] isis enable 64
[P1-Vlanif40] isis cost 5
[P1-Vlanif40] quit
# Configure PE1.
[PE1] router id 7.7.7.7
[PE1] isis 64
[PE1-isis-64] network-entity 86.0010.0070.0700.7007.00
[PE1-isis-64] is-level level-2
[PE1-isis-64] cost-style wide
[PE1-isis-64] is-name PE1
[PE1-isis-64] quit
[PE1] interface loopback 0
[PE1-LoopBack0] isis enable 64
[PE1-LoopBack0] quit
[PE1] interface vlanif 40
[PE1-Vlanif40] isis enable 64
[PE1-Vlanif40] isis cost 5
[PE1-Vlanif40] quit
[PE1] interface vlanif 50
[PE1-Vlanif50] isis enable 64
[PE1-Vlanif50] isis cost 5
[PE1-Vlanif50] quit
After the preceding configurations, run the display ip routing-table command on each node.
The command output shows that the nodes have learned routes from each other. For example, when checking whether there are routes to the IP address of Loopback 0 on PE1, you can find the following information:
[PE1] display ip routing-table 1.1.1.1 32
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Table : Public
Summary Count : 1
Destination/Mask Proto Pre Cost Flags NextHop Interface
1.1.1.1/32 ISIS 15 5 D 10.1.10.2 Vlanif40
Step 4 Configure an MPLS TE tunnel.
Enable MPLS, MPLS TE, and RSVP-TE on the interfaces of P1, P2, P3, and P4, and enable
CSPF on the ingress of the tunnel.
Configure P1 and P2. The configuration of P3 is similar to that of P1, and the configuration of
P4 is similar to that of P2.
# Configure P1.
[P1] mpls lsr-id 1.1.1.1
[P1] mpls
[P1-mpls] mpls te
[P1-mpls] mpls rsvp-te
[P1-mpls] mpls te cspf
[P1-mpls] quit
[P1] interface vlanif 10
[P1-Vlanif10] mpls
[P1-Vlanif10] mpls te
[P1-Vlanif10] mpls rsvp-te
Issue 01 (2011-10-26) 432
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
7 IS-IS Configuration
[P1-Vlanif10] mpls te bandwidth max-reservable-bandwidth 200000
[P1-Vlanif10] mpls te bandwidth bc0 200000
[P1-Vlanif10] quit
# Configure P2.
[P2] mpls lsr-id 2.2.2.2
[P2] mpls
[P2-mpls] mpls te
[P2-mpls] mpls rsvp-te
[P2-mpls] quit
[P2] interface vlanif 10
[P2-Vlanif10] mpls
[P2-Vlanif10] mpls te
[P2-Vlanif10] mpls rsvp-te
[P2-Vlanif10] mpls te bandwidth max-reservable-bandwidth 200000
[P2-Vlanif10] mpls te bandwidth bc0 200000
[P2-Vlanif10] quit
[P2] interface vlanif 70
[P2-Vlanif70] mpls
[P2-Vlanif70] mpls te
[P2-Vlanif70] mpls rsvp-te
[P2-Vlanif70] mpls te bandwidth max-reservable-bandwidth 200000
[P2-Vlanif70] mpls te bandwidth bc0 200000
[P2-Vlanif70] quit
# On P1, configure an explicit path for the TE tunnel. The configuration of P3 is similar to that of P1 and is not mentioned here.
[P1] explicit-path to_P3
[P1-explicit-path-to_p3] next hop 10.1.1.2
[P1-explicit-path-to_p3] next hop 10.1.4.2
[P1-explicit-path-to_p3] next hop 10.1.6.1
[P1-explicit-path-to_p3] next hop 3.3.3.3
[P1-explicit-path-to_p3] quit
# Configure a tunnel interface on P1. The configuration of P3 is similar to that of P1 and is not mentioned here.
[P1] interface Tunnel1/0/0
[P1-Tunnel1/0/0] ip address unnumbered interface LoopBack0
[P1-Tunnel1/0/0] tunnel-protocol mpls te
[P1-Tunnel1/0/0] destination 3.3.3.3
[P1-Tunnel1/0/0] mpls te tunnel-id 100
[P1-Tunnel1/0/0] mpls te bandwidth ct0 200000
[P1-Tunnel1/0/0] mpls te path explicit-path to_P3
[P1-Tunnel1/0/0] mpls te commit
After the preceding configurations, run the display interface tunnel 1/0/0 command on P1 and
P3. The command output shows that the status of the tunnel interface is Up.
[P1] display interface tunnel 1/0/0
Tunnel1/0/0 current state : UP
Line protocol current state : UP
Last up time: 2009-09-29, 16:35:10
Description : to_P3
Step 5 Configure IS-IS Auto FRR.
Enable IS-IS Auto FRR on P1 and P3, and disable the interfaces that connect P nodes to PE nodes from becoming IS-IS LFA backup interfaces.
# Configure P1.
[P1] isis 64
[P1-isis-64] frr
[P1-isis-64-frr] loop-free-alternate level-2
[P1-isis-64-frr] quit
[P1-isis-64] quit
Issue 01 (2011-10-26) 433
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
7 IS-IS Configuration
[P1] interface vlanif 40
[P1-Vlanif40] undo isis lfa-backup
[P1-Vlanif40] quit
# Configure P3.
[P3] isis 64
[P3-isis-64] frr
[P3-isis-64-frr] loop-free-alternate level-2
[P3-isis-64-frr] quit
[P3-isis-64] quit
[P3] interface vlanif 110
[P3-Vlanif110] undo isis lfa-backup
[P3-Vlanif110] quit
Step 6 Verify the configuration.
# Run the display fib 3.3.3.3 32 verbose command on P1 to view the FIB entry to P3.
[P1] display fib 3.3.3.3 32 verbose
Route Entry Count: 1
Destination: 3.3.3.3 Mask : 255.255.255.255
Nexthop : 10.1.2.2 OutIf : Vlanif30
LocalAddr : 10.1.2.1 LocalMask: 0.0.0.0
Flags : DGU Age : 124sec
ATIndex : 0 Slot : 0
LspFwdFlag : 0 LspToken : 0x0
InLabel : NULL OriginAs : 0
BGPNextHop : 0.0.0.0 PeerAs : 0
QosInfo : 0x0 OriginQos: 0x0
NexthopBak : 10.1.1.2 OutIfBak : Tunnel1/0/0
LspTokenBak: 0x0 InLabelBak : NULL
LspToken_ForInLabelBak : 0x0
EntryRefCount : 0
rt_ulVlanId : 0x0
LspType : 0 Label_ForLspTokenBak : 0
MplsMtu : 0 Gateway_ForLspTokenBak : 0
NextToken : 0 IfIndex_ForLspTokenBak : 0
Label_NextToken : 0 Label : 0
LspBfdState : 0
# Run the shutdown command on GE 2/0/0 of P1 or P3 to simulate a link fault. Take the configuration of P1 as an example.
[P1] interface Vlanif30
[P1-Vlanif30] shutdown
# Run the display fib 3.3.3.3 32 verbose command on P1 to view the FIB entry to P3.
[P1] display fib 3.3.3.3 32 verbose
Route Entry Count: 1
Destination: 3.3.3.3 Mask : 255.255.255.255
Nexthop : 10.1.1.2 OutIf : Tunnel1/0/0
LocalAddr : 10.1.1.1 LocalMask: 0.0.0.0
Flags : DGU Age : 124sec
ATIndex : 0 Slot : 0
LspFwdFlag : 0 LspToken : 0x0
InLabel : NULL OriginAs : 0
BGPNextHop : 0.0.0.0 PeerAs : 0
QosInfo : 0x0 OriginQos: 0x0
NexthopBak : 0.0.0.0 OutIfBak : [No Intf]
LspTokenBak: 0x0 InLabelBak : NULL
LspToken_ForInLabelBak : 0x0
EntryRefCount : 0
rt_ulVlanId : 0x0
LspType : 0 Label_ForLspTokenBak : 0
MplsMtu : 0 Gateway_ForLspTokenBak : 0
NextToken : 0 IfIndex_ForLspTokenBak : 0
Label_NextToken : 0 Label : 0
434
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
LspBfdState : 0
7 IS-IS Configuration
The command output shows that traffic from P1 to P3 has been switched to the backup link with the outbound interface being Tunnel 1/0/0.
----End
Configuration Files
l Configuration file of P1
#
sysname P1
# vlan batch 10 20 30 40
#
router id 1.1.1.1
#
mpls lsr-id 1.1.1.1
mpls
mpls te
mpls rsvp-te
mpls te cspf
#
explicit-path to_p3
next hop 10.1.1.2
next hop 10.1.4.2
next hop 10.1.6.1
next hop 3.3.3.3
# mpls ldp
#
mpls ldp remote-peer to_p3
remote-ip 3.3.3.3
undo remote-ip pwe3
# isis 64
frr
loop-free-alternate level-2
is-level level-2
cost-style wide
network-entity 86.0010.0010.0100.1001.00
is-name P1
# interface LoopBack0
ip address 1.1.1.1 255.255.255.255
isis enable 64
# interface Tunnel1/0/0
description toP3
ip address unnumbered interface LoopBack0
tunnel-protocol mpls te
destination 3.3.3.3
mpls te tunnel-id 100
mpls te bandwidth ct0 200000
mpls te path explicit-path to_p3
mpls te igp advertise
mpls te igp metric absolute 6
mpls te commit
isis enable 64
# interface Vlanif10
ip address 10.1.1.1 255.255.255.252
isis enable 64
isis cost 5
mpls
mpls te
mpls rsvp-te
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
435
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Issue 01 (2011-10-26)
mpls te bandwidth max-reservable-bandwidth 200000
mpls te bandwidth bc0 200000
# interface Vlanif30
ip address 10.1.2.1 255.255.255.252
isis enable 64
isis cost 5
mpls
mpls ldp
# interface Vlanif20
ip address 10.1.3.1 255.255.255.252
isis enable 64
isis cost 5
mpls
mpls ldp
# interface Vlanif40
ip address 10.1.10.2 255.255.255.252
isis enable 64
isis cost 5
undo isis lfa-backup
mpls
mpls ldp
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# interface GigabitEthernet2/0/0
port hybrid pvid vlan 30
port hybrid untagged vlan 30
# interface GigabitEthernet3/0/0
port hybrid pvid vlan 20
port hybrid untagged vlan 20
# interface GigabitEthernet3/0/1
port hybrid pvid vlan 40
port hybrid untagged vlan 40
# return l Configuration file of P2
#
sysname P2
# vlan batch 10 50 60 70
#
router id 2.2.2.2
#
mpls lsr-id 2.2.2.2
mpls
mpls te
mpls rsvp-te
# mpls ldp
# isis 64
is-level level-2
cost-style wide
network-entity 86.0010.0020.0200.2002.00
is-name P2
# interface LoopBack0
ip address 2.2.2.2 255.255.255.255
isis enable 64
# interface Vlanif10
ip address 10.1.1.2 255.255.255.252
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
7 IS-IS Configuration
436
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Issue 01 (2011-10-26)
isis enable 64
isis cost 5
mpls
mpls te
mpls rsvp-te
mpls te bandwidth max-reservable-bandwidth 200000
mpls te bandwidth bc0 200000
# interface Vlanif70
ip address 10.1.4.1 255.255.255.252
isis enable 64
isis cost 5
mpls
mpls te
mpls te bandwidth max-reservable-bandwidth 200000
mpls te bandwidth bc0 200000
mpls ldp
# interface Vlanif60
ip address 10.1.5.1 255.255.255.252
isis enable 64
isis cost 5
mpls
mpls ldp
# interface Vlanif50
ip address 10.1.11.2 255.255.255.252
isis enable 64
isis cost 5
mpls
mpls ldp
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# interface GigabitEthernet2/0/0
port hybrid pvid vlan 70
port hybrid untagged vlan 70
# interface GigabitEthernet3/0/0
port hybrid pvid vlan 60
port hybrid untagged vlan 60
# interface GigabitEthernet3/0/1
port hybrid pvid vlan 50
port hybrid untagged vlan 50
# return l Configuration file of P3
#
sysname P3
# vlan batch 30 90 100 110
#
router id 3.3.3.3
#
mpls lsr-id 3.3.3.3
mpls
mpls te
mpls rsvp-te
mpls te cspf
#
explicit-path to_p3
next hop 10.1.6.2
next hop 10.1.4.1
next hop 10.1.1.1
next hop 1.1.1.1
#
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
7 IS-IS Configuration
437
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing mpls ldp
#
mpls ldp remote-peer to_p1
remote-ip 1.1.1.1
undo remote-ip pwe3
# isis 64
frr
loop-free-alternate level-2
is-level level-2
cost-style wide
network-entity 86.0010.0030.0300.3003.00
is-name P3
# interface LoopBack0
ip address 3.3.3.3 255.255.255.255
isis enable 64
# interface Tunnel1/0/0
description toP1
ip address unnumbered interface LoopBack0
tunnel-protocol mpls te
destination 1.1.1.1
mpls te tunnel-id 100
mpls te bandwidth ct0 200000
mpls te path explicit-path to_p1
mpls te igp advertise
mpls te igp metric absolute 6
mpls te commit
isis enable 64
# interface Vlanif100
ip address 10.1.6.1 255.255.255.252
isis enable 64
isis cost 5
mpls
mpls te
mpls rsvp-te
mpls te bandwidth max-reservable-bandwidth 200000
mpls te bandwidth bc0 200000
# interface Vlanif30
ip address 10.1.2.2 255.255.255.252
isis enable 64
isis cost 5
mpls
mpls ldp
# interface Vlanif90
ip address 10.1.7.1 255.255.255.252
isis enable 64
isis cost 5
mpls
mpls ldp
# interface Vlanif110
ip address 10.1.12.2 255.255.255.252
isis enable 64
isis cost 5
undo isis lfa-backup
mpls
mpls ldp
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 100
port hybrid untagged vlan 100
# interface GigabitEthernet2/0/0
port hybrid pvid vlan 30
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
7 IS-IS Configuration
438
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Issue 01 (2011-10-26)
port hybrid untagged vlan 30
# interface GigabitEthernet3/0/0
port hybrid pvid vlan 90
port hybrid untagged vlan 90
# interface GigabitEthernet3/0/1
port hybrid pvid vlan 110
port hybrid untagged vlan 110
# return l
Configuration file of P4
#
sysname P4
# vlan batch 70 100 120 130
#
router id 4.4.4.4
#
mpls lsr-id 4.4.4.4
mpls
mpls te
mpls rsvp-te
# mpls ldp
# isis 64
is-level level-2
cost-style wide
network-entity 86.0010.0040.0400.4004.00
is-name P4
# interface LoopBack0
ip address 4.4.4.4 255.255.255.255
isis enable 64
# interface Vlanif100
ip address 10.1.6.2 255.255.255.252
isis enable 64
isis cost 5
mpls
mpls te
mpls rsvp-te
mpls te bandwidth max-reservable-bandwidth 200000
mpls te bandwidth bc0 200000
# interface Vlanif70
ip address 10.1.4.2 255.255.255.252
isis enable 64
isis cost 5
mpls
mpls te
mpls te bandwidth max-reservable-bandwidth 200000
mpls te bandwidth bc0 200000
mpls ldp
# interface Vlanif130
ip address 10.1.8.1 255.255.255.252
isis enable 64
isis cost 5
mpls
mpls ldp
# interface Vlanif120
ip address 10.1.13.2 255.255.255.252
isis enable 64
isis cost 5
mpls
mpls ldp
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
7 IS-IS Configuration
439
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Issue 01 (2011-10-26)
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 100
port hybrid untagged vlan 100
# interface GigabitEthernet2/0/0
port hybrid pvid vlan 70
port hybrid untagged vlan 70
# interface GigabitEthernet3/0/0
port hybrid pvid vlan 130
port hybrid untagged vlan 130
# interface GigabitEthernet3/0/1
port hybrid pvid vlan 120
port hybrid untagged vlan 120
# return l Configuration file of P5
#
sysname P5
# vlan batch 20 80 90
#
router id 5.5.5.5
#
mpls lsr-id 5.5.5.5
mpls
# mpls ldp
# isis 64
is-level level-2
cost-style wide
network-entity 86.0010.0050.0500.5005.00
is-name P5
# interface LoopBack0
ip address 5.5.5.5 255.255.255.255
isis enable 64
# interface Vlanif80
ip address 10.1.9.1 255.255.255.252
isis enable 64
isis cost 5
mpls
mpls ldp
# interface Vlanif20
ip address 10.1.3.2 255.255.255.252
isis enable 64
isis cost 5
mpls
mpls ldp
# interface Vlanif90
ip address 10.1.7.2 255.255.255.252
isis enable 64
isis cost 5
mpls
mpls ldp
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 80
port hybrid untagged vlan 80
# interface GigabitEthernet2/0/0
port hybrid pvid vlan 20
port hybrid untagged vlan 20
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
7 IS-IS Configuration
440
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Issue 01 (2011-10-26)
# interface GigabitEthernet3/0/0
port hybrid pvid vlan 90
port hybrid untagged vlan 90
# return l
Configuration file of P6
#
sysname P6
# vlan batch 60 80 130
#
router id 6.6.6.6
#
mpls lsr-id 6.6.6.6
mpls
# mpls ldp
# isis 64
is-level level-2
cost-style wide
network-entity 86.0010.0060.0600.6006.00
is-name P6
# interface LoopBack0
ip address 6.6.6.6 255.255.255.255
isis enable 64
# interface Vlanif80
ip address 10.1.9.2 255.255.255.252
isis enable 64
isis cost 5
mpls
mpls ldp
# interface Vlanif60
ip address 10.1.5.2 255.255.255.252
isis enable 64
isis cost 5
mpls
mpls ldp
# interface Vlanif130
ip address 10.1.8.2 255.255.255.252
isis enable 64
isis cost 5
mpls
mpls ldp
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 80
port hybrid untagged vlan 80
# interface GigabitEthernet2/0/0
port hybrid pvid vlan 60
port hybrid untagged vlan 60
# interface GigabitEthernet3/0/0
port hybrid pvid vlan 130
port hybrid untagged vlan 130
# return l Configuration file of PE1
#
sysname PE1
#
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
7 IS-IS Configuration
441
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Issue 01 (2011-10-26) vlan batch 40 50
#
router id 7.7.7.7
#
mpls lsr-id 7.7.7.7
mpls
# mpls ldp
# isis 64
is-level level-2
cost-style wide
network-entity 86.0010.0070.0700.7007.00
is-name PE1
# interface LoopBack0
ip address 7.7.7.7 255.255.255.255
isis enable 64
# interface Vlanif40
ip address 10.1.10.1 255.255.255.252
isis enable 64
isis cost 5
mpls
mpls ldp
# interface Vlanif50
ip address 10.1.11.1 255.255.255.252
isis enable 64
isis cost 5
mpls
mpls ldp
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 40
port hybrid untagged vlan 40
# interface GigabitEthernet2/0/0
port hybrid pvid vlan 50
port hybrid untagged vlan 50
# return l Configuration file of PE3
#
sysname PE3
# vlan batch 110 120
#
router id 8.8.8.8
#
mpls lsr-id 8.8.8.8
mpls
# mpls ldp
# isis 64
is-level level-2
cost-style wide
network-entity 86.0010.0080.0800.8008.00
is-name PE3
# interface LoopBack0
ip address 8.8.8.8 255.255.255.255
isis enable 64
# interface Vlanif110
ip address 10.1.12.1 255.255.255.252
isis enable 64
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
7 IS-IS Configuration
442
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 7 IS-IS Configuration
isis cost 5
mpls
mpls ldp
# interface Vlanif120
ip address 10.1.13.1 255.255.255.252
isis enable 64
isis cost 5
mpls
mpls ldp
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 110
port hybrid untagged vlan 110
# interface GigabitEthernet2/0/0
port hybrid pvid vlan 120
port hybrid untagged vlan 120
# return
7.18.12 Example for Configuring IS-IS GR
Networking Requirements
, the networking requirements are as follows: Switch A, Switch A and
Switch C belong to the same autonomous system . They run the IS-IS protocol to implement interworking and provide the GR mechanism.
After Switch A, Switch B, and Switch C set up IS-IS adjacencies with each other, they start to exchange routing information. When IS-IS is restarted on Switch A, Switch A resends connection requests to neighbors to synchronize the LSDB.
Figure 7-17 Networking diagram of IS-IS GR configuration
SwitchA
L1
GE1/0/1
GE1/0/1
SwitchC
L1/L2
GE1/0/2
GE1/0/1
SwitchB
L2
Switch
SwitchA
SwitchB
SwitchC
SwitchC
Interface
GigabitEthernet1/0/1
GigabitEthernet1/0/1
GigabitEthernet1/0/1
GigabitEthernet1/0/2
VLANIF interface
VLANIF 10
VLANIF 20
VLANIF 10
VLANIF 20
IP address
100.1.1.1/24
100.2.1.2/24
100.1.1.2/24
100.2.1.1/24
Configuration Roadmap
The configuration roadmap is as follows:
1.
Enable IS-IS on each Switch so that the Switches can be interconnected.
2.
Configure GR in the IS-IS view on each Switch and configure the same interval for the restart.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
443
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
7 IS-IS Configuration
Data Preparation
To complete the configuration, you need the following data: l ID of the VLAN that each interface belongs to, as shown in
l
IP address of each VLANIF interface, as shown in
l System ID, level, and area ID of each Switch :
–
Switch A: The system ID is 0000.0000.0001; the area ID is 10; the level is Level-1.
– Switch B: The system ID is 0000.0000.0002; the area ID is 10; the level is Level-2.
– Switch C: The system ID is 0000.0000.0003; the area ID is 10; the level is Level-1-2.
l Restart interval
Procedure
Step 1 Configure VLANs that the related interfaces belong to.
<Quidway> system-view
[Quidway] sysname SwitchA
[SwitchA] vlan 10
[SwitchA-Vlan10] quit
[SwitchA] interface gigabitethernet 1/0/1
[SwitchA-GigabitEthernet1/0/1] port hybrid pvid vlan 10
[SwitchA-GigabitEthernet1/0/1] port hybrid untagged vlan 10
[SwitchA-GigabitEthernet1/0/1] quit
The configurations of Switch B and Switch are similar to the configuration of Switch A, and are not mentioned here.
Step 2 Assign an IP address to each VLANIF interface.
[SwitchA] interface vlanif10
[SwitchA-Vlanif10] ip address 100.1.1.1 24
[SwitchA-Vlanif10] quit
The configurations of Switch B and Switch are similar to the configuration of Switch A, and are not mentioned here.
Step 3 Configure the basic function of IS-IS. The configuration procedure is not mentioned here.
Step 4 Configure IS-IS GR.
# Enable IS-IS GR on Switch A and set the restart interval. The configurations on Switch B and
Switch C are the same as the configurations on Switch A. Switch A is taken as an example here.
[SwitchA] isis 1
[SwitchA-isis-1] graceful-restart
[SwitchA-isis-1] graceful-restart interval 150
[SwitchA-isis-1] quit
Step 5 Verify the configuration.
# Run the display fib command on Switch A to view the Forwarding Information Base (FIB) table.
<SwitchA> display fib
FIB Table:
Total number of Routes : 5
Destination/Mask Nexthop Flag TimeStamp Interface TunnelID
127.0.0.1/32 127.0.0.1 HU t[21] InLoop0 0x0
127.0.0.0/8 127.0.0.1 U t[21] InLoop0 0x0
100.1.1.1/32 127.0.0.1 HU t[20678] InLoop0 0x0
100.1.1.0/24 100.1.1.1 U t[20678] Vlanif10 0x0
100.2.1.0/24 100.1.1.2 DGU t[79388] Vlanif10 0x0
Issue 01 (2011-10-26) 444
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
7 IS-IS Configuration
# Reset the IS-IS process by using the GR method on Switch A.
<SwitchA> reset isis all
NOTE
The Switch restarts an IS-IS process in GR mode only when GR is enabled for the IS-IS process.
# Run the display fib command on Switch A and view the FIB table to check whether GR works normally. If GR works normally, the FIB table does not change and the forwarding service is not affected when Switch A restarts the IS-IS process in GR mode.
<SwitchA> display fib
FIB Table:
Total number of Routes : 5
Destination/Mask Nexthop Flag TimeStamp Interface TunnelID
127.0.0.1/32 127.0.0.1 HU t[21] InLoop0 0x0
127.0.0.0/8 127.0.0.1 U t[21] InLoop0 0x0
100.1.1.1/32 127.0.0.1 HU t[20678] InLoop0 0x0
100.1.1.0/24 100.1.1.1 U t[20678] Vlanif10 0x0
100.2.1.0/24 100.1.1.2 DGU t[79388] Vlanif10 0x0
As shown in the display, the FIB table on Switch A does not change and the forwarding service is not affected.
# Disable IS-IS GR on Switch A.
[SwitchA] isis 1
[SwitchA-isis-1] undo graceful-restart
[SwitchA-isis-1] quit
# Reset the IS-IS process on Switch A.
<SwitchA> reset isis all
# Run the display fib command on Switch A to view the FIB table.
<SwitchA> display fib
FIB Table:
Total number of Routes : 4
Destination/Mask Nexthop Flag TimeStamp Interface TunnelID
127.0.0.1/32 127.0.0.1 HU t[21] InLoop0 0x0
127.0.0.0/8 127.0.0.1 U t[21] InLoop0 0x0
100.1.1.1/32 127.0.0.1 HU t[20678] InLoop0 0x0
100.1.1.0/24 100.1.1.1 U t[20678] Vlanif10 0x0
As shown in the display, the FIB table on Switch A changes and the forwarding service is affected.
----End
Configuration Files
l Configuration file of Switch A
#
sysname SwitchA
#
vlan batch 10
# isis 1
graceful-restart
graceful-restart interval 150
is-level level-1
network-entity 10.0000.0000.0001.00
# interface Vlanif10
Issue 01 (2011-10-26) 445
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
ip address 100.1.1.1 255.255.255.0
isis enable 1
# interface GigabitEthernet1/0/1
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# return l Configuration file of Switch B
#
sysname SwitchB
#
vlan batch 20
# isis 1
graceful-restart
graceful-restart interval 150
is-level level-2
network-entity 10.0000.0000.0002.00
# interface Vlanif20
ip address 100.2.1.2 255.255.255.0
isis enable 1
# interface GigabitEthernet1/0/1
port hybrid pvid vlan 20
port hybrid untagged vlan 20
# return l Configuration file of Switch C
#
sysname SwitchC
#
vlan batch 10 20
# isis 1
graceful-restart
graceful-restart interval 150
network-entity 10.0000.0000.0003.00
# interface Vlanif10
ip address 100.1.1.2 255.255.255.0
isis enable 1
# interface Vlanif20
ip address 100.2.1.1 255.255.255.0
isis enable 1
# interface GigabitEthernet1/0/1
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# interface GigabitEthernet1/0/2
port hybrid pvid vlan 20
port hybrid untagged vlan 20
# return
7.18.13 Example for Configuring Static BFD for IS-IS
7 IS-IS Configuration
Networking Requirements
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
446
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 7 IS-IS Configuration l A Layer 2 switch exists between Switch A and Switch B.
l Switch A, Switch B and Switch C run IS-IS.
l BFD is configured to detect the IS-IS neighbor relationship between Switch A and Switch
B. When the link between Switch A and Switch B is faulty, BFD can fast detect the default and report it to IS-IS.
Figure 7-18 Networking diagram for configuring static BFD for IS-IS
GE1/0/0
100.1.1.1/24
SwitchA
GE1/0/0
100.1.1.2/24
GE2/0/0
100.2.1.1/24
SwitchB
GE1/0/0
100.2.1.2/24
SwitchC
Switch
SwitchA
SwitchB
SwitchB
SwitchC
Interface
GigabitEthernet1/0/0
GigabitEthernet1/0/0
GigabitEthernet2/0/0
GigabitEthernet1/0/0
VLANIF interface IP address
VLANIF 10 100.1.1.1/24
VLANIF 20
VLANIF 30
VLANIF 30
100.1.1.2/24
100.2.1.1/24
100.2.1.2/24
NOTE
BFD for IS-IS cannot be used to detect the multi-hops link between Switch A and Switch C, because the
IS-IS neighbor relationship cannot be established between Switch A and Switch C.
Configuration Roadmap
The configuration roadmap is as follows:
1.
Enable basic IS-IS functions on each switch.
2.
Enable BFD on Switch A and Switch B.
Data Preparation
To complete the configuration, you need the following data: l IS-IS process ID l Area addresses of Switch A, Switch B, and Switch C l Levels of Switch A, Switch B, and Switch C l Name of the BFD session set up between Switch A and Switch B and the peer IP address to be detected l Local and remote discriminators of the BFD session set up between Switch A and Switch
B
Procedure
Step 1 Configure VLANs that interfaces belong to.
<Quidway> system-view
[Quidway] sysname SwitchA
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
447
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
7 IS-IS Configuration
[SwitchA] vlan batch 10
[SwitchA] interface gigabitethernet 1/0/0
[SwitchA-GigabitEthernet1/0/0] port hybrid pvid vlan 10
[SwitchA-GigabitEthernet1/0/0] port hybrid untagged vlan 10
[SwitchA-GigabitEthernet1/0/0] quit
The configurations of Switch B and Switch C are similar to the configuration of Switch A, and are not mentioned here.
Step 2 Configure an IP address for each VLANIF interface.
[SwitchA] interface vlanif 10
[SwitchA-Vlanif10] ip address 100.1.1.1 24
[SwitchA-Vlanif10] quit
The configurations of Switch B and Switch C are similar to the configuration of Switch A, and are not mentioned here.
Step 3 Configuration basic IS-IS functions.
# Configure Switch A.
[SwitchA] isis 1
[SwitchA-isis-1] is-level level-2
[SwitchA-isis-1] network-entity aa.1111.1111.1111.00
[SwitchA-isis-1] quit
[SwitchA] interface vlanif 10
[SwitchA-Vlanif10] isis enable 1
[SwitchA-Vlanif10] quit
# Configure Switch B.
[SwitchB] isis 1
[SwitchB-isis-1] is-level level-2
[SwitchB-isis-1] network-entity aa.2222.2222.2222.00
[SwitchB-isis-1] quit
[SwitchB] interface vlanif 20
[SwitchB-Vlanif20] isis enable 1
[SwitchB-Vlanif20] quit
[SwitchB] interface vlanif 30
[SwitchB-Vlanif30] isis enable 1
[SwitchB-Vlanif30] quit
# Configure Switch C.
[SwitchC] isis 1
[SwitchC-isis-1] is-level level-2
[SwitchC-isis-1] network-entity aa.3333.3333.3333.00
[SwitchC-isis-1] quit
[SwitchC] interface vlanif 30
[SwitchC-Vlanif30] isis enable 1
[SwitchC-Vlanif30] quit
After the preceding configurations, you can view that the neighbor relationship is established between Switch A and Switch B.
[SwitchA] display isis peer
Peer information for ISIS(1)
----------------------------
System Id Interface Circuit Id State HoldTime Type PRI
2222.2222.2222 Vlanif10 001 Up 23s L2 64
The IS-IS routing table of Switch A has entries to Switch B and Switch C.
[SwitchA] display isis route
Route information for ISIS(1)
-----------------------------
ISIS(1) Level-2 Forwarding Table
--------------------------------
Issue 01 (2011-10-26) 448
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
7 IS-IS Configuration
IPV4 Destination IntCost ExtCost ExitInterface NextHop Flags
-------------------------------------------------------------------------
100.1.1.0/24 10 NULL Vlanif10 Direct D/-/L/-
100.2.1.0/24 20 NULL Vlanif10 100.1.1.2 A/-/L/-
Flags: D-Direct, A-Added to URT, L-Advertised in LSPs, S-IGP Shortcut,
Step 4 Configure BFD.
# Enable BFD on Switch A and configure a BFD session.
[SwitchA] bfd
[SwitchA-bfd] quit
[SwitchA] bfd atob bind peer-ip 100.1.1.2 interface vlanif 10
[SwitchA-bfd-session-atob] discriminator local 1
[SwitchA-bfd-session-atob] discriminator remote 2
[SwitchA-bfd-session-atob] commit
[SwitchA-bfd-session-atob] quit
# Enable BFD on Switch B and configure a BFD session.
[SwitchB] bfd
[SwitchB-bfd] quit
[SwitchB] bfd btoa bind peer-ip 100.1.1.1 interface vlanif 20
[SwitchB-bfd-session-btoa] discriminator local 2
[SwitchB-bfd-session-btoa] discriminator remote 1
[SwitchB-bfd-session-btoa] commit
[SwitchB-bfd-session-btoa] quit
After the preceding configurations, you can view that the status of the BFD session is Up when the display bfd session command is used on Switch A or Switch B.
The display on Switch A is as follows:
[SwitchA] display bfd session all
------------------------------------------------------------------------
Local Dis Remote Dis Peer IP Address Interface Name State Type
------------------------------------------------------------------------
1 2 100.1.1.2 Vlanif10 Up S_IP
------------------------------------------------------------------------
Total UP/DOWN Session Number : 1/0
Step 5 Enable IS-IS fast sense.
# Configure Switch A.
[SwitchA] interface vlanif 10
[SwitchA-Vlanif10] isis bfd static
[SwitchA-Vlanif10] quit
# Configure Switch B.
[SwitchB] interface vlanif 20
[SwitchB-Vlanif20] isis bfd static
[SwitchB-Vlanif20] quit
Step 6 Verify the configuration.
# Enable the debugging on Switch A and output information to the VTY tunnel.
[SwitchA] info-center source bfd channel 1 log level debugging state on
[SwitchA] quit
<SwitchA> debugging isis circuit-information
<SwitchA> terminal debugging
<SwitchA> terminal logging
<SwitchA> terminal monitor
# Run the shutdown command on Vlanif20 of Switch B to simulate a link fault.
[SwitchB-Vlanif20] shutdown
Issue 01 (2011-10-26) 449
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
7 IS-IS Configuration
# On Switch A, the following log information and debugging information are displayed. It indicates that IS-IS deletes the neighbor relationship with Switch B according to the fault reported by BFD.
Sep 12 2007 11:32:18 RT2 %%01ISIS/4/PEER_DOWN_BFDDOWN(l): IS-IS process id 1 nei ghbor 2222.2222.2222 is down on the interface GE1/0/0 because BFD node is Down.
The last Hello packet is received at 11:32:10. The maximum interval for sending
Hello packets is 9247. The local router sends 426 Hello packets and receives 61
Hello packets. The Hello packet type is Lan Level-2.
*0.481363988 RT2 ISIS/6/ISIS:
ISIS-1-FastSense: Deleting Neighbour by IP Address 100.1.1.2 On Vlanif20(IS01_1048)
Run the display isis route command or the display isis peer command on Switch A, no information is displayed. This indicates that the IS-IS neighbor relationship between Switch A and Switch B is deleted.
----End
Configuration Files
l
Configuration file of Switch A
#
sysname SwitchA
#
vlan batch 10
#
info-center source BFD channel 1 log level debugging
# bfd
# isis 1
is-level level-2
network-entity aa.1111.1111.1111.00
# interface Vlanif10
ip address 100.1.1.1 255.255.255.0
isis enable 1
isis bfd static
# bfd atob bind peer-ip 100.1.1.2 interface Vlanif10
discriminator local 1
discriminator remote 2
commit
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# return l Configuration file of Switch B
#
sysname SwitchB
#
vlan batch 20 30
# bfd
# isis 1
is-level level-2
network-entity aa.2222.2222.2222.00
# interface Vlanif20
ip address 100.1.1.2 255.255.255.0
isis enable 1
isis bfd static
#
Issue 01 (2011-10-26) 450
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 7 IS-IS Configuration interface Vlanif30
ip address 100.2.1.1 255.255.255.0
isis enable 1
# bfd btoa bind peer-ip 100.1.1.1 interface Vlanif20
discriminator local 2
discriminator remote 1
commit
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 20
port hybrid untagged vlan 20
# interface GigabitEthernet2/0/0
port hybrid pvid vlan 30
port hybrid untagged vlan 30
# return l
Configuration file of Switch C
#
sysname SwitchC
#
vlan batch 30
# isis 1
is-level level-2
network-entity aa.3333.3333.3333.00
# interface Vlanif30
ip address 100.2.1.2 255.255.255.0
isis enable 1
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 30
port hybrid untagged vlan 30
# return
7.18.14 Example for Configuring Dynamic BFD for IS-IS
Networking Requirements
l Run IS-IS on Switch A, Switch B, and Switch C.
l Enable BFD of the IS-IS process on Switch A, Switch B, and Switch C.
l Traffic is transmitted on the active link Switch A → Switch B. The link Switch A → Switch
B → Switch C acts as the standby link.
l Enable BFD of the interface on the link between Switch A and Switch B. When the link between Switch A and Switch B fails, BFD can quickly detect the fault and notify IS-IS of the fault; therefore, the traffic is transmitted on the standby link.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
451
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
GE1/0/0
1.1.1.1/24
7 IS-IS Configuration
Figure 7-19 Networking diagram for configuring the dynamic BFD
Switch A
GE2/0/0
3.3.3.1/24
GE2/0/0
3.3.3.2/24
SwitchB
GE3/0/0
172.16.1.1/24
GE1/0/0
2.2.2.2/24 switch
Switch A
Switch A
Switch B
Switch B
Switch B
Switch C
Switch C
GE1/0/0
1.1.1.2/24
SwitchC
GE2/0/0
2.2.2.1/24
Interface
GigabitEthernet1/0/0
GigabitEthernet2/0/0
GigabitEthernet1/0/0
GigabitEthernet2/0/0
GigabitEthernet3/0/0
GigabitEthernet2/0/0
GigabitEthernet1/0/0
VLANIF interface
VLANIF 10
VLANIF 20
VLANIF 50
VLANIF 30
VLANIF 40
VLANIF 50
VLANIF 10
IP address
1.1.1.1/24
3.3.3.1/24
2.2.2.2/24
3.3.3.2/24
172.16.1.1/24
2.2.2.1/24
1.1.1.2/24
Configuration Roadmap
The configuration roadmap is as follows:
1.
Enable IS-IS on each switch and ensure the connectivity of the switches
2.
Set the interface cost of IS-IS to control the route selection of the switches.
3.
Enable global BFD.
4.
Enable the BFD detection mechanism of the IS-IS process on Switch A, Switch B, and
Switch C.
5.
Enable the BFD detection mechanism of the interfaces on Switch A and Switch B.
Data Preparation
To complete the configuration, you need the following data: l Process ID of IS-IS l Area numbers of Switch A, Switch B, and Switch C l Interface cost of Switch A, Switch B and Switch C l Interface number and type number of BFD enabled on Switch A and Switch B
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
452
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
7 IS-IS Configuration l Minimum interval for sending the BFD packets, minimum interval for receiving the BFD packets, and local detection multiple on Switch A and Switch B
Procedure
Step 1 Configure VLANs that interfaces belong to.
<Quidway> system-view
[Quidway] sysname Switch A
[SwitchA] vlan batch 10 20
[SwitchA] interface gigabitethernet 1/0/0
[SwitchA-GigabitEthernet1/0/0] port hybrid pvid vlan 10
[SwitchA-GigabitEthernet1/0/0] port hybrid untagged vlan 10
[SwitchA-GigabitEthernet1/0/0] quit
[SwitchA] interface gigabitethernet 2/0/0
[SwitchA-GigabitEthernet2/0/0] port hybrid pvid vlan 20
[SwitchA-GigabitEthernet2/0/0] port hybrid untagged vlan 20
[SwitchA-GigabitEthernet2/0/0] quit
The configurations of SwitchB and SwitchC are similar to the configuration of SwitchA, and are not mentioned here.
Step 2 Assign an IP address to each VLANIF interface.
[SwitchA] interface vlanif 10
[SwitchA-Vlanif10] ip address 1.1.1.1 24
[SwitchA-Vlanif10] quit
[SwitchA] interface vlanif 20
[SwitchA-Vlanif20] ip address 3.3.3.1 24
[SwitchA-Vlanif20] quit
The configurations of SwitchB and SwitchC are similar to the configuration of SwitchA, and are not mentioned here.
Step 3 Configure the basic IS-IS functions.
# Configure Switch A.
[SwitchA] isis
[SwitchA-isis-1] is-level level-2
[SwitchA-isis-1] network-entity 10.0000.0000.0001.00
[SwitchA-isis-1] quit
[SwitchA] interface vlanif 10
[SwitchA-Vlanif10] isis enable 1
[SwitchA-Vlanif10] quit
[SwitchA] interface vlanif 20
[SwitchA-Vlanif20] isis enable 1
[SwitchA-Vlanif20] quit
# Configure Switch B.
[SwitchB] isis
[SwitchB-isis-1] is-level level-2
[SwitchB-isis-1] network-entity 10.0000.0000.0002.00
[SwitchB-isis-1] quit
[SwitchB] interface vlanif 50
[SwitchB-Vlanif50] isis enable 1
[SwitchB-Vlanif50] quit
[SwitchB] interface vlanif 30
[SwitchB-Vlanif30] isis enable 1
[SwitchB-Vlanif30] quit
[SwitchB] interface vlanif 40
[SwitchB-Vlanif40] isis enable 1
[SwitchB-Vlanif40] quit
# Configure Switch C.
[SwitchC] isis
Issue 01 (2011-10-26) 453
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 7 IS-IS Configuration
[SwitchC-isis-1] is-level level-2
[SwitchC-isis-1] network-entity 10.0000.0000.0003.00
[SwitchC-isis-1] quit
[SwitchC] interface vlanif 10
[SwitchC-Vlanif10] isis enable 1
[SwitchC-Vlanif10] quit
[SwitchC] interface vlanif 50
[SwitchC-Vlanif50] isis enable 1
[SwitchC-Vlanif50] quit
# After the preceding configurations are complete, use the display isis peer command. You can view that the neighboring relationship is set up between Switch A and Switch B, and that between
Switch A and Switch C. Take the configuration on Switch A as an example:
[SwitchA] display isis peer
Peer information for ISIS(1)
----------------------------
System Id Interface Circuit Id State HoldTime Type PRI
0000.0000.0002 Vlanif20 0000.0000.0002.01 Up 9s L2 64
0000.0000.0003 Vlanif10 0000.0000.0001.02 Up 21s L2 64
Total Peer(s): 2
# The switches have learned routes of each other. Take the routing table of Switch A as an example:
[SwitchA] display ip routing-table
Route Flags: R - relied, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 8 Routes : 9
Destination/Mask Proto Pre Cost Flags NextHop Interface
1.1.1.0/24 Direct 0 0 D 1.1.1.1 Vlanif10
1.1.1.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
2.2.2.0/24 ISIS 15 20 D 1.1.1.2 Vlanif10
3.3.3.0/24 Direct 0 0 D 3.3.3.1 Vlanif20
3.3.3.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
172.16.1.0/24 ISIS 15 20 D 3.3.3.2 Vlanif20
As shown in the routing table, the next hop address of the route to 172.16.1.0/24 is 3.3.3.2 and traffic is transmitted on the active link from Switch A to Switch B.
Step 4 Set the interface cost.
# Configure Switch A.
[SwitchA] interface vlanif 20
[SwitchA-Vlanif20] isis cost 5
[SwitchA-Vlanif20] quit
# Configure Switch B.
[SwitchB] interface vlanif 30
[SwitchB-Vlanif30] isis cost 5
[SwitchB-Vlanif30] quit
Step 5 Configure BFD of the IS-IS process.
# Enable BFD of the IS-IS process on Switch A.
[SwitchA] bfd
[SwitchA-bfd] quit
[SwitchA] isis
[SwitchA-isis-1] bfd all-interfaces enable
[SwitchA-isis-1] quit
# Enable BFD of the IS-IS process on Switch B.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
454
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
7 IS-IS Configuration
[SwitchB] bfd
[SwitchB-bfd] quit
[SwitchB] isis
[SwitchB-isis-1] bfd all-interfaces enable
[SwitchB-isis-1] quit
# Enable BFD of the IS-IS process on Switch C.
[SwitchC] bfd
[SwitchC-bfd] quit
[SwitchC] isis
[SwitchC-isis-1] bfd all-interfaces enable
[SwitchC-isis-1] quit
# After the preceding configurations are complete, run the display isis bfd session all command on Switch A, Switch B, or Switch C. You can view that the status of BFD is Up.
Take the display of Switch A as an example:
[SwitchA] display isis bfd session all
BFD session information for ISIS(1)
-----------------------------------
Peer System ID : 0000.0000.0002 Interface : Vlanif20
TX : 100 BFD State : up Peer IP Address : 3.3.3.2
RX : 100 LocDis : 8193 Local IP Address: 1.1.1.1
Multiplier : 3 RemDis : 8192 Type : L2
Diag : No diagnostic information
Peer System ID : 0000.0000.0003 Interface : Vlanif10
Multiplier : 3 RemDis : 8192 Type : L2
Diag : No diagnostic information
From the preceding display, you can view that the status of the BFD session between Switch A and Switch B and that between Switch A and Switch C are Up.
Step 6 Configure BFD of the interfaces.
# Configure BFD on Vlanif20 of Switch A, set the minimum interval for sending the packets and the minimum interval for receiving the packets to 100 ms, and set the local detection time multiple to 4.
[SwitchA] interface vlanif 20
[SwitchA-Vlanif20] isis bfd enable
[SwitchA-Vlanif20] isis bfd min-tx-interval 100 min-rx-interval 100 detect-
multiplier 4
[SwitchA-Vlanif20] quit
# Configure BFD on Vlanif20 of Switch B, set the minimum interval for sending the packets and the minimum interval for receiving the packets to 100 ms, and set the local detection time multiple to 4.
[SwitchB] bfd
[SwitchB-bfd] quit
[SwitchB] interface vlanif 30
[SwitchB-Vlanif30] isis bfd enable
[SwitchB-Vlanif30] isis bfd min-tx-interval 100 min-rx-interval 100 detect-
multiplier 4
[SwitchB-Vlanif30] quit
# After the preceding configurations are complete, run the display isis bfd session all command on Switch A or Switch B. You can view that the parameters of the BFD have taken effect. Take the display of Switch B as an example:
[SwitchB] display isis bfd session all
BFD session information for ISIS(1)
-----------------------------------
Peer System ID : 0000.0000.0001 Interface : Vlanif30
TX : 100 BFD State : up Peer IP Address : 3.3.3.1
Issue 01 (2011-10-26) 455
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
7 IS-IS Configuration
RX : 100 LocDis : 8192 Local IP Address: 3.3.3.2
Multiplier : 4 RemDis : 8192 Type : L2
Diag : No diagnostic information
Peer System ID : 0000.0000.0003 Interface : Vlanif50
TX : 100 BFD State : up Peer IP Address : 2.2.2.1
RX : 100 LocDis : 8192 Local IP Address: 2.2.2.2
Multiplier : 3 RemDis : 8193 Type : L2
Diag : No diagnostic information
Step 7 Verify the configuration.
# Run the shutdown command on Vlanif30 of Switch B to simulate the active link failure.
[SwitchB] interface vlanif 30
[SwitchB-Vlanif30] shutdown
Step 8 # Display the routing table on Switch A.
[SwitchA] display ip routing-table
Route Flags: R - relied, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 8 Routes : 8
Destination/Mask Proto Pre Cost Flags NextHop Interface
1.1.1.0/24 Direct 0 0 D 1.1.1.1 Vlanif10
1.1.1.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
2.2.2.0/24 ISIS 15 20 D 1.1.1.2 Vlanif10
3.3.3.0/24 Direct 0 0 D 3.3.3.1 Vlanif10
3.3.3.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
172.16.1.0/24 ISIS 15 20 D 1.1.1.2 Vlanif10
As shown in the routing table, the standby link Switch A → Switch C → Switch B takes effect after the active link fails. The next hop address of the route to 172.16.1.0/24 becomes 1.1.1.2.
# Run the display isis bfd session all command on Switch A. You can view the status of the
BFD session is Up between Switch A and Switch C.
[SwitchA] display isis bfd session all
BFD session information for ISIS(1)
-----------------------------------
Peer System ID : 0000.0000.0003 Interface : Vlanif10
TX : 100 BFD State : up Peer IP Address : 1.1.1.2
RX : 100 LocDis : 8192 Local IP Address: 1.1.1.1
Multiplier : 3 RemDis : 8192 Type : L2
Diag : No diagnostic information
----End
Configuration Files
l Configuration file of Switch A
#
sysname SwitchA
#
vlan batch 10 20
#
bfd
# isis 1
is-level level-2
bfd all-interfaces enable
network-entity 10.0000.0000.0001.00
# interface Vlanif10
ip address 1.1.1.1 255.255.255.0
isis enable 1
Issue 01 (2011-10-26) 456
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
7 IS-IS Configuration
# interface Vlanif20
ip address 3.3.3.1 255.255.255.0
isis enable 1
isis cost 5
isis bfd enable
isis bfd min-tx-interval 100 min-rx-interval 100 detect-multiplier 4
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# interface GigabitEthernet2/0/0
port hybrid pvid vlan 20
port hybrid untagged vlan 20
# return l Configuration file of Switch B
#
sysname SwitchB
#
vlan batch 30 40 50
#
bfd
# isis 1
is-level level-2
bfd all-interfaces enable
network-entity 10.0000.0000.0002.00
# interface Vlanif50
ip address 2.2.2.2 255.255.255.0
isis enable 1
# interface Vlanif30
ip address 3.3.3.2 255.255.255.0
isis enable 1
isis cost 5
isis bfd enable
isis bfd min-tx-interval 100 min-rx-interval 100 detect-multiplier 4
# interface Vlanif40
ip address 172.16.1.1 255.255.255.0
isis enable 1
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 50
port hybrid untagged vlan 50
# interface GigabitEthernet2/0/0
port hybrid pvid vlan 30
port hybrid untagged vlan 30
# interface GigabitEthernet3/0/0
port hybrid pvid vlan 40
port hybrid untagged vlan 40
# return l Configuration file of Switch C
#
sysname SwitchC
#
vlan batch 10 50
#
bfd
# isis 1
is-level level-2
457
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
bfd all-interfaces enable
network-entity 10.0000.0000.0003.00
# interface Vlanif10
ip address 1.1.1.2 255.255.255.0
isis enable 1
# interface Vlanif50
ip address 2.2.2.1 255.255.255.0
isis enable 1
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# interface GigabitEthernet2/0/0
port hybrid pvid vlan 50
port hybrid untagged vlan 50
# return
7 IS-IS Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
458
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 8 BGP Configuration
8
BGP Configuration
About This Chapter
Issue 01 (2011-10-26)
BGP is used between ASs to transmit routing information on large-scale and complex networks.
BGP is mainly used to control route transmission and select the optimal route.
8.2 BGP Features Supported by the S9300
8.3 Configuring Basic BGP Functions
Configuring basic BGP functions is the prerequisite to building a BGP network.
8.4 Configuring BGP Route Attributes
BGP has many route attributes. By configuring these attributes, you can change BGP routing policies.
By using routing policies, BGP can flexibly send and receive routes.
8.6 Controlling the Advertisement of BGP Routing Information
BGP can perform routing policies on or filter only the routes to be advertised to a certain peer.
8.7 Controlling the Import of Routing Information
Importing routes of other routing protocols can enrich the BGP routing table. When importing
IGP routes, BGP can filter the routes according to different routing protocols.
8.8 Configuring BGP Route Dampening
By configuring BGP route dampening, you can suppress unstable BGP routes.
8.9 Configuring Parameters of a BGP Peer Connection
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
459
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 8 BGP Configuration
8.13 Configuring BGP Load Balancing
By configuring BGP load balancing, you can properly use network resources.
8.14 Configuring a BGP Peer Group
8.15 Configuring a BGP Route Reflector
8.16 Configuring a BGP Confederation
8.17 Configuring BGP Accounting
By configuring BGP accounting, you can collect the statistics of the incoming and outgoing
By configuring BGP GR, you can avoid traffic interruption caused by protocol restart.
To improve BGP security, you can perform TCP connection authentication.
Maintaining BGP involves resetting a BGP connection and clearing BGP statistics.
This section provides several configuration examples of BGP.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
460
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 8 BGP Configuration
8.1 BGP Overview
BGP is mainly used to control route transmission and select the optimal route.
The Border Gateway Protocol (BGP) is a dynamic routing protocol used between Autonomous
Systems (ASs). BGP-1 (defined in RFC 1105), BGP-2 (defined in RFC 1163), and BGP-3
(defined in RFC 1267) are three earlier-released versions of BGP. The current BGP version is
BGP-4 defined in RFC 4271.
As an exterior routing protocol on the Internet, BGP is widely used among Internet Service
Providers (ISPs).
NOTE
Unless otherwise stated, BGP stated in this document refers to BGP-4.
Characteristics of BGP are as follows: l Different from the Internal Gateway Protocol (IGP) such as the Open Shortest Path First
(OSPF) and Routing Information Protocol (RIP), BGP is an Exterior Gateway Protocol
(EGP), which controls route advertisement and selects the optimal route between ASs rather than discover or calculate routes.
l BGP uses the Transport Control Protocol (TCP) with the port number being 179 as the transport layer protocol. The reliability of BGP is thus enhanced.
l BGP supports Classless Inter-Domain Routing (CIDR).
l BGP transmits only the updated routes when routes are being updated. This reduces the bandwidth occupied by BGP for route distribution. Therefore, BGP is applicable to the
Internet where a large number of routes are transmitted.
l BGP eliminates routing loops by adding AS path information to BGP routes.
l
BGP provides rich routing policies to flexibly select and filter routes.
l BGP can be easily extended and adapt to the development of networks.
BGP runs on the switch in either of the following modes: l Internal BGP (IBGP) l
External BGP (EBGP)
When BGP runs within an AS, it is called IBGP. When BGP runs between ASs, it is called
EBGP.
8.2 BGP Features Supported by the S9300
The system supports various BGP features, including load balancing, route summarization, route dampening, community, route reflector, confederation, MP-BGP, BFD for BGP, BGP GR, and
BGP NSR.
Main Route Attributes
l Origin attribute l AS_Path attribute l Next_Hop attribute
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
461
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 8 BGP Configuration l Multi-Exit-Discriminator (MED) attribute l Local_Pref attribute l Community attribute
Principles of Route Selection
On the S9300, when there are multiple active routes to the same destination, BGP selects routes according to the following principles:
1.
Prefers the route with the highest PreVal.
PrefVal is a Huawei-specific parameter. It is valid only on the device where it is configured.
2.
Prefers the route with the highest Local_Pref.
A route without Local_Pref is considered to have had the value set by using the default
local-preference command or to have a value of 100 by default.
3.
Prefers a locally originated route. A locally originated route takes precedence over a route learned from a peer.
Locally originated routes include routes imported by using the network command or the
import-route command, manually aggregated routes, and automatically summarized routes.
(1) A summarized route is preferred. A summarized route takes precedence over a nonsummarized route.
(2) A route obtained by using the aggregate command is preferred over a route obtained by using the summary automatic command.
(3) A route imported by using the network command is preferred over a route imported by using the import-route command.
4.
Prefers the route with the shortest AS_Path.
l The AS_CONFED_SEQUENCE and AS_CONFED_SET are not included in the
AS_Path length.
l An AS_SET counts as 1, no matter how many ASs are in the set.
l After the bestroute as-path-ignore command is run, the AS_Path attributes of routes are not compared in the route selection process.
5.
Prefers the route with the highest Origin type. IGP is higher than EGP, and EGP is higher than Incomplete.
6.
Prefers the route with the lowest Multi Exit Discriminator (MED).
l The MEDs of only routes from the same AS but not a confederation sub-AS are compared. MEDs of two routes are compared only when the first AS number in the
AS_SEQUENCE (excluding AS_CONFED_SEQUENCE) is the same for the two routes.
l A route without any MED is assigned a MED of 0, unless the bestroute med-none-as-
maximum command is run. If the bestroute med-none-as-maximum command is run, the route is assigned the highest MED of 4294967295.
l After compare-different-as-med command is run, the MEDs in routes sent from peers in different ASs are compared. Do not use this command unless it is confirmed that different ASs use the same IGP and route selection mode. Otherwise, a loop may occur.
l If the bestroute med-confederation command is run, MEDs are compared for routes that consist only of AS_CONFED_SEQUENCE. The first AS number in the
AS_CONFED_SEQUENCE must be the same for the routes.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
462
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 8 BGP Configuration l After the deterministic-med command is run, routes are not selected in the sequence in which routes are received.
7.
Prefers EBGP routes over IBGP routes.
EBGP is higher than IBGP, IBGP is higher than LocalCross, and LocalCross is higher than
RemoteCross.
If the ERT of a VPNv4 route in the routing table of a VPN instance on a PE matches the
IRT of another VPN instance on the PE, the VPNv4 route will be added to the routing table of the second VPN instance. This is called LocalCross. If the ERT of a VPNv4 route from a remote PE is learned by the local PE and matches the IRT of a VPN instance on the local
PE, the VPNv4 route will be added to the routing table of that VPN instance. This is called
RemoteCross.
8.
Prefers the route with the lowest IGP metric to the BGP next hop.
NOTE
Assume that load balancing is configured. If the preceding rules are the same and there are multiple external routes with the same AS_Path, load balancing will be performed based on the number of configured routes.
9.
Prefers the route with the shortest Cluster_List.
10. Prefers the route advertised by the switch with the smallest router ID.
NOTE
If routes carry the Originator_ID, the originator ID is substituted for the router ID during route selection. The route with the smallest Originator_ID is preferred.
11. Prefers the route learned from the peer with the smallest address if the IP addresses of peers are compared in the route selection process.
Routing Selection Policies for Load Balancing
In BGP, the next-hop address of a generated route may not be the address of the peer that is directly connected to the local switch. One common scenario is that the next hop is not changed when a route is advertised between IBGP peers. Therefore, before forwarding a packet, the switch must find a directly reachable address, through which the packet can reach the next hop specified in the routing table. In this process, the route to the directly reachable address is called a dependent route. BGP routes depend on these dependent routes for packet forwarding. The process of finding a dependent route based on the next-hop address is called route iteration.
The S9300 supports iteration-based BGP load balancing. If load balancing is configured for a dependent route (assume that there are three next-hop addresses), BGP generates the same number of next-hop addresses to forward packets. BGP load balancing based on iteration does not need to be configured by using commands. This feature is always enabled on the S9300.
BGP load balancing is different from IGP load balancing in the following implementation methods: l In IGPs, if there are different routes to the same destination address, an IGP calculates metrics of these routes based on its own routing algorithm and performs load balancing among the routes with the same metric.
l BGP does not have a routing algorithm. Therefore, BGP cannot determine whether to perform load balancing among routes based on explicit metrics. BGP, however, contains many route attributes, which have different priorities in route selection policies. Therefore,
BGP performs load balancing according to route selection policies. That is, load balancing
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
463
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 8 BGP Configuration is performed according to the configured maximum number of equal-cost routes only when all the routes have the same high preference.
NOTE
l By default, BGP performs load balancing only among the routes with the same AS_Path attribute. You can use the bestroute as-path-ignore command to configure BGP not to compare the AS_Path attribute of routes when performs load balancing.
l BGP load balancing is also applicable between ASs in a confederation.
Policies for BGP Route Advertisement
On the S9300, BGP advertises routes based on the following policies: l When there are multiple active routes, the BGP speaker advertises only the optimal route to its peer.
l The BGP speaker advertises only the preferred routes to its peer.
l The BGP speaker advertises the routes learned from EBGP peers to all BGP peers
(including EBGP peers and IBGP peers) except the peers that advertise these routes.
l The BGP speaker does not advertise the routes learned from IBGP peers to its IBGP peers.
l The BGP speaker advertises the routes learned from IBGP peers to its EBGP peers.
l The BGP speaker advertises all preferred BGP routes to the new peers when peer relationships are established.
Route Summarization
On a large-scale network, the BGP routing table is large. You can configure route summarization to reduce the size of the routing table.
Route summarization is the process of consolidating multiple routes into one single advertisement. After route summarization is configured, BGP advertises only the summarized route rather than all specific routes to its peers.
The S9300 supports automatic summarization and manual summarization. Manual summarization can be used to control attributes of the summarized route and determine whether to advertise its specific routes.
Route Dampening
Route dampening is a method of solving the problem of route instability. Route instability is reflected by route flapping. That is, a route in the routing table disappears and appears repeatedly.
If route flapping occurs, a routing protocol sends an Update message to its peers. After receiving this Update message, the peers recalculate routes and modify their routing tables. Frequent route flapping consumes a lot of bandwidth and CPU resources, even affecting the normal operation of the network.
In most cases, BGP is applicable to complex networks where routes change frequently. To avoid the impact of frequent route flapping, BGP suppresses unstable routes by using route dampening.
Synchronization Between IBGP and IGP
Synchronization between IBGP and IGP is a method of preventing external routes from being imported by error.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
464
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 8 BGP Configuration
If the synchronization function is configured, the IGP routing table is examined before an IBGP route is added to the routing table and advertised to EBGP peers. The IBGP route is added to the routing table and advertised to EBGP peers only when the IGP knows this IBGP route.
The synchronization function can be disabled in the following situations: l The local AS is not a transit AS.
l Full-mesh IBGP connections are established between all switches in the local AS.
NOTE
In the S9300, the synchronization function is disabled by default.
Peer Group
A peer group is a group of peers with the same policies. After a peer is added to a peer group, it inherits the configurations of this peer group. When the configurations of the peer group are changed, the configurations of peers in the peer group are changed accordingly.
On a large-scale BGP network, there are a large number of peers and most of them have the same policies. To configure these peers, you have to repeatedly use some commands. In such a case, you can simplify configurations by using the peer group.
Adding many peers to a peer group also speeds up route advertisement.
Community
The community attribute is a route attribute. It is transmitted between BGP peers and is not restricted by the AS. A peer group allows a group of peers to share the same policies, whereas the community allows a group of BGP routers in multiple ASs to share the same policies.
Before a BGP router advertises the route with the community attribute to other peers, it can change the community attribute of this route.
Besides well-known communities, you can use a community filter to filter self-defined extended community attributes to control routing policies in a more flexible manner.
Route Reflector
To ensure the routing synchronization between IBGP peers, you need to establish full-mesh connections between the IBGP peers. If there are n switches in an AS, n (n-1)/2 IBGP connections need to be established. When there are a large number of IBGP peers, network resources and
CPU resources are greatly consumed.
To solve this problem, route reflection is introduced. In an AS, one switch functions as a route reflector (RR) and other switches serve as the clients of the RR. The clients establish IBGP connections with the RR. The RR transmits or reflects routes among clients, and the clients do not need to establish BGP connections.
A BGP router that is neither an RR nor a client is a non-client. Full-mesh connections must be established between non-clients and an RR, and between all non-clients.
Confederation
Confederation is another method of dealing with increasing IBGP connections in an AS. It divides an AS into several sub-ASs. IBGP connections are established between IBGP peers within each sub-AS, and EBGP connections are established between sub-ASs.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
465
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
8 BGP Configuration
For BGP speakers outside a confederation, sub-ASs in the same confederation are invisible.
External devices do not need to know the topology of each sub-AS. The confederation ID is the
AS number that is used to identify the entire confederation.
The confederation has disadvantages. That is, if the switche needs to be reconfigured in a confederation, the logical typology changes accordingly.
On a large-scale BGP network, the RR and confederation can be used together.
Introduction to MP-BGP
Traditional BGP-4 manages only IPv4 routing information and has limitations in inter-AS routing when used in the applications of other network layer protocols such as IPv6.
To support multiple network layer protocols, the Internet Engineering Task Force (IETF) extends
BGP-4 to Multiprotocol Extensions for BGP-4 (MP-BGP). The current MP-BGP standard is
RFC 2858 (Multiprotocol Extensions for BGP-4).
MP-BGP is forward compatible. That is, the switches that support MP-BGP can communicate with the switches that do not support MP-BGP.
Extended Attributes of MP-BGP
Among BGP-4 packets, an Update packet carries three IPv4-related attributes: Network Layer
Reachability Information (NLRI), Next_Hop, and Aggregator. The Aggregator attribute contains the IP address of the BGP speaker that performs route summarization.
To support multiple types of network layer protocols, BGP-4 needs to carry network layer protocol information in the NLRI attribute and Next_Hop attribute. MP-BGP introduces two new route attributes: l Multiprotocol Reachable NLRI (MP_REACH_NLRI): It is used to advertise reachable routes and next hops.
l
Multiprotocol Unreachable NLRI (MP_UNREACH_NLRI): It is used to withdraw unreachable routes.
The two new attributes are optional non-transitive. Therefore, the BGP speakers that do not support the multiprotocol capability will ignore the two attributes, and do not advertise the information to peers.
Address Family
BGP uses address families to distinguish different network layer protocols. For the values of address families, see RFC 1700 (Assigned Numbers). The S9300 supports multiple MP-BGP extensions, such as VPN extension and IPv6 extension, which are configured in their respective address family views.
NOTE
This chapter does not describe the commands related to a specific application in the MP-BGP address family view.
For the configuration in the BGP IPv6 address family view, see the chapter "BGP4+ Configuration." For the application of MP-BGP in multicast, see the chapter "MBGP Configuration" in the Quidway S9300
Terabit Routing Switch Configuration Guide - IP Routing.
For the configuration in the BGP VPNv4 address family view, BGP VPN instance address family view, and BGP L2VPN address family view, see the Quidway S9300 Terabit Routing Switch Configuration
Guide - VPN.
Issue 01 (2011-10-26) 466
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 8 BGP Configuration
BFD for BGP
The S9300 supports Bidirectional Forwarding Detection (BFD) in IPv4 to provide fast link failure detection for BGP peer relationship.
BFD can rapidly detect faults on the links between BGP peers and report the faults to BGP, thus implementing fast convergence of BGP routes.
BGP GR
If BGP restarts, the peer relationship needs to be re-established and traffic forwarding is interrupted. After Graceful Restart (GR) is enabled, traffic interruption is avoided.
BGP Security
l The S9300 authenticates BGP peers by using MD5 and Key-Chain, preventing packet fraud or unauthorized packet modification.
l The Generalized TTL Security Mechanism (GTSM), which is a TTL security protection mechanism, is used to protect the BGP protocol against CPU utilization attacks. The GTSM checks whether the TTL value in the IP packet header is within a pre-defined value range.
In this manner, the GTSM can protect services above the IP layer, thus enhancing system security.
l The number of routes received from the BGP peer is limited to prevent the resources from
8.5.5 Configuring the Policy for Receiving BGP Routing
l The lengths of AS paths on the inbound interface and the outbound interface are limited.
The excess packets are discarded. See
8.4.8 Configuring the AS-Path Attribute
8.3 Configuring Basic BGP Functions
Configuring basic BGP functions is the prerequisite to building a BGP network.
8.3.1 Establishing the Configuration Task
Before configuring basic BGP functions, familiarize yourself with the applicable environment, complete the pre-configuration tasks, and obtain the data required for the configuration. This will help you complete the configuration task quickly and accurately.
Applicable Environment
This section describes how to configure basic BGP functions.
Because BGP uses TCP connections, you need to specify the IP address of the peer when configuring BGP. The BGP peer may not be the neighboring switch. The BGP peer relationship can also be established by using logical links. Loopback interface addresses are usually used to establish BGP connections to enhance the stability of these connections.
To configure BGP to advertise local routes and import default routes, see
and
Configuring BGP to Import Default Routes
Most commands in the BGP extended address family view are the same as those in the BGP view. The commands run in the extended address family view, however, take effect only in related applications.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
467
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 8 BGP Configuration
NOTE
l In this section, BGP and MP-BGP are not distinguished from each other. For the applications of commands, see the views of the commands.
l Commands in the BGP-IPv4 unicast address family view can be run in the BGP view, facilitating the configuration. These commands are described in the BGP-IPv4 unicast address family view in configuration files.
Pre-configuration Tasks
Before configuring basic BGP functions, complete the following task: l Configuring link layer protocol parameters and assigning IP addresses to interfaces to ensure that the link layer protocol of the interface is Up
Data Preparation
To configure basic BGP functions, you need the following data.
2
3
No.
1
Data
Local AS number and router ID
IPv4 address and AS number of a peer
Interface originating an Update message
8.3.2 Starting a BGP Process
Starting a BGP process is a prerequisite for configuring basic BGP functions. When starting a
BGP process, you need to specify the number of the AS that a device belongs to.
Context
Do as follows on the switch where a BGP connection needs to be established:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
bgp as-number
A BGP process is enabled and the BGP view is displayed.
Step 3 (Optional) Run:
router-id ipv4-address
The router ID is set.
Configuring or changing the router ID of BGP causes the BGP peer relationship between switches to be reset.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
468
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
8 BGP Configuration
TIP
To enhance network reliability, configuring a loopback interface address as the router ID is recommended.
If no router ID is set, BGP automatically selects the router ID in the system view as the router ID of BGP.
For the rule for selecting a router ID in the system view, see the Quidway S9300 Terabit Routing Switch
Command Reference.
----End
8.3.3 Configuring a BGP Peer
Devices can exchange BGP routing information only after BGP peers are configured and the
BGP peer relationship is established.
Procedure
l Configuring an IBGP peer
Do as follows on the switch where an IBGP connection needs to be established:
1.
Run:
system-view
The system view is displayed.
2.
Run:
bgp as-number
The BGP view is displayed.
3.
Run:
peer ipv4-address as-number as-number
The IP address of the peer and the number of the AS where the peer resides are specified.
The number of the AS where the specified peer resides should be the same as the local
AS number.
If the IP address of a specified peer is a loopback interface address or a sub-interface
address, you need to complete the task of
Configuring the Local Interface for a
to ensure that the peer relationship is correctly established.
4.
(Optional) Run:
peer { ipv4-address | group-name } description description-text
The description of a peer or a peer group is configured.
The descriptions are configured to simplify management.
l Configuring an EBGP peer
Do as follows on the switch where an EBGP connection needs to be established:
1.
Run:
system-view
The system view is displayed.
2.
Run:
bgp as-number
The BGP view is displayed.
Issue 01 (2011-10-26) 469
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
8 BGP Configuration
3.
Run:
peer ipv4-address as-number as-number
The IP address of the peer and the number of the AS where the peer resides are specified.
The number of the AS where the specified peer resides should be different from the local AS number.
If the IP address of a specified peer is a loopback interface address or a sub-interface
address, you need to complete the task of
Configuring the Local Interface for a
to ensure that the peer relationship is correctly established.
4.
Run:
peer { ipv4-address | group-name } ebgp-max-hop [ hop-count ]
The maximum number of hops for an EBGP connection is set. By default, the maximum number of hops for an EBGP is 1.
Generally, there must be a directly connected physical link between EBGP peers. If there is no such a link, you need to run the peer ebgp-max-hop command to allow
EBGP peers to establish TCP connections across multiple hops.
NOTE
When establishing the EBGP peer relationship by using loopback interfaces, you need to run the peer ebgp-max-hop command in which hop-count is set to be greater than or equal to 2.
Otherwise, the EBGP peer relationship cannot be established.
5.
(Optional) Run:
peer { ipv4-address | group-name } description description-text
The description of a peer or a peer group is configured.
The descriptions are configured to simplify management.
----End
8.3.4 (Optional) Configuring the Local Interface for a BGP
Connection
When establishing multiple peers between two devices through various links, you need to specify the local interface that is used for establishing a BGP session on the devices.
Context
When the interfaces whose IP addresses are used to establish peers are indirectly connected, do as follows on the switches:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
bgp as-number
Issue 01 (2011-10-26) 470
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 8 BGP Configuration
The BGP view is displayed.
Step 3 Run:
peer { ipv4-address | group-name } connect-interface interface-type interface-
number [ ipv4-source-address ]
The local interface and source address, which are used by BGP to establish a TCP connection, are specified.
By default, BGP uses the physical interface that is directly connected to the peer as the local interface of a TCP connection.
To improve the stability and reliability of a BGP connection, you can configure a loopback interface as the local interface of the BGP connection. In this manner, when there are redundant links on the network, the BGP connection is not torn down due to the failure of a certain interface or a link.
NOTE
When establishing multiple peers between two switches by using multiple links, run the peer connect-
interface command to specify the interface through which a BGP connection is established.
----End
8.3.5 Checking the Configuration
After basic BGP functions are configured, you can check BGP peer information.
Prerequisite
The configurations of basic BGP functions are complete.
Procedure
l Run the display tcp status command to check TCP connection information.
l Run the display bgp peer [ verbose ] command to check BGP peer information.
l Run the display bgp peer ipv4-address { log-info | verbose } command to check BGP peer information.
----End
8.4 Configuring BGP Route Attributes
BGP has many route attributes. By configuring these attributes, you can change BGP routing policies.
8.4.1 Establishing the Configuration Task
Before configuring BGP route attributes, familiarize yourself with the applicable environment, complete the pre-configuration tasks, and obtain the data required for the configuration. This will help you complete the configuration task quickly and accurately.
Applicable Environment
BGP has many route attributes. You can set these attributes to change BGP routing policies.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
471
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 8 BGP Configuration l BGP preference
Setting the BGP preference can affect route selection between BGP and another routing protocol.
l PrefVal
After the PrefVals of BGP routes are set, the route with the greatest PrefVal is selected when there are multiple routes to the same destination in the BGP routing table.
l Local_Pref
The Local_Pref attribute has the same function as the PrefVal attribute. The PrefVal attribute takes precedence over the Local_Pref attribute.
l
MED
After the MED attribute is set, EBGP peers select the route with the smallest MED for the incoming traffic of an AS.
l
Next_Hop
By setting the Next_Hop attribute, you can flexibly control BGP route selection.
l Community
The community attribute is used to simplify the management of routing policies. The management scope of a community is much greater than that of a peer group. The community can control routing policies of multiple BGP routers.
l AS_Path
The AS_Path attribute is used to prevent routing loops and control route selection.
Pre-configuration Tasks
Before configuring BGP route attributes, complete the following tasks: l Assigning an IP address to each interface to make the neighboring nodes reachable on the network layer l
8.3 Configuring Basic BGP Functions
Data Preparation
To configure BGP route attributes, you need the following data.
4
5
2
3
No.
Data
1 AS number
BGP preference
Local_Pref
MED
Name of the routing policy to be applied if the community is used
8.4.2 Configuring the BGP Preference
Setting the BGP preference can affect route selection between BGP and another routing protocol.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
472
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Context
Do as follows on the BGP router:
8 BGP Configuration
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
bgp as-number
The BGP view is displayed.
Step 3 Run:
ipv4-family unicast
The BGP IPv4 unicast address family view is displayed.
Step 4 Run:
preference { external internal local | route-policy route-policy-name }
The BGP preference is set.
BGP has the following types of routes: l Routes learned from EBGP peers l Routes learned from IBGP peers l Locally originated routes
Locally originated routes are the routes summarized by using commands, including the
summary automatic command for automatic summarization and the aggregate command for manual summarization.
You can set different preferences for the three types of routes.
You can also use a routing policy to set preferences for the specified routes that meet the matching rules. You can set the default preference for the routes that do not meet the matching rules.
NOTE
Currently, the peer route-policy command cannot be used to apply routing policies on peers to set the
BGP preference.
----End
8.4.3 Configuring the BGP Preferred Value for Routing Information
After preferred values are configured for routes, the route with the greatest preferred value is selected when multiple routes to the same destination exist in the BGP routing table.
Context
Do as follows on the BGP router:
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
473
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 8 BGP Configuration
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
bgp as-number
The BGP view is displayed.
Step 3 Run:
peer { group-name | ipv4-address } preferred-value value
The preferred value is set for a peer.
By default, the original preferred value of the route learned from a peer is 0.
----End
8.4.4 Configuring the Default Local_Pref Attribute
The Local_Pref attribute is used to select the optimal route for the outgoing traffic of an AS.
When a BGP router learns multiple routes to the same destination but with different next hops from different IBGP peers, the route with the highest Local_Pref is selected.
Context
Do as follows on the BGP router:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
bgp as-number
The BGP view is displayed.
Step 3 Run:
ipv4-family unicast
The BGP IPv4 unicast address family view is displayed.
Step 4 Run:
default local-preference preference
The default Local_Pref attribute is set for the local switch.
----End
8.4.5 Configuring the MED Attribute
The MED attribute is similar to the metric used by an IGP. After MED attributes are set, EBGP peers select the route with the smallest MED value for the incoming traffic of an AS.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
474
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 8 BGP Configuration
Procedure
Issue 01 (2011-10-26) l Setting the default MED of the local switch
Do as follows on the BGP router:
1.
Run:
system-view
The system view is displayed.
2.
Run:
bgp as-number
The BGP view is displayed.
3.
Run:
ipv4-family unicast
The BGP IPv4 unicast address family view is displayed.
4.
Run:
default med med
The default MED is set.
l Comparing the MEDs of routes from different ASs
Do as follows on the BGP router:
1.
Run:
system-view
The system view is displayed.
2.
Run:
bgp as-number
The BGP view is displayed.
3.
Run:
ipv4-family unicast
The BGP IPv4 unicast address family view is displayed.
4.
Run:
compare-different-as-med
The MEDs of routes from different ASs are compared.
Generally, a BGP router compares only the MEDs of routes from different peers in the same AS. After this command is used, you can allow BGP to compare the MEDs of routes from different ASs.
l Configuring the deterministic-MED
Do as follows on the BGP router:
1.
Run:
system-view
The system view is displayed.
2.
Run:
bgp as-number
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
475
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
8 BGP Configuration
The BGP view is displayed.
3.
Run:
deterministic-med
The deterministic-MED is enabled.
If this command is not configured, when an optimal route is to be selected from among routes that are received from different ASs and that carry the same prefix, the sequence in which routes are received is relevant to the result of route selection. After the command is configured, however, when an optimal route is to be selected from among routes that are received from different ASs and that carry the same prefix, routes are first grouped according to the leftmost AS in the AS_Path. Routes with the same leftmost AS are grouped together, and after comparison, an optimal route is selected for the group. The group optimal route is then compared with optimal routes from other groups to determine the final optimal route. This mode of route selection ensures that the sequence in which routes are received is irrelevant to the result of route selection.
l
Configuring the processing method when the MED is not set
Do as follows on the BGP router:
1.
Run:
system-view
The system view is displayed.
2.
Run:
bgp as-number
The BGP view is displayed.
3.
Run:
ipv4-family unicast
The BGP IPv4 unicast address family view is displayed.
4.
Run:
bestroute med-none-as-maximum
The MED is set to the maximum value if there is no MED in route attributes.
If this command is configured, BGP uses the maximum value of the MED if there is no MED in route attributes during route selection. If this command is not configured, the MED is 0.
l Comparing the MEDs of routes in a confederation
Do as follows on the BGP router:
1.
Run:
system-view
The system view is displayed.
2.
Run:
bgp as-number
The BGP view is displayed.
3.
Run:
ipv4-family unicast
476
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
8 BGP Configuration
The BGP IPv4 unicast address family view is displayed.
4.
Run:
bestroute med-confederation
The MEDs of routes in a confederation are compared.
----End
8.4.6 Configuring the Next_Hop Attribute
By setting the Next_Hop attribute, you can flexibly control BGP route selection.
Procedure
l Changing the next-hop address when advertising a route to an IBGP peer
Do as follows on the IBGP router:
1.
Run:
system-view
The system view is displayed.
2.
Run:
bgp as-number
The BGP view is displayed.
3.
Run:
ipv4-family unicast
The BGP IPv4 unicast address family view is displayed.
4.
Run:
peer { ipv4-address | group-name } next-hop-local
The address of the switch is set as the next-hop address when the switch advertises routes.
On certain networks, to ensure that an IBGP peer finds the correct next hop, you can configure the switch to change the next-hop address of a route to the address of the switch when the switch advertises the route to its IBGP peer. By default, the switch does not change the next-hop address when advertising a route to its IBGP peer.
NOTE
If BGP load balancing is configured, the local switch changes the next-hop address of a route to its own address when advertising the route to an IBGP peer group, regardless of whether the
peer next-hop-local command is configured.
l
Keeping the next-hop address unchanged when advertising a route learned from an IGP to an IBGP peer
Do as follows on the IBGP router that imports IGP routes:
1.
Run:
system-view
The system view is displayed.
2.
Run:
bgp as-number
Issue 01 (2011-10-26) 477
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
8 BGP Configuration
The BGP view is displayed.
3.
Run:
ipv4-family unicast
The BGP IPv4 unicast address family view is displayed.
4.
Run:
peer { ipv4-address | group-name } next-hop-invariable
The switch is configured to keep the next-hop address unchanged when advertising an imported IGP route to its peer.
By default, when the switch advertises an imported IGP route to its peer, it changes the next-hop address to the address of the interface connecting it to the peer.
l Keeping the next-hop address unchanged when advertising a route to an EBGP peer
Do as follows on the PE router:
1.
Run:
system-view
The system view is displayed.
2.
Run:
bgp as-number
The BGP view is displayed.
3.
Run:
ipv4-family vpnv4 [ unicast ]
The BGP VPNv4 address family view is displayed.
4.
Run:
peer { group-name | ipv4-address } next-hop-invariable
The PE router is configured to keep the next-hop address unchanged when advertising a route to an EBGP peer.
By default, PEs in different ASs establish EBGP peer relationships, and change the next-hop address when advertising routes.
l Next-hop iteration based on the routing policy
Do as follows on the BGP router:
1.
Run:
system-view
The system view is displayed.
2.
Run:
bgp as-number
The BGP view is displayed.
3.
Run:
ipv4-family unicast
The BGP IPv4 unicast address family view is displayed.
4.
Run:
nexthop recursive-lookup route-policy route-policy-name
478
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 8 BGP Configuration
Next-hop iteration based on the specified routing policy is configured.
By default, next-hop iteration based on the specified routing policy is not configured.
Next-hop iteration based on the routing policy can control the iterated route according to certain conditions. The route that fails to match the routing policy is ignored.
----End
8.4.7 Configuring BGP to Advertise the Community Attribute
The community attribute is used to simplify the management of routing policies. The management scope of a community is much greater than that of a peer group. The community attribute can control routing policies of multiple BGP routers.
Procedure
l
Configuring BGP to advertise the community attribute to peers
Do as follows on the BGP router:
1.
Run:
system-view
The system view is displayed.
2.
Run:
bgp as-number
The BGP view is displayed.
3.
Run:
ipv4-family unicast
The BGP IPv4 unicast address family view is displayed.
4.
Run the following command as required:
–
Run:
peer { ipv4-address | group-name } advertise-community
BGP is configured to advertise the standard community attribute to a peer or peer group.
By default, the community attribute is not advertised to any peer or peer group.
– Run:
peer { ipv4-address | group-name } advertise-ext-community
BGP is configured to advertise the extended community attribute to a peer or peer group.
By default, the extended community attribute is not advertised to any peer or peer group.
l Applying routing policies to the advertised routes
Do as follows on the BGP router:
1.
Run:
system-view
The system view is displayed.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
479
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 8 BGP Configuration
2.
Run:
bgp as-number
The BGP view is displayed.
3.
Run:
ipv4-family unicast
The BGP IPv4 unicast address family view is displayed.
4.
Run:
peer { ipv4-address | group-name } route-policy route-policy-name export
The outbound routing policy is configured.
NOTE
When configuring a BGP community, you need to use a routing policy to define the specific community attribute, and apply this routing policy when routes are advertised.
For the configuration of a routing policy, see
.
----End
8.4.8 Configuring the AS-Path Attribute
The AS_Path attribute is used to prevent routing loops and control route selection.
Procedure
l Allowing the Local AS Number to Be Repeated
Do as follows on the BGP router:
1.
Run:
system-view
The system view is displayed.
2.
Run:
bgp as-number
The BGP view is displayed.
3.
Run:
ipv4-family unicast
The BGP IPv4 unicast address family view is displayed.
4.
Run:
peer { ipv4-address | group-name } allow-as-loop [ number ]
The local AS number can be repeated.
Generally, BGP checks the AS_Path attribute of a route sent from the peer. If the
AS_Path attribute of the route contains the local AS number, BGP ignores this route to prevent route loops.
In special cases, you can use this command to allow the AS_Path attribute of a route sent from a peer to contain the local AS number. You can also set the number of times that the local AS number is repeated.
l Configuring BGP not to consider the AS_Path attribute as a route selection rule
Do as follows on the BGP router:
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
480
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 8 BGP Configuration
1.
Run:
system-view
The system view is displayed.
2.
Run:
bgp as-number
The BGP view is displayed.
3.
Run:
ipv4-family unicast
The BGP IPv4 unicast address family view is displayed.
4.
Run:
bestroute as-path-ignore
The AS_Path attribute is not considered as a route selection rule.
l Setting a fake AS number
Do as follows on the BGP router:
1.
Run:
system-view
The system view is displayed.
2.
Run:
bgp as-number
The BGP view is displayed.
3.
Run:
peer { ipv4-address | group-name } fake-as fake-as-number
A fake AS number is set.
The actual AS number is hidden after this command is run. EBGP peers in other ASs can learn only the fake AS number. That is, when peers in other ASs need to specify the number of the AS where the local peer resides, the specified AS number needs to be set as the fake AS number.
NOTE
This command applies only to EBGP peers.
l Substituting the AS number in the AS_Path attribute
Do as follows on the BGP router:
CAUTION
If the peer substitute-as command is configured improperly, routing loops occur.
Therefore, you need to configure this command with caution.
Issue 01 (2011-10-26)
1.
Run:
system-view
The system view is displayed.
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
481
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 8 BGP Configuration
2.
Run:
bgp as-number
The BGP view is displayed.
3.
Run:
ipv4-family vpn-instance vpn-instance-name
The BGP VPN instance view is displayed.
4.
Run:
peer { ipv4-address | group-name } substitute-as
The AS number in the AS_Path attribute is substituted.
After this command is run, if the AS_Path attribute of a route contains the AS number of the peer, you can substitute the local AS number for the AS number of the peer before advertising the route to the peer.
l
Configuring the AS_Path attribute to carry only the public AS number
Do as follows on the BGP router:
1.
Run:
system-view
The system view is displayed.
2.
Run:
bgp as-number
The BGP view is displayed.
3.
Run:
ipv4-family unicast
The BGP IPv4 unicast address family view is displayed.
4.
Run:
peer { ipv4-address | group-name } public-as-only
The AS_Path attribute is configured to carry only the public AS number.
Generally, the AS number ranges from 1 to 4294967295. The public AS number ranges from 1 to 64511, and from 65536 (such as 1.0 in the format of x.y) to
4294967295 (such as 65535.65535 in the format of x.y), and the private AS number ranges from 64512 to 65534. The AS number 65535 is reserved for special use.
The public AS number can be used on the Internet, and are managed and assigned by the Internet Assigned Number Authority (IANA). The private AS number cannot be advertised to the Internet and is used only in a routing domain.
Generally, a route carries an AS number (either public or private) when being advertised to a peer. In certain cases, however, the private AS number does not need to be advertised. Then you can configure the AS_Path attribute to carry only the public
AS number by using this command.
This command applies only to EBGP peers.
l Configuring the maximum number of AS numbers in the AS_Path attribute
Do as follows on the BGP router:
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
482
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 8 BGP Configuration
1.
Run:
system-view
The system view is displayed.
2.
Run:
bgp as-number
The BGP view is displayed.
3.
Run:
as-path-limit as-path-limit-num
The maximum number of AS numbers in the AS_Path attribute is set.
By default, the maximum number of AS numbers in the AS_Path attribute is 255.
After the as-path-limit command is configured, the switch checks whether the number of AS numbers in the AS_Path attribute of the incoming route exceeds the maximum value. If the number of AS numbers exceeds the maximum value, the switch discards the route. Therefore, if the maximum number of AS numbers in the AS_Path attribute is set too small, routes are lost.
l Disabling BGP from checking the first AS number in the AS_Path attribute in the Update message sent by an EBGP peer
Do as follows on the BGP router:
1.
Run:
system-view
The system view is displayed.
2.
Run:
bgp as-number
The BGP view is displayed.
3.
Run:
undo check-first-as
BGP is disabled from checking the first AS number in the AS_Path attribute in the
Update message sent by an EBGP peer.
By default, BGP checks the first AS number in the AS_Path attribute in the Update message sent by an EBGP peer. If the first AS number is the number of the AS where the EBGP peer resides, the Update message is accepted. Otherwise, the Update message is rejected, and the EBGP connection is torn down.
CAUTION
If the undo check-first-as command is configured, there is a greater possibility of routing loops. Therefore, use the command with caution.
Issue 01 (2011-10-26)
----End
After modifying configurations, you need to run the refresh bgp command.
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
483
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 8 BGP Configuration
8.4.9 Checking the Configuration
After BGP route attributes are configured, you can check information about route attributes.
Prerequisite
The configurations of BGP route attributes are complete.
Procedure
l Run the display bgp paths [ as-regular-expression ] command to check information about the AS_Path attribute.
l
Run the display bgp routing-table different-origin-as command to check the routes that have the same destination but different source ASs.
l Run the display bgp routing-table regular-expression as-regular-expression command to check the routes matching the regular expression of the AS.
l Run the display bgp routing-table [ network ] [ mask | mask-length ] [ longer-prefixes ] command to check information about the BGP routing table.
l
Run the display bgp routing-table community [ community-number | aa:nn ] &<1-29>
[ internet | no-advertise | no-export | no-export-subconfed ]
*
[ whole-match ] command to check routing information about the specified BGP community.
l Run the display bgp routing-table community-filter { { community-filter-name | basic-
community-filter-number } [ whole-match ] | advanced-community-filter-number } command to check the routes matching the specified BGP community filter.
----End
8.5 Configuring BGP Filters
By using routing policies, BGP can flexibly send and receive routes.
8.5.1 Establishing the Configuration Task
Before configuring BGP filters, familiarize yourself with the applicable environment, complete the pre-configuration tasks, and obtain the data required for the configuration. This will help you complete the configuration task quickly and accurately.
Applicable Environment
With the following powerful filters, BGP can flexibly send and receive routes.
l
Access list
BGP has two private access lists, namely, the AS_Path filter and community filter. These lists can be used to display the BGP running status and used in routing policies.
The AS_Path filter is used to match the AS_Path attribute in a BGP route and filter the routes that do not meet the matching condition. You can define multiple rules (permit or deny) for the same AS_Path filter.
The community filter lists a series of community attributes. The community attribute lists are classified into two types, that is, standard community lists and extended community lists.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
484
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 8 BGP Configuration l Route-policy
A route-policy is used to match certain routes or certain route attributes, and to change these attributes if certain matching conditions are met. The preceding lists can be used as the matching conditions.
A route-policy consists of multiple nodes. Each node contains the following clauses:
–
if-match clause: defines matching rules, namely, matching conditions to be met before a route matches a route-policy. The matching objects are some route attributes.
–
apply clause: specifies actions, namely, configuration commands to be run after the matching conditions specified by if-match clauses are met. The apply clauses can be used to change some route attributes.
l Controlling the received routes
BGP can filter the globally received routes or only the routes received from a certain peer or a peer group by using routing policies.
A BGP switch may be prone to service attacks. For example, a BGP switch may receive a large number of routes from neighbors, and thus a lot of resources are consumed. In this case, the administrator must limit the consumed resources according to network planning and capacity of the switch, regardless of whether malicious attacks or incorrect configurations result in too many BGP routes. BGP can control peers to limit the number of routes sent by peers.
l Resetting BGP connections
After changing a BGP routing policy, you need to reset a BGP connection to make the new configuration take effect. This operation, however, temporarily interrupts the BGP connection.
On the S9300, BGP supports the route-refresh capability. That is, after a routing policy is changed, the system can dynamically refresh the BGP routing table without interrupting
BGP connections.
If neighbors of the switch support the route-refresh capability, you can run the refresh
bgp command on the switch to manually perform soft reset on their BGP connections. The routing table of the switch is then refreshed.
If neighbors of the switch do not support the route-refresh capability, you can run the peer
keep-all-routes command on the switch to refresh the BGP routing table of the switch.
Pre-configuration Tasks
Before configuring BGP filters, complete the following task: l
Configuring Basic BGP Functions
Data Preparation
To configure BGP filters, you need the following data.
2
3
No.
Data
1 Community attribute value
ACL number
Route-policy name, node sequence number, and matching condition
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
485
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 8 BGP Configuration
No.
Data
4 Names of inbound and outbound routing policies
8.5.2 Configuring Related Access Lists
By configuring ACLs, you can filter the unrequired routes as required.
Procedure
l Configuring an AS_Path filter
Do as follows on the BGP router:
1.
Run:
system-view
The system view is displayed.
2.
Run:
ip as-path-filter as-path-filter-number { permit | deny } regular-
expression
An AS_Path filter is configured.
If the peer as-path-filter command is used to apply a routing policy to BGP routes, the routes that do not meet the matching conditions are filtered based on the AS_Path filter.
The AS_Path filter defines the matching conditions by using the regular expression.
The regular expression consists of the following parts:
– Metacharacter: defines matching conditions.
–
General character: defines matching objects.
Table 8-1 Metacharacter description
Metacharacter Description
\ Indicates an escape character.
.
*
Matches any single character except "\n", including spaces.
Indicates that the characters to its left are displayed 0 times or multiple consecutive times in the target object.
+
|
^
$
Indicates that the characters to its left are displayed once or multiple consecutive times in the target object.
Matches either expression it separates.
Indicates that the characters to its right must be displayed at the beginning of the target object.
Indicates that the characters to its left must be displayed at the end of the target object.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
486
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 8 BGP Configuration
Metacharacter
[xyz]
[^xyz]
[a-z]
[^a-z]
{n}
{n,}
{n,m}
Description
Matches any character in the square brackets.
Matches a single character that is not contained in the square brackets (The "^" is to the left of the character).
Matches any character within the specified range.
Matches any character that is not within the specified range.
The matching is displayed n times (n is a non-negative integer).
The matching is displayed at least n times (n is a non-negative integer).
The matching is displayed n to m times. m and n are nonnegative integers, and n is smaller than or equal to m. There is no space between n and m.
Issue 01 (2011-10-26)
For example, ^10 indicates that only the AS_Path attribute with the first value being
10 is matched. ^ specifies the beginning of a string character.
You can define multiple matching rules (permit or deny) for the same filter. During the matching, the relationship between these rules is "OR". That is, if a route meets one matching rule, the route passes this AS_Path filter.
NOTE
For details of the regular expression, see the chapter "Command Line Introduction" in the
Quidway S9300 Terabit Routing Switch Configuration Guide - Basic Configurations.
l Configuring the community filter
Do as follows on the BGP router:
1.
Run:
system-view
The system view is displayed.
2.
Run:
ip community-filter
The community filter is configured.
–
Run:
ip community-filter { basic comm-filter-name { permit | deny }
[ community-number | aa:nn ]
*
&<1-9> | basic-comm-filter-num { permit
| deny } [ community-number | aa:nn ]
*
&<1-16> } [ internet | no-export-
subconfed | no-advertise | no-export ]
*
The standard community filter is configured.
–
Run:
ip community-filter { advanced comm-filter-name | adv-comm-filter-num }
{ permit | deny } regular-expression
The advanced community filter is configured.
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
487
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 8 BGP Configuration l Configuring the extended community filter
Do as follows on the BGP router:
1.
Run:
system-view
The system view is displayed.
2.
Run:
ip extcommunity-filter extcomm-filter-number { deny | permit } { rt { as-
number:nn | ipv4-address:nn } } &<1-16>
The list of extended community filter is configured.
You can define many entries for the same extended community filter. The relationship between these entries is "OR". That is, when the route matches one entry in the list, it means that the route passes the attribute list.
----End
8.5.3 Configuring Related Routing Policies
By configuring routing policies, you can filter routes or set route attributes.
Context
NOTE
This section describes only the routing policies related to BGP. For details of the route-policy, refer to
Procedure
l Creating a Routing Policy
Do as follows on the BGP router:
1.
Run:
system-view
The system view is displayed.
2.
Run:
route-policy route-policy-name { permit | deny } node node
A node of a route-policy is created, and the route-policy view is displayed.
l Configuring the if-match Clause
Do as follows on the BGP router:
1.
Run:
system-view
The system view is displayed.
2.
Run:
route-policy route-policy-name { permit | deny } node node
The route-policy view is displayed.
3.
Run the following command as required:
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
488
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
8 BGP Configuration
– Run:
if-match as-path-filter as-path-filter-number &<1-16>
The AS-Path attribute of the BGP route is matched.
–
Run:
if-match community-filter { basic-comm-filter-num [ whole-match ] | adv-
comm-filter-num }* &<1-16>
if-match community-filter comm-filter-name [ whole-match ]
The community attribute of the BGP route is matched.
–
Run:
if-match extcommunity-filter extcomm-filter-number &<1-16>
The BGP extended community attribute is matched.
You can run the commands in Step 3 regardless of the sequence. There may be no if-
match clause or multiple if-match clauses in a node.
NOTE
l For the same node of a Route-Policy, the relationship between if-match clauses is AND.
That is, only when the route meets all the matching rules, you can perform the actions defined by the apply clauses.
l If the if-match clause is not specified, all the routes can pass the filtering of the node.
l Configuring the apply Clause
Do as follows on the BGP router:
1.
Run:
system-view
The system view is displayed.
2.
Run:
route-policy route-policy-name { permit | deny } node node
The route-policy view is displayed.
3.
To configure the apply clause of the current node for the routing policy, run the following command:
–
Run:
apply as-path as-number
The specified AS number is substituted or added to the AS-Path of BGP.
–
Run:
apply comm-filter comm-filter-number delete
The specified BGP community attribute is deleted.
TIP
The apply comm-filter delete command is used to delete the community attribute according to the specified value in the community filter. Each community filter defined by the ip community-filter command contains only one community attribute. If you want to delete several community attributes, use the ip community-filter command several times.
If multiple community attributes are configured under the same filter number, these attributes cannot be deleted. For details of the example, refer to the Quidway S9300 Terabit
Routing Switch Command Reference.
– Run:
apply community none
The community attribute of a BGP route is deleted.
489
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 8 BGP Configuration
– Run:
apply community { { community-number | aa:nn } &<1-32> | internet | no-
advertise | no-export | no-export-subconfed }
*
[ additive ]
The community attribute of a BGP route is set.
–
Run:
apply extcommunity { rt { as-number:nn | ipv4-address:nn } } &<1-16>
[ additive ]
The BGP extended community attribute is set.
–
Run:
apply local-preference preference
The local preference of a BGP route is set.
– Run:
apply origin { igp | egp as-number | incomplete }
The Origin attribute of a BGP route is set.
– Run:
apply preferred-value preferred-value
The PrefVal of a BGP route is set.
–
Run:
apply dampening half-life-reach reuse suppress ceiling
Dampening parameters of EBGP routes are set.
You can run the commands in Step 3 regardless of the sequence.
----End
8.5.4 Configuring the Policy for Advertising BGP Routing
Information
After the policy for advertising routes is configured, only the routes that match the policy can be added to the local BGP routing table and then advertised to BGP peers.
Procedure
l Configuring BGP to Filter the Globally Advertised Routes
Do as follows on the BGP router:
1.
Run:
system-view
The system view is displayed.
2.
Run:
bgp as-number
The BGP view is displayed.
3.
Run:
ipv4-family unicast
The BGP IPv4 unicast address family view is displayed.
4.
Run:
filter-policy { acl-number | acl-name acl-name | ip-prefix ip-prefix-
name } export [ protocol [ process-id ] ]
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
490
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 8 BGP Configuration
The advertised routes are filtered.
After BGP filters the imported routes, only the routes that meet the matching rules are added to the local BGP routing table and advertised to BGP peers.
If protocol is specified, you can filter the routes of a specific routing protocol. If
protocol is not specified, all the routes to be advertised are filtered, including the routes imported and the local routes advertised with the network command.
NOTE
If the ACL is used in the filter-policy command and no VPN instance is specified in the ACL rules, BGP filters routes in all the address family views, including routes of the public network and the private network. If a VPN instance is specified, BGP filters data traffic from this VPN instance rather than the routes.
l Applying a Policy to the Routes Advertised by Specified BGP Peers
Do as follows on the BGP router:
1.
Run:
system-view
The system view is displayed.
2.
Run:
bgp as-number
The BGP view is displayed.
3.
Run:
ipv4-family unicast
The BGP IPv4 unicast family view is displayed.
4.
Run:
peer { ipv4-address | group-name } route-policy route-policy-name export
The routing policy applied when routes are advertised is configured.
NOTE
The routing policy applied in the peer route-policy export command does not support a certain interface as one of the matching rules. That is, the routing policy does not support the if-match
interface command.
l Applying a Filter to the Routes Advertised by Specified BGP Peers
Do as follows on the BGP router:
1.
Run:
system-view
The system view is displayed.
2.
Run:
bgp as-number
The BGP view is displayed.
3.
Run:
ipv4-family unicast
The BGP IPv4 unicast family view is displayed.
4.
Run the following command as required:
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
491
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 8 BGP Configuration
– Run:
peer { ipv4-address | group-name } filter-policy { acl-number | acl-
name acl-name } export
BGP is configured to filter routes according to the ACL.
– Run:
peer { ipv4-address | group-name } as-path-filter as-path-filter-
number export
BGP is configured to filter routes according to the AS-Path filter.
–
Run:
peer { ipv4-address | group-name } ip-prefix ip-prefix-name export
BGP is configured to filter routes according to the IP prefix list.
The members of a peer group and the peer group can use different outbound routing policies. That is, each peer group can select its policy when advertising routes.
----End
8.5.5 Configuring the Policy for Receiving BGP Routing
Information
Only the routes that match the policy for receiving routes can be received by BGP and added to the routing table.
Procedure
l Configuring BGP to Filter All the Received Routes
Do as follows on the BGP router:
1.
Run:
system-view
The system view is displayed.
2.
Run:
bgp as-number
The BGP view is displayed.
3.
Run:
ipv4-family unicast
The BGP IPv4 unicast address family view is displayed.
4.
Run:
filter-policy { acl-number | acl-name acl-name | ip-prefix ip-prefix-
name } import
All the received routes are filtered.
The routes received by BGP are filtered. Only those routes that meet matching rules are received by BGP and added to the routing table.
l Applying a Routing Policy to the Routes Received by Specified Peers
Do as follows on the BGP router:
1.
Run:
system-view
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
492
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 8 BGP Configuration
The system view is displayed.
2.
Run:
bgp as-number
The BGP view is displayed.
3.
Run:
ipv4-family unicast
The BGP IPv4 unicast address family view is displayed.
4.
Run:
peer { ipv4-address | group-name } route-policy route-policy-name import
A routing policy is applied to the received routes.
NOTE
The routing policy applied in the peer route-policy import command does not support a certain interface as one of the matching rules. That is, the routing policy does not support the if-match
interface command.
l
Applying a Filter to the Routes Received by Specified Peers
Do as follows on the BGP router:
1.
Run:
system-view
The system view is displayed.
2.
Run:
bgp as-number
The BGP view is displayed.
3.
Run:
ipv4-family unicast
The BGP IPv4 unicast address family view is displayed.
4.
Run the following command as required:
–
Run:
peer { ipv4-address | group-name } filter-policy { acl-number | acl-
name acl-name } import
BGP is configured to filter routes according to the ACL.
– Run:
peer { ipv4-address | group-name } as-path-filter as-path-filter-
number import
BGP is configured to filter routes according to the AS-Path filter.
–
Run:
peer { ipv4-address | group-name } ip-prefix ip-prefix-name import
BGP is configured to filter routes according to the IP prefix list.
The members of a peer group and the peer group can use different outbound policies to filter routes. That is, each peer group can select its policy when receiving routes.
l Limiting the Number of Routes Received by a Peer
Do as follows on the BGP router:
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
493
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 8 BGP Configuration
1.
Run:
system-view
The system view is displayed.
2.
Run:
bgp as-number
The BGP view is displayed.
3.
Run:
peer { group-name | ipv4-address } route-limit limit [ percentage ]
[ alert-only | idle-forever | idle-timeout times ]
The number of routes received by a peer or peer group is set.
The command can be used to control the number of routes received from a peer. You can configure specific parameters as required to control BGP after the number of the routes received from a peer exceeds the threshold.
–
alert-only: The peer relationship is not interrupted. The peer does not receive any routes that exceed the threshold, and an alarm is generated and recorded in the log.
– idle-forever: The peer relationship is interrupted. The switch does not retry setting up a connection. An alarm is generated and recorded in the log. Run the display
bgp peer [ verbose ] command, you can view that the status of the peer is Idle. If you want to restore the BGP connection, run the reset bgp command.
– idle-timeout: The peer relationship is interrupted. The switch retries setting up a connection after the timer expires. An alarm is generated and recorded in the log.
Run the display bgp peer [ verbose ] command. You can view that the status of the peer is Idle. If you want to restore the BGP connection before the timer expires, run the reset bgp command.
– If the three parameters are not set, the peer relationship is disconnected. The switch retries setting up a connection after 30 seconds. An alarm is generated and recorded in the log.
----End
8.5.6 Configuring BGP Soft Resetting
When routing policies are changed, the system can refresh the BGP routing table dynamically without interrupting BGP connections.
Procedure
l Enabling the Route-Refresh Capability
Do as follows on the BGP router:
1.
Run:
system-view
The system view is displayed.
2.
Run:
bgp as-number
The BGP view is displayed.
3.
Run:
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
494
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
peer { ipv4-address | group-name } capability-advertise { route-refresh |
4-byte-as | conventional }
The Route-Refresh capability is enabled.
If the Route-Refresh capability is enabled on all BGP routers, the local router advertises Route-Refresh messages to its peer if the BGP routing policy changes. Upon receiving this message, the peer sends the message to the local switch again. In this case, the BGP routing table is dynamically refreshed and the new policy is applied without interrupting BGP connections.
l Keeping All the Routing Updates of the Peers
Do as follows on the BGP router:
1.
Run:
system-view
The system view is displayed.
2.
Run:
bgp as-number
The BGP view is displayed.
3.
Run:
ipv4-family unicast
The BGP IPv4 unicast address family view is displayed.
4.
Run:
peer { ipv4-address | group-name } keep-all-routes
All the routing updates of the peer are kept.
After this command is used, all routing updates of the specified peer are kept regardless of whether the filtering policy is used. When BGP connections are soft reset, this information can be used to generate BGP routes.
l
Soft Resetting BGP Connections
Do as follows on the BGP router:
1.
Run:
refresh bgp [ vpn-instance vpn-instance-name | vpnv4 ] { all | ipv4-
address | group group-name | external | internal } { export | import }
BGP connections are soft reset.
Run the refresh bgp command in the user view.
----End
8.5.7 Checking the Configuration
After BGP filters are configured, you can check the routes that match the specified filter.
Prerequisite
8 BGP Configuration
The configurations of BGP filters are complete.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
495
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Procedure
8 BGP Configuration l Run the display bgp network command to check the routes advertised by BGP.
l Run the display bgp routing-table as-path-filter as-path-filter-number command to check the routes matching the specified AS-path filter.
l Run the display bgp routing-table community-filter { { community-filter-name | basic-
community-filter-number } [ whole-match ] | advanced-community-filter-number } command to check the routes matching the specified BGP community attribute filter.
l
Run the display bgp routing-table peer ipv4-address { advertised-routes | received-
routes } [ statistics ] command to check the routes advertised or received by BGP peers.
----End
8.6 Controlling the Advertisement of BGP Routing
Information
BGP can perform routing policies on or filter only the routes to be advertised to a certain peer.
8.6.1 Establishing the Configuration Task
Before controlling the advertisement of BGP routes, familiarize yourself with the applicable environment, complete the pre-configuration tasks, and obtain the required data. This can help you complete the configuration task quickly and accurately.
Applicable Environment
l BGP route aggregation
In medium or large BGP networks, route aggregation needs to be configured when the routes are advertised to the peers. This reduces the size of the routing table. BGP supports automatic aggregation and manual aggregation.
l Controlling the advertised routes
BGP can filter or perform routing policies on only the routes advertised by a certain peer or a peer group.
Pre-configuration Tasks
Before controlling BGP route advertisement, complete the following task: l
8.3 Configuring Basic BGP Functions
Data Preparation
To control the advertisement of BGP routing information, you need the following data.
No.
Data
1 Aggregation mode and route aggregated
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
496
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 8 BGP Configuration
8.6.2 Configuring BGP to Advertise Local Routes
The local routes to be advertised must be in the local IP routing table. You can use routing policies to control the routes to be advertised more flexibly.
Context
Do as follows on the BGP router:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
bgp as-number
The BGP view is displayed.
Step 3 (Optional) Run:
ipv4-family unicast
The BGP IPv4 unicast address family view is displayed.
By default, the command is used in the IPv4 unicast address family view.
Step 4 Run:
network ipv4-address [ mask | mask-length ] [ route-policy route-policy-name ]
BGP is configured to advertise the exactly-matched local routes.
To be specific, the command can be used to advertise the routes only with the exactly-matched address prefix and mask. If the mask is not designated, the routes are exactly matched based on the natural network segment.
The local routes to be advertised should be in the local IP routing table. You can use routing policies to control the routes to be advertised more flexibly.
----End
8.6.3 Configuring BGP Route Aggregation
By configuring route aggregation, you can reduce the size of the routing table of a peer. BGP supports automatic aggregation and manual aggregation.
Procedure
l Configuring Automatic Aggregation
Do as follows on the BGP router:
1.
Run:
system-view
The system view is displayed.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
497
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 8 BGP Configuration
2.
Run:
bgp as-number
The BGP view is displayed.
3.
Run:
ipv4-family unicast
The BGP IPv4 view is displayed.
4.
Run:
summary automatic
Automatic aggregation of the subnet routes is configured.
The command is used to aggregate the routes imported by BGP. These routes can be direct routes, static routes, RIP routes, OSPF routes, or IS-IS routes. The command, however, is invalid for the routes imported with the network command.
l
Configuring Manual Aggregation
Do as follows on the BGP router:
1.
Run:
system-view
The system view is displayed.
2.
Run:
bgp as-number
The BGP view is displayed.
3.
Run:
ipv4-family unicast
The BGP IPv4 unicast address family view is displayed.
4.
Run:
aggregate ipv4-address { mask | mask-length } [ as-set | attribute-policy
route-policy-name1 | detail-suppressed | origin-policy route-policy-name2
| suppress-policy route-policy-name3 ] *
Manual route aggregation is configured.
Manual aggregation is valid for the entries in the local BGP routing table. For example, if 10.1.1.1/24 does not exist in the BGP routing table, BGP does not advertise the aggregated route after the aggregate 10.1.1.1 16 command is used to aggregate routes.
You can apply multiple policies and configure the route attributes through manual aggregation.
----End
8.6.4 Configuring a Switch to Advertise Default Routes to Its Peer
A router sends a default route with the local address being the next hop to the specified peer, regardless of whether there are default routes in the local routing table.
Context
Do as follows on the BGP router:
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
498
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
bgp as-number
The BGP view is displayed.
Step 3 Run:
ipv4-family unicast
The BGP IPv4 unicast address family view is displayed.
Step 4 Run:
peer { group-name | ipv4-address } default-route-advertise [ route-policy route-
policy-name ] [ conditional-route-match-all { ipv4-address1 { mask1 | mask-
length1 } } &<1-4> | conditional-route-match-any { ipv4-address2 { mask2 | mask-
length2 } } &<1-4> ]
The default route is sent to its peer or peer group.
NOTE
After the peer default-route-advertise command is used, the switch sends a default route with the local address as the next hop to the specified peer, regardless of whether there are default routes in the routing table.
----End
8.6.5 Checking the Configuration
After the advertisement of BGP routes is controlled, you can check the advertised routes that match the specified filter.
Prerequisite
8 BGP Configuration
The configurations of controlling the advertisement of BGP routing information are complete.
Procedure
l Run the display bgp network command to check the routes advertised by BGP.
l
Run the display bgp routing-table cidr command to check the routes of CIDR.
l Run the display bgp routing-table peer ipv4-address { advertised-routes | received-
routes } [ statistics ] command to check the routes advertised and received by BGP peers.
----End
8.7 Controlling the Import of Routing Information
Importing routes of other routing protocols can enrich the BGP routing table. When importing
IGP routes, BGP can filter the routes according to different routing protocols.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
499
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 8 BGP Configuration
8.7.1 Establishing the Configuration Task
Before controlling the import of routes, familiarize yourself with the applicable environment, complete the pre-configuration tasks, and obtain the required data. This can help you complete the configuration task quickly and accurately.
Applicable Environment
BGP can send internal routes to its neighboring ASs, but it does not discover internal routes by itself. Instead, it imports IGP routes to the BGP routing table and advertises the BGP routing table to the peers. When importing IGP routes, BGP can filter routes according to the types of routing protocol.
Pre-configuration Tasks
Before controlling the import of routes, complete the following task: l
Configuring Basic BGP Functions
Data Preparation
None.
8.7.2 Configuring BGP to Import Default Routes
Only the default routes that exist in the local routing table can be imported.
Context
Do as follows on the BGP router:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
bgp as-number
The BGP view is displayed.
Step 3 Run:
ipv4-family unicast
The BGP IPv4 unicast address family view is displayed.
Step 4 Run:
default-route imported
BGP is configured to import default routes.
----End
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
500
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 8 BGP Configuration
8.7.3 Configuring BGP to Import Routes
BGP can import the routes of other routing protocols. When the routes of dynamic routing protocols need to be imported, you need to specify the process ID of the protocol. Using routing policies can flexibly import required routes.
Context
Do as follows on the BGP router:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
bgp as-number
The BGP view is displayed.
Step 3 Run:
ipv4-family unicast
The BGP IPv4 unicast address family view is displayed.
Step 4 Run:
import-route protocol [ process-id ] [ med med | route-policy route-policy-name ]
*
BGP is configured to import routes discovered by other protocols.
NOTE
When the type of an imported route is IS-IS, OSPF, or RIP, you must specify the process ID.
If the default-route imported command is not used, the default routes cannot be imported when you run the import-route command to import routes of other protocols.
----End
8.7.4 Checking the Configuration
After the import of routes is controlled, you can check the imported routes that match the specified filter.
Prerequisite
The configurations of controlling the import of routing information are complete.
Procedure
l Run the display bgp routing-table as-path-filter as-path-filter-number command to check the routes matching the specified AS-Path filter.
l Run the display bgp routing-table cidr command to check the routes of CIDR.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
501
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 8 BGP Configuration l Run the display bgp routing-table community-filter { { community-filter-name | basic-
community-filter-number } [ whole-match ] | advanced-community-filter-number } command to check the routes matching the specified BGP community attribute filter.
----End
8.8 Configuring BGP Route Dampening
By configuring BGP route dampening, you can suppress unstable BGP routes.
8.8.1 Establishing the Configuration Task
Before configuring BGP route dampening, familiarize yourself with the applicable environment, complete the pre-configuration tasks, and obtain the required data. This can help you complete the configuration task quickly and accurately.
Applicable Environment
BGP dampening can suppress unstable routes. Thus, BGP does not add unstable routes to the routing table, and consequently no unstable route is advertised to other BGP peers.
Pre-configuration Tasks
Before configuring BGP route dampening, complete the following task: l
Configuring Basic BGP Functions
Data Preparation
To configure BGP route dampening, you need the following data.
No.
1
Data
Various parameters of dampening, including half-life of a reachable route, threshold for releasing the suppressed routes, threshold for suppressing routes, and upper threshold of the penalty
8.8.2 Configuring BGP Route Dampening
BGP route dampening can improve network stability. You can flexibly use routing policies for route dampening.
Context
Do as follows on the BGP router:
Procedure
Step 1 Run:
system-view
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
502
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 8 BGP Configuration
The system view is displayed.
Step 2 Run:
bgp as-number
The BGP view is displayed.
Step 3 Run:
ipv4-family unicast
The BGP IPv4 unicast family view is displayed.
Step 4 Run:
dampening [ half-life-reach reuse suppress ceiling | route-policy route-policy-
name ]
*
Parameters are set for BGP route dampening.
When you configure BGP route dampening, the values of reuse, suppress, and ceiling should meet the relationship of reuse<suppress<ceiling.
The dampening command is applicable only to the EBGP routes.
----End
8.8.3 Checking the Configuration
After BGP route dampening is configured, you can check BGP suppressed routes, parameters of BGP route dampening, and flapped routes.
Prerequisite
The configurations of BGP route dampening are complete.
Procedure
l Run the display bgp routing-table dampened command to check BGP dampened routes.
l Run the display bgp routing-table dampening parameter command to check parameters of BGP route dampening.
l Run the display bgp routing-table flap-info [ regular-expression as-regular-
expression | as-path-filter as-path-filter-number | network-address [ { mask | mask-
length } [ longer-match ] ] ] command to check statistics of BGP flapped routes.
----End
8.9 Configuring Parameters of a BGP Peer Connection
By setting parameters of a BGP peer connection, you can adjust and optimize the BGP network performance.
8.9.1 Establishing the Configuration Task
Before configuring BGP connection parameters, familiarize yourself with the applicable environment, complete the pre-configuration tasks, and obtain the required data. This will help you complete the configuration task quickly and efficiently.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
503
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 8 BGP Configuration
Applicable Environment
After a BGP connection is established between peers, the peers periodically send Keepalive messages to each other. If the switch does not receive any Keepalive message or any other types of messages from the peer within the specified holdtime, the BGP connection is considered closed.
After the switch establishes a BGP connection with its peer, the two devices negotiate the holdtime. The smaller of the holdtime values of the two devices becomes the negotiated holdtime. If the negotiation result is 0, no Keepalive message is transmitted and the holdtime is not detected.
If the timer value changes, the BGP connection may be interrupted for a short time because the switch and its peer must renegotiate the timer value.
Pre-configuration Tasks
Before configuring BGP connection parameters, complete the following task: l
Configuring Basic BGP Functions
Data Preparation
To configure BGP connection parameters, you need the following data.
No.
Data
1 Values of BGP timers
2 Interval for sending Update packets
8.9.2 Configuring BGP Timers
Configuring timers properly can improve network performance. Changing the values of BGP timers will interrupt the peer relationship.
Context
CAUTION
If the values of the timers change after the timer command or the peer timer command is run, the BGP connection between switches is interrupted. So, confirm the action before you use the command.
Procedure
Issue 01 (2011-10-26) l Configuring the Global Timer
Do as follows on the BGP switch:
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
504
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 8 BGP Configuration
1.
Run:
system-view
The system view is displayed.
2.
Run:
bgp as-number
The BGP view is displayed.
3.
Run:
timer keepalive keepalive-time hold hold-time
The BGP timers are configured.
The proper maximum interval for sending Keepalive messages is one third of the hold time and is not less than one second. Thus, if the hold time is not set to 0, the lifetime should be at least 3 seconds.
By default, the lifetime is 60s and the hold time is 180s.
NOTE
Setting the hold interval of a BGP peer to be longer than 20s is recommended. If the hold interval of a BGP peer is shorter than 20s, the session may be closed.
Note the following when you set the values of keepalive-time and hold-time:
–
The lifetime and hold time cannot be 0 at the same time. Otherwise, the BGP timer becomes invalid. That is, BGP does not detect faults on the link according to the timer.
–
The hold time is much greater than that of the lifetime, such as, timer keepalive
1 hold 65535. If the hold time is too long, the faults on the link cannot be detected timely.
After peer relationships are set up, the actual lifetime and hold time are negotiated by both peers. The smaller hold time contained in Open messages of both peers is used as the actual hold time. The smaller value between one third of the hold time and the configured lifetime is used as the actual lifetime.
l Configuring the Peer Timer
Do as follows on the BGP switch:
1.
Run:
system-view
The system view is displayed.
2.
Run:
bgp as-number
The BGP view is displayed.
3.
Run:
peer { ipv4-address | group-name } timer keepalive keepalive-time hold
hold-time
The lifetime and the hold time are set for a peer or a peer group.
For the relationship between the lifetime and hold time, see
.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
505
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 8 BGP Configuration
The peer timer takes precedence over the global timer.
----End
8.9.3 Configuring the Interval for Sending Update Packets
When a route changes, a switch sends an Update packet to notify its peer. If a route changes frequently, to prevent the switch from sending Update packets for every change, you can set the interval for sending Update packets for changes of this route.
Context
Do as follows on the BGP switch:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
bgp as-number
The BGP view is displayed.
Step 3 Run:
peer { ipv4-address | group-name } route-update-interval interval
The interval for sending Update messages is set.
----End
8.9.4 Enabling Fast Reset of EBGP Connections
After quick resetting of EBGP connections is enabled, BGP rapidly detects the failure on an
EBGP link and then resets the BGP connection on the interface immediately.
Context
Do as follows on the BGP switch:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
bgp as-number
The BGP view is displayed.
Step 3 Run:
ebgp-interface-sensitive
Fast reset is enabled for EBGP connections.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
506
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
8 BGP Configuration l After this function is enabled, BGP rapidly detects the failure on an EBGP link and then resets BGP connections on the interface immediately.
l After this function is disabled, the repeated establishment and deletion of the BGP session, which is caused by route flapping, is prevented. This saves the network bandwidth.
----End
8.9.5 Checking the Configuration
After parameters of a BGP peer connection are configured, you can check BGP peers and peer groups.
Prerequisite
The configurations of a BGP peer connection are complete.
Procedure
l Run the display bgp peer [ verbose ] command to check BGP peers.
l Run the display bgp group [ group-name ] command to check BGP peer groups.
----End
Example
Run the display bgp peer verbose command in the system view. You can view the configured
Keepalive period, holdtime, and interval at which Update packets are sent.
<Quidway> display bgp peer verbose
BGP Peer is 10.1.1.1, remote AS 100
Type: IBGP link
BGP version 4, Remote router ID 1.1.1.1
Update-group ID: 0
BGP current state: Established, Up for 00h00m05s
BGP current event: RecvKeepalive
BGP last state: OpenConfirm
BGP Peer Up count: 2
Received total routes: 0
Received active routes total: 0
Advertised total routes: 0
Port: Local - 55219 Remote - 179
Configured: Active Hold Time: 100 sec Keepalive Time:30 sec
Received : Active Hold Time: 180 sec
Negotiated: Active Hold Time: 100 sec Keepalive Time:30 sec
Peer optional capabilities:
Peer supports bgp multi-protocol extension
Peer supports bgp route refresh capability
Peer supports bgp 4-byte-as capability
Address family IPv4 Unicast: advertised and received
Received: Total 2 messages
Update messages 0
Open messages 1
KeepAlive messages 1
Notification messages 0
Refresh messages 0
Sent: Total 2 messages
Update messages 0
Open messages 1
KeepAlive messages 1
Notification messages 0
Refresh messages 0
Issue 01 (2011-10-26) 507
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Authentication type configured: None
Last keepalive received: 2010/11/17 15:51:57 UTC-08:00
Minimum route advertisement interval is 20 seconds
Optional capabilities:
Route refresh capability has been enabled
4-byte-as capability has been enabled
Peer Preferred Value: 0
Routing policy configured:
No routing policy is configured
8 BGP Configuration
8.10 Configuring BFD for BGP
By configuring BFD for BGP, you can provide a fast fault detection mechanism for BGP, and thus speed up network convergence.
8.10.1 Establishing the Configuration Task
Before configuring BFD for BGP, familiarize yourself with the applicable environment, complete the pre-configuration tasks, and obtain the required data. This can help you complete the configuration task quickly and accurately.
Applicable Environment
BGP periodically sends Keepalive messages to the peer to detect faults on the neighbor. The detection, however, lasts more than one second. When the data transmission rate reaches the level of G bit/s, such a slow detection will cause a large amount of data to be lost. As a result, the requirement for high reliability of carrier-class networks cannot be met.
Therefore, BFD for BGP is introduced to fast detect faults on the links between BGP peers. This speeds up the network convergence.
Pre-configuration Task
Before configuring BFD for BGP, complete the following tasks: l Configuring link layer protocol parameters and assigning IP addresses to the interfaces to ensure that the status of the link layer protocol of the interface is Up l
Configuring Basic BGP Functions
Data Preparation
To configure BFD for BGP, you need the following data.
No.
Data
1 Type and number of the interface on which BFD is enabled
2 Related BFD detection parameters, including the minimum interval and the maximum interval for receiving BFD control packets, and the detection multiplier
8.10.2 Configuring BFD for BGP in the Public Network Instance
By configuring BFD for BGP, you can fast detect the BGP route status. A BFD session can be established only when two BFD peers are in the Established state.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
508
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 8 BGP Configuration
Context
Do as follows on the two BGP routers where a BFD session needs to be set up:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
bfd
Global BFD is enabled on the local node.
Step 3 Run:
quit
Back to the system view.
Step 4 Run:
bgp as-number
The BGP view is displayed.
Step 5 (Optional) Run:
peer { group-name | ipv4-address } bfd { min-tx-interval min-tx-interval | min-rx-
interval min-rx-interval | detect-multiplier multiplier }
*
The parameters used to set up a BFD session are specified.
Step 6 Run:
peer { group-name | ipv4-address } bfd enable
BFD is configured for a peer or a peer group and the BFD session is set up.
If BFD is configured on a peer group, BFD sessions are set up between the peers that belong to the peer group and are not configured with the peer bfd block command.
NOTE
l A BFD session is set up only when the BGP session is in the Established state.
l If BFD parameters of a peer are set, the BFD session is set up by using BFD parameters of the peer.
Step 7 (Optional) Run:
peer ipv4-address bfd block
The peer is prevented from inheriting BFD of its group.
If a peer joins a group enabled with BFD, the peer inherits BFD of the group and creates a BFD session. If you do not want the peer to inherit BFD of the group, you can prevent the peer from inheriting BFD of its group.
NOTE
The peer bfd block command is mutually exclusive with the peer bfd enable command. After the peer
bfd block command is used, the BFD session is automatically deleted.
----End
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
509
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 8 BGP Configuration
8.10.3 Configuring BFD for BGP in a Private Network
On a VPN network, configuring BFD for BGP can fast detect the status of VPN BGP routes. A
BFD session can be established only when two BGP peers are in the Established state.
Context
Do as follows on the BGP routers at the both ends of the link that needs to set up a BFD session:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
bfd
Global BFD is enabled on the local node.
Step 3 Run:
quit
Back to the system view.
Step 4 Run:
bgp as-number
The BGP view is displayed.
Step 5 Run:
ipv4-family vpn-instance vpn-instance-name
The BGP-VPN instance view is displayed.
Step 6 (Optional) Run:
peer { group-name | ipv4-address } bfd { min-tx-interval min-tx-interval | min-rx-
interval min-rx-interval | detect-multiplier multiplier }
*
The parameters used to set up a BFD session are specified.
Step 7 Run:
peer { group-name | ipv4-address } bfd enable
BFD is configured for a peer or a peer group and the BFD session is set up.
If BFD is configured on a peer group, peers that belong to the group set up BFD sessions when the peer bfd block command is not used on the peers.
NOTE
l A BFD session is set up only when the BGP session is in the Established state.
l If BFD parameters of a peer are set, the BFD session is set up by using BFD parameters of the peer.
Step 8 (Optional) Run:
peer ipv4-address bfd block
The peer is prevented from inheriting BFD of its group.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
510
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 8 BGP Configuration
If a peer joins a group enabled with BFD, the peer inherits BFD of the group and creates a BFD session. If you do not want the peer to inherit BFD of the group, you can prevent the peer from inheriting BFD of its group.
NOTE
The peer bfd block command is exclusive with the peer bfd enable command. After the peer bfd
block command is used, the BFD session is automatically deleted.
----End
8.10.4 Checking the Configuration
After BFD for BGP is configured, you can check the BFD sessions established by BGP.
Prerequisite
The configurations of BFD for BGP are complete.
Procedure
l Run the display bgp bfd session { [ vpnv4 vpn-instance vpn-instance-name ] peer ipv4-
address | all } command to check the BFD sessions established by BGP.
l Run the display bgp [ vpnv4 vpn-instance vpn-instance-name ] peer [ [ ipv4-address ]
verbose ] command to check BGP peers.
l Run the display bgp group [ group-name ] command to check BGP peer groups.
l
Run the display bgp vpnv4 { all | vpn-instance vpn-instance-name } group [ group-
name ] command to check BGP peer groups.
----End
8.11 Configuring BGP Auto FRR
As a protection measure against link faults, BGP Auto FRR is applicable to the network topology with primary and backup links. BGP Auto FRR is suitable for the services that are sensitive to packet delay and packet loss.
8.11.1 Establishing the Configuration Task
Before configuring BGP Auto FRR, familiarize yourself with the applicable environment, complete the pre-configuration tasks, and obtain the required data. This can help you complete the configuration task quickly and accurately.
Applicable Environment
BGP Auto FRR is applicable to IP services that are sensitive to packet loss and delay.
Pre-configuration Tasks
Before configuring BGP Auto FRR, complete the following tasks: l Configuring static routes or enabling IGP to ensure that IP routes between switches are reachable
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
511
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 8 BGP Configuration l Configuring BGP peers or MP-BGP peers
Data Preparation
To configure BGP Auto FRR, you need the following data.
No.
1
Data
(Optional) BGP-VPN instance view for configuring BGP Auto FRR
8.11.2 Enabling BGP Auto FRR
With BGP Auto FRR, switching between two BGP peers or two next hops can be implemented at the sub-second level.
Context
Do as follows on the switch that requires BGP Auto FRR:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
bgp as-number
The BGP view is displayed.
Step 3 Run:
auto-frr
BGP Auto FRR is enabled for unicast routes.
By default, BGP Auto FRR is not enabled for unicast routes.
Step 4 (Optional) Run:
ipv4-family vpn-instance vpn-instance-name
The BGP VPN instance view is displayed.
Step 5 (Optional) Run:
auto-frr
BGP Auto FRR is enabled for VPN instance routes.
----End
8.11.3 Checking the Configuration
After BGP Auto FRR is configured, you can check the backup forwarding information about routes.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
512
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Requirements
All BGP configurations are complete.
8 BGP Configuration
Checking the Configuration
Run the following commands to check the previous configurations.
l Run the display ip routing-table [ vpn-instance vpn-instance-name] [ ip-address ]
[ mask | mask-length ] [ longer-match ] verbose command to check backup forwarding information about routes in the routing table.
8.12 Configuring BGP Tracking
On a network where BFD is unsuitable to deploy, you can configure BGP tracking to implement the fast convergence of IBGP routes.
8.12.1 Establishing the Configuration Task
Before configuring BGP tracking, familiarize yourself with the applicable environment, complete the pre-configuration tasks, and obtain the required data. This can help you complete the configuration task quickly and accurately.
Applicable Environment
Since BFD is difficult to deploy and is of poor scalability, in a network where BFD is unsuitable to be deployed, you can configure BGP tracking as a substitution for BFD to implement the fast convergence of BGP routes.
BGP tracking is easy to deploy because it needs to be configured only on the local device, without the need of configuring it on the peer device. However, BGP route convergence in a network configured with BGP tracking is slower than that in a network enabled with BFD; therefore,
BGP tracking cannot meet the requirement of voice services that demand high convergence speed.
Pre-configuration Tasks
Before configuring BGP tracking, complete the following tasks: l Configuring parameters of the link layer protocol and IP addresses for interfaces to ensure that the link layer protocol on the interfaces is Up l
Configuring basic BGP functions
Data Preparation
To configure BGP tracking, you need the following data.
No.
1
Data
(Optional) Delay for tearing down a connection
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
513
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 8 BGP Configuration
8.12.2 Enabling BGP Tracking
Easy to deploy, BGP tracking can speed up network convergence and adjust the interval between a peer's being discovered unreachable and the connection's being torn down.
Context
Do as follows on the switch enabled with BGP:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
bgp as-number
The BGP view is displayed.
Step 3 Run:
peer { group-name | ipv4-address } tracking [ delay delay-time ]
BGP tracking is enabled for the specified peer.
By default, BGP tracking is disabled.
A proper value of delay-time can ensure network stability when a peer is detected unreachable.
l If delay-time is set to 0, BGP immediately tears down the connection between the local device and its peer after the peer is detected unreachable.
l If IGP route flapping occurs and delay-time for an IBGP peer is set to 0, the peer relationship between the local device and the peer alternates between Up and Down. Therefore, delay-
time for an IBGP peer should be set to a value greater than the actual IGP route convergence time.
l When BGP neighbors successfully perform the GR negotiation, the active/standby switchover occurs on the BGP neighbors, to prevent the failure of GR, delay-time should be set to a value greater than GR period. If delay-time is set to be smaller than the GR period, the connection between the local device and the BGP peer will be torn down, which leads to the failure of GR.
----End
8.12.3 Checking the Configuration
After BGP tracking is configured, you can check the configuration of BGP tracking by viewing detailed information about the BGP peer or peer group.
Prerequisite
All BGP tracking configurations are complete.
Checking the Configuration
Run the following commands to check the previous configuration.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
514
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 8 BGP Configuration l Run the display bgp peer [ ipv4-address ] [ verbose ] command to check information about the BGP peer.
l Run the display bgp group [ group-name ] command to check information about the BGP peer group.
8.13 Configuring BGP Load Balancing
By configuring BGP load balancing, you can properly use network resources.
8.13.1 Establishing the Configuration Task
Before configuring BGP load balancing, familiarize yourself with the applicable environment, complete the pre-configuration tasks, and obtain the required data. This can help you complete the configuration task quickly and accurately.
Applicable Environment
Load balancing can be performed among equal-cost BGP routes whose first eight attributes
described in "Principles of Route Selection" of
8.2 BGP Features Supported by the S9300
are the same and AS_Path attributes are the same.
Pre-configuration Tasks
Before configuring BGP load balancing, complete the following task: l
Configuring Basic BGP Functions
Data Preparation
To configure BGP load balancing, you need the following data.
No.
Data
1 Number of routes for load balancing
8.13.2 Setting the Number of Routes for BGP Load Balancing
Load balancing can be implemented among multiple equal-cost links between BGP peers.
Procedure
l Configuring the Maximum Number of Routes for BGP Load Balancing
Do as follows on the BGP router:
1.
Run:
system-view
The system view is displayed.
2.
Run:
bgp as-number
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
515
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 8 BGP Configuration
The BGP view is displayed.
3.
Run:
ipv4-family unicast
The BGP IPv4 unicast address family view is displayed.
4.
Run:
maximum load-balancing number
The maximum number of routes for BGP load balancing is set.
By default, the number of routes for BGP load balancing is 1.
l Configuring the Maximum Number of EBGP and IBGP Routes for Load Balancing
Do as follows on the BGP router:
1.
Run:
system-view
The system view is displayed.
2.
Run:
bgp as-number
The BGP view is displayed.
3.
Run:
ipv4-family vpn-instance vpn-instance-name
The BGP-VPN instance view is displayed.
4.
Run:
load-balancing as-path-ignore
A switch is configured not to compare the AS-Path attributes of the routes among which load balancing is performed.
By default, a switch compares the AS-Path attributes of the routes when load balancing is performed.
NOTE
l The execution of the load-balancing as-path-ignore command will change the conditions of load balancing. Then, a switch does not compare the AS-Path attributes of the routes when load balancing is performed. This command applies to the scenarios where EBGP and IBGP routes perform load balancing, and needs to be used with caution.
l The load-balancing as-path-ignore command and the bestroute as-path-ignore command are mutually exclusive.
5.
Run:
maximum load-balancing eibgp number
The maximum number of EBGP and IBGP routes for load balancing is set.
By default, the maximum number of EBGP and IBGP routes for load balancing is not set.
----End
8.13.3 Checking the Configuration
After BGP load balancing is configured, you can check information about load balancing.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
516
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Prerequisite
The configurations of BGP load balancing are complete.
Procedure
8 BGP Configuration l Run the display bgp routing-table [ network ] [ mask | mask-length ] [ longer-prefixes ] command to check information about the BGP routing table.
l Run the display ip routing-table [ verbose ] command to check information about the IP routing table.
----End
8.14 Configuring a BGP Peer Group
By configuring a BGP peer group, you can simplify the management of routing policies, and thus improve the efficiency of route advertisement.
8.14.1 Establishing the Configuration Task
Before configuring a BGP peer group, familiarize yourself with the applicable environment, complete the pre-configuration tasks, and obtain the required data. This can help you complete the configuration task quickly and accurately.
Applicable Environment
A large number of peers exist in a large BGP network, which is inconvenient for configuration and maintenance. In this case, you can configure peer groups to simply the management of peers and improve the efficiency in advertising routes. According to whether peers reside in the same
AS, you can classify peer groups into IBGP peer groups and EBGP peer groups. For EBGP peer groups, you can classify them into pure EBGP peer groups and mixed EBGP peer groups according to whether the peers are in the same external AS.
Pre-configuration Tasks
Before configuring a BGP peer group, complete the following tasks: l Configuring link layer protocol parameters and assigning IP addresses to the interfaces to ensure that the status of the link layer protocol of the interface is Up l
Configuring Basic BGP Functions
Data Preparation
To configure a BGP peer group, you need the following data.
No.
Data
1 Type and name of the peer group, and peers in the peer group
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
517
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 8 BGP Configuration
8.14.2 Creating an IBGP Peer Group
When BGP has multiple IBGP peers, you can create an IBGP peer group to simplify the management of routing policies. When creating an IBGP peer group, you do not need to specify the AS number.
Context
Do as follows on the BGP router:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
bgp as-number
The BGP view is displayed.
Step 3 Run:
group group-name [ internal ]
An IBGP peer group is created.
Step 4 Run:
peer ipv4-address group group-name
A peer is added to this peer group.
You need not to specify the number of the AS when creating an IBGP peer group.
----End
8.14.3 Creating a Pure EBGP Peer Group
When BGP has multiple EBGP peers that belong to one AS, you can create an EBGP peer group to simplify the management of routing policies. All the peers in a pure EBGP peer group must have the same AS number.
Context
Do as follows on the BGP router:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
bgp as-number
The BGP view is displayed.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
518
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
8 BGP Configuration
Step 3 Run:
group group-name external
An EBGP peer group is created.
Step 4 Run:
peer group-name as-number as-number
The number of the AS where this peer group resides is set.
Step 5 Run:
peer ipv4-address group group-name
A peer is added to the peer group.
NOTE
You can add multiple peers to the peer group by repeating Step 5. The system automatically creates a peer in the BGP view, and sets its AS number to the local AS number.
If there are already peers in this peer group, you can neither change the AS number of this peer group nor delete the specified AS number with the undo peer group-name as-number command.
----End
8.14.4 Creating a Mixed EBGP Peer Group
When BGP has multiple EBGP peers that belong to different ASs, you can create a mixed EBGP peer group to simplify the management of routing policies. When creating a mixed EBGP peer group, you need to specify the AS number of each peer.
Context
Do as follows on the BGP router:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
bgp as-number
The BGP view is displayed.
Step 3 Run:
group group-name external
An EBGP peer group is created.
Step 4 Run:
peer ipv4-address as-number as-number
All peers are created and their AS numbers are set.
Step 5 Run:
peer ipv4-address group group-name
Issue 01 (2011-10-26) 519
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 8 BGP Configuration
The peer is added to the peer group.
NOTE
You can add multiple peers to the peer group by repeating Step 4 and Step 5.
In a mixed EBGP peer group, you need to specify the AS number of each peer.
----End
8.14.5 Checking the Configuration
After a BGP peer group is configured, you can check detailed information about the BGP peer and information about the BGP peer group.
Prerequisite
The configurations of a BGP peer group are complete.
Procedure
l Run the display bgp peer [ ipv4-address ] verbose command to check detailed information about the peer.
l Run the display bgp group [ group-name ] command to check information about the peer group.
----End
8.15 Configuring a BGP Route Reflector
By configuring a BGP route reflector, you can solve the problem of establishing fully meshed connections between multiple IBGP peers.
8.15.1 Establishing the Configuration Task
Before configuring a BGP route reflector, familiarize yourself with the applicable environment, complete the pre-configuration tasks, and obtain the required data. This can help you complete the configuration task quickly and accurately.
Applicable Environment
To ensure the connectivity between IBGP peers inside an AS, you need to establish full-meshed
IBGP peers. When there are many IBGP peers, establishing a full-meshed network is costly.
You can use the RR or the confederation to solve the problem.
Pre-configuration Tasks
Before configuring a BGP RR, complete the following tasks: l Configuring link layer protocol parameters and assigning IP addresses to the interfaces to ensure that the link layer protocol of the interface is Up l
Configuring Basic BGP Functions
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
520
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Data Preparation
To configure a BGP RR, you need the following data.
No.
Data
1 Role of each router (RR, client, and non-client)
8 BGP Configuration
8.15.2 Configuring a Route Reflector and Specifying Clients
A route reflector and clients need to be configured in a specified address family.
Context
Do as follows on the BGP router:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
bgp as-number
The BGP view is displayed.
Step 3 Run:
ipv4-family unicast
The BGP IPv4 unicast address family view is displayed.
Step 4 Run:
peer { ipv4-address | group-name } reflect-client
An RR is configured and its clients are specified.
The switch where the command is run serves as the RR and the peer is specified as its client.
----End
8.15.3 (Optional) Disabling the Route Reflection Between Clients
If the clients of a route reflector are fully meshed, you can disable route reflection between clients to reduce the cost.
Context
Do as follows on the BGP router:
Procedure
Step 1 Run:
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
521
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 8 BGP Configuration
system-view
The system view is displayed.
Step 2 Run:
bgp as-number
The BGP view is displayed.
Step 3 Run:
ipv4-family unicast
The BGP IPv4 unicast address family view is displayed.
Step 4 Run:
undo reflect between-clients
Route reflection between clients is disabled.
If the clients of the RR are fully meshed, you can use the undo reflect between-clients command to disable route reflection between clients. This reduces the cost to a great degree.
By default, route reflection between clients is enabled.
This command is applicable to only the RR.
----End
8.15.4 (Optional) Configuring the Cluster ID for a Route Reflector
When there are multiple route reflectors in a cluster, you need to configure the same cluster ID for all the route reflectors in this cluster to avoid routing loops.
Context
Do as follows on the BGP router:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
bgp as-number
The BGP view is displayed.
Step 3 Run:
ipv4-family unicast
The BGP IPv4 unicast address family view is displayed.
Step 4 Run:
reflector cluster-id cluster-id
The cluster ID of an RR is set.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
522
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 8 BGP Configuration
When there are multiple RRs in a cluster, you can configure all the RRs in this cluster with the same cluster ID with this command. This prevents routing loops.
----End
8.15.5 (Optional) Preventing BGP Routes from Being Added into the IP Routing Table
By preventing BGP routes from being added to the IP routing table, you can effectively reduce unnecessary interaction between BGP and the routing management module, and thus improve forwarding efficiency.
Context
Do as follows on the BGP router:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
bgp as-number
The BGP view is displayed.
Step 3 Run:
ipv4-family unicast
The BGP IPv4 unicast address family view is displayed.
Step 4 Run:
bgp-rib-only [ route-policy route-policy-name ]
Adding BGP routes to the IP routing table is forbidden.
By default, the preferred BGP routes are added to the IP routing table.
When the parameter route-policy route-policy-name is specified in the command, the routes that match the routing policy are not added to the IP routing table. Conversely, the routes that do not match the routing policy are added to the IP routing table, and the attributes of these routes are not modified.
NOTE
The bgp-rib-only command and the active-route-advertise command are mutually exclusive.
----End
8.15.6 Checking the Configuration
After a BGP route reflector is configured, you can check BGP route information and peer group information.
Prerequisite
The configurations of a BGP route reflector are complete.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
523
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Procedure
8 BGP Configuration l Run the display bgp group [ group-name ] command to check detailed information about the peer group.
l Run the display bgp routing-table [ network ] [ mask | mask-length ] [ longer-prefixes ] command to check information about the BGP routing table.
----End
8.16 Configuring a BGP Confederation
On a large-scale BGP network, configuring a BGP confederation can simplify the management of routing policies and improve the efficiency of route advertisement.
8.16.1 Establishing the Configuration Task
Before configuring a BGP confederation, familiarize yourself with the applicable environment, complete the pre-configuration tasks, and obtain the required data. This can help you complete the configuration task quickly and accurately.
Applicable Environment
Confederation deals with increasing IBGP connections in an AS. The confederation divides an
AS into multiple sub-ASs. In each sub-AS, IBGP peer relationships are set up or an RR is configured on one of the IBGP peers. EBGP connections are set up between sub-ASs.
Pre-configuration Tasks
Before configuring a BGP confederation, complete the following tasks: l Configuring link layer protocol parameters and assigning IP addresses to the interfaces to ensure that the status of the link layer protocol of the interface is Up l
Configuring Basic BGP Functions
Data Preparation
To configure a BGP confederation, you need the following data.
No.
Data
1 Confederation ID
2 Sub-AS number
8.16.2 Configuring a BGP Confederation
BGP confederations deal with increasing IBGP connections in an AS.
Procedure
l Configuring a BGP Confederation
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
524
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 8 BGP Configuration
Do as follows on the BGP router:
1.
Run:
system-view
The system view is displayed.
2.
Run:
bgp as-number
The BGP view is displayed.
3.
Run:
confederation id as-number
The confederation ID is set.
4.
Run:
confederation peer-as as-number &<1-32>
The number of the sub-AS where other EBGP peers connected to the local AS reside is set.
A confederation includes up to 32 sub-ASs. The parameter as-number used is valid for the confederation to which it belongs.
You must run the confederation id and confederation peer-as commands for all the
EBGP peers in a confederation, and specify the same confederation ID for them.
NOTE
The old speaker with 2-byte AS numbers and the new speaker with 4-byte AS numbers cannot exist in the same confederation. Otherwise, routing loops may occur because AS4_Path does not support confederations.
l Configuring the Compatibility of the Confederation
Do as follows on the BGP router:
1.
Run:
system-view
The system view is displayed.
2.
Run:
bgp as-number
The BGP view is displayed.
3.
Run:
confederation nonstandard
The compatibility of the confederation is configured.
Some switches in a confederation may not comply with the RFC standard. In this case, you can use this command to make the switches compatible with devices that do not comply with the RFC standard.
----End
8.16.3 Checking the Configuration
After a BGP confederation is configured, you can check BGP route information and detailed peer information.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
525
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 8 BGP Configuration
Prerequisite
The configurations of a BGP confederation are complete.
Procedure
l Run the display bgp peer [ ipv4-address ] verbose command to check detailed information about the peer.
l
Run the display bgp routing-table [ network ] [ mask | mask-length ] [ longer-prefixes ] command to check information about the BGP routing table.
----End
8.17 Configuring BGP Accounting
By configuring BGP accounting, you can collect the statistics of the incoming and outgoing
BGP traffic of an AS.
8.17.1 Establishing the Configuration Task
Before configuring BGP accounting, familiarize yourself with the applicable environment, complete the pre-configuration tasks, and obtain the required data. This can help you complete the configuration task quickly and accurately.
Applicable Environment
BGP accounting sets traffic indexes through the matching BGP attributes to identify and classify routes, and then accounts services according to the traffic. BGP accounting is valid only when a switch needs to search the forwarding table. For example, if BGP accounting is configured for the outgoing traffic on the originating interface, BGP accounting is invalid.
Pre-configuration Tasks
Before configuring BGP accounting, complete the following tasks: l
Configuring Basic BGP Functions
l
Configure BGP to Advertise Local Routes
l
(Optional) Configuring the Local Interface for a BGP Connection
l
Configuring BGP Route Attributes
Data Preparation
To configure BGP accounting, you need the following data.
No.
Data
1 Defined types
2 ACL number, MAC address, interface type and number, DSCP value, IP preference,
RTP protocol port number, IP protocol type, MPLS EXP value, and 802.1P priority
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
526
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 8 BGP Configuration
8.17.2 Configuring the Routing Policy for Setting the Traffic Index
BGP accounting propagates traffic indexes through BGP community attributes to identify routes, and then accounts services.
Context
Do as follows on the BGP router:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
route-policy route-policy-name { permit | deny } node node
The node of the Route-Policy is created and the Route-Policy view is displayed.
Step 3 Run the following command as required: l Run:
if-match acl { acl-number | acl-name }
The ACL is configured to match routes.
l Run:
if-match as-path-filter as-path-filter-number &<1-16>
The AS-Path filter is configured to match routes.
l Run:
if-match community-filter { basic-comm-filter-num [ whole-match ] | adv-comm-
filter-num }
*
&<1-16>
The community attribute filter is configured to match routes.
l Run:
if-match cost cost
The cost of a route is set to match routes.
l Run:
if-match ip-prefix ip-prefix-name
The IP prefix list is configured to match routes.
Step 4 Run:
apply traffic-index traffic-index
The traffic index is set.
----End
8.17.3 Applying the Routing Policy Configured with the Traffic
Index
Routing policies configured with traffic indexes can be flexibly applied as required.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
527
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 8 BGP Configuration
Context
Do as follows on the BGP router:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
bgp as-number
The BGP view is displayed.
Step 3 Run:
peer ipv4-address as-number as-number
The BGP peer is created.
Step 4 Run:
peer ipv4-address route-policy route-policy-name import
A policy is configured for receiving BGP routes.
----End
8.17.4 Applying the BGP Accounting to an Interface
At present, BGP accounting collects only the statistics of packets on the public network and must be configured on the inbound interface.
Context
Do as follows on the BGP router:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
interface interface-type interface-number
The interface view is displayed.
Step 3 Run:
ip bgp-accounting { inbound | outbound }
*
[ source ]
BGP accounting is applied.
By default, BGP accounting matches the destination address. If source is configured, BGP accounting matches the source address.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
528
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 8 BGP Configuration
At present, BGP accounting supports only the statistics of packets in the public network, and
BGP accounting must be configured on the inbound interface at first.
----End
8.17.5 Checking the Configuration
After BGP accounting is configured, you can check BGP accounting information.
Prerequisite
The configurations of BGP accounting are complete.
Procedure
l Run the display ip bgp-accounting [ inbound | outbound ] interface [ interface-type
interface-number ] command to check information about BGP accounting.
----End
8.18 Configuring BGP GR
By configuring BGP GR, you can avoid traffic interruption caused by protocol restart.
8.18.1 Establishing the Configuration Task
Before configuring BGP GR, familiarize yourself with the applicable environment, complete the pre-configuration tasks, and obtain the required data. This can help you complete the configuration task quickly and accurately.
Applicable Environment
To avoid the interruption of services due to the BGP restart, you need to enable BGP GR and set up BGP GR sessions between the GR restarter and its peers.
Pre-configuration Tasks
Before configuring BGP GR, complete the following task: l
Configuring Basic BGP Functions
Data Preparation
To configure BGP GR, you need the following data.
2
3
No.
Data
1 AS number
Maximum period for reestablishing a BGP session
Waiting time for the End-of-RIB messages
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
529
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 8 BGP Configuration
8.18.2 Enabling BGP GR
Enabling or disabling GR may delete and reestablish all sessions and instances.
Context
Do as follows on the router that needs to be enabled with BGP GR:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
bgp as-number
The BGP view is displayed.
Step 3 Run:
graceful-restart
BGP GR is enabled.
By default, BGP GR is disabled.
----End
8.18.3 Configuring Parameters of a BGP GR Session
You can adjust parameters of a BGP GR session as required. Generally, the default values are recommended. Modifying the value of the Restart timer leads to the reestablishment of the BGP peer relationship.
Context
Do as follows on the switch that needs to be enabled with BGP GR:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
bgp as-number
The BGP view is displayed.
Step 3 Run:
graceful-restart timer restart time
The maximum period for reestablishing a BGP session is set.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
530
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 8 BGP Configuration
The restart period is the maximum period for performing GR on a switch, that is, the maximum waiting period from the receiving speaker discovering that the peer restarts to the reestablishment of the BGP session. By default, the restart period is 150 seconds.
NOTE
Modifying the maximum period for reestablishing a BGP session leads to the reestablishment of the BGP peer relationship.
Step 4 Run:
graceful-restart timer wait-for-rib time
The waiting time when the restarting speaker and receiving speaker wait for End-of-RIB messages is set.
By default, the waiting time for End-of-RIB messages is 600 seconds.
NOTE
You can adjust parameters of a BGP GR session as required. Generally, the default values are recommended.
----End
8.18.4 Checking the Configuration
After BGP GR is configured, you can check the BGP GR status.
Prerequisite
The configurations of BGP GR are complete.
Procedure
l Run the display bgp peer verbose command to check the status of BGP GR.
----End
8.19 Configuring BGP Security
To improve BGP security, you can perform TCP connection authentication.
8.19.1 Establishing the Configuration Task
Before improving BGP network security, familiarize yourself with the applicable environment, complete the pre-configuration tasks, and obtain the required data. This can help you complete the configuration task quickly and accurately.
Applicable Environment
l BGP authentication
BGP uses TCP as the transport layer protocol. To enhance BGP security, you can perform the Message Digest 5 (MD5) authentication when TCP connections are created. The MD5 authentication, however, does not authenticate BGP packets. Instead, it sets MD5 authentication passwords for TCP connections, and the authentication is then completed by TCP. If the authentication fails, TCP connections cannot be established.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
531
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Pre-configuration Tasks
Before configuring BGP security, complete the following task: l
Configuring Basic BGP Functions
Data Preparation
Before configure BGP security, you need the following data.
2
3
No.
Data
1 BGP peer address or name of the peer group of each switch
MD5 authentication password
Key-Chain authentication name
8 BGP Configuration
8.19.2 Configuring MD5 Authentication
In MD5 authentication of BGP, you only need to set MD5 authentication passwords for TCP connections, and the authentication is performed by TCP. If the authentication fails, TCP connections cannot be established.
Context
Do as follows on the BGP router:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
bgp as-number
The BGP view is displayed.
Step 3 Run:
peer { ipv4-address | group-name } password { cipher cipher-password | simple
simple-password }
The MD5 authentication password is configured.
NOTE
When this command is used in the BGP view, the extensions on VPNv4 of MP-BGP are also valid because they use the same TCP connection.
Characters $@$@ are used as the prefix and suffix of passwords with variable lengths, and they cannot be both configured at the beginning and end of a plain text password.
----End
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
532
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
8 BGP Configuration
8.19.3 Configuring Keychain Authentication
You need to configure Keychain authentication on both BGP peers, and ensure that encryption algorithms and passwords configured for Keychain authentication on both peers are the same.
Otherwise, TCP connections cannot be established between BGP peers, and BGP messages cannot be exchanged.
Context
Do as follows on the BGP router:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
bgp as-number
The BGP view is displayed.
Step 3 Run:
peer { ipv4-address | group-name } keychain keychain-name
The Keychain authentication is configured.
You must configure Keychain authentication on both BGP peers. Note that encryption algorithms and passwords configured for the Keychain authentication on both peers must be the same; otherwise, the TCP connection cannot be set up between BGP peers and BGP messages cannot be transmitted.
Before configuring the BGP Keychain authentication, configure a Keychain in accordance with the configured keychain-name. Otherwise, the TCP connection cannot be set up.
NOTE
l When this command is used in the BGP view, the extensions on VPNv4 of MP-BGP are also valid because they use the same TCP connection.
l The BGP MD5 authentication and BGP Keychain authentication are mutually exclusive.
----End
8.19.4 Configuring Basic BGP GTSM Functions
The GTSM mechanism protects a router by checking whether the TTL value in the IP header is in a pre-defined range.
Procedure
l Configuring Basic BGP GTSM Functions
Do as follows on the two peers:
1.
Run:
system-view
Issue 01 (2011-10-26) 533
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 8 BGP Configuration
The system view is displayed.
2.
Run:
bgp as-number
The BGP view is displayed.
3.
Run
peer { group-name | ipv4-address } valid-ttl-hops [ hops ]
Basic BGP GTSM functions are configured.
The range of TTL values of packets is [ 255-hops+1, 255 ]. By default, the value of
hops is 255. That is, the valid TTL range is [ 1, 255 ]. For example, for the direct
EBGP route, the value of hops is 1. That is, the valid TTL value is 255.
After the BGP GTSM policy is configured, an interface board checks the TTL values of all BGP packets. According to the actual networking requirements, you can configure GTSM to discard or process the packets that do not match the GTSM policy.
To configure the GTSM to discard packets by default, you can set an appropriate TTL value range. Then, packets whose TTL values are not within the specified range are discarded. In this manner, attacks by bogus BGP packets are avoided.
l Defining the Default GTSM Action
Do as follows on the switch configured with GTSM:
1.
Run:
system-view
The system view is displayed.
2.
Run:
gtsm default-action { drop | pass }
The default action is configured for the packets that do not match the GTSM policy.
By default, the packets that do not match the GTSM policy can pass the filtering.
NOTE
If only the default action is configured and the GTSM policy is not configured, GTSM does not take effect.
----End
8.19.5 Checking the Configuration
After BGP network security is configured, you can check authentication information of BGP peers.
Prerequisite
The configurations of BGP security are complete.
Procedure
Issue 01 (2011-10-26) l Run the display gtsm statistics all command to check the statistics of GTSM.
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
534
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 8 BGP Configuration
Run the display gtsm statistics command. You can view GTSM statistics on each board, including the total number of BGP packets, the total number of OSPF packets, the number of packets that match the GTSM policy, and the number of discarded packets.
l Run the display bgp peer [ ipv4-address ] verbose command to check information about
BGP GTSM.
l Run the display bgp group [ group-name ] command to check GTSM of a BGP peer group.
Run the display bgp peer verbose and the display bgp group commands. You can find the configured maximum valid TTL value and GTSM being enabled on a BGP peer or peer group.
----End
8.20 Maintaining BGP
Maintaining BGP involves resetting a BGP connection and clearing BGP statistics.
8.20.1 Resetting BGP Connections
You can also reset BGP in GR mode. Resetting a BGP connection will interrupt the peer relationship.
Context
CAUTION
The BGP peer relationship is interrupted after you reset BGP connections with the reset bgp command. So, confirm the action before you use the command.
When the BGP routing policy on the switch that does not support Route-refresh changes, you need to reset BGP connections to validate the configuration. To reset BGP connections, run the following reset commands in the user view.
Procedure
Issue 01 (2011-10-26) l To validate the new configurations, run the reset bgp all command in the user view to reset all BGP connections.
l To validate the new configurations, run the reset bgp as-number command in the user view to reset the BGP connection between the specified AS.
l To validate the new configurations, run the reset bgp ipv4-address command in the user view to reset the BGP connection between a specified peer.
l To validate the new configurations, run the reset bgp external command in the user view to reset all the EBGP connections.
l To validate the new configurations, run the reset bgp group group-name command in the user view to reset the BGP connection with the specified peer-groups.
l To validate the new configurations, run the reset bgp internal command in the user view to reset all IBGP connections.
----End
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
535
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
8.20.2 Clearing BGP Information
This section describes how to clear the statistics of BGP accounting, flapped routes, and suppressed routes.
Context
8 BGP Configuration
CAUTION
BGP statistics cannot be restored after you clear it. So, confirm the action before you use the command.
Procedure
l Run the reset bgp flap-info [ regexp as-path-regexp | as-path-filter as-path-filter-
number | ipv4-address [ mask | mask-length ] ] command in the user view to clear the statistics of flapped routes.
l Run the reset bgp dampening [ ipv4-address [ mask | mask-length ] ] command in the user view to clear the dampened routes and advertise the suppressed routes.
l Run the reset bgp ipv4-address flap-info command in the user view to clear the statistics of route flapping.
----End
8.20.3 Debugging BGP
Devices can generate debugging information after the debugging of a module is enabled in the user view. Debugging information shows the contents of the packets sent or received by the debugged module.
Context
CAUTION
Debugging affects the performance of the system. So, after debugging, run the undo debugging
all command to disable it immediately.
Issue 01 (2011-10-26)
When a BGP fault occurs, run the following debugging commands in the user view to locate the fault.
For the procedure of displaying the debugging information, refer to the chapter "Maintenance and Debugging" in the Quidway S9300 Terabit Routing Switch Configuration Guide -
System Management.
For the related debugging command, refer to the Quidway S9300 Terabit Routing Switch
Command Reference.
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
536
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Procedure
8 BGP Configuration l
Run the debugging bgp all command in the user view to debug BGP.
l Run the debugging bgp event command in the user view to debug BGP events.
l Run the debugging bgp { keepalive | open | packet | route-refresh } [ receive | send ]
[ verbose ] command in the user view to debug BGP packets.
l Run the debugging bgp update [ label-route | ipv4 | vpnv4 | vpn-instance vpn-instance-
name | l2vpn ] [ peer ipv4-address | acl acl-number | ip-prefix ip-prefix-name ]
[ receive | send ] [ verbose ] command in the user view to debug BGP Update messages.
----End
8.21 Configuration Examples
This section provides several configuration examples of BGP.
8.21.1 Example for Configuring Basic BGP Functions
Networking Requirements
, all switches run BGP; an EBGP connection is established between
Switch A and Switch B; IBGP connections are set up between Switch B, Switch C, and Switch
D.
Figure 8-1 Networking diagram for configuring basic BGP functions
GE1/0/2
GE1/0/1
SwitchA
AS65008
GE1/0/2
GE1/0/1
SwitchC
GE1/0/2
GE1/0/1
SwitchB
GE1/0/3
AS65009
GE1/0/2
GE1/0/1
SwitchD
switch
SwitchA
SwitchA
SwitchB
SwitchB
SwitchB
SwitchC
SwitchC
Interface
GigabitEthernet1/0/1
GigabitEthernet1/0/2
GigabitEthernet1/0/1
GigabitEthernet1/0/2
GigabitEthernet1/0/3
GigabitEthernet1/0/1
GigabitEthernet1/0/2
VLANIF interface
VLANIF 10
VLANIF 50
VLANIF 10
VLANIF 20
VLANIF 30
VLANIF 20
VLANIF 40
IP address
200.1.1.2/24
8.1.1.1/8
200.1.1.1/24
9.1.3.1/24
9.1.1.1/24
9.1.3.2/24
9.1.2.1/24
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
537
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
SwitchD
SwitchD
GigabitEthernet1/0/1
GigabitEthernet1/0/2
VLANIF 30
VLANIF 40
8 BGP Configuration
9.1.1.2/24
9.1.2.2/24
Configuration Roadmap
The configuration roadmap is as follows:
1.
Configure IBGP connections between Switch B, Switch C and Switch D.
2.
Configure an EBGP connection between Switch A and Switch B.
3.
Advertise routes through the network command on Switch A and check the routing tables of Switch A, Switch B and Switch C.
4.
Configure BGP on Switch B to import direct routes, and check the routing tables of Switch
A and Switch C.
Data Preparation
To complete the configuration, you need the following data: l ID of the VLAN that each interface belongs to, as shown in
l
IP address of each VLANIF interface, as shown in
l Router ID of Switch A being 1.1.1.1 and number of the AS where Switch A resides being
65008 l Router IDs of Switch B, Switch C, and Switch D being 2.2.2.2, 3.3.3.3. and 4.4.4.4, and number of the AS where they reside being 65009
Procedure
Step 1 Create VLANs and add interfaces to the corresponding VLANs.
<Quidway> system-view
[Quidway] sysname SwitchA
[Quidway] vlan batch 10 50
[SwitchA] interface gigabitethernet 1/0/1
[SwitchA-GigabitEthernet1/0/1] port hybrid pvid vlan 10
[SwitchA-GigabitEthernet1/0/1] port hybrid untagged vlan 10
[SwitchA-GigabitEthernet1/0/1] quit
[SwitchA] interface gigabitethernet 1/0/2
[SwitchA-GigabitEthernet1/0/2] port hybrid pvid vlan 50
[SwitchA-GigabitEthernet1/0/2] port hybrid untagged vlan 50
[SwitchA-GigabitEthernet1/0/2] quit
The configurations of Switch B, Switch C, and Switch D are the same as the configuration of
Switch A, and are not mentioned here.
Step 2 Assign an IP address to each VLANIF interface.
[SwitchA] interface vlanif 10
[SwitchA-Vlanif10] ip address 200.1.2.1 24
[SwitchA-Vlanif10] quit
[SwitchA] interface vlanif 50
[SwitchA-Vlanif50] ip address 8.1.1.1 8
[SwitchA-Vlanif50] quit
The configurations of Switch B, Switch C, and Switch D are the same as the configuration of
Switch A, and are not mentioned here.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
538
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
8 BGP Configuration
Step 3 Configure IBGP connections.
# Configure Switch B.
[SwitchB] bgp 65009
[SwitchB-bgp] router-id 2.2.2.2
[SwitchB-bgp] peer 9.1.1.2 as-number 65009
[SwitchB-bgp] peer 9.1.3.2 as-number 65009
# Configure Switch C.
[SwitchC] bgp 65009
[SwitchC-bgp] router-id 3.3.3.3
[SwitchC-bgp] peer 9.1.3.1 as-number 65009
[SwitchC-bgp] peer 9.1.2.2 as-number 65009
[SwitchC-bgp] quit
# Configure Switch D.
[SwitchD] bgp 65009
[SwitchD-bgp] router-id 4.4.4.4
[SwitchD-bgp] peer 9.1.1.1 as-number 65009
[SwitchD-bgp] peer 9.1.2.1 as-number 65009
[SwitchD-bgp] quit
Step 4 Configure EBGP connections.
# Configure Switch A.
[SwitchA] bgp 65008
[SwitchA-bgp] router-id 1.1.1.1
[SwitchA-bgp] peer 200.1.1.1 as-number 65009
# Configure Switch B.
[SwitchB-bgp] peer 200.1.1.2 as-number 65008
[SwitchB-bgp] quit
# Check the status of BGP connections.
[SwitchB] display bgp peer
BGP local router ID : 2.2.2.2
Local AS number : 65009
Total number of peers : 3 Peers in established state : 3
Peer V AS MsgRcvd MsgSent OutQ Up/Down State PrefRcv
9.1.1.2 4 65009 49 62 0 00:44:58 Established 0
9.1.3.2 4 65009 56 56 0 00:40:54 Established 0
200.1.1.2 4 65008 49 65 0 00:44:03 Established 1
You can view that the BGP connections between Switch B and all the other Switch s are set up.
Step 5 Configure Switch A to advertise route 8.0.0.0/8.
# Configure Switch A to advertise routes.
[SwitchA-bgp] ipv4-family unicast
[SwitchA-bgp-af-ipv4] network 8.0.0.0 255.0.0.0
[SwitchA-bgp-af-ipv4] quit
[SwitchA-bgp] quit
# Check the routing table of Switch A.
[SwitchA] display bgp routing-table
Total Number of Routes: 1
Issue 01 (2011-10-26) 539
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
8 BGP Configuration
BGP Local router ID is 1.1.1.1
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal Path/Ogn
*> 8.0.0.0/8 0.0.0.0 0 0 i
# Check the routing table of Switch B.
[SwitchB] display bgp routing-table
Total Number of Routes: 1
BGP Local router ID is 2.2.2.2
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal Path/Ogn
*> 8.0.0.0/8 200.1.1.2 0 0 65008i
# Check the routing table of Switch C.
[SwitchC] display bgp routing-table
Total Number of Routes: 1
BGP Local router ID is 3.3.3.3
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal Path/Ogn
i 8.0.0.0/8 200.1.1.2 0 100 0 65008i
According to the routing table, you can view that Switch C has learned the route to the destination
8.0.0.0 in AS 65008, but the next hop 200.1.1.2 is unreachable. Therefore, this route is invalid.
Step 6 Configure BGP to import direct routes.
# Configure Switch B.
[SwitchB] bgp 65009
[SwitchB-bgp] ipv4-family unicast
[SwitchB-bgp-af-ipv4] import-route direct
[SwitchB-bgp-af-ipv4] quit
[SwitchB-bgp] quit
# Check the BGP routing table of Switch A.
[SwitchA] display bgp routing-table
Total Number of Routes: 4
BGP Local router ID is 1.1.1.1
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal Path/Ogn
*> 8.0.0.0/8 0.0.0.0 0 0 i
*> 9.1.1.0/24 200.1.1.1 0 0 65009?
*> 9.1.3.0/24 200.1.1.1 0 0 65009?
* 200.1.1.0/24 200.1.1.1 0 0 65009?
# Check the routing table of Switch C.
[SwitchC] display bgp routing-table
Total Number of Routes: 4
Issue 01 (2011-10-26) 540
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
8 BGP Configuration
BGP Local router ID is 3.3.3.3
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal Path/Ogn
* i 8.0.0.0/8 200.1.1.2 0 100 0 65008i
*>i 9.1.1.0/24 9.1.3.1 0 100 0 ?
i 9.1.3.0/24 9.1.3.1 0 100 0 ?
*>i 200.1.1.0/24 9.1.3.1 0 100 0 ?
You can view that the route destined for 8.0.0.0 becomes valid, and the next hop is the address of Switch A.
# Perform the ping operation to verify the configuration.
[SwitchC] ping 8.1.1.1
PING 8.1.1.1: 56 data bytes, press CTRL_C to break
Reply from 8.1.1.1: bytes=56 Sequence=1 ttl=254 time=31 ms
Reply from 8.1.1.1: bytes=56 Sequence=2 ttl=254 time=47 ms
Reply from 8.1.1.1: bytes=56 Sequence=3 ttl=254 time=31 ms
Reply from 8.1.1.1: bytes=56 Sequence=4 ttl=254 time=16 ms
Reply from 8.1.1.1: bytes=56 Sequence=5 ttl=254 time=31 ms
--- 8.1.1.1 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 16/31/47 ms
----End
Configuration Files
l Configuration file of Switch A
#
sysname SwitchA
#
vlan batch 10 50
# interface Vlanif10
ip address 200.1.1.2 255.255.255.0
# interface Vlanif50
ip address 8.1.1.1 255.0.0.0
# interface GigabitEthernet1/0/1
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# interface GigabitEthernet1/0/2
port hybrid pvid vlan 50
port hybrid untagged vlan 50
# bgp 65008
router-id 1.1.1.1
peer 200.1.1.1 as-number 65009
#
ipv4-family unicast
undo synchronization
network 8.0.0.0
peer 200.1.1.1 enable
# return l Configuration file of Switch B
#
sysname SwitchB
Issue 01 (2011-10-26) 541
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
#
vlan batch 10 20 30
# interface Vlanif10
ip address 200.1.1.1 255.255.255.0
# interface Vlanif20
ip address 9.1.3.1 255.255.255.0
# interface Vlanif30
ip address 9.1.1.1 255.255.255.0
# interface GigabitEthernet1/0/1
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# interface GigabitEthernet1/0/2
port hybrid pvid vlan 20
port hybrid untagged vlan 20
# interface GigabitEthernet1/0/3
port hybrid pvid vlan 30
port hybrid untagged vlan 30
# bgp 65009
router-id 2.2.2.2
peer 9.1.1.2 as-number 65009
peer 9.1.3.2 as-number 65009
peer 200.1.1.2 as-number 65008
#
ipv4-family unicast
undo synchronization
import-route direct
peer 9.1.1.2 enable
peer 9.1.3.2 enable
peer 200.1.1.2 enable
# return l
Configuration file of Switch C
#
sysname SwitchC
#
vlan batch 20 40
# interface Vlanif20
ip address 9.1.3.2 255.255.255.0
# interface Vlanif40
ip address 9.1.2.1 255.255.255.0
# interface GigabitEthernet1/0/1
port hybrid pvid vlan 20
port hybrid untagged vlan 20
# interface GigabitEthernet1/0/2
port hybrid pvid vlan 40
port hybrid untagged vlan 40
# bgp 65009
router-id 3.3.3.3
peer 9.1.2.2 as-number 65009
peer 9.1.3.1 as-number 65009
#
ipv4-family unicast
undo synchronization
peer 9.1.2.2 enable
peer 9.1.3.1 enable
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
8 BGP Configuration
542
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
# return l Configuration file of Switch D
#
sysname SwitchD
#
vlan batch 30 40
# interface Vlanif30
ip address 9.1.1.2 255.255.255.0
# interface Vlanif40
ip address 9.1.2.2 255.255.255.0
# interface GigabitEthernet1/0/1
port hybrid pvid vlan 30
port hybrid untagged vlan 30
# interface GigabitEthernet1/0/2
port hybrid pvid vlan 40
port hybrid untagged vlan 40
# bgp 65009
router-id 4.4.4.4
peer 9.1.1.1 as-number 65009
peer 9.1.2.1 as-number 65009
#
ipv4-family unicast
undo synchronization
peer 9.1.1.1 enable
peer 9.1.2.1 enable
# return
8.21.2 Example for Configuring AS-Path Filter
8 BGP Configuration
Networking Requirements
, EBGP connections are set up between Switch A, Switch B, and Switch
C. Configure the AS-Path filter on Switch B. AS 20 thus does not advertises routes of AS 30 to
AS 10, or advertise routes of AS 10 to AS 30.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
543
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Figure 8-2 Networking diagram for configuring the AS-Path filter
8 BGP Configuration
Switch
SwitchA
SwitchA
SwitchB
SwitchB
SwitchC
SwitchC
GE2/0/0
200.1.2.1/24
SwitchA
GE1/0/0
200.1.4.1/24
AS 10
EBGP
EBGP
GE2/0/0
200.1.2.2/24
AS 20
SwitchB
GE1/0/0
200.1.3.1/24
EBGP
GE2/0/0
200.1.3.2/24
GE1/0/0
200.1.4.2/24
SwitchC
AS 30
Interface
GigabitEthernet1/0/0
GigabitEthernet2/0/0
GigabitEthernet1/0/0
GigabitEthernet2/0/0
GigabitEthernet2/0/0
GigabitEthernet1/0/0
VLANIF interface
VLANIF 10
VLANIF 20
VLANIF 30
VLANIF 20
VLANIF 30
VLANIF 10
IP address
200.1.4.1/24
200.1.2.1/24
200.1.3.1/24
200.1.2.2/24
200.1.3.2/24
200.1.4.2/24
Configuration Roadmap
The configuration roadmap is as follows:
1.
Configure EBGP connections between Switch A and Switch B, Switch B and Switch C, and Switch C and Switch A, and import direct routes.
2.
Configure the AS-Path on Switch B, and apply the filtering rule.
Data Preparation
To complete the configuration, you need the following data: l
The router ID of Switch A is1.1.1.1, and the number of its AS is 10.
l The router ID of Switch B is 2.2.2.2, and the number of its AS is 20.
l The router ID of Switch C is 3.3.3.3, and the number of its AS is 30.
Procedure
Step 1 Configure VLANs that interfaces belong to.
<Quidway> system-view
[Quidway] sysname SwitchA
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
544
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
8 BGP Configuration
[SwitchA] vlan batch 10 20
[SwitchA] interface gigabitethernet 1/0/0
[SwitchA-GigabitEthernet1/0/0] port hybrid pvid vlan 10
[SwitchA-GigabitEthernett1/0/0] port hybrid untagged vlan 10
[SwitchA-GigabitEthernet1/0/0] quit
[SwitchA] interface gigabitethernet 2/0/0
[SwitchA-GigabitEthernet2/0/0] port hybrid pvid vlan 20
[SwitchA-GigabitEthernet2/0/0] port hybrid untagged vlan 20
[SwitchA-GigabitEthernet2/0/0] quit
The configurations of SwitchB and SwitchC are similar to the configuration of SwitchA, and are not mentioned here.
Step 2 Assign an IP address to each VLANIF interface.
[SwitchA] interface vlanif 10
[SwitchA-Vlanif10] ip address 200.1.4.1 24
[SwitchA-Vlanif10] quit
[SwitchA] interface vlanif 20
[SwitchA-Vlanif20] ip address 200.1.2.1 24
[SwitchA-Vlanif20] quit
The configurations of SwitchB and SwitchC are similar to the configuration of SwitchA, and are not mentioned here.
Step 3 Configure IBGP connections.
# Configure Switch A.
[SwitchA] bgp 10
[SwitchA-bgp] router-id 1.1.1.1
[SwitchA-bgp] peer 200.1.4.2 as-number 30
[SwitchA-bgp] peer 200.1.2.2 as-number 20
[SwitchA-bgp] import-route direct
# Configure Switch B.
[SwitchB] bgp 20
[SwitchB-bgp] router-id 2.2.2.2
[SwitchB-bgp] peer 200.1.2.1 as-number 10
[SwitchB-bgp] peer 200.1.3.2 as-number 30
[SwitchB-bgp] import-route direct
[SwitchB-bgp] quit
# Configure Switch C.
[SwitchC] bgp 30
[SwitchC-bgp] router-id 3.3.3.3
[SwitchC-bgp] peer 200.1.3.1 as-number 20
[SwitchC-bgp] peer 200.1.4.1 as-number 10
[SwitchC-bgp] import-route direct
[SwitchC-bgp] quit
# Check the routing table advertised by Switch B to peer 200.1.3.2. Take the routing table advertised by Switch B to Switch C as an example. You can find that Switch B advertises the routes destined to the network segment between Switch A and Switch C.
<SwitchB> display bgp routing-table peer 200.1.3.2 advertised-routes
Total Number of Routes: 9
BGP Local router ID is 2.2.2.2
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal Path/Ogn
*> 200.1.2.0 0.0.0.0 0 0 ?
*> 200.1.2.1/32 0.0.0.0 0 0 ?
Issue 01 (2011-10-26) 545
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
8 BGP Configuration
*> 200.1.2.2/32 200.1.2.1 0 0 10?
*> 200.1.3.0 0.0.0.0 0 0 ?
*> 200.1.3.1/32 200.1.3.2 0 0 30?
*> 200.1.3.2/32 0.0.0.0 0 0 ?
*> 200.1.4.0 200.1.2.1 0 0 10?
*> 200.1.4.1/32 200.1.3.2 0 0 30?
*> 200.1.4.2/32 200.1.2.1 0 0 10?
Check the routing table of Switch C. You can find that Switch C learns the advertised by Switch
B.
<SwitchC> display bgp routing-table
Total Number of Routes: 18
BGP Local router ID is 3.3.3.3
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal Path/Ogn
*> 200.1.2.0 200.1.4.1 0 0 10?
* 200.1.3.1 0 0 20?
*> 200.1.2.1/32 200.1.3.1 0 0 20?
* 200.1.4.1 0 10 20?
*> 200.1.2.2/32 200.1.4.1 0 0 10?
* 200.1.3.1 0 20 10?
*> 200.1.3.0 0.0.0.0 0 0 ?
* 200.1.3.1 0 0 20?
* 200.1.4.1 0 10 20?
*> 200.1.3.1/32 0.0.0.0 0 0 ?
*> 200.1.3.2/32 200.1.3.1 0 0 20?
* 200.1.4.1 0 10 20?
*> 200.1.4.0 0.0.0.0 0 0 ?
* 200.1.4.1 0 0 10?
* 200.1.3.1 0 20 10?
*> 200.1.4.1/32 0.0.0.0 0 0 ?
*> 200.1.4.2/32 200.1.4.1 0 0 10?
* 200.1.3.1 0 20 10?
Step 4 Configure the AS-Path filter on Switch B and apply the filter on the outbound interface of Switch
B.
# Create AS-Path filter 1, denying the passing of routes carrying AS 30. The regular expression
"_30_" indicates any AS list that contains AS 30 and ".*" matches any character.
[SwitchB] ip as-path-filter 1 deny _30_
[SwitchB] ip as-path-filter 1 permit .*
# Create AS-Path filter 2, denying the passing of routes carrying AS 10.
[SwitchB] ip as-path-filter 2 deny _10_
[SwitchB] ip as-path-filter 2 permit .*
# Apply the AS-Path filter on two outbound interfaces of Switch B.
[SwitchB] bgp 20
[SwitchB-bgp] peer 200.1.2.1 as-path-filter 1 export
[SwitchB-bgp] peer 200.1.3.2 as-path-filter 2 export
[SwitchB-bgp] quit
Step 5 Check the routing table advertised by Switch B, and you can find that the advertised routes to the network segment between Switch A and Switch C do not exist. Take the route advertised by
Switch B to Switch C as an example.
<SwitchB> display bgp routing-table peer 200.1.3.2 advertised-routes
Total Number of Routes: 4
BGP Local router ID is 2.2.2.2
Issue 01 (2011-10-26) 546
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
8 BGP Configuration
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal Path/Ogn
*> 200.1.2.0 0.0.0.0 0 0 ?
*> 200.1.2.1/32 0.0.0.0 0 0 ?
*> 200.1.3.0 0.0.0.0 0 0 ?
*> 200.1.3.2/32 0.0.0.0 0 0 ?
Similarly, the BGP routing table of Switch C does not have the two routes.
<SwitchC> display bgp routing-table
Total Number of Routes: 15
BGP Local router ID is 3.3.3.3
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal Path/Ogn
*> 200.1.2.0 200.1.4.1 0 0 10?
* 200.1.3.1 0 0 20?
*> 200.1.2.1/32 200.1.3.1 0 0 20?
* 200.1.4.1 0 10 20?
*> 200.1.2.2/32 200.1.4.1 0 0 10?
*> 200.1.3.0 0.0.0.0 0 0 ?
* 200.1.3.1 0 0 20?
* 200.1.4.1 0 10 20?
*> 200.1.3.1/32 0.0.0.0 0 0 ?
*> 200.1.3.2/32 200.1.3.1 0 0 20?
* 200.1.4.1 0 10 20?
*> 200.1.4.0 0.0.0.0 0 0 ?
* 200.1.4.1 0 0 10?
*> 200.1.4.1/32 0.0.0.0 0 0 ?
*> 200.1.4.2/32 200.1.4.1 0 0 10?
Check the routing table advertised by Switch B, and you can find that advertised routes directly connected to Switch A and Switch C do not exist. Take the route advertised by Switch B to
Switch A as an example.
<SwitchB> display bgp routing-table peer 200.1.2.1 advertised-routes
Total Number of Routes: 4
BGP Local router ID is 2.2.2.2
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal Path/Ogn
*> 200.1.2.0 0.0.0.0 0 0 ?
*> 200.1.2.1/32 0.0.0.0 0 0 ?
*> 200.1.3.0 0.0.0.0 0 0 ?
*> 200.1.3.2/32 0.0.0.0 0 0 ?
Similarly, the BGP routing table of Switch A does not have the two routes.
<SwitchA> display bgp routing-table
Total Number of Routes: 14
BGP Local router ID is 1.1.1.1
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal Path/Ogn
547
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 8 BGP Configuration
*> 200.1.2.0 0.0.0.0 0 0 ?
* 200.1.2.2 0 0 20?
*> 200.1.2.1/32 200.1.2.2 0 0 20?
* 200.1.4.2 0 30 20?
*> 200.1.2.2/32 0.0.0.0 0 0 ?
*> 200.1.3.0 200.1.2.2 0 0 20?
* 200.1.4.2 0 0 30?
*> 200.1.3.1/32 200.1.4.2 0 0 30?
*> 200.1.3.2/32 200.1.2.2 0 0 20?
* 200.1.4.2 0 30 20?
*> 200.1.4.0 0.0.0.0 0 0 ?
* 200.1.4.2 0 0 30?
*> 200.1.4.1/32 200.1.4.2 0 0 30?
*> 200.1.4.2/32 0.0.0.0 0 0 ?
----End
Configuration Files
l Configuration file of Switch A
#
sysname SwitchA
# vlan batch 10 20
# interface Vlanif20
ip address 200.1.2.1 255.255.255.0
# interface Vlanif10
ip address 200.1.4.1 255.255.255.0
# interface Vlanif20
ip address 200.1.2.1 255.255.255.0
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# interface GigabitEthernet2/0/0
port hybrid pvid vlan 20
port hybrid untagged vlan 20
# bgp 10
router-id 1.1.1.1
peer 200.1.4.2 as-number 30
peer 200.1.2.2 as-number 20
#
ipv4-family unicast
undo synchronization
import-route direct
peer 200.1.4.2 enable
peer 200.1.2.2 enable
# return l Configuration file of Switch B
#
sysname SwitchB
# vlan batch 20 30
# interface Vlanif30
ip address 200.1.3.1 255.255.255.0
# interface Vlanif20
ip address 200.1.2.2 255.255.255.0
#
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
548
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 8 BGP Configuration interface GigabitEthernet1/0/0
port hybrid pvid vlan 30
port hybrid untagged vlan 30
# interface GigabitEthernet2/0/0
port hybrid pvid vlan 20
port hybrid untagged vlan 20
# bgp 20
router-id 2.2.2.2
peer 200.1.2.1 as-number 10
peer 200.1.3.2 as-number 30
#
ipv4-family unicast
undo synchronization
import-route direct
peer 200.1.2.1 enable
peer 200.1.2.1 as-path-filter 1 export
peer 200.1.3.2 enable
peer 200.1.3.2 as-path-filter 2 export
#
ip as-path-filter 1 deny _30_
ip as-path-filter 1 permit .*
ip as-path-filter 2 deny _10_
ip as-path-filter 2 permit .*
#
Return l Configuration file of Switch C
#
sysname SwitchC
# vlan batch 10 30
# interface Vlanif10
ip address 200.1.4.2 255.255.255.0
# interface Vlanif30
ip address 200.1.3.2 255.255.255.0
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# interface GigabitEthernet2/0/0
port hybrid pvid vlan 30
port hybrid untagged vlan 30
# bgp 30
router-id 3.3.3.3
peer 200.1.4.1 as-number 10
peer 200.1.3.1 as-number 20
#
ipv4-family unicast
undo synchronization
import-route direct
peer 200.1.4.1 enable
peer 200.1.3.1 enable
# return
8.21.3 Example for Configuring BGP to Interact With an IGP
Networking Requirements
, OSPF is used inside AS 65009. An EBGP connection is set up between
Switch A and Switch B. Switch C runs OSPF instead of BGP.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
549
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 8 BGP Configuration
Figure 8-3 Networking diagram for configuring BGP to interact with an IGP
AS 65008
GE1/0/2
SwitchA
GE1/0/1
AS 65009
GE1/0/2
GE1/0/1
SwitchB
GE1/0/2
GE1/0/1
SwitchC
Switch
SwitchA
SwitchA
SwitchB
SwitchB
SwitchC
SwitchC
Interface
GigabitEthernet1/0/1
GigabitEthernet1/0/2
GigabitEthernet1/0/1
GigabitEthernet1/0/2
GigabitEthernet1/0/1
GigabitEthernet1/0/2
VLANIF interface
VLANIF 10
VLANIF 30
VLANIF 10
VLANIF 20
VLANIF 20
VLANIF 40
IP address
3.1.1.2/24
8.1.1.1/24
3.1.1.1/24
9.1.1.1/24
9.1.1.2/24
9.1.2.1/24
Configuration Roadmap
The configuration roadmap is as follows:
1.
Configure OSPF on Switch B and Switch C.
2.
Configure an EBGP connection on Switch A and Switch B.
3.
Configure BGP to interact with OSPF on Switch B and check the routes.
4.
Configure BGP route aggregation on Switch B to simplify the BGP routing table.
Data Preparation
To complete the configuration, you need the following data: l ID of the VLAN that each interface belongs to, as shown in
l
IP address of each VLANIF interface, as shown in
l Router ID of Switch A being 1.1.1.1 and number of the AS where it resides being 65008 l Router IDs of Switch B and Switch C being 2.2.2.2 and 3.3.3.3, and number of the AS where they reside being 65009
Procedure
Step 1 Create VLANs and add interfaces to the corresponding VLANs.
<Quidway> system-view
[Quidway] sysname SwitchA
[SwitchA] vlan 10
[SwitchA-vlan10] quit
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
550
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
8 BGP Configuration
[SwitchA] vlan 30
[SwitchA-vlan30] quit
[SwitchA] interface gigabitethernet 1/0/1
[SwitchA-GigabitEthernet1/0/1] port hybrid pvid vlan 10
[SwitchA-GigabitEthernet1/0/1] port hybrid untagged vlan 10
[SwitchA-GigabitEthernet1/0/1] quit
[SwitchA] interface gigabitethernet 1/0/2
[SwitchA-GigabitEthernet1/0/2] port hybrid pvid vlan 30
[SwitchA-GigabitEthernet1/0/2] port hybrid untagged vlan 30
[SwitchA-GigabitEthernet1/0/2] quit
The configurations of Switch B and Switch C are the same as the configuration of Switch A, and are not mentioned here.
Step 2 Assign an IP address to each VLANIF interface.
[SwitchA] interface vlanif 10
[SwitchA-Vlanif10] ip address 3.1.1.2 24
[SwitchA-Vlanif10] quit
[SwitchA] interface vlanif 30
[SwitchA-Vlanif30] ip address 8.1.1.1 24
[SwitchA-Vlanif30] quit
The configurations of Switch B and Switch C are the same as the configuration of Switch A, and are not mentioned here.
Step 3 Configure OSPF.
# Configure Switch B.
[SwitchB] ospf 1
[SwitchB-ospf-1] area 0
[SwitchB-ospf-1-area-0.0.0.0] network 9.1.1.0 0.0.0.255
[SwitchB-ospf-1-area-0.0.0.0] quit
[SwitchB-ospf-1] quit
# Configure Switch C.
[SwitchC] ospf 1
[SwitchC-ospf-1] area 0
[SwitchC-ospf-1-area-0.0.0.0] network 9.1.1.0 0.0.0.255
[SwitchC-ospf-1-area-0.0.0.0] network 9.1.2.0 0.0.0.255
[SwitchC-ospf-1-area-0.0.0.0] quit
[SwitchC-ospf-1] quit
Step 4 Configure an EBGP connection.
# Configure Switch A.
[SwitchA] bgp 65008
[SwitchA-bgp] router-id 1.1.1.1
[SwitchA-bgp] peer 3.1.1.1 as-number 65009
[SwitchA-bgp] ipv4-family unicast
[SwitchA-bgp-af-ipv4] network 8.1.1.0 255.255.255.0
[SwitchA-bgp-af-ipv4] quit
[SwitchA-bgp] quit
# Configure Switch B.
[SwitchB] bgp 65009
[SwitchB-bgp] router-id 2.2.2.2
[SwitchB-bgp] peer 3.1.1.2 as-number 65008
Step 5 Configure BGP to interact with an IGP.
# On Switch B, configure BGP to import OSPF routes.
[SwitchB-bgp] ipv4-family unicast
[SwitchB-bgp-af-ipv4] import-route ospf 1
Issue 01 (2011-10-26) 551
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
8 BGP Configuration
[SwitchB-bgp-af-ipv4] quit
[SwitchB-bgp] quit
# Check the routing table of Switch A.
[SwitchA] display bgp routing-table
Total Number of Routes: 3
BGP Local router ID is 1.1.1.1
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal Path/Ogn
*> 8.1.1.0/24 0.0.0.0 0 0 i
*> 9.1.1.0/24 3.1.1.1 0 0 65009?
*> 9.1.2.0/24 3.1.1.1 2 0 65009?
# On Switch B, configure OSPF to import BGP routes.
[SwitchB] ospf
[SwitchB-ospf-1] import-route bgp
[SwitchB-ospf-1] quit
# Check the routing table of Switch C.
[SwitchC] display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 7 Routes : 7
Destination/Mask Proto Pre Cost Flags NextHop Interface
8.1.1.0/24 O_ASE 150 1 D 9.1.1.1 Vlanif20
9.1.1.0/24 Direct 0 0 D 9.1.1.2 Vlanif20
9.1.1.2/32 Direct 0 0 D 127.0.0.1 InLoopBack0
9.1.2.0/24 Direct 0 0 D 9.1.2.1 Vlanif40
9.1.2.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
Step 6 Configure automatic aggregation.
# Configure Switch B.
[SwitchB] bgp 65009
[SwitchB-bgp] ipv4-family unicast
[SwitchB-bgp-af-ipv4] summary automatic
[SwitchB-bgp-af-ipv4] quit
[SwitchB-bgp] quit
# Check the BGP routing table of Switch A.
[SwitchA] display bgp routing-table
Total Number of Routes: 2
BGP Local router ID is 1.1.1.1
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal Path/Ogn
*> 8.1.1.0/24 0.0.0.0 0 0 i
*> 9.0.0.0 3.1.1.1 0 65009?
# Perform the ping operation to verify the configuration.
[SwitchA] ping -a 8.1.1.1 9.1.2.1
PING 9.1.2.1: 56 data bytes, press CTRL_C to break
552
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Reply from 9.1.2.1: bytes=56 Sequence=1 ttl=254 time=15 ms
Reply from 9.1.2.1: bytes=56 Sequence=2 ttl=254 time=31 ms
Reply from 9.1.2.1: bytes=56 Sequence=3 ttl=254 time=47 ms
Reply from 9.1.2.1: bytes=56 Sequence=4 ttl=254 time=46 ms
Reply from 9.1.2.1: bytes=56 Sequence=5 ttl=254 time=47 ms
--- 9.1.2.1 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 15/37/47 ms
----End
Configuration Files
l Configuration file of Switch A
#
sysname SwitchA
#
vlan batch 10 30
# interface Vlanif10
ip address 3.1.1.2 255.255.255.0
# interface Vlanif30
ip address 8.1.1.1 255.255.255.0
# interface GigabitEthernet1/0/1
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# interface GigabitEthernet1/0/2
port hybrid pvid vlan 30
port hybrid untagged vlan 30
# bgp 65008
router-id 1.1.1.1
peer 3.1.1.1 as-number 65009
#
ipv4-family unicast
undo synchronization
network 8.1.1.0 255.255.255.0
peer 3.1.1.1 enable
# return l Configuration file of Switch B
#
sysname SwitchB
#
vlan batch 10 20
# interface Vlanif10
ip address 3.1.1.1 255.255.255.0
# interface Vlanif20
ip address 9.1.1.1 255.255.255.0
# interface GigabitEthernet1/0/1
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# interface GigabitEthernet1/0/2
port hybrid pvid vlan 20
port hybrid untagged vlan 20
# bgp 65009
router-id 2.2.2.2
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
8 BGP Configuration
553
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 8 BGP Configuration
peer 3.1.1.2 as-number 65008
#
ipv4-family unicast
undo synchronization
summary automatic
import-route ospf 1
peer 3.1.1.2 enable
# ospf 1
import-route bgp
area 0.0.0.0
network 9.1.1.0 0.0.0.255
return l
Configuration file of Switch C
#
sysname SwitchC
#
vlan batch 20 40
# interface Vlanif20
ip address 9.1.1.2 255.255.255.0
# interface Vlanif40
ip address 9.1.2.1 255.255.255.0
# interface GigabitEthernet1/0/1
port hybrid pvid vlan 20
port hybrid untagged vlan 20
# interface GigabitEthernet1/0/2
port hybrid pvid vlan 40
port hybrid untagged vlan 40
# ospf 1
area 0.0.0.0
network 9.1.1.0 0.0.0.255
network 9.1.2.0 0.0.0.255
# return
8.21.4 Example for Configuring BGP Load Balancing and Setting the MED
Networking Requirements
, all switches run BGP. Switch A resides in AS 65008. Both Switch B
and Switch C reside in AS 65009. EBGP runs among Switch A, Switch B, and Switch C. IBGP runs between Switch B and Switch C.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
554
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Figure 8-4 Networking diagram of BGP route selection
SwitchA
GE1/0/1
GE1/0/2
AS 65008
EBGP
EBGP
GE1/0/1
SwitchB
GE1/0/2
AS 65009
GE1/0/1
SwitchC
IBGP
GE1/0/2
8 BGP Configuration switch
Switch A
Switch A
Switch B
Switch B
Switch C
Switch C
Interface
GigabitEthernet1/0/1
GigabitEthernet1/0/2
GigabitEthernet1/0/1
GigabitEthernet1/0/2
GigabitEthernet1/0/1
GigabitEthernet1/0/2
VLANIF interface
VLANIF 10
VLANIF 20
VLANIF 10
VLANIF 30
VLANIF 20
VLANIF 30
IP address
200.1.1.2/24
200.1.2.2/24
200.1.1.1/24
9.1.1.1/24
200.1.2.1/24
9.1.1.2/24
Configuration Roadmap
The configuration roadmap is as follows:
1.
Establish EBGP connections between Switch A and Switch B, and between Switch A and
Switch C; establish an IBGP connection between Switch B and Switch C.
2.
Configure load balancing and set the MED on Switch A and check the routing table.
Context
To complete the configuration, you need the following data: l ID of the VLAN that each interface belongs to, as shown in
l
IP address of each VLANIF interface, as shown in
l Router IDs of Switch A being 1.1.1.1, number of the AS where it resides being 65008, and number of routes for load balancing being 2 l Router IDs of Switch B and Switch C being 2.2.2.2 and 3.3.3.3, number of the AS where they reside being 65008, and default MED of Switch B being 100
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
555
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
8 BGP Configuration
Procedure
Step 1 Create VLANs and add interfaces to the corresponding VLANs.
<Quidway> system-view
[Quidway] sysname SwitchA
[SwitchA] vlan batch 10 20
[SwitchA] interface gigabitethernet 1/0/1
[SwitchA-GigabitEthernet1/0/1] port hybrid pvid vlan 10
[SwitchA-GigabitEthernet1/0/1] port hybrid untagged vlan 10
[SwitchA-GigabitEthernet1/0/1] quit
[SwitchA] interface gigabitethernet 1/0/2
[SwitchA-GigabitEthernet1/0/2]port hybrid pvid vlan 20
[SwitchA-GigabitEthernet1/0/2]port hybrid untagged vlan 20
[SwitchA-GigabitEthernet1/0/2] quit
The configurations of Switch B and Switch C are the same as the configuration of Switch A, and are not mentioned here.
Step 2 Assign an IP address to each VLANIF interface.
[SwitchA] interface vlanif 10
[SwitchA-Vlanif10] ip address 200.1.1.2 24
[SwitchA-Vlanif10] quit
[SwitchA] interface vlanif 20
[SwitchA-Vlanif20] ip address 200.1.2.2 24
[SwitchA-Vlanif20] quit
The configurations of Switch B and Switch C are the same as the configuration of Switch A, and are not mentioned here.
Step 3 Establish an EBGP connection.
# Configure Switch A.
[SwitchA] bgp 65008
[SwitchA-bgp] router-id 1.1.1.1
[SwitchA-bgp] peer 200.1.1.1 as-number 65009
[SwitchA-bgp] peer 200.1.2.1 as-number 65009
[SwitchA-bgp] quit
# Configure Switch B.
[SwitchB] bgp 65009
[SwitchB-bgp] router-id 2.2.2.2
[SwitchB-bgp] peer 200.1.1.2 as-number 65008
[SwitchB-bgp] peer 9.1.1.2 as-number 65009
[SwitchB-bgp] ipv4-family unicast
[SwitchB-bgp-af-ipv4] network 9.1.1.0 255.255.255.0
[SwitchB-bgp-af-ipv4] quit
[SwitchB-bgp] quit
# Configure Switch C.
[SwitchC] bgp 65009
[SwitchC-bgp] router-id 3.3.3.3
[SwitchC-bgp] peer 200.1.2.2 as-number 65008
[SwitchC-bgp] peer 9.1.1.1 as-number 65009
[SwitchC-bgp] ipv4-family unicast
[SwitchC-bgp-af-ipv4] network 9.1.1.0 255.255.255.0
[SwitchC-bgp-af-ipv4] quit
[SwitchC-bgp] quit
# Check the routing table of Switch A.
[SwitchA] display bgp routing-table
Total Number of Routes: 2
Issue 01 (2011-10-26) 556
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 8 BGP Configuration
BGP Local router ID is 1.1.1.1
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal Path/Ogn
*> 9.1.1.0/24 200.1.1.1 0 0 65009e
* 200.1.2.1 0 0 65009e
According to the routing table, you can view that there are two valid routes destined for
9.1.1.0/24. The route whose next hop is 200.1.1.1 is the optimal route because the router ID of
Switch B is smaller.
Step 4 Configure load balancing.
# Configure Switch A.
[SwitchA] bgp 65008
[SwitchA-bgp] ipv4-family unicast
[SwitchA-bgp-af-ipv4] maximum load-balancing 2
[SwitchA-bgp-af-ipv4] quit
[SwitchA-bgp] quit
# Check the routing table of Switch A.
[SwitchA] display bgp routing-table
Total Number of Routes: 2
BGP Local router ID is 1.1.1.1
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal Path/Ogn
*> 9.1.1.0/24 200.1.1.1 0 0 65009e
*> 200.1.2.1 0 0 65009e
According to the routing table, you can view that the BGP route 9.1.1.0/24 has two next hops that are 200.1.1.1 and 200.1.2.1. Both of them are optimal routes.
Step 5 Set the MED.
# Set the MED sent from Switch B to Switch A through the policy.
[SwitchB] route-policy 10 permit node 10
[SwitchB-route-policy] apply cost 100
[SwitchB-route-policy] quit
[SwitchB] bgp 65009
[SwitchB-bgp] peer 200.1.1.2 route-policy 10 export
# Check the routing table of Switch A.
[SwitchA] display bgp routing-table
Total Number of Routes: 2
BGP Local router ID is 1.1.1.1
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal Path/Ogn
*> 9.1.1.0/24 200.1.2.1 0 0 65009e
* 200.1.1.1 100 0 65009e
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
557
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
8 BGP Configuration
According to the routing table, you can view that the MED of the next hop 200.1.1.1 (Switch
B) is 100, and that of the next hop 200.1.2.1 is 0. Therefore, the route with the smaller MED is selected.
----End
Configuration Files
l Configuration file of Switch A
#
sysname SwitchA
#
vlan batch 10 20
# interface Vlanif10
ip address 200.1.1.2 255.255.255.0
# interface Vlanif20
ip address 200.1.2.2 255.255.255.0
# interface GigabitEthernet1/0/1
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# interface GigabitEthernet1/0/2
port hybrid pvid vlan 20
port hybrid untagged vlan 20
# bgp 65008
router-id 1.1.1.1
peer 200.1.1.1 as-number 65009
peer 200.1.2.1 as-number 65009
#
ipv4-famlily unicast
undo synchronization
maximum load-balancing 2
peer 200.1.1.1 enable
peer 200.1.2.1 enable
# return l Configuration file of Switch B
#
sysname SwitchB
#
vlan batch 10 30
# interface Vlanif10
ip address 200.1.1.1 255.255.255.0
# interface Vlanif30
ip address 9.1.1.1 255.255.255.0
# interface GigabitEthernet1/0/1
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# interface GigabitEthernet1/0/2
port hybrid pvid vlan 30
port hybrid untagged vlan 30
# bgp 65009
router-id 2.2.2.2
peer 9.1.1.2 as-number 65009
peer 200.1.1.2 as-number 65008
#
ipv4-family unicast
Issue 01 (2011-10-26) 558
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 8 BGP Configuration
undo synchronization
default med 100
network 9.1.1.0 255.255.255.0
peer 9.1.1.2 enable
peer 200.1.1.2 enable
peer 200.1.1.2 route-policy 10 export
# route-policy 10 permit node 10
apply cost 100
# return l Configuration file of Switch C
#
sysname SwitchC
#
vlan batch 20 30
# interface Vlanif10
ip address 200.1.2.1 255.255.255.0
# interface Vlanif30
ip address 9.1.1.2 255.255.255.0
# interface GigabitEthernet1/0/1
port hybrid pvid vlan 20
port hybrid untagged vlan 20
# interface GigabitEthernet1/0/2
port hybrid pvid vlan 30
port hybrid untagged vlan 30
# bgp 65009
router-id 3.3.3.3
peer 9.1.1.1 as-number 65009
peer 200.1.2.2 as-number 65008
#
ipv4-family unicast
network 9.1.1.0 255.255.255.0
peer 9.1.1.1 enable
peer 200.1.2.2 enable
# return
8.21.5 Example for Configuring the BGP Community Attribute
Networking Requirements
, Switch B creates EBGP connections with Switch A and Switch C. You
can configure the No_Export community attribute on Switch A. Thus, the routes advertised from
AS 10 to AS 20 are not advertised to other ASs.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
559
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Figure 8-5 Networking diagram for configuring the BGP community
AS 10
GE2/0/0
200.1.2.1/24
GE1/0/0
9.1.1.1/24
SwitchA
EBGP
GE2/0/0
200.1.2.2/24
GE3/0/0
SwitchB
AS 20
200.1.3.1/24
EBGP
GE3/0/0
200.1.3.2/24
SwitchC
AS 30
Switch
SwitchA
SwitchA
SwitchB
SwitchB
SwitchC
Interface
GigabitEthernet1/0/0
GigabitEthernet2/0/0
GigabitEthernet2/0/0
GigabitEthernet3/0/0
GigabitEthernet3/0/0
VLANIF interface
VLANIF 10
VLANIF 20
VLANIF 20
VLANIF 30
VLANIF 30
8 BGP Configuration
IP address
9.1.1.1/24
200.1.2.1/24
200.1.2.2/24
200.1.3.1/24
200.1.3.2/24
Configuration Roadmap
The configuration roadmap is as follows:
1.
Configure the EBGP connections between Switch A and Switch B, and between Switch B and Switch C.
2.
Configure the routing policy on Switch A, and advertise No_Export community attribute.
Data Preparation
To complete the configuration, you need the following data: l The router ID of Switch A is 1.1.1.1 and its AS number is 10.
l The router ID of Switch B is 2.2.2.2 and its AS number is 20.
l The router ID of Switch C is 3.3.3.3 and its AS number is 30.
Procedure
Step 1 Configure VLANs that interfaces belong to.
<Quidway> system-view
[Quidway] sysname SwitchA
[SwitchA] vlan batch 10 20
[SwitchA] interface gigabitethernet 1/0/0
[SwitchA-GigabitEthernet1/0/0] port hybrid pvid vlan 10
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
560
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 8 BGP Configuration
[SwitchA-GigabitEthernet1/0/0] port hybrid untagged vlan 10
[SwitchA-GigabitEthernet1/0/0] quit
[SwitchA] interface gigabitethernet 2/0/0
[SwitchA-GigabitEthernet2/0/0] port hybrid pvid vlan 20
[SwitchA-GigabitEthernet2/0/0] port hybrid untagged vlan 20
[SwitchA-GigabitEthernet2/0/0] quit
The configurations of SwitchB and SwitchC are similar to the configuration of SwitchA, and are not mentioned here.
Step 2 Assign an IP address to each VLANIF interface.
[SwitchA] interface vlanif 10
[SwitchA-Vlanif10] ip address 9.1.1.1 24
[SwitchA-Vlanif10] quit
[SwitchA] interface vlanif 20
[SwitchA-Vlanif20] ip address 200.1.2.1 24
[SwitchA-Vlanif20] quit
The configurations of SwitchB and SwitchC are similar to the configuration of SwitchA, and are not mentioned here.
Step 3 Configure EBGP.
# Configure Switch A.
[SwitchA] bgp 10
[SwitchA-bgp] router-id 1.1.1.1
[SwitchA-bgp] peer 200.1.2.2 as-number 20
[SwitchA-bgp] ipv4-family unicast
[SwitchA-bgp-af-ipv4] network 9.1.1.0 255.255.255.0
[SwitchA-bgp-af-ipv4] quit
# Configure Switch B.
[SwitchB] bgp 20
[SwitchB-bgp] router-id 2.2.2.2
[SwitchB-bgp] peer 200.1.2.1 as-number 10
[SwitchB-bgp] peer 200.1.3.2 as-number 30
[SwitchB-bgp] quit
# Configure Switch C.
[SwitchC] bgp 30
[SwitchC-bgp] router-id 3.3.3.3
[SwitchC-bgp] peer 200.1.3.1 as-number 20
[SwitchC-bgp] quit
# Check the routing table of Switch B.
[SwitchB] display bgp routing-table 9.1.1.0
BGP local router ID : 2.2.2.2
Local AS number : 20
Paths: 1 available, 1 best, 1 select
BGP routing table entry information of 9.1.1.0/24:
From: 200.1.2.1 (1.1.1.1)
Route Duration: 00h00m15s
Direct Out-interface: Vlanif20
Original nexthop: 200.1.2.1
Qos information : 0x0
AS-path 10, origin igp, MED 0, pref-val 0, valid, external, best, select, activ e, pre 255
Advertised to such 2 peers:
200.1.2.1
200.1.3.2
You can view that Switch B advertises the received routes to Switch C in AS 30.
# Check the routing table of Switch C.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
561
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
8 BGP Configuration
[SwitchC] display bgp routing-table
Total Number of Routes: 1
BGP Local router ID is 3.3.3.3
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal Path/Ogn
*> 9.1.1.0/24 200.1.3.1 0 20 10i
You can find that Switch C has learned a route to the destination 9.1.1.0/24 from Switch B.
Step 4 Configure BGP community attributes.
# Configure the routing policy on Switch A to enable Switch B not to advertise the routes advertised by Switch A to any other AS.
[SwitchA] route-policy comm_policy permit node 10
[SwitchA-route-policy] apply community no-export
[SwitchA-route-policy] quit
# Apply routing policies.
[SwitchA] bgp 10
[SwitchA-bgp] ipv4-family unicast
[SwitchA-bgp-af-ipv4] peer 200.1.2.2 route-policy comm_policy export
[SwitchA-bgp-af-ipv4] peer 200.1.2.2 advertise-community
# Check the routing table of Switch B.
[SwitchB] display bgp routing-table 9.1.1.0
BGP local router ID : 2.2.2.2
Local AS number : 20
Paths: 1 available, 1 best, 1 select
BGP routing table entry information of 9.1.1.0/24:
From: 200.1.2.1 (1.1.1.1)
Route Duration: 00h00m33s
Direct Out-interface: Vlanif20
Original nexthop: 200.1.2.1
Qos information : 0x0
Community:no-export
AS-path 10, origin igp, MED 0, pref-val 0, valid, external, best, select, activ e, pre 255
Not advertised to any peer yet
You can view the configured community attribute in the BGP routing table of Switch B. At this time, there are no routes to the destination 9.1.1.0/24 in the BGP routing table of Switch C.
----End
Configuration Files
l Configuration file of Switch A
#
sysname SwitchA
# vlan batch 10 20
# interface Vlanif10
ip address 9.1.1.1 255.255.255.0
# interface Vlanif20
ip address 200.1.2.1 255.255.255.0
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 10
port hybrid untagged vlan 10
#
Issue 01 (2011-10-26) 562
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Issue 01 (2011-10-26) interface GigabitEthernet2/0/0
port hybrid pvid vlan 20
port hybrid untagged vlan 20
# bgp 10
router-id 1.1.1.1
peer 200.1.2.2 as-number 20
#
ipv4-family unicast
undo synchronization
network 9.1.1.0 255.255.255.0
peer 200.1.2.2 enable
peer 200.1.2.2 route-policy comm_policy export
peer 200.1.2.2 advertise-community
# route-policy comm_policy permit node 10
apply community no-export
# return l Configuration file of Switch B
#
sysname SwitchB
# vlan batch 20 30
# interface Vlanif20
ip address 200.1.2.2 255.255.255.0
# interface Vlanif30
ip address 200.1.3.1 255.255.255.0
# interface GigabitEthernet2/0/0
port hybrid pvid vlan 20
port hybrid untagged vlan 20
# interface GigabitEthernet3/0/0
port hybrid pvid vlan 30
port hybrid untagged vlan 30
# bgp 20
router-id 2.2.2.2
peer 200.1.2.1 as-number 10
peer 200.1.3.2 as-number 30
#
ipv4-family unicast
undo synchronization
peer 200.1.2.1 enable
peer 200.1.3.2 enable
# return l Configuration file of Switch C
#
sysname SwitchC
# vlan batch 30
# interface Vlanif30
ip address 200.1.3.2 255.255.255.0
# interface GigabitEthernet3/0/0
port hybrid pvid vlan 30
port hybrid untagged vlan 30
# bgp 30
router-id 3.3.3.3
peer 200.1.3.1 as-number 20
#
ipv4-family unicast
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
8 BGP Configuration
563
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
undo synchronization
peer 200.1.3.1 enable
# return
8.21.6 Example for Configuring a BGP RR
Networking Requirements
, Switch A is a non-client. Switch B is the RR of cluster 1. Switch D
and Switch E are two clients of cluster 1. Because the IBGP connection is created between Switch
D and Switch E, they do not need an RR. Switch C is the RR of cluster 2. Switch F, Switch G, and Switch H are the clients of cluster 2.
It is required that the peer groups be used to simplify configuration and management.
Figure 8-6 Networking diagram for configuring a BGP RR
8 BGP Configuration
Issue 01 (2011-10-26)
GE1/0/3
SwitchA
Switch
SwitchA
SwitchA
SwitchA
SwitchB
SwitchB
SwitchB
SwitchB
SwitchC
SwitchC
SwitchC
SwitchC
SwitchC
GE1/0/1 GE1/0/2
SwitchB
GE1/0/3
GE1/0/1
SwitchD
AS 65010
GE1/0/1
GE1/0/2
GE1/0/4
GE1/0/1
GE1/0/2
GE1/0/3
SwitchC
SwitchH
GE2/0/1
GE1/0/1
GE1/0/4
Cluster2
GE1/0/1
Cluster1
GE1/0/1
GE1/0/2
GE1/0/2
SwitchE SwitchF
GE1/0/1
SwitchG
Interface
GigabitEthernet1/0/1
GigabitEthernet1/0/2
GigabitEthernet1/0/3
GigabitEthernet1/0/1
GigabitEthernet1/0/2
GigabitEthernet1/0/3
GigabitEthernet1/0/4
GigabitEthernet1/0/1
GigabitEthernet1/0/2
GigabitEthernet1/0/3
GigabitEthernet1/0/4
GigabitEthernet2/0/1
VLANIF interface
VLANIF 10
VLANIF 30
VLANIF 100
VLANIF 10
VLANIF 20
VLANIF 40
VLANIF 50
VLANIF 30
VLANIF 20
VLANIF 70
VLANIF 80
VLANIF 90
IP address
10.1.1.2/24
10.1.3.2/24
9.1.1.1/24
10.1.1.1/24
10.1.2.1/24
10.1.4.1/24
10.1.5.1/24
10.1.3.1/24
10.1.2.2/24
10.1.7.1/24
10.1.8.1/24
10.1.9.1/24
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
564
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
SwitchD
SwitchD
SwitchE
SwitchE
SwitchF
SwitchG
SwitchH
GigabitEthernet1/0/1
GigabitEthernet1/0/2
GigabitEthernet1/0/1
GigabitEthernet1/0/2
GigabitEthernet1/0/1
GigabitEthernet1/0/1
GigabitEthernet1/0/1
VLANIF 40
VLANIF 60
VLANIF 50
VLANIF 60
VLANIF 70
VLANIF 80
VLANIF 90
8 BGP Configuration
10.1.4.2/24
10.1.6.1/24
10.1.5.2/24
10.1.6.2/24
10.1.7.2/24
10.1.8.2/24
10.1.9.2/24
Configuration Roadmap
The configuration roadmap is as follows:
1.
Establish IBGP connections between the client and the RR, and between the non-client and the RR.
2.
Configure route reflection on Switch B and Switch C, specify the client, and check the routes.
Data Preparation
To complete the configuration, you need the following data: l
ID of the VLAN that each interface belongs to, as shown in
l
IP address of each VLANIF interface, as shown in
l Number of the AS where all Switch s reside being 65010 l Router IDs of Switch A, Switch B, Switch C, Switch D, Switch E, Switch F, Switch G, and
Switch H being 1.1.1.1, 2.2.2.2, 3.3.3.3, 4.4.4.4, 5.5.5.5, 6.6.6.6, 7.7.7.7, and 8.8.8.8
l ID of the cluster where Switch B resides being 1 and ID of the cluster where Switch C resides being 2
Procedure
Step 1 Create VLANs and add interfaces to the corresponding VLANs.
<Quidway> system-view
[Quidway] sysname SwitchA
[SwitchA] vlan batch 10 30 100
[SwitchA] interface gigabitethernet 1/0/1
[SwitchA-GigabitEthernet1/0/1] port hybrid pvid vlan 10
[SwitchA-GigabitEthernet1/0/1] port hybrid untagged vlan 10
[SwitchA-GigabitEthernet1/0/1] quit
[SwitchA] interface gigabitethernet 1/0/2
[SwitchA-GigabitEthernet1/0/2] port hybrid pvid vlan 30
[SwitchA-GigabitEthernet1/0/2] port hybrid untagged vlan 30
[SwitchA-GigabitEthernet1/0/2] quit
[SwitchA] interface gigabitethernet 1/0/3
[SwitchA-GigabitEthernet1/0/3] port hybrid pvid vlan 100
[SwitchA-GigabitEthernet1/0/3] port hybrid untagged vlan 100
[SwitchA-GigabitEthernet1/0/3] quit
The configurations of Switch B, Switch C, Switch D, Switch E, Switch F, Switch G, and Switch
H are the same as the configuration of Switch A, and are not mentioned here.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
565
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 8 BGP Configuration
Step 2 Assign an IP address to each VLANIF interface.
[SwitchA] interface vlanif 10
[SwitchA-Vlanif10] ip address 10.1.1.2 24
[SwitchA-Vlanif10] quit
[SwitchA] interface vlanif 30
[SwitchA-Vlanif30] ip address 10.1.3.2 24
[SwitchA-Vlanif30] quit
[SwitchA] interface vlanif 100
[SwitchA-Vlanif100] ip address 9.1.1.1 24
[SwitchA-Vlanif100] quit
Step 3 Establish IBGP connections between the clients and the RR, and between the non-clients and the RR. The configuration details are not mentioned here.
Step 4 Configure Switch A to advertise the local network route 9.1.1.0/24. The configuration details are not mentioned here.
Step 5 Configure the RR.
# Configure Switch B.
[SwitchB] bgp 65010
[SwitchB-bgp] router-id 2.2.2.2
[SwitchB-bgp] group in_rr internal
[SwitchB-bgp] peer 10.1.4.2 group in_rr
[SwitchB-bgp] peer 10.1.5.2 group in_rr
[SwitchB-bgp] ipv4-family unicast
[SwitchB-bgp-af-ipv4] peer in_rr reflect-client
[SwitchB-bgp-af-ipv4] undo reflect between-clients
[SwitchB-bgp-af-ipv4] reflector cluster-id 1
[SwitchB-bgp-af-ipv4] quit
[SwitchB-bgp] quit
# Configure Switch C.
[SwitchC] bgp 65010
[SwitchC-bgp] router-id 3.3.3.3
[SwitchC-bgp] group in_rr internal
[SwitchC-bgp] peer 10.1.7.2 group in_rr
[SwitchC-bgp] peer 10.1.8.2 group in_rr
[SwitchC-bgp] peer 10.1.9.2 group in_rr
[SwitchC-bgp] ipv4-family unicast
[SwitchC-bgp-af-ipv4] peer in_rr reflect-client
[SwitchC-bgp-af-ipv4] reflector cluster-id 2
[SwitchC-bgp-af-ipv4] quit
[SwitchC-bgp] quit
# Check the routing table of Switch D.
[SwitchD] display bgp routing-table 9.1.1.0
BGP local router ID : 4.4.4.4
Local AS number : 65010
Paths: 1 available, 0 best
BGP routing table entry information of 9.1.1.0/24:
From: 10.1.4.1 (2.2.2.2)
Original nexthop: 10.1.1.2
Convergence Priority:
AS-path Nil, origin igp, MED 0, localpref 100, pref-val 0, internal, pre 255
Originator: 1.1.1.1
Cluster list: 0.0.0.1
Not advertised to any peers yet
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
566
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
8 BGP Configuration
According to the routing table, you can view that Switch D has learned the route advertised by
Switch A from Switch B. You can also view the Originator and Cluster_ID of the route.
----End
Configuration Files
l Configuration file of Switch A
#
sysname SwitchA
#
vlan batch 10 30 100
# interface Vlanif10
ip address 10.1.1.2 255.255.255.0
# interface Vlanif30
ip address 10.1.3.2 255.255.255.0
# interface Vlanif100
ip address 9.1.1.1 255.255.255.0
# interface GigabitEthernet1/0/1
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# interface GigabitEthernet1/0/2
port hybrid pvid vlan 30
port hybrid untagged vlan 30
# interface GigabitEthernet1/0/3
port hybrid pvid vlan 100
port hybrid untagged vlan 100
# bgp 65010
router-id 1.1.1.1
peer 10.1.1.1 as-number 65010
peer 10.1.3.1 as-number 65010
#
ipv4-family unicast
undo synchronization
network 9.1.1.0 255.255.255.0
peer 10.1.1.1 enable
peer 10.1.3.1 enable
# return l Configuration file of Switch B
#
sysname SwitchB
#
vlan batch 10 20 40 50
# interface Vlanif10
ip address 10.1.1.1 255.255.255.0
# interface Vlanif20
ip address 10.1.2.1 255.255.255.0
# interface Vlanif40
ip address 10.1.4.1 255.255.255.0
# interface Vlanif50
ip address 10.1.5.1 255.255.255.0
# interface GigabitEthernet1/0/1
port hybrid pvid vlan 10
port hybrid untagged vlan 10
Issue 01 (2011-10-26) 567
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Issue 01 (2011-10-26)
# interface GigabitEthernet1/0/2
port hybrid pvid vlan 20
port hybrid untagged vlan 20
# interface GigabitEthernet1/0/3
port hybrid pvid vlan 40
port hybrid untagged vlan 40
# interface GigabitEthernet1/0/4
port hybrid pvid vlan 50
port hybrid untagged vlan 50
# bgp 65010
router-id 2.2.2.2
peer 10.1.1.2 as-number 65010
peer 10.1.2.2 as-number 65010
group in_rr internal
peer 10.1.4.2 as-number 65010
peer 10.1.4.2 group in_rr
peer 10.1.5.2 as-number 65010
peer 10.1.5.2 group in_rr
#
ipv4-family unicast
undo synchronization
undo reflect between-clients
reflector cluster-id 1
peer 10.1.1.2 enable
peer 10.1.2.2 enable
peer in_rr enable
peer in_rr reflect-client
peer 10.1.4.2 enable
peer 10.1.4.2 group in_rr
peer 10.1.5.2 enable
peer 10.1.5.2 group in_rr
# return l Configuration file of Switch C
#
sysname SwitchC
#
vlan batch 20 30 70 80 90
# interface Vlanif20
ip address 10.1.2.2 255.255.255.0
# interface Vlanif30
ip address 10.1.3.1 255.255.255.0
# interface Vlanif70
ip address 10.1.7.1 255.255.255.0
# interface Vlanif80
ip address 10.1.8.1 255.255.255.0
# interface Vlanif90
ip address 10.1.9.1 255.255.255.0
# interface GigabitEthernet1/0/1
port hybrid pvid vlan 30
port hybrid untagged vlan 30
# interface GigabitEthernet1/0/2
port hybrid pvid vlan 20
port hybrid untagged vlan 20
# interface GigabitEthernet1/0/3
port hybrid pvid vlan 70
port hybrid untagged vlan 70
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
8 BGP Configuration
568
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
# interface GigabitEthernet1/0/4
port hybrid pvid vlan 80
port hybrid untagged vlan 80
# interface GigabitEthernet2/0/1
port hybrid pvid vlan 90
port hybrid untagged vlan 90
# bgp 65010
router-id 3.3.3.3
peer 10.1.2.1 as-number 65010
peer 10.1.3.2 as-number 65010
group in_rr internal
peer 10.1.7.2 as-number 65010
peer 10.1.7.2 group in_rr
peer 10.1.8.2 as-number 65010
peer 10.1.8.2 group in_rr
peer 10.1.9.2 as-number 65010
peer 10.1.9.2 group in_rr
#
ipv4-family unicast
undo synchronization
reflector cluster-id 2
peer 10.1.2.1 enable
peer 10.1.3.2 enable
peer in_rr enable
peer in_rr reflect-client
peer 10.1.7.2 enable
peer 10.1.7.2 group in_rr
peer 10.1.8.2 enable
peer 10.1.8.2 group in_rr
peer 10.1.9.2 enable
peer 10.1.9.2 group in_rr
# return l Configuration file of Switch D
#
sysname SwitchD
#
vlan batch 40 60
# interface Vlanif40
ip address 10.1.4.2 255.255.255.0
# interface Vlanif60
ip address 10.1.6.1 255.255.255.0
# interface GigabitEthernet1/0/1
port hybrid pvid vlan 40
port hybrid untagged vlan 40
# interface GigabitEthernet1/0/2
port hybrid pvid vlan 60
port hybrid untagged vlan 60
# bgp 65010
router-id 4.4.4.4
peer 10.1.4.1 as-number 65010
peer 10.1.6.2 as-number 65010
#
ipv4-family unicast
undo synchronization
peer 10.1.4.1 enable
peer 10.1.6.2 enable
# return
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
8 BGP Configuration
569
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 8 BGP Configuration
NOTE
The configuration files of other Switch s are similar to the configuration file of Switch D, and are not mentioned here.
8.21.7 Example for Configuring a BGP Confederation
Networking Requirements
, several Switches run BGP in AS 200. To reduce the number of IBGP
connections, divide AS 200 into three sub-ASs, namely AS 65001, AS 65002, and AS 65003.
In addition, IBGP connections are set up between the three Switches in AS 65001.
Figure 8-7 Networking diagram for configuring a BGP confederation
GE1/0/2
SwitchF
AS 100
GE1/0/1
SwitchB
AS 65002
GE1/0/1
AS 200
GE1/0/1
SwitchC
AS 65003
GE1/0/1
GE2/0/1
SwitchA
GE1/0/2
AS 65001
GE1/0/1
GE1/0/3
GE1/0/4
SwitchD
GE1/0/2
GE1/0/1 GE1/0/2
SwitchE
Issue 01 (2011-10-26)
Switch
SwitchA
SwitchA
SwitchA
SwitchA
SwitchA
SwitchB
SwitchC
SwitchD
SwitchD
SwitchE
SwitchE
Interface
GigabitEthernet1/0/1
GigabitEthernet1/0/2
GigabitEthernet1/0/3
GigabitEthernet1/0/4
GigabitEthernet2/0/1
GigabitEthernet1/0/1
GigabitEthernet1/0/1
GigabitEthernet1/0/1
GigabitEthernet1/0/2
GigabitEthernet1/0/1
GigabitEthernet1/0/2
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
VLANIF interface
VLANIF 10
VLANIF 20
VLANIF 30
VLANIF 40
VLANIF 60
VLANIF 10
VLANIF 20
VLANIF 30
VLANIF 50
VLANIF 40
VLANIF 50
IP address
10.1.1.1/24
10.1.2.1/24
10.1.3.1/24
10.1.4.1/24
200.1.1.1/24
10.1.1.2/24
10.1.2.2/24
10.1.3.2/24
10.1.5.1/24
10.1.4.2/24
10.1.5.2/24
570
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
SwitchF
SwitchF
GigabitEthernet1/0/1
GigabitEthernet1/0/2
VLANIF 60
VLANIF 70
8 BGP Configuration
200.1.1.2/24
9.1.1.1/24
Configuration Roadmap
The configuration roadmap is as follows:
1.
Configure the BGP confederation on each Switch in AS 200.
2.
Establish IBGP connections in AS 65001.
3.
Establish EBGP connections between AS 100 and AS 200, and check the routes.
Data Preparation
To complete the configuration, you need the following data: l ID of the VLAN that each interface belongs to, as shown in
l
IP address of each VLANIF interface, as shown in
l Router IDs of Switch A, Switch B, Switch C, Switch D, Switch E, and Switch F being
1.1.1.1, 2.2.2.2, 3.3.3.3, 4.4.4.4, 5.5.5.5, and 6.6.6.6
l AS 100, AS 200, and three sub-AS numbers of AS 200 are 65001, 65002, and 65003
Procedure
Step 1 Create VLANs and add interfaces to the corresponding VLANs.
<Quidway> system-view
[Quidway] sysname SwitchA
[SwitchA] vlan batch 10 20 30 40 60
[SwitchA] interface gigabitethernet 1/0/1
[SwitchA-GigabitEthernet1/0/1] port hybrid pvid vlan 10
[SwitchA-GigabitEthernet1/0/1] port hybrid untagged vlan 10
[SwitchA-GigabitEthernet1/0/1] quit
[SwitchA] interface gigabitethernet 1/0/2
[SwitchA-GigabitEthernet1/0/2] port hybrid pvid vlan 20
[SwitchA-GigabitEthernet1/0/2] port hybrid untagged vlan 20
[SwitchA-GigabitEthernet1/0/2] quit
[SwitchA] interface gigabitethernet 1/0/3
[SwitchA-GigabitEthernet1/0/3] port hybrid pvid vlan 30
[SwitchA-GigabitEthernet1/0/3] port hybrid untagged vlan 30
[SwitchA-GigabitEthernet1/0/3] quit
[SwitchA] interface gigabitethernet 1/0/4
[SwitchA-GigabitEthernet1/0/4] port hybrid pvid vlan 40
[SwitchA-GigabitEthernet1/0/4] port hybrid untagged vlan 40
[SwitchA-GigabitEthernet1/0/4] quit
[SwitchA] interface gigabitethernet 2/0/1
[SwitchA-GigabitEthernet2/0/1] port hybrid pvid vlan 60
[SwitchA-GigabitEthernet2/0/1] port hybrid untagged vlan 60
[SwitchA-GigabitEthernet2/0/1] quit
The configurations of Switch B, Switch C, Switch D, Switch E, and Switch F are the same as the configuration of Switch A, and are not mentioned here.
Step 2 Assign an IP address to each VLANIF interface.
[SwitchA] interface vlanif 10
[SwitchA-Vlanif10] ip address 10.1.1.1 24
[SwitchA-Vlanif10] quit
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
571
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
8 BGP Configuration
[SwitchA] interface vlanif 20
[SwitchA-Vlanif20] ip address 10.1.2.1 24
[SwitchA-Vlanif20] quit
[SwitchA] interface vlanif 30
[SwitchA-Vlanif30] ip address 10.1.3.1 24
[SwitchA-Vlanif30] quit
[SwitchA] interface vlanif 40
[SwitchA-Vlanif40] ip address 10.1.4.1 24
[SwitchA-Vlanif40] quit
[SwitchA] interface vlanif 60
[SwitchA-Vlanif60] ip address 200.1.1.1 24
[SwitchA-Vlanif60] quit
The configurations of Switch B, Switch C, Switch D, Switch E, and Switch F are the same as the configuration of Switch A, and are not mentioned here.
Step 3 Configure the BGP confederation.
# Configure Switch A.
[SwitchA] bgp 65001
[SwitchA-bgp] router-id 1.1.1.1
[SwitchA-bgp] confederation id 200
[SwitchA-bgp] confederation peer-as 65002 65003
[SwitchA-bgp] peer 10.1.1.2 as-number 65002
[SwitchA-bgp] peer 10.1.2.2 as-number 65003
[SwitchA-bgp] ipv4-family unicast
[SwitchA-bgp-af-ipv4] peer 10.1.1.2 next-hop-local
[SwitchA-bgp-af-ipv4] peer 10.1.2.2 next-hop-local
[SwitchA-bgp-af-ipv4] quit
[SwitchA-bgp] quit
# Configure Switch B.
[SwitchB] bgp 65002
[SwitchB-bgp] router-id 2.2.2.2
[SwitchB-bgp] confederation id 200
[SwitchB-bgp] confederation peer-as 65001 65003
[SwitchB-bgp] peer 10.1.1.1 as-number 65001
[SwitchB-bgp] quit
# Configure Switch C.
[SwitchC] bgp 65003
[SwitchC-bgp] router-id 3.3.3.3
[SwitchC-bgp] confederation id 200
[SwitchC-bgp] confederation peer-as 65001 65002
[SwitchC-bgp] peer 10.1.2.1 as-number 65001
[SwitchC-bgp] quit
Step 4 Establish IBGP connection in AS 65001.
# Configure Switch A.
[SwitchA] bgp 65001
[SwitchA-bgp] peer 10.1.3.2 as-number 65001
[SwitchA-bgp] peer 10.1.4.2 as-number 65001
[SwitchA-bgp] ipv4-family unicast
[SwitchA-bgp-af-ipv4] peer 10.1.3.2 next-hop-local
[SwitchA-bgp-af-ipv4] peer 10.1.4.2 next-hop-local
[SwitchA-bgp-af-ipv4] quit
# Configure Switch D.
[SwitchD] bgp 65001
[SwitchD-bgp] router-id 4.4.4.4
[SwitchD-bgp] peer 10.1.3.1 as-number 65001
[SwitchD-bgp] peer 10.1.5.2 as-number 65001
[SwitchD-bgp] quit
Issue 01 (2011-10-26) 572
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
8 BGP Configuration
# Configure Switch E.
[SwitchE] bgp 65001
[SwitchE-bgp] router-id 5.5.5.5
[SwitchE-bgp] peer 10.1.4.1 as-number 65001
[SwitchE-bgp] peer 10.1.5.1 as-number 65001
[SwitchE-bgp] quit
Step 5 Establish an EBGP connection between AS 100 and AS 200.
# Configure Switch A.
[SwitchA] bgp 65001
[SwitchA-bgp] peer 200.1.1.2 as-number 100
[SwitchA-bgp] quit
# Configure Switch F.
[SwitchF] bgp 100
[SwitchF-bgp] router-id 6.6.6.6
[SwitchF-bgp] peer 200.1.1.1 as-number 200
[SwitchF-bgp] ipv4-family unicast
[SwitchF-bgp-af-ipv4] network 9.1.1.0 255.255.255.0
[SwitchF-bgp-af-ipv4] quit
[SwitchF-bgp] quit
Step 6 Verify the configuration.
# Check the BGP routing table of Switch B.
[SwitchB] display bgp routing-table
Total Number of Routes: 1
BGP Local router ID is 2.2.2.2
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal Path/Ogn
*>i 9.1.1.0/24 10.1.1.1 0 100 0 (65001) 100i
[SwitchB] display bgp routing-table 9.1.1.0
BGP local router ID : 2.2.2.2
Local AS number : 65002
Paths: 1 available, 1 best
BGP routing table entry information of 9.1.1.0/24:
From: 10.1.1.1 (1.1.1.1)
Relay Nexthop: 0.0.0.0
Original nexthop: 10.1.1.1
Convergence Priority: 0
AS-path (65001) 100, origin igp, MED 0, localpref 100, pref-val 0, valid, exter
nal-confed
, best, pre 255
Not advertised to any peers yet
# Check the BGP routing table of Switch D.
[SwitchD] display bgp routing-table
Total Number of Routes: 1
BGP Local router ID is 4.4.4.4
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal Path/Ogn
*>i 9.1.1.0/24 10.1.3.1 0 100 0 100i
Issue 01 (2011-10-26) 573
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
8 BGP Configuration
[SwitchD] display bgp routing-table 9.1.1.0
BGP local router ID : 4.4.4.4
Local AS number : 65001
Paths: 1 available, 1 best
BGP routing table entry information of 9.1.1.0/24:
From: 10.1.3.1 (1.1.1.1)
Relay Nexthop: 0.0.0.0
Original nexthop: 10.1.3.1
Convergence Priority: 0
AS-path 100, origin igp, MED 0, localpref 100, pref-val 0, valid, internal, best, pre 255
Not advertised to any peers yet
----End
Configuration Files
l Configuration file of Switch A
#
sysname SwitchA
#
vlan batch 10 20 30 40 60
# interface Vlanif10
ip address 10.1.1.1 255.255.255.0
# interface Vlanif20
ip address 10.1.2.1 255.255.255.0
# interface Vlanif30
ip address 10.1.3.1 255.255.255.0
# interface Vlanif40
ip address 10.1.4.1 255.255.255.0
# interface Vlanif60
ip address 200.1.1.1 255.255.255.0
# interface GigabitEthernet1/0/1
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# interface GigabitEthernet1/0/2
port hybrid pvid vlan 20
port hybrid untagged vlan 20
# interface GigabitEthernet1/0/3
port hybrid pvid vlan 30
port hybrid untagged vlan 30
# interface GigabitEthernet1/0/4
port hybrid pvid vlan 40
port hybrid untagged vlan 40
# interface GigabitEthernet2/0/1
port hybrid pvid vlan 60
port hybrid untagged vlan 60
# bgp 65001
router-id 1.1.1.1
confederation id 200
confederation peer-as 65002 65003
peer 10.1.1.2 as-number 65002
peer 10.1.2.2 as-number 65003
peer 10.1.3.2 as-number 65001
peer 10.1.4.2 as-number 65001
Issue 01 (2011-10-26) 574
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Issue 01 (2011-10-26)
peer 200.1.1.2 as-number 100
#
ipv4-family unicast
undo synchronization
peer 10.1.1.2 enable
peer 10.1.1.2 next-hop-local
peer 10.1.2.2 enable
peer 10.1.2.2 next-hop-local
peer 10.1.3.2 enable
peer 10.1.3.2 next-hop-local
peer 10.1.4.2 enable
peer 10.1.4.2 next-hop-local
peer 200.1.1.2 enable
# return l Configuration file of Switch B
#
sysname SwitchB
#
vlan batch 10
# interface Vlanif10
ip address 10.1.1.2 255.255.255.0
# interface GigabitEthernet1/0/1
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# bgp 65002
router-id 2.2.2.2
confederation id 200
confederation peer-as 65001 65003
peer 10.1.1.1 as-number 65001
#
ipv4-family unicast
undo synchronization
peer 10.1.1.1 enable
# return l Configuration file of Switch C
#
sysname SwitchC
#
vlan batch 20
# interface Vlanif20
ip address 10.1.2.2 255.255.255.0
# interface GigabitEthernet1/0/1
port hybrid pvid vlan 20
port hybrid untagged vlan 20
# bgp 65003
router-id 3.3.3.3
confederation id 200
confederation peer-as 65001 65002
peer 10.1.2.1 as-number 65001
#
ipv4-family unicast
undo synchronization
peer 10.1.2.1 enable
# return l Configuration file of Switch D
#
sysname SwitchD
#
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
8 BGP Configuration
575
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Issue 01 (2011-10-26)
vlan batch 30 50
# interface Vlanif30
ip address 10.1.3.2 255.255.255.0
# interface Vlanif50
ip address 10.1.5.1 255.255.255.0
# interface GigabitEthernet1/0/1
port hybrid pvid vlan 30
port hybrid untagged vlan 30
# interface GigabitEthernet1/0/2
port hybrid pvid vlan 50
port hybrid untagged vlan 50
# bgp 65001
router-id 4.4.4.4
peer 10.1.3.1 as-number 65001
peer 10.1.5.2 as-number 65001
#
ipv4-family unicast
undo synchronization
peer 10.1.3.1 enable
peer 10.1.3.1 next-hop-local
peer 10.1.5.2 enable
peer 10.1.5.2 next-hop-local
# return l Configuration file of Switch E
#
sysname SwitchE
#
vlan batch 40 50
# interface Vlanif40
ip address 10.1.4.2 255.255.255.0
# interface Vlanif50
ip address 10.1.5.2 255.255.255.0
# interface GigabitEthernet1/0/1
port hybrid pvid vlan 40
port hybrid untagged vlan 40
# interface GigabitEthernet1/0/2
port hybrid pvid vlan 50
port hybrid untagged vlan 50
# bgp 65001
router-id 5.5.5.5
peer 10.1.4.1 as-number 65001
peer 10.1.5.1 as-number 65001
#
ipv4-family unicast
undo synchronization
peer 10.1.4.1 enable
peer 10.1.4.1 next-hop-local
peer 10.1.5.1 enable
peer 10.1.5.1 next-hop-local
# return l Configuration file of Switch F
#
sysname SwitchF
#
vlan batch 60 70
#
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
8 BGP Configuration
576
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing interface Vlanif60
ip address 200.1.1.2 255.255.255.0
# interface Vlanif70
ip address 9.1.1.1 255.255.255.0
# interface GigabitEthernet1/0/1
port hybrid pvid vlan 60
port hybrid untagged vlan 60
# interface GigabitEthernet1/0/2
port hybrid pvid vlan 70
port hybrid untagged vlan 70
# bgp 100
router-id 6.6.6.6
ipv4-family unicast
undo synchronization
network 9.1.1.0 255.255.255.0
peer 200.1.1.1 as-number 200
# return
8.21.8 Example for Configuring a BGP Routing Policy
8 BGP Configuration
Networking Requirements
, two sites, each of which has two
PEs accessing the core layer, are taken as an example. The core layer is divided into two planes.
All the P nodes on the same plane are full-meshed P nodes. Nodes on different planes are connected to provide backup paths across plane. MP-BGP is used to advertise inner labels and
VPNv4 routes between the PEs. All PEs set up MP-IBGP peer relationships with the RR.
NOTE
is a simplified networking diagram, in which two sites are taken as an example and each plane
takes three P nodes and one RR as an example. In the actual network, there are 14 sites with 28 PEs and each plane has four P nodes and two RR nodes, and each RR needs to set up MP-IBGP connections with
28 PEs.
Figure 8-8 Networking diagram
P1
P3
Plane A
PE1 PE3
P5
VPN site 2
10.22.1.0/24
Issue 01 (2011-10-26)
VPN site 1
10.21.1.0/24
RR
P2
PE2
P6
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
P4
PE4
577
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 8 BGP Configuration
, each PE sends BGP Update messages to the RR, other PEs receive BGP Update
messages from different planes. Therefore, routing policies need to be deployed to ensure that one VPN flow is transmitted only through one plane.
Configuration Roadmap
The configuration roadmap is as follows:
1.
Configure different RDs for two PEs in the same site to ensure that each PE can receive two routes from different BGP next hops in the remote site. When two PEs in a site advertise the routes to the same destination, configuring different RDs for the two PEs can ensure that BGP peers consider the advertised routes as two different routes. This is because BGP-
VPNv4 uses the VPNv4 addresses that consist of IPv4 addresses and RDs.
2.
Assign different communities for BGP routes from PE in plane A and BGP routes from PE in plane B.
3.
Set different local preferences for routes based on the community attributes of the routes.
In this manner, the PEs in plane A choose the routes advertised by remote PEs in plane A, and the PEs in plane B always choose the routes advertised by the remote PEs in plane B.
Data Preparation
To complete the configuration, you need the following data.
Table 8-2 IP addresses of physical interfaces
Local Device Local Interface and Its IP
Address
Remote Interface and Its IP
Address
P1
P1
P1
P1
P1
P2
P2
GE 1/0/0
10.1.1.1/30
GE 2/0/0
10.1.2.1/30
GE 3/0/0
10.1.3.1/30
GE 4/0/0
10.1.4.1/30
GE 5/0/0
10.1.5.1/30
GE 4/0/0
10.1.6.1/30
GE 3/0/0
10.1.7.1/30
GE 1/0/0
10.1.1.2/30
GE 1/0/0
10.1.2.2/30
GE 1/0/0
10.1.3.2/30
GE 1/0/0
10.1.4.2/30
GE 1/0/0
10.1.5.2/30
GE 1/0/0
10.1.6.2/30
GE 1/0/0
10.1.7.2/30
Remote
Device
P3
VLA
NIF interf ace
VLAN
IF 10
P5
RR
VLAN
IF 20
VLAN
IF 30
P2
PE1
P6
P4
VLAN
IF 40
VLAN
IF 50
VLAN
IF 80
VLAN
IF 70
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
578
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 8 BGP Configuration
Issue 01 (2011-10-26)
Local Device Local Interface and Its IP
Address
Remote Interface and Its IP
Address
P2
P2
P3
P3
P3
P4
P4
P5
PE1
PE3
GE 2/0/0
10.1.8.1/30
GE 5/0/0
10.1.9.1/30
GE 2/0/0
10.1.10.1/30
GE 3/0/0
10.1.11.1/30
GE 4/0/0
10.1.12.1/30
GE 3/0/0
10.1.13.1/30
GE 4/0/0
10.1.14.1/30
GE 3/0/0
10.1.15.1/30
GE 2/0/0
10.1.16.1/30
GE 2/0/0
10.1.17.1/30
GE 2/0/0
10.1.8.2/30
GE 1/0/0
10.1.9.2/30
GE 2/0/0
10.1.10.2/30
GE 2/0/0
10.1.11.2/30
GE 1/0/0
10.1.12.2/30
GE 3/0/0
10.1.13.2/30
GE 1/0/0
10.1.14.2/30
GE 2/0/0
10.1.15.2/30
GE 2/0/0
10.1.16.2/30
GE 2/0/0
10.1.17.2/30
Table 8-3 IP addresses of loopback interfaces
Local Device IP Address of the local Loopback 0
Interface
P1 10.1.1.9/32
P3
P5
PE1
PE3
10.3.3.9/32
10.5.5.9/32
10.7.7.9/32
10.9.9.9/32
Remote Device
P2
P4
P6
PE2
RR 10.11.11.9/32 -
PE4
-
Remote
Device
RR
VLA
NIF interf ace
VLAN
IF 60
PE2
P5
P4
PE3
P6
PE4
P6
PE2
PE4
IP Address of the
Remote Loopback
0 Interface
10.2.2.9/32
10.4.4.9/32
10.6.6.9/32
10.8.8.9/32
10.10.10.9/32
VLAN
IF 150
VLAN
IF 160
VLAN
IF 170
VLAN
IF 100
VLAN
IF 140
VLAN
IF 90
VLAN
IF 110
VLAN
IF 120
VLAN
IF 130
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
579
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Table 8-4 BGP parameter Value
BGP Parameter
AS number
Router ID
BGP community attribute
BGP local preference
Routing policy name
8 BGP Configuration
Value
65000
Same as the address of Loopback 0 interface
Plane A: 65000:100
Plane B: 65000:200
Plane A: The local preference of community attribute 65000:100 is set to 200.
Plane B: The local preference of community attribute 65000:200 is set to 200.
NOTE
By default, the BGP local preference is 100. The greater the value, the higher the preference.
Route import policy: local_pre
Route export policy: comm
1
Client
Community filter name
BGP peer group name
Procedure
Step 1 Configure names for devices and IP addresses for interfaces.
For detailed configurations, see the configuration files of this example.
Step 2 Configure an IGP.
In this example, IS-IS is used as an IGP. For detailed configurations, see the configuration files of this example.
After the configuration, run the display ip routing-table command. You can view that PEs, Ps and PEs, and Ps have learned the addresses of Loopback 0 interfaces from each other.
Step 3 Establish MP-IBGP connections between the PEs and RR.
# Take the configuration of PE1 as an example. Configurations of other PEs are the same as that of PE1, and are not mentioned here.
[PE1] bgp 65000
[PE1-bgp] peer 10.11.11.9 as-number 65000
[PE1-bgp] peer 10.11.11.9 connect-interface LoopBack0
[PE1-bgp] ipv4-family unicast
[PE1-bgp-af-ipv4] undo peer 10.11.11.9 enable
[PE1-bgp] ipv4-family vpnv4
[PE1-bgp-af-vpnv4] peer 10.11.11.9 enable
# Configure the RR.
[RR] bgp 65000
[RR-bgp] group client internal
[RR-bgp] peer client connect-interface LoopBack0
[RR-bgp] ipv4-family unicast
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
580
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
8 BGP Configuration
[RR-bgp-af-ipv4] undo peer client enable
[RR-bgp-af-ipv4] quit
[RR-bgp] ipv4-family vpnv4
[RR-bgp-af-vpnv4] undo policy vpn-target
[RR-bgp-af-vpnv4] peer client enable
[RR-bgp-af-vpnv4] peer 10.7.7.9 group client
[RR-bgp-af-vpnv4] peer 10.8.8.9 group client
[RR-bgp-af-vpnv4] peer 10.9.9.9 group client
[RR-bgp-af-vpnv4] peer 10.10.10.9 group client
[RR-bgp-af-vpnv4] peer client reflect-client
NOTE
You need to run the undo policy vpn-target command in the BGP-VPNv4 address family view of the RR to ensure that VPN-target-based filtering is not performed on VPNv4 routes. By default, an RR performs
VPN-target-based filtering on the received VPNv4 routes. The matching routes are added to the VPN routing table, and the other routes are discarded. In this example, VPN instances are not configured on the
RR. As a result, if VPN-target-based filtering is enabled, all the received VPNv4 routes will be discarded.
After the configuration, run the display bgp vpnv4 all peer command on the RR. You can view that the RR sets up MP-IBGP peers with all PEs.
<RR> display bgp vpnv4 all peer
BGP local router ID : 10.11.11.9
Local AS number : 65000
Total number of peers : 4 Peers in established state : 4
Peer V AS MsgRcvd MsgSent OutQ Up/Down State
PrefRcv
10.7.7.9 4 65000 79 82 0 00:01:31 Established
0
10.8.8.9 4 65000 42 66 0 00:01:16 Established
0
10.9.9.9 4 65000 21 34 0 00:00:50 Established
0
10.10.10.9 4 65000 2 4 0 00:00:21 Established
0
Step 4 Configure a routing policy.
NOTE
Take the configurations of PE1, PE2, and the RR as an example. The configurations of PE3 and PE4 are the same as the configurations of PE1 and PE2 respectively, and are not mentioned here.
# Configure a routing policy on PE1 so that the BGP VPNv4 route advertised by PE1 can carry community attribute 65000:100.
[PE1] route-policy comm permit node 10
[PE1-route-policy] apply community 65000:100
# Configure the routing policy on PE2 so that the BGP VPNv4 route advertised by PE2 can carry community attribute 65000:200.
[PE2] route-policy com permit node 10
[PE2-route-policy] apply community 65000:200
# On PE1, apply the routing policy to the BGP VPNv4 route advertised by PE1 to the RR so that the route can carry the community attribute.
[PE1] bgp 65000
[PE1-bgp] ipv4-family vpnv4
[PE1-bgp-af-vpnv4] peer 10.11.11.9 route-policy comm export
[PE1-bgp-af-vpnv4] peer 10.11.11.9 advertise-community
# On PE2, apply the routing policy to the advertised BGP VPNv4 route advertised by PE2 to the RR so that the route can carry the community attribute.
[PE2] bgp 65000
[PE2-bgp] ipv4-family vpnv4
Issue 01 (2011-10-26) 581
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 8 BGP Configuration
[PE2-bgp-af-vpnv4] peer 10.11.11.9 route-policy comm export
[PE2-bgp-af-vpnv4] peer 10.11.11.9 advertise-community
# Configure the RR to advertise the community attribute to the PEs.
[RR] bgp 65000
[RR-bgp] ipv4-family vpnv4
[RR-bgp-af-vpnv4] peer client advertise-community
# Configure the community attribute filter on PE1.
[PE1] ip community-filter 1 permit 65000:100
# Configure the community attribute filter on PE2.
[PE2] ip community-filter 1 permit 65000:200
# On PE1, configure a routing policy and set the local preference of the route with community attribute 65000:100 to 200.
[PE1] route-policy local_pre permit node 10
[PE1-route-policy] if-match community-filter 1
[PE1-route-policy] apply local-preference 200
[PE1-route-policy] quit
# On PE2, configure a routing policy and set the local preference of the route with community attribute 65000:200 to 200.
[PE2] route-policy local_pre permit node 10
[PE2-route-policy] if-match community-filter 1
[PE2-route-policy] apply local-preference 200
[PE2-route-policy] quit
# On PE1, apply the routing policy to the imported BGP VPNv4 route so that the PE1 chooses the route advertised by the remote PEs in plane A.
[PE1] bgp 65000
[PE1-bgp] ipv4-family vpnv4
[PE1-bgp-af-vpnv4] peer 10.11.11.9 route-policy local_pre import
# On PE2, apply the routing policy to the imported BGP VPNv4 route so that the PE2 chooses the route advertised by the remote PEs in plane B.
[PE2] bgp 65000
[PE2-bgp] ipv4-family vpnv4
[PE2-bgp-af-vpnv4] peer 10.11.11.9 route-policy local_pre import
NOTE
After this configuration, you also need to configure MPLS, establish tunnels, configure MPLS L3VPN, and configure PEs to access CEs. For detailed configurations, see the configuration files in this example.
Step 5 Verify the configuration.
Run the display bgp vpnv4 all routing-table community command on a PE. You can view information about the VPNv4 routes with community attributes. Take the display on PE1 and
PE2 as an example.
[PE1] display bgp vpnv4 all routing-table community
Total Number of Routes from all PE: 2
BGP Local router ID is 10.7.7.9
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Route Distinguisher: 65000:10001012
Network NextHop MED LocPrf PrefVal Community
*> 10.22.1.0/24 10.9.9.9 0 200 65000:100
* 10.10.10.9 0 100 65000:200
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
582
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
8 BGP Configuration
Total routes of vpn-instance NGN_Media: 2
Network NextHop MED LocPrf PrefVal Community
*>i 10.22.1.0/24 10.9.9.9 0 200 0 65000:100
* 10.10.10.9 0 100 0 65000:200
[PE2] display bgp vpnv4 all routing-table community
Total Number of Routes from all PE: 2
BGP Local router ID is 10.8.8.9
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Route Distinguisher: 65000:10001011
Network NextHop MED LocPrf PrefVal Community
*> 10.22.1.0/24 10.10.10.9 0 200 65000:200
* 10.9.9.9 0 100 65000:100
Total routes of vpn-instance NGN_Media: 2
Network NextHop MED LocPrf PrefVal Community
*>i 10.22.1.0/24 10.10.10.9 0 200 0 65000:200
* 10.9.9.9 0 100 0 65000:100
Run the display ip routing-table vpn-instance NGN_Media 10.22.1.0 24 command on PE1, and you can find that the next hop of route 10.22.1.0/24 is PE3. That is, PE1 chooses the route advertised by PE3.
[PE1] display ip routing-table vpn-instance NGN_Media 10.22.1.0 24
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: NGN_Media
Destination/Mask Proto Pre Cost Flags NextHop Interface
10.22.1.0/24 BGP 255 0 RD 10.9.9.9 Vlanif10
----End
Configuration Files
l Configuration file of P1
#
sysname P1
# vlan batch 10 20 30 40 50
#
mpls lsr-id 10.1.1.9
mpls
# mpls ldp
# isis 64
network-entity 49.0091.0100.0100.1009.00
# interface Vlanif10
description toP3Vlanif10
ip address 10.1.1.1 255.255.255.252
isis enable 64
mpls
mpls ldp
# interface Vlanif20
description toP5Vlanif20
ip address 10.1.2.1 255.255.255.252
isis enable 64
mpls
mpls ldp
# interface Vlanif30
description toRRVlanif30
ip address 10.1.3.1 255.255.255.252
Issue 01 (2011-10-26) 583
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Issue 01 (2011-10-26)
isis enable 64
mpls
mpls ldp
# interface Vlanif40
description toP2Vlanif40
ip address 10.1.4.1 255.255.255.252
isis enable 64
mpls
mpls ldp
# interface Vlanif50
description toP1Vlanif50
ip address 10.1.5.1 255.255.255.252
isis enable 64
mpls
mpls ldp
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# interface GigabitEthernet2/0/0
port hybrid pvid vlan 20
port hybrid untagged vlan 20
# interface GigabitEthernet3/0/0
port hybrid pvid vlan 30
port hybrid untagged vlan 30
# interface GigabitEthernet4/0/0
port hybrid pvid vlan 40
port hybrid untagged vlan 40
# interface GigabitEthernet5/0/0
port hybrid pvid vlan 50
port hybrid untagged vlan 50
# interface LoopBack0
ip address 10.1.1.9 255.255.255.255
isis enable 64
# return l Configuration file of P2
#
sysname P2
# vlan batch 40 60 70 80 90
#
mpls lsr-id 10.2.2.9
mpls
# mpls ldp
# isis 64
network-entity 49.0091.0100.0200.2009.00
# interface Vlanif40
description toP1Vlanif40
ip address 10.1.4.2 255.255.255.252
isis enable 64
mpls
mpls ldp
# interface Vlanif60
description toRRVlanif60
ip address 10.1.8.1 255.255.255.252
isis enable 64
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
8 BGP Configuration
584
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Issue 01 (2011-10-26)
mpls
mpls ldp
# interface Vlanif70
description toP4Vlanif70
ip address 10.1.7.1 255.255.255.252
isis enable 64
mpls
mpls ldp
# interface Vlanif80
description toP6Vlanif80
ip address 10.1.6.1 255.255.255.252
isis enable 64
mpls
mpls ldp
# interface Vlanif90
description toPE2Vlanif90
ip address 10.1.9.1 255.255.255.252
isis enable 64
mpls
mpls ldp
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 40
port hybrid untagged vlan 40
# interface GigabitEthernet2/0/0
port hybrid pvid vlan 60
port hybrid untagged vlan 60
# interface GigabitEthernet3/0/0
port hybrid pvid vlan 70
port hybrid untagged vlan 70
# interface GigabitEthernet4/0/0
port hybrid pvid vlan 80
port hybrid untagged vlan 80
# interface GigabitEthernet5/0/0
port hybrid pvid vlan 90
port hybrid untagged vlan 90
# interface LoopBack0
ip address 10.2.2.9 255.255.255.255
isis enable 64
# return l Configuration file of P3
#
sysname P3
# vlan batch 10 110 120 130
#
mpls lsr-id 10.3.3.9
mpls
# mpls ldp
# isis 64
network-entity 49.0091.0100.0300.3009.00
# interface Vlanif10
description toP1Vlanif10
ip address 10.1.1.2 255.255.255.252
isis enable 64
mpls
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
8 BGP Configuration
585
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Issue 01 (2011-10-26)
mpls ldp
# interface Vlanif110
description toP5Vlanif110
ip address 10.1.10.1 255.255.255.252
isis enable 64
mpls
mpls ldp
# interface Vlanif120
description toP4Vlanif120
ip address 10.1.11.1 255.255.255.252
isis enable 64
mpls
mpls ldp
# interface Vlanif130
description toPE3Vlanif130
ip address 10.1.12.1 255.255.255.252
isis enable 64
mpls
mpls ldp
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# interface GigabitEthernet2/0/0
port hybrid pvid vlan 110
port hybrid untagged vlan 110
# interface GigabitEthernet3/0/0
port hybrid pvid vlan 120
port hybrid untagged vlan 120
# interface GigabitEthernet4/0/0
port hybrid pvid vlan 130
port hybrid untagged vlan 130
# interface LoopBack0
ip address 10.3.3.9 255.255.255.255
isis enable 64
# return l Configuration file of P4
#
sysname P4
# vlan batch 70 120 150 160
#
mpls lsr-id 10.4.4.9
mpls
# mpls ldp
# isis 64
network-entity 49.0091.0100.0400.4009.00
# interface Vlanif70
description toP2Vlanif70
ip address 10.1.7.2 255.255.255.252
isis enable 64
mpls
mpls ldp
# interface Vlanif120
description toP3Vlanif120
ip address 10.1.11.2 255.255.255.252
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
8 BGP Configuration
586
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Issue 01 (2011-10-26)
isis enable 64
mpls
mpls ldp
# interface Vlanif150
description toP6Vlanif150
ip address 10.1.13.1 255.255.255.252
isis enable 64
mpls
mpls ldp
# interface Vlanif160
description toPE4Vlanif160
ip address 10.1.14.1 255.255.255.252
isis enable 64
mpls
mpls ldp
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 70
port hybrid untagged vlan 70
# interface GigabitEthernet2/0/0
port hybrid pvid vlan 120
port hybrid untagged vlan 120
# interface GigabitEthernet3/0/0
port hybrid pvid vlan 150
port hybrid untagged vlan 150
# interface GigabitEthernet4/0/0
port hybrid pvid vlan 160
port hybrid untagged vlan 160
# interface LoopBack0
ip address 10.4.4.9 255.255.255.255
isis enable 64
# return l Configuration file of P5
#
sysname P5
# vlan batch 20 110 170
#
mpls lsr-id 10.5.5.9
mpls
# mpls ldp
# isis 64
network-entity 49.0091.0100.0500.5009.00
# interface Vlanif20
description toP1Vlanif20
ip address 10.1.2.2 255.255.255.252
isis enable 64
mpls
mpls ldp
# interface Vlanif110
description toP3Vlanif110
ip address 10.1.10.2 255.255.255.252
isis enable 64
mpls
mpls ldp
# interface Vlanif170
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
8 BGP Configuration
587
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Issue 01 (2011-10-26)
description toP6Vlanif170
ip address 10.1.15.1 255.255.255.252
isis enable 64
mpls
mpls ldp
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 20
port hybrid untagged vlan 20
# interface GigabitEthernet2/0/0
port hybrid pvid vlan 110
port hybrid untagged vlan 110
# interface GigabitEthernet3/0/0
port hybrid pvid vlan 170
port hybrid untagged vlan 170
# interface LoopBack0
ip address 10.5.5.9 255.255.255.255
isis enable 64
# return l Configuration file of P6
#
sysname P6
# vlan batch 80 150 170
#
mpls lsr-id 10.6.6.9
mpls
# mpls ldp
# isis 64
network-entity 49.0091.0100.0600.6009.00
# interface Vlanif80
description toP2Vlanif80
ip address 10.1.6.2 255.255.255.252
isis enable 64
mpls
mpls ldp
# interface Vlanif170
description toP5Vlanif170
ip address 10.1.15.2 255.255.255.252
isis enable 64
mpls
mpls ldp
# interface Vlanif150
description toP4Vlanif150
ip address 10.1.13.2 255.255.255.252
isis enable 64
mpls
mpls ldp
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 80
port hybrid untagged vlan 80
# interface GigabitEthernet2/0/0
port hybrid pvid vlan 170
port hybrid untagged vlan 170
# interface GigabitEthernet3/0/0
port hybrid pvid vlan 150
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
8 BGP Configuration
588
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Issue 01 (2011-10-26)
port hybrid untagged vlan 150
# interface LoopBack0
ip address 10.6.6.9 255.255.255.255
isis enable 64
# return l Configuration file of PE1
#
sysname PE1
# vlan batch 50 100
# ip vpn-instance NGN_Media
route-distinguisher 65000:10001012
apply-label per-instance
vpn-target 65000:100 export-extcommunity
vpn-target 65000:100 65000:200 65000:300 import-extcommunity ip vpn-instance NGN_Other
route-distinguisher 65000:30001012
apply-label per-instance
vpn-target 65000:300 export-extcommunity
vpn-target 65000:100 65000:200 65000:300 import-extcommunity ip vpn-instance NGN_Signaling
route-distinguisher 65000:20001012
apply-label per-instance
vpn-target 65000:200 export-extcommunity
vpn-target 65000:100 65000:200 65000:300 import-extcommunity
#
mpls lsr-id 10.7.7.9
mpls
# mpls ldp
# isis 64
network-entity 49.0091.0100.0700.7009.00
# interface Vlanif50
description toP1Vlanif50
ip address 10.1.5.2 255.255.255.252
isis enable 64
mpls
mpls ldp
# interface Vlanif100
description toPE2Vlanif100
ip address 10.1.16.1 255.255.255.252
isis enable 64
mpls
mpls ldp
# interface GigabitEthernet3/0/0
# interface GigabitEthernet3/0/0.10
control-vid 1000 dot1q-termination
dot1q termination vid 180
ip binding vpn-instance NGN_Media
ip address 10.21.1.73 255.255.255.252
# interface GigabitEthernet3/0/0.11
control-vid 1100 dot1q-termination
dot1q termination vid 190
ip binding vpn-instance NGN_Signaling
ip address 10.21.1.77 255.255.255.252
# interface GigabitEthernet3/0/0.12
control-vid 1200 dot1q-termination
dot1q termination vid 200
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
8 BGP Configuration
589
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Issue 01 (2011-10-26)
ip binding vpn-instance NGN_Other
ip address 10.21.1.81 255.255.255.252
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 50
port hybrid untagged vlan 50
# interface GigabitEthernet2/0/0
port hybrid pvid vlan 100
port hybrid untagged vlan 100
# interface LoopBack0
ip address 10.7.7.9 255.255.255.255
isis enable 64
# bgp 65000
peer 10.11.11.9 as-number 65000
peer 10.11.11.9 connect-interface LoopBack0
#
ipv4-family unicast
undo synchronization
undo peer 10.11.11.9 enable
#
ipv4-family vpnv4
policy vpn-target
peer 10.11.11.9 enable
peer 10.11.11.9 route-policy local_pre import
peer 10.11.11.9 route-policy comm export
peer 10.11.11.9 advertise-community
#
ipv4-family vpn-instance NGN_Media
aggregate 10.21.1.0 255.255.255.0 detail-suppressed
import-route direct
#
ipv4-family vpn-instance NGN_Other
aggregate 10.21.1.0 255.255.255.0 detail-suppressed
import-route direct
#
ipv4-family vpn-instance NGN_Signaling
aggregate 10.21.1.0 255.255.255.0 detail-suppressed
import-route direct
# route-policy comm permit node 10
apply community 65000:100
# route-policy local_pre permit node 10
if-match community-filter 1
apply local-preference 200
#
ip community-filter 1 permit 65000:100
# return l Configuration file of PE2
#
sysname PE2
# vlan batch 90 100
# ip vpn-instance NGN_Media
route-distinguisher 65000:10001011
apply-label per-instance
vpn-target 65000:100 export-extcommunity
vpn-target 65000:100 65000:200 65000:300 import-extcommunity ip vpn-instance NGN_Other
route-distinguisher 65000:30001011
apply-label per-instance
vpn-target 65000:300 export-extcommunity
vpn-target 65000:100 65000:200 65000:300 import-extcommunity ip vpn-instance NGN_Signaling
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
8 BGP Configuration
590
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
route-distinguisher 65000:20001011
apply-label per-instance
vpn-target 65000:200 export-extcommunity
vpn-target 65000:100 65000:200 65000:300 import-extcommunity
#
mpls lsr-id 10.8.8.9
mpls
# mpls ldp
# isis 64
network-entity 49.0091.0100.0800.8009.00
# interface Vlanif90
description toP2Vlanif90
ip address 10.1.9.2 255.255.255.252
isis enable 64
mpls
mpls ldp
# interface Vlanif100
description toPE1Vlanif100
ip address 10.1.16.2 255.255.255.252
isis enable 64
mpls
mpls ldp
# interface GigabitEthernet3/0/0
# interface GigabitEthernet3/0/0.10
control-vid 1000 dot1q-termination
dot1q termination vid 210
ip binding vpn-instance NGN_Media
ip address 10.21.1.13 255.255.255.252
# interface GigabitEthernet3/0/0.11
control-vid 1100 dot1q-termination
dot1q termination vid 220
ip binding vpn-instance NGN_Signaling
ip address 10.21.1.17 255.255.255.252
# interface GigabitEthernet3/0/0.12
control-vid 1200 dot1q-termination
dot1q termination vid 230
ip binding vpn-instance NGN_Other
ip address 10.21.1.21 255.255.255.252
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 90
port hybrid untagged vlan 90
# interface GigabitEthernet2/0/0
port hybrid pvid vlan 100
port hybrid untagged vlan 100
# interface LoopBack0
ip address 10.8.8.9 255.255.255.255
isis enable 64
# bgp 65000
peer 10.11.11.9 as-number 65000
peer 10.11.11.9 connect-interface LoopBack0
#
ipv4-family unicast
undo synchronization
undo peer 10.11.11.9 enable
#
ipv4-family vpnv4
policy vpn-target
8 BGP Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
591
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Issue 01 (2011-10-26)
peer 10.11.11.9 enable
peer 10.11.11.9 route-policy local_pre import
peer 10.11.11.9 route-policy comm export
peer 10.11.11.9 advertise-community
#
ipv4-family vpn-instance NGN_Media
aggregate 10.21.1.0 255.255.255.0 detail-suppressed
import-route direct
#
ipv4-family vpn-instance NGN_Other
aggregate 10.21.1.0 255.255.255.0 detail-suppressed
import-route direct
#
ipv4-family vpn-instance NGN_Signaling
aggregate 10.21.1.0 255.255.255.0 detail-suppressed
import-route direct
# route-policy comm permit node 10
apply community 65000:200
# route-policy local_pre permit node 10
if-match community-filter 1
apply local-preference 200
#
ip community-filter 1 permit 65000:200
# return l Configuration file of PE3
#
sysname PE3
# vlan batch 130 140
# ip vpn-instance NGN_Media
route-distinguisher 65000:10000811
apply-label per-instance
vpn-target 65000:100 export-extcommunity
vpn-target 65000:100 65000:200 65000:300 import-extcommunity ip vpn-instance NGN_Other
route-distinguisher 65000:30000811
apply-label per-instance
vpn-target 65000:300 export-extcommunity
vpn-target 65000:100 65000:200 65000:300 import-extcommunity ip vpn-instance NGN_Signaling
route-distinguisher 65000:20000811
apply-label per-instance
vpn-target 65000:200 export-extcommunity
vpn-target 65000:100 65000:200 65000:300 import-extcommunity
#
mpls lsr-id 10.9.9.9
mpls
# mpls ldp
# isis 64
network-entity 49.0091.0100.0900.9009.00
# interface Vlanif130
description toP3Vlanif130
ip address 10.1.12.2 255.255.255.252
isis enable 64
mpls
mpls ldp
# interface Vlanif140
description toPE4Vlanif140
ip address 10.1.17.1 255.255.255.252
isis enable 64
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
8 BGP Configuration
592
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
mpls
mpls ldp
# interface GigabitEthernet3/0/0
# interface GigabitEthernet3/0/0.10
control-vid 1000 dot1q-termination
dot1q termination vid 240
ip binding vpn-instance NGN_Media
ip address 10.22.1.73 255.255.255.252
# interface GigabitEthernet3/0/0.11
control-vid 1100 dot1q-termination
dot1q termination vid 250
ip binding vpn-instance NGN_Signaling
ip address 10.22.1.77 255.255.255.252
# interface GigabitEthernet3/0/0.12
control-vid 1200 dot1q-termination
dot1q termination vid 260
ip binding vpn-instance NGN_Other
ip address 10.22.1.81 255.255.255.252
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 130
port hybrid untagged vlan 130
# interface GigabitEthernet2/0/0
port hybrid pvid vlan 140
port hybrid untagged vlan 140
# interface LoopBack0
ip address 10.9.9.9 255.255.255.255
isis enable 64
# bgp 65000
peer 10.11.11.9 as-number 65000
peer 10.11.11.9 connect-interface LoopBack0
#
ipv4-family unicast
undo synchronization
undo peer 10.11.11.9 enable
#
ipv4-family vpnv4
policy vpn-target
peer 10.11.11.9 enable
peer 10.11.11.9 route-policy local_pre import
peer 10.11.11.9 route-policy comm export
peer 10.11.11.9 advertise-community
#
ipv4-family vpn-instance NGN_Media
aggregate 10.22.1.0 255.255.255.0 detail-suppressed
import-route direct
#
ipv4-family vpn-instance NGN_Other
aggregate 10.22.1.0 255.255.255.0 detail-suppressed
import-route direct
#
ipv4-family vpn-instance NGN_Signaling
aggregate 10.22.1.0 255.255.255.0 detail-suppressed
import-route direct
# route-policy comm permit node 10
apply community 65000:100
# route-policy local_pre permit node 10
if-match community-filter 1
apply local-preference 200
#
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
8 BGP Configuration
593
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Issue 01 (2011-10-26) route-policy local_pre permit node 20
#
ip community-filter 1 permit 65000:100
# return l Configuration file of PE4
#
sysname PE4
# vlan batch 140 160
# ip vpn-instance NGN_Media
route-distinguisher 65000:10000712
apply-label per-instance
vpn-target 65000:100 export-extcommunity
vpn-target 65000:100 65000:200 65000:300 import-extcommunity ip vpn-instance NGN_Other
route-distinguisher 65000:30000712
apply-label per-instance
vpn-target 65000:300 export-extcommunity
vpn-target 65000:100 65000:200 65000:300 import-extcommunity ip vpn-instance NGN_Signaling
route-distinguisher 65000:20000712
apply-label per-instance
vpn-target 65000:200 export-extcommunity
vpn-target 65000:100 65000:200 65000:300 import-extcommunity
#
mpls lsr-id 10.10.10.9
mpls
# mpls ldp
# isis 64
network-entity 49.0091.0100.1001.0009.00
# interface Vlanif160
description toP4Vlanif160
ip address 10.1.14.2 255.255.255.252
isis enable 64
mpls
mpls ldp
# interface Vlanif140
description toPE3Vlanif140
ip address 10.1.17.2 255.255.255.252
isis enable 64
mpls
mpls ldp
# interface GigabitEthernet3/0/0
# interface GigabitEthernet3/0/0.10
control-vid 1000 dot1q-termination
dot1q termination vid 270
ip binding vpn-instance NGN_Media
ip address 10.22.1.13 255.255.255.252
# interface GigabitEthernet3/0/0.11
control-vid 1100 dot1q-termination
dot1q termination vid 280
ip binding vpn-instance NGN_Signaling
ip address 10.22.1.17 255.255.255.252
# interface GigabitEthernet3/0/0.12
control-vid 1200 dot1q-termination
dot1q termination vid 290
ip binding vpn-instance NGN_Other
ip address 10.22.1.21 255.255.255.252
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
8 BGP Configuration
594
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Issue 01 (2011-10-26)
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 160
port hybrid untagged vlan 160
# interface GigabitEthernet2/0/0
port hybrid pvid vlan 140
port hybrid untagged vlan 140
# interface LoopBack0
ip address 10.10.10.9 255.255.255.255
isis enable 64
# bgp 65000
peer 10.11.11.9 as-number 65000
peer 10.11.11.9 connect-interface LoopBack0
#
ipv4-family unicast
undo synchronization
undo peer 10.11.11.9 enable
#
ipv4-family vpnv4
policy vpn-target
peer 10.11.11.9 enable
peer 10.11.11.9 route-policy local_pre import
peer 10.11.11.9 route-policy comm export
peer 10.11.11.9 advertise-community
#
ipv4-family vpn-instance NGN_Media
aggregate 10.22.1.0 255.255.255.0 detail-suppressed
import-route direct
#
ipv4-family vpn-instance NGN_Other
aggregate 10.22.1.0 255.255.255.0 detail-suppressed
import-route direct
#
ipv4-family vpn-instance NGN_Signaling
aggregate 10.22.1.0 255.255.255.0 detail-suppressed
import-route direct
# route-policy comm permit node 10
apply community 65000:200
# route-policy local_pre permit node 10
if-match community-filter 1
apply local-preference 200
#
ip community-filter 1 permit 65000:200
# return l Configuration file of the RR
#
sysname RR
# vlan batch 30 60
# isis 64
network-entity 49.0091.0100.1101.1009.00
# interface Vlanif30
description toP1Vlanif30
ip address 10.1.3.2 255.255.255.252
isis enable 64
# interface Vlanif60
description toP2Vlanif60
ip address 10.1.8.2 255.255.255.252
isis enable 64
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
8 BGP Configuration
595
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 30
port hybrid untagged vlan 30
# interface GigabitEthernet2/0/0
port hybrid pvid vlan 60
port hybrid untagged vlan 60
# interface LoopBack0
ip address 10.11.11.9 255.255.255.255
isis enable 64
# bgp 65000
group client internal
peer client connect-interface LoopBack0
peer 10.7.7.9 as-number 65000
peer 10.8.8.9 as-number 65000
peer 10.9.9.9 as-number 65000
peer 10.10.10.9 as-number 65000
#
ipv4-family unicast
undo synchronization
undo peer client enable
undo peer 10.7.7.9 enable
undo peer 10.8.8.9 enable
undo peer 10.9.9.9 enable
undo peer 10.10.10.9 enable
#
ipv4-family vpnv4
undo policy vpn-target
peer client enable
peer client reflect-client
peer client advertise-community
peer 10.7.7.9 enable
peer 10.7.7.9 group client
peer 10.8.8.9 enable
peer 10.8.8.9 group client
peer 10.9.9.9 enable
peer 10.9.9.9 group client
peer 10.10.10.9 enable
peer 10.10.10.9 group client
# return
8.21.9 Example for Configuring the BGP Accounting
8 BGP Configuration
Networking Requirements
, Switch A and Switch B are BGP neighbors. Switch B is the transmitter
of BGP routes, and Switch A is the receiver. BGP routes sent by Switch B to Switch A are configured with the community attribute. It is required that Switch A collect traffic statistics only for the routes carrying certain community attributes.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
596
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 8 BGP Configuration
Figure 8-9 Configure the BGP accounting
Loopback0
1.1.1.1/32
GE1/0/0
SwitchA
100.1.1.1/24
GE1/0/0
100.1.1.2/24
Loopback0
2.2.2.2/32
SwitchB
AS100
Switch
SwitchA
SwitchB
Interface
GigabitEthernet1/0/0
GigabitEthernet1/0/0
Loopback1
200.1.1.1/32
AS200
VLANIF interface
VLANIF 10
VLANIF 10
IP address
100.1.1.1/24
100.1.1.2/24
Configuration Roadmap
The configuration roadmap is as follows:
1.
Configure OSPF on Switch A and Switch B to for interconnection.
2.
Configure the BGP routes sent from Switch B to Switch A with the community attributes.
3.
Configure the EBGP connection on Switch A and Switch B.
4.
Set the traffic index on Switch A by using the routing policy.
5.
Configure the interface of Switch A with BGP accounting to collect traffic statistics.
Data Preparation
To complete the configuration, you need the following data: l Numbers of the ASs where Switch A and Switch B reside: 100 and 200 l Community number and routing policy name of Switch A, routing policy name and IP prefix list name of Switch B
Procedure
Step 1 Configure VLANs that interfaces belong to.
<Quidway> system-view
[Quidway] sysname SwitchA
[SwitchA] vlan batch 10
[SwitchA] interface gigabitethernet 1/0/0
[SwitchA-GigabitEthernet1/0/0] port hybrid pvid vlan 10
[SwitchA-GigabitEthernet1/0/0] port hybrid untagged vlan 10
[SwitchA-GigabitEthernet1/0/0] quit
The configurations of SwitchB is similar to the configuration of SwitchA, and is not mentioned here.
Step 2 Assign an IP address to each VLANIF interface.
[SwitchA] interface vlanif 10
[SwitchA-Vlanif10] ip address 100.1.1.1 24
[SwitchA-Vlanif10] quit
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
597
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
8 BGP Configuration
The configurations of SwitchB is similar to the configuration of SwitchA, and is not mentioned here.
Step 3 Configure OSPF on Switch A and Switch B to implement the interconnection.
# Configure Switch A.
[SwitchA] router id 1.1.1.1
[SwitchA] ospf
[SwitchA-ospf-1] area 0
[SwitchA-ospf-1-area-0.0.0.0] network 1.1.1.1 0.0.0.0
[SwitchA-ospf-1-area-0.0.0.0] network 100.1.1.0 0.0.0.255
[SwitchA-ospf-1-area-0.0.0.0] quit
[SwitchA-ospf-1] quit
# Configure Switch B.
[SwitchB] router id 2.2.2.2
[SwitchB] ospf
[SwitchB-ospf-1] area 0
[SwitchB-ospf-1-area-0.0.0.0] network 2.2.2.2 0.0.0.0
[SwitchB-ospf-1-area-0.0.0.0] network 100.1.1.0 0.0.0.255
[SwitchB-ospf-1-area-0.0.0.0] quit
[SwitchB-ospf-1] quit
Step 4 Configure the routing policy of the community attributes on Switch A.
# Configure the community filter.
[SwitchA] ip community-filter 10 permit 10:10
# Configure the routing policy.
[SwitchA] route-policy aa permit node 10
[SwitchA-route-policy] if-match community-filter 10
[SwitchA-route-policy] apply traffic-index 1
[SwitchA-route-policy] quit
[SwitchA] route-policy aa permit node 20
[SwitchA-route-policy] quit
Step 5 Configure the routing policy of the community attributes on Switch B.
# Configure an IP prefix list.
[SwitchB] ip ip-prefix bb permit 200.1.1.1 32
# Configure the routing policy.
[SwitchB] route-policy aa permit node 10
[SwitchB-route-policy] if-match ip-prefix bb
[SwitchB-route-policy] apply community 10:10
[SwitchB-route-policy] quit
[SwitchB] route-policy aa permit node 20
[SwitchB-route-policy] quit
Step 6 Configure the EBGP neighbor.
# Configure Switch A.
[SwitchA] bgp 100
[SwitchA-bgp] peer 2.2.2.2 as-number 200
[SwitchA-bgp] peer 2.2.2.2 connect-interface loopback 0
[SwitchA-bgp] peer 2.2.2.2 ebgp-max-hop 2
[SwitchA-bgp] peer 2.2.2.2 route-policy aa import
[SwitchA-bgp] quit
# Configure Switch B.
[SwitchB] bgp 200
Issue 01 (2011-10-26) 598
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
8 BGP Configuration
[SwitchB-bgp] peer 1.1.1.1 as-number 100
[SwitchB-bgp] peer 1.1.1.1 connect-interface Loopback 0
[SwitchB-bgp] peer 1.1.1.1 ebgp-max-hop 2
[SwitchB-bgp] peer 1.1.1.1 advertise-community
[SwitchB-bgp] peer 1.1.1.1 route-policy aa export
[SwitchB-bgp] import-route direct
[SwitchB-bgp] quit
Step 7 Apply BGP accounting on the interface.
[SwitchA] interface vlanif 10
[SwitchA-Vlanif10] ip bgp-accounting inbound source
[SwitchA-Vlanif10] quit
Step 8 Verify the configuration.
# Check the FIB table of Switch A.
[SwitchA] display fib 200.1.1.1 32 verbose
Route Entry Count: 1
Destination: 200.1.1.1 Mask : 255.255.255.255
Nexthop : 100.1.1.2 OutIf : Vlanif10
LocalAddr : 100.1.1.1 LocalMask: 0.0.0.0
Flags : DGHU Age : 113sec
ATIndex : 51 Slot : 0
LspFwdFlag : 0 LspToken : 0x0
InLabel : NULL OriginAs : 200
BGPNextHop : 2.2.2.2 PeerAs : 200
QosInfo : 0x10010000 OriginQos: 0x10010000
NexthopBak : 0.0.0.0 OutIfBak : [No Intf]
LspTokenBak: 0x0 InLabelBak : NULL
LspToken_ForInLabelBak : 0x0
EntryRefCount : 0
VlanId : 0x0
BgpKey : 9
BgpKeyBak : 0
LspType : 0 Label_ForLspTokenBak : 0
MplsMtu : 0 Gateway_ForLspTokenBak : 0
NextToken : 0 IfIndex_ForLspTokenBak : 0
Label_NextToken : 0 Label : 0
LspBfdState : 0
# Send Ping packets from Switch A to Switch B. Check the statistics of Echo Reply packets that reach Switch A.
[SwitchA]ping 200.1.1.1
PING 200.1.1.1: 56 data bytes, press CTRL_C to break
Reply from 200.1.1.1: bytes=56 Sequence=1 ttl=255 time=31 ms
Reply from 200.1.1.1: bytes=56 Sequence=2 ttl=255 time=31 ms
Reply from 200.1.1.1: bytes=56 Sequence=3 ttl=255 time=31 ms
Reply from 200.1.1.1: bytes=56 Sequence=4 ttl=255 time=31 ms
Reply from 200.1.1.1: bytes=56 Sequence=5 ttl=255 time=31 ms
--- 200.1.1.1 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 31/31/31 ms
[SwitchA]display ip bgp-accounting interface Vlanif 10 statistics for interface Vlanif10
BGP based Policy accounting on inbound is enabled
Index Bytes Packets
1 420 5
2 0 0
3 0 0
4 0 0
5 0 0
6 0 0
7 0 0
8 0 0
9 0 0
Issue 01 (2011-10-26) 599
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
10 0 0
11 0 0
12 0 0
13 0 0
14 0 0
15 0 0
16 0 0
17 0 0
18 0 0
19 0 0
20 0 0
21 0 0
22 0 0
23 0 0
24 0 0
25 0 0
26 0 0
27 0 0
28 0 0
29 0 0
30 0 0
31 0 0
32 0 0
33 0 0
34 0 0
35 0 0
36 0 0
37 0 0
38 0 0
39 0 0
40 0 0
41 0 0
42 0 0
43 0 0
44 0 0
45 0 0
46 0 0
47 0 0
48 0 0
49 0 0
50 0 0
51 0 0
52 0 0
53 0 0
54 0 0
55 0 0
56 0 0
57 0 0
58 0 0
59 0 0
60 0 0
61 0 0
62 0 0
63 0 0
64 0 0
----End
Configuration Files
l
Configuration file of Switch A
#
sysname SwitchA
#
vlan batch 10
#
router id 1.1.1.1
#
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
8 BGP Configuration
600
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Issue 01 (2011-10-26) interface Vlanif10
ip address 100.1.1.1 255.255.255.0
ip bgp-accounting inbound source
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# interface LoopBack0
ip address 1.1.1.1 255.255.255.255
# bgp 100
peer 2.2.2.2 as-number 200 peer 2.2.2.2 ebgp-max-hop 2
peer 2.2.2.2 connect-interface LoopBack0
#
ipv4-family unicast
peer 2.2.2.2 enable
peer 2.2.2.2 route-policy aa import
# ospf 1
area 0.0.0.0
network 1.1.1.1 0.0.0.0
network 100.1.1.0 0.0.0.255
# route-policy aa permit node 10
if-match community 10
apply traffic-index 1
# route-policy aa permit node 20
#
ip community-filter 10 permit 10:10
# return l Configuration file of Switch B
#
sysname SwitchB
#
vlan batch 10
#
router id 2.2.2.2
# interface Vlanif10
ip address 100.1.1.2 255.255.255.0
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# interface LoopBack0
ip address 2.2.2.2 255.255.255.255
# interface LoopBack1
ip address 200.1.1.1 255.255.255.255
# bgp 200
peer 1.1.1.1 as-number 100 peer 1.1.1.1 ebgp-max-hop 2
peer 1.1.1.1 connect-interface LoopBack0
#
ipv4-family unicast
import-route direct
peer 1.1.1.1 enable
peer 1.1.1.1 route-policy aa export
peer 1.1.1.1 advertise-community
# ospf 1
area 0.0.0.0
network 2.2.2.2 0.0.0.0
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
8 BGP Configuration
601
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 8 BGP Configuration
network 100.1.1.0 0.0.0.255
# route-policy aa permit node 10
if-match ip-prefix bb
apply community 10:10
# route-policy aa permit node 20
#
ip ip-prefix bb index 10 permit 200.1.1.1 32
# return
8.21.10 Example for Configuring BFD for BGP
Networking Requirements
, Switch A belongs to AS 100, and Switch B and Switch C belong to
AS 200. EBGP connections are established between Switch A and Switch B and between Switch
A and Switch C.
Service flow is transmitted on the active link Switch A → Switch B. The link Switch A → Switch
C → Switch B acts as the standby link.
Use BFD to detect the BGP peer relationship between Switch A and Switch B. When the link between Switch A and Switch B fails, BFD can rapidly detect the fault and notify BGP. Service flows are transmitted on the standby link.
Figure 8-10 Networking diagram for configuring BFD for BGP
SwitchB
GE2/0/0
GE3/0/0
GE1/0/0
GE2/0/0
EBGP
SwitchA
GE1/0/0
AS 100
EBGP
IBGP
AS 200
GE1/0/0
GE2/0/0
SwitchC
Issue 01 (2011-10-26) switch
SwitchA
SwitchA
SwitchB
SwitchB
SwitchB
SwitchC
Interface
GigabitEthernet1/0/0
GigabitEthernet2/0/0
GigabitEthernet1/0/0
GigabitEthernet2/0/0
GigabitEthernet3/0/0
GigabitEthernet1/0/0
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
VLANIF interface IP address
VLANIF 10 200.1.2.1/24
VLANIF 20
VLANIF 30
VLANIF 20
200.1.1.1/24
9.1.1.1/24
200.1.1.2/24
VLANIF 40
VLANIF 10
172.16.1.1/24
200.1.2.2/24
602
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
SwitchC GigabitEthernet2/0/0 VLANIF 30
8 BGP Configuration
9.1.1.2/24
Configuration Roadmap
The configuration roadmap is as follows:
1.
Configure basic BGP functions on each switch.
2.
Configure MED attributes to control the route selection.
3.
Enable BFD on Switch A and Switch B.
Data Preparation
To complete the configuration, you need the following data: l Router IDs and AS numbers of Switch A Switch B, and Switch C l Peer IP address detected by BFD l Minimum interval for sending BFD control packets, minimum interval for receiving BFD control packets, and local detection multiplier
Procedure
Step 1 Assign IP addresses to the interfaces of Switches. The configuration details are not mentioned here.
Step 2 Configure basic BGP functions, establish EBGP connections between Switch A and Switch B and between Switch A and Switch C, and establish an IBGP connection Switch B and Switch
C.
# Configure Switch A.
[SwitchA] bgp 100
[SwitchA-bgp] router-id 1.1.1.1
[SwitchA-bgp] peer 200.1.1.2 as-number 200
[SwitchA-bgp] peer 200.1.2.2 as-number 200
[SwitchA-bgp] quit
# Configure Switch B.
[SwitchB] bgp 200
[SwitchB-bgp] router-id 2.2.2.2
[SwitchB-bgp] peer 200.1.1.1 as-number 100
[SwitchB-bgp] peer 9.1.1.2 as-number 200
[SwitchB-bgp] network 9.1.1.0 255.255.255.0
[SwitchB-bgp] quit
# Configure Switch C.
[SwitchC] bgp 200
[SwitchC-bgp] router-id 3.3.3.3
[SwitchC-bgp] peer 200.1.2.1 as-number 100
[SwitchC-bgp] peer 9.1.1.1 as-number 200
[SwitchC-bgp] network 9.1.1.0 255.255.255.0
[SwitchC-bgp] network 172.16.1.0 255.255.255.0
[SwitchC-bgp] quit
# On Switch A, you can view that the BGP peer is established.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
603
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
8 BGP Configuration
<SwitchA> display bgp peer
BGP local router ID : 1.1.1.1
Local AS number : 100
Total number of peers : 2 Peers in established state : 2
Peer V AS MsgRcvd MsgSent OutQ Up/Down State
PrefRcv
200.1.1.2 4 200 2 5 0 00:01:25 Established 0
200.1.2.2 4 200 2 4 0 00:00:55 Established 0
Step 3 Set the MED.
Set the MED sent from Switch B to Switch C through the policy.
# Configure Switch B.
[SwitchB] route-policy 10 permit node 10
[SwitchB-route-policy] apply cost 100
[SwitchB-route-policy] quit
[SwitchB] bgp 200
[SwitchB-bgp] peer 200.1.1.1 route-policy 10 export
# Configure Switch C.
[SwitchC] route-policy 10 permit node 10
[SwitchC-route-policy] apply cost 150
[SwitchC-route-policy] quit
[SwitchC] bgp 200
[SwitchC-bgp] peer 200.1.2.1 route-policy 10 export
# View all BGP routing information on Switch A.
<SwitchA> display bgp routing-table
Total Number of Routes: 2
BGP Local router ID is 1.1.1.1
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal Path/Ogn
*> 172.16.1.0/24 200.1.1.2 100 0 200i
* 200.1.2.2 150 0 200i
According to the BGP routing table, the next hop address of the route destined for 172.16.1.0/24 is 200.1.1.2 and service flow is transmitted on the active link Switch A → Switch B.
Step 4 Enable BFD, and set the interval for sending packets, the interval for receiving packets, and the local detection multiplier.
# Enable BFD on Switch A and set the minimum interval for sending packets and the minimum interval for receiving packets to 100 ms and the local detection multiplier to 4.
[SwitchA] bfd
[SwitchA-bfd] quit
[SwitchA] bgp 100
[SwitchA-bgp] peer 200.1.1.2 bfd enable
[SwitchA-bgp] peer 200.1.1.2 bfd min-tx-interval 100 min-rx-interval 100 detect-
multiplier 4
# Enable BFD on Switch B and set the minimum interval for sending packets and the minimum interval for receiving packets to 100 ms and the local detection multiplier to 4.
[SwitchB] bfd
[SwitchB-bfd] quit
Issue 01 (2011-10-26) 604
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
8 BGP Configuration
[SwitchB] bgp 200
[SwitchB-bgp] peer 200.1.1.1 bfd enable
[SwitchB-bgp] peer 200.1.1.1 bfd min-tx-interval 100 min-rx-interval 100 detect-
multiplier 4
# Display all BFD sessions set up by BGP on Switch A.
<SwitchA> display bgp bfd session all
--------------------------------------------------------------------------------
Local_Address Peer_Address LD/RD Interface
200.1.1.1 200.1.1.2 8201/8201 Vlanif20
Tx-interval(ms) Rx-interval(ms) Multiplier Session-State
100 100 4 Up
--------------------------------------------------------------------------------
Step 5 Verify the configuration.
# Run the shutdown command on VLANIF20 of Switch B to simulate faults on the active link.
[SwitchB] interface vlanif 20
[SwitchB-Vlanif20] shutdown
# Check the BGP routing table on Switch A.
<SwitchA> display bgp routing-table
Total Number of Routes: 1
BGP Local router ID is 1.1.1.1
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal Path/Ogn
*> 172.16.1.0/24 200.1.2.2 150 0 200i
According to the BGP routing table, the standby link Switch A → Switch C → Switch B takes effect after the active link fails. The next hop address of the route destined for 172.16.1.0/24 becomes 200.1.2.2.
----End
Configuration Files
l Configuration file of Switch A
#
sysname SwitchA
#
router id 1.1.1.1
#
vlan batch 10 20
#
bfd
# interface Vlanif10
ip address 200.1.2.1 255.255.255.0
# interface Vlanif20
ip address 200.1.1.1 255.255.255.0
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# interface GigabitEthernet2/0/0
port hybrid pvid vlan 20
port hybrid untagged vlan 20
#
Issue 01 (2011-10-26) 605
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
8 BGP Configuration bgp 100
router-id 1.1.1.1
peer 200.1.1.2 as-number 200
peer 200.1.1.2 bfd min-tx-interval 100 min-rx-interval 100 detect-multiplier
4
peer 200.1.1.2 bfd enable
peer 200.1.2.2 as-number 200
#
ipv4-family unicast
undo synchronization
peer 200.1.1.2 enable
peer 200.1.2.2 enable
# return l Configuration file of Switch B
#
sysname SwitchB
#
router id 2.2.2.2
#
vlan batch 20 30 40
#
bfd
# interface Vlanif30
ip address 9.1.1.1 255.255.255.0
# interface Vlanif20
ip address 200.1.1.2 255.255.255.0
# interface Vlanif40
ip address 172.16.1.1 255.255.255.0
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 30
port hybrid untagged vlan 30
# interface GigabitEthernet2/0/0
port hybrid pvid vlan 20
port hybrid untagged vlan 20
# interface GigabitEthernet3/0/0
port hybrid pvid vlan 40
port hybrid untagged vlan 40
# bgp 200
router-id 2.2.2.2
peer 9.1.1.2 as-number 200
peer 200.1.1.1 as-number 100
peer 200.1.1.1 bfd min-tx-interval 100 min-rx-interval 100 detect-multiplier
4
peer 200.1.1.1 bfd enable
#
ipv4-family unicast
undo synchronization
network 172.16.1.0 255.255.255.0
peer 9.1.1.2 enable
peer 200.1.1.1 enable
peer 200.1.1.1 route-policy 10 export
# route-policy 10 permit node 10
apply cost 100
# return l Configuration file of Switch C
#
sysname SwitchC
#
606
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
router id 3.3.3.3
#
vlan batch 10 30
#
bfd
# interface Vlanif10
ip address 200.1.2.2 255.255.255.0
# interface Vlanif30
ip address 9.1.1.2 255.255.255.0
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# interface GigabitEthernet2/0/0
port hybrid pvid vlan 30
port hybrid untagged vlan 30
# bgp 200
router-id 3.3.3.3
peer 9.1.1.1 as-number 200
peer 200.1.2.1 as-number 100
#
ipv4-family unicast
undo synchronization
peer 9.1.1.1 enable
peer 200.1.2.1 enable
peer 200.1.2.1 route-policy 10 export
# route-policy 10 permit node 10
apply cost 150
# return
8.21.11 Example for Configuring BGP Auto FRR
8 BGP Configuration
Networking Requirements
, Switch A belongs to AS 100; Switch B, Switch C, and Switch D
belong to AS 200. BGP Auto FRR needs to be configure so that the route from Switch A to
Switch D can have backup forwarding information.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
607
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Figure 8-11 Networking diagram for configuring BGP Auto FRR
8 BGP Configuration
SwitchA
AS100
AS200
SwitchB
GE2
/0/0
GE
10.
1/0
1.1
/0
.1/2
4
GE
10.
1/0
1.1
/0
.2/2
4
10.3
4
GE1
4
10.2.1.1
/24
10.2.1.2
/24
SwitchC
GE2
/0/0
.1.2
/24
10.4
/0/0
GE2
10.4.
1.1/2
4
Loopback1
4.4.4.4/32
SwitchD
Switch
SwitchA
SwitchA
SwitchB
SwitchB
SwitchC
SwitchC
SwitchD
SwitchD
Interface
GigabitEthernet1/0/0
GigabitEthernet2/0/0
GigabitEthernet1/0/0
GigabitEthernet2/0/0
GigabitEthernet1/0/0
GigabitEthernet2/0/0
GigabitEthernet1/0/0
GigabitEthernet2/0/0
VLANIF interface
VLANIF 10
VLANIF 20
VLANIF 10
VLANIF 40
VLANIF 20
VLANIF 30
VLANIF 40
VLANIF 30
IP address
10.1.1.1/24
10.2.1.1/24
10.1.1.2/24
10.3.1.1/24
10.2.1.2/24
10.4.1.1/24
10.3.1.2/24
10.4.1.2/24
Configuration Roadmap
The configuration roadmap is as follows:
1.
Configure EBGP connections between Switch A and Switch B and between Switch A and
Switch C. Configure IBGP connections between Switch D and Switch B, and between
Switch D and Switch C.
2.
Configure routing policies on Switch B and Switch C to change the MED values of routes to Switch D to facilitate route selection.
3.
Configure BGP Auto FRR on Switch A.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
608
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
8 BGP Configuration
Data Preparation
To complete the configuration, you need the following data: l
Router IDs and AS numbers of Switch A, Switch B, Switch C, and Switch D l Names of routing policies and MED values of routes on Switch B and Switch C
Procedure
Step 1 Configure VLANs that interfaces belong to.
<Quidway> system-view
[Quidway] sysname SwitchA
[SwitchA] vlan batch 10 20
[SwitchA] interface gigabitethernet 1/0/0
[SwitchA-GigabitEthernet1/0/0] port hybrid pvid vlan 10
[SwitchA-GigabitEthernet1/0/0] port hybrid untagged vlan 10
[SwitchA-GigabitEthernet1/0/0] quit
[SwitchA] interface gigabitethernet 2/0/0
[SwitchA-GigabitEthernet2/0/0] port hybrid pvid vlan 20
[SwitchA-GigabitEthernet2/0/0] port hybrid untagged vlan 20
[SwitchA-GigabitEthernet2/0/0] quit
The configurations of Switch B, Switch C, and Switch D are similar to the configuration of
Switch A, and are not mentioned here.
Step 2 Configure IP addresses for VLANIF interfaces.
[SwitchA] interface vlanif 10
[SwitchA-Vlanif10] ip address 10.1.1.1 24
[SwitchA-Vlanif10] quit
[SwitchA] interface vlanif 20
[SwitchA-Vlanif20] ip address 10.2.1.1 24
[SwitchA-Vlanif20] quit
The configurations of Switch B, Switch C, and Switch D are similar to the configuration of
Switch A, and are not mentioned here.
Step 3 Configure EBGP connections between Switch A and Switch B, and between Switch A and
Switch C. Configure IBGP connections between Switch B and Switch D, and between Switch
C and Switch D.
# Configure EBGP connections on Switch A.
<SwitchA> system-view
[SwitchA] bgp 100
[SwitchA-bgp] router-id 1.1.1.1
[SwitchA-bgp] peer 10.1.1.2 as-number 200
[SwitchA-bgp] peer 10.2.1.2 as-number 200
NOTE
The configurations of Switch B and Switch C are the same as that of Switch A, and the detailed configurations are not mentioned here.
# Configure IBGP connections on Switch D.
<SwitchD> system-view
[SwitchD] bgp 200
[SwitchD-bgp] router-id 4.4.4.4
[SwitchD-bgp] peer 10.3.1.1 as-number 200
[SwitchD-bgp] peer 10.4.1.1 as-number 200
NOTE
The configurations on Switch B and Switch C are similar, and the detailed configurations are not mentioned here.
Issue 01 (2011-10-26) 609
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
8 BGP Configuration
Step 4 Configuring routing policies on Switch B and Switch C so that the MED values of routes to
Switch D are different
# Configure a routing policy on Switch B.
<SwitchB> system-view
[SwitchB] route-policy rtb permit node 10
[SwitchB-route-policy] apply cost 80
[SwitchB-route-policy] quit
[SwitchB] bgp 200
[SwitchB-bgp] ipv4-family unicast
[SwitchB-bgp-af-ipv4] peer 10.1.1.1 route-policy rtb export
# Configure a routing policy on Switch C.
<SwitchC> system-view
[SwitchC] route-policy rtc permit node 10
[SwitchC-route-policy] apply cost 120
[SwitchC-route-policy] quit
[SwitchC] bgp 200
[SwitchC-bgp] ipv4-family unicast
[SwitchC-bgp-af-ipv4] peer 10.2.1.1 route-policy rtc export
# Advertise a route to 4.4.4.4/32 on Switch D.
[SwitchD] bgp 200
[SwitchD-bgp] ipv4-family unicast
[SwitchD-bgp] network 4.4.4.4 32
# Run the display ip routing-table verbose command on Switch A to check detailed information about the learned route to 4.4.4.4/32.
<SwitchA> display ip routing-table 4.4.4.4 32 verbose
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Table : Public
Summary Count : 1
Destination: 4.4.4.4/32
Protocol: BGP Process ID: 0
Preference: 255 Cost: 80
NextHop: 10.1.1.2 Neighbour: 10.1.1.2
State: Active Adv Age: 00h00m12s
Tag: 0 Priority: low
Label: NULL QoSInfo: 0x0
IndirectID: 0x4
RelayNextHop: 0.0.0.0 Interface: Vlanif10
TunnelID: 0x0 Flags: D
Because the MED value of the route learned from Switch B is smaller, on Switch A, the route to 4.4.4.4/32 selects the path Switch A→Switch B→Switch D. Because FRR is not configured, no backup information is available.
Step 5 Enabling BGP Auto FRR on Switch A, and checking the routing information
# Enable BGP Auto FRR on Switch A.
<SwitchA> system-view
[SwitchA] bgp 100
[SwitchA-bgp] ipv4-family unicast
[SwitchA-bgp-af-ipv4] auto-frr
# After the configuration, run the display ip routing-table verbose command on Switch A to check the routing information.
<SwitchA> display ip routing-table 4.4.4.4 32 verbose
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Issue 01 (2011-10-26) 610
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
8 BGP Configuration
Routing Table : Public
Summary Count : 1
Destination: 4.4.4.4/32
Protocol: BGP Process ID: 0
Preference: 255 Cost: 80
NextHop: 10.1.1.2 Neighbour: 10.1.1.2
State: Active Adv Age: 00h52m45s
Tag: 0 Priority: low
Label: NULL QoSInfo: 0x0
IndirectID: 0x4
RelayNextHop: 0.0.0.0 Interface: Vlanif10
TunnelID: 0x0 Flags: D
BkNextHop: 10.2.1.2 BkInterface: Vlanif20
BkLabel: NULL SecTunnelID: 0x0
BkPETunnelID: 0x0 BkPESecTunnelID: 0x0
BkIndirectID: 0x2
The preceding information shows that Switch A has a backup next hop and a backup outbound interface to 4.4.4.4/32.
----End
Configuration Files
l Configuration file of Switch A
#
sysname SwitchA
# vlan batch 10 20
# interface Vlanif10
ip address 10.1.1.1 255.255.255.0
# interface Vlanif20
ip address 10.2.1.1 255.255.255.0
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# interface GigabitEthernet2/0/0
port hybrid pvid vlan 20
port hybrid untagged vlan 20
# bgp 100
router-id 1.1.1.1
peer 10.1.1.2 as-number 200
peer 10.2.1.2 as-number 200
#
ipv4-family unicast
peer 10.1.1.2 enable
peer 10.2.1.2 enable
auto-frr
# return l
Configuration file of Switch B
#
sysname SwitchB
# vlan batch 10 40
# interface Vlanif10
ip address 10.1.1.2 255.255.255.0
Issue 01 (2011-10-26) 611
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
# interface Vlanif40
ip address 10.3.1.1 255.255.255.0
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# interface GigabitEthernet2/0/0
port hybrid pvid vlan 40
port hybrid untagged vlan 40
# bgp 200
router-id 2.2.2.2
peer 10.1.1.1 as-number 100
peer 10.3.1.2 as-number 200
#
ipv4-family unicast
peer 10.1.1.1 enable
peer 10.3.1.2 enable
peer 10.1.1.1 route-policy rtb export
# route-policy rtb permit node 10
apply cost 80
# return l Configuration file of Switch C
#
sysname SwitchC
# vlan batch 20 30
# interface Vlanif20
ip address 10.2.1.2 255.255.255.0
# interface Vlanif30
ip address 10.4.1.1 255.255.255.0
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 20
port hybrid untagged vlan 20
# interface GigabitEthernet2/0/0
port hybrid pvid vlan 30
port hybrid untagged vlan 30
# bgp 200
router-id 3.3.3.3
peer 10.2.1.1 as-number 100
peer 10.4.1.2 as-number 200
#
ipv4-family unicast
peer 10.2.1.1 enable
peer 10.4.1.2 enable
peer 10.2.1.1 route-policy rtc export
# route-policy rtc permit node 10
apply cost 120
# return l Configuration file of Switch D
#
sysname SwitchD
# vlan batch 30 40
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
8 BGP Configuration
612
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
# interface Vlanif40
ip address 10.3.1.2 255.255.255.0
# interface Vlanif30
ip address 10.4.1.2 255.255.255.0
# interface LoopBack1
ip address 4.4.4.4 255.255.255.255
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 40
port hybrid untagged vlan 40
# interface GigabitEthernet2/0/0
port hybrid pvid vlan 30
port hybrid untagged vlan 30
# bgp 200
router-id 4.4.4.4
peer 10.3.1.1 as-number 200
peer 10.4.1.1 as-number 200
#
ipv4-family unicast
peer 10.3.1.1 enable
peer 10.4.1.1 enable
network 4.4.4.4 255.255.255.255
# return
8.21.12 Example for Configuring BGP GTSM
8 BGP Configuration
Networking Requirements
, Switch A belongs to AS 10, and Switch B, Switch C, and Switch D
belong to AS 20. BGP is run in the network and BGP GTSM is configured to protect Switch B against CPU-utilization attacks.
Figure 8-12 Networking diagram for configuring BGP GTSM
EBGP
GE1/0/0
10.1.1.2/24
SwitchB
IBGP
GE2/0/0
20.1.1.1/24
GE1/0/0
20.1.1.2/24
SwitchC
SwitchA
AS10
GE1/0/0
10.1.1.1/24
Loopback0
2.2.2.9/32
IBG
P
3.3
Lo
.3.9
op
/32 ba
IBGP ck0
GE2/0/0
20.1.2.1/24
GE1/0/0
20.1.2.2/24 switch
SwitchA
SwitchB
AS20
Interface
GigabitEthernet1/0/0
GigabitEthernet1/0/0
PC
VLANIF interface
VLANIF 10
VLANIF 10
SwitchD
Loopback0
4.4.4.9/32
IP address
10.1.1.1/24
10.1.1.2/24
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
613
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
SwitchB
SwitchC
SwitchC
SwitchD
GigabitEthernet2/0/0
GigabitEthernet1/0/0
GigabitEthernet2/0/0
GigabitEthernet1/0/0
VLANIF 20
VLANIF 20
VLANIF 30
VLANIF 30
8 BGP Configuration
20.1.1.1/24
20.1.1.2/24
20.1.2.1/24
20.1.2.2/24
Configuration Roadmap
The configuration roadmap is as follows:
1.
Configure OSPF on Switch B, Switch C, and Switch D to implement interworking in AS
20.
2.
Set up an EBGP connection between Switch A and Switch B, and set up IBGP connections between Switch B, Switch C, and Switch D through loopback interfaces.
3.
Configure GTSM on Switch A, Switch B, Switch C, and Switch D.
Data Preparation
To complete the configuration, you need the following data: l
Route IDs of Switch A, Switch B, Switch C, Switch D and number of the AS where they reside l TTL values between Switch A and Switch B, between Switch B and Switch C, between
Switch C and Switch D, and between Switch B and Switch D.
Procedure
Step 1 Configure VLANs that interfaces belong to.
<Quidway> system-view
[Quidway] sysname SwitchA
[SwitchA] vlan batch 10
[SwitchA] interface gigabitethernet 1/0/0
[SwitchA-GigabitEthernet1/0/0] port hybrid pvid vlan 10
[SwitchA-GigabitEthernet1/0/0] port hybrid untagged vlan 10
[SwitchA-GigabitEthernet1/0/0] quit
The configurations of Switch B, Switch C, and Switch D are similar to the configuration of
SwitchA, and are not mentioned here.
Step 2 Assign an IP address to each VLANIF interface.
[SwitchA] interface vlanif 10
[SwitchA-Vlanif10] ip address 10.1.1.1 24
[SwitchA-Vlanif10] quit
The configurations of Switch B, Switch C, and Switch D are similar to the configuration of
SwitchA, and are not mentioned here.
Step 3 Configure OSPF.
The configuration details are not mentioned here.
Step 4 Configure an IBGP connection.
# Configure Switch B.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
614
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
8 BGP Configuration
[SwitchB] bgp 20
[SwitchB-bgp] router-id 2.2.2.9
[SwitchB-bgp] peer 3.3.3.9 as-number 20
[SwitchB-bgp] peer 3.3.3.9 connect-interface LoopBack0
[SwitchB-bgp] peer 3.3.3.9 next-hop-local
[SwitchB-bgp] peer 4.4.4.9 as-number 20
[SwitchB-bgp] peer 4.4.4.9 connect-interface LoopBack0
[SwitchB-bgp] peer 4.4.4.9 next-hop-local
# Configure Switch C.
[SwitchC] bgp 20
[SwitchC-bgp] router-id 3.3.3.9
[SwitchC-bgp] peer 2.2.2.9 as-number 20
[SwitchC-bgp] peer 2.2.2.9 connect-interface LoopBack0
[SwitchC-bgp] peer 4.4.4.9 as-number 20
[SwitchC-bgp] peer 4.4.4.9 connect-interface LoopBack0
# Configure Switch D.
[SwitchD] bgp 20
[SwitchD-bgp] router-id 4.4.4.9
[SwitchD-bgp] peer 2.2.2.9 as-number 20
[SwitchD-bgp] peer 2.2.2.9 connect-interface LoopBack0
[SwitchD-bgp] peer 3.3.3.9 as-number 20
[SwitchD-bgp] peer 3.3.3.9 connect-interface LoopBack0
Step 5 Configure an EBGP connection.
# Configure Switch A.
[SwitchA] bgp 10
[SwitchA-bgp] router-id 1.1.1.9
[SwitchA-bgp] peer 10.1.1.2 as-number 20
# Configure Switch B.
[SwitchB-bgp] peer 10.1.1.1 as-number 10
# Display the connection status of the BGP peers.
<SwitchB> display bgp peer
BGP local router ID : 2.2.2.9
Local AS number : 20
Total number of peers : 3 Peers in established state : 3
Peer V AS MsgRcvd MsgSent OutQ Up/Down State PrefRcv
3.3.3.9 4 20 8 7 0 00:05:06 Established 0
4.4.4.9 4 20 8 10 0 00:05:33 Established 0
10.1.1.1 4 10 7 7 0 00:04:09 Established 0
You can view that Switch B has set up BGP connections with other routers.
Step 6 Configure GTSM on Switch A and Switch B. Switch A and Switch B are directly connected, so the range of the TTL value between the two switches is [255, 255]. The value of valid-ttl-
hops is 1.
# Configure GTSM on Switch A.
[SwitchA-bgp] peer 10.1.1.2 valid-ttl-hops 1
# Configure GTSM of the EBGP connection on Switch B.
[SwitchB-bgp] peer 10.1.1.1 valid-ttl-hops 1
# Check the GTSM configuration.
<SwitchB> display bgp peer 10.1.1.1 verbose
Issue 01 (2011-10-26) 615
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
8 BGP Configuration
BGP Peer is 10.1.1.1, remote AS 10
Type: EBGP link
BGP version 4, Remote router ID 1.1.1.9
Group ID : 2
BGP current state: Established, Up for 00h49m35s
BGP current event: RecvKeepalive
BGP last state: OpenConfirm
BGP Peer Up count: 1
Received total routes: 0
Received active routes total: 0
Advertised total routes: 0
Port: Local - 179 Remote - 52876
Configured: Active Hold Time: 180 sec Keepalive Time:60 sec
Received : Active Hold Time: 180 sec
Negotiated: Active Hold Time: 180 sec Keepalive Time:60 sec
Peer optional capabilities:
Peer supports bgp multi-protocol extension
Peer supports bgp route refresh capability
Peer supports bgp 4-byte-as capability
Address family IPv4 Unicast: advertised and received
Received: Total 59 messages
Update messages 0
Open messages 2
KeepAlive messages 57
Notification messages 0
Refresh messages 0
Sent: Total 79 messages
Update messages 5
Open messages 2
KeepAlive messages 71
Notification messages 1
Refresh messages 0
Last keepalive received: 2009-02-20 13:54:58
Minimum route advertisement interval is 30 seconds
Optional capabilities:
Route refresh capability has been enabled
4-byte-as capability has been enabled
GTSM has been enabled, valid-ttl-hops: 1
Peer Preferred Value: 0
Routing policy configured:
No routing policy is configured
You can view that GTSM is enabled, the valid hop count is 1, and the BGP connection is in the
Established state.
Step 7 Configure GTSM on Switch B and Switch C. Switch B and Switch C are directly connected, so the range of the TTL value between the two switches is [255, 255]. The value of valid-ttl-
hops is 1.
# Configure GTSM on Switch B.
[SwitchB-bgp] peer 3.3.3.9 valid-ttl-hops 1
# Configure GTSM of the IBGP connection on Switch C.
[SwitchC-bgp] peer 2.2.2.9 valid-ttl-hops 1
# View the GTSM configuration.
<SwitchB> display bgp peer 3.3.3.9 verbose
BGP Peer is 3.3.3.9, remote AS 20
Type: IBGP link
BGP version 4, Remote router ID 3.3.3.9
Group ID : 0
BGP current state: Established, Up for 00h54m36s
BGP current event: KATimerExpired
BGP last state: OpenConfirm
Issue 01 (2011-10-26) 616
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
8 BGP Configuration
BGP Peer Up count: 1
Received total routes: 0
Received active routes total: 0
Advertised total routes: 0
Port: Local - 54998 Remote - 179
Configured: Active Hold Time: 180 sec Keepalive Time:60 sec
Received : Active Hold Time: 180 sec
Negotiated: Active Hold Time: 180 sec Keepalive Time:60 sec
Peer optional capabilities:
Peer supports bgp multi-protocol extension
Peer supports bgp route refresh capability
Peer supports bgp 4-byte-as capability
Address family IPv4 Unicast: advertised and received
Received: Total 63 messages
Update messages 0
Open messages 1
KeepAlive messages 62
Notification messages 0
Refresh messages 0
Sent: Total 69 messages
Update messages 10
Open messages 1
KeepAlive messages 58
Notification messages 0
Refresh messages 0
Last keepalive received: 2009-02-20 13:57:43
Minimum route advertisement interval is 15 seconds
Optional capabilities:
Route refresh capability has been enabled
4-byte-as capability has been enabled
Nexthop self has been configured
Connect-interface has been configured
GTSM has been enabled, valid-ttl-hops: 1
Peer Preferred Value: 0
Routing policy configured:
No routing policy is configured
You can view that GTSM is enabled, the valid hop count is 1, and the BGP connection is in the
Established state.
Step 8 Configure GTSM on Switch C and Switch D. Switch C and Switch D are directly connected, so the range of the TTL value between the two switches is [255, 255]. The value of valid-ttl-
hops is 1.
# Configure GTSM of the IBGP connection on Switch C.
[SwitchC-bgp] peer 4.4.4.9 valid-ttl-hops 1
# Configure GTSM of the IBGP connection on Switch D.
[SwitchD-bgp] peer 3.3.3.9 valid-ttl-hops 1
# Check the GTSM configuration.
<SwitchC> display bgp peer 4.4.4.9 verbose
BGP Peer is 4.4.4.9, remote AS 20
Type: IBGP link
BGP version 4, Remote router ID 4.4.4.9
Group ID : 1
BGP current state: Established, Up for 00h56m06s
BGP current event: KATimerExpired
BGP last state: OpenConfirm
BGP Peer Up count: 1
Received total routes: 0
Received active routes total: 0
Advertised total routes: 0
Port: Local - 179 Remote - 53758
Configured: Active Hold Time: 180 sec Keepalive Time:60 sec
Issue 01 (2011-10-26) 617
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
8 BGP Configuration
Received : Active Hold Time: 180 sec
Negotiated: Active Hold Time: 180 sec Keepalive Time:60 sec
Peer optional capabilities:
Peer supports bgp multi-protocol extension
Peer supports bgp route refresh capability
Peer supports bgp 4-byte-as capability
Address family IPv4 Unicast: advertised and received
Received: Total 63 messages
Update messages 0
Open messages 1
KeepAlive messages 62
Notification messages 0
Refresh messages 0
Sent: Total 63 messages
Update messages 0
Open messages 2
KeepAlive messages 61
Notification messages 0
Refresh messages 0
Last keepalive received: 2009-02-20 14:00:06
Minimum route advertisement interval is 15 seconds
Optional capabilities:
Route refresh capability has been enabled
4-byte-as capability has been enabled
Connect-interface has been configured
GTSM has been enabled, valid-ttl-hops: 1
Peer Preferred Value: 0
Routing policy configured:
No routing policy is configured
You can view that GTSM is enabled, the valid hop count is 1, and the BGP connection is in the
Established state.
Step 9 Configure GTSM on Switch B and Switch D. Switch B and Switch D are connected by Switch
C, so the range of the TTL value between the two switches is [254, 255]. The value of valid-ttl-
hops is 2.
# Configure GTSM of the IBGP connection on Switch B.
[SwitchB-bgp] peer 4.4.4.9 valid-ttl-hops 2
# Configure GTSM on Switch D.
[SwitchD-bgp] peer 2.2.2.9 valid-ttl-hops 2
# Check the GTSM configuration.
<SwitchB> display bgp peer 4.4.4.9 verbose
BGP Peer is 4.4.4.9, remote AS 20
Type: IBGP link
BGP version 4, Remote router ID 4.4.4.9
Group ID : 0
BGP current state: Established, Up for 00h57m48s
BGP current event: RecvKeepalive
BGP last state: OpenConfirm
BGP Peer Up count: 1
Received total routes: 0
Received active routes total: 0
Advertised total routes: 0
Port: Local - 53714 Remote - 179
Configured: Active Hold Time: 180 sec Keepalive Time:60 sec
Received : Active Hold Time: 180 sec
Negotiated: Active Hold Time: 180 sec Keepalive Time:60 sec
Peer optional capabilities:
Peer supports bgp multi-protocol extension
Peer supports bgp route refresh capability
Peer supports bgp 4-byte-as capability
Address family IPv4 Unicast: advertised and received
Issue 01 (2011-10-26) 618
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
8 BGP Configuration
Received: Total 72 messages
Update messages 0
Open messages 1
KeepAlive messages 71
Notification messages 0
Refresh messages 0
Sent: Total 82 messages
Update messages 10
Open messages 1
KeepAlive messages 71
Notification messages 0
Refresh messages 0
Last keepalive received: 2009-02-20 14:01:27
Minimum route advertisement interval is 15 seconds
Optional capabilities:
Route refresh capability has been enabled
4-byte-as capability has been enabled
Nexthop self has been configured
Connect-interface has been configured
GTSM has been enabled, valid-ttl-hops: 2
Peer Preferred Value: 0
Routing policy configured:
No routing policy is configured
You can view that GTSM is configured, the valid hop count is 2, and the BGP connection is in the Established state.
NOTE
l In this example, if the value of valid-ttl-hops of either Switch B or Switch D is smaller than 2, the
IBGP connection cannot be set up.
l GTSM must be configured on the two ends of the BGP connection.
Step 10 Verify the configuration.
# Run the display gtsm statistics all command on Switch B to check the GTSM statistics of
Switch B. By default, Switch B does not discard any packet when all packets match the GTSM policy.
<SwitchB> display gtsm statistics all
GTSM Statistics Table
----------------------------------------------------------------
SlotId Protocol Total Counters Drop Counters Pass Counters
----------------------------------------------------------------
0 BGP 17 0 17
0 BGPv6 0 0 0
0 OSPF 0 0 0
0 LDP 0 0 0
1 BGP 0 0 0
1 BGPv6 0 0 0
1 OSPF 0 0 0
1 LDP 0 0 0
2 BGP 0 0 0
2 BGPv6 0 0 0
2 OSPF 0 0 0
2 LDP 0 0 0
3 BGP 0 0 0
3 BGPv6 0 0 0
3 OSPF 0 0 0
3 LDP 0 0 0
4 BGP 32 0 32
4 BGPv6 0 0 0
4 OSPF 0 0 0
4 LDP 0 0 0
5 BGP 0 0 0
5 BGPv6 0 0 0
5 OSPF 0 0 0
5 LDP 0 0 0
Issue 01 (2011-10-26) 619
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
8 BGP Configuration
7 BGP 0 0 0
7 BGPv6 0 0 0
7 OSPF 0 0 0
7 LDP 0 0 0
----------------------------------------------------------------
If the host simulates the BGP packets of Switch A to attack Switch B, the packets are discarded because their TTL value is not 255 when reaching Switch B. In the GTSM statistics of Switch
B, the number of dropped packets increases accordingly.
----End
Configuration Files
l Configuration file of Switch A
#
sysname SwitchA
# vlan batch 10
# interface Vlanif10
ip address 10.1.1.1 255.255.255.0
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# bgp 10
router-id 1.1.1.9
peer 10.1.1.2 as-number 20
peer 10.1.1.2 valid-ttl-hops 1
#
ipv4-family unicast
undo synchronization
peer 10.1.1.2 enable
# return l Configuration file of Switch B
#
sysname SwitchB
# vlan batch 10 20
# interface Vlanif10
ip address 10.1.1.2 255.255.255.0
# interface Vlanif20
ip address 20.1.1.1 255.255.255.0
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# interface GigabitEthernet2/0/0
port hybrid pvid vlan 20
port hybrid untagged vlan 20
# interface LoopBack0
ip address 2.2.2.9 255.255.255.255
# bgp 20
router-id 2.2.2.9
peer 3.3.3.9 as-number 20
peer 3.3.3.9 valid-ttl-hops 1
peer 3.3.3.9 connect-interface LoopBack0
peer 4.4.4.9 as-number 20
Issue 01 (2011-10-26) 620
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
peer 4.4.4.9 valid-ttl-hops 2
peer 4.4.4.9 connect-interface LoopBack0
peer 10.1.1.1 as-number 10
peer 10.1.1.1 valid-ttl-hops 1
#
ipv4-family unicast
undo synchronization
import-route ospf 1
peer 3.3.3.9 enable
peer 3.3.3.9 next-hop-local
peer 4.4.4.9 enable
peer 4.4.4.9 next-hop-local
peer 10.1.1.1 enable
# ospf 1
area 0.0.0.0
network 20.1.1.0 0.0.0.255
network 2.2.2.9 0.0.0.0
# return l Configuration file of Switch C
#
sysname SwitchC
# vlan batch 20 30
# interface Vlanif20
ip address 20.1.1.2 255.255.255.0
# interface Vlanif30
ip address 20.1.2.1 255.255.255.0
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 20
port hybrid untagged vlan 20
# interface GigabitEthernet2/0/0
port hybrid pvid vlan 30
port hybrid untagged vlan 30
# interface LoopBack0
ip address 3.3.3.9 255.255.255.255
# bgp 20
router-id 3.3.3.9
peer 2.2.2.9 as-number 20
peer 2.2.2.9 valid-ttl-hops 1
peer 2.2.2.9 connect-interface LoopBack0
peer 4.4.4.9 as-number 20
peer 4.4.4.9 valid-ttl-hops 1
peer 4.4.4.9 connect-interface LoopBack0
#
ipv4-family unicast
undo synchronization
peer 2.2.2.9 enable
peer 4.4.4.9 enable
# ospf 1
area 0.0.0.0
network 20.1.2.0 0.0.0.255
network 20.1.1.0 0.0.0.255
network 3.3.3.9 0.0.0.0
# return l
Configuration file of Switch D
#
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
8 BGP Configuration
621
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
sysname SwitchD
# vlan batch 30
# interface Vlanif30
ip address 20.1.2.2 255.255.255.0
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 30
port hybrid untagged vlan 30
# interface LoopBack0
ip address 4.4.4.9 255.255.255.255
# bgp 20
router-id 4.4.4.9
peer 2.2.2.9 as-number 20
peer 2.2.2.9 valid-ttl-hops 2
peer 2.2.2.9 connect-interface LoopBack0
peer 3.3.3.9 as-number 20
peer 3.3.3.9 valid-ttl-hops 1
peer 3.3.3.9 connect-interface LoopBack0
#
ipv4-family unicast
undo synchronization
peer 2.2.2.9 enable
peer 3.3.3.9 enable
# ospf 1
area 0.0.0.0
network 20.1.2.0 0.0.0.255
network 4.4.4.9 0.0.0.0
# return
8 BGP Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
622
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 9 BGP4+ Configuration
9
BGP4+ Configuration
About This Chapter
Issue 01 (2011-10-26)
BGP4+, which is applicable to the large-scale IPv6 network with a complicated structure, is used between ASs to transmit routing information.
BGP4+ is mainly used to control route transmission and select optimal routes.
9.2 BGP4+ Features Supported by the S9300
9.3 Configuring Basic BGP4+ Functions
Before building BGP4+ networks, you need to configure basic BGP4+ functions.
9.4 Configuring BGP4+ Route Attributes
9.5 Controlling the Advertising and Receiving of BGP4+ Routing Information
BGP4+ can perform routing policies on or filter only the routes to be advertised to a certain peer.
9.6 Configuring Parameters of a Connection Between BGP4+ Peers
By setting parameters of a connection between BGP4+ peers, you can adjust and optimize the
9.7 Configuring BGP4+ Tracking
9.8 Configuring BGP4+ Route Dampening
By configuring BGP4+ route dampening, you can suppress unstable BGP4+ routes.
9.9 Configuring BGP4+ Load Balancing
By configuring BGP4+ load balancing, you can properly use network resources.
9.10 Configuring a BGP4+ Peer Group
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
623
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 9 BGP4+ Configuration
9.11 Configuring a BGP4+ Route Reflector
9.12 Configuring a BGP4+ Confederation
9.14 Configuring BGP4+ Security
To improve BGP4+ security, you can perform TCP connection authentication.
Maintaining BGP4+ involves resetting a BGP4+ connection and clearing BGP4+ statistics.
This section provides several configuration examples of BGP4+.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
624
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 9 BGP4+ Configuration
9.1 BGP4+ Overview
BGP4+ is mainly used to control route transmission and select optimal routes.
BGP4+ is a dynamic routing protocol used between Autonomous Systems (ASs), and it is an extension of BGP.
The traditional BGP4 can manage only the IPv4 routing information. For other network layer protocols such as IPv6, the traditional BGP4 has a limited capability to transmit routing information.
The IETF introduces BGP4+ as a supplement to BGP4 to support multiple network layer protocols. The RFC for BGP4+ is RFC 2858 (Multiprotocol Extensions for BGP4).
To support IPv6, BGP4 needs to reflect the IPv6 protocol information to the Network Layer
Reachable Information (NLRI) attribute and the Next_Hop attribute.
BGP4+ introduces two NLRI attributes: l Multiprotocol Reachable NLRI (MP_REACH_NLRI): advertises the reachable routes and the next hop information.
l Multiprotocol Unreachable NLRI (MP_UNREACH_NLRI): withdraws the unreachable routes.
The Next_Hop attribute of BGP4+ is in the format of an IPv6 address. It can be an IPv6 global unicast address or the link-local address of the next hop.
BGP4+ can be applied to an IPv6 network by using the BGP attribute of multiple protocol extension. The message and routing mechanisms of BGP remain unaltered.
9.2 BGP4+ Features Supported by the S9300
The system supports various BGP4+ features, including load balancing, route aggregation, route dampening, community, route reflector, confederation, BGP4+ accounting, 6PE, BFD for BGP4
+, BGP4+ GR, and BGP4+ NSR.
6PE
After the 6PE function is enabled, the separated IPv6 networks can be connected through the
Multi-Protocol Label Switch (MPLS) tunnel technology. The tunnel in 6PE mode implements the dual protocol stack of IPv4/IPv6 on PEs of the Internet Service Provider (ISP). It identifies
IPv6 routes by using the label assigned by the Multiprotocol Border Gateway Protocol (MP-
BGP), and implements IPv6 interworking through LSPs between PEs.
Other Attributes
Most of BGP4+ features supported by the S9300 are similar to those of BGP supported by the
S9300. For details, refer to the chapter "BGP Configuration".
BGP4+ does not support summary automatic and MP-BGP.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
625
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 9 BGP4+ Configuration
9.3 Configuring Basic BGP4+ Functions
Before building BGP4+ networks, you need to configure basic BGP4+ functions.
9.3.1 Establishing the Configuration Task
Before configuring basic BGP4+ functions, familiarize yourself with the applicable environment, complete the pre-configuration tasks, and obtain the required data. This can help you complete the configuration task quickly and accurately.
Applicable Environment
BGP4+ is configured in an IPv6 network.
Pre-configuration Tasks
Before configuring basic BGP4+ functions, complete the following tasks: l
Enabling IPv6 l Configuring link layer protocol parameters and IPv6 addresses for interfaces to make link layers of the interfaces Up
Data Preparation
To configure BGP4+, you need the following data.
2
3
No.
Data
1 Local AS number and Router ID
IPv6 address and AS number of the peer
(Optional) Interfaces that set up the BGP4+ session
9.3.2 Starting a BGP Process
Starting a BGP4+ process is a prerequisite for configuring basic BGP4+ functions. When starting a BGP4+ process, you need to specify the number of the AS that the device belongs to.
Context
Do as follows on the switch on which the BGP4+ connection needs to be set up:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
626
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 9 BGP4+ Configuration
Step 2 Run:
bgp as-number
BGP is enabled (the local AS number is specified) and the BGP view is displayed.
Step 3 (Optional) Run:
router-id ipv4-address
The router ID is set.
Setting or changing the router ID of BGP resets the BGP peer relationship between switches.
TIP
l To enhance the network reliability, you can manually configure the address of a loopback interface as the router ID. If the router ID is not set, BGP uses the router ID in the system view. To select the router
ID in the system view, refer to the Command Reference.
l If no interface of a switch is configured with an IPv4 address, you must set a router ID for the switch.
----End
9.3.3 Configuring an IPv6 Peer
Devices can exchange BGP4+ routing information only after BGP4+ peers are configured and the BGP4+ peer relationship is established.
Procedure
l Configuring an IBGP Peer
Do as follows on the switch on which the IBGP connection needs to be set up:
1.
Run:
system-view
The system view is displayed.
2.
Run:
bgp as-number
The BGP view is displayed.
3.
Run:
peer ipv6-address as-number as-number
The peer address and the AS where the peer resides are configured.
The AS number of the specified peer must be the same as the local AS number.
When the IPv6 address of a specified peer is a loopback address or a sub-interface address, you need to perform
Configuring the Local Interfaces Used for BGP4+
to ensure the establishment of the peer.
4.
(Optional) Run:
peer { ipv6-address | group-name } listen-only
A peer (group) is configured only to listen to connection requests, but not to send connection requests.
After this command is used, the existing peer relationship is interrupted. The peer on which this command is used waits for the connection request from its peer to
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
627
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
9 BGP4+ Configuration reestablish the neighbor relationship. This configuration can prevent the conflict of sending connection requests.
NOTE
This command can be used on only one of two peers. If this command is used on the two peers, the connection between the two peers cannot be established.
5.
Run:
ipv6-family [ unicast ]
The BGP IPv6 unicast address family view is displayed.
6.
Run:
peer ipv6-address enable
The IPv6 peers are enabled.
After configuring the BGP4+ peers in the BGP view, you need to enable these peers in the BGP IPv6 unicast address family view.
l Configuring an EBGP Peer
Do as follows on the switch on which the EBGP connection needs to be set up:
1.
Run:
system-view
The system view is displayed.
2.
Run:
bgp as-number
The BGP view is displayed.
3.
Run:
peer ipv6-address as-number as-number
The IP address and the AS number of a specified BGP peer are specified.
The AS number of the specified BGP peer should be different from the local AS number.
If the IP address of the specified peer is that of a loopback interface on the reachable peer or that of a sub-interface on the directly connected peer, you need to complete the task of
Configuring the Local Interfaces Used for BGP4+ Connections
to ensure that the peer is correctly established.
4.
Run:
peer { ipv6-address | group-name } ebgp-max-hop [ hop-count ]
The maximum number of hops in the EBGP connections is set.
Usually, a direct physical link should be available between the EBGP peers. If this requirement cannot be met, you can use the peer ebgp-max-hop command to configure the EBGP peers to establish the TCP connections through multiple hops.
NOTE
When establishing the EBGP connection through loopback interfaces, you must use the peer
ebgp-max-hop command specifying that hop-count is greater than or equal to 2. Otherwise,
BGP cannot set up the EBGP connection with the peer.
5.
(Optional) Run:
peer { ipv6-address | group-name } listen-only
628
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 9 BGP4+ Configuration
The peer or peer group is configured only to listen to connection requests, but not to send any connection request.
After this command is used, the existing peer relationship is removed. The peer on which this command is used reestablishes the peer relationship after receiving the connection request from its peer. After this configuration is done, the conflict of connection requests is avoided.
NOTE
This command can be used on only one of two peers. If this command is used on the two peers, the connection between the two peers cannot be established.
6.
Run:
ipv6-family [ unicast ]
The BGP IPv6 unicast address family view is displayed.
7.
Run:
peer ipv6-address enable
An IPv6 peer is enabled.
After configuring a BGP4+ peer in the BGP view, enable the peer in the BGP IPv6 unicast address family view.
----End
9.3.4 (Optional) Configuring the Local Interfaces Used for BGP4+
Connections
When establishing multiple peers between two devices through various links, you need to specify the local interface during the setup of a BGP4+ session on the devices.
Context
Do as follows on the BGP4+ router:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
bgp as-number
The BGP view is displayed.
Step 3 Run:
peer { ipv6-address | group-name } connect-interface interface-type interface-
number [ ipv6-source-address ]
The source interface and source address used to set up a TCP connection are specified.
Usually, BGP4+ uses the physical interface that is directly connected with the peer as the session interface used for the TCP connection.
To increase the reliability and stability of the BGP4+ connections, configure the local interface used for the BGP4+ connection as the loopback interface. In this way, when there are redundant
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
629
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 9 BGP4+ Configuration links on the network, the BGP4+ connections are not interrupted due to the failure of a certain interface or a link.
----End
9.3.5 Checking the Configuration
After basic BGP4+ functions are configured, you can check BGP4+ peer information.
Prerequisite
The configurations of basic BGP4+ functions are complete.
Procedure
l
Run the display bgp ipv6 peer ipv4-address verbose command to check information about the BGP4+ peers.
l Run the display bgp ipv6 peer ipv6-address { log-info | verbose } command to check information about the BGP4+ peers.
----End
9.4 Configuring BGP4+ Route Attributes
BGP4+ has many route attributes. By configuring these attributes, you can change BGP4+ routing policies.
9.4.1 Establishing the Configuration Task
Before controlling BGP4+ route selection, familiarize yourself with the applicable environment, complete the pre-configuration tasks, and obtain the required data. This can help you complete the configuration task quickly and accurately.
Applicable Environment
You can change the BGP4+ routing policies by configuring the route attributes.
l BGP4+ priority
After the BGP4+ priority is configured, Route Management (RM) is affected in routing between BGP4+ and the other routing protocols.
l Preferred value of BGP4+ routing information
After the preferred value of BGP4+ routing information is configured, the route with the greatest preferred value is selected when multiple routes to the same destination exist in the BGP4+ routing table.
l Local_Pref attribute
The function of the Local_Pref attribute is similar to that of the preferred value of BGP4+ routing information. The preferred value of BGP4+ routing information takes precedence over the Local_Pref attribute.
l MED attribute
After the MED attribute is configured, EBGP peers select the route with the smallest MED value when the traffic enters an AS.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
630
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 9 BGP4+ Configuration l Next_Hop attribute
A route with an unreachable next hop is ignored.
l Community attribute
The community attribute can simplify the management of routing policies. The management range of the community attribute is wider than that of the peer group. The community attribute can control the routing policies of multiple BGP4+ routers.
l AS_Path attribute
After the AS_Path attribute is configured, the route with a shorter AS path is selected.
Pre-configuration Tasks
Before configuring BGP4+ route attributes, complete the following tasks: l
Configuring Basic BGP4+ Functions
Data Preparation
To configure BGP4+ route attributes, you need the following data.
4
5
2
3
No.
Data
1 AS number
Protocol priority
Local_Pref
MED
Name of the routing policy for using the community attribute
9.4.2 Configuring the BGP4+ Preference
Setting the BGP4+ preference can affect route selection between BGP4+ and another routing protocol.
Context
Do as follows on the BGP4+ router:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
bgp as-number
The BGP view is displayed.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
631
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 9 BGP4+ Configuration
Step 3 Run:
ipv6-family [ unicast ]
The BGP IPv6 unicast address family view is displayed.
Step 4 Run:
preference { external internal local | route-policy route-policy-name }
The BGP4+ preference is set.
NOTE
Using peer route-policy command to configure the preference of the BGP protocol on the peers is not currently supported.
----End
9.4.3 Configuring BGP4+ Preferred Value for Routing Information
After the preferred value is configured for routing information, the route with the largest preferred value is selected when multiple routes to the same destination exist in the BGP4+ routing table.
Context
Do as follows on the BGP4+ router:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
bgp as-number
The BGP view is displayed.
Step 3 Run:
ipv6-family [ unicast ]
The BGP IPv6 unicast address family view is displayed.
Step 4 Run:
peer { group-name | ipv4-address | ipv6-address } preferred-value value
The preferred value of a peer is configured.
By default, the preferred value of the route learned from a neighbor is 0.
----End
9.4.4 Configuring the Default Local_Pref Attribute of the Local
Router
The Local_Pref attribute is used to determine the optimal route for the traffic that leaves an AS.
When a BGP4+ router obtains multiple routes to the same destination address but with different next hops from different IBGP peers, the route with the largest Local_Pref value is selected.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
632
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 9 BGP4+ Configuration
Context
Do as follows on the BGP4+ router:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
bgp as-number
The BGP view is displayed.
Step 3 Run:
ipv6-family [ unicast ]
The BGP IPv6 unicast address family view is displayed.
Step 4 Run:
default local-preference preference
The default Local_Pref of the local router is configured.
----End
9.4.5 Configuring the MED Attribute
The MED attribute serves as the metric used by an IGP. After MED attributes are set, EBGP peers select the route with the smallest MED value for the traffic that enters an AS.
Context
Do as follows on the BGP4+ router:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
bgp as-number
The BGP view is displayed.
Step 3 Run:
ipv6-family [ unicast ]
The BGP IPv6 unicast address family view is displayed.
Step 4 Run the following commands to configure the BGP4+ MED attribute as required: l Run:
default med med
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
633
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
9 BGP4+ Configuration
The default MED attribute is configured.
l Run:
compare-different-as-med
The MED values from different ASs are compared.
l Run:
deterministic-med
Deterministic-MED is enabled.
If this command is not configured, when an optimal route is to be selected from among routes which are received from different ASs and which carry the same prefix, the sequence in which routes are received is relevant to the result of route selection. After the command is configured, however, when an optimal route is to be selected from among routes which are received from different ASs and which carry the same prefix, routes are first grouped according to the leftmost AS in the AS_Path. Routes with the same leftmost AS are grouped together, and after comparison, an optimal route is selected for the group. The group optimal route is then compared with optimal routes from other groups to determine the final optimal route. This mode of route selection ensures that the sequence in which routes are received is no longer relevant to the result of route selection.
l Run:
bestroute med-none-as-maximum
The maximum MED value is used when the current MED is not available.
l Run:
bestroute med-confederation
The MED values of routes advertised in the local confederation are compared.
The commands in Step 4 can be used regardless of the order.
----End
9.4.6 Configuring the Next_Hop Attribute
By setting the Next_Hop attribute, you can flexibly control BGP4+ route selection.
Procedure
l Modifying the Next Hop When Advertising a Route to an IBGP Peer
Do as follows on the IBGP router:
1.
Run:
system-view
The system view is displayed.
2.
Run:
bgp as-number
The BGP view is displayed.
3.
Run:
ipv6-family unicast
The BGP IPv6 unicast address family view is displayed.
4.
Run:
peer { ipv6-address | group-name } next-hop-local
Issue 01 (2011-10-26) 634
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 9 BGP4+ Configuration
The local address is configured as the next hop when routes are advertised.
In some networking environments, to ensure that the IBGP neighbors find the correct next hop, configure the next hop address as its own address when routes are advertised to the IBGP peers.
NOTE
If BGP load balancing is configured, the local router changes the next hop address to its own address when advertising routes to the IBGP peer groups, regardless of whether the peer next-
hop-local command is used.
l
The next-hop iteration based on the routing policy
Do as follows on the BGP router:
1.
Run:
system-view
The system view is displayed.
2.
Run:
bgp as-number
The BGP view is displayed.
3.
Run:
ipv6-family unicast
The BGP-IPv6 unicast address family view is displayed.
4.
Run:
nexthop recursive-lookup route-policy route-policy-name
The next-hop iteration based on the specified routing policy is enabled.
By default, the next-hop iteration based on the specified routing policy is disabled.
The next-hop iteration based on the specified routing policy can control the iterated route according to certain conditions. The route that fails to pass the policy is ignored.
----End
9.4.7 Configuring the AS-Path Attribute
The AS_Path attribute is used to avoid routing loops and control route selection.
Procedure
l
Configuring the AS_Path Attribute in the IPv6 Address Family View
Do as follows on the BGP4+ router:
1.
Run:
system-view
The system view is displayed.
2.
Run:
bgp as-number
The BGP view is displayed.
3.
Run:
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
635
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
9 BGP4+ Configuration
ipv6-family unicast
The BGP IPv6 unicast address family view is displayed.
4.
Run the following commands to configure the AS-Path attribute as required:
–
Run:
peer { ipv4-address | ipv6-address | group-name } allow-as-loop
[ number ]
The local AS number can be used repeatedly.
– Run:
bestroute as-path-ignore
The AS-Path attribute is not configured as one of the route selection rules.
–
Run:
peer { ipv6-address | group-name } public-as-only
The AS-Path attribute is configured to carry only the public AS number.
The commands in Step 4 can be used regardless of the order.
l Configuring the Fake AS Number
Do as follows on the BGP4+ router:
1.
Run:
system-view
The system view is displayed.
2.
Run:
bgp as-number
The BGP view is displayed.
3.
Run:
peer { ipv6-address | group-name } fake-as fake-as-number
The fake AS number is set.
You can hide the actual AS number of the local router by using this command. EBGP peers in other ASs can only see this fake AS number. That is, peers in other ASs need to specify the number of the AS where the local peer resides as this fake AS number.
NOTE
This command is applicable only to EBGP peers.
l Substituting the AS Number in the AS-Path Attribute
Do as follows on the BGP4+ router:
1.
Run:
system-view
The system view is displayed.
2.
Run:
bgp as-number
The BGP view is displayed.
3.
Run:
ipv6-family vpn6-instance vpn6-instance-name
636
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 9 BGP4+ Configuration
The BGP-VPN6 instance view is displayed.
4.
Run:
peer { ipv6-address | group-name } substitute-as
The AS number in the AS-Path attribute is substituted.
After this command is used, if the AS-Path attribute contains the AS number of the peer, you can substitute the local AS number for the AS number of the peer before advertising routes to the peer.
CAUTION
If the configuration is not correct, the command may cause routing loops.
----End
9.4.8 Configuring the BGP4+ Community Attribute
The community attribute is used to simplify the management of routing policies. The management scope of the community attribute is far larger than that of the peer group. The community attribute can control the routing policies of multiple BGP4+ routers.
Procedure
l Configuring the switches to Advertise the Community Attribute to the Peers
Do as follows on the BGP4+ router:
1.
Run:
system-view
The system view is displayed.
2.
Run:
bgp as-number
The BGP view is displayed.
3.
Run:
ipv6-family unicast
The BGP IPv6 unicast address family view is displayed.
4.
Run the following commands to advertise community attributes to the peer group:
– Run:
peer { ipv4-address | ipv6-address | group-name } advertise-community
Routers are configured to advertise the standard community attribute to a peer group.
–
Run:
peer { ipv4-address | ipv6-address | group-name } advertise-ext-
community
Routers are configured to advertise the extended community attribute to a peer group.
l Applying the Routing Policies to the Advertised Routing Information
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
637
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 9 BGP4+ Configuration
Do as follows on the BGP4+ router:
1.
Run:
system-view
The system view is displayed.
2.
Run:
bgp as-number
The BGP view is displayed.
3.
Run:
ipv6-family unicast
The BGP IPv6 unicast address family view is displayed.
4.
Run:
peer { ipv4-address | ipv6-address | group-name } route-policy route-
policy-name export
The outbound routing policies are configured.
NOTE
l When configuring a BGP4+ community, you should define the specific community attribute by using the routing policies. Then, apply these routing policies to the advertisement of routing information.
l For the configuration of routing policies, refer to
configuration of community attributes, refer to
----End
9.4.9 Checking the Configuration
After BGP4+ route attributes are configured, you can check information about route attributes.
Prerequisite
The configurations of BGP4+ route attributes are complete.
Procedure
l Run the display bgp ipv6 paths [ as-regular-expression ] command to check the AS-Path information.
l Run the display bgp ipv6 routing-table different-origin-as command to check the route with the different source AS.
l
Run the display bgp ipv6 routing-table regular-expression as-regular-expression command to check the routing information matching the regular expression of the AS.
l Run the display bgp ipv6 routing-table community [ aa:nn &<1-29> ] [ internet | no-
advertise | no-export | no-export-subconfed ] * [ whole-match ] command to check routing information about the specified BGP4+ community.
l Run the display bgp ipv6 routing-table community-filter { { community-filter-name |
basic-community-filter-number } [ whole-match ] | advanced-community-filter-number } command to check information about the routes matching the specified BGP4+ community attribute filter.
----End
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
638
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 9 BGP4+ Configuration
9.5 Controlling the Advertising and Receiving of BGP4+
Routing Information
BGP4+ can perform routing policies on or filter only the routes to be advertised to a certain peer.
9.5.1 Establishing the Configuration Task
Before controlling the advertisement of BGP4+ routes, familiarize yourself with the applicable environment, complete the pre-configuration tasks, and obtain the required data. This can help you complete the configuration task quickly and accurately.
Applicable Environment
This section describes the following: l Controlling the advertising and receiving of BGP4+ routing information, which includes the filtering of routing information and the application of the routing policies.
l Soft resetting the BGP4+ connections
In the S9300, BGP4+ supports the route-refresh capability. When the policies are changed, the system can refresh the BGP4+ routing table automatically without interrupting the
BGP4+ connections.
If there are switches that do not support route-refresh in the network, you can run the peer
keep-all-routes command to save all route refreshment locally. Then, you can run the
refresh bgp command to soft reset the BGP4+ connections manually.
Pre-configuration Tasks
Before controlling the advertising and receiving of BGP4+ routing information, complete the following tasks: l
Configuring Basic BGP4+ Functions
Data Preparation
To control the advertising and receiving of BGP4+ routing information, you need the following data.
2
3
No.
Data
1 Name and process ID of the external route to be imported
Name of the filtering list used in the routing policies
Various parameters of route dampening, including half-life of a reachable route, halflife of an unreachable route, threshold for freeing suppressed routes, threshold for suppressing routes, and upper limit of the penalty
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
639
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
9 BGP4+ Configuration
9.5.2 Configuring BGP4+ to Advertise Local IPv6 Routes
The local routes to be advertised must be in the local IP routing table. You can use routing policies to control the routes to be advertised.
Context
Do as follows on the BGP4+ router:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
bgp as-number
The BGP view is displayed.
Step 3 Run:
ipv6-family unicast
The BGP IPv6 unicast address family view is displayed.
Step 4 Run:
network ipv6-address prefix-length [ route-policy route-policy-name ]
The exactly-matched local IPv6 routes are advertised.
You can use the network command to statically inject the IPv6 routes to the BGP4+ routing table.
To be specific, the command can be used to advertise the routes only with the exactly-matched address prefix and mask. If the mask is not designated, the routes are exactly matched based on the natural network segment.
The local routes to be advertised should be in the local IPv6 routing table. You can use routing policies to control the routes to be advertised more flexibly.
----End
9.5.3 Configuring BGP4+ Route Aggregation
By configuring route aggregation, you can reduce the size of the routing table of a peer. BGP4
+ supports automatic aggregation and manual aggregation.
Context
Do as follows on the router enabled with BGP4+:
Procedure
Step 1 Run:
system-view
Issue 01 (2011-10-26) 640
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 9 BGP4+ Configuration
The system view is displayed.
Step 2 Run:
bgp as-number
The BGP view is displayed.
Step 3 Run:
ipv6-family unicast
The IPv6 unicast address family view is displayed.
Step 4 Run:
aggregate ipv6-address prefix-length [ as-set | attribute-policy route-policy-
name1 | detail-suppressed | origin-policy route-policy-name2 | suppress-policy
route-policy-name3 ]
*
Manual aggregation of routes is configured.
Manual aggregation is valid for the routing entries in the local BGP4+ routing table. For example, if 9:3::1/64 does not exist in the BGP routing table, BGP4+ does not advertise the aggregated route even after the aggregate 9:3::1 64 command is run to aggregate this route.
When configuring manual aggregation of routes, you can apply various routing policies and set the route attributes.
----End
9.5.4 Configuring BGP4+ to Import and Filter External Routes
After BGP4+ filters the imported routes, only the eligible routes are added to the local BGP4+ routing table and advertised to BGP4+ peers.
Context
Do as follows on the BGP4+ router:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
bgp as-number
The BGP view is displayed.
Step 3 Run:
ipv6-family unicast
The BGP IPv6 unicast address family view is displayed.
Step 4 Run:
default-route imported
BGP4+ is configured to import the default routes.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
641
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 9 BGP4+ Configuration
If the default-route imported command is not used, you cannot import the default routes from other protocols by using the import-route command.
Step 5 Run:
import-route protocol [ process-id ] [ med med | route-policy route-policy-name ]
*
BGP4+ is configured to import routes of other protocols.
NOTE
Specify the process ID when the routes of a dynamic routing protocol are imported.
Step 6 Run:
filter-policy { acl6-number | acl6-name acl6-name | ipv6-prefix ipv6-prefix-name }
export [ protocol [ process-id ] ]
Imported routes are filtered.
After BGP4+ filters the imported routes, only the eligible routes are added to the BGP4+ local routing table and advertised to BGP4+ peers. If protocol [ process-id ] is specified, the routes of the specific routing protocol are filtered. If protocol [ process-id ] is not specified, all the local
BGP routes to be advertised are filtered, including the imported routes and the local routes advertised through the network command.
----End
9.5.5 Configuring ses to Advertise Default Routes to Peers
A router sends a default route with the local address being the next hop to the specified peer, regardless of whether there are default routes in the local routing table.
Context
Do as follows on the BGP4+ router:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
bgp as-number
The BGP view is displayed.
Step 3 Run:
ipv6-family unicast
The BGP IPv6 unicast address family view is displayed.
Step 4 Run:
peer { ipv6-address | group-name } default-route-advertise [ route-policy route-
policy-name ]
Default routes are advertised to peers (or a peer group).
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
642
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 9 BGP4+ Configuration
NOTE
After the command peer default-route-advertise is run, the switch sends a default route with the local address as the next hop to the specified peer, regardless of whether there are default routes in the routing table.
----End
9.5.6 Configuring the Policy for Advertising BGP4+ Routing
Information
After the policy for advertising routes is configured, only the routes that match the policy can be added to the local BGP4+ routing table and advertised to BGP4+ peers.
Context
Do as follows on the BGP4+ router:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
bgp as-number
The BGP view is displayed.
Step 3 Run:
ipv6-family unicast
The BGP IPv6 unicast address family view is displayed.
Step 4 Run the following command to configure the outbound routing policy based on the following different filters: l Based on the routing policy
Run:
peer { ipv4-address | ipv6-address | group-name } route-policy route-policy-
name export l Based on the ACL
Run:
peer { ipv4-address | ipv6-address | group-name } filter-policy { acl6-number |
acl6-name acl6-name } export l Based on the AS_Path list
Run:
peer { ipv4-address | ipv6-address | group-name } as-path-filter as-path-filter-
number export l Based on the prefix list
Run:
peer { ipv4-address | ipv6-address | group-name } ipv6-prefix ip-prefix-name
export
The commands in Step 4 can be run regardless of the order.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
643
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
9 BGP4+ Configuration
The outbound routing updates policies used by the members of a peer group can be different from that used by the group. That is, members of each peer group can select their policies when advertising routes externally.
----End
9.5.7 Configuring the Policy for Receiving BGP4+ Routing
Information
Only the routes that match the policy for receiving routes can be received by BGP4+ peers and added to the routing table.
Context
Do as follows on the BGP4+ router:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
bgp as-number
The BGP view is displayed.
Step 3 Run:
ipv6-family unicast
The BGP IPv6 unicast address family view is displayed.
Step 4 Run:
filter-policy { acl6-number | acl6-name acl6-name | ipv6-prefix ipv6-prefix-name }
import
The imported global routes are filtered.
Step 5 Run:
peer { ipv4-address | ipv6-address | group-name } route-policy route-policy-name
import
BGP is configured to filter the routes imported from the specified peers.
Step 6 Run:
peer { ipv4-address | ipv6-address | group-name } filter-policy { acl6-number |
acl6-name acl6-name } import
BGP is configured to filter the routes based on the ACL.
Step 7 Run:
peer { ipv4-address | ipv6-address | group-name } as-path-filter as-path-filter-
number import
BGP is configured to filter the routes based on the AS path list.
Step 8 Run:
Issue 01 (2011-10-26) 644
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
9 BGP4+ Configuration
peer { ipv4-address | ipv6-address | group-name } ipv6-prefix ipv6-prefix-name
import
BGP is configured to filter the routes based on the prefix list.
The commands in Steps 4 to 8 can be run regardless of the order.
The routes imported by BGP can be filtered, and only those routes that meet certain conditions are received by BGP and added to the routing table.
The inbound routing policies used by the members in a peer group can be different from that used by the group. That is, each peer can select its policy when importing routes.
----End
9.5.8 Configuring BGP4+ Soft Resetting
When routing policies are changed, the system can refresh the BGP4+ routing table dynamically without interrupting BGP4+ connections.
Procedure
l Enabling the Route-refresh Capability
Do as follows on the BGP4+ router:
1.
Run:
system-view
The system view is displayed.
2.
Run:
bgp as-number
The BGP view is displayed.
3.
Run:
peer { ipv4-address | ipv6-address | group-name } capability-advertise
{ route-refresh | 4-byte-as }
The route-refresh capability is enabled.
By default, the route-refresh capability is enabled.
If the route-refresh capability is enabled on all the BGP4+ routers, the local switch advertises the route-refresh messages to its peer if the BGP4+ route policies change.
The peer receiving this message sends its routing information to the local switch again.
In this way, the BGP4+ routing table is updated dynamically and the new policies are applied without interrupting the BGP4+ connections.
l Keeping All Route Updates of Peers
Do as follows on the BGP4+ router:
1.
Run:
system-view
The system view is displayed.
2.
Run:
bgp as-number
Issue 01 (2011-10-26) 645
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 9 BGP4+ Configuration
The BGP view is displayed.
3.
Run:
ipv6-family unicast
The BGP IPv6 unicast address family view is displayed.
4.
Run:
peer { ipv4-address | ipv6-address | group-name } keep-all-routes
All route updates of the peers are kept.
After this command is run, all the route updates of the specified peer are kept regardless of whether the filtering policies are used. When the BGP connections are soft reset, this information can be used to generate the BGP4+ routes.
l Soft Resetting a BGP4+ Connection Manually
Do as follows on the BGP4+ router:
1.
Run:
refresh bgp ipv6 { all | ipv4-address | ipv6-address | group group-name |
external | internal } { export | import }
A BGP4+ connection is soft reset.
A BGP4+ connection must be soft reset in the user view.
----End
9.5.9 Checking the Configuration
After the advertising and receiving of BGP4+ routes are controlled, you can check the advertised routes that match the specified filter.
Prerequisite
The configurations of controlling the advertising and receiving of BGP4+ routing information are complete.
Procedure
l Run the display bgp ipv6 network command to check the routes advertised through the
network command.
l Run the display bgp ipv6 routing-table as-path-filter as-path-filter-number command to check the routes matching the specified AS-Path filter.
l Run the display bgp ipv6 routing-table community-filter { { community-filter-name |
basic-community-filter-number } [ whole-match ] | advanced-community-filter-number } command to check the routes matching the specified BGP4+ community filter.
l
Run the display bgp ipv6 routing-table peer { ipv4-address | ipv6-address } { advertised-
routes | received-routes } [ statistics ] command to check the routing information advertised or received by the BGP4+ peers.
----End
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
646
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 9 BGP4+ Configuration
9.6 Configuring Parameters of a Connection Between BGP4
+ Peers
By setting parameters of a connection between BGP4+ peers, you can adjust and optimize the
BGP4+ network performance.
9.6.1 Establishing the Configuration Task
Before configuring parameters of a connection between BGP4+ peers, familiarize yourself with the applicable environment, complete the pre-configuration tasks, and obtain the required data.
This can help you complete the configuration task quickly and accurately.
Applicable Environment
After a BGP4+ connection is set up between peers, the peers periodically send Keepalive messages to each other. This prevents the switches from considering that the BGP4+ connection is closed. If a switch does not receive any Keepalive message or any type of packets from the peer within the specified Hold time, the BGP4+ connection is considered as closed.
When a switch sets up a BGP4+ connection with its peer, the switch and the peer need negotiation with each other. The Hold time after negotiation is the shorter one between the Hold time of the switch and that of its peer. If the negotiation result is 0, no Keepalive message is transmitted and whether the Hold timer expires is not detected.
If the value of the timer changes, the BGP4+ connection is interrupted for a short time as the switch and its peer need negotiate again.
Pre-configuration Tasks
Before configuring the parameters of a connection between BGP4+ peers, complete the following tasks: l
Configuring Basic BGP4+ Functions
Data Preparation
To configure the parameters of a connection between BGP4+ peers, you need the following data.
No.
Data
1 Values of the BGP4+ timers
2 Interval for sending the update packets
9.6.2 Configuring BGP4+ Timers
Configuring timers properly can improve network performance. Changing the values of BGP4
+ timers will interrupt the peer relationship.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
647
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Context
9 BGP4+ Configuration
CAUTION
As the change of the timer (with the peer timer command) tears down the BGP peer relationship between switches. So, confirm the action before you use the command.
Do as follows on the BGP4+ router:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
bgp as-number
The BGP view is displayed.
Step 3 Run:
peer { ipv6-address | group-name } timer keepalive keepalive-time hold hold-time
The interval for sending Keepalive messages and the Hold time of a peer (or peer group) are set.
In actual applications, the value of hold-time is at least three times that of keepalive-time.
By default, the Keepalive time is 60s and the Hold time is 180s.
NOTE
Setting the hold interval of a BGP peer to be longer than 20s is recommended. If the hold interval of a BGP peer is shorter than 20s, the session may be closed.
Note the following when you set the values of keepalive-time and hold-time: l When the values of keepalive-time and hold-time are 0 at the same time, the BGP timer becomes invalid. That is, BGP does not detect link faults according to the timer.
l The value of hold-time is far greater than that of keepalive-time, such as, timer keepalive 1
hold 65535. If the Hold time is too long, the link fault cannot be detected on time.
----End
9.6.3 Configuring the Interval for Sending Update Packets
When a route changes, a router sends an Update packet to notify its peer. If a route changes frequently, to prevent the router from sending Update packets for every change, you can set the interval for sending Update packets for changes of this route.
Context
Do as follows on the BGP4+ router:
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
648
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
9 BGP4+ Configuration
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
bgp as-number
The BGP view is displayed.
Step 3 Run:
ipv6-family unicast
The BGP IPv6 unicast address family view is displayed.
Step 4 Run:
peer ipv6-address route-update-interval interval
The interval for sending update packets is set.
By default, the update interval is 15 seconds for the IBGP peers and the update interval is 30 seconds for the EBGP peers.
----End
9.6.4 Checking the Configuration
After parameters of a connection between BGP4+ peers are configured, you can check BGP4+ peers and peer groups.
Prerequisite
The configurations of parameters of a connection between BGP4+ peers are complete.
Procedure
l Run the display bgp ipv6 peer ipv4-address verbose command to check detailed information about the BGP4+ peers.
l Run the display bgp ipv6 peer ipv6-address { log-info | verbose } command to check information about the BGP4+ peers.
----End
Example
Run the display bgp ipv6 peer ipv6-address verbose command in the system view. You can view the configured Keepalive period, holdtime, and interval at which Update packets are sent.
<SwitchB> display bgp peer 9:1::1 verbose
BGP Peer is 9:1::1, remote AS 100
Type: IBGP link
BGP version 4, Remote router ID 1.1.1.1
Update-group ID: 1
BGP current state: Established, Up for 00h01m05s
BGP current event: KATimerExpired
BGP last state: OpenConfirm
BGP Peer Up count: 2
Issue 01 (2011-10-26) 649
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 9 BGP4+ Configuration
Received total routes: 0
Received active routes total: 0
Advertised total routes: 0
Port: Local - 49153 Remote - 179
Configured: Active Hold Time: 150 sec Keepalive Time:40 sec
Received : Active Hold Time: 180 sec
Negotiated: Active Hold Time: 150 sec Keepalive Time:40 sec
Peer optional capabilities:
Peer supports bgp multi-protocol extension
Peer supports bgp route refresh capability
Peer supports bgp 4-byte-as capability
Address family IPv6 Unicast: advertised and received
Received: Total 3 messages
Update messages 0
Open messages 1
KeepAlive messages 2
Notification messages 0
Refresh messages 0
Sent: Total 4 messages
Update messages 0
Open messages 1
KeepAlive messages 3
Notification messages 0
Refresh messages 0
Authentication type configured: None
Last keepalive received: 2010/11/17 16:11:42 UTC-08:00
Minimum route advertisement interval is 20 seconds
Optional capabilities:
Route refresh capability has been enabled
4-byte-as capability has been enabled
Peer Preferred Value: 0
Routing policy configured:
No routing policy is configured
9.7 Configuring BGP4+ Tracking
On a network where BFD is unsuitable to deploy, you can configure BGP4+ tracking to implement the fast convergence of IBGP routes.
9.7.1 Establishing the Configuration Task
Before configuring BGP4+ tracking, familiarize yourself with the applicable environment, complete the pre-configuration tasks, and obtain the required data. This can help you complete the configuration task quickly and accurately.
Applicable Environment
Since BFD is difficult to deploy and is of poor scalability, in a network where BFD is unsuitable to be deployed, you can configure BGP4+ tracking as a substitution for BFD to implement the fast convergence of BGP4+ routes.
BGP4+ tracking is easy to deploy because it needs to be configured only on the local device, without the need of configuring it on the peer device. However, BGP4+ route convergence in a network configured with BGP4+ tracking is slower than that in a network enabled with BFD; therefore, BGP4+ tracking cannot meet the requirement of voice services that demand high convergence speed.
Pre-configuration Tasks
Before configuring BGP4+ tracking, complete the following tasks:
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
650
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing l
Configuring basic BGP4+ functions
Data Preparation
To configure BGP4+ tracking, you need the following data.
No.
1
Data
(Optional) Delay for tearing down a connection
9 BGP4+ Configuration
9.7.2 Enabling BGP4+ Tracking
Easy to deploy, BGP4+ tracking can speed up network convergence and adjust the interval between a peer's being discovered unreachable and the connection's being torn down.
Context
Do as follows on the switch enabled with BGP4+:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
bgp as-number
The BGP view is displayed.
Step 3 Run:
peer { group-name | ipv6-address } tracking [ delay delay-time ]
BGP4+ tracking is enabled for the specified peer.
By default, BGP4+ tracking is disabled.
A proper value of delay-time can ensure network stability when a peer is detected unreachable.
l If delay-time is set to 0, BGP immediately tears down the connection between the local device and its peer after the peer is detected unreachable.
l If IGP route flapping occurs and delay-time for an IBGP peer is set to 0, the peer relationship between the local device and the peer alternates between Up and Down. Therefore, delay-
time for an IBGP peer should be set to a value greater than the actual IGP route convergence time.
l When BGP neighbors successfully perform the GR negotiation, the active/standby switchover occurs on the BGP neighbors, to prevent the failure of GR, delay-time should be set to a value greater than GR period. If delay-time is set to be smaller than the GR period, the connection between the local device and the BGP peer will be torn down, which leads to the failure of GR.
----End
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
651
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 9 BGP4+ Configuration
9.7.3 Checking the Configuration
After BGP4+ tracking is configured, you can check the configuration of BGP4+ tracking by viewing detailed information about the BGP peer or peer group.
Prerequisite
All BGP4+ tracking configurations are complete.
Checking the Configuration
Run the following commands to check the previous configuration.
l Run the display bgp ipv6 peer [ ipv4-address ] [ verbose ] command to check information about the BGP4+ peer.
l Run the display bgp ipv6 group [ group-name ] command to check information about the
BGP4+ peer group.
9.8 Configuring BGP4+ Route Dampening
By configuring BGP4+ route dampening, you can suppress unstable BGP4+ routes.
9.8.1 Establishing the Configuration Task
Before configuring BGP4+ route dampening, familiarize yourself with the applicable environment, complete the pre-configuration tasks, and obtain the required data. This can help you complete the configuration task quickly and accurately.
Applicable Environment
BGP4+ dampening can suppress unstable routes. BGP4+ neither adds the unstable routes to the routing table nor advertises them to other BGP peers.
Pre-configuration Tasks
Before configuring BGP4+ route dampening, complete the following task: l
Configuring Basic BGP4+ Functions
Data Preparation
To configure BGP4+ route dampening, you need the following data.
No.
Data
1 Various parameters of dampening, including half-life of a reachable route, half-life of an unreachable route, threshold for freeing the suppressed routes, threshold for suppressing routes, and upper limit of the penalty
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
652
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
9.8.2 Configuring BGP4+ Route Dampening
BGP4+ route dampening can improve network stability. You can flexibly use routing policies for route dampening.
Context
Do as follows on the BGP4+ router:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
bgp as-number
The BGP view is displayed.
Step 3 Run:
ipv6-family unicast
The BGP IPv6 unicast address family view is displayed.
Step 4 Run:
dampening [ half-life-reach reuse suppress ceiling | route-policy route-policy-
name ]
*
The parameters are configured for BGP4+ route dampening.
----End
9.8.3 Checking the Configuration
After BGP4+ route dampening is configured, you can check BGP4+ suppressed routes, parameters of BGP4+ route dampening, and flapped routes.
Prerequisite
9 BGP4+ Configuration
The configurations of BGP4+ route dampening are complete.
Procedure
l Run the display bgp ipv6 routing-table dampened command to check BGP4+ dampened routes.
l Run the display bgp ipv6 routing-table dampening parameter command to check the configuration parameters of BGP4+ dampening.
l Run the display bgp ipv6 routing-table flap-info [ regular-expression as-regular-
expression | as-path-filter as-path-filter-number | network-address [ prefix-length
[ longer-match ] ] ] command to check the statistics of BGP4+ route flapping.
----End
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
653
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 9 BGP4+ Configuration
9.9 Configuring BGP4+ Load Balancing
By configuring BGP4+ load balancing, you can properly use network resources.
9.9.1 Establishing the Configuration Task
Before configuring BGP4+ load balancing, familiarize yourself with the applicable environment, complete the pre-configuration tasks, and obtain the required data. This can help you complete the configuration task quickly and accurately.
Applicable Environment
Load balancing can be performed among equal-cost BGP4+ routes whose first eight attributes
described in "Principles of Route Selection" of
8.2 BGP Features Supported by the S9300
are the same and AS_Path attributes are the same.
Pre-configuration Tasks
Before configuring BGP4+ load balancing, complete the following task: l
Configuring Basic BGP4+ Functions
Data Preparation
To configure BGP4+ load balancing, you need the following data.
No.
Data
1 The number of routes for load balancing
9.9.2 Setting the Number of Routes for BGP4+ Load Balancing
Load balancing can be implemented among multiple equal-cost links between BGP4+ peers.
Context
Do as follows on the BGP4+ router:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
bgp as-number
The BGP view is displayed.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
654
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 9 BGP4+ Configuration
Step 3 Run:
ipv6-family unicast
The BGP IPv6 unicast address family view is displayed.
Step 4 Run:
maximum load-balancing number
The maximum number of equal-cost routes for BGP4+ load balancing is set.
By default, the number of equal-cost routes for BGP4+ load balancing is 1.
----End
9.9.3 Checking the Configuration
After BGP4+ load balancing is configured, you can check information about load balancing.
Prerequisite
The configurations of BGP4+ load balancing are complete.
Procedure
l Run the display bgp ipv6 routing-table [ ipv6-address prefix-length ] command to check information about the BGP4+ routing table.
l Run the display ipv6 routing-table [ verbose ] command to check information about the
IPv6 routing table.
----End
9.10 Configuring a BGP4+ Peer Group
By configuring a BGP4+ peer group, you can simplify the management of routing policies, and thus improve the efficiency of route advertisement.
9.10.1 Establishing the Configuration Task
Before configuring a BGP4+ peer group, familiarize yourself with the applicable environment, complete the pre-configuration tasks, and obtain the required data. This can help you complete the configuration task quickly and accurately.
Applicable Environment
A great number of peers exist in a large-scale BGP4+ network, which is not convenient for configuration and maintenance. In this case, you can configure peer groups to simplify the management and improve the efficiency of route advertisement. According to the AS where the peers reside, you can classify peer groups into IBGP peer groups and EBGP peer groups. You can classify EBGP peer groups into pure EBGP peer groups and mixed EBGP peer groups. This classification is performed according to the position of the peers in the same external AS.
Pre-configuration Tasks
Before configuring a BGP4+ peer group, complete the following task:
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
655
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing l
Configuring Basic BGP4+ Functions
Data Preparation
To configure a BGP4+ peer group, you need the following data.
No.
Data
1 Type, name of the peer group, and the member peers
9 BGP4+ Configuration
9.10.2 Creating an IBGP Peer Group
When BGP4+ has multiple IBGP peers, you can create an IBGP peer group to simplify the management of routing policies. When creating an IBGP peer group, you do not need to specify the AS number.
Context
Do as follows on the BGP4+ router:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
bgp as-number
The BGP view is displayed.
Step 3 Run:
group group-name [ internal ]
A peer group is created.
Step 4 Run:
ipv6-family unicast
The BGP IPv6 unicast address family view is displayed.
Step 5 Run:
peer group-name enable
The peer group is enabled.
Step 6 Run:
peer { ipv4-address | ipv6-address } group group-name
The IPv6 peers are added to the peer group.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
656
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 9 BGP4+ Configuration
NOTE
After an IBGP peer is added to a peer group, the system automatically creates the IPv6 peer in the BGP view. Besides, the system enables this IBGP peer in the IPv6 address family view.
----End
9.10.3 Creating a Pure EBGP Peer Group
When BGP4+ has multiple EBGP peers that belong to the same AS, you can create an EBGP peer group to simplify the management of routing policies. All the peers in a pure EBGP peer group must have the same AS number.
Context
Do as follows on the BGP4+ router:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
bgp as-number
The BGP view is displayed.
Step 3 Run:
group group-name external
A pure EBGP peer group is configured.
Step 4 Run:
peer group-name as-number as-number
The AS number of the peer group is set.
Step 5 Run:
ipv6-family unicast
The BGP IPv6 unicast address family view is displayed.
Step 6 Run:
peer group-name enable
The peer group is enabled.
Step 7 Run:
peer ipv6-address group group-name
The IPv6 peer is added to the peer group.
After an EBGP peer is added to the peer group, the system automatically creates the EBGP peer in the BGP view. Besides, the system enables this EBGP peer in the IPv6 address family view.
When creating a pure EBGP peer group, you need to specify the AS number of the peer group.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
657
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 9 BGP4+ Configuration
If there are peers in the peer group, you cannot specify the AS number for this peer group.
----End
9.10.4 Creating a Mixed EBGP Peer Group
When BGP4+ has multiple EBGP peers that belong to different ASs, you can create a mixed
EBGP peer group to simplify the management of routing policies. When creating a mixed EBGP peer group, you need to specify the AS number for each peer.
Context
Do as follows on the BGP4+ router:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
bgp as-number
The BGP view is displayed.
Step 3 Run:
group group-name external
A mixed EBGP peer group is created.
Step 4 Run:
peer ipv6-address as-number as-number
The AS number of the IPv6 peer is set.
Step 5 Run:
ipv6-family unicast
The BGP IPv6 unicast address family view is displayed.
Step 6 Run:
peer group-name enable
The peer group is enabled.
Step 7 Run:
peer ipv6-address group group-name
The IPv6 peers created are added to this peer group.
After an EBGP peer is added to the peer group, the system automatically enables each EBGP peer in the IPv6 address family view.
When creating a mixed EBGP peer group, you need to create peers separately, and you can configure different AS numbers for them, but cannot configure the AS number for the peer group.
----End
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
658
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 9 BGP4+ Configuration
9.10.5 Checking the Configuration
After a BGP4+ peer group is configured, you can check detailed information about the BGP4+ peer and information about the BGP4+ peer group.
Prerequisite
The configurations of a BGP4+ peer group are complete.
Procedure
l Run the display bgp ipv6 group [ group-name ] command to check information about the
IPv6 peer group.
----End
9.11 Configuring a BGP4+ Route Reflector
By configuring a BGP4+ route reflector, you can solve the problem of establishing fully meshed connections between multiple IBGP peers.
9.11.1 Establishing the Configuration Task
Before configuring a BGP4+ route reflector, familiarize yourself with the applicable environment, complete the pre-configuration tasks, and obtain the required data. This can help you complete the configuration task quickly and accurately.
Applicable Environment
To ensure the connectivity between IBGP peers inside an AS, you need to establish full-meshed
IBGP peers. When there are many IBGP peers, establishing a full-meshed network costs a lot.
The route reflector or the confederation can be used to solve this problem.
Pre-configuration Tasks
Before configuring a BGP4+ route reflector, complete the following task: l
9.3 Configuring Basic BGP4+ Functions
Data Preparation
To configure a BGP4+ route reflector, you need the following data.
No.
Data
1 Roles of each switch (reflector, client, and non-client)
9.11.2 Configuring a Route Reflector and Specifying Clients
A route reflector and clients need to be configured in a specified address family.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
659
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
9 BGP4+ Configuration
Context
Do as follows on the BGP4+ router:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
bgp as-number
The BGP view is displayed.
Step 3 Run:
ipv6-family [ unicast ]
The BGP IPv6 unicast address family view is displayed.
Step 4 Run:
peer { ipv4-address | ipv6-address | group-name } reflect-client
The route reflector and its clients are configured.
The switch on which this command is run serves as the route reflector. In addition, this command specifies the peers that serve as its clients.
----End
9.11.3 (Optional) Disabling a Route Reflection Between Clients
If the clients of a route reflector are fully meshed, you can disable route reflection between clients to reduce the cost.
Context
Do as follows on the BGP4+ router:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
bgp as-number
The BGP view is displayed.
Step 3 Run:
ipv6-family unicast
The BGP IPv6 unicast address family view is displayed.
Step 4 Run:
undo reflect between-clients
Issue 01 (2011-10-26) 660
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 9 BGP4+ Configuration
Route reflection between clients is disabled.
If the clients of the route reflector are full-meshed, you can use the undo reflect between-
clients command to disable the route reflection between the clients. This reduces cost.
By default, the route reflection between clients is enabled.
This command is used only on the reflector.
----End
9.11.4 (Optional) Configuring the Cluster ID for a Route Reflector
When there are multiple route reflectors in a cluster, you need to configure the same cluster ID for all the route reflectors in this cluster to avoid routing loops.
Context
Do as follows on the BGP4+ router:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
bgp as-number
The BGP view is displayed.
Step 3 Run:
ipv6-family unicast
The BGP IPv6 unicast address family view is displayed.
Step 4 Run:
reflector cluster-id cluster-id
The cluster ID of the route reflector is set.
TIP
When there are multiple route reflectors in a cluster, you can use the command to configure all the route reflectors in this cluster with the same cluster ID. This avoids routing loops.
----End
9.11.5 Checking the Configuration
After a BGP4+ route reflector is configured, you can check BGP4+ route information and peer group information.
Prerequisite
The configurations of a BGP4+ route reflector are complete.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
661
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Procedure
9 BGP4+ Configuration l Run the display bgp ipv6 peer [ verbose ] command to check information about BGP4+ peers.
l Run the display bgp ipv6 peer ipv4-address verbose command to check information about
BGP4+ peers.
l Run the display bgp ipv6 peer ipv6-address { log-info | verbose } command to check information about BGP4+ peers.
----End
9.12 Configuring a BGP4+ Confederation
On a large-scale BGP4+ network, configuring a BGP4+ confederation can simplify the management of routing policies and improve the efficiency of route advertisement.
9.12.1 Establishing the Configuration Task
Before configuring a BGP4+ confederation, familiarize yourself with the applicable environment, complete the pre-configuration tasks, and obtain the required data. This can help you complete the configuration task quickly and accurately.
Applicable Environment
The confederation is a method of handling the abrupt increase of IBGP connections in an AS.
The confederation divides an AS into multiple sub-ASs. In each sub-AS, IBGP peers can be full-meshed or be configured with a route reflector. EBGP connections are set up between sub-
ASs.
Pre-configuration Tasks
Before configuring a BGP4+ confederation, complete the following task: l
Configuring Basic BGP4+ Functions
Data Preparation
To configure a BGP4+ confederation, you need the following data.
No.
Data
1 Confederation ID and the sub-AS number
9.12.2 Configuring a BGP Confederation
BGP4+ confederations deal with increasing IBGP connections in an AS.
Procedure
l Configuring a BGP Confederation
Do as follows on the BGP4+ router:
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
662
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 9 BGP4+ Configuration
1.
Run:
system-view
The system view is displayed.
2.
Run:
bgp as-number
The BGP view is displayed.
3.
Run:
confederation id as-number
The confederation ID is set.
4.
Run:
confederation peer-as as-number &<1-32>
The sub-AS number of other EBGP peers connected with the local AS is set.
A confederation includes up to 32 sub-ASs. as-number is valid for the confederation that it belongs to.
You must run the confederation id and confederation peer-as commands for all the
EBGP peers that belong to a confederation, and specify the same confederation ID for them.
NOTE
The old speaker with 2-byte AS numbers and the new speaker with 4-byte AS numbers cannot exist in the same confederation. Otherwise, routing loops may occur because AS4_Path does not support confederations.
l Configuring the Compatibility of a Confederation
Do as follows on the BGP4+ router:
1.
Run:
system-view
The system view is displayed.
2.
Run:
bgp as-number
The BGP view is displayed.
3.
Run:
confederation nonstandard
The compatibility of the confederation is configured.
When the confederation of other switches does not conform to the RFC, you can use this command to make standard devices be compatible with nonstandard devices.
----End
9.12.3 Checking the Configuration
After a BGP4+ confederation is configured, you can check BGP4+ route information and detailed peer information.
Prerequisite
The configurations of a BGP4+ confederation are complete.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
663
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Procedure
9 BGP4+ Configuration l Run the display bgp ipv6 peer [ verbose ] command to check detailed information about
BGP4+ peers.
----End
9.13 Configuring BGP4+ 6PE
By configuring BGP4+ 6PE, you can connect separated IPv6 networks through the MPLS tunneling technology.
9.13.1 Establishing the Configuration Task
Before configuring BGP4+ 6PE, familiarize yourself with the applicable environment, complete the pre-configuration tasks, and obtain the required data. This can help you complete the configuration task quickly and accurately.
Applicable Environment
6PE interconnects separated IPv6 networks at different locations by using the MPLS technology in an IPv4 network. Multiple modes are used to connect separated IPv6 networks by using the tunnel technology. The tunnel in 6PE mode supports the IPv4/IPv6 dual stacks on PEs of the
ISP. It identifies IPv6 routes by using the label assigned by MP-BGP, and implements IPv6 interworking through LSPs between PEs.
Pre-configuration Tasks
Before configuring BGP4+ 6PE, complete the following task: l Establishing LSPs between PEs
Data Preparation
To configure BGP4+ 6PE, you need the following data.
No.
Data
1 IP address and AS number of a PE
9.13.2 Configuring a 6PE Peer
6PE interconnects separated IPv6 networks at different locations by using the MPLS tunneling technology in an existing IPv4 network.
Context
Do as follows on the PE supporting the IPv4/IPv6 dual stacks:
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
664
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 9 BGP4+ Configuration
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
bgp as-number
The BGP view is displayed.
Step 3 Run:
peer ipv4-address as-number as-number
The IP address and AS number of a PE that needs to be configured with 6PE are specified.
Step 4 Run:
ipv6-family unicast
The BGP IPv6 unicast address family view is displayed.
Step 5 Run:
peer ipv4-address enable
A 6PE peer is configured in the IPv6 unicast address family view.
Step 6 Run:
peer ipv4-address label-route-capability
The capability of sending labeled routes is enabled.
----End
9.13.3 Checking the Configuration
After BGP4+ 6PE is configured, you can check BGP4+ peer information.
Prerequisite
The configurations of BGP4+ 6PE are complete.
Procedure
l Run the display bgp ipv6 peer [ verbose ] command to check detailed information about
BGP4+ peers.
----End
9.14 Configuring BGP4+ Security
To improve BGP4+ security, you can perform TCP connection authentication.
9.14.1 Establishing the Configuration Task
Before configuring BGP4+ network security, familiarize yourself with the applicable environment, complete the pre-configuration tasks, and obtain the required data. This can help you complete the configuration task quickly and accurately.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
665
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 9 BGP4+ Configuration
Applicable Environment
l BGP4+ authentication
BGP4+ uses TCP as the transport layer protocol. To enhance BGP4+ security, you can perform the Message Digest 5 (MD5) authentication when TCP connections are created.
The MD5 authentication, however, does not authenticate BGP4+ packets. Instead, it sets
MD5 authentication passwords for TCP connections, and the authentication is then completed by TCP. If the authentication fails, TCP connections cannot be established.
Pre-configuration Tasks
Before configuring BGP4+ security, complete the following task: l
Configuring Basic BGP4+ Functions
Data Preparation
Before configure BGP4+ security, you need the following data.
2
3
No.
Data
1 BGP4+ peer address or name of the peer group of each switch
MD5 authentication password
Key-Chain authentication name
9.14.2 Configuring MD5 Authentication
In MD5 authentication of BGP4+, you only need to set MD5 authentication passwords for TCP connections, and the authentication is performed by TCP. If the authentication fails, TCP connections cannot be established.
Context
Do as follows on the BGP4+ router:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
bgp as-number
The BGP view is displayed.
Step 3 Run:
peer { ipv6-address | group-name } password { cipher cipher-password | simple
simple-password }
The MD5 authentication password is configured.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
666
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 9 BGP4+ Configuration
NOTE
When this command is used in the BGP4+ view, the extensions on VPNv6 of MP-BGP are also valid because they use the same TCP connection.
Characters $@$@ are used as the prefix and suffix of passwords with variable lengths, and they cannot be both configured at the beginning and end of a plain text password.
The BGP MD5 authentication and BGP Keychain authentication are mutually exclusive.
----End
9.14.3 Configuring Keychain Authentication
You need to configure Keychain authentication on both BGP4+ peers, and ensure that encryption algorithms and passwords configured for Keychain authentication on both peers are the same.
Otherwise, TCP connections cannot be established between BGP4+ peers, and BGP4+ messages cannot be exchanged.
Context
Do as follows on the BGP4+ router:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
bgp as-number
The BGP view is displayed.
Step 3 Run:
peer { ipv6-address | group-name } keychain keychain-name
The Keychain authentication is configured.
You must configure Keychain authentication on both BGP peers. Note that encryption algorithms and passwords configured for the Keychain authentication on both peers must be the same; otherwise, the TCP connection cannot be set up between BGP peers and BGP messages cannot be transmitted.
Before configuring the BGP Keychain authentication, configure a Keychain in accordance with the configured keychain-name. Otherwise, the TCP connection cannot be set up.
NOTE
l When this command is used in the BGP view, the extensions on VPNv6 of MP-BGP are also valid because they use the same TCP connection.
l The BGP MD5 authentication and BGP Keychain authentication are mutually exclusive.
----End
9.14.4 Configuring Basic BGP4+ GTSM Functions
The GTSM mechanism protects a router by checking whether the TTL value in the IP header is in a pre-defined range.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
667
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 9 BGP4+ Configuration
Procedure
l Configuring Basic BGP4+ GTSM Functions
Do as follows on the two peers:
1.
Run:
system-view
The system view is displayed.
2.
Run:
bgp as-number
The BGP view is displayed.
3.
Run
peer { group-name | ipv6-address } valid-ttl-hops [ hops ]
Basic BGP4+ GTSM functions are configured.
The range of TTL values of packets is [ 255-hops+1, 255 ]. By default, the value of
hops is 255. That is, the valid TTL range is [ 1, 255 ]. For example, for the direct
EBGP route, the value of hops is 1. That is, the valid TTL value is 255.
After the BGP4+ GTSM policy is configured, an interface board checks the TTL values of all BGP4+ packets. According to the actual networking requirements, you can configure GTSM to discard or process the packets that do not match the GTSM policy. If you configure GTSM to discard the packets that do not match the GTSM policy by default, you can configure the range of finite TTL values according to the network topology; therefore, the interface board directly discards the packets with the
TTL value not in the configured range. Thus, the attackers cannot simulate valid BGP4
+ packets to occupy CPU resources.
l Performing the Default GTSM Action
Do as follows on the switch configured with GTSM:
1.
Run:
system-view
The system view is displayed.
2.
Run:
gtsm default-action { drop | pass }
The default action is configured for the packets that do not match the GTSM policy.
By default, the packets that do not match the GTSM policy can pass the filtering.
NOTE
If only the default action is configured and the GTSM policy is not configured, GTSM does not take effect.
----End
9.14.5 Checking the Configuration
After BGP4+ network security is configured, you can check authentication information of BGP4
+ peers.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
668
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 9 BGP4+ Configuration
Prerequisite
The configurations of BGP4+ security are complete.
Procedure
l Run the display gtsm statistics { slot-id | all } command to check the statistics of GTSM.
Run the display gtsm statistics command. You can view GTSM statistics on each board, including the total number of BGP4+ packets, the total number of OSPF packets, the number of packets that match the GTSM policy, and the number of discarded packets.
----End
9.15 Maintaining BGP4+
Maintaining BGP4+ involves resetting a BGP4+ connection and clearing BGP4+ statistics.
9.15.1 Debugging BGP4+
You can also reset BGP4+ in GR mode. Resetting a BGP4+ connection will interrupt the peer relationship.
Context
CAUTION
Debugging affects the performance of the system. So, after debugging, run the undo debugging
all command to disable it immediately.
When a BGP4+ fault occurs, run the following debugging commands in the user view to debug and locate the fault.
For the procedure of displaying the debugging information, refer to the chapter "Maintenance and Debugging" in the Configuration Guide - System Management.
For the related debugging command, refer to the Debugging Reference.
Procedure
Issue 01 (2011-10-26) l Run the debugging bgp update ipv6 [ peer { ipv4-address | ipv6-address } | ipv6-
prefix ipv6-prefix-name | acl acl-number ] [ receive | send ] [ verbose ] command in the user view to debug the BGP4+ update packets.
l Run the debugging bgp [ ipv6-address ] all command in the user view to debug all the
BGP4+.
l
Run the debugging bgp [ ipv6-address ] event command in the user view to debug the
BGP4+ events.
l Run the debugging bgp [ ipv6-address ] { keepalive | open | packet | route-refresh }
[ receive | send ] [ verbose ] command in the user view to debug the BGP4+ packets.
----End
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
669
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
9.15.2 Resetting BGP4+ Connections
This section describes how to clear the statistics of BGP4+ accounting, flapped routes, and suppressed routes.
Context
9 BGP4+ Configuration
CAUTION
The peer relationship is broken after you reset the BGP4+ connections with the reset bgp
ipv6 command. So, confirm the action before you use the command.
Procedure
l To validate the new configuration, run the reset bgp ipv6 all command in the user view to reset all the BGP4+ connections.
l To validate the new configuration, run the reset bgp ipv6 as-number command in the user view to reset the BGP+4 connections between the peers in a specified AS.
l To validate the new configuration, run the reset bgp ipv6 { ipv4-address | ipv6-address |
group group-name } command in the user view to reset the BGP+4 connections with the specified peer (or peer group).
l To validate the new configuration, run the reset bgp ipv6 external command in the user view to reset the external BGP4+ connections.
l To validate the new configuration, run the reset bgp ipv6 internal command in the user view to reset the internal BGP4+ connections.
----End
9.15.3 Clearing BGP4+ Statistics
Devices can generate debugging information after the debugging of a module is enabled in the user view. Debugging information shows the contents of the packets sent or received by the debugged module.
Context
After the BGP4+ configuration changes, reset the BGP4+ connections to validate the modification.
To reset the BGP4+ connections, run the following reset command in the user view.
Issue 01 (2011-10-26)
CAUTION
The BGP4+ statistics cannot be restored after you clear it. So, confirm the action before you use the command.
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
670
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Procedure
9 BGP4+ Configuration l Run the reset bgp ipv6 dampening [ ipv6-address prefix-length ] command in the user view to clear information about route dampening and release the suppressed routes.
l Run the reset bgp ipv6 flap-info [ ipv6-address prefix-length | regexp as-path-regexp |
as-path-filter as-path-filter-number ] command in the user view to clear the statistics of route flapping.
----End
9.16 Configuration Examples
This section provides several configuration examples of BGP4+.
9.16.1 Example for Configuring Basic BGP4+ Functions
Networking Requirements
, there are two ASs: 65008 and 65009. Switch A belongs to AS 65008, and Switch B, Switch C, and Switch D belong to AS 65009. BGP4+ is required to be used to exchange routing information between the two ASs.
Figure 9-1 Networking diagram for configuring basic BGP4+ functions
VLANIF10
8::1/64
GE1/0/0
AS 65008
GE2/0/0
SwitchA
VLANIF20
10::2/64
AS 65009
GE2/0/0
VLANIF20
10::1/64
V
LA
N
IF
9:
3:
30
:1
/6
G
4
E
3/
VL
AN
9:
IF
3:
30
:2
/6
G
4
E
3/
0/
0
9:2
GE
SwitchC
2/0
::1
/0
VL
AN
/64
IF
50
0/
0
GE1/0/0
GE
2/0
/0
VL
AN
::2
IF
/64
50
GE1/0/0
SwitchB
VLANIF40
9:1::1/64
VLANIF40
9:1::2/64
SwitchD
Issue 01 (2011-10-26)
Device name
Switch A
Switch A
Switch B
Switch B
Switch B
Switch C
Switch C
Switch D
Interface
GE1/0/0
GE2/0/0
GE2/0/0
GE3/0/0
GE1/0/0
GE3/0/0
GE2/0/0
GE1/0/0
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
VLANIF interface IP address
VLANIF 10 8::1/64
VLANIF 20
VLANIF 20
VLANIF 30
VLANIF 40
VLANIF 30
VLANIF 50
VLANIF 40
10::2/64
10::1/64
9:3::1/64
9:1::1/64
9:3::2/64
9:2::1/64
9:1::2/64
671
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Switch D GE2/0/0 VLANIF 50
9 BGP4+ Configuration
9:2::2/64
Configuration Roadmap
The configuration roadmap is as follows:
1.
Configure IBGP connections between Switch B, Switch C, and Switch D.
2.
Configure an EBGP connection between Switch A and Switch B.
Data Preparation
To complete the configuration, you need the following data: l The router ID of Switch A is 1.1.1.1 and the AS ID is 65008.
l The router IDs of Switch B, Switch C, and Switch D are 2.2.2.2, 3.3.3.3, and 4.4.4.4, and the ID of the AS where they are located is 65009.
Procedure
Step 1 Add interfaces to VLANs.
<Quidway> system-view
[Quidway] sysname SwitchA
[SwitchA] vlan batch 10 20
[SwitchA] interface gigabitethernet 1/0/0
[SwitchA-GigabitEthernet1/0/0] port hybrid pvid vlan 10
[SwitchA-GigabitEthernet1/0/0] port hybrid untagged vlan 10
[SwitchA-GigabitEthernet1/0/0] quit
[SwitchA] interface gigabitethernet 2/0/0
[SwitchA-GigabitEthernet2/0/0] port hybrid pvid vlan 20
[SwitchA-GigabitEthernet2/0/0] port hybrid untagged vlan 20
[SwitchA-GigabitEthernet2/0/0] quit
The configurations of Switch B, Switch C, and Switch D are similar to the configuration of
Switch A and are not mentioned here.
Step 2 Enable the IPv6 forwarding capability, and assign an IPv6 address for each interface. The following is the configuration of Switch A. The configurations of other Switches are similar to the configuration of Switch A and are not mentioned here.
<Quidway> system-view
[Switch A] ipv6
[Switch A] interface vlanif 10
[Switch A-Vlanif10] ipv6 enable
[Switch A-Vlanif10] ipv6 address 8::1/64
[Switch A] interface vlanif 20
[Switch A-Vlanif20] ipv6 enable
[Switch A-Vlanif20] ipv6 address 10::2/64
Step 3 Configure IBGP.
# Configure Switch B.
[Switch B] bgp 65009
[Switch B-bgp] router-id 2.2.2.2
[Switch B-bgp] peer 9:1::2 as-number 65009
[Switch B-bgp] peer 9:3::2 as-number 65009
[Switch B-bgp] ipv6-family unicast
[Switch B-bgp-af-ipv6] peer 9:1::2 enable
[Switch B-bgp-af-ipv6] peer 9:3::2 enable
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
672
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 9 BGP4+ Configuration
[Switch B-bgp-af-ipv6] network 9:1:: 64
[Switch B-bgp-af-ipv6] network 9:3:: 64
# Configure Switch C.
[Switch C] bgp 65009
[Switch C-bgp] router-id 3.3.3.3
[Switch C-bgp] peer 9:3::1 as-number 65009
[Switch C-bgp] peer 9:2::2 as-number 65009
[Switch C-bgp] ipv6-family unicast
[Switch C-bgp-af-ipv6] peer 9:3::1 enable
[Switch C-bgp-af-ipv6] peer 9:2::2 enable
[Switch C-bgp-af-ipv6] network 9:3:: 64
[Switch C-bgp-af-ipv6] network 9:2:: 64
# Configure Switch D.
[Switch D] bgp 65009
[Switch D-bgp] router-id 4.4.4.4
[Switch D-bgp] peer 9:1::1 as-number 65009
[Switch D-bgp] peer 9:2::1 as-number 65009
[Switch D-bgp] ipv6-family unicast
[Switch D-bgp-af-ipv6] peer 9:1::1 enable
[Switch D-bgp-af-ipv6] peer 9:2::1 enable
[Switch D-bgp-af-ipv6] network 9:2:: 64
[Switch D-bgp-af-ipv6] network 9:1:: 64
Step 4 Configure the EBGP connection.
# Configure Switch A.
[Switch A] bgp 65008
[Switch A-bgp] router-id 1.1.1.1
[Switch A-bgp] peer 10::1 as-number 65009
[Switch A-bgp] ipv6-family unicast
[Switch A-bgp-af-ipv6] peer 10::1 enable
[Switch A-bgp-af-ipv6] network 10:: 64
[Switch A-bgp-af-ipv6] network 8:: 64
# Configure Switch B.
[Switch B] bgp 65009
[Switch B-bgp] peer 10::2 as-number 65008
[Switch B-bgp] ipv6-family unicast
[Switch B-bgp-af-ipv6] peer 10::2 enable
[Switch B-bgp-af-ipv6] network 10:: 64
# View the status of the BGP4+ peers.
[Switch B] display bgp ipv6 peer
BGP local router ID : 2.2.2.2
Local AS number : 65009
Total number of peers : 3 Peers in established state : 3
Peer V AS MsgRcvd MsgSent OutQ Up/Down State PrefRcv
9:1::2 4 65009 8 9 0 00:05:37 Established 2
9:3::2 4 65009 2 2 0 00:00:09 Established 2
10::2 4 65008 9 7 0 00:05:38 Established 2
The preceding information shows that the BGP4+ connections between Switch B and other
Switches are set up.
# Display the routing table of Switch A.
[Switch A] display bgp ipv6 routing-table
Total Number of Routes: 6
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
673
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
9 BGP4+ Configuration
BGP Local router ID is 1.1.1.1
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
*> Network : 8:: PrefixLen : 64
NextHop : :: LocPrf :
MED : 0 PrefVal : 0
Label :
Path/Ogn : i
*> Network : 9:1:: PrefixLen : 64
NextHop : 10::1 LocPrf :
MED : 0 PrefVal : 0
Label :
Path/Ogn : 65009 i
*> Network : 9:2:: PrefixLen : 64
NextHop : 10::1 LocPrf :
MED : PrefVal : 0
Label :
Path/Ogn : 65009 i
*> Network : 9:3:: PrefixLen : 64
NextHop : 10::1 LocPrf :
MED : 0 PrefVal : 0
Label :
Path/Ogn : 65009 i
*> Network : 10:: PrefixLen : 64
NextHop : :: LocPrf :
MED : 0 PrefVal : 0
Label :
Path/Ogn : i
*> NextHop : 10::1 LocPrf :
MED : 0 PrefVal : 0
Label :
Path/Ogn : 65009 i
The routing table shows that Switch A has learned the route from AS 65009. AS 65008 and AS
65009 can exchange their routing information.
----End
Configuration Files
l Configuration file of Switch A
#
sysname Switch A
#
ipv6
#
vlan batch 10 20
# interface Vlanif10
ipv6 enable
ipv6 address 8::1/64
# interface Vlanif20
ipv6 enable
ipv6 address 10::2/64
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# interface GigabitEthernet2/0/0
Issue 01 (2011-10-26) 674
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
port hybrid pvid vlan 20
port hybrid untagged vlan 20
# bgp 65008
router-id 1.1.1.1
peer 10::1 as-number 65009
#
ipv4-family unicast
undo synchronization
#
ipv6-family unicast
undo synchronization
network 8:: 64
network 10:: 64
peer 10::1 enable
# return l Configuration file of Switch B
#
sysname Switch B
#
ipv6
#
vlan batch 10 20 30
# interface Vlanif20
ipv6 enable
ipv6 address 10::1/64
# interface Vlanif30
ipv6 enable
ipv6 address 9:3::1/64
# interface Vlanif40
ipv6 enable
ipv6 address 9:1::1/64
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 40
port hybrid untagged vlan 40
# interface GigabitEthernet2/0/0
port hybrid pvid vlan 20
port hybrid untagged vlan 20
# interface GigabitEthernet3/0/0
port hybrid pvid vlan 30
port hybrid untagged vlan 30
# bgp 65009
router-id 2.2.2.2
peer 9:1::2 as-number 65009
peer 9:3::2 as-number 65009
peer 10::2 as-number 65008
#
ipv4-family unicast
undo synchronization
#
ipv6-family unicast
undo synchronization
network 9:1:: 64
network 9:3:: 64
network 10:: 64
peer 9:1::2 enable
peer 9:3::2 enable
peer 10::2 enable
# return
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
9 BGP4+ Configuration
675
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Issue 01 (2011-10-26) l Configuration file of Switch C
#
sysname Switch C
#
ipv6
#
vlan batch 30 50
# interface Vlanif30
ipv6 enable
ipv6 address 9:3::2/64
# interface Vlanif50
ipv6 enable
ipv6 address 9:2::1/64
# interface GigabitEthernet2/0/0
port hybrid pvid vlan 50
port hybrid untagged vlan 50
# interface GigabitEthernet3/0/0
port hybrid pvid vlan 30
port hybrid untagged vlan 30
# bgp 65009
router-id 3.3.3.3
peer 9:2::2 as-number 65009
peer 9:3::1 as-number 65009
#
ipv4-family unicast
undo synchronization
#
ipv6-family unicast
undo synchronization
network 9:2:: 64
network 9:3:: 64
peer 9:2::2 enable
peer 9:3::1 enable
# return l Configuration file of Switch D
#
sysname Switch D
#
ipv6
#
vlan batch 40 50
# interface Vlanif40
ipv6 enable
ipv6 address 9:1::2/64
# interface Vlanif50
ipv6 enable
ipv6 address 9:2::2/64
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 40
port hybrid untagged vlan 40
# interface GigabitEthernet2/0/0
port hybrid pvid vlan 50
port hybrid untagged vlan 50
# bgp 65009
router-id 4.4.4.4
peer 9:1::1 as-number 65009
peer 9:2::1 as-number 65009
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
9 BGP4+ Configuration
676
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 9 BGP4+ Configuration
#
ipv4-family unicast
undo synchronization
#
ipv6-family unicast
undo synchronization
network 9:1:: 64
network 9:2:: 64
peer 9:1::1 enable
peer 9:2::1 enable
# return
9.16.2 Example for Configuring BGP4+ Route Reflectors
Networking Requirements
, Switch B receives an update packet from Switch A through EBGP and forwards the packet to Switch C. Switch C is configured as a route reflector and it has two clients, namely, Switch B and Switch D.
Switch B and Switch D do not need to set up an IBGP connection. After receiving a route update packet from Switch B, Switch C reflects the packet to Switch D. Similarly, after receiving a route update packet from Switch D, Switch C reflects the packet to Switch B.
Figure 9-2 Networking diagram for configuring the BGP4+ route reflectors
VLANIF10
1::1/64
GE1/0/0
AS 100
GE2/0/0
SwitchA
VLANIF20
100::1/96
AS 200
GE2/0/0
V
LA
10
N
1:
IF
30
:2
/9
6
G
E
1/
0/
VL
AN
IF
30
6
10
1:
:1
/9
G
E
2/
0/
0
0
GE
SwitchC
10
1/0
VL
2::1
/0
AN
/96
IF
40
GE
1/0
10
/0
VL
AN
IF
/96
40
VLANIF20
100::2/96
SwitchB
SwitchD
Device name
Switch A
Switch A
Switch B
Switch B
Switch C
Switch C
Switch D
Interface
GE1/0/0
GE2/0/0
GE2/0/0
GE1/0/0
GE2/0/0
GE1/0/0
GE1/0/0
VLANIF interface IP address
VLANIF 10
VLANIF 20
VLANIF 20
VLANIF 30
VLANIF 30
VLANIF 40
VLANIF 40
1::1/64
100::1/96
100::2/96
101::2/96
101::1/96
102::1/96
102::2/96
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
677
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
9 BGP4+ Configuration
Configuration Roadmap
The configuration roadmap is as follows:
1.
Establish IBGP connections between the clients and the route reflector.
2.
Configure Switch C as the route reflector.
Data Preparation
To complete the configuration, you need the following data: l The ASs are AS 100 and AS 200.
l
The router IDs of Switch A, Switch B, Switch C, and Switch D are 1.1.1.1, 2.2.2.2, 3.3.3.3, and 4.4.4.4.
Procedure
Step 1 Add interfaces to VLANs.
<Quidway> system-view
[Quidway] sysname SwitchA
[SwitchA] vlan batch 10 20
[SwitchA] interface gigabitethernet 1/0/0
[SwitchA-GigabitEthernet1/0/0] port hybrid pvid vlan 10
[SwitchA-GigabitEthernet1/0/0] port hybrid untagged vlan 10
[SwitchA-GigabitEthernet1/0/0] quit
[SwitchA] interface gigabitethernet 2/0/0
[SwitchA-GigabitEthernet2/0/0] port hybrid pvid vlan 20
[SwitchA-GigabitEthernet2/0/0] port hybrid untagged vlan 20
[SwitchA-GigabitEthernet2/0/0] quit
The configurations of Switch B, Switch C, Switch D are similar to the configuration of Switch
A and are not mentioned here.
Step 2 Enable the IPv6 forwarding capability, and assign an IPv6 address for each interface. The following is the configuration of Switch A. The configurations of other Switches are similar to the configuration of Switch A and are not mentioned here.
<Quidway> system-view
[Switch A] ipv6
[Switch A] interface vlanif 10
[Switch A-Vlanif10] ipv6 enable
[Switch A-Vlanif10] ipv6 address 1::1/64
[Switch A] interface vlanif 20
[Switch A-Vlanif20] ipv6 enable
[Switch A-Vlanif20] ipv6 address 100::1/96
Step 3 Configure the basic BGP4+ functions.
# Configure Switch A.
[Switch A] bgp 100
[Switch-A-bgp] router-id 1.1.1.1
[Switch A-bgp] peer 100::2 as-number 200
[Switch A-bgp] ipv6-family unicast
[Switch A-bgp-af-ipv6] peer 100::2 enable
[Switch A-bgp-af-ipv6] network 1:: 64
[Switch A-bgp-af-ipv6] quit
# Configure Switch B.
[Switch B] ipv6
[Switch B] bgp 200
[Switch B-bgp] router-id 2.2.2.2
Issue 01 (2011-10-26) 678
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
9 BGP4+ Configuration
[Switch B-bgp] peer 100::1 as-number 100
[Switch B-bgp] peer 101::1 as-number 200
[Switch B-bgp] ipv6-family unicast
[Switch B-bgp-af-ipv6] peer 100::1 enable
[Switch B-bgp-af-ipv6] peer 101::1 enable
# Configure Switch C.
[Switch C] bgp 200
[Switch C-bgp] router-id 3.3.3.3
[Switch C-bgp] peer 101::2 as-number 200
[Switch C-bgp] peer 102::2 as-number 200
[Switch C-bgp] ipv6-family unicast
[Switch C-bgp-af-ipv6] peer 101::2 enable
[Switch C-bgp-af-ipv6] peer 102::2 enable
# Configure Switch D.
[Switch D] bgp 200
[Switch D-bgp] router-id 4.4.4.4
[Switch D-bgp] peer 102::1 as-number 200
[Switch D-bgp] ipv6-family unicast
[Switch D-bgp-af-ipv6] peer 102::1 enable
Step 4 Configure the route reflector.
# Configure Switch C as the route reflector and Switch B and Switch D as the clients.
[Switch C-bgp] ipv6-family unicast
[Switch C-bgp-af-ipv6] peer 101::2 reflect-client
[Switch C-bgp-af-ipv6] peer 102::2 reflect-client
# View the routing table of Switch B.
[Switch B] display bgp ipv6 routing-table
Total Number of Routes: 6
BGP Local router ID is 2.2.2.2
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
*> Network : 1:: PrefixLen : 64
NextHop : 100::1 LocPrf :
MED : 0 PrefVal : 0
Label :
Path/Ogn : 100 i
*> Network : 100:: PrefixLen : 96
NextHop : :: LocPrf :
MED : 0 PrefVal : 0
Label :
Path/Ogn : i
*
NextHop : 100::1 LocPrf :
MED : 0 PrefVal : 0
Label :
Path/Ogn : 100 i
*> Network : 101:: PrefixLen : 96
NextHop : :: LocPrf :
MED : 0 PrefVal : 0
Label :
Path/Ogn : i
i
NextHop : 101::1 LocPrf : 100
MED : 0 PrefVal : 0
Label :
679
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
9 BGP4+ Configuration
Path/Ogn : i
*>i Network : 102:: PrefixLen : 96
NextHop : 101::1 LocPrf : 100
MED : 0 PrefVal : 0
Label :
Path/Ogn : i
# View the routing table of Switch D.
[Switch D] display bgp ipv6 routing-table
Total Number of Routes: 5
BGP Local router ID is 4.4.4.4
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
*>i Network : 1:: PrefixLen : 64
NextHop : 100::1 LocPrf : 100
MED : 0 PrefVal : 0
Label :
Path/Ogn : 100 i
*>i Network : 100:: PrefixLen : 96
NextHop : 101::2 LocPrf : 100
MED : 0 PrefVal : 0
Label :
Path/Ogn : i
*>i Network : 101:: PrefixLen : 96
NextHop : 102::1 LocPrf : 100
MED : 0 PrefVal : 0
Label :
Path/Ogn : i
*> Network : 102:: PrefixLen : 96
NextHop : :: LocPrf :
MED : 0 PrefVal : 0
Label :
Path/Ogn : i
i
NextHop : 102::1 LocPrf : 100
MED : 0 PrefVal : 0
Label :
Path/Ogn : i
The routing tables show that Switch D and Switch B have learned the routing information advertised by Switch A from Switch C.
----End
Configuration Files
l Configuration file of Switch A
#
sysname Switch A
#
ipv6
#
vlan batch 10 20
# interface Vlanif10
ipv6 enable
ipv6 address 1::1/64
#
680
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing interface Vlanif20
ipv6 enable
ipv6 address 100::1/96
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# interface GigabitEthernet2/0/0
port hybrid pvid vlan 20
port hybrid untagged vlan 20
# bgp 100
router-id 1.1.1.1
peer 100::2 as-number 200
#
ipv4-family unicast
undo synchronization
#
ipv6-family unicast
undo synchronization
network 1:: 64
network 100:: 96
peer 100::2 enable
# return l Configuration file of Switch B
#
sysname Switch B
#
ipv6
#
vlan batch 20 30
# interface Vlanif20
ipv6 enable
ipv6 address 100::2/96
# interface Vlanif30
ipv6 enable
ipv6 address 101::2/96
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 30
port hybrid untagged vlan 30
# interface GigabitEthernet2/0/0
port hybrid pvid vlan 20
port hybrid untagged vlan 20
# bgp 200
router-id 2.2.2.2
peer 100::1 as-number 100
peer 101::1 as-number 200
#
ipv4-family unicast
undo synchronization
#
ipv6-family unicast
undo synchronization
network 100:: 96
network 101:: 96
peer 100::1 enable
peer 101::1 enable
# return l Configuration file of Switch C
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
9 BGP4+ Configuration
681
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
#
sysname Switch C
#
ipv6
#
vlan batch 30 40
# interface Vlanif30
ipv6 enable
ipv6 address 101::1/96
# interface Vlanif40
ipv6 enable
ipv6 address 102::1/96
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 40
port hybrid untagged vlan 40
# interface GigabitEthernet2/0/0
port hybrid pvid vlan 30
port hybrid untagged vlan 30
# bgp 200
router-id 3.3.3.3
peer 101::2 as-number 200
peer 102::2 as-number 200
#
ipv4-family unicast
undo synchronization
#
ipv6-family unicast
undo synchronization
network 101:: 96
network 102:: 96
peer 101::2 enable
peer 101::2 reflect-client
peer 102::2 enable
peer 102::2 reflect-client
# return l Configuration file of Switch D
#
sysname Switch D
#
ipv6
#
vlan batch 40
# interface Vlanif40
ipv6 enable
ipv6 address 102::2/96
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 40
port hybrid untagged vlan 40
# bgp 200
router-id 4.4.4.4
peer 102::1 as-number 200
#
ipv4-family unicast
undo synchronization
#
ipv6-family unicast
undo synchronization
network 102:: 96
peer 102::1 enable
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
9 BGP4+ Configuration
682
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 9 BGP4+ Configuration
# return
9.16.3 Example for Configuring the BGP 6PE
Networking Requirements
, the link between CE1 and PE1 is an IPv6 link, the link between PE1
and PE2 is an IPv4 link, and the link between PE2 and CE2 is an IPv6 link. BGP4+ runs between
CE1 and PE1 and between PE2 and CE2. MPLS runs between PE1 and PE2. 6PE is configured to connect IPv6 networks.
Figure 9-3 Networking diagram for configuring the BGP 6PE
Loopback 0
2.2.2.2
AS 200
Loopback 0
3.3.3.3
PE1
GE1/0/0
VLANIF10
1::2/64
VLANIF10
1::1/64
GE1/0/0
Loopback 1
5::5/64
MPLS tunnel
GE2/0/0
GE2/0/0
VLANIF20
VLANIF20
10.0.0.1/30 10.0.0.2/30
CE1
CE2
AS 100
Loopback 0
1.1.1.1
PE2
GE1/0/0
VLANIF30
2::2/64
VLANIF30
2::1/64
GE1/0/0
Loopback 1
6::6/64
Loopback 0
4.4.4.4
AS 300
Issue 01 (2011-10-26)
Device name
CE1
CE1
CE1
PE1
PE1
PE1
Interface
Loopback0
Loopback1
GE1/0/0
Loopback0
GE1/0/0
GE2/0/0
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
-
-
VLANIF interface
-
VLANIF 10
VLANIF 10
VLANIF 20
IP address
1.1.1.1/32
5::5/64
1::1/64
2.2.2.2/32
1::2/64
10.0.0.1/30
683
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
PE2
PE2
PE2
CE2
CE2
CE2
GE2/0/0
Loopback0
GE1/0/0
Loopback0
Loopback1
GE1/0/0
-
VLANIF 20
-
VLANIF 30
-
VLANIF 30
9 BGP4+ Configuration
10.0.0.2/30
3.3.3.3/32
2::2/64
4.4.4.4/32
6::6/64
2::1/64
Configuration Roadmap
The configuration roadmap is as follows:
1.
Configure OSPF on the link between PE1 and PE2 to ensure that PE1 and PE2 can learn the loopback interface addresses from each other.
2.
Configure BGP4+ on the links between CE1 and PE1 and between PE2 and CE2.
3.
Configure MPLS on the link between PE1 and PE2 and set up an LSP.
4.
Configure 6PE on the link between PE1 and PE2.
Data Preparation
To complete the configuration, you need the following data: l Router IDs of CE1, PE1, PE2, and CE2: 1.1.1.1, 2.2.2.2, 3.3.3.3, and 4.4.4.4
l AS ID of each Switch
Procedure
Step 1 Add interfaces to VLANs.
<Quidway> system-view
[Quidway] sysname PE1
[PE1] vlan batch 10 20
[PE1] interface gigabitethernet 1/0/0
[PE1-GigabitEthernet1/0/0] port hybrid pvid vlan 10
[PE1-GigabitEthernet1/0/0] port hybrid untagged vlan 10
[PE1-GigabitEthernet1/0/0] quit
[PE1] interface gigabitethernet 2/0/0
[PE1-GigabitEthernet2/0/0] port hybrid pvid vlan 20
[PE1-GigabitEthernet2/0/0] port hybrid untagged vlan 20
[PE1-GigabitEthernet2/0/0] quit
The configurations of CE1, PE2, and CE2 are similar to the configuration of PE1 and are not mentioned here.
Step 2 Assign IPv4 or IPv6 addresses to interfaces. The following is the configuration of PE1. The configurations of other devices are similar to the configuration of PE1 and are not mentioned here.
<Quidway> system-view
[PE1] ipv6
[PE1] interface vlanif 10
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
684
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
9 BGP4+ Configuration
[PE1-Vlanif10] ipv6 enable
[PE1-Vlanif10] ipv6 address 1::2/64
[PE1-Vlanif10] quit
[PE1] interface vlanif 20
[PE1-Vlanif20] ip address 10.0.0.1 30
[PE1-Vlanif20] quit
[PE1] interface loopback 0
[PE1-LoopBack0] ip address 2.2.2.2 32
[PE1-LoopBack0] quit
Step 3 Configure OSPF on the link between PE1 and PE2 to ensure that PE1 and PE2 can learn the routes from each other. The configuration procedure is not mentioned here.
Step 4 Configure MPLS on the link between PE1 and PE2 and set up an LSP.
# Configure PE1.
[PE1] mpls lsr-id 2.2.2.2
[PE1] mpls
[PE1-mpls] lsp-trigger all
[PE1-mpls] quit
[PE1] mpls ldp
[PE1-mpls-ldp] quit
[PE1] interface vlanif 20
[PE1-Vlanif20] mpls
[PE1-Vlanif20] mpls ldp
[PE1-Vlanif20] quit
# Configure PE2.
[PE2] mpls lsr-id 3.3.3.3
[PE2] mpls
[PE2-mpls] lsp-trigger all
[PE2-mpls] quit
[PE2] mpls ldp
[PE2-mpls-ldp] quit
[PE2] interface vlanif 20
[PE2-Vlanif20] mpls
[PE2-Vlanif20] mpls ldp
[PE2-Vlanif20] quit
# View information about the LSP on PE1, and you can see that the LSP is set up.
[PE1] display mpls lsp
----------------------------------------------------------------------
LSP Information: LDP LSP
----------------------------------------------------------------------
FEC In/Out Label In/Out IF Vrf Name
2.2.2.2/32 3/NULL -/-
3.3.3.3/32 NULL/3 -/Vlanif20
----------------------------------------------------------------------
LSP Information: BGP IPV6 LSP
----------------------------------------------------------------------
FEC : 1::/64
In Label : 15360 Out Label : -----
In Interface : ----- OutInterface : -----
Vrf Name :
FEC : 5::/64
In Label : 15361 Out Label : -----
In Interface : ----- OutInterface : -----
Vrf Name :
Step 5 Configure BGP4+.
# Configure CE1.
[CE1] bgp 100
[CE1-bgp] peer 1::2 as-number 200
[CE1-bgp] ipv6-family unicast
Issue 01 (2011-10-26) 685
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 9 BGP4+ Configuration
[CE1-bgp-af-ipv6] peer 1::2 enable
[CE1-bgp-af-ipv6] network 5::5 64
[CE1-bgp-af-ipv6] quit
[CE1-bgp] quit
# Configure PE1.
[PE1] bgp 200
[PE1-bgp] peer 1::1 as-number 100
[PE1-bgp] ipv6-family unicast
[PE1-bgp-af-ipv6] peer 1::1 enable
[PE1-bgp-af-ipv6] quit
[PE1-bgp] quit
# Configure PE2.
[PE2] bgp 200
[PE2-bgp] peer 2::1 as-number 300
[PE2-bgp] ipv6-family unicast
[PE2-bgp-af-ipv6] peer 2::1 enable
[PE2-bgp-af-ipv6] quit
[PE2-bgp] quit
# Configure CE2.
[CE2] bgp 300
[CE2-bgp] peer 2::2 as-number 200
[CE2-bgp] ipv6-family unicast
[CE2-bgp-af-ipv6] peer 2::2 enable
[CE2-bgp-af-ipv6] network 6::6 64
[CE2-bgp-af-ipv6] quit
[CE2-bgp] quit
# Check information about the peers on PE1 and PE2, and you can see that the peer relationship between PE1 and PE2 is set up.
[PE1] display bgp ipv6 peer
BGP local router ID : 2.2.2.2
Local AS number : 200
Total number of peers : 1 Peers in established state : 1
Peer V AS MsgRcvd MsgSent OutQ Up/Down State PrefRcv
1::1 4 100 32 35 0 00:27:20 Established 1
[PE2] display bgp ipv6 peer
BGP local router ID : 3.3.3.3
Local AS number : 200
Total number of peers : 1 Peers in established state : 1
Peer V AS MsgRcvd MsgSent OutQ Up/Down State PrefRcv
2::1 4 300 31 37 0 00:28:08 Established 1
Step 6 Configure 6PE.
# Configure PE1.
[PE1] bgp 200
[PE1-bgp] peer 3.3.3.3 as-number 200
[PE1-bgp] peer 3.3.3.3 connect-interface LoopBack0
[PE1-bgp] ipv6-family unicast
[PE1-bgp-af-ipv6] peer 3.3.3.3 enable
[PE1-bgp-af-ipv6] peer 3.3.3.3 label-route-capability
[PE1-bgp-af-ipv6] import-route direct
[PE1-bgp-af-ipv6] quit
[PE1-bgp] quit
# Configure PE2.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
686
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
9 BGP4+ Configuration
[PE2] bgp 200
[PE2-bgp] peer 2.2.2.2 as-number 200
[PE2-bgp] peer 2.2.2.2 connect-interface LoopBack0
[PE2-bgp] ipv6-family unicast
[PE2-bgp-af-ipv6] peer 2.2.2.2 enable
[PE2-bgp-af-ipv6] peer 2.2.2.2 label-route-capability
[PE2-bgp-af-ipv6] import-route direct
[PE2-bgp-af-ipv6] quit
[PE2-bgp] quit
# View the status of the 6PE peers.
[PE1] display bgp ipv6 peer
BGP local router ID : 2.2.2.2
Local AS number : 200
Total number of peers : 2 Peers in established state : 2
Peer V AS MsgRcvd MsgSent OutQ Up/Down State PrefRcv
3.3.3.3 4 200 1248 1342 0 18:06:28 Established 1
1::1 4 100 32 35 0 00:27:20 Established 1
You can see that the BGP 6PE connection is set up between PE1 and PE2.
Step 7 Verify the configuration.
Take CE1 as an example. CE1 can learn the loopback1 address from CE2. CE1 and CE2 can ping each other.
[CE1] display ipv6 routing-table
Routing Table : Public
Destinations : 8 Routes : 8
Destination : ::1 PrefixLength : 128
NextHop : ::1 Preference : 0
Cost : InLoopBack0 Protocol : Direct
RelayNextHop : Active NoAdv Tunnel ID : 0
Interface : 0x0 Flags : NULL
Destination : 1:: PrefixLength : 64
NextHop : 1::1 Preference : 0
Cost : Vlanif10 Protocol : Direct
RelayNextHop : Active Adv Tunnel ID : 0
Interface : 0x0 Flags : NULL
Destination : 1::1 PrefixLength : 128
NextHop : ::1 Preference : 0
Cost : InLoopBack0 Protocol : Direct
RelayNextHop : Active NoAdv Tunnel ID : 0
Interface : 0x0 Flags : NULL
Destination : 2:: PrefixLength : 64
NextHop : 1::2 Preference : 255
Cost : Vlanif10 Protocol : BGP
RelayNextHop : Active Adv Tunnel ID : 0
Interface : 0x0 Flags : NULL
Destination : 5:: PrefixLength : 64
NextHop : 5::5 Preference : 0
Cost : LoopBack1 Protocol : Direct
RelayNextHop : Active Adv Tunnel ID : 0
Interface : 0x0 Flags : NULL
Destination : 5::5 PrefixLength : 128
NextHop : ::1 Preference : 0
Cost : InLoopBack0 Protocol : Direct
RelayNextHop : Active NoAdv Tunnel ID : 0
Interface : 0x0 Flags : NULL
Issue 01 (2011-10-26) 687
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
9 BGP4+ Configuration
Destination : 6:: PrefixLength : 64
NextHop : 1::2 Preference : 255
Cost : Vlanif10 Protocol : BGP
RelayNextHop : Active Adv Tunnel ID : 0
Interface : 0x0 Flags : NULL
Destination : FF80:: PrefixLength : 10
NextHop : :: Preference : 0
Cost : NULL0 Protocol : Direct
RelayNextHop : Active NoAdv Tunnel ID : 0
Interface : 0x0 Flags : NULL
Ping loopback1 address of CE2 on CE1.
[CE1] ping ipv6 -c 5 6::6
PING 6::6 : 56 data bytes, press CTRL_C to break
Reply from 6::6
bytes=56 Sequence=1 hop limit=64 time = 80 ms
Reply from 6::6
bytes=56 Sequence=2 hop limit=64 time = 80 ms
Reply from 6::6
bytes=56 Sequence=3 hop limit=64 time = 90 ms
Reply from 6::6
bytes=56 Sequence=4 hop limit=64 time = 90 ms
Reply from 6::6
bytes=56 Sequence=5 hop limit=64 time = 60 ms
--- 6::6 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 60/80/90 ms
The preceding information shows that 6PE connects separated IPv6 networks and implements interworking.
----End
Configuration Files
l Configuration file of CE1
#
sysname CE1
#
ipv6
#
vlan batch 10
# interface Vlanif10
ipv6 enable
ipv6 address 1::1/64
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# interface LoopBack0
ip address 1.1.1.1 255.255.255.255
# interface LoopBack1
ipv6 enable
ipv6 address 5::5/64
# bgp 100
peer 1::2 as-number 200
#
ipv4-family unicast
Issue 01 (2011-10-26) 688
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Issue 01 (2011-10-26)
undo synchronization
#
ipv6-family unicast
undo synchronization
network 5:: 64
peer 1::2 enable
# return l Configuration file of PE1
#
sysname PE1
#
ipv6
#
vlan batch 10 20
#
mpls lsr-id 2.2.2.2
mpls
lsp-trigger all
# mpls ldp
# interface Vlanif10
ipv6 enable
ipv6 address 1::2/64
# interface Vlanif20
ip address 10.0.0.1 255.255.255.252
mpls
mpls ldp
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# interface GigabitEthernet2/0/0
port hybrid pvid vlan 20
port hybrid untagged vlan 20
# interface LoopBack0
ip address 2.2.2.2 255.255.255.255
# bgp 200
peer 3.3.3.3 as-number 200
peer 3.3.3.3 connect-interface LoopBack0
peer 1::1 as-number 100
#
ipv4-family unicast
undo synchronization
peer 3.3.3.3 enable
#
ipv6-family unicast
undo synchronization
import-route direct
peer 3.3.3.3 enable
peer 3.3.3.3 label-route-capability
peer 1::1 enable
# ospf 1
area 0.0.0.0
network 2.2.2.2 0.0.0.0
network 10.0.0.0 0.0.0.3
# return l Configuration file of PE2
#
sysname PE2
#
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
9 BGP4+ Configuration
689
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Issue 01 (2011-10-26)
ipv6
#
vlan batch 20 30
#
mpls lsr-id 3.3.3.3
mpls
lsp-trigger all
# mpls ldp
# interface Vlanif20
ip address 10.0.0.2 255.255.255.252
mpls
mpls ldp
# interface Vlanif30
ipv6 enable
ipv6 address 2::2/64
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 30
port hybrid untagged vlan 30
# interface GigabitEthernet2/0/0
port hybrid pvid vlan 20
port hybrid untagged vlan 20
# interface LoopBack0
ip address 3.3.3.3 255.255.255.255
# bgp 200
peer 2.2.2.2 as-number 200
peer 2.2.2.2 connect-interface LoopBack0
peer 2::1 as-number 300
#
ipv4-family unicast
undo synchronization
peer 2.2.2.2 enable
#
ipv6-family unicast
undo synchronization
import-route direct
peer 2.2.2.2 enable
peer 2.2.2.2 label-route-capability
peer 2::1 enable
# ospf 1
area 0.0.0.0
network 3.3.3.3 0.0.0.0
network 10.0.0.0 0.0.0.3
# return l Configuration file of CE2
#
sysname CE2
#
ipv6
#
vlan batch 30
# interface Vlanif30
ipv6 enable
ipv6 address 2::1/64
# interface GigabitEthernet1/0/0
port hybrid pvid vlan 30
port hybrid untagged vlan 30
# interface LoopBack0
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
9 BGP4+ Configuration
690
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
ipv6 enable
ip address 4.4.4.4 255.255.255.255
# interface LoopBack1
ipv6 enable
ipv6 address 6::6/64
# bgp 300
peer 2::2 as-number 200
#
ipv4-family unicast
undo synchronization
#
ipv6-family unicast
undo synchronization
network 6:: 64
peer 2::2 enable
# return
9 BGP4+ Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
691
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 10 MBGP Configuration
10
MBGP Configuration
About This Chapter
MBGP is dedicated to transmitting multicast routing information across ASs.
MBGP is the multiprotocol extension of BGP.
10.2 MBGP Features Supported by the S9300
10.3 Configuring Basic MBGP Functions
Before constructing an MBGP network, you need configure basic functions of MBGP.
10.4 Configuring the Policy for Advertising MBGP Routes
10.5 Configuring the Policy for Exchanging Routes Between MBGP Peers
10.6 Configuring MBGP Route Attributes
MBGP has many route attributes. You can change MBGP route selection by setting these attributes.
10.7 Configuring MBGP Route Dampening
Configuring MBGP dampening can suppress the unstable MBGP routing information.
Maintaining MBGP involves resetting MBGP connections and clearing MBGP statistics.
692 Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 10 MBGP Configuration
10.1 MBGP Overview
MBGP is the multiprotocol extension of BGP.
When a multicast source and its receivers are distributed in different Autonomous Systems
(ASs), a forwarding tree needs to be set up across ASs. The Multiprotocol Border Gateway
Protocol (MP-BGP) specially transfers routes between ASs for multicast.
MP-BGP is the multiprotocol extension of the Border Gateway Protocol (BGP). At present,
BGP4 is applied only to unicast. MP-BGP, based on BGP4, supports multiple routing protocols, including multicast.
l
MP-BGP maintains routes for unicast and multicast at the same time, stores them in different routing tables, and keeps the routing information of unicast and multicast separate from each other.
l MP-BGP builds different network topologies for unicast and multicast at the same time.
l Most of unicast routing policies and configuration methods supported by BGP4 can be applied to multicast. MP-BGP maintains different routes for unicast and multicast according to routing policies.
When MP-BGP is applied to multicast, it is called Multicast BGP (MBGP).
NOTE
This chapter describes the configuration of MP-BGP applied to multicast, that is, MBGP configuration.
For the details of MP-BGP, refer to the chapter "BGP Configuration" in the Quidway S9300 Terabit Routing
Switch Configuration Guide - IP Routing.
10.2 MBGP Features Supported by the S9300
You can configure such features as load splitting, route aggregation, route dampening, community attributes, and route reflectors when configuring MBGP.
For details, refer to the chapter "BGP Configuration" in the Quidway S9300 Terabit Routing
Switch Configuration Guide - IP Routing.
10.3 Configuring Basic MBGP Functions
Before constructing an MBGP network, you need configure basic functions of MBGP.
10.3.1 Establishing the Configuration Task
Before configuring basic MBGP functions, familiarize yourself with the applicable environment, pre-configuration tasks, and required data. This can help you complete the configuration task quickly and accurately.
Applicable Environment
Perform the Reverse Path Forwarding (RPF) check on multicast packets according to the following factors: l Static multicast route
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
693
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 10 MBGP Configuration l Unicast route l MBGP route
Setting up MBGP connections in the multicast address family view can provide routing information for RPF check.
Pre-configuration Tasks
Before configuring basic MBGP functions, you need to configure basic Multicast functions.
Data Preparation
To configure basic MBGP functions, you need the following data.
2
3
No.
Data
1 Local AS number and router ID
4
IPv4 addresses and AS numbers of peers
Interface originating the Update message
Cluster ID of the route reflector
10.3.2 Configuring a BGP Peer
Devices can exchange routing information only after they have successfully set up a BGP peer relationship.
Context
NOTE
If the two switchs that plan to set up the MBGP peer relationship have set up a BGP connection, skip the section.
Do as follows on the two switchs between which the MBGP peer relationship needs to be set up.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
bgp as-number
BGP is enabled, the local AS number is set, and the BGP view is displayed.
Step 3 (Optional) Run:
router-id ipv4-address
The ID of a BGP switch is set.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
694
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 10 MBGP Configuration
Step 4 Run:
peer ip-address as-number as-number
The IP address and AS number of a remote peer are specified.
Step 5 (Optional) Run:
peer { ipv4-address | group-name } connect-interface interface-type interface-
number [ ipv4-source-address ]
The local interface and the source address used to set up a BGP connection are specified.
If the BGP connection is set up through a Loopback interface or a sub-interface, the command is required.
----End
10.3.3 Configuring an MBGP Peer
Setting up MBGP connections in the multicast address family view can provide routing information for RPF check.
Context
Do as follows on the switch configured with a BGP peer:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
bgp as-number
The BGP view is displayed.
Step 3 Run:
ipv4-family multicast
The BGP-IPv4 multicast address family view is displayed.
Step 4 Run:
peer { peer-address | group-name } enable
MBGP is enabled on the original BGP peer or peer group. The original BGP peer becomes an
MBGP peer.
The parameters of the command are explained as follows: l group-name: specifies the original BGP peer group.
l peer-address: specifies the IP address of the original remote BGP peer.
----End
10.3.4 Configuring an MBGP Route Reflector
By configuring MBGP route reflectors, you can solve the problem about the full-connection among IBGP peers.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
695
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Context
10 MBGP Configuration
CAUTION
A Route reflector is valid only for IBGP peers. Before performing the configuration, you must establish the IBGP peer relationships between MBGP route reflector and clients.
The configuration is optional. By default, the route reflector is not configured.
Do as follows on the switch that is to become an MBGP route reflector:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
bgp as-number
The BGP view is displayed.
Step 3 Run:
ipv4-family multicast
The BGP-IPv4 multicast address family view is displayed.
Step 4 Run:
peer { group-name | peer-address } reflect-client
The local host is configured as a route reflector, and the peer (group) is specified as a client of the route reflector.
The parameters of the command are explained as follows: l group-name: specifies the name of an MBGP peer group.
l peer-address: specifies the IP address of a remote MBGP peer.
Step 5 (Optional) Run:
reflector cluster-id { decimal-value | ipv4-address }
The cluster ID of the route reflector is configured.
By default, the route reflector uses its switch ID as the cluster ID.
l decimal-value: specifies the value of a cluster ID in the form of an integer.
l ipv4-address: specifies the value of a cluster ID in the form of an IPv4 address.
----End
10.3.5 Configuring MBGP to Import Local Routes
MBGP can import routes from other protocols. When a dynamic routing protocol is imported, the process ID need be specified.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
696
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 10 MBGP Configuration
Context
NOTE
MBGP routes are originated from the following: l Routes statically imported by using the network command.
l Routes imported by using the import-route command.
Users can import at least one type of local routes as required.
Do as follows on the switch configured with an MBGP peer:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
bgp as-number
The BGP view is displayed.
Step 3 Run:
ipv4-family multicast
The BGP-IPv4 multicast address family view is displayed.
Step 4 Run:
network ip-address [ mask-length | mask ] [ route-policy route-policy-name ]
The routes of the local network segment are advertised.
The parameters of the command are explained as follows: l ip-address [ mask-length | mask ]: specifies the routes to be advertised.
l route-policy route-policy-name: specifies the name of the routing policy that controls the routes to be advertised.
The network command is used to advertise the exactly-matched routes. To be specific, the command can be used to advertise the routes only with the exactly-matched address prefix and mask. If the mask is not designated, the routes are exactly matched based on the natural network segment.
Step 5 Run:
import-route protocol [ process-id ] [ med med-value | route-policy route-policy-
name ]
*
The routes of other protocols are imported to MBGP.
The parameters of the command are explained as follows: l protocol [ process-id ]: specifies the routing protocol and the process ID of the routing protocol from which routes are imported. The routing protocol contains direct, static, rip,
isis and ospf. When the routing protocol is isis, ospf or rip, the process ID must be specified.
l med med-value: specifies the MED value assigned to an imported route.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
697
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 10 MBGP Configuration l route-policy route-policy-name: specifies the route filtering policy. Only the route that passes the filtering of the policy is imported.
Step 6 (Optional) Run:
default-route imported
Default routes are imported to the MBGP routing table.
By default, no default route is imported to the MBGP routing table.
The default-route imported command needs to work with the import-route command to import default routes. The default routes cannot be imported by using only the import-route command. The default-route imported command is used to import the default routes that exist in the local routing table.
----End
10.3.6 Checking the Configuration
After basic functions of MBGP are configured, you can check information about MBGP peers.
Prerequisite
The configurations of basic MBGP functions are complete.
Procedure
l Run the display bgp multicast peer [ [ peer-address ] verbose ] command to check information about an MBGP peer. If peer-address is not specified, the information about all MBGP peers is displayed.
l Run the display bgp multicast group [ group-name ] command to check information about an MBGP peer group.
l Run the display bgp multicast network command to check the routing information to be advertised by MBGP through network command.
l
Run the display bgp multicast routing-table [ ip-address [ mask-length [ longer-
prefixes ] | mask [ longer-prefixes ] ] ] command to check the MBGP routing table.
----End
10.4 Configuring the Policy for Advertising MBGP Routes
You can configure a route advertisement policy to determine which routing information need be advertised to peers.
10.4.1 Establishing the Configuration Task
Before configuring a policy for advertising MBGP routes, familiarize yourself with the applicable environment, pre-configuration tasks, and required data. This can help you complete the configuration task quickly and accurately.
Applicable Environment
A switch configured with the MBGP peer advertises the local routing information to a remote peer. Based on the actual networking, users can adopt the following policies as required:
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
698
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 10 MBGP Configuration l Whether MBGP changes the next hop when advertising a route to IBGP peers l
Whether MBGP advertises all local routes or only the locally aggregated routes l Whether MBGP advertises default routes l Whether MBGP advertises community attributes or extended community attributes l Whether a BGP Update message sent by an MBGP peer carries the private AS number
Pre-configuration Tasks
Before configuring the policy for advertising MBGP routes, complete the task of
.
Data Preparation
To configure the policy for advertising MBGP routes, you need the following data.
2
3
4
No.
Data
1 AS number
Address of a remote peer or the name of a peer group
Name of the routing policy
Addresses and masks of the local routes that need to be aggregated
10.4.2 (Optional) Configuring the Next Hop of a Route as the Local
Address
Configuring the next-hop of a route as the local address is applicable to IBGP peers.
Context
Do as follows on the switch configured with an MBGP peer.
NOTE
The configuration is optional, and is valid only for IBGP and peer or peer group.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
bgp as-number
The BGP view is displayed.
Step 3 Run:
ipv4-family multicast
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
699
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
10 MBGP Configuration
The BGP-IPv4 multicast address family view is displayed.
Step 4 Run:
peer { group-name | peer-address } next-hop-local
The local address is configured as the next hop of routes, when MBGP advertises routes to an
MBGP peer or peer group.
The parameters of the command are explained as follows: l group-name: specifies an MBGP peer group.
l peer-address: specifies the IP address of a remote MBGP peer.
----End
10.4.3 (Optional) Configuring the Aggregation of Local MBGP
Routes
Route aggregation reduces the number of routes in the routing table on the MBGP peer.
Context
Do as follows on the switch configured with an MBGP peer:
NOTE
The configuration is optional. By default, MBGP does not aggregate local routes.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
bgp as-number
The BGP view is displayed.
Step 3 Run:
ipv4-family multicast
The BGP-IPv4 multicast address family view is displayed.
Step 4 MBGP supports the following two ways of local route aggregation: l Automatic aggregation: aggregates routes in the local MBGP routing table. Manual aggregation takes precedence over automatic aggregation.
Run:
summary automatic
The automatic aggregation of the subnet routes is configured.
l Manual aggregation: aggregates the routes imported by MBGP locally.
Run:
aggregate ip-address { mask | mask-length } [ as-set | attribute-policy route-
policy-name1 | detail-suppressed | origin-policy route-policy-name2 | suppress-
policy route-policy-name3 ]
*
Issue 01 (2011-10-26) 700
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 10 MBGP Configuration
The local route aggregation is configured.
MBGP advertises the aggregated route.
----End
10.4.4 (Optional) Configuring the Local Peer to Advertise Default
Routes
MBGP sends a default route with the next hop address being the local address to the specified peer regardless of whether there is a default route in the local routing table.
Context
Do as follows on the switch configured with an MBGP peer:
NOTE
The configuration is optional. By default, no default route is advertised.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
bgp as-number
The BGP view is displayed.
Step 3 Run:
ipv4-family multicast
The BGP-IPv4 multicast address family view is displayed.
Step 4 Run:
peer { group-name | peer-address } default-route-advertise [ route-policy route-
policy-name ]
A default route is advertised to a remote MBGP peer or peer group.
The parameters of the command are explained as follows: l group-name: specifies an MBGP peer group.
l peer-address: specifies the IP address of a remote MBGP peer.
l route-policy route-policy-name: specifies the routing policy that controls all advertised routes.
----End
10.4.5 Configuring the Local Peer to Advertise Community
Attribute and Extended Community Attribute
Community attributes and extended community attributes can simplify the management of routing policies.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
701
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Context
Do as follows on the switch configured with an MBGP peer:
10 MBGP Configuration
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
bgp as-number
The BGP view is displayed.
Step 3 Run:
ipv4-family multicast
The BGP-IPv4 multicast address family view is displayed.
Step 4 (Optional) Run:
peer { group-name | peer-address } advertise-community
The local peer is configured to advertise the community attribute to an MBGP peer group or a remote MBGP peer.
By default, the local peer does not advertise the community attribute.
The parameters of this command are explained as follows: l group-name: specifies the name of an MBGP peer group.
l peer-address: specifies the IP address for a remote MBGP peer.
l advertise-community: advertises the community attribute.
Step 5 (Optional) Run:
peer { group-name | peer-address } advertise-ext-community
The local peer is configured to advertise the extended community attribute to an MBGP peer group or a remote MBGP peer.
By default, the local peer does not advertise the extended community attribute.
The parameters of this command are explained as follows: l group-name: specifies the name of an MBGP peer group.
l peer-address: specifies the IP address for a remote MBGP peer.
l advertise-ext-community: advertises the extended community attribute.
----End
10.4.6 Configuring Update Packets not to Carry Private AS Number
You can configure an MBGP peer to send an Update message without private AS number when advertising routing information.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
702
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 10 MBGP Configuration
Context
Do as follows on the switch configured with an MBGP peer:
NOTE
The configuration is applicable only to an EBGP peer. By default, an update message can carries private
AS number.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
bgp as-number
The BGP view is displayed.
Step 3 Run:
ipv4-family multicast
The BGP-IPv4 multicast address family view is displayed.
Step 4 Run:
peer { group-name | peer-address } public-as-only
A MBGP update message sent to an MBGP peer group or a remote MBGP peer is configured not to carry private AS number. The public AS number can be directly used on the Internet. The private AS number cannot be advertised to the Internet, and is used only in domains.
The parameters of the command are explained as follows: l group-name: specifies an MBGP peer group.
l peer-address: specifies the IP address of a remote MBGP peer.
----End
10.4.7 Checking the Configuration
After the policy for advertising MBGP routes is configured, you can check information about
MBGP routing information.
Prerequisite
The configurations of the policy for advertising MBGP routes are complete.
Procedure
l Run the display bgp multicast routing-table community [ aa:nn | community-number ]
& <1-29> [ internet | no-advertise | no-export | no-export-subconfed ]
*
[ whole-
match ] command to check the routing information of a specified MBGP community.
l Run the display bgp multicast routing-table community-filter { { community-filter-
name | basic-community-filter-number } [ whole-match ] | advanced-community-filter-
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
703
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 10 MBGP Configuration
number } command to check the routes that match a specified MBGP community attribute filter.
l Run the display bgp multicast network command to check the routing information to be advertised by MBGP through network command.
l Run the display bgp multicast routing-table [ ip-address [ mask-length [ longer-
prefixes ] | mask [ longer-prefixes ] ] ] command to check the MBGP routing table.
l Run the display bgp multicast routing-table cidr command to check CIDR routes.
l Run the display bgp multicast routing-table statistics command to check the statistics of the MBGP routing table.
----End
10.5 Configuring the Policy for Exchanging Routes Between
MBGP Peers
By configuring a proper route exchange policy, you can control the routing information exchanged between MBGP peers.
10.5.1 Establishing the Configuration Task
Before configuring a policy for exchanging routes between MBGP peers, familiarize yourself with the applicable environment, pre-configuration tasks, and required data. This can help you complete the configuration task quickly and accurately.
Applicable Environment
Based on the actual network, users can configure the related route exchange polices to control the routing information transmitted between MBGP peers.
For a switch configured with MBGP, the routes exchanged between peers are classified into the following types: l import: filters the routes sent by a specified peer. Only the routes that pass the filtering are received.
l export: filters the routes sent to a specified peer or peer group. Only the routes that pass the filtering are sent.
Pre-configuration Task
Before configuring the route filtering policy between MBGP peers, complete the following task: l
Configuring Basic MBGP Functions
Data Preparation
To configure the route filtering policy between MBGP peers, you need the following data.
No.
Data
1 Number of the AS where the peer resides
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
704
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 10 MBGP Configuration
5
6
7
3
4
No.
Data
2 Address of a peer or name of a peer group
Name of the routing policy, sequence number of the node, and matching rule
ID of the ACL
AS-Path filter
IP-Prefix
The threshold of the route-limit
10.5.2 Configuring the Route Filtering Policy Globally
By configuring an MBGP routing policy, you can control route exchange with any remote MBGP peer.
Context
Do as follows on the switch configured with an MBGP peer:
NOTE
The configuration is optional and is applicable to the route exchange with any peer.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
bgp as-number
The BGP view is displayed.
Step 3 Run:
ipv4-family multicast
The BGP-IPv4 multicast address family view is displayed.
Step 4 Run:
filter-policy { basic-acl-number | acl-name acl-name | ip-prefix ip-prefix-name }
import
MBGP routing policy is configured to filter the received routes.
The parameters of the command are explained as follows: l basic-acl-number and acl-name acl-name: specifies the address filtering table.
l ip-prefix-name: specifies the address prefix list.
l import: filters the routes sent by any MBGP peer. Only the routes that pass the filtering are received.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
705
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 10 MBGP Configuration
Step 5 Run:
filter-policy { basic-acl-number | acl-name acl-name | ip-prefix ip-prefix-name }
export [ protocol [ process-id ] ]
MBGP routing policy is configured to filter advertised routes.
The parameters of the command are explained as follows: l basic-acl-number and acl-name acl-name: specifies the address filtering table.
l ip-prefix-name: specifies the address prefix list.
l export [ protocol [ process-id ] ]: filters the routes sent to any MBGP peer. In fact, the filtering is performed when the local routes are imported to the MBGP routing table. This command is used to import the local routes that pass the filtering to the MBGP routing table, and then advertise the routing information in the MBGP routing table.
NOTE
process-id specifies the number of the unicast routing protocol. When the unicast routing protocol is IS-
IS, OSPR or RIP, you need to set process-id.
----End
10.5.3 Configuring the Route Filtering Policy Based on Route-policy
By configuring an MBGP route-policy, you can flexibly filter routes.
Context
Do as follows on the switch configured with an MBGP peer:
NOTE
The configuration is optional. By default, the route filtering policy based on route-policy is not configured.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
bgp as-number
The BGP view is displayed.
Step 3 Run:
ipv4-family multicast
The BGP-IPv4 multicast address family view is displayed.
Step 4 Run:
peer { group-name | peer-address } route-policy route-policy-name { import |
export }
The MBGP routing policy based on route-policy is configured to control the route exchange with a specified remote MBGP peer.
The parameters of the command are explained as follows:
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
706
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 10 MBGP Configuration l group-name specifies an MBGP peer group.
l peer-address: specifies the IP address of the remote MBGP peer.
l route-policy-name: specifies the routing policy.
l import: filters the routes sent by a specified remote MBGP peer or peer group. Only the routes that pass the filtering are received.
l export: filters the routes sent to a specified remote MBGP peer or peer group. Only the routes that pass the filtering are sent.
----End
10.5.4 Configuring the Route Filtering Policy Based on ACL
By defining an ACL, you can specify the IP address and subnet range to match the destination network segment address or the next hop address of a route.
Context
Do as follows on the switch configured with an MBGP peer:
NOTE
The configuration is optional. By default, the route filtering policy based on the ACL is not configured.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
bgp as-number
The BGP view is displayed.
Step 3 Run:
ipv4-family multicast
The BGP-IPv4 multicast address family view is displayed.
Step 4 Run:
peer { group-name | peer-address } filter-policy { basic-acl-number | acl-name acl-
name } { import | export }
The MBGP routing policy based on the ACL is configured to control the route exchange with a specified remote MBGP peer.
The parameters of the command are explained as follows: l group-name specifies an MBGP peer group.
l peer-address: specifies the IP address of a remote MBGP peer.
l basic-acl-number and acl-name acl-name: specifies the ACL.
l import: filters the routes sent by a specified remote MBGP peer or peer group. Only the routes that pass the filtering are received.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
707
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 10 MBGP Configuration l export: filters the routes sent to a specified remote MBGP peer or peer group. Only the routes that pass the filtering are sent.
----End
10.5.5 Configuring the Route Filtering Policy Based on AS-Path List
An AS_Path filter specifies rules for filtering routes regarding AS_Path attributes.
Context
Do as follows on the switch configured with an MBGP peer:
NOTE
The configuration is optional. By default, the route filtering policy based on the AS-Path list is not configured.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
bgp as-number
The BGP view is displayed.
Step 3 Run:
ipv4-family multicast
The BGP-IPv4 multicast address family view is displayed.
Step 4 Run:
peer { group-name | peer-address } as-path-filter filter-number { import | export }
The MBGP routing policy based on the AS-Path list is configured to control the route exchange with a specified remote MBGP route.
The parameters of the command are explained as follows: l group-name specifies an MBGP peer group.
l peer-address: specifies the IP address of a remote MBGP peer.
l filter-number: specifies the AS-Path list.
l import: filters the routes sent by a specified remote MBGP peer or peer group. Only the routes that pass the filtering are received.
l export: filters the routes sent to a specified remote MBGP peer or peer group. Only the routes that pass the filtering are sent.
----End
10.5.6 Configuring the Route Filtering Policy Based on IP Prefix
By configuring an IP prefix list, you can filter MBGP routes based on route prefixes.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
708
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
10 MBGP Configuration
Context
Do as follows on the switch configured with an MBGP peer:
NOTE
The configuration is optional. By default, the route filtering policy based on the IP prefix list is not configured.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
bgp as-number
The BGP view is displayed.
Step 3 Run:
ipv4-family multicast
The BGP-IPv4 multicast address family view is displayed.
Step 4 Run:
peer { group-name | peer-address } ip-prefix ip-prefix-name { import | export }
The MBGP routing policy based on the IP prefix list is configured to control the route exchange with a specified remote MBGP peer.
The parameters of the command are explained as follows: l group-name: specifies an MBGP peer group.
l peer-address: specifies the IP address of a remote MBGP peer.
l ip-prefix-name: specifies the IP prefix list.
l import: filters the routes sent by a specified remote MBGP peer or peer group. Only the routes that pass the filtering are received.
l export: filters the routes sent to a specified remote MBGP peer or peer group. Only the routes that pass the filtering are sent.
----End
10.5.7 Configuring the Maximum Number of Routes Received from
Peers
You can set the maximum number of routes that can be received from the peer as required and specify the action of the peer when the number of routes exceeds the threshold.
Context
Do as follows on the switch configured with an MBGP peer:
NOTE
The configuration is optional. By default, the maximum number of routes received from peers is not configured.
Issue 01 (2011-10-26) 709
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 10 MBGP Configuration
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
bgp as-number
The BGP view is displayed.
Step 3 Run:
ipv4-family multicast
The BGP-IPv4 multicast address family view is displayed.
Step 4 Run:
peer { group-name | peer-address } route-limit maximum-limit [ percentage ] [ alert-
only | idle-forever | idle-timeout value ]
The number of routes received from an MBGP peer or peer group is limited.
The command can be used to control the peer to receive routes. You can configure specific parameters as required to control BGP after the number of the routes received from a peer exceeds the threshold.
l alert-only: indicates that only an alarm is generated when the number of routes exceeds the limit.
l idle-forever: indicates that when the number of routes exceeds the limit, the connection is not automatically set up until the reset bgp multicast command is used.
l idle-timeout value: indicates the timeout timer for reestablishing the connection automatically after the number of routes exceeds the limit. value specifies the value of the timer.
l If the three parameters are not set, the peer relationship is disconnected. The switch retries setting up a connection after 30 seconds. An alarm is generated and recorded in the log.
----End
10.5.8 Checking the Configuration
After the policy for exchanging routes between MBGP routes is configured, you can check information about MBGP routing information.
Prerequisite
The configurations of the policy for exchanging routes between MBGP peers are complete.
Procedure
l Run the display bgp multicast routing-table different-origin-as command to check the routes different from the original AS.
l Run the display bgp multicast routing-table regular-expression [ as-regular-
expression ] command to check the routing information that matches the AS regular expression.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
710
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 10 MBGP Configuration l Run the display bgp multicast paths [ as-regular-expression ] command to check the information about the AS paths.
l Run the display bgp multicast routing-table as-path-filter as-path-filter-number command to check the routing information that matches the filtering list.
l Run the display bgp multicast routing-table community-filter { { community-filter-
name | basic-community-filter-number } [ whole-match ] | advanced-community-filter-
number } command to check the routes that match the MBGP community list.
l Run the display bgp multicast routing-table peer peer-address { advertised-routes |
received-routes } [ statistics ] command to check the routing information receive form or sent to a specified MBGP peer.
l Run the display bgp multicast network command to check the routing information advertised by MBGP.
----End
10.6 Configuring MBGP Route Attributes
MBGP has many route attributes. You can change MBGP route selection by setting these attributes.
10.6.1 Establishing the Configuration Task
Before configuring MBGP Route Attributes, familiarize yourself with the applicable environment, pre-configuration tasks, and required data. This can help you complete the configuration task quickly and accurately.
Applicable Environment
MBGP has many route attributes. You can change the optimal route selection by using the following attributes.
l Preferred values of MBGP routes l Preferences of MBGP routes l Local_Pref l MED of MBGP routes
Pre-configuration Tasks
Before configuring the policy for MBGP route selection, complete the task of
.
Data Preparation
To configure the policy for MBGP route selection, you need the following data.
No.
Data
1 AS number
2 Protocol preference of MBGP
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
711
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 10 MBGP Configuration
4
5
No.
Data
3 Preferred value
Local_Pref
MED of MBGP routes
10.6.2 Setting Preferred Values of Routes Learned from Peers
You can set a preferred value for each route and thus when the MBGP routing table contains multiple routes to the same destination, the route with the greatest preferred value is selected.
Context
Do as follows on the switch configured with an MBGP peer:
NOTE
The configuration is optional. By default, the preferred value is 0.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
bgp as-number
The BGP view is displayed.
Step 3 Run:
ipv4-family multicast
The BGP-IPv4 multicast address family view is displayed.
Step 4 Run:
peer { group-name |peer-address } preferred-value preference-value
The preferred value is set for a route learnt from an MBGP peer group or a remote MBGP peer.
The route with the greatest preferred value is selected as the route to a specified network.
The parameters of the command are explained as follows: l group-name: specifies the name of an MBGP peer group.
l peer-address: specifies the IP address of a remote MBGP peer.
----End
10.6.3 Configuring the Preference of an MBGP Route
By configuring the preference of the MBGP protocol, you can control route selection of MBGP and other types protocols.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
712
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 10 MBGP Configuration
Context
Do as follows on the switch configured with an MBGP peer:
NOTE
The configuration is optional. By default, the default preferences of EBGP routes, IBGP routes, and local routes are 255.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
bgp as-number
The BGP view is displayed.
Step 3 Run:
ipv4-family multicast
The BGP-IPv4 multicast address family view is displayed.
Step 4 Run:
preference { external-preference internal-preference local-preference | route-
policy route-policy-name }
The preferences of internal, external and local routes are set. The smaller the preference value, the higher the preference.
The parameters of the command are explained as follows: l external-preference: specifies the preference of the route learned from an EBGP peer.
l internal-preference: specifies the preference of the route learned from an IBGP peer.
l local-preference: specifies the preference of the local originated route.
l route-policy route-policy-name: specifies the routing policy. The configuration is applicable to the specific routes that meet certain matching conditions.
----End
10.6.4 Configuring the Local-Pref of an MBGP Route
The Local_Pref attribute is used to determine the optimal route to the destination when the packet leaves the current AS. When an MBGP device obtains multiple routes to the same destination address but with different next hops through IBGP peers, it selects the route with the largest
Local_Pref value.
Context
Do as follows on the switch configured with an MBGP peer:
NOTE
The configuration is optional. By default, the Local_Pref value of the MBGP route is 100.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
713
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 10 MBGP Configuration
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
bgp as-number
The BGP view is displayed.
Step 3 Run:
ipv4-family multicast
The BGP-IPv4 multicast address family view is displayed.
Step 4 Run:
default local-preference preference-value
Local-Pref of the local host is configured.
When an MBGP switch obtains multiple routes with the same destination but different next hops from different IBGP peers, the route with the greatest Local_Pref value is preferred.
----End
10.6.5 Configuring the MED Attribute of an MBGP Route
The MED attribute is similar to the IGP metric. It is used by the EBGP peer to determine the route for the traffic entering the AS. The route with the smallest MED value is selected.
Context
Do as follows on the switch configured with an MBGP peer:
NOTE
The configuration is optional. When an MBGP switch obtains multiple routes with the same destination but different next hops from different EBGP peers, the route with the smallest MED value is preferred if other conditions of these routes are the same.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
bgp as-number
The BGP view is displayed.
Step 3 Run:
ipv4-family multicast
The BGP-IPv4 multicast address family view is displayed.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
714
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 10 MBGP Configuration
Step 4 Run the following command as required: l Run:
default med med-value
The default MED value of the local host is configured.
l Run:
compare-different-as-med
MED values of routes from different ASs are compared.
By default, the MBGP switch compares only the MED values of the routes from the same
AS.
l Run:
deterministic-med
Deterministic-MED is enabled.
If this command is not configured, when an optimal route is to be selected from among routes which are received from different ASs and which carry the same prefix, the sequence in which routes are received is relevant to the result of route selection. After the command is configured, however, when an optimal route is to be selected from among routes which are received from different ASs and which carry the same prefix, routes are first grouped according to the leftmost AS in the AS_Path. Routes with the same leftmost AS are grouped together, and after comparison, an optimal route is selected for the group. The group optimal route is then compared with optimal routes from other groups to determine the final optimal route. This mode of route selection ensures that the sequence in which routes are received is no longer relevant to the result of route selection.
l Run:
bestroute med-none-as-maximum
When the MED value of a route is lost, the route is configured with the maximum MED value.
By default, the MED value of the route is 0.
l Run:
bestroute med-confederation
MED values of routes in the same confederation are compared.
By default, the MBGP switch compares the MED values of routes in the same AS.
----End
10.6.6 Configuring Next_Hop
The next-hop attribute is used to flexibly control MGBP route selection.
Context
Do as follows on the switch configured with the MBGP peer:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
715
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 10 MBGP Configuration
Step 2 Run:
bgp as-number
The BGP view is displayed.
Step 3 Run:
ipv4-family multicast
The BGP-IPv4 multicast address family view is displayed.
Step 4 Run:
nexthop recursive-lookup route-policy route-policy-name
The next-hop iteration based on the specified routing policy is enabled.
By default, the next-hop iteration based on the specified routing policy is disabled.
The next-hop iteration based on the specified routing policy can control the iterated route according to certain conditions. The route that fails to pass the policy is ignored.
----End
10.6.7 Checking the Configuration
After MBGP route attributes are configured, you can check information about each attribute of the route.
Prerequisite
The configurations of the policy for MBGP route selection are complete.
Procedure
l Run the display bgp multicast routing-table command to check the routes of the MBGP routing table.
l Run the display bgp multicast routing-table statistics command to check the statistics of the MBGP routing table.
----End
10.7 Configuring MBGP Route Dampening
Configuring MBGP dampening can suppress the unstable MBGP routing information.
10.7.1 Establishing the Configuration Task
Before configuring MBGP route dampening, familiarize yourself with the applicable environment, pre-configuration tasks, and required data. This can help you complete the configuration task quickly and accurately.
Applicable Environment
Configuring MBGP dampening can suppress the unstable routing information. After MBGP dampening is configured, the unstable routing information is not added to the MBGP routing table, or advertised to other MBGP peers.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
716
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 10 MBGP Configuration
Pre-configuration Tasks
Before configuring MBGP route dampening, complete the following task: l
Configuring Basic MBGP Functions
Data Preparation
To configure MBGP route dampening, you need the following data.
No.
Data
1 Dampening parameters, including the half-life and threshold
10.7.2 Setting Dampening Parameters of an MBGP Route
MBGP route dampening increases network stability. You can flexibly configure routing policies for router dampening.
Context
Do as follows on the switch configured with an MBGP peer:
NOTE
The configuration is valid only for EBGP routes. By default, the default values of dampening parameters are used.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
bgp as-number
The BGP view is displayed.
Step 3 Run:
ipv4-family multicast
The BGP-IPv4 multicast address family view is displayed.
Step 4 Run:
dampening [ half-life-reach reuse suppress ceiling | route-policy route-policy-
name ]
*
The dampening parameters of an MBGP route are configured.
The parameters of the command are explained as follows: l half-life-reach: specifies the half-life of a reachable route.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
717
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 10 MBGP Configuration l reuse: specifies the threshold for releasing routes from being suppressed. When the penalty is smaller than the threshold, the suppressed routes are reused.
l suppress: specifies the threshold for suppressing routes. The value must be greater than the value of reuse. When the penalty is greater than the threshold, the routes are suppressed.
l ceiling: specifies the ceiling value of the threshold. The value must be greater than the value of suppress.
l route-policy route-policy-name: specifies the routing policy. The configuration is applicable to the routes that meet certain matching conditions.
----End
10.7.3 Checking the Configuration
After MBGP route dampening is configured, you can check information about MBGP dampened routes, configuration parameters, and statistics of MBGP route flapping.
Prerequisite
The configurations of MBGP route dampening are complete.
Procedure
l Run the display bgp multicast routing-table dampened command to check MBGP dampened routes.
l Run the display bgp multicast routing-table dampening parameter command to check
MBGP route dampening parameters.
l Run the display bgp multicast routing-table flap-info [ ip-address [ mask [ longer-
match ] | mask-length [ longer-match ] ] | as-path-filter as-path-filter-number | regular-
expression as-regular-expression ] command to check the statistics of MBGP route flapping.
----End
10.8 Maintaining MBGP
Maintaining MBGP involves resetting MBGP connections and clearing MBGP statistics.
10.8.1 Resetting MBGP Connection
You can choose to reset MBGP in GR mode. Resetting an MBGP connection will interrupt the
MBGP peer relationship.
Context
Issue 01 (2011-10-26)
CAUTION
The MBGP peer relationship is deleted after you reset MBGP connections with the reset bgp
multicast command. So, confirm the action before you use the command.
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
718
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 10 MBGP Configuration
Procedure
l Run the reset bgp multicast peer-address command in the user view to reset the MBGP connection between specified peers.
l Run the reset bgp multicast all command in the user view to reset all MBGP connections.
l Run the reset bgp multicast group group-name command in the user view to reset the
MBGP connections between all peers in the peer group.
l Run the reset bgp multicast external command in the user view to reset external connections.
l Run the reset bgp multicast internal command in the user view to reset internal connections.
----End
10.8.2 Clearing MBGP Statistics
You can clear statistics of either MBGP route flapping or MBGP route dampening.
Context
CAUTION
The MBGP statistics cannot be restored after you clear them. So, confirm the action before you use the command.
Procedure
l Run the reset bgp multicast dampening [ ip-address [ mask | mask-length ] ] command in the user view to clear the MBGP routing information.
l Run the reset bgp multicast flap-info [ ip-address [ mask-length | mask ] | as-path-
filter as-path-list-number | regrexp regrexp ] command in the user view to clear the information about the MBGP route flapping.
----End
10.8.3 Debugging MBGP
Routers generate debugging information after you enable the debugging of modules in the user view. Debugging information shows the contents of packets sent or received by the debugged module.
Context
Issue 01 (2011-10-26)
CAUTION
Debugging affects the performance of the system. So, after debugging, run the undo debugging
all command to disable it immediately.
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
719
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 10 MBGP Configuration
When an MBGP fault occurs, run the following debugging commands in the user view to debug
MBGP and locate the fault.
For more information about debugging commands, refer to the Quidway S9300 Terabit Routing
Switch Debugging Reference.
Procedure
l Run the debugging bgp all command in the user view to enable all the debugging of MBGP.
l Run the debugging bgp event command in the user view to enable the debugging of MBGP event.
l Run the debugging bgp { keepalive | open | packet | route-refresh } [ receive | send ]
[ verbose ] command in the user view to enable the debugging of MBGP packets.
l Run the debugging bgp update multicast [ acl acl-number | ip-prefix ip-prefix-name |
peer peer-address ] [ receive | send ] [ verbose ] command in the user view to enable the debugging of MBGP update packets.
----End
10.9 Configuration Examples
MBGP configuration examples are provided, including networking requirements and diagram, configuration roadmap, and configuration notes.
10.9.1 Example for Configuring Basic MBGP Functions
Networking Requirements
, the receiver receives VOD information in multicast mode. The
receiver and the source reside in different ASs. The MBGP peer relationship is established between ASs to transmit multicast routing information.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
720
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Figure 10-1 Networking diagram of MBGP configuration
AS100
10 MBGP Configuration
AS200
SwitchD
GE2/0/0
Loopback0
GE1/0/0
SwitchB
GE2/0/0
Source SwitchA
GE2/0/0
GE1/0/0
Loopback0
GE1/0/0
GE3/0/0
Loopback0
GE3/0/0
SwitchC
GE2/0/0
GE1/0/0
Loopback0
Receiver
Switch
Switch A
Switch B
Switch C
Switch D
MBGP peers
Interface
GE 1/0/0
GE 2/0/0
Loopback0
GE 1/0/0
GE 2/0/0
GE 3/0/0
Loopback0
GE 1/0/0
GE 2/0/0
GE 3/0/0
Loopback0
GE 1/0/0
GE 2/0/0
Loopback0
VLANIF interface IP address
VLANIF100
VLANIF101
192.1.1.1/24
10.10.10.1/24
1.1.1.1/32
192.1.1.2/24 VLANIF100
VLANIF200
VLANIF300
194.1.1.2/24
193.1.1.2/24
2.2.2.2/32
VLANIF400
VLANIF102
VLANIF300
VLANIF400
VLANIF200
195.1.1.1/24
22.22.22.1/24
193.1.1.1/24
3.3.3.3/32
195.1.1.2/24
194.1.1.1/24
4.4.4.4/32
Configuration Roadmap
The configuration roadmap is as follows:
1.
Configure the IP addresses for the interfaces on each Switch to ensure internetworking within the AS in unicast mode.
2.
Configure the MBGP peer and set up inter-AS multicast routes.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
721
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
10 MBGP Configuration
3.
Configure the MBGP routes to be advertised.
4.
Enable multicast on each Switch.
5.
Configure basic PIM-SM functions in each AS and enable the IGMP function on the interfaces at the host side.
6.
Configure the BSR boundary on the interfaces connecting two ASs.
7.
Configure the MSDP peers to transfer inter-AS multicast information.
Data Preparation
To complete the configuration, you need the following data: l AS number of Switch A: 100 l
AS number of Switch B, Switch C, and Switch D: 200 l Address of the multicast group (225.1.1.1) and address of the multicast source
(10.10.10.10/24)
NOTE
This configuration example describes only the commands used to configure MBGP.
Procedure
Step 1 Configure the IP addresses for the interfaces on each Switch and the OSPF protocol in the ASs.
# Configure the IP addresses and masks of the interfaces on each Switch according to
. Connect the switches through OSPF and ensure that Switch B, Switch C, and Switch D can communicate with each other through the network layer and can learn the routes on the loopback interfaces of each other. Configure the switches to dynamically update routes through a unicast routing protocol. OSPF process 1 is adopted in the configuration and the procedure is not mentioned here.
Step 2 Configure BGP, enable the MBGP protocol, and configure the MBGP peers.
# Configure BGP and the MBGP peer on Switch A.
[SwitchA] bgp 100
[SwitchA-bgp] peer 192.1.1.2 as-number 200
[SwitchA-bgp] ipv4-family multicast
[SwitchA-bgp-af-multicast] peer 192.1.1.2 enable
[SwitchA-bgp-af-multicast] quit
[SwitchA-bgp] quit
# Configure BGP and the MBGP peer on Switch B.
[SwitchB] bgp 200
[SwitchB-bgp] peer 192.1.1.1 as-number 100
[SwitchB-bgp] peer 193.1.1.1 as-number 200
[SwitchB-bgp] peer 194.1.1.1 as-number 200
[SwitchB-bgp] ipv4-family multicast
[SwitchB-bgp-af-multicast] peer 192.1.1.1 enable
[SwitchB-bgp-af-multicast] peer 193.1.1.1 enable
[SwitchB-bgp-af-multicast] peer 194.1.1.1 enable
[SwitchB-bgp-af-multicast] quit
[SwitchB-bgp] quit
# Configure BGP and the MBGP peer on Switch C.
[SwitchC] bgp 200
[SwitchC-bgp] peer 193.1.1.2 as-number 200
[SwitchC-bgp] peer 195.1.1.2 as-number 200
Issue 01 (2011-10-26) 722
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
10 MBGP Configuration
[SwitchC-bgp] ipv4-family multicast
[SwitchC-bgp-af-multicast] peer 193.1.1.2 enable
[SwitchC-bgp-af-multicast] peer 195.1.1.2 enable
[SwitchC-bgp-af-multicast] quit
[SwitchC-bgp] quit
# Configure BGP and the MBGP peer on Switch D.
[SwitchD] bgp 200
[SwitchD-bgp] peer 194.1.1.2 as-number 200
[SwitchD-bgp] peer 195.1.1.1 as-number 200
[SwitchD-bgp] ipv4-family multicast
[SwitchD-bgp-af-multicast] peer 194.1.1.2 enable
[SwitchD-bgp-af-multicast] peer 195.1.1.1 enable
[SwitchD-bgp-af-multicast] quit
[SwitchD-bgp] quit
Step 3 Configure the routes to be advertised.
# Configure the routes to be advertised on Switch A.
[SwitchA] bgp 100
[SwitchA-bgp] ipv4-family multicast
[SwitchA-bgp-af-multicast] import-route direct
[SwitchA-bgp-af-multicast] quit
[SwitchA-bgp] quit
# Configure the routes to be advertised on Switch B.
[SwitchB] bgp 200
[SwitchB-bgp] import-route ospf 1
[SwitchB-bgp] ipv4-family multicast
[SwitchB-bgp-af-multicast] import-route direct
[SwitchB-bgp-af-multicast] import-route ospf 1
[SwitchB-bgp-af-multicast] quit
[SwitchB-bgp] quit
# Configure the routes to be advertised on Switch C. The configuration of Switch D is similar to the configuration of Switch C, and is not mentioned here.
[SwitchC] bgp 200
[SwitchC-bgp] ipv4-family multicast
[SwitchC-bgp-af-multicast] import-route direct
[SwitchC-bgp-af-multicast] import-route ospf 1
[SwitchC-bgp-af-multicast] quit
[SwitchC-bgp] quit
Step 4 Enable multicast on each Switch and the interfaces that are connected.
# Configure Switch A.
[SwitchA] multicast routing-enable
[SwitchA] interface vlanif 100
[SwitchA-Vlanif100] pim sm
[SwitchA-Vlanif100] quit
[SwitchA] interface vlanif 101
[SwitchA-Vlanif101] pim sm
[SwitchA-Vlanif101] quit
# Configure Switch B.
[SwitchB] multicast routing-enable
[SwitchB] interface vlanif 100
[SwitchB-Vlanif100] pim sm
[SwitchB-Vlanif100] quit
[SwitchB] interface vlanif 200
[SwitchB-Vlanif200] pim sm
[SwitchB-Vlanif200] quit
[SwitchB] interface vlanif 300
Issue 01 (2011-10-26) 723
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
[SwitchB-Vlanif300] pim sm
[SwitchB-Vlanif300] quit
# Configure Switch C.
[SwitchC] multicast routing-enable
[SwitchC] interface vlanif 400
[SwitchC-Vlanif400] pim sm
[SwitchC-Vlanif400] quit
[SwitchC] interface vlanif 102
[SwitchC-Vlanif102] pim sm
[SwitchC-Vlanif102] igmp enable
[SwitchC-Vlanif102] quit
[SwitchC] interface vlanif 300
[SwitchC-Vlanif300] pim sm
[SwitchC-Vlanif300] quit
# Configure Switch D.
[SwitchD] multicast routing-enable
[SwitchD] interface vlanif 400
[SwitchD-Vlanif400] pim sm
[SwitchD-Vlanif400] quit
[SwitchD] interface vlanif 200
[SwitchD-Vlanif200] pim sm
[SwitchD-Vlanif200] quit
Step 5 Configure BSR and RP within each AS.
# Configure Switch A.
[SwitchA] interface loopback 0
[SwitchA-LoopBack0] ip address 1.1.1.1 255.255.255.255
[SwitchA-LoopBack0] pim sm
[SwitchA-LoopBack0] quit
[SwitchA] pim
[SwitchA-pim] c-bsr loopback 0
[SwitchA-pim] c-rp loopback 0
[SwitchA-pim] quit
# Configure Switch B.
[SwitchB] interface loopback 0
[SwitchB-LoopBack0] ip address 2.2.2.2 255.255.255.255
[SwitchB-LoopBack0] pim sm
[SwitchB-LoopBack0] quit
[SwitchB] pim
[SwitchB-pim] c-bsr loopback 0
[SwitchB-pim] c-rp loopback 0
[SwitchB] quit
Step 6 Configure the BSR boundary on the interfaces connecting two ASs.
# Configure Switch A.
[SwitchA] interface vlanif 100
[SwitchA-Vlanif100] pim bsr-boundary
[SwitchA-Vlanif100] quit
# Configure Switch B.
[SwitchB] interface vlanif 100
[SwitchB-Vlanif100] pim bsr-boundary
[SwitchB-Vlanif100] quit
Step 7 Configure MSDP peers.
# Configure Switch A.
10 MBGP Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
724
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
10 MBGP Configuration
[SwitchA] msdp
[SwitchA-msdp] peer 192.1.1.2 connect-interface vlanif100
[SwitchA-msdp] quit
# Configure Switch B.
[SwitchB] msdp
[SwitchB-msdp] peer 192.1.1.1 connect-interface vlanif100
[SwitchB-msdp] quit
Step 8 Verify the configuration.
# Run the display bgp multicast peer command to view the MBGP peer relationship between switches. For example, the following information shows the MBGP peer relationship on Switch
A:
[SwitchA] display bgp multicast peer
BGP local router ID : 1.1.1.1
Local AS number : 100
Total number of peers : 1 Peers in established state : 1
Peer V AS MsgRcvd MsgSent OutQ Up/Down State PrefRcv
192.1.1.2 4 200 82 75 0 00:30:29 Established 17
# Run the display msdp brief command to view information about the MSDP peer relationship between switches. For example, the following information shows the MBGP peer relationship on Switch B:
[SwitchB] display msdp brief
MSDP Peer Brief Information of VPN-Instance: public net
Configured Up Listen Connect Shutdown Down
1 1 0 0 0 0
Peer's Address State Up/Down time AS SA Count Reset Count
192.1.1.1 Up 00:07:17 100 1 0
----End
Configuration Files
l Configuration file of Switch A
# sysname SwitchA
#
vlan batch 100 101
#
multicast routing-enable
# interface vlanif 100
ip address 192.1.1.1 255.255.255.0
pim bsr-boundary
pim sm
# interface vlanif 101
ip address 10.10.10.1 255.255.255.0
pim sm
# interface GigabitEthernet1/0/0
port hybrid tagged vlan 100
# interface GigabitEthernet2/0/0
port hybrid tagged vlan 101
# interface loopback 0
ip address 1.1.1.1 255.255.255.255
pim sm
# pim
Issue 01 (2011-10-26) 725
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Issue 01 (2011-10-26)
c-bsr loopback 0
c-rp loopback 0
# bgp 100
peer 192.1.1.2 as-number 200
#
ipv4-family unicast
undo synchronization
peer 192.1.1.2 enable
#
ipv4-family multicast
undo synchronization
import-route direct
peer 192.1.1.2 enable
# msdp
peer 192.1.1.2 connect-interface vlanif100
# return l Configuration file of Switch B
#
sysname SwitchB
#
vlan batch 100 200 300
#
multicast routing-enable
# interface vlanif 100
ip address 192.1.1.2 255.255.255.0
pim bsr-boundary
pim sm
# interface vlanif 200
ip address 194.1.1.2 255.255.255.0
pim sm
# interface vlanif 300
ip address 193.1.1.2 255.255.255.0
pim sm
# interface GigabitEthernet1/0/0
port hybrid tagged vlan 100
# interface GigabitEthernet2/0/0
port hybrid tagged vlan 200
# interface GigabitEthernet3/0/0
port hybrid tagged vlan 300
# interface loopback 0
ip address 2.2.2.2 255.255.255.255
pim sm
# pim
c-bsr loopback 0
c-rp loopback 0
# ospf 1
area 0.0.0.0
network 193.1.1.0 0.0.0.255
network 194.1.1.0 0.0.0.255
network 2.2.2.2 0.0.0.0
# bgp 200
peer 192.1.1.1 as-number 100
peer 193.1.1.1 as-number 200
peer 194.1.1.1 as-number 200
#
ipv4-family unicast
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
10 MBGP Configuration
726
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Issue 01 (2011-10-26)
undo synchronization
peer 192.1.1.1 enable
peer 193.1.1.1 enable
peer 194.1.1.1 enable
#
ipv4-family multicast
undo synchronization
import-route direct
import-route ospf 1
peer 192.1.1.1 enable
peer 193.1.1.1 enable
peer 194.1.1.1 enable
# msdp
peer 192.1.1.1 connect-interface vlanif100
# return l Configuration file of Switch C
#
sysname SwitchC
#
vlan batch 102 300 400
#
multicast routing-enable
# interface vlanif 102
ip address 22.22.22.1 255.255.255.0
pim sm
igmp enable
# interface vlanif 300
ip address 193.1.1.1 255.255.255.0
pim sm
# interface vlanif 400
ip address 195.1.1.1 255.255.255.0
pim sm
# interface GigabitEthernet1/0/0
port hybrid tagged vlan 400
# interface GigabitEthernet2/0/0
port hybrid tagged vlan 102
# interface GigabitEthernet3/0/0
port hybrid tagged vlan 300
# interface loopback 0
ip address 3.3.3.3 255.255.255.255
pim sm
# pim
c-bsr loopback 0
c-rp loopback 0
# ospf 1
area 0.0.0.0
network 193.1.1.0 0.0.0.255
network 195.1.1.0 0.0.0.255
network 3.3.3.3 0.0.0.0
# bgp 200
peer 193.1.1.2 as-number 200
peer 195.1.1.2 as-number 200
#
ipv4-family unicast
undo synchronization
peer 193.1.1.2 enable
peer 195.1.1.2 enable
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
10 MBGP Configuration
727
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
#
ipv4-family multicast
undo synchronization
import-route direct
import-route ospf 1
peer 193.1.1.2 enable
peer 195.1.1.2 enable
# return l Configuration file of Switch D
#
sysname SwitchD
#
vlan batch 200 400
#
multicast routing-enable
# interface vlanif 200
ip address 194.1.1.1 255.255.255.0
pim sm
# interface vlanif 400
ip address 195.1.1.2 255.255.255.0
pim sm
# interface GigabitEthernet1/0/0
port hybrid tagged vlan 400
# interface GigabitEthernet2/0/0
port hybrid tagged vlan 200
# interface loopback 0
ip address 4.4.4.4 255.255.255.255
pim sm
# ospf 1
area 0.0.0.0
network 194.1.1.0 0.0.0.255
network 195.1.1.0 0.0.0.255
network 4.4.4.4 0.0.0.0
# bgp 200
peer 194.1.1.2 as-number 200
peer 195.1.1.1 as-number 200
#
ipv4-family unicast
undo synchronization
peer 194.1.1.2 enable
peer 195.1.1.1 enable
#
ipv4-family multicast
undo synchronization
import-route direct
import-route ospf 1
peer 194.1.1.2 enable
peer 195.1.1.1 enable
# return
10 MBGP Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
728
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 11 Routing Policy Configuration
11
Routing Policy Configuration
About This Chapter
Issue 01 (2011-10-26)
Routing policies are used to filter routes to change the path through which network traffic passes.
11.1 Overview of the Routing Policy
By using routing policies, you can flexibly control the routes to be sent or received.
11.2 Routing Policy Features Supported by the S9300
11.3 Configuring the IP-Prefix List
An IP prefix list filters routes according to the destination addresses of the routes.
11.4 Configuring the Route-Policy
Each node of a Route-Policy consists of a set of if-match and apply clauses.
11.5 Applying Filters to Received Routes
11.6 Applying Filters to Advertised Routes
11.7 Applying Filters to Imported Routes
11.8 Controlling the Valid Time of the Routing policy
11.9 Maintaining the Routing Policy
This section provides several configuration examples of the routing policy.
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
729
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 11 Routing Policy Configuration
11.1 Overview of the Routing Policy
By using routing policies, you can flexibly control the routes to be sent or received.
Routing Policy
Routing policies are used to filter routes and control the receiving and advertising of routes. By changing the route attributes such as reachability, you can change the path that the traffic passes through.
When a switch sends or receives routes, it may use certain policies to filter routes. The policies are used in the following situations: l Send or receive routes that meet the matching rules.
l A routing protocol such as the Routing Information Protocol (RIP) needs to import the routes discovered by other routing protocols to enrich its routing information. When importing routes from other routing protocols, the switch may import certain routes that meet the matching rules, and set attributes of the routes imported to meet the requirement.
To implement a routing policy, you must: l Define a set of matching rules and setting rules. The policy is applied to the routing information to meet the requirements of the matching rules.
l Apply the matching rules to the routing policies for route advertisement, reception, and import.
Differences Between Routing Policy and PBR
Different from the forwarding by searching the Forwarding information base (FIB) according to the destination address of a packet, Policy-based routing (PBR) is a route selection mechanism based on policies set by users. PBR supports the information based on the source address and the length of a packet. PBR selects routes according to the set policy. PBR can be applicable to security and load balancing.
Routing policies and PBR are different concepts.
shows the differences between the two concepts.
Issue 01 (2011-10-26)
Table 11-1 Differences between routing policy and PBR
Routing policy Policy-based routing
Forwards packets based on the destination address in the routing table.
Forwards packets based on the policy. If packets fail to be forwarded, the device forwards packets by searching the routing table.
Based on the control plane and serves the routing protocol and routing table.
Combines with the routing protocol
Based on forwarding plane and serves for the forwarding policy.
Needs to be manually configured hop by hop to ensure that the packet is forwarded through the policy.
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
730
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 11 Routing Policy Configuration
11.2 Routing Policy Features Supported by the S9300
When configuring routing policies, you can use these filters: ACL, IP prefix list, AS-Path filter, community filter, extended community filter, RD filter, and Route-Policy.
Filters
The S9300 provides several types of filters for routing protocols, such as Access Control Lists
(ACLs), IP prefix lists, AS-Path filters, community filters, extended community filters
(Extcommunity-filters), and Route-Policies.
l ACL
The ACL consists of the ACL for IPv4 packets and the ACL for IPv6 packets. According to the usage, ACLs are classified into three types, that is, interface-based ACLs, basic
ACLs, and advanced ACLs. When defining an ACL, you can specify the IP address and subnet range to match the destination network segment address or the next hop address of a route.
For details of the ACL configuration, refer to the Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Services.
l IP-Prefix List
The IP-prefix list consists of IPv4 prefix list and IPv6 prefix list. The implementation of the IP-prefix is flexible.
An IP-prefix list is identified by its list name. Each prefix list includes multiple entries.
Each entry can independently specify the matching range in the form of the network prefix.
The matching range is identified by an index number that designates the sequence of the matching check.
During the matching, the switch checks entries identified by index numbers in an ascending order. When a route matches an entry, the system does not search the next entry matching
the route. For the detailed configuration, refer to
Configuring the IP-Prefix List
l
AS-Path Filter
Border Gateway Protocol (BGP) routing information packet includes an autonomous system (AS) path domain. The AS-Path filter specifies the matching condition for the AS path domain.
For the configuration of AS-Path filter, refer to
l Community Filter
The community filter is used only in BGP. The BGP routing information includes a community attribute domain. It is used to identify a community. The community filter specifies the matching condition for the community attribute domain.
For the configuration of community filter, refer to
.
l Extcommunity-Filter
The Extcommunity-filter is used only in BGP. The extended community of BGP supports only the Router-Target (RT) extended community of Virtual Private Network (VPN). The
Extcommunity-filter specifies matching rules for the extended community attribute.
For the configuration of excommunity-filter, refer to
.
l RD Filter
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
731
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 11 Routing Policy Configuration
Through Route Distinguisher (RD), the VPN instance implements the independency of address space and identifies the IPv4 and IPv6 prefixes of the same address space. The RD attribute filter specifies matching conditions for different RDs.
For the configuration of the RD attribute filter, refer to the Quidway S9300 Terabit Routing
Switch Configuration Guide - VPN.
l
Route-Policy
The Route-Policy is a complex filter. A Route-Policy is used to match certain route attributes, and to change the route attributes when certain matching rules are met. The
Route-Policy uses the preceding filters to define its filtering rules.
A Route-Policy consists of multiple nodes. The relationship between the nodes is "OR".
The system checks the nodes in the routing policy, the node with the smaller value of node is checked first. When the route matches a node in the routing policy, it passes the Route-
Policy and the system does not search the next matching node.
Each node comprises a set of if-match and apply clauses. The if-match clauses define the matching rules. The matching objects are certain route attributes. The relationship between
if-match clauses in a node is "AND". A matching succeeds only when all the matching rules specified by the if-match clauses in the same nod are matched.
The apply clauses specify actions. When a route matches a rule, the apply clause sets certain attributes for the route. For the detailed configuration, refer to
.
Application of the Routing Policy
The routing policy is used in the following situations: l Import routes that meet the matching rules through filters when a routing protocol imports routes discovered by other protocols.
l Filter routes that a routing protocol advertises or receives. Only the routes that meet the matching rules are received or advertised.
For the configuration of routing policy applications, refer to the related routing protocol configurations.
NOTE
After the routing policy changes, RM immediately notifies various protocols for processing by default.
11.3 Configuring the IP-Prefix List
An IP prefix list filters routes according to the destination addresses of the routes.
11.3.1 Establishing the Configuration Task
Before configuring the IP prefix list, familiarize yourself with the applicable environment, complete the pre-configuration tasks, and obtain the required data. This can help you complete the configuration task quickly and accurately.
Applicable Environment
Before applying a routing policy, you should set the matching rules, that is, filters. Compared with an ACL, an IP prefix list is more flexible. When the IP prefix list is used to filter routes, it matches the destination address of a route.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
732
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Pre-configuration Tasks
None.
Data Preparation
To configure an IP prefix list, you need the following data.
No.
Data
1 Name of IP prefix list
2 Matched address range
11 Routing Policy Configuration
11.3.2 Configuring an IPv4 Prefix List
An IP prefix list filters routes according to IP address prefixes. An IP address prefix is defined by the IP address and mask length.
Context
Do as follows on the switch to which the IP prefix list is applied:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
ip ip-prefix ip-prefix-name [ index index-number ] { permit | deny } ip-address
mask-length [ greater-equal greater-equal-value ] [ less-equal less-equal-value ]
An IPv4 prefix list is configured.
The range of the mask length can be specified as mask-length <= greater-equal-value <= less-
equal-value <= 32. If only greater-equal is specified, the range of the prefix is [greater-equal-
value, 32]; if only less-equal is specified, the range of the prefix is [mask-length, less-equal-
value].
An IPv4 prefix list is identified by its list name. Each prefix list contains multiple entries. Each entry can independently specify the matching range in the form of the network prefix and identify it with an index number. For example, the following shows an IPv4 prefix list named abcd:
# ip ip-prefix abcd index 10 permit 1.0.0.0 8 ip ip-prefix abcd index 20 permit 2.0.0.0 8
During the matching, the system checks the entries identified by the index numbers in an ascending order. When a route matches an entry, it does not match other entries.
In the S9300, all unmatched routes cannot pass the filtering list. If all entries are in deny mode, all routes are filtered. It is recommended that you define a permit 0.0.0.0 0 less-equal 32 entry after multiple entries in deny mode, thus allowing all the other IPv4 routes to pass the IP prefix list.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
733
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 11 Routing Policy Configuration
NOTE
If more than one IP-prefix entry is defined, at least one entry should be in the permit mode.
If the IP prefix list is used in OSPF to allow the packets from a specified network segment, run the display
ospf lsdb ase ip-address command to check whether the forwarding address is 0.0.0.0 . If not, permit this forwarding address when configuring the IP prefix list. If the forwarding address is not permitted, you cannot display the routing table of the allowed network segment.
----End
11.3.3 Configuring an IPv6 Prefix List
An IPv6 prefix list filters routes according to IPv6 address prefixes. An IPv6 address prefix is defined by the IPv6 address and mask length.
Context
Do as follows on the switch to which the IP prefix list is applied:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
ip ipv6-prefix ipv6-prefix-name [ index index-number ] { permit | deny } ipv6-
address prefix-length [ greater-equal greater-equal-value ] [ less-equal less-
equal-value ]
An IPv6 prefix list is configured.
An IPv6 prefix list is identified by its list name. Each prefix list can include multiple entries.
Each entry can independently specify the matching range in the form of the network prefix and identify it with an index number. For example, the following shows an IPv6 prefix list named
abcd:
# ip ipv6-prefix abcd index 10 permit 1:: 64 ip ipv6-prefix abcd index 20 permit 2:: 64
During the matching, the system checks the entries identified by the index numbers in an ascending order. When a route matches an entry, it does not match other entries.
In S9300, all unmatched routes are filtered. If all entries are in deny mode, all routes are filtered.
It is recommended that you define a permit :: 0 less-equal 128 after multiple entries in deny mode, thus allowing all the other IPv6 routes to pass the IP prefix list.
----End
11.3.4 Checking the Configuration
After an IP prefix list is configured, you can check information about the IP prefix list.
Prerequisite
The configurations of the IP-Prefix list are complete.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
734
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Procedure
11 Routing Policy Configuration l Run the display ip ip-prefix [ ip-prefix-name ] command to check information about the
IPv4 prefix list.
l Run the display ip ipv6-prefix [ ipv6-prefix-name ] command to check information about the IPv6 prefix list.
----End
Example
Run the display ip ip-prefix p1 command. You can view information about the prefix list named
p1.
<Quidway> display ip ip-prefix p1
Prefix-list pl
Permitted 5
Denied 2 index: 10 permit 192.168.0.0/16 ge 17 le 18
11.4 Configuring the Route-Policy
Each node of a Route-Policy consists of a set of if-match and apply clauses.
11.4.1 Establishing the Configuration Task
Before configuring the Route-Policy, familiarize yourself with the applicable environment, complete the pre-configuration tasks, and obtain the required data. This can help you complete the configuration task quickly and accurately.
Applicable Environment
A Route-Policy is used to match routes or certain route attributes, and to change these attributes when the matching rules are met.
A Route-Policy consists of multiple nodes. Each node is classified into the following clauses: l if-match clauses: define the matching rules. The matching rules are used by the routes that match the Route-Policy. The matching objects refer to some attributes of the route.
l apply clauses: specify actions, that is, configuration commands used to modify certain attributes.
For more information about Route-Policy, refer to the Quidway S9300 Terabit Routing Switch
Feature Description - IP Routing.
Pre-configuration Tasks
To configure a Route-Policy, complete the following tasks: l
11.3 Configuring the IP-Prefix List
l Configuring routing protocols
Data Preparation
To configure a Route-Policy, you need the following data.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
735
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 11 Routing Policy Configuration
2
3
No.
Data
1 Name and node number of the Route-Policy
Matching rule
Route attributes to be modified
11.4.2 Creating a Route-Policy
By applying a Route-Policy, you can set attributes for the imported routes according to networking requirements.
Context
Do as follows on the switch to which the Route-Policy is applied:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
route-policy route-policy-name { permit | deny } node node
A node of the Route-Policy is created and the Route-Policy view is displayed.
l The parameter permit specifies a node in a Route-Policy in permit mode. If a route matches the node, the switch performs actions defined by the apply clauses and the matching is complete. Otherwise, the route continues to match the next nod.
l The parameter deny specifies a node in a Route-Policy in deny mode. In deny mode, the
apply clauses are not used. If a route entry matches all the if-match clauses of the node, the route is denied by the node and the next node is not matched. If the entry does not match all the clauses, the next node is matched.
NOTE
In the S9300, by default, the unmatched routes are denied. If multiple nodes are defined in a Route-Policy, at least one of them should be in permit mode.
When the parameter route-policy is used to filter routes, note the following: l If a route does not match any node, it is denied by the Route-Policy.
l If all the nodes in the routing policy are in deny mode, all the routes are denied by the Route-
Policy.
When a Route-Policy is used to filter the routing information, the node with the smaller value of node is tested first.
Step 3 (Optional) Run:
description text
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
736
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
11 Routing Policy Configuration
The description of the routing policy is configured.
----End
11.4.3 (Optional) Configuring the If-Match Clause
The if-match clauses define the rules for matching certain route attributes.
Context
Do as follows on the switch to which the Route-Policy is applied:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
route-policy route-policy-name { permit | deny } node node
The Route-Policy view is displayed.
Step 3 Run the following command as required: l Run:
if-match acl { acl-number | acl-name }
The ACL is configured to match the routes.
l Run:
if-match cost cost
The cost is set to match the routes.
l Run:
if-match interface interface-type interface-number
The outbound interface is configured to match the routes.
l Run:
if-match ip { next-hop | route-source } { acl { acl-number | acl-name } | ip-
prefix ip-prefix-name }
The next hop or the source address is configured to match the routes.
l Run:
if-match ip-prefix ip-prefix-name
The IP prefix list is configured to match the routes.
NOTE
l Run:
For the same Route-Policy node, you cannot run the if-match acl command and the if-match ip-
prefix command at the same time. This is because the latest configuration overrides the previous configuration.
if-match ipv6 { address | next-hop | route-source } prefix-list ipv6-prefix-name
The next hop or the source address is configured to match the routes.
l Perform as follows to match the type of the route:
Issue 01 (2011-10-26) 737
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 11 Routing Policy Configuration
– Run:
if-match route-type { external-type1 | external-type1or2 | external-type2 |
internal | nssa-external-type1 | nssa-external-type1or2 | nssa-external-
type2 }
The route type, OSPF in this case, is set to match the routes.
–
Run:
if-match route-type { is-is-level-1 | is-is-level-2 }
The route type, IS-IS in this case, is set to match the routes.
l Run:
if-match tag tag
The tag is set to match the routes.
The commands in Step 3 can be used regardless of the order. A node can have multiple or no
if-match clauses.
NOTE
l For the same node in a route-policy, the relationship between if-match clauses is "AND". The route must meet all the matching rules before the actions defined by the apply clauses are performed. In the
if-match route-type and if-match interface commands, the relationship between the if-match clauses is "OR". In other commands, the relationship between if-match clauses is "AND".
l If no if-match clause is specified, all the routes meet the matching rules.
----End
11.4.4 (Optional) Configuring the Apply Clause
The apply clauses specify actions to set certain route attributes.
Context
Do as follows on the switch to which the Route-Policy is applied:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
route-policy route-policy-name { permit | deny } node node
The Route-Policy view is displayed.
Step 3 Run the following command as required: l Run:
apply backup-interface interface-type interface-number
The backup outbound interface is set.
l Run:
apply backup-nexthop { ip-address | auto }
The backup next hop is set.
l Run:
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
738
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 11 Routing Policy Configuration
apply cost [ + | - ] cost
The cost of the route is set.
l Set the cost type of the route.
– Run the apply cost-type { external | internal } command to set the cost type of an IS-
IS route.
–
Run the apply cost-type { type-1 | type-2 } command to set the cost type of an OSPF route.
l Run:
apply ip-address next-hop { peer-address | ipv4-address }
The next hop address of the IPv4 route is set.
l Run:
apply ipv6 next-hop { peer-address | ipv6-address }
The next hop address of the IPv6 route is set.
l Run:
apply isis { level-1 | level-1-2 | level-2 }
The route level of IS-IS is set.
l Run:
apply ospf { backbone | stub-area }
The area of the OSPF route is set.
l Run:
apply preference preference
The preference of the routing protocol is set.
l Run:
apply tag tag
The tag of the route is set.
The commands in Step 3 can be used regardless of the order.
----End
11.4.5 Checking the Configuration
After the Route-Policy is configured, you can check information about the Route-Policy.
Prerequisite
The configurations of the Route-Policy are complete.
Procedure
l Run the display route-policy [ route-policy-name ] command to check the Route-Policy.
----End
11.5 Applying Filters to Received Routes
By applying the related filters of routing policies to routing protocols, you can filter the received routes.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
739
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 11 Routing Policy Configuration
11.5.1 Establishing the Configuration Task
Before applying filters to the received routes, familiarize yourself with the applicable environment, complete the pre-configuration tasks, and obtain the required data. This can help you complete the configuration task quickly and accurately.
Applicable Environment
After defining the filters including the IP prefix list, ACL, and Route-Policy related to the routing policy, you need to import the filters to the protocols. The routing filters are used in the following situations: l Filtering the received routes
Use the filter-policy command in the protocol view and apply an ACL or an IP prefix list to filter the received routes. Only the routes that meet the matching rules are received.
The filter-policy import command is used to filter the received routes.
For the distance vector (DV) protocol and the link state protocol, the procedures are different after the filter-policy command is run.
– DV protocol
A DV protocol generates routes based on the routing table. The filters affect the routes received from the neighbor and the routes to be sent to the neighbor.
– Link state protocol
A link state protocol generates routes based on the Link State Database. The filter-
policy command does not affect the Link State Advertisements (LSAs) or the integrity of the LSDB. Therefore, the effect on the commands of filter-policy import and filter-
policy export are different.
The filter-policy import command identifies the route that is added to a local routing table from a protocol routing table only. That is, this command affects the local routing table only, but dose not affect the protocol routing table.
NOTE
l BGP has powerful filtering functions. For details of BGP configuration, refer to
l You can run the filter-policy command and the import-route command with different parameters for
RIP, OSPF, IS-IS, and BGP. For details, refer to related configurations.
Pre-configuration Tasks
Before applying filters to received routes, complete the following tasks: l
11.3 Configuring the IP-Prefix List
l Configuring an ACL l
11.4 Configuring the Route-Policy
Data Preparation
To apply filters to received routes, you need the following data.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
740
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 11 Routing Policy Configuration
2
3
No.
Data
1 Name of the IP prefix list
Name of the ACL
Name of the Route-Policy and node number
11.5.2 Filtering Routes Received by RIP
By applying filters, you can control the receiving of RIP routes.
Context
Do as follows on the switch that runs RIP:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
rip [ process-id ]
A RIP process is enabled and the RIP view is displayed.
Step 3 Run either of the following commands as required: l filter-policy { acl-number | acl-name acl-name } import [ interface-type interface-
number ] l filter-policy gateway ip-prefix-name import l filter-policy ip-prefix ip-prefix-name [ gateway ip-prefix-name ] import [ interface-type
interface-number ]
The filtering policy is configured for routes received by RIP.
----End
11.5.3 Filtering Routes Received by OSPF
By applying filters, you can control the receiving of OSPF routes.
Context
Do as follows on the switch that runs OSPF:
Procedure
Step 1 Run:
system-view
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
741
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
11 Routing Policy Configuration
The system view is displayed.
Step 2 Run:
ospf [ process-id ]
An OSPF process is enabled and the OSPF view is displayed.
Step 3 Run:
filter-policy { acl-number | acl-name acl-name | ip-prefix ip-prefix-name } import
The filtering policy is configured for routes received by OSPF.
----End
11.5.4 Filtering Routes Received by IS-IS
By applying filters, you can control the receiving of IS-IS routes.
Context
Do as follows on the switch that runs IS-IS:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
isis [ process-id ]
An IS-IS process is enabled and the IS-IS view is displayed.
Step 3 Run:
filter-policy { acl-number | acl-name acl-name | ip-prefix ip-prefix-name | route-
policy route-policy-name } import
The filtering policy is configured for routes received by IS-IS.
----End
11.5.5 Filtering Routes Received by BGP
By applying filters, you can control the receiving of BGP routes.
Procedure
l Filtering the Received Routes
Do as follows on the switch that runs BGP:
1.
Run:
system-view
The system view is displayed.
2.
Run:
bgp as-number
Issue 01 (2011-10-26) 742
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 11 Routing Policy Configuration
The BGP view is displayed.
3.
Run:
filter-policy { acl-number | acl-name acl-name | ip-prefix ip-prefix-
name } import
The filtering policy is configured for routes received by BGP.
l Filtering Routes Received from the Peers
Do as follows on the switch that runs BGP:
1.
Run:
system-view
The system view is displayed.
2.
Run:
bgp as-number
The BGP view is displayed.
3.
Run:
ipv4-family unicast
The IPv4 unicast address family view is displayed.
4.
Run:
peer { group-name | ipv4-address } filter-policy { acl-number | acl-name
acl-name } import
The filtering policy is configured for routes received from peers.
----End
11.5.6 Checking the Configuration
After filters are applied to the received routes, you can check information about the routing table of each protocol.
Prerequisite
The configurations of applying filters to received routes are complete.
Procedure
l Run the display rip route process-id route command to check information about the RIP routing table.
l Run the display ospf [ process-id ] routing command to check information about the OSPF routing table.
l
Run the display isis [ process-id ] route command to check information about the ISIS routing table.
l Run the display bgp routing-table command to check information about the BGP routing table.
l Run the display ip routing-table command to check information about the public IPv4 routing table.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
743
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 11 Routing Policy Configuration
Run the display ip routing-table command on the neighboring switch. You can find that the routes that meet the matching rules set on the neighboring switch are filtered or the actions defined by the apply clauses are performed.
----End
11.6 Applying Filters to Advertised Routes
By applying the related filters of routing policies to routing protocols, you can filter advertised routes.
11.6.1 Establishing the Configuration Task
Before applying filters to advertised routes, familiarize yourself with the applicable environment, complete the pre-configuration tasks, and obtain the required data. This can help you complete the configuration task quickly and accurately.
Applicable Environment
After defining the filters including the IP prefix list, ACL, and Route-Policy related to the routing policy, you need to import the filters to the protocols.
l
Filtering the advertised routes
Use the filter-policy command in the protocol view and import an ACL or an IP prefix list to filter the advertised routes. Only the routes that meet the matching rules are advertised.
The filter-policy export command is used to filter the advertised routes.
For the DV protocol and the link state protocol, the procedures are different after the filter-
policy command is run.
– DV protocol
A DV protocol generates routes based on the routing table. The filters affect the route received from the neighbor and the route to be sent to the neighbor.
–
Link state protocol
A link state protocol generates routes based on LSDBs. The filter-policy does not affect
LSAs or the integrity of LSDBs. The commands of filter-policy import and filter-
policy export are different.
To advertise routes, you can run the filter-policy export command to advertise routes imported by protocols, such as routes imported by RIP. Only the LSAs or Link Switched
Paths (LSPs) that are imported by using the import command are added to the LSDB.
This does not affect LSAs advertised by other switches.
NOTE
l BGP has powerful filtering function. For details of BGP configuration, refer to
l You can run the filter-policy command and the import-route command with different parameters for
RIP, OSPF, IS-IS, and BGP. For details, refer to related configurations.
Pre-configuration Tasks
Before applying filters to advertised routes, complete the following tasks: l
11.3 Configuring the IP-Prefix List
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
744
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing l Configuring an ACL l
11.4 Configuring the Route-Policy
11 Routing Policy Configuration
Data Preparation
To apply filters to advertised routes, you need the following data.
2
3
No.
Data
1 Name of the IP prefix list
Name of the ACL
Name of the Route-Policy and node number
11.6.2 Filtering Routes Advertised by RIP
By applying filters, you can control the advertisement of RIP routes.
Context
Do as follows on the switch that runs RIP:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
rip [ process-id ]
A RIP process is enabled and the RIP view is displayed.
Step 3 Run
filter-policy { acl-number | acl-name acl-name | ip-prefix ip-prefix-name } export
[ protocol [ process-id ] | interface-type interface-number ]
The filtering policy is configured for routes advertised by RIP.
----End
11.6.3 Filtering Routes Advertised by OSPF
By applying filters, you can control the advertisement of OSPF routes.
Context
Issue 01 (2011-10-26)
Do as follows on the switch that runs OSPF:
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
745
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 11 Routing Policy Configuration
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
ospf [ process-id ]
An OSPF process is enabled and the OSPF view is displayed.
Step 3 Run:
filter-policy { acl-number | acl-name acl-name | ip-prefix ip-prefix-name } export
[ protocol [ process-id ] ]
The filtering policy is configured for routes advertised by OSPF.
----End
11.6.4 Filtering Routes Advertised by IS-IS
By applying filters, you can control the advertisement of IS-IS routes.
Context
Do as follows on the switch that runs IS-IS:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
isis [ process-id ]
An IS-IS process is enabled and the IS-IS view is displayed.
Step 3 Run:
filter-policy { acl-number | acl-name acl-name | ip-prefix ip-prefix-name | route-
policy route-policy-name } export [ protocol [ process-id ] ]
The filtering policy is configured for routes advertised by IS-IS.
----End
11.6.5 Filtering Routes Advertised by BGP
By applying filters, you can control the advertisement of BGP routes.
Procedure
l Filtering the Advertised Routes
Do as follows on the switch that runs BGP:
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
746
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 11 Routing Policy Configuration
1.
Run:
system-view
The system view is displayed.
2.
Run:
bgp as-number
The BGP view is displayed.
3.
Run:
ipv4-family unicast
The IPv4 unicast address family view is displayed.
4.
Run:
filter-policy { acl-number | acl-name acl-name | ip-prefix ip-prefix-
name } export [ protocol [ process-id ] ]
The filtering policy is configured for routes advertised by BGP.
For the routes imported by BGP, only the routes that meet matching rules can be added to the BGP local routing table and advertised to the BGP peers.
– If protocol is specified, only the routes of the specified protocol are filtered.
– If the parameter is not specified, all the routes advertised by BGP are filtered, including the imported routes and the local routes advertised through the
network command.
NOTE
The filter-policy export command of different protocols have different affect ranges on routes advertisement: l For the link state protocol, only the routes imported are filtered.
l For the DV protocol, the routes imported and the routes discovered by the protocols are filtered.
l Filtering Routes Advertised to the Peers
Do as follows on the switch that runs BGP:
1.
Run:
system-view
The system view is displayed.
2.
Run:
bgp as-number
The BGP view is displayed.
3.
Run:
ipv4-family unicast
The IPv4 unicast address family view is displayed.
4.
Run:
peer { group-name | ipv4-address } filter-policy { acl-number | acl-name
acl-name } export
The filtering policy is configured for routes advertised to the peers.
----End
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
747
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 11 Routing Policy Configuration
11.6.6 Checking the Configuration
After filters are applied to advertised routes, you can check information about the routing table of each protocol.
Prerequisite
The configurations of applying filters to advertised routes are complete.
Procedure
l Run the display rip process-id route command to check information about the RIP routing table.
l Run the display ospf [ process-id ] routing command to check information about the OSPF routing table.
l
Run the display isis [ process-id ] route command to check information about the ISIS routing table.
l Run the display bgp routing-table command to check information about the BGP routing table.
l Run the display ip routing-table command to check information about the public IPv4 routing table.
Run the display ip routing-table command on the neighboring switch. You can find that the routes that meets the matching rules set on the neighboring switch are filtered or the actions defined by the apply clauses are performed.
----End
11.7 Applying Filters to Imported Routes
By applying the related filters of routing policies to routing protocols, you can filter imported routes.
11.7.1 Establishing the Configuration Task
Before applying filters to imported routes, familiarize yourself with the applicable environment, complete the pre-configuration tasks, and obtain the required data. This can help you complete the configuration task quickly and accurately.
Applicable Environment
After defining the filters including the IP prefix list, ACL, and Route-Policy related to the routing policy, you need to import the filters to the protocols.
l Applying the policy to import external routes
–
Use the import-route command in the protocol view. Import the required external routes to the protocols and apply a Route-Policy to the imported routes.
–
After the external routes are imported, run the filter-policy export to filter the routes.
Only the routes that meet the matching rules are advertised.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
748
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 11 Routing Policy Configuration
NOTE
l BGP has powerful filtering functions. For details of BGP configuration, refer to
l You can run the filter-policy command and the import-route command with different parameters for
RIP, OSPF, IS-IS, and BGP. For details, refer to related configurations.
Pre-configuration Tasks
Before applying filters to imported routes, complete the following tasks: l
Configuring the IP-Prefix List
l Configuring an ACL l
Data Preparation
To apply filters to imported routes, you need the following data.
2
3
No.
Data
1 Name of the IP prefix list
Name of the ACL
Name of the Route-Policy and node number
11.7.2 Applying Route-Policy to Routes Imported by RIP
By applying filters, you can control the import of RIP routes.
Context
Do as follows on the switch that runs RIP:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
rip [ process-id ]
A RIP routing process is enabled and the RIP view is displayed.
Step 3 Run:
import-route bgp [ cost { cost | transparent } | route-policy route-policy-name ]
*
or import-route { { static | direct } | { { rip | ospf | isis } [ process-id ] } }
[ cost cost | route-policy route-policy-name ]
*
The external routes are imported.
----End
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
749
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 11 Routing Policy Configuration
11.7.3 Applying Route-Policy to Routes Imported by OSPF
By applying filters, you can control the import of OSPF routes.
Context
Do as follows on the switch that runs OSPF:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
ospf [ process-id ]
An OSPF process is enabled and the OSPF view is displayed.
Step 3 Run:
import-route { limit limit-number | protocol [ process-id ] [ cost cost | route-
policy route-policy-name | tag tag | type type ]
*
}
The external routes are imported.
----End
11.7.4 Applying Route-Policy to Routes Imported by IS-IS
By applying filters, you can control the import of IS-IS routes.
Context
Do as follows on the switch that runs IS-IS:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
isis [ process-id ]
An IS-IS process is enabled and the IS-IS view is displayed.
Step 3 Configuring IS-IS to Import External Routes l If you want to set the cost for the imported route, you can run the import-route protocol
[ process-id ] [ cost-type { external | internal } | cost cost | tag tag | route-policy route-
policy-name | [ level-1 | level-2 | level-1-2 ] ]
*
command to import the external routes.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
750
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 11 Routing Policy Configuration l If you want to keep the original cost for the imported route, you can run the import-route
{ { rip | isis | ospf } [ process-id ] | bgp } inherit-cost [ tag tag | route-policy route-policy-
name | [ level-1 | level-2 | level-1-2 ] ]
*
command to import the external routes.
----End
11.7.5 Applying Route-Policy to Routes Imported by BGP
By applying filters, you can control the import of BGP routes.
Context
Do as follows on the switch that runs BGP:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
bgp as-number
The BGP view is displayed.
Step 3 Run:
ipv4-family unicast
The IPv4 unicast address family view is displayed.
Step 4 Run:
import-route protocol [ process-id ] [ med med | route-policy route-policy-name ]
*
The external routes are imported.
----End
11.7.6 Checking the Configuration
After filters are applied to imported routes, you can check information about the routing table of each protocol.
Prerequisite
The configurations of applying filters to imported routes are complete.
Procedure
l Run the display rip process-id route command to check information about the RIP routing table.
l Run the display ospf [ process-id ] routing command to check information about the OSPF routing table.
l Run the display isis [ process-id ] route command to check information about the ISIS routing table.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
751
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 11 Routing Policy Configuration l Run the display bgp routing-table command to check information about the BGP routing table.
l Run the display ip routing-table command to check information about the public IPv4 routing table.
Run the display ip routing-table command on the neighboring switch. You can find that the routes that meet the matching rules on the neighboring switch are filtered or the actions defined by the apply clauses are performed.
----End
11.8 Controlling the Valid Time of the Routing policy
To ensure network stability, you need to configure the delay for applying a routing policy when modifying the routing policy.
11.8.1 Establishing the Configuration Task
Before configuring the delay for applying a routing policy, familiarize yourself with the applicable environment, complete the pre-configuration tasks, and obtain the required data. This can help you complete the configuration task quickly and accurately.
Applicable Environment
In actual applications, when the configurations of multiple cooperative routing polices change, the Routing Management Module (RM) immediately notifies related protocols to apply a new routing policy, after the configuration of the routing policy is complete. An incomplete routing policy causes route flapping, instability of the network, and a waste of time during packet processing.
The S9300 provides the following rules for processing changes of a routing policy: l By default, the RM immediately notifies the protocol of applying the new policy when the routing policy changes.
l If the valid time of the routing policy is configured, when the commands used to configure the routing policy change, the RM does not notify various protocols of immediately processing the changes. Instead, the RM waits for a certain period, and then notifies various protocols of applying the changed routing policy.
l If the routing policy changes again during the waiting time, the RM resets the timer.
You can run related commands to set the waiting time as required.
Pre-configuration Tasks
None.
Data Preparation
To configure the valid time of the routing policy, you need the following data.
No.
Data
1 Delay for applying the routing policy
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
752
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 11 Routing Policy Configuration
11.8.2 Configuring the Delay for Applying the Routing Policy
When modifying multiple cooperative routing policies, you need to configure the delay for applying a routing policy.
Context
Do as follows on the switch on which the delay for applying routing policy needs to be changed:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
route-policy-change notify-delay delay-time
The delay for applying the routing policy is set.
The delay ranges from 1 to 180, in seconds.
By default, the RM immediately notifies the protocol of applying the new policy when the routing policy changes.
Step 3 Run:
quit
Back to the user view.
Step 4 (Optional) Run:
refresh bgp all { export | import }
BGP is configured to apply the new routing policy.
After the command is used, the effect of the policy filtering can be found immediately. You can run the command to configure BGP to immediately apply new policies.
The polices affected by the timer are ACLs, IP prefix lists, AS-Path filters, community filters, extended community filters, RD filters, and Route-Policies.
----End
11.8.3 Checking the Configuration
After the delay for applying a routing policy is configured, you can check the configuration.
Prerequisite
The configurations of controlling the valid time of the routing policy are complete.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
753
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Procedure
11 Routing Policy Configuration l Run the display current-configuration | include notify-delay command to check the delay for applying the routing policy.
----End
Example
Run the display current-configuration command. You can find the delay for applying the routing policy. For example:
<Quidway> display current-configuration | include notify-delay route-policy-change notify-delay 10
11.9 Maintaining the Routing Policy
Maintaining routing policies involves clearing the statistics of the IP prefix list and debugging routing policies.
Context
CAUTION
The statistics of IP prefix lists cannot be restored after you clear it. So, confirm the action before you use the command.
By default, the statistics of IP prefix lists are not cleared.
Procedure
l
Run reset ip ip-prefix [ ip-prefix-name ] command in the user view to clear the IPv4 prefix list statistics.
l
Run reset ip ipv6-prefix [ ipv6-prefix-name ] command in the user view to clear the IPv6 prefix list statistics.
----End
11.10 Configuration Examples
This section provides several configuration examples of the routing policy.
11.10.1 Example for Filtering the Received and Advertised Routes
Networking Requirements
, Switch A receives routes from the Internet, and provides some of the routes for Switch B on the network where OSPF runs. It is required that: l Switch A should provide 172.1.17.0/24, 172.1.18.0/24, and 172.1.19.0/24 for Switch B.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
754
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 11 Routing Policy Configuration l Switch C should receive only 172.1.18.0/24. Switch D should receive all routes provided by Switch B.
Figure 11-1 Networking diagram for filtering the received and advertised routes
SwitchC
GE1/0/1
GE1/0/2
GE1/0/3
SwitchB
GE1/0/1
GE1/0/1
SwitchA
172.1.16.0/24
172.1.17.0/24
172.1.18.0/24
172.1.19.0/24
172.1.20.0/24
OSPF
GE1/0/1
SwitchD
Device name
SwitchA
SwitchB
SwitchB
SwitchB
SwitchC
SwitchD
Interface
GigabitEthernet1/0/1
GigabitEthernet1/0/1
GigabitEthernet1/0/2
GigabitEthernet1/0/3
GigabitEthernet1/0/1
GigabitEthernet1/0/1
VLANIF interface IP address
VLANIF 10
VLANIF 10
VLANIF 20
VLANIF 30
VLANIF 20
VLANIF 30
192.168.1.1/24
192.168.1.2/24
192.168.2.1/24
192.168.3.1/24
192.168.2.2/24
192.168.3.2/24
Configuration Roadmap
The configuration roadmap is as follows:
1.
Specify the ID of the VLAN that each interface belongs to.
2.
Assign an IP address to each VLANIF interface.
3.
Configure basic OSPF functions on Switch A, Switch B, Switch C, and Switch D.
4.
Configure static routes on Switch A and import these routes into OSPF.
5.
Configure a routing policy for advertising routes on Switch A and check the filtering result on Switch B.
6.
Configure a routing policy for receiving routes on Switch C and check the filtering result on Switch C.
Data Preparation
To complete the configuration, you need the following data: l Five static routes imported by Switch A l
Switch A, Switch B, Switch C, and Switch D located in Area 0, that is, the backbone area l Name of the IP prefix list and routes to be filtered
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
755
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
11 Routing Policy Configuration
Procedure
Step 1 Create VLANs and add interfaces to the corresponding VLANs.
<Quidway> system-view
[Quidway] sysname SwitchA
[SwitchA] vlan 10
[SwitchA-vlan10] quit
[SwitchA] interface gigabitethernet 1/0/1
[SwitchA-GigabitEthernet1/0/1] port hybrid pvid vlan 10
[SwitchA-GigabitEthernet1/0/1] port hybrid untagged vlan 10
[SwitchA-GigabitEthernet1/0/1] quit
The configurations of Switch B, Switch C, and Switch D are the same as the configuration of
Switch A, and are not mentioned here.
Step 2 Assign an IP address to each VLANIF interface.
[SwitchA] interface vlanif 10
[SwitchA-Vlanif10] ip address 192.168.1.1 24
[SwitchA-Vlanif10] quit
The configurations of Switch B, Switch C, and Switch D are the same as the configuration of
Switch A, and are not mentioned here.
Step 3 Configure basic OSPF functions.
# Configure Switch A.
[SwitchA] ospf
[SwitchA-ospf-1] area 0
[SwitchA-ospf-1-area-0.0.0.0] network 192.168.1.0 0.0.0.255
[SwitchA-ospf-1-area-0.0.0.0] quit
[SwitchA-ospf-1] quit
# Configure Switch B.
[SwitchB] ospf
[SwitchB-ospf-1] area 0
[SwitchB-ospf-1-area-0.0.0.0] network 192.168.1.0 0.0.0.255
[SwitchB-ospf-1-area-0.0.0.0] network 192.168.2.0 0.0.0.255
[SwitchB-ospf-1-area-0.0.0.0] network 192.168.3.0 0.0.0.255
[SwitchB-ospf-1-area-0.0.0.0] quit
[SwitchB-ospf-1] quit
# Configure Switch C.
[SwitchC] ospf
[SwitchC-ospf-1] area 0
[SwitchC-ospf-1-area-0.0.0.0] network 192.168.2.0 0.0.0.255
[SwitchC-ospf-1-area-0.0.0.0] quit
[SwitchC-ospf-1] quit
# Configure Switch D.
[SwitchD] ospf
[SwitchD-ospf-1] area 0
[SwitchD-ospf-1-area-0.0.0.0] network 192.168.3.0 0.0.0.255
[SwitchD-ospf-1-area-0.0.0.0] quit
[SwitchD-ospf-1] quit
Step 4 Configure five static routes on Switch A, and import these routes into OSPF.
[SwitchA] ip route-static 172.1.16.0 24 NULL0
[SwitchA] ip route-static 172.1.17.0 24 NULL0
[SwitchA] ip route-static 172.1.18.0 24 NULL0
[SwitchA] ip route-static 172.1.19.0 24 NULL0
[SwitchA] ip route-static 172.1.20.0 24 NULL0
[SwitchA] ospf
Issue 01 (2011-10-26) 756
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 11 Routing Policy Configuration
[SwitchA-ospf-1] import-route static
[SwitchA-ospf-1] quit
# Check the routing table on Switch B. You can view that the five static routes are imported into
OSPF.
[SwitchB] display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 13 Routes : 13
Destination/Mask Proto Pre Cost Flags NextHop Interface
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
192.168.1.0/24 Direct 0 0 D 192.168.1.2 Vlanif10
192.168.1.2/32 Direct 0 0 D 127.0.0.1 InLoopBack0
192.168.2.0/24 Direct 0 0 D 192.168.2.1 Vlanif20
192.168.2.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
192.168.3.0/24 Direct 0 0 D 192.168.3.1 Vlanif30
192.168.3.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
172.1.16.0/24 O_ASE 150 1 D 192.168.1.1 Vlanif10
172.1.17.0/24 O_ASE 150 1 D 192.168.1.1 Vlanif10
172.1.18.0/24 O_ASE 150 1 D 192.168.1.1 Vlanif10
172.1.19.0/24 O_ASE 150 1 D 192.168.1.1 Vlanif10
172.1.20.0/24 O_ASE 150 1 D 192.168.1.1 Vlanif10
Step 5 Configure a routing policy for advertising routes.
# Configure an IP prefix list named a2b on Switch A.
[SwitchA] ip ip-prefix a2b index 10 permit 172.1.17.0 24
[SwitchA] ip ip-prefix a2b index 20 permit 172.1.18.0 24
[SwitchA] ip ip-prefix a2b index 30 permit 172.1.19.0 24
# Configure a routing policy for advertising routes on Switch A and use IP prefix list a2b to filter routes.
[SwitchA] ospf
[SwitchA-ospf-1] filter-policy ip-prefix a2b export static
# Check the routing table on Switch B, and you can find that Switch B receives only three routes defined in IP prefix list a2b.
[SwitchB] display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 11 Routes : 11
Destination/Mask Proto Pre Cost Flags NextHop Interface
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
192.168.1.0/24 Direct 0 0 D 192.168.1.2 Vlanif10
192.168.1.2/32 Direct 0 0 D 127.0.0.1 InLoopBack0
192.168.2.0/24 Direct 0 0 D 192.168.2.1 Vlanif20
192.168.2.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
192.168.3.0/24 Direct 0 0 D 192.168.3.1 Vlanif30
192.168.3.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
172.1.17.0/24 O_ASE 150 1 D 192.168.1.1 Vlanif10
172.1.18.0/24 O_ASE 150 1 D 192.168.1.1 Vlanif10
172.1.19.0/24 O_ASE 150 1 D 192.168.1.1 Vlanif10
Step 6 Configure a routing policy for receiving routes.
# Configure an IP prefix list named in on Switch C.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
757
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
11 Routing Policy Configuration
[SwitchC] ip ip-prefix in index 10 permit 172.1.18.0 24
# Configure a routing policy for receiving routes on Switch C, and use IP prefix list in to filter routes.
[SwitchC] ospf
[SwitchC-ospf-1] filter-policy ip-prefix in import
# Check the routing table on Switch C, and you can find that Switch C in the local core routing table receives only one route defined in IP prefix list in.
[SwitchC] display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 6 Routes : 6
Destination/Mask Proto Pre Cost Flags NextHop Interface
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
192.168.2.0/24 Direct 0 0 D 192.168.2.2 Vlanif20
192.168.2.2/32 Direct 0 0 D 127.0.0.1 InLoopBack0
172.1.18.0/24 O_ASE 150 1 D 192.168.2.1 Vlanif20
----End
Configuration Files
l Configuration file of Switch A
#
sysname SwitchA
#
vlan batch 10
# interface Vlanif10
ip address 192.168.1.1 255.255.255.0
# interface GigabitEthernet1/0/1
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# ospf 1
filter-policy ip-prefix a2b export static
import-route static
area 0.0.0.0
network 192.168.1.0 0.0.0.255
#
ip ip-prefix a2b index 10 permit 172.1.17.0 24
ip ip-prefix a2b index 20 permit 172.1.18.0 24
ip ip-prefix a2b index 30 permit 172.1.19.0 24
#
ip route-static 172.1.16.0 255.255.255.0 NULL0
ip route-static 172.1.17.0 255.255.255.0 NULL0
ip route-static 172.1.18.0 255.255.255.0 NULL0
ip route-static 172.1.19.0 255.255.255.0 NULL0
ip route-static 172.1.20.0 255.255.255.0 NULL0
# return l Configuration file of Switch B
#
sysname SwitchB
#
vlan batch 10 20 30
# interface Vlanif10
ip address 192.168.1.2 255.255.255.0
Issue 01 (2011-10-26) 758
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
# interface Vlanif20
ip address 192.168.2.1 255.255.255.0
# interface Vlanif30
ip address 192.168.3.1 255.255.255.0
# interface GigabitEthernet1/0/1
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# interface GigabitEthernet1/0/2
port hybrid pvid vlan 20
port hybrid untagged vlan 20
# interface GigabitEthernet1/0/3
port hybrid pvid vlan 30
port hybrid untagged vlan 30
# ospf 1
area 0.0.0.0
network 192.168.1.0 0.0.0.255
network 192.168.2.0 0.0.0.255
network 192.168.3.0 0.0.0.255
# return l Configuration file of Switch C
#
sysname SwitchC
#
vlan batch 20
# interface Vlanif20
ip address 192.168.2.2 255.255.255.0
# interface GigabitEthernet1/0/1
port hybrid pvid vlan 20
port hybrid untagged vlan 20
# ospf 1
filter-policy ip-prefix in import
area 0.0.0.0
network 192.168.2.0 0.0.0.255
#
ip ip-prefix in index 10 permit 172.1.18.0 24
# return l Configuration file of Switch D
#
sysname SwitchD
#
vlan batch 30
# interface Vlanif30
ip address 192.168.3.2 255.255.255.0
# interface GigabitEthernet1/0/1
port hybrid pvid vlan 30
port hybrid untagged vlan 30
# ospf 1
area 0.0.0.0
network 192.168.3.0 0.0.0.255
# return
11 Routing Policy Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
759
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 11 Routing Policy Configuration
11.10.2 Example for Applying a Routing Policy to the Imported
Routes
Networking Requirements
, Switch B and Switch A exchange the routing information through
OSPF; Switch B and Switch C exchange the routing information through IS-IS.
Switch B is required to import IS-IS routes into OSPF and to use the routing policy to set the route attributes. The cost of the route 172.17.1.0/24 is set to 100, and the tag of the route
172.17.2.0/24 is set to 20.
Figure 11-2 Networking diagram for applying a routing policy to the imported routes
SwitchA
GE1/0/1
GE1/0/1
SwitchB
SwitchC
GE1/0/2
GE1/0/1
OSPF IS-IS
GE1/0/2
GE1/0/3
GE1/0/4
Device name
SwitchA
SwitchB
SwitchB
SwitchC
SwitchC
SwitchC
SwitchC
Interface
GigabitEthernet1/0/1
GigabitEthernet1/0/1
GigabitEthernet1/0/2
GigabitEthernet1/0/1
GigabitEthernet1/0/2
GigabitEthernet1/0/3
GigabitEthernet1/0/4
VLANIF interface IP address
VLANIF 10 192.168.1.1/24
VLANIF 10
VLANIF 20
VLANIF 20
VLANIF 30
VLANIF 40
VLANIF 50
192.168.1.2/24
192.168.2.2/24
192.168.2.1/24
172.17.1.1/24
172.17.2.1/24
172.17.3.1/24
Configuration Roadmap
The configuration roadmap is as follows:
1.
Specify the ID of the VLAN that each interface belongs to.
2.
Assign an IP address to each VLANIF interface.
3.
Configure basic IS-IS functions on Switch B and Switch C.
4.
Configure OSPF on Switch A and Switch B and import IS-IS routes.
5.
Configure a routing policy on Switch B and apply the routing policy when OSPF imports
IS-IS routes, and check the routes.
Data Preparation
To complete the configuration, you need the following data.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
760
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing 11 Routing Policy Configuration l IS-IS level of Switch C being Level-2 and system ID being 0000.0000.0001, IS-IS level of
Switch B being Level-2, system ID being 0000.0000.0002, and number of the area where
Switch B and Switch C reside being 10 l Switch A and Switch B located in Area 0, that is, the backbone area l Names of the filtering list and IP prefix list, cost of the route 172.17.1.0/24 being 100, and tag of the route 172.17.2.0/24 being 20
Procedure
Step 1 Create a VLAN and add the corresponding interface to the VLAN.
<Quidway> system-view
[Quidway] sysname SwitchA
[SwitchA] vlan 10
[SwitchA-vlan10] quit
[SwitchA] interface gigabitethernet 1/0/1
[SwitchA-GigabitEthernet1/0/1] port hybrid pvid vlan 10
[SwitchA-GigabitEthernet1/0/1] port hybrid untagged vlan 10
[SwitchA-GigabitEthernet1/0/1] quit
The configurations of Switch B, Switch C, and Switch D are the same as the configuration of
Switch A, and are not mentioned here.
Step 2 Assign an IP address to each VLANIF interface.
[SwitchA] interface vlanif 10
[SwitchA-Vlanif10] ip address 192.168.1.1 24
[SwitchA-Vlanif10] quit
The configurations of Switch B, Switch C, and Switch D are the same as the configuration of
Switch A, and are not mentioned here.
Step 3 Configure IS-IS.
# Configure Switch C.
[SwitchC] isis
[SwitchC-isis-1] is-level level-2
[SwitchC-isis-1] network-entity 10.0000.0000.0001.00
[SwitchC-isis-1] quit
[SwitchC] interface vlanif 20
[SwitchC-Vlanif20] isis enable
[SwitchC-Vlanif20] quit
[SwitchC] interface vlanif 30
[SwitchC-Vlanif30] isis enable
[SwitchC-Vlanif30] quit
[SwitchC] interface vlanif 40
[SwitchC-Vlanif40] isis enable
[SwitchC-Vlanif40] quit
[SwitchC] interface vlanif 50
[SwitchC-Vlanif50] isis enable
[SwitchC-Vlanif50] quit
# Configure Switch B.
[SwitchB] isis
[SwitchB-isis-1] is-level level-2
[SwitchB-isis-1] network-entity 10.0000.0000.0002.00
[SwitchB-isis-1] quit
[SwitchB] interface vlanif 20
[SwitchB-Vlanif20] isis enable
[SwitchB-Vlanif20] quit
Step 4 Configure OSPF and import routes.
# Configure Switch A and enable OSPF.
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
761
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
11 Routing Policy Configuration
[SwitchA] ospf
[SwitchA-ospf-1] area 0
[SwitchA-ospf-1-area-0.0.0.0] network 192.168.1.0 0.0.0.255
[SwitchA-ospf-1-area-0.0.0.0] quit
[SwitchA-ospf-1] quit
# Configure Switch B, enable OSPF, and import IS-IS routes.
[SwitchB] ospf
[SwitchB-ospf-1] area 0
[SwitchB-ospf-1-area-0.0.0.0] network 192.168.1.0 0.0.0.255
[SwitchB-ospf-1-area-0.0.0.0] quit
[SwitchB-ospf-1] import-route isis 1
[SwitchB-ospf-1] quit
# Check the OSPF routing table of Switch A, and you can view the imported routes.
[SwitchA] display ospf routing
OSPF Process 1 with Router ID 192.168.1.1
Routing Tables
Routing for Network
Destination Cost Type NextHop AdvRouter Area
192.168.1.0/24 1 Stub 192.168.1.1 192.168.1.1 0.0.0.0
Routing for ASEs
Destination Cost Type Tag NextHop AdvRouter
192.168.2.0/24 1 Type2 1 192.168.1.2 192.168.1.2
172.17.1.0/24 1 Type2 1 192.168.1.2 192.168.1.2
172.17.2.0/24 1 Type2 1 192.168.1.2 192.168.1.2
172.17.3.0/24 1 Type2 1 192.168.1.2 192.168.1.2
Routing for NSSAs
Destination Cost Type Tag NextHop AdvRouter
Total Nets: 5
Intra Area: 1 Inter Area: 0 ASE: 4 NSSA: 0
Step 5 Set the filtering list.
# Set ACL 2002 to match 172.17.2.0/24.
[SwitchB] acl number 2002
[SwitchB-acl-basic-2002] rule permit source 172.17.2.0 0.0.0.255
[SwitchB-acl-basic-2002] quit
# Set an IP prefix list named prefix-a to match 172.17.1.0/24.
[SwitchB] ip ip-prefix prefix-a index 10 permit 172.17.1.0 24
Step 6 Configure a Route-Policy.
[SwitchB] route-policy isis2ospf permit node 10
[SwitchB-route-policy] if-match ip-prefix prefix-a
[SwitchB-route-policy] apply cost 100
[SwitchB-route-policy] quit
[SwitchB] route-policy isis2ospf permit node 20
[SwitchB-route-policy] if-match acl 2002
[SwitchB-route-policy] apply tag 20
[SwitchB-route-policy] quit
[SwitchB] route-policy isis2ospf permit node 30
[SwitchB-route-policy] quit
Step 7 Apply the Route-Policy when routes are imported.
# Configure Switch B and apply the Route-Policy when routes are imported.
[SwitchB] ospf
[SwitchB-ospf-1] import-route isis 1 route-policy isis2ospf
[SwitchB-ospf-1] quit
762
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
11 Routing Policy Configuration
# Check the OSPF routing table of Switch A, and you can view that the cost of the route with the destination address as 172.17.1.0/24 is 100, and that the tag of the route destined for
172.17.2.0/24 is 20. Other routing attributes, however, do not change.
[SwitchA] display ospf routing
OSPF Process 1 with Router ID 192.168.1.1
Routing Tables
Routing for Network
Destination Cost Type NextHop AdvRouter Area
192.168.1.0/24 1 Stub 192.168.1.1 192.168.1.1 0.0.0.0
Routing for ASEs
Destination Cost Type Tag NextHop AdvRouter
192.168.2.0/24 1 Type2 1 192.168.1.2 192.168.1.2
172.17.1.0/24 100 Type2 1 192.168.1.2 192.168.1.2
172.17.2.0/24 1 Type2 20 192.168.1.2 192.168.1.2
172.17.3.0/24 1 Type2 1 192.168.1.2 192.168.1.2
Routing for NSSAs
Destination Cost Type Tag NextHop AdvRouter
Total Nets: 5
Intra Area: 1 Inter Area: 0 ASE: 4 NSSA: 0
----End
Configuration Files
l Configuration file of Switch A
#
sysname SwitchA
#
vlan batch 10
# interface Vlanif10
ip address 192.168.1.1 255.255.255.0
# interface GigabitEthernet1/0/1
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# ospf 1
area 0.0.0.0
network 192.168.1.0 0.0.0.255
# return l
Configuration file of Switch B
#
sysname SwitchB
#
vlan batch 10 20
# acl number 2002
rule 5 permit source 172.17.2.0 0.0.0.255
# isis 1
is-level level-2
network-entity 10.0000.0000.0002.00
# interface Vlanif10
ip address 192.168.1.2 255.255.255.0
# interface Vlanif20
ip address 192.168.2.2 255.255.255.0
isis enable 1
#
Issue 01 (2011-10-26) 763
Quidway S9300 Terabit Routing Switch
Configuration Guide - IP Routing interface GigabitEthernet1/0/1
port hybrid pvid vlan 10
port hybrid untagged vlan 10
# interface GigabitEthernet1/0/2
port hybrid pvid vlan 20
port hybrid untagged vlan 20
# ospf 1
import-route isis 1 route-policy isis2ospf
area 0.0.0.0
network 192.168.1.0 0.0.0.255
# route-policy isis2ospf permit node 10
if-match ip-prefix prefix-a
apply cost 100
# route-policy isis2ospf permit node 20
if-match acl 2002
apply tag 20
# route-policy isis2ospf permit node 30
# ip ip-prefix prefix-a index 10 permit 172.17.1.0 24
# return l Configuration file of Switch C
#
sysname SwitchC
#
vlan batch 20 30 40 50
# isis 1
is-level level-2
network-entity 10.0000.0000.0001.00
# interface Vlanif20
ip address 192.168.2.1 255.255.255.0
isis enable 1
# interface Vlanif30
ip address 172.17.1.1 255.255.255.0
isis enable 1
# interface Vlanif40
ip address 172.17.2.1 255.255.255.0
isis enable 1
# interface Vlanif50
ip address 172.17.3.1 255.255.255.0
isis enable 1
# interface GigabitEthernet1/0/1
port hybrid pvid vlan 20
port hybrid untagged vlan 20
# interface GigabitEthernet1/0/2
port hybrid pvid vlan 30
port hybrid untagged vlan 30
# interface GigabitEthernet1/0/3
port hybrid pvid vlan 40
port hybrid untagged vlan 40
# interface GigabitEthernet1/0/4
port hybrid pvid vlan 50
port hybrid untagged vlan 50
# return
11 Routing Policy Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
764
डाउनलोड
विज्ञापन