HP FlexFabric 5930 Switch Network Switch Configuration Guide
Reklamë
Reklamë
HP FlexFabric 5930 Switch Series
Layer 3 - IP Routing
Configuration Guide
Part number: 5998-4571
Software version: Release 2406 & Release 2407P01
Document version: 6W101-20140404
Legal and notice information
© Copyright 2014 Hewlett-Packard Development Company, L.P.
No part of this documentation may be reproduced or transmitted in any form or by any means without prior written consent of Hewlett-Packard Development Company, L.P.
The information contained herein is subject to change without notice.
HEWLETT-PACKARD COMPANY MAKES NO WARRANTY OF ANY KIND WITH REGARD TO THIS
MATERIAL, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE. Hewlett-Packard shall not be liable for errors contained herein or for incidental or consequential damages in connection with the furnishing, performance, or use of this material.
The only warranties for HP products and services are set forth in the express warranty statements accompanying such products and services. Nothing herein should be construed as constituting an additional warranty. HP shall not be liable for technical or editorial errors or omissions contained herein.
Contents
i
ii
iii
iv
v
vi
Configuring basic IP routing
IP routing directs IP packet forwarding on routers based on a routing table.
Routing table
A RIB contains the global routing information and related information, including route recursion, route redistribution, and route extension information. The router selects optimal routes from the routing table and puts them into the FIB table, and it uses the FIB table to forward packets. For more information about the FIB table, see Layer 3—IP Services Configuration Guide.
categorizes routes by different criteria.
Table 1 Route categories
Criterion Categories
Destination
•
Network route—The destination is a network. The subnet mask is less than 32 bits.
•
Host route—The destination is a host. The subnet mask is 32 bits.
Whether the destination is directly connected
•
•
Direct route—The destination is directly connected.
Indirect route—The destination is indirectly connected.
Origin
•
Direct route—A direct route is discovered by the data link protocol on an interface, and is also called an "interface route."
•
Static route—A static route is manually configured by an administrator.
•
Dynamic route—A dynamic route is dynamically discovered by a routing protocol.
To view brief information about a routing table, use the display ip routing-table command:
<Sysname> display ip routing-table
Destinations : 19 Routes : 19
Destination/Mask Proto Pre Cost NextHop Interface
0.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0
1.1.1.0/24 Direct 0 0 1.1.1.1 Vlan1
1.1.1.0/32 Direct 0 0 1.1.1.1 Vlan1
1.1.1.1/32 Direct 0 0 127.0.0.1 InLoop0
1.1.1.255/32 Direct 0 0 1.1.1.1 Vlan1
2.2.2.0/24 Static 60 0 12.2.2.2 Vlan2
80.1.1.0/24 OSPF 10 2 80.1.1.1 Vlan3
...
A route entry includes the following key items:
•
Destination—IP address of the destination host or network.
• Mask—Mask length of the IP address.
• Pre—Preference of the route. Among routes to the same destination, the route with the highest preference is optimal.
1
• Cost—If multiple routes to a destination have the same preference, the one with the smallest cost is the optimal route.
•
NextHop—Next hop.
• Interface—Output interface.
Dynamic routing protocols
Static routes work well in small, stable networks. They are easy to configure and require fewer system resources. However, in networks where topology changes occur frequently, a typical practice is to configure a dynamic routing protocol. Compared with static routing, a dynamic routing protocol is complicated to configure, requires more router resources, and consumes more network resources.
Dynamic routing protocols dynamically collect and report reachability information to adapt to topology changes. They are suitable for large networks.
Route preference
Routing protocols, including static and direct routing, each by default have a preference. If they find multiple routes to the same destination, the router selects the route with the highest preference as the optimal route.
The preference of a direct route is always 0 and cannot be changed. You can configure a preference for each static route and each dynamic routing protocol. The following table lists the route types and default preferences. The smaller the value, the higher the preference.
Table 2 Route types and default route preferences
Route type
Direct route
Preference
0
Multicast static route 1
OSPF 10
Unicast static route
OSPF ASE
OSPF NSSA
60
150
150
IBGP 255
EBGP 255
Unknown (route from an untrusted source) 256
Load sharing
A routing protocol might find multiple optimal equal-cost routes to the same destination. You can use these routes to implement equal-cost multi-path (ECMP) load sharing.
Static routing, IPv6 static routing, OSPF, OSPFv3, BGP, and IPv6 BGP support ECMP load sharing.
2
Route backup
Route backup can improve network availability. Among multiple routes to the same destination, the route with the highest priority is the primary route and others are secondary routes.
The router forwards matching packets through the primary route. When the primary route fails, the route with the highest preference among the secondary routes is selected to forward packets. When the primary route recovers, the router uses it to forward packets.
Route recursion
To use a route that has an indirectly connected next hop, a router must perform route recursion to find the output interface to reach the next hop.
The RIB records and saves route recursion information, including brief information about related routes, recursive paths, and recursion depth.
Route redistribution
Route redistribution enables routing protocols to learn routing information from each other. A dynamic routing protocol can redistribute routes from other routing protocols, including direct and static routing.
For more information, see the respective chapters on those routing protocols in this configuration guide.
The RIB records redistribution relationships of routing protocols.
Extension attribute redistribution
Extension attribute redistribution enables routing protocols to learn route extension attributes from each other, including BGP extended community attributes, OSPF area IDs, route types, and router IDs.
The RIB records extended attributes of each routing protocol and redistribution relationships of different routing protocol extended attributes.
Configuring the maximum lifetime for routes and labels in the RIB
Perform this task to prevent routes of a certain protocol from being aged out due to slow protocol convergence resulting from a large number of route entries or long GR period.
The configuration takes effect at the next protocol or RIB process switchover.
To configure the maximum lifetime for routes and labels in the RIB (IPv4):
Step Command
1. Enter system view. system-view
2. Enter RIB view.
3. Create a RIB IPv4 address family and enter RIB IPv4 address family view. rib address-family ipv4
Remarks
N/A
N/A
By default, no RIB IPv4 address family is created.
3
Step Command
4. Configure the maximum lifetime for IPv4 routes and labels in the RIB. protocol protocol lifetime seconds
Remarks
By default, the maximum lifetime for routes and labels in the RIB is 480 seconds.
To configure the maximum route lifetime for routes and labels in the RIB (IPv6):
Step Command
5. Enter system view. system-view
6. Enter RIB view.
7. Create a RIB IPv6 address family and enter RIB IPv6 address family view.
8. Configure the maximum lifetime for IPv6 routes and labels in the RIB. rib address-family ipv6 protocol protocol lifetime seconds
Remarks
N/A
N/A
By default, no RIB IPv6 address family is created.
By default, the maximum lifetime for routes and labels in the RIB is 480 seconds.
Configuring the maximum lifetime for routes in the
FIB
When GR is disabled, FIB entries must be retained for some time after a protocol process switchover or
RIB process switchover. When GR is enabled, FIB entries must be removed immediately after a protocol or RIB process switchover to avoid routing issues. Perform this task to meet such requirements.
To configure the maximum lifetime for routes in the FIB (IPv4):
Step Command
1. Enter system view. system-view
2. Enter RIB view. rib
3. Create a RIB IPv4 address family and enter its view. address-family ipv4
4. Configure the maximum lifetime for IPv4 routes in the
FIB. fib lifetime seconds
To configure the maximum lifetime for routes in the FIB (IPv6):
Step Command
1. Enter system view. system-view
2. Enter RIB view. rib
3. Create a RIB IPv6 address family and enter its view. address-family ipv6
4. Configure the maximum lifetime for IPv6 routes in the
FIB. fib lifetime seconds
Remarks
N/A
N/A
By default, no RIB IPv4 address family is created.
By default, the maximum lifetime for routes in the FIB is
600 seconds.
Remarks
N/A
N/A
By default, no RIB IPv6 address family is created.
By default, the maximum lifetime for routes in the FIB is
600 seconds.
4
Configuring the maximum number of ECMP routes
This configuration takes effect at next reboot. Make sure the reboot does not impact your network.
To configure the maximum number of ECMP routes:
Step Command
1. Enter system view. system-view
2. Configure the maximum number of ECMP routes. max-ecmp-num number
Remarks
N/A
By default, the maximum number of ECMP routes is 8.
Enabling the enhanced ECMP mode
In the default ECMP mode, when one or multiple ECMP routes fail, the device reallocates all traffic to the remaining routes.
The enhanced ECMP mode enables the device to reallocate only the traffic of the failed routes to the remaining routes, ensuring forwarding continuity.
This configuration takes effect at next reboot. Make sure the reboot does not impact your network.
To enable the enhanced ECMP mode:
Step Command
1. Enter system view. system-view
2. Enable the enhanced ECMP mode. ecmp mode enhanced
Remarks
N/A
By default, the enhanced
ECMP mode is disabled.
Enabling support for IPv6 routes with prefixes longer than 64 bits
Do not configure the switch-routing-mode ipv6-128 command and the switch-mode 4 command at the same time.
This configuration takes effect at next reboot. Make sure the reboot does not impact your network.
To enable support for IPv6 routes with prefixes longer than 64 bits:
Step Command
3. Enter system view. system-view
4. Enable support for IPv6 routes with prefixes longer than 64 bits. switch-routing-mode ipv6-128
Remarks
N/A
By default, the device does not support IPv6 routes with prefixes longer than 64 bits.
This command is available only in Release 2407P01 and later.
5
Displaying and maintaining a routing table
Execute display commands in any view and reset commands in user view.
Task Command
Display the ECMP mode.
Display routing table information.
Display information about routes permitted by an IPv4 basic ACL .
Display information about routes to a specific destination address.
Display information about routes to a range of destination addresses.
Display information about routes permitted by an IP prefix list.
Display information about routes installed by a protocol.
Display IPv4 route statistics.
Display the maximum number of ECMP routes.
Display route attribute information in the RIB.
Display RIB GR state information. display ecmp mode display ip routing-table [ vpn-instance vpn-instance-name ]
[ verbose ] display ip routing-table [ vpn-instance vpn-instance-name ] acl
acl-number [ verbose ] display ip routing-table [ vpn-instance vpn-instance-name ]
ip-address [ mask | mask-length ] [ longer-match ] [ verbose ] display ip routing-table [ vpn-instance vpn-instance-name ]
ip-address1 to ip-address2 [ verbose ] display ip routing-table [ vpn-instance vpn-instance-name ] prefix-list
prefix-list-name [ verbose ] display ip routing-table [ vpn-instance vpn-instance-name ] protocol
protocol [ inactive | verbose ] display ip routing-table [ vpn-instance vpn-instance-name ] statistics display max-ecmp-num display rib attribute [ attribute-id ]
Display next hop information in the
RIB. display rib graceful-restart display rib nib [ self-originated ] [ nib-id ] [ verbose ] display rib nib protocol protocol-name [ verbose ]
Display next hop information for direct routes. display route-direct nib [ nib-id ] [ verbose ]
Clear IPv4 route statistics.
Display IPv6 routing table information.
Display information about routes to an
IPv6 destination address.
Display information about routes permitted by an IPv6 basic ACL.
Display information about routes to a range of IPv6 destination addresses.
Display information about routes permitted by an IPv6 prefix list.
Display information about routes installed by an IPv6 protocol. reset ip routing-table statistics protocol [ vpn-instance
vpn-instance-name ] { protocol | all } display ipv6 routing-table [ vpn-instance vpn-instance-name ]
[ verbose ] display ipv6 routing-table [ vpn-instance vpn-instance-name ]
ipv6-address [ prefix-length ] [ longer-match ] [ verbose ] display ipv6 routing-table [ vpn-instance vpn-instance-name ] acl
acl6-number [ verbose ] display ipv6 routing-table [ vpn-instance vpn-instance-name ]
ipv6-address1 to ipv6-address2 [ verbose ] display ipv6 routing-table [ vpn-instance vpn-instance-name ] prefix-list prefix-list-name [ verbose ] display ipv6 routing-table [ vpn-instance vpn-instance-name ] protocol protocol [ inactive | verbose ]
6
Task Command
Display IPv6 route statistics. display ipv6 routing-table [ vpn-instance vpn-instance-name ] statistics
Display route attribute information in the IPv6 RIB. display ipv6 rib attribute [ attribute-id ]
Display IPv6 RIB GR state information. display ipv6 rib graceful-restart
Display next hop information in the
IPv6 RIB. display ipv6 rib nib [ self-originated ] [ nib-id ] [ verbose ] display ipv6 rib nib protocol protocol-name [ verbose ]
Display next hop information for IPv6 direct routes. display ipv6 route-direct nib [ nib-id ] [ verbose ]
Clear IPv6 route statistics. reset ipv6 routing-table statistics protocol [ vpn-instance
vpn-instance-name ] { protocol | all }
7
Configuring static routing
Static routes are manually configured. If a network's topology is simple, you only need to configure static routes for the network to work correctly.
Static routes cannot adapt to network topology changes. If a fault or a topological change occurs in the network, the network administrator must modify the static routes manually.
Configuring a static route
Before you configure a static route, complete the following tasks:
•
Configure the physical parameters for related interfaces.
• Configure the link-layer attributes for related interfaces.
•
Configure the IP addresses for related interfaces.
To configure a static route:
Step Command
1. Enter system view. system-view
2. Configure a static route.
•
Method 1: ip route-static dest-address { mask-length |
mask } { interface-type interface-number
[ next-hop-address ] | next-hop-address | vpn-instance d-vpn-instance-name
next-hop-address } [ permanent ] [ preference
preference-value ] [ tag tag-value ] [ description
description-text ]
•
Method 2: ip route-static vpn-instance
s-vpn-instance-name dest-address { mask-length
| mask } { interface-type interface-number
[ next-hop-address ] | next-hop-address
[ public ] | vpn-instance d-vpn-instance-name
next-hop-address } [ permanent ] [ preference
preference-value ] [ tag tag-value ] [ description
description-text ]
3. (Optional.)
Configure the default preference for static routes.
4. (Optional.) Delete all static routes, including the default route. ip route-static default-preference
default-preference-value delete [ vpn-instance vpn-instance-name ] static-routes all
Remarks
N/A
Use either method.
By default, no static route is configured.
The default setting is 60.
To delete one static route, use the undo ip route-static command.
8
Configuring BFD for static routes
IMPORTANT:
Enabling BFD for a flapping route could worsen the situation.
BFD provides a general-purpose, standard, medium-, and protocol-independent fast failure detection mechanism. It can uniformly and quickly detect the failures of the bidirectional forwarding paths between two routers for protocols, such as routing protocols.
For more information about BFD, see High Availability Configuration Guide.
Bidirectional control mode
To use BFD bidirectional control detection between two devices, enable BFD control mode for each device's static route destined to the peer.
To configure a static route and enable BFD control mode for it, specify an output interface and a direct next hop, or specify an indirect next hop and a specific BFD packet source address for the static route.
To configure BFD control mode for a static route (direct next hop):
Step Command
1. Enter system view. system-view
2. Configure BFD control mode for a static route.
•
Method 1: ip route-static dest-address { mask-length | mask }
interface-type interface-number next-hop-address bfd control-packet [ preference preference-value ]
[ tag tag-value ] [ description description-text ]
•
Method 2: ip route-static vpn-instance s-vpn-instance-name
dest-address { mask-length | mask } interface-type
interface-number next-hop-address bfd control-packet [ preference preference-value ] [ tag
tag-value ] [ description description-text ]
To configure BFD control mode for a static route (indirect next hop):
Step Command
1. Enter system view. system-view
Remarks
N/A
Use either method.
By default, BFD control mode for a static route is not configured.
Remarks
N/A
9
Step Command
2. Configure BFD control mode for a static route.
•
Method 1: ip route-static dest-address { mask-length | mask }
{ next-hop-address bfd control-packet bfd-source
ip-address | vpn-instance d-vpn-instance-name
next-hop-address bfd control-packet bfd-source
ip-address } [ preference preference-value ] [ tag tag-value ] [ description description-text ]
•
Method 2: ip route-static vpn-instance s-vpn-instance-name
dest-address { mask-length | mask }
{ next-hop-address bfd control-packet bfd-source
ip-address | vpn-instance d-vpn-instance-name
next-hop-address bfd control-packet bfd-source
ip-address } [ preference preference-value ] [ tag
tag-value ] [ description description-text ]
Remarks
Use either method.
By default, BFD control mode for a static route is not configured.
Single-hop echo mode
With BFD echo mode enabled for a static route, the output interface sends BFD echo packets to the destination device, which loops the packets back to test the link reachability.
IMPORTANT:
Do not use BFD for a static route with the output interface in spoofing state.
To configure BFD echo mode for a static route:
Step Command
1. Enter system view.
2. Configure the source address of echo packets.
3. Configure BFD echo mode for a static route. system-view bfd echo-source-ip ip-address
Remarks
N/A
By default, the source address of echo packets is not configured.
For more information about this command, see High
Availability Command
Reference.
•
Method 1: ip route-static dest-address { mask-length |
mask } interface-type interface-number
next-hop-address bfd echo-packet [ preference
preference-value ] [ tag tag-value ] [ description
description-text ]
•
Method 2: ip route-static vpn-instance
s-vpn-instance-name dest-address { mask-length
| mask } interface-type interface-number
next-hop-address bfd echo-packet [ preference
preference-value ] [ tag tag-value ] [ description
description-text ]
Use either method.
By default, BFD echo mode for a static route is not configured.
10
Displaying and maintaining static routes
Execute display commands in any view.
Task Command
Display static route information. display ip routing-table protocol static [ inactive | verbose ]
Display static route next hop information. display route-static nib [ nib-id ] [ verbose ]
Display static routing table information. display route-static routing-table [ vpn-instance vpn-instance-name ]
[ ip-address { mask-length | mask } ]
Static route configuration examples
Basic static route configuration example
Network requirements
Configure static routes on the switches in Figure 1
for interconnections between any two hosts.
Figure 1 Network diagram
Configuration procedure
1. Configure IP addresses for interfaces. (Details not shown.)
2. 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.2.0 255.255.255.0 1.1.4.1
[SwitchB] ip route-static 1.1.3.0 255.255.255.0 1.1.5.6
# Configure a default route on Switch C.
<SwitchC> system-view
11
[SwitchC] ip route-static 0.0.0.0 0.0.0.0 1.1.5.5
3. Configure the default gateways of Host A, Host B, and Host C as 1.1.2.3, 1.1.6.1, and 1.1.3.1.
(Details not shown.)
Verifying the configuration
# Display static routes on Switch A.
[SwitchA] display ip routing-table protocol static
Summary Count : 1
Static Routing table Status : <Active>
Summary Count : 1
Destination/Mask Proto Pre Cost NextHop Interface
0.0.0.0/0 Static 60 0 1.1.4.2 Vlan500
Static Routing table Status : <Inactive>
Summary Count : 0
# Display static routes on Switch B.
[SwitchB] display ip routing-table protocol static
Summary Count : 2
Static Routing table Status : <Active>
Summary Count : 2
Destination/Mask Proto Pre Cost NextHop Interface
1.1.2.0/24 Static 60 0 1.1.4.1 Vlan500
Static Routing table Status : <Inactive>
Summary Count : 0
# Use the ping command on Host B to test the reachability of Host A (Windows XP runs on the two hosts).
C:\Documents and Settings\Administrator>ping 1.1.2.2
Pinging 1.1.2.2 with 32 bytes of data:
Reply from 1.1.2.2: bytes=32 time=1ms TTL=126
Reply from 1.1.2.2: bytes=32 time=1ms TTL=126
Reply from 1.1.2.2: bytes=32 time=1ms TTL=126
Reply from 1.1.2.2: bytes=32 time=1ms TTL=126
Ping statistics for 1.1.2.2:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 1ms, Maximum = 1ms, Average = 1ms
# Use the tracert command on Host B to test the reachability of Host A.
C:\Documents and Settings\Administrator>tracert 1.1.2.2
12
Tracing route to 1.1.2.2 over a maximum of 30 hops
1 <1 ms <1 ms <1 ms 1.1.6.1
2 <1 ms <1 ms <1 ms 1.1.4.1
3 1 ms <1 ms <1 ms 1.1.2.2
Trace complete.
BFD for static routes configuration example (direct next hop)
Network requirements
, configure a static route to subnet 120.1.1.0/24 on Switch A, and configure a static route to subnet 121.1.1.0/24 on Switch B. Enable BFD for both routes. Configure a static route to subnet
120.1.1.0/24 and a static route to subnet 121.1.1.0/24 on Switch C. When the link between Switch A and
Switch B through the Layer 2 switch fails, BFD can detect the failure immediately and inform Switch A and
Switch B to communicate through Switch C.
Figure 2 Network diagram
Switch A
Switch C
Vlan-int10
Vlan-int11
12.1.1.1/24
10.1.1.100/24
Device
Switch B
Interface
Vlan-int10
IP address
12.1.1.2/24
Vlan-int13 13.1.1.1/24
Configuration procedure
1. Configure IP addresses for the interfaces. (Details not shown.)
2. Configure static routes and BFD:
# Configure static routes on Switch A and enable BFD control mode for the static route that traverses the Layer 2 switch.
<SwitchA> system-view
[SwitchA] interface vlan-interface 10
[SwitchA-vlan-interface10] bfd min-transmit-interval 500
[SwitchA-vlan-interface10] bfd min-receive-interval 500
[SwitchA-vlan-interface10] bfd detect-multiplier 9
[SwitchA-vlan-interface10] quit
[SwitchA] ip route-static 120.1.1.0 24 vlan-interface 10 12.1.1.2 bfd control-packet
[SwitchA] ip route-static 120.1.1.0 24 vlan-interface 11 10.1.1.100 preference 65
[SwitchA] quit
13
# Configure static routes on Switch B and enable BFD control mode for the static route that traverses the Layer 2 switch.
<SwitchB> system-view
[SwitchB] interface vlan-interface 10
[SwitchB-vlan-interface10] bfd min-transmit-interval 500
[SwitchB-vlan-interface10] bfd min-receive-interval 500
[SwitchB-vlan-interface10] bfd detect-multiplier 9
[SwitchB-vlan-interface10] quit
[SwitchB] ip route-static 121.1.1.0 24 vlan-interface 10 12.1.1.1 bfd control-packet
[SwitchB] ip route-static 121.1.1.0 24 vlan-interface 13 13.1.1.2 preference 65
[SwitchB] quit
# Configure static routes on Switch C.
<SwitchC> system-view
[SwitchC] ip route-static 120.1.1.0 24 13.1.1.1
[SwitchC] ip route-static 121.1.1.0 24 10.1.1.102
Verifying the configuration
# Display BFD sessions on Switch A.
<SwitchA> display bfd session
Total Session Num: 1 Up Session Num: 1 Init Mode: Active
IPv4 Session Working Under Ctrl Mode:
LD/RD SourceAddr DestAddr State Holdtime Interface
4/7 12.1.1.1 12.1.1.2 Up 2000ms Vlan10
The output shows that the BFD session has been created.
# Display the static routes on Switch A.
<SwitchA> display ip routing-table protocol static
Summary Count : 1
Static Routing table Status : <Active>
Summary Count : 1
Destination/Mask Proto Pre Cost NextHop Interface
120.1.1.0/24 Static 60 0 12.1.1.2 Vlan10
Static Routing table Status : <Inactive>
Summary Count : 0
The output shows that Switch A communicates with Switch B through VLAN-interface 10. Then the link over VLAN-interface 10 fails.
# Display static routes on Switch A.
<SwitchA> display ip routing-table protocol static
Summary Count : 1
14
Static Routing table Status : <Active>
Summary Count : 1
Destination/Mask Proto Pre Cost NextHop Interface
120.1.1.0/24 Static 65 0 10.1.1.100 Vlan11
Static Routing table Status : <Inactive>
Summary Count : 0
The output shows that Switch A communicates with Switch B through VLAN-interface 11.
BFD for static routes configuration example (indirect next hop)
Network requirements
In
, Switch A has a route to interface Loopback 1 (2.2.2.9/32) on Switch B, with the output interface VLAN-interface 10. Switch B has a route to interface Loopback 1 (1.1.1.9/32) on Switch A, with the output interface VLAN-interface 12. Switch D has a route to 1.1.1.9/32, with the output interface
VLAN-interface 10, and a route to 2.2.2.9/32, with the output interface VLAN-interface 12.
Configure a static route to subnet 120.1.1.0/24 on Switch A, and configure a static route to subnet
121.1.1.0/24 on Switch B. Enable BFD for both routes. Configure a static route to subnet 120.1.1.0/24 and a static route to subnet 121.1.1.0/24 on both Switch C and Switch D. When the link between Switch A and
Switch B through Switch D fails, BFD can detect the failure immediately and inform Switch A and Switch
B to communicate through Switch C.
Figure 3 Network diagram
Device
Switch A
Interface
Vlan-int10
IP address
12.1.1.1/24
Device
Switch B
Interface IP address
Vlan-int12 11.1.1.1/24
Vlan-int13 13.1.1.1/24
Switch C Vlan-int11 10.1.1.100/24 Switch D Vlan-int10 12.1.1.2/24
Vlan-int12 11.1.1.2/24
Configuration procedure
1. Configure IP addresses for interfaces. (Details not shown.)
2. Configure static routes and BFD:
# Configure static routes on Switch A and enable BFD control mode for the static route that traverses Switch D.
<SwitchA> system-view
15
[SwitchA] bfd multi-hop min-transmit-interval 500
[SwitchA] bfd multi-hop min-receive-interval 500
[SwitchA] bfd multi-hop detect-multiplier 9
[SwitchA] ip route-static 120.1.1.0 24 2.2.2.9 bfd control-packet bfd-source 1.1.1.9
[SwitchA] ip route-static 120.1.1.0 24 vlan-interface 11 10.1.1.100 preference 65
[SwitchA] quit
# Configure static routes on Switch B and enable BFD control mode for the static route that traverses Switch D.
<SwitchB> system-view
[SwitchB] bfd multi-hop min-transmit-interval 500
[SwitchB] bfd multi-hop min-receive-interval 500
[SwitchB] bfd multi-hop detect-multiplier 9
[SwitchB] ip route-static 121.1.1.0 24 1.1.1.9 bfd control-packet bfd-source 2.2.2.9
[SwitchB] ip route-static 121.1.1.0 24 vlan-interface 13 13.1.1.2 preference 65
[SwitchB] quit
# Configure static routes on Switch C.
<SwitchC> system-view
[SwitchC] ip route-static 120.1.1.0 24 13.1.1.1
[SwitchC] ip route-static 121.1.1.0 24 10.1.1.102
# Configure static routes on Switch D.
<SwitchD> system-view
[SwitchD] ip route-static 120.1.1.0 24 11.1.1.1
[SwitchD] ip route-static 121.1.1.0 24 12.1.1.1
Verifying the configuration
# Display BFD sessions on Switch A.
<SwitchA> display bfd session
Total Session Num: 1 Up Session Num: 1 Init Mode: Active
IPv4 Session Working Under Ctrl Mode:
LD/RD SourceAddr DestAddr State Holdtime Interface
4/7 1.1.1.9 2.2.2.9 Up 2000ms N/A
The output shows that the BFD session has been created.
# Display the static routes on Switch A.
<SwitchA> display ip routing-table protocol static
Summary Count : 1
Static Routing table Status : <Active>
Summary Count : 1
Destination/Mask Proto Pre Cost NextHop Interface
120.1.1.0/24 Static 60 0 12.1.1.2 Vlan10
Static Routing table Status : <Inactive>
16
Summary Count : 0
The output shows that Switch A communicates with Switch B through VLAN-interface 10. Then the link over VLAN-interface 10 fails.
# Display static routes on Switch A.
<SwitchA> display ip routing-table protocol static
Summary Count : 1
Static Routing table Status : <Active>
Summary Count : 1
Destination/Mask Proto Pre Cost NextHop Interface
120.1.1.0/24 Static 65 0 10.1.1.100 Vlan11
Static Routing table Status : <Inactive>
Summary Count : 0
The output shows that Switch A communicates with Switch B through VLAN-interface 11.
17
Configuring a default route
A default route is used to forward packets that do not match any specific routing entry in the routing table.
Without a default route, packets that do not match any routing entries are discarded.
A default route can be configured in either of the following ways:
•
The network administrator can configure a default route with both destination and mask being
0.0.0.0. For more information, see "
• Some dynamic routing protocols, such as OSPF, can generate a default route. For example, an upstream router running OSPF can generate a default route and advertise it to other routers, which install the default route with the next hop being the upstream router. For more information, see the respective chapters on these routing protocols in this configuration guide.
18
Configuring OSPF
Open Shortest Path First (OSPF) is a link-state IGP developed by the OSPF working group of the IETF.
OSPF version 2 is used for IPv4. OSPF refers to OSPFv2 throughout this chapter.
Overview
OSPF has the following features:
• Wide scope—Supports various network sizes and up to several hundred routers in an OSPF routing domain.
•
Fast convergence—Advertises routing updates instantly upon network topology changes.
• Loop free—Computes routes with the SPF algorithm to avoid routing loops.
• Area-based network partition—Splits an AS into multiple areas to facilitate management. This feature reduces the LSDB size on routers to save memory and CPU resources, and reduces route updates transmitted between areas to save bandwidth.
• ECMP routing—Supports multiple equal-cost routes to a destination.
•
Routing hierarchy—Supports a 4-level routing hierarchy that prioritizes routes into intra-area, inter-area, external Type-1, and external Type-2 routes.
• Authentication—Supports area- and interface-based packet authentication to ensure secure packet exchange.
•
Support for multicasting—Multicasts protocol packets on some types of links to avoid impacting other devices.
OSPF packets
OSPF messages are carried directly over IP. The protocol number is 89.
OSPF uses the following packet types:
• Hello—Periodically sent to find and maintain neighbors, containing timer values, information about the DR, BDR, and known neighbors.
•
Database description (DD)—Describes the digest of each LSA in the LSDB, exchanged between two routers for data synchronization.
• Link state request (LSR)—Requests needed LSAs from a neighbor. After exchanging the DD packets, the two routers know which LSAs of the neighbor are missing from their LSDBs. They then exchange
LSR packets requesting the missing LSAs. LSR packets contain the digest of the missing LSAs.
• Link state update (LSU)—Transmits the requested LSAs to the neighbor.
• Link state acknowledgment (LSAck)—Acknowledges received LSU packets. It contains the headers of received LSAs (an LSAck packet can acknowledge multiple LSAs).
LSA types
OSPF advertises routing information in Link State Advertisements (LSAs). The following LSAs are commonly used:
19
• Router LSA—Type-1 LSA, originated by all routers and flooded throughout a single area only. This
LSA describes the collected states of the router's interfaces to an area.
•
Network LSA—Type-2 LSA, originated for broadcast and NBMA networks by the designated router, and flooded throughout a single area only. This LSA contains the list of routers connected to the network.
•
Network Summary LSA—Type-3 LSA, originated by Area Border Routers (ABRs), and flooded throughout the LSA's associated area. Each summary-LSA describes a route to a destination outside the area, yet still inside the AS (an inter-area route).
•
ASBR Summary LSA—Type-4 LSA, originated by ABRs and flooded throughout the LSA's associated area. Type 4 summary-LSAs describe routes to Autonomous System Boundary Router
(ASBR).
• AS External LSA—Type-5 LSA, originated by ASBRs, and flooded throughout the AS (except stub and NSSA areas). Each AS-external-LSA describes a route to another AS.
•
NSSA LSA—Type-7 LSA, as defined in RFC 1587, originated by ASBRs in NSSAs and flooded throughout a single NSSA. NSSA LSAs describe routes to other ASs.
• Opaque LSA—A proposed type of LSA. Its format consists of a standard LSA header and application specific information. Opaque LSAs are used by the OSPF protocol or by some applications to distribute information into the OSPF routing domain. The opaque LSA includes Type
9, Type 10, and Type 11. The Type 9 opaque LSA is flooded into the local subnet, the Type 10 is flooded into the local area, and the Type 11 is flooded throughout the AS.
OSPF areas
In large OSPF routing domains, SPF route computations consume too many storage and CPU resources, and enormous OSPF packets generated for route synchronization occupy excessive bandwidth.
To resolve these issues, OSPF splits an AS into multiple areas. Each area is identified by an area ID. The boundaries between areas are routers rather than links. A network segment (or a link) can only reside in one area as shown in
.
You can configure route summarization on ABRs to reduce the number of LSAs advertised to other areas and minimize the effect of topology changes.
20
Figure 4 Area-based OSPF network partition
Area 4
Area 1
Area 0
Area 2
Area 3
Backbone area and virtual links
Each AS has a backbone area that distributes routing information between non-backbone areas. Routing information between non-backbone areas must be forwarded by the backbone area. OSPF has the following requirements:
•
All non-backbone areas must maintain connectivity to the backbone area.
• The backbone area must maintain connectivity within itself.
In practice, these requirements might not be met due to lack of physical links. OSPF virtual links can solve this issue.
A virtual link is established between two ABRs through a non-backbone area. It must be configured on both ABRs to take effect. The non-backbone area is called a transit area.
, Area 2 has no direct physical link to the backbone Area 0. You can configure a virtual link between the two ABRs to connect Area 2 to the backbone area.
Figure 5 Virtual link application 1
Virtual links can also be used to provide redundant links. If the backbone area cannot maintain internal connectivity because of the failure of a physical link, you can configure a virtual link to replace the failed physical link, as shown in
.
21
Figure 6 Virtual link application 2
Area 1
Virtual link
R1
R2
Area 0
The virtual link between the two ABRs acts as a point-to-point connection. You can configure interface parameters, such as hello interval, on the virtual link as they are configured on a physical interface.
The two ABRs on the virtual link unicast OSPF packets to each other, and the OSPF routers in between convey these OSPF packets as normal IP packets.
Stub area and totally stub area
A stub area does not distribute Type-5 LSAs to reduce the routing table size and LSAs advertised within the area. The ABR of the stub area advertises a default route in a Type-3 LSA so that the routers in the area can reach external networks through the default route.
To further reduce the routing table size and advertised LSAs, you can configure the stub area as a totally stub area. The ABR of a totally stub area does not advertise inter-area routes or external routes. It advertises a default route in a Type-3 LSA so that the routers in the area can reach external networks through the default route.
NSSA area and totally NSSA area
An NSSA area does not import AS external LSAs (Type-5 LSAs) but can import Type-7 LSAs generated by the NSSA ASBR. The NSSA ABR translates Type-7 LSAs into Type-5 LSAs and advertises the Type-5 LSAs to other areas.
NSSA area where the ASBR redistributes RIP routes in Type-7 LSAs into Area 1. Upon receiving the Type-7
LSAs, the NSSA ABR translates them to Type-5 LSAs, and advertises the Type-5 LSAs to Area 0.
The ASBR of Area 2 redistributes RIP routes in Type-5 LSAs into the OSPF routing domain. However, Area
1 does not receive Type-5 LSAs because it is an NSSA area.
Figure 7 NSSA area
Router types
OSPF routers are classified into the following types based on their positions in the AS:
22
• Internal router—All interfaces on an internal router belong to one OSPF area.
•
ABR—Belongs to more than two areas, one of which must be the backbone area. ABR connects the backbone area to a non-backbone area. An ABR and the backbone area can be connected through a physical or logical link.
• Backbone router—At least one interface of a backbone router must reside in the backbone area.
All ABRs and internal routers in Area 0 are backbone routers.
•
ASBR—Exchanges routing information with another AS is an ASBR. An ASBR might not reside on the border of the AS. It can be an internal router or an ABR.
Figure 8 OSPF router types
RIP
IS-IS
ASBR
Area 1
Area 4
Backbone router
Internal router
Area 0
ABR
Area 2
Area 3
Route types
OSPF prioritizes routes into the following route levels:
•
Intra-area route
•
Inter-area route
• Type-1 external route
• Type-2 external route
The intra-area and inter-area routes describe the network topology of the AS. The external routes describe routes to external ASs.
A Type-1 external route has high credibility. The cost from a router to the destination of a Type-1 external route = the cost from the router to the corresponding ASBR + the cost from the ASBR to the destination of the external route.
A Type-2 external route has low credibility. OSPF considers the cost from the ASBR to the destination of a Type-2 external route is much greater than the cost from the ASBR to an OSPF internal router. The cost from the internal router to the destination of the Type-2 external route = the cost from the ASBR to the
23
destination of the Type-2 external route. If two Type-2 routes to the same destination have the same cost,
OSPF takes the cost from the router to the ASBR into consideration to determine the best route.
Route calculation
OSPF computes routes in an area as follows:
•
Each router generates LSAs based on the network topology around itself, and sends them to other routers in update packets.
• Each OSPF router collects LSAs from other routers to compose an LSDB. An LSA describes the network topology around a router, and the LSDB describes the entire network topology of the area.
•
Each router transforms the LSDB to a weighted directed graph that shows the topology of the area.
All the routers within the area have the same graph.
• Each router uses the SPF algorithm to compute a shortest path tree that shows the routes to the nodes in the area. The router itself is the root of the tree.
OSPF network types
OSPF classifies networks into the following types, depending on different link layer protocols:
•
Broadcast—If the link layer protocol is Ethernet or FDDI, OSPF considers the network type as broadcast by default. On a broadcast network, hello, LSU, and LSAck packets are multicast to
224.0.0.5 that identifies all OSPF routers or to 224.0.0.6 that identifies the DR; DD packets and LSR packets are unicast.
•
NBMA—If the link layer protocol is Frame Relay, ATM, or X.25, OSPF considers the network type as NBMA by default. OSPF packets are unicast on a NBMA network.
• P2MP—No link is P2MP type by default. P2MP must be a conversion from other network types such as NBMA. On a P2MP network, OSPF packets are multicast to 224.0.0.5.
•
P2P—If the link layer protocol is PPP or HDLC, OSPF considers the network type as P2P. On a P2P network, OSPF packets are multicast to 224.0.0.5.
The following are the differences between NBMA and P2MP networks:
•
NBMA networks are fully meshed. P2MP networks are not required to be fully meshed.
•
NBMA networks require DR and BDR election. P2MP networks do not have DR or BDR.
•
On a NBMA network, OSPF packets are unicast, and neighbors are manually configured. On a
P2MP network, OSPF packets are multicast by default, and you can configure OSPF to unicast protocol packets.
DR and BDR
On a broadcast or NBMA network, any two routers must establish an adjacency to exchange routing information with each other. If n routers are present on the network, n(n-1)/2 adjacencies are established.
Any topology change on the network results in an increase in traffic for route synchronization, consuming many system and bandwidth resources.
The DR and BDR mechanisms can solve this problem.
•
DR—Elected to advertise routing information among other routers. If the DR fails, routers on the network must elect another DR and synchronize information with the new DR. Using this mechanism alone is time-consuming and prone to route calculation errors.
24
• BDR—Elected along with the DR to establish adjacencies with all other routers. If the DR fails, the
BDR immediately becomes the new DR, and other routers elect a new BDR.
Routers other than the DR and BDR are called "DROthers." They do not establish adjacencies with one another, so the number of adjacencies is reduced.
The role of a router is subnet (or interface) specific. It might be a DR on one interface and a BDR or
DROther on another interface.
the DR and BDR, only seven adjacencies are established.
Figure 9 DR and BDR in a network
DR BDR
DR other DR other DR other
Physical links Adjacencies
NOTE:
In OSPF, "neighbor" and "adjacency" are different concepts. After startup, OSPF sends a hello packet on each OSPF interface. A receiving router checks parameters in the packet. If the parameters match its own, the receiving router considers the sending router an OSPF neighbor. Two OSPF neighbors establish an adjacency relationship after they synchronize their LSDBs through exchange of DD packets and LSAs.
DR and BDR election
DR election is performed on broadcast or NBMA networks but not on P2P and P2MP networks.
Routers in a broadcast or NBMA network elect the DR and BDR by router priority and ID. Routers with a router priority value higher than 0 are candidates for DR and BDR election.
The election votes are hello packets. Each router sends the DR elected by itself in a hello packet to all the other routers. If two routers on the network declare themselves as the DR, the router with the higher router priority wins. If router priorities are the same, the router with the higher router ID wins.
If a router with a higher router priority is added to the network after DR and BDR election, the router cannot become the DR or BDR immediately as no DR election is performed for it. Therefore, the DR of a network might not be the router with the highest priority, and the BDR might not be the router with the second highest priority.
Protocols and standards
•
RFC 1765, OSPF Database Overflow
• RFC 2328, OSPF Version 2
•
RFC 3101, OSPF Not-So-Stubby Area (NSSA) Option
25
• RFC 3137, OSPF Stub Router Advertisement
•
RFC 4811, OSPF Out-of-Band LSDB Resynchronization
•
RFC 4812, OSPF Restart Signaling
• RFC 4813, OSPF Link-Local Signaling
OSPF configuration task list
To run OSPF, you must first enable OSPF on the router. Make a proper configuration plan to avoid incorrect settings that can result in route blocking and routing loops.
To configure OSPF, perform the following tasks:
Tasks at a glance
(Optional.) Configuring OSPF areas :
•
•
•
(Optional.) Configuring OSPF network types :
•
Configuring the broadcast network type for an interface
•
Configuring the NBMA network type for an interface
•
Configuring the P2MP network type for an interface
•
Configuring the P2P network type for an interface
(Optional.) Configuring OSPF route control
:
•
Configuring OSPF route summarization
{
Configuring route summarization on an ABR
{
Configuring route summarization when redistributing routes into OSPF on an ASBR
•
Configuring received OSPF route filtering
•
Configuring Type-3 LSA filtering
•
Configuring an OSPF cost for an interface
•
Configuring the maximum number of ECMP routes
•
•
Configuring OSPF route redistribution
{
Configuring OSPF to redistribute routes from another routing protocol
{
Configuring OSPF to redistribute a default route
{
Configuring default parameters for redistributed routes
•
26
Tasks at a glance
(Optional.) Tuning and optimizing OSPF networks :
•
•
Specifying LSA transmission delay
•
Specifying SPF calculation interval
•
Specifying the LSA arrival interval
•
Specifying the LSA generation interval
•
Disabling interfaces from receiving and sending OSPF packets
•
•
Configuring OSPF authentication
•
Adding the interface MTU into DD packets
•
Configuring a DSCP value for OSPF packets
•
Configuring the maximum number of external LSAs in LSDB
•
Configuring OSPF exit overflow interval
•
Enabling compatibility with RFC 1583
•
Logging neighbor state changes
•
Configuring OSPF network management
•
Configuring the LSU transmit rate
•
•
Configuring prefix suppression
•
Configuring prefix prioritization
•
(Optional.) Configuring OSPF GR
•
Configuring the OSPF GR restarter
•
•
(Optional.) Configuring BFD for OSPF
Enabling OSPF
Enable OSPF before you perform other OSPF configuration tasks.
Configuration prerequisites
Configure the link layer protocol and IP addresses for interfaces to ensure IP connectivity between neighboring nodes.
Configuration guidelines
To enable OSPF on an interface, you can enable OSPF on the network where the interface resides or directly enable OSPF on that interface. If you configure both, the latter takes precedence.
You can specify a global router ID, or specify a router ID when you create an OSPF process:
•
If you specify a router ID when you create an OSPF process, any two routers in an AS must have different router IDs. A common practice is to specify the IP address of an interface as the router ID.
27
• If you specify no router ID when you create the OSPF process, the global router ID is used. HP recommends specifying a router ID when you create the OSPF process.
OSPF supports multiple processes and VPNs:
• To run multiple OSPF processes, you must specify an ID for each process. The process IDs take effect locally and has no influence on packet exchange between routers. Two routers with different process IDs can exchange packets.
•
You can configure an OSPF process to run in a specified VPN instance. For more information about
VPN, see MCE Configuration Guide.
Enabling OSPF on a network
Step Command
1. Enter system view. system-view
2. (Optional.) Configure a global router ID.
3. Enable an OSPF process and enter OSPF view.
4. (Optional.) Configure a description for the OSPF process. router id router-id
Remarks
N/A
By default, no global router ID is configured.
If no global router ID is configured, the highest loopback interface IP address, if any, is used as the router ID. If no loopback interface IP address is available, the highest physical interface IP address is used, regardless of the interface status (up or down). ospf [ process-id | router-id
router-id | vpn-instance
vpn-instance-name ] *
By default, OSPF is disabled. description description
By default, no description is configured for the OSPF process.
HP recommends configuring a description for each OSPF process.
5. Create an OSPF area and enter OSPF area view. area area-id By default, no OSPF area is created.
6. (Optional.) Configure a description for the area. description description
By default, no description is configured for the area.
HP recommends configuring a description for each OSPF area.
7. Specify a network to enable the interface attached to the network to run the OSPF process in the area. network ip-address
wildcard-mask
By default, no network is specified.
A network can be added to only one area.
Enabling OSPF on an interface
Step Command
1. Enter system view. system-view
2. Enter interface view. interface interface-type
interface-number
Remarks
N/A
N/A
28
Step Command
3. Enable an OSPF process on the interface. ospf process-id area area-id
[ exclude-subip ]
Remarks
By default, OSPF is disabled on an interface.
If the specified OSPF process and area do not exist, the command creates the OSPF process and area. Disabling an OSPF process on an interface does not delete the
OSPF process or the area.
Configuring OSPF areas
Before you configure an OSPF area, complete the following tasks:
•
Configure IP addresses for interfaces to ensure IP connectivity between neighboring nodes.
• Enable OSPF.
Configuring a stub area
You can configure a non-backbone area at an AS edge as a stub area. To do so, issue the stub command on all routers attached to the area. The routing table size is reduced because Type-5 LSAs will not be flooded within the stub area. The ABR generates a default route into the stub area so all packets destined outside of the AS are sent through the default route.
To further reduce the routing table size and routing information exchanged in the stub area, configure a totally stub area by using the stub [ no-summary ] command on the ABR. AS external routes and inter-area routes will not be distributed into the area. All the packets destined outside of the AS or area will be sent to the ABR for forwarding.
A stub or totally stub area cannot have an ASBR because external routes cannot be distributed into the area.
To configure an OSPF stub area:
Step Command
1. Enter system view. system-view
2. Enter OSPF view.
3. Enter area view.
4. Configure the area as a stub area. ospf [ process-id | router-id
router-id | vpn-instance
vpn-instance-name ] * area area-id stub
[ default-route-advertise-always
| no-summary ] *
Remarks
N/A
N/A
N/A
By default, no stub area is configured.
5. (Optional.) Specify a cost for the default route advertised to the stub area. default-cost cost
The default setting is 1.
The default-cost cost command takes effect only on the ABR of a stub area or totally stub area.
29
Configuring an NSSA area
A stub area cannot import external routes, but an NSSA area can import external routes into the OSPF routing domain while retaining other stub area characteristics.
Do not configure the backbone area as an NSSA area or totally NSSA area.
To configure an NSSA area, configure the nssa command on all the routers attached to the area.
To configure a totally NSSA area, configure the nssa command on all the routers attached to the area and configure the nssa no-summary command on the ABR. The ABR of a totally NSSA area does not advertise inter-area routes into the area.
To configure an NSSA area:
Remarks
N/A
Step Command
1. Enter system view. system-view
2. Enter OSPF view.
3. Enter area view.
4. Configure the area as an
NSSA area. ospf [ process-id | router-id
router-id | vpn-instance
vpn-instance-name ] * area area-id nssa [ default-route-advertise
[ cost cost | nssa-only | route-policy route-policy-name | type type ] * | no-import-route | no-summary | suppress-fa |
[ translate-always | translate-never ] | translator-stability-interval value ]
*
N/A
N/A
By default, no area is configured as an NSSA area.
5. (Optional.) Specify a cost for the default route advertised to the NSSA area. default-cost cost
The default setting is 1.
This command takes effect only on the ABR/ASBR of an NSSA or totally
NSSA area.
Configuring a virtual link
Virtual links are configured for connecting backbone area routers that have no direct physical links.
To configure a virtual link:
Step Command
1. Enter system view. system-view
2. Enter OSPF view.
3. Enter area view. ospf [ process-id | router-id
router-id | vpn-instance
vpn-instance-name ] * area area-id
Remarks
N/A
N/A
N/A
30
Step Command
4. Configure a virtual link. vlink-peer router-id [ dead seconds
| hello seconds | { { hmac-md5 | md5 } key-id { cipher cipher-string
| plain plain-string } | simple
{ cipher cipher-string | plain
plain-string } } | retransmit
seconds | trans-delay seconds ] *
Remarks
By default, no virtual link is configured.
Configure this command on both ends of a virtual link, and the hello and dead intervals must be identical on both ends of the virtual link.
Configuring OSPF network types
OSPF classifies networks into the following types based on the link layer protocol:
•
Broadcast—When the link layer protocol is Ethernet or FDDI, OSPF classifies the network type as broadcast by default.
•
NBMA—When the link layer protocol is Frame Relay, ATM, or X.25, OSPF classifies the network type as NBMA by default.
• P2P—When the link layer protocol is PPP, LAPB, or HDLC, OSPF classifies the network type as P2P by default.
When you change the network type of an interface, follow these guidelines:
•
When an NBMA network becomes fully meshed, change the network type to broadcast to avoid manual configuration of neighbors.
• If any routers in a broadcast network do not support multicasting, change the network type to
NBMA.
•
An NBMA network must be fully meshed. OSPF requires that an NBMA network be fully meshed.
If a network is partially meshed, change the network type to P2MP.
•
If a router on an NBMA network has only one neighbor, you can change the network type to P2P to save costs.
Two broadcast-, NBMA-, and P2MP-interfaces can establish a neighbor relationship only when they are on the same network segment.
Configuration prerequisites
Before you configure OSPF network types, complete the following tasks:
• Configure IP addresses for interfaces to ensure IP connectivity between neighboring nodes.
•
Enable OSPF.
Configuring the broadcast network type for an interface
Step Command
1. Enter system view. system-view
Remarks
N/A
2. Enter interface view. interface interface-type
interface-number
N/A
31
Step Command
3. Configure the OSPF network type for the interface as broadcast. ospf network-type broadcast
Remarks
By default, the network type of an interface depends on the link layer protocol.
4. (Optional.) Configure a router priority for the interface. ospf dr-priority priority The default router priority is 1.
Configuring the NBMA network type for an interface
After you configure the network type as NBMA, you must specify neighbors and their router priorities because NBMA interfaces cannot find neighbors by broadcasting hello packets.
To configure the NBMA network type for an interface:
Remarks
N/A
Step Command
1. Enter system view. system-view
2. Enter interface view. interface interface-type
interface-number
3. Configure the OSPF network type for the interface as NBMA. ospf network-type nbma
4. (Optional.) Configure a router priority for the interface.
5. Return to system view. ospf dr-priority priority
N/A
By default, the network type of an interface depends on the link layer protocol.
The default setting is 1.
The router priority configured with this command is for DR election.
N/A
6. Enter OSPF view. quit ospf [ process-id | router-id
router-id | vpn-instance
vpn-instance-name ] *
N/A
7. Specify a neighbor and its router priority. peer ip-address [ dr-priority
dr-priority ]
By default, no neighbor is specified.
The priority configured with this command indicates whether a neighbor has the election right or not. If you configure the router priority for a neighbor as 0, the local router determines the neighbor has no election right, and does not send hello packets to this neighbor. However, if the local router is the DR or BDR, it still sends hello packets to the neighbor for neighbor relationship establishment.
Configuring the P2MP network type for an interface
Step Command
1. Enter system view. system-view
Remarks
N/A
32
Step Command
2. Enter interface view. interface interface-type
interface-number
Remarks
N/A
3. Configure the OSPF network type for the interface as
P2MP. ospf network-type p2mp [ unicast ]
4. Return to system view.
By default, the network type of an interface depends on the link layer protocol.
After you configure the OSPF network type for an interface as
P2MP unicast, all packets are unicast over the interface. The interface cannot broadcast hello packets to discover neighbors, so you must manually specify the neighbors.
N/A
5. Enter OSPF view. quit ospf [ process-id | router-id
router-id | vpn-instance
vpn-instance-name ] *
N/A
6. (Optional.) Specify a neighbor and its router priority. peer ip-address [ cost value ]
By default, no neighbor is specified.
This step must be performed if the network type is P2MP unicast, and is optional if the network type is P2MP.
Configuring the P2P network type for an interface
Step Command
1. Enter system view. system-view
Remarks
N/A
2. Enter interface view. interface interface-type
interface-number
N/A
3. Configure the OSPF network type for the interface as P2P. ospf network-type p2p
By default, the network type of an interface depends on the link layer protocol.
Configuring OSPF route control
This section describes how to control the advertisement and reception of OSPF routing information, as well as route redistribution from other protocols.
Configuration prerequisites
Before you configure OSPF route control, complete the following tasks:
•
Configure IP addresses for interfaces to ensure IP connectivity between neighboring nodes.
•
Enable OSPF.
•
Configure filters if routing information filtering is needed.
33
Configuring OSPF route summarization
Configure route summarization on an ABR or ASBR to summarize contiguous networks into a single network and distribute it to other areas.
Route summarization reduces the routing information exchanged between areas and the size of routing tables, and improves routing performance. For example, three internal networks 19.1.1.0/24,
19.1.2.0/24, and 19.1.3.0/24 are available within an area. You can summarize the three networks into network 19.1.0.0/16, and advertise the summary network to other areas.
Configuring route summarization on an ABR
After you configure a summary route on an ABR, the ABR generates a summary LSA instead of more specific LSAs so that the scale of LSDBs on routers in other areas and the influence of topology changes are reduced.
To configure route summarization on an ABR:
Step Command
1. Enter system view. system-view
2. Enter OSPF view.
3. Enter OSPF area view.
Remarks
N/A ospf [ process-id | router-id router-id
| vpn-instance vpn-instance-name ] * N/A area area-id N/A
4. Configure ABR route summarization. abr-summary ip-address
{ mask-length | mask } [ advertise | not-advertise ] [ cost cost ]
By default, no route summarization is configured.
The command takes effect only on an ABR.
Configuring route summarization when redistributing routes into OSPF on an ASBR
Without route summarization, an ASBR advertises each redistributed route in a separate ASE LSA. After you configure a summary route, the ASBR advertises only the summary route in an ASE LSA instead of more specific routes, reducing the number of LSAs in the LSDB.
The ASBR summarizes redistributed Type-5 LSAs within the specified address range. If the ASBR is in an
NSSA area, it also summarizes Type-7 LSAs within the specified address range. If the ASBR is also the
ABR, it summarizes Type-5 LSAs translated from Type-7 LSAs.
To configure route summarization when redistributing routes into OSPF on an ASBR:
Step Command
1. Enter system view. system-view
2. Enter OSPF view. ospf [ process-id | router-id router-id
| vpn-instance vpn-instance-name ]*
Remarks
N/A
N/A
3. Configure ASBR route summarization. asbr-summary ip-address
{ mask-length | mask } [ cost cost | not-advertise | nssa-only | tag tag ] *
By default, no ASBR route summarization is configured.
The command takes effect only on an
ASBR.
34
Configuring received OSPF route filtering
Perform this task to filter routes calculated using received LSAs.
The following filtering methods are available:
• Use an ACL or IP prefix list to filter routing information by destination address.
•
Use the gateway keyword to filter routing information by next hop.
•
Use an ACL or IP prefix list to filter routing information by destination address and at the same time use the gateway keyword to filter routing information by next hop.
• Use a routing policy to filter routing information.
To configure OSPF to filter routes calculated using received LSAs:
Remarks
N/A
Step Command
1. Enter system view. system-view
2. Enter OSPF view.
3. Configure OSPF to filter routes calculated using received LSAs. ospf [ process-id | router-id router-id | vpn-instance vpn-instance-name ] * filter-policy { acl-number [ gateway
prefix-list-name ] | gateway prefix-list-name
| prefix-list prefix-list-name [ gateway
prefix-list-name ] | route-policy
route-policy-name } import
N/A
By default, OSPF accepts all routes calculated using received
LSAs.
Configuring Type-3 LSA filtering
Perform this task to filter Type-3 LSAs advertised to an area on an ABR.
To configure Type-3 LSA filtering:
Step Command
1. Enter system view. system-view
2. Enter OSPF view.
3. Enter area view.
4. Configure Type-3 LSA filtering.
Remarks
N/A ospf [ process-id | router-id router-id | vpn-instance vpn-instance-name ] *
N/A area area-id N/A filter { acl-number | prefix-list
prefix-list-name | route-policy
route-policy-name } { export | import }
By default, the ABR does not filter Type-3 LSAs.
Configuring an OSPF cost for an interface
Configure an OSPF cost for an interface by using either of the following methods:
•
Configure the cost value in interface view.
•
Configure a bandwidth reference value for the interface. OSPF computes the cost with this formula:
Interface OSPF cost = Bandwidth reference value (100 Mbps) / Expected interface bandwidth
(Mbps). The expected bandwidth of an interface is configured with the bandwidth command (see
Interface Command Reference). If the calculated cost is greater than 65535, the value of 65535 is used. If the calculated cost is less than 1, the value of 1 is used. If no cost or bandwidth reference
35
value is configured for an interface, OSPF computes the interface cost based on the interface bandwidth and default bandwidth reference value.
To configure an OSPF cost for an interface:
Step Command
1. Enter system view.
2. Enter interface view. system-view interface interface-type
interface-number
Remarks
N/A
N/A
3. Configure an OSPF cost for the interface. ospf cost value
By default, the OSPF cost is calculated according to the interface bandwidth.
For a loopback interface, the OSPF cost is 0 by default.
To configure a bandwidth reference value:
Step Command
1. Enter system view. system-view
2. Enter OSPF view. ospf [ process-id | router-id
router-id | vpn-instance
vpn-instance-name ] *
3. Configure a bandwidth reference value. bandwidth-reference value
Remarks
N/A
N/A
The default setting is 100 Mbps.
Configuring the maximum number of ECMP routes
Perform this task to implement load sharing over ECMP routes.
To configure the maximum number of ECMP routes:
Step Command
1. Enter system view. system-view
2. Enter OSPF view. ospf [ process-id | router-id router-id | vpn-instance vpn-instance-name ] *
Remarks
N/A
N/A
3. Configure the maximum number of ECMP routes. maximum load-balancing maximum
By default, the maximum number of OSPF ECMP routes equals the maximum number of
ECMP routes supported by the system.
Use the max-ecmp-num command to configure the maximum number of ECMP routes supported by the system.
For more information about the max-ecmp-num command, see
Layer 3—IP Routing Command
Reference.
36
Configuring OSPF preference
A router can run multiple routing protocols, and each protocol is assigned a preference. If multiple routes are available to the same destination, the one with the highest protocol preference is selected as the best route.
To configure OSPF preference:
Step Command
1. Enter system view. system-view
2. Enter OSPF view. ospf [ process-id | router-id router-id
| vpn-instance vpn-instance-name ] *
Remarks
N/A
N/A
3. Configure a preference for OSPF. preference [ ase ] [ route-policy
route-policy-name ] value
By default, the preference of OSPF internal routes is 10 and the preference of OSPF external routes is 150.
Configuring OSPF route redistribution
On a router running OSPF and other routing protocols, you can configure OSPF to redistribute routes from other protocols, such as RIP, IS-IS, BGP, static, and direct, and advertise them in Type-5 LSAs or
Type-7 LSAs. In addition, you can configure OSPF to filter redistributed routes so that OSPF advertises only permitted routes.
IMPORTANT:
The import-route bgp command redistributes only EBGP routes. Because the import-route bgp allow-ibgp command redistributes both EBGP and IBGP routes, and mi ght cause routing loops, use it with caution.
Configuring OSPF to redistribute routes from another routing protocol
Step Command
1. Enter system view. system-view
Remarks
N/A
2. Enter OSPF view. ospf [ process-id | router-id router-id | vpn-instance vpn-instance-name ] *
N/A
3. Configure OSPF to redistribute routes from another routing protocol. import-route protocol [ process-id | all-processes | allow-ibgp ]
[ allow-direct | cost cost | nssa-only | route-policy route-policy-name | tag tag
| type type ] *
By default, no route redistribution is configured.
This command redistributes only active routes. To view information about active routes, use the display ip routing-table protocol command.
4. (Optional.) Configure
OSPF to filter redistributed routes. filter-policy { acl-number | prefix-list
prefix-list-name } export [ protocol
[ process-id ] ]
Configuring OSPF to redistribute a default route
By default, OSPF accepts all redistributed routes.
The import-route command cannot redistribute a default external route. Perform this task to redistribute a default route.
37
To redistribute a default route:
Step Command
1. Enter system view. system-view
2. Enter OSPF view. ospf [ process-id | router-id router-id | vpn-instance vpn-instance-name ] *
Remarks
N/A
N/A
3. Redistribute a default route. default-route-advertise [ [ [ always | permit-calculate-other ] | cost cost | route-policy route-policy-name | type
type ] * | summary cost cost ]
By default, no default route is redistributed.
This command is applicable only to VPNs. The PE router advertises a default route in a
Type-3 LSA to a CE router.
Configuring default parameters for redistributed routes
Perform this task to configure default parameters for redistributed routes, including cost, tag, and type.
Tags indicate information about protocols. For example, when redistributing BGP routes, OSPF uses tags to identify AS IDs.
To configure the default parameters for redistributed routes:
Remarks
N/A
Step Command
1. Enter system view. system-view
2. Enter OSPF view. ospf [ process-id | router-id router-id | vpn-instance vpn-instance-name ] *
3. Configure the default parameters for redistributed routes (cost, upper limit, tag, and type). default { cost cost | tag tag | type type } *
N/A
By default, the cost is 1, the tag is 1, and the type is Type-2.
Advertising a host route
Step Command
1. Enter system view. system-view
2. Enter OSPF view. ospf [ process-id | router-id
router-id | vpn-instance
vpn-instance-name ] *
3. Enter area view. area area-id
4. Advertise a host route. host-advertise ip-address cost
Remarks
N/A
N/A
N/A
By default, no host route is advertised.
Tuning and optimizing OSPF networks
You can use one of the following methods to optimize an OSPF network:
•
Change OSPF packet timers to adjust the convergence speed and network load. On low-speed links, consider the delay time for sending LSAs.
38
• Change the SPF calculation interval to reduce resource consumption caused by frequent network changes.
•
Configure OSPF authentication to improve security.
Configuration prerequisites
Before you configure OSPF network optimization, complete the following tasks:
•
Configure IP addresses for interfaces to ensure IP connectivity between neighboring nodes.
• Enable OSPF.
Configuring OSPF timers
An OSPF interface includes the following timers:
• Hello timer—Interval for sending hello packets. It must be identical on OSPF neighbors.
• Poll timer—Interval for sending hello packets to a neighbor that is down on the NBMA network.
• Dead timer—Interval within which if the interface receives no hello packet from the neighbor, it declares the neighbor is down.
• LSA retransmission timer—Interval within which if the interface receives no acknowledgement packets after sending a LSA to the neighbor, it retransmits the LSA.
To configure OSPF timers:
Step Command
1. Enter system view. system-view
2. Enter interface view. interface interface-type
interface-number
Remarks
N/A
N/A
3. Specify the hello interval.
4. Specify the poll interval.
5. Specify the dead interval. ospf timer hello seconds ospf timer poll seconds ospf timer dead seconds
By default:
•
The hello interval on P2P and broadcast interfaces is 10 seconds.
•
The hello interval on P2MP and NBMA interfaces is 30 seconds.
The default hello interval is restored when the network type for an interface is changed.
The default setting is 120 seconds.
The poll interval is at least four times the hello interval.
By default:
•
The dead interval on P2P and broadcast interfaces is 40 seconds.
•
The dead interval on P2MP and NBMA interfaces is 120 seconds.
The dead interval must be at least four times the hello interval on an interface.
The default dead interval is restored when the network type for an interface is changed.
39
Step Command
6. Specify the retransmission interval. ospf timer retransmit interval
Remarks
The default setting is 5 seconds.
A retransmission interval setting that is too small can cause unnecessary LSA retransmissions.
This interval is typically set bigger than the round-trip time of a packet between two neighbors.
Specifying LSA transmission delay
To avoid LSAs from aging out during transmission, set an LSA retransmission delay especially for low speed links.
To specify the LSA transmission delay on an interface:
Step Command
1. Enter system view. system-view
2. Enter interface view. interface interface-type
interface-number
3. Specify the LSA transmission delay. ospf trans-delay seconds
Remarks
N/A
N/A
The default setting is 1 second.
Specifying SPF calculation interval
LSDB changes result in SPF calculations. When the topology changes frequently, a large amount of network and router resources are occupied by SPF calculation. You can adjust the SPF calculation interval to reduce the impact.
When network changes are not frequent, the minimum-interval is adopted. If network changes become frequent, the SPF calculation interval is incremented by incremental-interval × 2 n-2 (n is the number of calculation times) each time a calculation occurs until the maximum-interval is reached.
To configure the SPF calculation interval:
Step Command
1. Enter system view. system-view
2. Enter OSPF view.
3. Specify the SPF calculation interval.
Remarks
N/A ospf [ process-id | router-id router-id
| vpn-instance vpn-instance-name ] * N/A spf-schedule-interval
maximum-interval [ minimum-interval
[ incremental-interval ] ]
By default:
•
The maximum interval is 5 seconds.
•
The minimum interval is 50 milliseconds.
•
The incremental interval is 200 milliseconds.
40
Specifying the LSA arrival interval
If OSPF receives an LSA that has the same LSA type, LS ID, and router ID as the previously received LSA within the LSA arrival interval, OSPF discards the LSA to save bandwidth and route resources.
To configure the LSA arrival interval:
Step Command
1. Enter system view. system-view
2. Enter OSPF view. ospf [ process-id | router-id
router-id | vpn-instance
vpn-instance-name ] *
Remarks
N/A
N/A
3. Configure the LSA arrival interval. lsa-arrival-interval interval
The default setting is 1000 milliseconds.
Make sure this interval is smaller than or equal to the interval set with the lsa-generation-interval command.
Specifying the LSA generation interval
Adjust the LSA generation interval to protect network resources and routers from being overwhelmed by
LSAs at the time of frequent network changes.
When network changes are not frequent, LSAs are generated at the minimum-interval. If network changes become frequent, the LSA generation interval is incremented by incremental-interval × 2 n-2 (n is the number of generation times) each time a LSA generation occurs until the maximum-interval is reached.
To configure the LSA generation interval:
Step Command
1. Enter system view. system-view
2. Enter OSPF view. ospf [ process-id | router-id router-id | vpn-instance vpn-instance-name ] *
Remarks
N/A
N/A
3.
Configure the LSA generation interval. lsa-generation-interval
maximum-interval [ minimum-interval
[ incremental-interval ] ]
By default:
•
The maximum interval is 5 seconds.
•
The minimum interval is 50 milliseconds.
•
The incremental interval is 200 milliseconds.
Disabling interfaces from receiving and sending OSPF packets
To enhance OSPF adaptability and reduce resource consumption, you can set an OSPF interface to
"silent." A silent OSPF interface blocks OSPF packets and cannot establish any OSPF neighbor relationship. However, other interfaces on the router can still advertise direct routes of the interface in
Router LSAs.
41
To disable interfaces from receiving and sending routing information:
Step Command
1. Enter system view. system-view
2. Enter OSPF view.
3. Disable interfaces from receiving and sending
OSPF packets.
Remarks
N/A ospf [ process-id | router-id router-id
| vpn-instance vpn-instance-name ] * N/A silent-interface { interface-type
interface-number | all }
By default, an OSPF interface can receive and send OSPF packets.
The silent-interface command disables only the interfaces associated with the current process rather than other processes.
Multiple OSPF processes can disable the same interface from receiving and sending OSPF packets.
Configuring stub routers
A stub router is used for traffic control. It reports its status as a stub router to neighboring OSPF routers.
The neighboring routers do not use the stub router to forward data although they have a route to it.
Router LSAs from the stub router might contain different link type values. A value of 3 means a link to a stub network, and the cost of the link will not be changed by default. To set the cost of the link to 65535, specify the include-stub keyword in the stub-router command. A value of 1, 2 or 4 means a point-to-point link, a link to a transit network, or a virtual link. On such links, a maximum cost value of 65535 is used.
Neighbors do not send packets to the stub router as long as they have a route with a smaller cost.
To configure a router as a stub router:
Remarks
N/A
Step Command
1. Enter system view. system-view
2. Enter OSPF view.
3. Configure the router as a stub router. ospf [ process-id | router-id router-id | vpn-instance vpn-instance-name ] * stub-router [ external-lsa
[ max-metric-value ] | include-stub | on-startup { seconds | wait-for-bgp
[ seconds ] } | summary-lsa
[ max-metric-value ] ] *
N/A
By default, the router is not configured as a stub router.
A stub router has no associations with a stub area.
Configuring OSPF authentication
Perform this task to configure OSPF area and interface authentication.
OSPF adds the configured password into sent packets, and uses the password to authenticate received packets. Only packets that pass the authentication can be received. If a packet fails the authentication, the OSPF neighbor relationship cannot be established.
If you configure OSPF authentication for both an area and an interface in that area, the interface uses the
OSPF authentication configured on it.
42
Configuring OSPF area authentication
You must configure the same authentication mode and password on all the routers in an area.
To configure OSPF area authentication:
Step Command
1. Enter system view. system-view
Remarks
N/A
2. Enter OSPF view. ospf [ process-id | router-id router-id | vpn-instance vpn-instance-name ] *
N/A
3. Enter area view.
4. Configure area authentication mode.
Configuring OSPF interface authentication area area-id N/A
•
Configure MD5 authentication: authentication-mode { hmac-md5 | md5 } key-id { cipher | plain } password
•
Configure simple authentication: authentication-mode simple { cipher | plain } password
Use either method.
By default, no authentication is configured.
You must configure the same authentication mode and password on both the local interface and its peer interface.
To configure OSPF interface authentication:
Step Command
1. Enter system view. system-view
2. Enter interface view.
Remarks
N/A interface interface-type interface-number N/A
3. Configure interface authentication mode.
•
Configure simple authentication: ospf authentication-mode simple { cipher
cipher-string | plain plain-string }
•
Configure MD5 authentication: ospf authentication-mode { hmac-md5 | md5 } key-id { cipher cipher-string | plain
plain-string }
Use either method.
By default, no authentication is configured.
Adding the interface MTU into DD packets
By default, an OSPF interface adds a value of 0 into the interface MTU field of a DD packet rather than the actual interface MTU. You can enable an interface to add its MTU into DD packets.
To add the interface MTU into DD packets:
Step Command
1. Enter system view. system-view
2. Enter interface view. interface interface-type
interface-number
Remarks
N/A
N/A
43
Step Command
3. Enable the interface to add its
MTU into DD packets. ospf mtu-enable
Configuring a DSCP value for OSPF packets
Step Command
1. Enter system view. system-view
2. Enter OSPF view. ospf [ process-id | router-id router-id | vpn-instance vpn-instance-name ] *
3. Configure a DSCP value for
OSPF packets. dscp dscp-value
Remarks
By default, the interface adds an
MTU value of 0 into DD packets.
Remarks
N/A
N/A
By default, the DSCP value for OSPF packets is
48.
Configuring the maximum number of external LSAs in LSDB
Step Command
1. Enter system view. system-view
Remarks
N/A
2. Enter OSPF view. ospf [ process-id | router-id router-id | vpn-instance vpn-instance-name ] *
N/A
3. Specify the maximum number of external LSAs in the LSDB. lsdb-overflow-limit number
By default, the maximum number of external LSAs in the
LSDB is not limited.
Configuring OSPF exit overflow interval
When the number of LSAs in the LSDB exceeds the upper limit, the LSDB is in an overflow state. To save resources, OSPF does not receive any external LSAs and deletes the external LSAs generated by itself when in this state.
Perform this task to configure the interval that OSPF exits overflow state.
To configure the OSPF exit overflow interval:
Step Command
1. Enter system view. system-view
2. Enter OSPF view. ospf [ process-id | router-id router-id | vpn-instance vpn-instance-name ] *
Remarks
N/A
N/A
3. Configure the OSPF exit overflow interval. lsdb-overflow-interval interval
The default setting is 300 seconds.
The value of 0 indicates that
OSPF does not exit overflow state.
44
Enabling compatibility with RFC 1583
RFC 1583 specifies a different method than RFC 2328 for selecting the optimal route to a destination in another AS. When multiple routes are available to the ASBR, OSPF selects the optimal route by using the following procedure:
1. Selects the route with the highest preference:
{
{
If RFC 2328 is compatible with RFC 1583, all these routes have equal preference.
If RFC 2328 is not compatible with RFC 1583, the intra-area route in a non-backbone area is preferred to reduce the burden of the backbone area. The inter-area route and intra-area route in the backbone area have equal preference.
2. Selects the route with lower cost if two routes have equal preference.
3. Selects the route with larger originating area ID if two routes have equal cost.
To avoid routing loops, HP recommends setting identical RFC 1583-compatibility on all routers in a routing domain.
To enable compatibility with RFC 1583:
Step Command
1. Enter system view. system-view
2. Enter OSPF view. ospf [ process-id | router-id router-id | vpn-instance vpn-instance-name ] *
3. Enable compatibility with RFC 1583. rfc1583 compatible
Remarks
N/A
N/A
By default, this feature is enabled.
Logging neighbor state changes
Perform this task to enable output of neighbor state change logs to the information center. The information center processes the logs according to user-defined output rules (whether to output logs and where to output). For more information about the information center, see Network Management and
Monitoring Configuration Guide.
To enable the logging of neighbor state changes:
Step Command
1. Enter system view. system-view
2. Enter OSPF view. ospf [ process-id | router-id router-id | vpn-instance vpn-instance-name ] *
3. Enable the logging of neighbor state changes. log-peer-change
Remarks
N/A
N/A
By default, this feature is enabled.
Configuring OSPF network management
This task involves the following configurations:
• Bind an OSPF process to MIB so that you can use network management software to manage the specified OSPF process.
•
Enable SNMP notifications for OSPF to report important events.
45
• Configure the maximum number of output SNMP notifications within a specified time interval.
SNMP notifications are sent to the SNMP module, which outputs SNMP notifications according to the configured output rules. For more information about SNMP notifications, see Network Management and
Monitoring Configuration Guide.
To configure OSPF network management:
Step Command
1. Enter system view.
2. Bind OSPF MIB to an
OSPF process.
3. Enable SNMP notifications for OSPF.
4. Enter OSPF view. system-view ospf mib-binding process-id
Remarks
N/A
By default, OSPF MIB is bound to the process with the smallest process ID. snmp-agent trap enable ospf
[ authentication-failure | bad-packet | config-error | grhelper-status-change | grrestarter-status-change | if-state-change
| lsa-maxage | lsa-originate | lsdb-approaching-overflow | lsdb-overflow | neighbor-state-change | nssatranslator-status-change | retransmit | virt-authentication-failure | virt-bad-packet
| virt-config-error | virt-retransmit | virtgrhelper-status-change | virtif-state-change | virtneighbor-state-change ] * ospf [ process-id | router-id router-id | vpn-instance vpn-instance-name ] *
By default, SNMP notifications for OSPF is enabled.
N/A
5. Configure the maximum number of output SNMP notifications within a specified time interval. snmp trap rate-limit interval trap-interval count trap-number
By default, OSPF outputs up to seven SNMP notifications within 10 seconds.
Configuring the LSU transmit rate
Sending large numbers of LSU packets affects router performance and consumes too much network bandwidth. You can configure the router to send LSU packets at a proper interval and limit the maximum number of LSU packets sent out of an OSPF interface each time.
To configure the LSU transmit rate:
Step Command
1. Enter system view. system-view
2. Enter OSPF view. ospf [ process-id | router-id router-id | vpn-instance vpn-instance-name ] *
Remarks
N/A
N/A
3. Configure the LSU transmit rate. transmit-pacing interval interval count count
By default, an OSPF interface sends a maximum of three LSU packets every 20 milliseconds.
46
Enabling OSPF ISPF
When the topology changes, Incremental Shortest Path First (ISPF) computes only the affected part of the
SPT, instead of the entire SPT.
To enable OSPF ISPF:
Step Command
1. Enter system view. system-view
2. Enter OSPF view. ospf [ process-id | router-id router-id | vpn-instance vpn-instance-name ] *
Remarks
N/A
N/A
3. Enable OSPF ISPF. ispf enable
By default, OSPF ISPF is enabled.
Configuring prefix suppression
An OSPF interface by default advertises all its prefixes in LSAs. You can suppress interfaces from advertising all its prefixes to speed up OSPF convergence. This function also helps improve the network security by preventing IP routing toward the suppressed networks.
When prefix suppression is enabled:
•
On P2P and P2MP networks, OSPF does not advertise Type-3 links in Router LSAs. Other routing information can still be advertised to ensure traffic forwarding.
•
On broadcast and NBMA networks, the DR generates Network LSAs with a mask length of 32 to suppress network routes. Other routing information can still be advertised to ensure traffic forwarding. If no neighbors exist, the DR does not advertise the primary IP addresses of interfaces in Router LSAs.
IMPORTANT:
If you want to use prefix suppression, HP recommends that you configure prefix suppression on all OSPF routers.
Configuring prefix suppression for an OSPF process
Enabling prefix suppression for an OSPF process does not suppress the prefixes of secondary IP addresses, loopback interfaces, and passive interfaces. To suppress the prefixes of loopback interfaces and passive interfaces, enable prefix suppression on the interfaces.
To configure prefix suppression for an OSPF process:
Remarks
N/A
Step Command
1. Enter system view. system-view
2. Enter OSPF view. ospf [ process-id | router-id router-id | vpn-instance vpn-instance-name ] *
3. Enable prefix suppression for the
OSPF process. prefix-suppression
N/A
By default, prefix suppression is disabled for an OSPF process.
47
Configuring prefix suppression on an interface
Interface prefix suppression does not suppress prefixes of secondary IP addresses.
To configure interface prefix suppression:
Step Command
1. Enter system view. system-view
2. Enter interface view. interface interface-type interface-number
3. Enable prefix suppression on the interface. ospf prefix-suppression [ disable ]
Remarks
N/A
N/A
By default, prefix suppression is disabled on an interface.
Configuring prefix prioritization
This feature enables the device to install prefixes in descending priority order: critical, high, medium, and low. The prefix priorities are assigned through routing policies. When a route is assigned multiple prefix priorities, the route uses the highest priority.
By default, the 32-bit OSPF host routes have a medium priority and other routes a low priority.
To configure prefix prioritization:
Step Command
1. Enter system view. system-view
2. Enter OSPF view. ospf [ process-id | router-id router-id | vpn-instance vpn-instance-name ] *
3. Enable prefix prioritization. prefix-priority route-policy route-policy-name
Remarks
N/A
N/A
By default, prefix prioritization is disabled.
Configuring OSPF PIC
Prefix Independent Convergence (PIC) enables the device to speed up network convergence by ignoring the number of prefixes.
When both OSPF PIC and OSPF FRR are configured, OSPF FRR takes effect.
OSPF PIC applies to only inter-area routes and external routes.
To configure OSPF PIC:
Remarks
N/A
Step Command
1. Enter system view. system-view
2. Enter OSPF view. ospf [ process-id | router-id router-id | vpn-instance vpn-instance-name ] *
3. Enable PIC for
OSPF. pic [ additional-path-always ]
N/A
By default, OSPF PIC is enabled.
48
Configuring OSPF GR
GR ensures forwarding continuity when a routing protocol restarts.
Two routers are required to complete a GR process. The following are router roles in a GR process.
• GR restarter—Graceful restarting router. It must have GR capability.
•
GR helper—A neighbor of the GR restarter. It helps the GR restarter to complete the GR process.
OSPF GR has the following types:
• IETF GR—Uses Opaque LSAs to implement GR.
•
Non-IETF GR—Uses link local signaling (LLS) to advertise GR capability and uses out of band synchronization to synchronize the LSDB.
A device can act as a GR restarter and GR helper at the same time.
Configuring the OSPF GR restarter
You can configure the IETF or non IETF OSPF GR restarter.
IMPORTANT:
You cannot enable OSPF NSR on a device that acts as GR restarter.
Configuring the IETF OSPF GR restarter
Step Command
1. Enter system view. system-view
2. Enable OSPF and enter its view. ospf [ process-id | router-id
router-id | vpn-instance
vpn-instance-name ] *
Remarks
N/A
N/A
3. Enable opaque LSA reception and advertisement capability. opaque-capability enable
By default, opaque LSA reception and advertisement capability is enabled.
By default, the IETF GR capability is disabled.
4. Enable the IETF GR.
5. (Optional.) Configure GR interval. graceful-restart ietf [ global | planned-only ] * graceful-restart interval
interval-value
Configuring the non-IETF OSPF GR restarter
Step Command
1. Enter system view. system-view
2. Enable OSPF and enter its view. ospf [ process-id | router-id
router-id | vpn-instance
vpn-instance-name ] *
3. Enable the link-local signaling capability. enable link-local-signaling
The default setting is 120 seconds.
Remarks
N/A
N/A
By default, the link-local signaling capability is disabled.
49
Step Command
4. Enable the out-of-band re-synchronization capability. enable out-of-band-resynchronization
5. Enable non-IETF GR.
6. (Optional.) Configure GR interval. graceful-restart [ nonstandard ]
[ global | planned-only ] * graceful-restart interval
interval-value
Configuring OSPF GR helper
You can configure the IETF or non IETF OSPF GR helper.
Configuring the IETF OSPF GR helper
Step Command
1. Enter system view. system-view
2. Enable OSPF and enter its view. ospf [ process-id | router-id
router-id | vpn-instance
vpn-instance-name ] *
3. Enable opaque LSA reception and advertisement capability. opaque-capability enable
4. (Optional.) Enable GR helper capability. graceful-restart helper enable
[ planned-only ]
5. (Optional.) Enable strict LSA checking for the GR helper.
Configuring the non-IETF OSPF GR helper graceful-restart helper strict-lsa-checking
Step Command
1. Enter system view. system-view
2. Enable OSPF and enter its view. ospf [ process-id | router-id
router-id | vpn-instance
vpn-instance-name ] *
3. Enable the link-local signaling capability. enable link-local-signaling
4. Enable the out-of-band re-synchronization capability. enable out-of-band-resynchronization
5. (Optional.) Enable GR helper. graceful-restart helper enable
6. (Optional.) Enable strict LSA checking for the GR helper. graceful-restart helper strict-lsa-checking
Remarks
By default, the out-of-band re-synchronization capability is disabled.
By default, non-IETF GR capability is disabled.
The default setting is 120 seconds.
Remarks
N/A
N/A
By default, opaque LSA reception and advertisement capability is enabled.
By default, GR helper capability is enabled.
By default, strict LSA checking for the GR helper is disabled.
Remarks
N/A
N/A
By default, the link-local signaling capability is disabled.
By default, the out-of-band re-synchronization capability is disabled.
By default, GR helper is enabled.
By default, strict LSA checking for the GR helper is disabled.
50
Triggering OSPF GR
To trigger OSPF GR, perform the following command in user view:
Task Command
Trigger OSPF GR. reset ospf [ process-id ] process graceful-restart
Configuring BFD for OSPF
BFD provides a single mechanism to quickly detect and monitor the connectivity of links between OSPF neighbors, which improves the network convergence speed. For more information about BFD, see High
Availability Configuration Guide.
OSPF supports the following BFD detection modes:
•
Bidirectional control detection—Requires BFD configuration to be made on both OSPF routers on the link.
• Single-hop echo detection—Requires BFD configuration to be made on one OSPF router on the link.
Configuring bidirectional control detection
Step Command
1. Enter system view. system-view
Remarks
N/A
2. Enter interface view. interface interface-type
interface-number
N/A
3. Enable BFD bidirectional control detection. ospf bfd enable
By default, BFD bidirectional control detection is disabled.
Both ends of a BFD session must be on the same network segment and in the same area.
Configuring single-hop echo detection
Step Command
1. Enter system view. system-view
2. Configure the source address of echo packets. bfd echo-source-ip ip-address
Remarks
N/A
By default, the source address of echo packets is not configured.
3. Enter interface view. interface interface-type
interface-number
N/A
4. Enable BFD single-hop echo detection. ospf bfd enable echo
By default, BFD single-hop echo detection is disabled.
Displaying and maintaining OSPF
Execute display commands in any view and reset commands in user view.
51
Task Command
Display OSPF process information. display ospf [ process-id ] [ verbose ]
Display OSPF GR information.
Display OSPF LSDB information. display ospf [ process-id ] graceful-restart [ verbose ] display ospf [ process-id ] lsdb [ area area-id | brief | [ { asbr | ase | network | nssa | opaque-area | opaque-as | opaque-link | router | summary } [ link-state-id ] ] [ originate-router advertising-router-id | self-originate ] ]
Display OSPF next hop information.
Display OSPF neighbor information.
Display neighbor statistics for
OSPF areas. display ospf [ process-id ] nexthop display ospf [ process-id ] peer [ verbose ] [ interface-type
interface-number ] [ neighbor-id ] display ospf [ process-id ] peer statistics
Display OSPF routing table information. display ospf [ process-id ] routing [ ip-address { mask-length | mask } ]
[ interface interface-type interface-number ] [ nexthop nexthop-address ]
[ verbose ]
Display OSPF topology information.
Display OSPF statistics.
Display OSPF virtual link information.
Display OSPF request queue information.
Display OSPF retransmission queue information.
Display OSPF ABR and ASBR information.
Display summary route information on the OSPF ABR.
Display OSPF interface information.
Display OSPF route calculation log information.
Display OSPF ASBR route summarization information.
Display the global route ID. display ospf [ process-id ] [ area area-id ] spf-tree [ verbose ] display ospf [ process-id ] statistics [ error ] display ospf [ process-id ] vlink display ospf [ process-id ] request-queue [ interface-type
interface-number ] [ neighbor-id ] display ospf [ process-id ] retrans-queue [ interface-type
interface-number ] [ neighbor-id ] display ospf [ process-id ] abr-asbr [ verbose ] display ospf [ process-id ] [ area area-id ] abr-summary [ ip-address
{ mask-length | mask } ] [ verbose ] display ospf [ process-id ] interface [ interface-type interface-number | verbose ] display ospf [ process-id ] event-log spf display ospf [ process-id ] asbr-summary [ ip-address { mask-length |
mask } ] display router id
Reset an OSPF process.
Re-enable OSPF route redistribution. reset ospf [ process-id ] process [ graceful-restart ] reset ospf [ process-id ] redistribution
52
OSPF configuration examples
These configuration examples only cover commands for OSPF configuration.
Basic OSPF configuration example
Network requirements
•
Enable OSPF on all switches, and split the AS into three areas.
• Configure Switch A and Switch B as ABRs.
Figure 10 Network diagram
Switch A
Vlan-int100
Area 0
10.1.1.1/24
Vlan-int200
10.2.1.1/24
Vlan-int100
10.1.1.2/24
Switch B
Vlan-int200
10.3.1.1/24
Area 1
Vlan-int200
10.2.1.2/24
Switch C
Vlan-int300
10.4.1.1/24
Area 2
Vlan-int200
10.3.1.2/24
Vlan-int300
10.5.1.1/24
Switch D
Configuration procedure
1. Configure IP addresses for interfaces. (Details not shown.)
2. Enable OSPF:
# Configure Switch A.
<SwitchA> system-view
[SwitchA] router id 10.2.1.1
[SwitchA] ospf
[SwitchA-ospf-1] area 0
[SwitchA-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255
[SwitchA-ospf-1-area-0.0.0.0] quit
[SwitchA-ospf-1] area 1
[SwitchA-ospf-1-area-0.0.0.1] network 10.2.1.0 0.0.0.255
[SwitchA-ospf-1-area-0.0.0.1] quit
[SwitchA-ospf-1] quit
# Configure Switch B.
<SwitchB> system-view
[SwitchB] router id 10.3.1.1
[SwitchB] ospf
[SwitchB-ospf-1] area 0
[SwitchB-ospf-1-area-0.0.0.0] network 10.1.1.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 10.3.1.0 0.0.0.255
[SwitchB-ospf-1-area-0.0.0.2] quit
53
[SwitchB-ospf-1] quit
# Configure Switch C.
<SwitchC> system-view
[SwitchC] router id 10.4.1.1
[SwitchC] ospf
[SwitchC-ospf-1] area 1
[SwitchC-ospf-1-area-0.0.0.1] network 10.2.1.0 0.0.0.255
[SwitchC-ospf-1-area-0.0.0.1] network 10.4.1.0 0.0.0.255
[SwitchC-ospf-1-area-0.0.0.1] quit
[SwitchC-ospf-1] quit
# Configure Switch D.
<SwitchD> system-view
[SwitchD] router id 10.5.1.1
[SwitchD] ospf
[SwitchD-ospf-1] area 2
[SwitchD-ospf-1-area-0.0.0.2] network 10.3.1.0 0.0.0.255
[SwitchD-ospf-1-area-0.0.0.2] network 10.5.1.0 0.0.0.255
[SwitchD-ospf-1-area-0.0.0.2] quit
[SwitchD-ospf-1] quit
Verifying the configuration
# Display information about neighbors on Switch A.
[SwitchA] display ospf peer verbose
OSPF Process 1 with Router ID 10.2.1.1
Neighbors
Area 0.0.0.0 interface 10.1.1.1(Vlan-interface100)'s neighbors
Router ID: 10.3.1.1 Address: 10.1.1.2 GR State: Normal
State: Full Mode: Nbr is Master Priority: 1
DR: 10.1.1.1 BDR: 10.1.1.2 MTU: 0
Options is 0x02 (-|-|-|-|-|-|E|-)
Dead timer due in 37 sec
Neighbor is up for 06:03:59
Authentication Sequence: [ 0 ]
Neighbor state change count: 5
Area 0.0.0.1 interface 10.2.1.1(Vlan-interface200)'s neighbors
Router ID: 10.4.1.1 Address: 10.2.1.2 GR State: Normal
State: Full Mode: Nbr is Master Priority: 1
DR: 10.2.1.1 BDR: 10.2.1.2 MTU: 0
Options is 0x02 (-|-|-|-|-|-|E|-)
Dead timer due in 32 sec
Neighbor is up for 06:03:12
Authentication Sequence: [ 0 ]
Neighbor state change count: 5
# Display OSPF routing information on Switch A.
[SwitchA] display ospf routing
54
OSPF Process 1 with Router ID 10.2.1.1
Routing Tables
Routing for Network
Destination Cost Type NextHop AdvRouter Area
10.2.1.0/24 1 Transit 10.2.1.1 10.2.1.1 0.0.0.1
10.3.1.0/24 2 Inter 10.1.1.2 10.3.1.1 0.0.0.0
10.4.1.0/24 2 Stub 10.2.1.2 10.4.1.1 0.0.0.1
10.5.1.0/24 3 Inter 10.1.1.2 10.3.1.1 0.0.0.0
10.1.1.0/24 1 Transit 10.1.1.1 10.2.1.1 0.0.0.0
Total Nets: 5
Intra Area: 3 Inter Area: 2 ASE: 0 NSSA: 0
# Display OSPF routing information on Switch D.
[SwitchD] display ospf routing
OSPF Process 1 with Router ID 10.5.1.1
Routing Tables
Routing for Network
Destination Cost Type NextHop AdvRouter Area
10.2.1.0/24 3 Inter 10.3.1.1 10.3.1.1 0.0.0.2
10.3.1.0/24 1 Transit 10.3.1.2 10.3.1.1 0.0.0.2
10.4.1.0/24 4 Inter 10.3.1.1 10.3.1.1 0.0.0.2
10.5.1.0/24 1 Stub 10.5.1.1 10.5.1.1 0.0.0.2
10.1.1.0/24 2 Inter 10.3.1.1 10.3.1.1 0.0.0.2
Total Nets: 5
Intra Area: 2 Inter Area: 3 ASE: 0 NSSA: 0
# On Switch D, ping the IP address 10.4.1.1 to test reachability.
[SwitchD] ping 10.4.1.1
Ping 10.4.1.1 (10.4.1.1): 56 data bytes, press CTRL_C to break
56 bytes from 10.4.1.1: icmp_seq=0 ttl=253 time=1.549 ms
56 bytes from 10.4.1.1: icmp_seq=1 ttl=253 time=1.539 ms
56 bytes from 10.4.1.1: icmp_seq=2 ttl=253 time=0.779 ms
56 bytes from 10.4.1.1: icmp_seq=3 ttl=253 time=1.702 ms
56 bytes from 10.4.1.1: icmp_seq=4 ttl=253 time=1.471 ms
--- Ping statistics for 10.4.1.1 ---
5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss round-trip min/avg/max/std-dev = 0.779/1.408/1.702/0.323 ms
OSPF route redistribution configuration example
Network requirements
•
Enable OSPF on all the switches.
55
• Split the AS into three areas.
•
Configure Switch A and Switch B as ABRs.
•
Configure Switch C as an ASBR to redistribute external routes (static routes).
Figure 11 Network diagram
Configuration procedure
1. Configure IP addresses for interfaces. (Details not shown.)
2. Enable OSPF (see "
Basic OSPF configuration example ").
3. Configure OSPF to redistribute routes:
# On Switch C, configure a static route destined for network 3.1.2.0/24.
<SwitchC> system-view
[SwitchC] ip route-static 3.1.2.1 24 10.4.1.2
# On Switch C, configure OSPF to redistribute static routes.
[SwitchC] ospf 1
[SwitchC-ospf-1] import-route static
Verifying the configuration
# Display the ABR/ASBR information of Switch D.
<SwitchD> display ospf abr-asbr
OSPF Process 1 with Router ID 10.5.1.1
Routing Table to ABR and ASBR
Type Destination Area Cost Nexthop RtType
Intra 10.3.1.1 0.0.0.2 10 10.3.1.1 ABR
Inter 10.4.1.1 0.0.0.2 22 10.3.1.1 ASBR
# Display the OSPF routing table on Switch D.
<SwitchD> display ospf routing
OSPF Process 1 with Router ID 10.5.1.1
Routing Tables
Routing for Network
Destination Cost Type NextHop AdvRouter Area
10.2.1.0/24 22 Inter 10.3.1.1 10.3.1.1 0.0.0.2
56
10.3.1.0/24 10 Transit 10.3.1.2 10.3.1.1 0.0.0.2
10.4.1.0/24 25 Inter 10.3.1.1 10.3.1.1 0.0.0.2
10.5.1.0/24 10 Stub 10.5.1.1 10.5.1.1 0.0.0.2
10.1.1.0/24 12 Inter 10.3.1.1 10.3.1.1 0.0.0.2
Routing for ASEs
Destination Cost Type Tag NextHop AdvRouter
3.1.2.0/24 1 Type2 1 10.3.1.1 10.4.1.1
Total Nets: 6
Intra Area: 2 Inter Area: 3 ASE: 1 NSSA: 0
OSPF summary route advertisement configuration example
Network requirements
• Configure OSPF on Switch A and Switch B in AS 200.
• Configure OSPF on Switch C, Switch D, and Switch E in AS 100.
•
Configure an EBGP connection between Switch B and Switch C. Configure Switch B and Switch C to redistribute OSPF routes and direct routes into BGP and BGP routes into OSPF.
• Configure Switch B to advertise only summary route 10.0.0.0/8 to Switch A.
Figure 12 Network diagram
Vlan-int500
10.3.1.1/24
Switch D
Vlan-int400
10.1.1.1/24
Vlan-int300
10.2.1.2/24
Switch E
Vlan-int600
10.4.1.1/24
AS 100
Vlan-int400
10.1.1.2/24
Vlan-int300
10.2.1.1/24
Switch C
Vlan-int200
11.1.1.2/24
EBGP
Vlan-int200
11.1.1.1/24
Switch B
Vlan-int100
11.2.1.2/24
Vlan-int100
11.2.1.1/24
AS 200
Switch A
Configuration procedure
1. Configure IP addresses for interfaces. (Details not shown.)
2. Enable OSPF:
# Configure Switch A.
<SwitchA> system-view
[SwitchA] router id 11.2.1.2
[SwitchA] ospf
57
[SwitchA-ospf-1] area 0
[SwitchA-ospf-1-area-0.0.0.0] network 11.2.1.0 0.0.0.255
[SwitchA-ospf-1-area-0.0.0.0] quit
[SwitchA-ospf-1] quit
# Configure Switch B.
<SwitchB> system-view
[SwitchB] router id 11.2.1.1
[SwitchB] ospf
[SwitchB-ospf-1] area 0
[SwitchB-ospf-1-area-0.0.0.0] network 11.2.1.0 0.0.0.255
[SwitchB-ospf-1-area-0.0.0.0] quit
[SwitchB-ospf-1] quit
# Configure Switch C.
<SwitchC> system-view
[SwitchC] router id 11.1.1.2
[SwitchC] ospf
[SwitchC-ospf-1] area 0
[SwitchC-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255
[SwitchC-ospf-1-area-0.0.0.0] network 10.2.1.0 0.0.0.255
[SwitchC-ospf-1-area-0.0.0.0] quit
[SwitchC-ospf-1] quit
# Configure Switch D.
<SwitchD> system-view
[SwitchD] router id 10.3.1.1
[SwitchD] ospf
[SwitchD-ospf-1] area 0
[SwitchD-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255
[SwitchD-ospf-1-area-0.0.0.0] network 10.3.1.0 0.0.0.255
[SwitchD-ospf-1-area-0.0.0.0] quit
# Configure Switch E.
<SwitchE> system-view
[SwitchE] router id 10.4.1.1
[SwitchE] ospf
[SwitchE-ospf-1] area 0
[SwitchE-ospf-1-area-0.0.0.0] network 10.2.1.0 0.0.0.255
[SwitchE-ospf-1-area-0.0.0.0] network 10.4.1.0 0.0.0.255
[SwitchE-ospf-1-area-0.0.0.0] quit
[SwitchE-ospf-1] quit
3. Configure BGP to redistribute OSPF routes and direct routes:
# Configure Switch B.
[SwitchB] bgp 200
[SwitchB-bgp] peer 11.1.1.2 as 100
[SwitchB-bgp] address-family ipv4 unicast
[SwitchB-bgp-ipv4] import-route ospf
[SwitchB-bgp-ipv4] import-route direct
[SwitchB-bgp ipv4] quit
[SwitchB-bgp] quit
58
# Configure Switch C.
[SwitchC] bgp 100
[SwitchC-bgp] peer 11.1.1.1 as 200
[SwitchC-bgp] address-family ipv4 unicast
[SwitchC-bgp-ipv4] import-route ospf
[SwitchC-bgp-ipv4]import-route direct
[SwitchC-bgp-ipv4] quit
[SwitchC-bgp] quit
4. Configure Switch B and Switch C to redistribute BGP routes into OSPF:
# Configure OSPF to redistribute routes from BGP on Switch B.
[SwitchB] ospf
[SwitchB-ospf-1] import-route bgp
# Configure OSPF to redistribute routes from BGP on Switch C.
[SwitchC] ospf
[SwitchC-ospf-1] import-route bgp
# Display the OSPF routing table on Switch A.
[SwitchA] display ip routing-table
Destinations : 16 Routes : 16
Destination/Mask Proto Pre Cost NextHop Interface
0.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0
10.1.1.0/24 OSPF 150 1 11.2.1.1 Vlan100
10.2.1.0/24 OSPF 150 1 11.2.1.1 Vlan100
10.3.1.0/24 OSPF 150 1 11.2.1.1 Vlan100
10.4.1.0/24 OSPF 150 1 11.2.1.1 Vlan100
11.2.1.0/24 Direct 0 0 11.2.1.2 Vlan100
11.2.1.0/32 Direct 0 0 11.2.1.2 Vlan100
11.2.1.2/32 Direct 0 0 127.0.0.1 InLoop0
11.2.1.255/32 Direct 0 0 11.2.1.2 Vlan100
127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0
127.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0
127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0
127.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0
224.0.0.0/4 Direct 0 0 0.0.0.0 NULL0
224.0.0.0/24 Direct 0 0 0.0.0.0 NULL0
255.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0
5. Configure route summarization:
# Configure route summarization on Switch B to advertise a summary route 10.0.0.0/8.
[SwitchB-ospf-1] asbr-summary 10.0.0.0 8
# Display the IP routing table on Switch A.
[SwitchA] display ip routing-table
Destinations : 13 Routes : 13
Destination/Mask Proto Pre Cost NextHop Interface
59
0.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0
10.0.0.0/8 OSPF 150 2 11.2.1.1 Vlan100
11.2.1.0/24 Direct 0 0 11.2.1.2 Vlan100
11.2.1.0/32 Direct 0 0 11.2.1.2 Vlan100
11.2.1.2/32 Direct 0 0 127.0.0.1 InLoop0
11.2.1.255/32 Direct 0 0 11.2.1.2 Vlan100
127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0
127.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0
127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0
127.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0
224.0.0.0/4 Direct 0 0 0.0.0.0 NULL0
224.0.0.0/24 Direct 0 0 0.0.0.0 NULL0
255.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0
The output shows that routes 10.1.1.0/24, 10.2.1.0/24, 10.3.1.0/24 and 10.4.1.0/24 are summarized into a single route 10.0.0.0/8.
OSPF stub area configuration example
Network requirements
•
Enable OSPF on all switches, and split the AS into three areas.
•
Configure Switch A and Switch B as ABRs to forward routing information between areas.
• Configure Switch D as the ASBR to redistribute static routes.
•
Configure Area 1 as a stub area to reduce advertised LSAs without influencing reachability.
Figure 13 Network diagram
Switch A
Vlan-int100
Area 0
10.1.1.1/24
Vlan-int200
10.2.1.1/24
Vlan-int100
10.1.1.2/24
Switch B
Vlan-int200
10.3.1.1/24
Area 1
Stub
Vlan-int200
10.2.1.2/24
Switch C
Vlan-int300
10.4.1.1/24
Area 2
Vlan-int200
10.3.1.2/24
Vlan-int300
10.5.1.1/24
Switch D
ASBR
Configuration procedure
1. Configure IP addresses for interfaces. (Details not shown.)
2. Enable OSPF (see "
Basic OSPF configuration example ").
3. Configure route redistribution:
# Configure Switch D to redistribute static routes.
<SwitchD> system-view
[SwitchD] ip route-static 3.1.2.1 24 10.5.1.2
[SwitchD] ospf
[SwitchD-ospf-1] import-route static
[SwitchD-ospf-1] quit
60
# Display ABR/ASBR information on Switch C.
<SwitchC> display ospf abr-asbr
OSPF Process 1 with Router ID 10.4.1.1
Routing Table to ABR and ASBR
Type Destination Area Cost Nexthop RtType
Intra 10.2.1.1 0.0.0.1 3 10.2.1.1 ABR
Inter 10.5.1.1 0.0.0.1 7 10.2.1.1 ASBR
# Display OSPF routing table on Switch C.
<SwitchC> display ospf routing
OSPF Process 1 with Router ID 10.4.1.1
Routing Tables
Routing for Network
Destination Cost Type NextHop AdvRouter Area
10.2.1.0/24 3 Transit 10.2.1.2 10.2.1.1 0.0.0.1
10.3.1.0/24 7 Inter 10.2.1.1 10.2.1.1 0.0.0.1
10.4.1.0/24 3 Stub 10.4.1.1 10.4.1.1 0.0.0.1
10.5.1.0/24 17 Inter 10.2.1.1 10.2.1.1 0.0.0.1
10.1.1.0/24 5 Inter 10.2.1.1 10.2.1.1 0.0.0.1
Routing for ASEs
Destination Cost Type Tag NextHop AdvRouter
3.1.2.0/24 1 Type2 1 10.2.1.1 10.5.1.1
Total Nets: 6
Intra Area: 2 Inter Area: 3 ASE: 1 NSSA: 0
Because Switch C resides in a normal OSPF area, its routing table contains an AS external route.
4. Configure Area 1 as a stub area:
# Configure Switch A.
<SwitchA> system-view
[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> system-view
[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
# Display OSPF routing information on Switch C
[SwitchC] display ospf routing
61
OSPF Process 1 with Router ID 10.4.1.1
Routing Tables
Routing for Network
Destination Cost Type NextHop AdvRouter Area
0.0.0.0/0 4 Inter 10.2.1.1 10.2.1.1 0.0.0.1
10.2.1.0/24 3 Transit 10.2.1.2 10.2.1.1 0.0.0.1
10.3.1.0/24 7 Inter 10.2.1.1 10.2.1.1 0.0.0.1
10.4.1.0/24 3 Stub 10.4.1.1 10.4.1.1 0.0.0.1
10.5.1.0/24 17 Inter 10.2.1.1 10.2.1.1 0.0.0.1
10.1.1.0/24 5 Inter 10.2.1.1 10.2.1.1 0.0.0.1
Total Nets: 6
Intra Area: 2 Inter Area: 4 ASE: 0 NSSA: 0
After the area where Switch C resides is configured as a stub area, a default route takes the place of the AS external route.
# Configure the area as a totally stub area by filtering Type-3 LSAs out of 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
# Display OSPF routing information on Switch C.
[SwitchC] display ospf routing
OSPF Process 1 with Router ID 10.4.1.1
Routing Tables
Routing for Network
Destination Cost Type NextHop AdvRouter Area
0.0.0.0/0 4 Inter 10.2.1.1 10.2.1.1 0.0.0.1
10.2.1.0/24 3 Transit 10.2.1.2 10.4.1.1 0.0.0.1
10.4.1.0/24 3 Stub 10.4.1.1 10.4.1.1 0.0.0.1
Total Nets: 3
Intra Area: 2 Inter Area: 1 ASE: 0 NSSA: 0
After this configuration, inter-area routes are removed, and only one external route (a default route) exists.
OSPF NSSA area configuration example
Network requirements
•
Configure OSPF on all switches and split AS into three areas.
•
Configure Switch A and Switch B as ABRs to forward routing information between areas.
• Configure Area 1 as an NSSA area and configure Switch C as an ASBR to redistribute static routes into the AS.
62
Figure 14 Network diagram
Configuration procedure
1. Configure IP addresses for interfaces.
2. Enable OSPF (see "
Basic OSPF configuration example ").
3. Configure Area 1 as an NSSA area:
# Configure Switch A.
<SwitchA> system-view
[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> system-view
[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
NOTE:
•
To allow Switch C in the NSSA area to reach other areas within the AS, you must provide the keyword default-route-advertise for the nssa command issued on Switch A (the ABR) so that
Switch C can obtain a default route.
•
Configuring the nssa command with the keyword no-summary on Switch A can reduce the routing table size on NSSA Switches. On other NSSA Switches, you only need to configure the nssa command.
# Display OSPF routing information on Switch C.
[SwitchC] display ospf routing
OSPF Process 1 with Router ID 10.4.1.1
Routing Tables
Routing for Network
63
Destination Cost Type NextHop AdvRouter Area
0.0.0.0/0 65536 Inter 10.2.1.1 10.2.1.1 0.0.0.1
10.2.1.0/24 65535 Transit 10.2.1.2 10.4.1.1 0.0.0.1
10.4.1.0/24 3 Stub 10.4.1.1 10.4.1.1 0.0.0.1
Total Nets: 3
Intra Area: 2 Inter Area: 1 ASE: 0 NSSA: 0
4. Configure route redistribution:
# Configure Switch C to redistribute static routes.
[SwitchC] ip route-static 3.1.3.1 24 10.4.1.2
[SwitchC] ospf
[SwitchC-ospf-1] import-route static
[SwitchC-ospf-1] quit
# Display OSPF routing information on Switch D.
<SwitchD> display ospf routing
OSPF Process 1 with Router ID 10.5.1.1
Routing Tables
Routing for Network
Destination Cost Type NextHop AdvRouter Area
10.2.1.0/24 22 Inter 10.3.1.1 10.3.1.1 0.0.0.2
10.3.1.0/24 10 Transit 10.3.1.2 10.3.1.1 0.0.0.2
10.4.1.0/24 25 Inter 10.3.1.1 10.3.1.1 0.0.0.2
10.5.1.0/24 10 Stub 10.5.1.1 10.5.1.1 0.0.0.2
10.1.1.0/24 12 Inter 10.3.1.1 10.3.1.1 0.0.0.2
Routing for ASEs
Destination Cost Type Tag NextHop AdvRouter
3.1.3.0/24 1 Type2 1 10.3.1.1 10.2.1.1
Total Nets: 6
Intra Area: 2 Inter Area: 3 ASE: 1 NSSA: 0
The output shows an external route imported from the NSSA area exists on Switch D.
OSPF DR election configuration example
Network requirements
• Enable OSPF on Switches A, B, C, and D on the same network.
•
Configure Switch A as the DR, and configure Switch C as the BDR.
64
Figure 15 Network diagram
Configuration procedure
1. Configure IP addresses for interfaces. (Details not shown.)
2. Enable OSPF:
# Configure Switch A.
<SwitchA> system-view
[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
# Configure Switch B.
<SwitchB> system-view
[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> system-view
[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> system-view
[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
65
[SwitchD-ospf-1] return
# Display OSPF neighbor information of Switch A.
[SwitchA] display ospf peer verbose
OSPF Process 1 with Router ID 1.1.1.1
Neighbors
Area 0.0.0.0 interface 192.168.1.1(Vlan-interface1)'s neighbors
Router ID: 2.2.2.2 Address: 192.168.1.2 GR State: Normal
State: 2-Way Mode: None Priority: 1
DR: 192.168.1.4 BDR: 192.168.1.3 MTU: 0
Options is 0x02 (-|-|-|-|-|-|E|-)
Dead timer due in 38 sec
Neighbor is up for 00:01:31
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
Options is 0x02 (-|-|-|-|-|-|E|-)
Dead timer due in 31 sec
Neighbor is up for 00:01:28
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
Options is 0x02 (-|-|-|-|-|-|E|-)
Dead timer due in 31 sec
Neighbor is up for 00:01:28
Authentication Sequence: [ 0 ]
The output shows that Switch D is the DR and Switch C is the BDR.
3. Configure router priorities on interfaces:
# Configure Switch A.
[SwitchA] interface vlan-interface 1
[SwitchA-Vlan-interface1] ospf dr-priority 100
[SwitchA-Vlan-interface1] quit
# Configure Switch B.
[SwitchB] interface vlan-interface 1
[SwitchB-Vlan-interface1] ospf dr-priority 0
[SwitchB-Vlan-interface1] quit
# Configure Switch C.
[SwitchC] interface vlan-interface 1
[SwitchC-Vlan-interface1] ospf dr-priority 2
[SwitchC-Vlan-interface1] quit
# Display neighbor information of Switch D.
<SwitchD> display ospf peer verbose
66
OSPF Process 1 with Router ID 4.4.4.4
Neighbors
Area 0.0.0.0 interface 192.168.1.4(Vlan-interface1)'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
Options is 0x02 (-|-|-|-|-|-|E|-)
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
Options is 0x02 (-|-|-|-|-|-|E|-)
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
Options is 0x02 (-|-|-|-|-|-|E|-)
Dead timer due in 33 sec
Neighbor is up for 00:11:15
Authentication Sequence: [ 0 ]
The output shows that the DR and BDR are not changed, because the priority settings do not take effect immediately.
4. Restart OSPF process:
# Restart the OSPF process of Switch D.
<SwitchD> reset ospf 1 process
Warning : Reset OSPF process? [Y/N]:y
# Display neighbor information of Switch D.
<SwitchD> display ospf peer verbose
OSPF Process 1 with Router ID 4.4.4.4
Neighbors
Area 0.0.0.0 interface 192.168.1.4(Vlan-interface1)'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
Options is 0x02 (-|-|-|-|-|-|E|-)
Dead timer due in 39 sec
Neighbor is up for 00:01:40
Authentication Sequence: [ 0 ]
67
Router ID: 2.2.2.2 Address: 192.168.1.2 GR State: Normal
State: 2-Way Mode: None Priority: 0
DR: 192.168.1.1 BDR: 192.168.1.3 MTU: 0
Options is 0x02 (-|-|-|-|-|-|E|-)
Dead timer due in 35 sec
Neighbor is up for 00:01:44
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
Options is 0x02 (-|-|-|-|-|-|E|-)
Dead timer due in 39 sec
Neighbor is up for 00:01:41
Authentication Sequence: [ 0 ]
If the neighbor state is full, Switch D has established an adjacency with the neighbor. If the neighbor state is 2-way, the two switches are not the DR or the BDR, and they do not exchange
LSAs.
# Display OSPF interface information.
[SwitchA] display ospf interface
OSPF Process 1 with Router ID 1.1.1.1
Interfaces
Area: 0.0.0.0
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
IP Address Type State Cost Pri DR BDR
192.168.1.2 Broadcast DROther 1 0 192.168.1.1 192.168.1.3
The interface state DROther means the interface is not the DR or BDR.
OSPF virtual link configuration example
Network requirements
Configure a virtual link between Switch B and Switch C to connect Area 2 to the backbone area. After configuration, Switch B can learn routes to Area 2.
68
Figure 16 Network diagram
Configuration procedure
1. Configure IP addresses for interfaces. (Details not shown.)
2. Enable OSPF:
# Configure Switch A.
<SwitchA> system-view
[SwitchA] ospf 1 router-id 1.1.1.1
[SwitchA-ospf-1] area 0
[SwitchA-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255
[SwitchA-ospf-1-area-0.0.0.0] quit
# Configure Switch B.
<SwitchB> system-view
[SwitchB] ospf 1 router-id 2.2.2.2
[SwitchB-ospf-1] area 0
[SwitchB-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255
[SwitchB-ospf-1-area-0.0.0.0] quit
[SwitchB-ospf-1] area 1
[SwitchB–ospf-1-area-0.0.0.1] network 10.2.1.0 0.0.0.255
[SwitchB–ospf-1-area-0.0.0.1] quit
[SwitchB-ospf-1] quit
# Configure Switch C.
<SwitchC> system-view
[SwitchC] ospf 1 router-id 3.3.3.3
[SwitchC-ospf-1] area 1
[SwitchC-ospf-1-area-0.0.0.1] network 10.2.1.0 0.0.0.255
[SwitchC-ospf-1-area-0.0.0.1] quit
[SwitchC-ospf-1] area 2
[SwitchC–ospf-1-area-0.0.0.2] network 10.3.1.0 0.0.0.255
[SwitchC–ospf-1-area-0.0.0.2] quit
[SwitchC-ospf-1] quit
# Configure Switch D.
<SwitchD> system-view
[SwitchD] ospf 1 router-id 4.4.4.4
[SwitchD-ospf-1] area 2
[SwitchD-ospf-1-area-0.0.0.2] network 10.3.1.0 0.0.0.255
[SwitchD-ospf-1-area-0.0.0.2] quit
# Display the OSPF routing table on Switch B.
69
[SwitchB] display ospf routing
OSPF Process 1 with Router ID 2.2.2.2
Routing Tables
Routing for Network
Destination Cost Type NextHop AdvRouter Area
10.2.1.0/24 2 Transit 10.2.1.1 3.3.3.3 0.0.0.1
10.1.1.0/24 2 Transit 10.1.1.2 2.2.2.2 0.0.0.0
Total Nets: 2
Intra Area: 2 Inter Area: 0 ASE: 0 NSSA: 0
Area 0 has no direct connection to Area 2, so the routing table of Switch B has no route to Area
2.
3. Configure a virtual link:
# Configure Switch B.
[SwitchB] ospf
[SwitchB-ospf-1] area 1
[SwitchB-ospf-1-area-0.0.0.1] vlink-peer 3.3.3.3
[SwitchB-ospf-1-area-0.0.0.1] quit
[SwitchB-ospf-1] quit
# Configure Switch C.
[SwitchC] ospf 1
[SwitchC-ospf-1] area 1
[SwitchC-ospf-1-area-0.0.0.1] vlink-peer 2.2.2.2
[SwitchC-ospf-1-area-0.0.0.1] quit
# Display the OSPF routing table on Switch B.
[SwitchB] display ospf routing
OSPF Process 1 with Router ID 2.2.2.2
Routing Tables
Routing for Network
Destination Cost Type NextHop AdvRouter Area
10.2.1.0/24 2 Transit 10.2.1.1 3.3.3.3 0.0.0.1
10.3.1.0/24 5 Inter 10.2.1.2 3.3.3.3 0.0.0.0
10.1.1.0/24 2 Transit 10.1.1.2 2.2.2.2 0.0.0.0
Total Nets: 3
Intra Area: 2 Inter Area: 1 ASE: 0 NSSA: 0
The output shows that Switch B has learned the route 10.3.1.0/24 to Area 2.
Troubleshooting OSPF configuration
No OSPF neighbor relationship established
Symptom
No OSPF neighbor relationship can be established.
70
Analysis
If the physical link and lower layer protocols work well, verify OSPF parameters configured on interfaces.
Two neighbors must have the same parameters, such as the area ID, network segment, and mask (a P2P or virtual link can have different network segments and masks).
Solution
1. Use the display ospf peer command to verify OSPF neighbor information.
2. Use the display ospf interface command to verify OSPF interface information.
3. Ping the neighbor router's IP address to verify that the connectivity is normal.
4. Verify OSPF timers. The dead interval on an interface must be at least four times the hello interval.
5. On an NBMA network, use the peer ip-address command to manually specify the neighbor.
6. At least one interface must have a router priority higher than 0 on an NBMA or a broadcast network.
Incorrect routing information
Symptom
OSPF cannot find routes to other areas.
Analysis
The backbone area must maintain connectivity to all other areas. If a router connects to more than one area, at least one area must be connected to the backbone. The backbone cannot be configured as a stub area.
In a stub area, all routers cannot receive external routes, and all interfaces connected to the stub area must belong to the stub area.
Solution
1. Use the display ospf peer command to verify neighbor information.
2. Use the display ospf interface command to verify OSPF interface information.
3. Use the display ospf lsdb command to verify the LSDB.
4.
Use the display current-configuration configuration ospf command to verify area configuration. If more than two areas are configured, at least one area is connected to the backbone.
5. In a stub area, all routers attached are configured with the stub command. In an NSSA area, all routers attached are configured with the nssa command.
6. If a virtual link is configured, use the display ospf vlink command to verify the state of the virtual link.
71
Configuring BGP
Overview
Border Gateway Protocol (BGP) is an exterior gateway protocol (EGP). It is called internal BGP (IBGP) when it runs within an AS and called external BGP (EBGP) when it runs between ASs.
The current version in use is BGP-4 (RFC 4271).
BGP has the following characteristics:
•
Focuses on route control and selection rather than route discovery and calculation.
•
Uses TCP to enhance reliability.
• Measures the distance of a route by using a list of ASs that the route must travel through to reach the destination. BGP is also called a path-vector protocol.
•
Supports CIDR.
•
Reduces bandwidth consumption by advertising only incremental updates. BGP is very suitable to advertise large numbers of routes on the Internet.
•
Eliminates routing loops by adding AS path information to BGP route updates.
•
Uses policies to implement flexible route filtering and selection.
•
Has good scalability.
BGP speaker and BGP peer
A router running BGP is a BGP speaker. A BGP speaker establishes peer relationships with other BGP speakers to exchange routing information over TCP connections.
BGP peers include the following types:
•
IBGP peers—Reside in the same AS as the local router.
•
EBGP peers—Reside in different ASs from the local router.
BGP message types
BGP uses the following message types:
•
Open—After establishing a TCP connection, BGP sends an Open message to establish a session with the peer.
• Update—BGP sends update messages to exchange routing information between peers. Each update message can advertise a group of feasible routes with identical attributes and multiple withdrawn routes.
• Keepalive—BGP sends Keepalive messages between peers to maintain connectivity.
•
Route-refresh—BGP sends a Route-refresh message to request the routing information of a specified address family from a peer.
• Notification—BGP sends a Notification message upon detecting an error and immediately closes the connection.
72
BGP path attributes
BGP uses the following path attributes in update messages for route filtering and selection:
• ORIGIN
The ORIGIN attribute specifies the origin of BGP routes. This attribute has the following types:
{
IGP—Has the highest priority. Routes generated in the local AS have the IGP attribute.
{
EGP—Has the second highest priority. Routes obtained through EGP have the EGP attribute.
{
INCOMPLETE—Has the lowest priority. The source of routes with this attribute is unknown.
Routes redistributed from other routing protocols have the INCOMPLETE attribute.
•
AS_PATH
The AS_PATH attribute identifies the ASs through which a route has passed. Before advertising a route to another AS, BGP adds the local AS number into the AS_PATH attribute, so the receiver can determine ASs to route the message back.
The AS_PATH attribute has the following types:
{
{
AS_SEQUENCE—Arranges AS numbers in sequence. As shown in Figure 17 , the number of the
AS closest to the receiver's AS is leftmost.
AS_SET—Arranges AS numbers randomly.
Figure 17 AS_PATH attribute
BGP uses the AS_PATH attribute to implement the following functions:
{
Avoid routing loops—A BGP router does not receive routes containing the local AS number to avoid routing loops.
{
Affect route selection—BGP gives priority to the route with the shortest AS_PATH length if other factors are the same. As shown in
Figure 17 , the BGP router in AS 50 gives priority to the route
passing AS 40 for sending data to the destination 8.0.0.0. In some applications, you can apply a routing policy to control BGP route selection by modifying the AS_PATH length. For more information about routing policy, see "
Configuring a routing policy ."
73
{
Filter routes—By using an AS path list, you can filter routes based on AS numbers contained in the AS_PATH attribute. For more information about AS path list, see "
Configuring a routing policy ."
• NEXT_HOP
The NEXT_HOP attribute may not be the IP address of a directly-connected router. Its value is determined as follows:
{
{
{
When a BGP speaker advertises a self-originated route to a BGP peer, it sets the address of the sending interface as the NEXT_HOP.
When a BGP speaker sends a received route to an EBGP peer, it sets the address of the sending interface as the NEXT_HOP.
When a BGP speaker sends a route received from an EBGP peer to an IBGP peer, it does not modify the NEXT_HOP attribute. If load balancing is configured, BGP modifies the NEXT_HOP
attribute for the equal-cost routes. For load balancing information, see " BGP load balancing ."
Figure 18 NEXT_HOP attribute
• MED (MULTI_EXIT_DISC)
BGP advertises the MED attribute between two neighboring ASs, each of which does not advertise the attribute to any other AS.
Similar to metrics used by IGPs, MED is used to determine the best route for traffic going into an AS.
When a BGP router obtains multiple routes to the same destination, but with different next hops from different EBGP peers, it considers the route with the smallest MED value the best route given that other conditions are the same. As shown in
, traffic from AS 10 to AS 20 travels through Router B that is selected according to MED.
74
Figure 19 MED attribute
2.1.1.1
MED = 0
Router B
D = 9.0.0.0
Next_hop = 2.1.1.1
MED = 0
EBGP
Router A
IBGP
IBGP
9.0.0.0
Router D
D = 9.0.0.0
Next_hop = 3.1.1.1
MED = 100
EBGP IBGP
AS 10
3.1.1.1
Router C
MED = 100
AS 20
Generally BGP only compares MEDs of routes received from the same AS. You can also use the compare-different-as-med command to force BGP to compare MED values of routes received from different ASs.
• LOCAL_PREF
The LOCAL_PREF attribute is exchanged between IBGP peers only, and is not advertised to any other AS. It indicates the priority of a BGP router.
BGP uses LOCAL_PREF to determine the best route for traffic leaving the local AS. When a BGP router obtains from several IBGP peers multiple routes to the same destination but with different next hops, it considers the route with the highest LOCAL_PREF value as the best route. As shown
, traffic from AS 20 to AS 10 travels through Router C that is selected according to
LOCAL_PREF.
75
Figure 20 LOCAL_PREF attribute
•
COMMUNITY
The COMMUNITY attribute identifies the community of BGP routes. A BGP community is a group of routes with the same characteristics. It has no geographical boundaries. Routes of different ASs can belong to the same community.
A route can carry one or more COMMUNITY attribute values (each of which is represented by a
4-byte integer). A router uses the COMMUNITY attribute to determine whether to advertise the route and the advertising scope without using complex filters such as ACLs. This mechanism simplifies routing policy configuration, management, and maintenance.
Well-known COMMUNITY attributes involve the following:
{
{
{
{
INTERNET—By default, all routes belong to the Internet community. Routes with this attribute can be advertised to all BGP peers.
NO_EXPORT—Routes with this attribute cannot be advertised out of the local AS or out of the local confederation, but can be advertised to other sub-ASs in the confederation. For confederation information, see "
Settlements for problems in large-scale BGP networks ."
{
{
No_ADVERTISE—Routes with this attribute cannot be advertised to other BGP peers.
No_EXPORT_SUBCONFED—Routes with this attribute cannot be advertised out of the local AS or other sub-ASs in the local confederation.
You can configure BGP community lists to filter BGP routes based on the BGP COMMUNITY attribute.
•
Extended community attribute
To meet new demands, BGP defines the extended community attribute. The extended community attribute has the following advantages over the COMMUNITY attribute:
Provides more attribute values by extending the attribute length to eight bytes.
Allows for using different types of extended community attributes in different scenarios to enhance route filtering and control and simplify configuration and management.
76
BGP route selection
BGP discards routes with unreachable NEXT_HOPs. If multiple routes to the same destination are available, BGP selects the best route in the following sequence:
1. The route with the highest Preferred_value.
2. The route with the highest LOCAL_PREF.
3. The route generated by the network command, the route redistributed by the import-route command, or the summary route in turn.
4. The route with the shortest AS_PATH.
5. The IGP, EGP, or INCOMPLETE route in turn.
6. The route with the lowest MED value.
7. The route learned from EBGP, confederation EBGP, confederation IBGP, or IBGP in turn.
8.
The route with the smallest next hop metric.
9. The route with the shortest CLUSTER_LIST.
10. The route with the smallest ORIGINATOR_ID.
11. The route advertised by the router with the smallest router ID.
12. The route advertised by the peer with the lowest IP address.
The CLUSTER_IDs of route reflectors form a CLUSTER_LIST. If a route reflector receives a route that contains its own CLUSTER ID in the CLUSTER_LIST, the router discards the route to avoid routing loops.
If load balancing is configured, the system selects available routes to implement load balancing.
BGP route advertisement rules
BGP follow these rules for route advertisement:
• When multiple feasible routes to a destination exist, BGP advertises only the best route to its peers.
If the advertise-rib-active command is configured, BGP advertises the best route in the IP routing table; if not, BGP advertise the best route in the BGP routing table.
• BGP advertises only routes that it uses.
•
BGP advertises routes learned from an EBGP peer to all BGP peers, including both EBGP and IBGP peers.
•
BGP advertises routes learned from an IBGP peer to EBGP peers, rather than other IBGP peers.
• After establishing a session with a new BGP peer, BGP advertises all the routes matching the above rules to the peer. After that, BGP advertises only incremental updates to the peer.
BGP load balancing
BGP implements load balancing through route recursion and route selection.
•
BGP load balancing through route recursion.
The next hop of a BGP route may not be directly connected. One of the reasons is next hops in routing information exchanged between IBGP peers are not modified. The BGP router must find the directly-connected next hop through IGP. The matching route with the direct next hop is called the
"recursive route." The process of finding a recursive route is route recursion.
The system supports BGP load balancing based on route recursion. If multiple recursive routes to the same destination are load balanced (suppose three direct next hop addresses), BGP generates
77
the same number of next hops to forward packets. BGP load balancing based on route recursion is always enabled by the system rather than configured by using commands.
•
BGP load balancing through route selection.
IGP routing protocols, such as RIP and OSPF, compute the metrics of routes, and implement load balancing over the routes with the same metric and to the same destination. The route selection criterion is metric.
BGP has no route computation algorithm, so it cannot perform load balancing according to the metrics of routes. BGP implements load balancing over the routes that meet the following requirements:
{
The routes have the same AS_PATH, ORIGIN, LOCAL_PREF, and MED attributes.
{
The routes are all reflected or not reflected by the route reflector.
BGP does not use the route selection rules described in "
" for load balancing.
Figure 21 Network diagram
route 9.0.0.0 to Router C. If load balancing with a maximum number of two routes is configured on
Router C, and the two routes have the same AS_PATH, ORIGIN, LOCAL_PREF, and MED, Router C installs both the two routes to its routing table for load balancing. After that, Router C forwards to Router
A and Router B a single route that has NEXT_HOP changed to Router C and other attributes changed to those of the best route.
NOTE:
BGP load balancing is applicable between EBGP peers, between IBGP peers, and between confederations.
Settlements for problems in large-scale BGP networks
You can use the following methods to facilitate management and improve route distribution efficiency on a large-scale BGP network.
• Route summarization
Route summarization can reduce the BGP routing table size by advertising summary routes rather than more specific routes.
78
The system supports both manual and automatic route summarization. Manual route summarization allows you to determine the attribute of a summary route and whether to advertise more specific routes.
• Route dampening
Route frapping (a route comes up and disappears in the routing table frequently) causes BGP to send many routing updates. It can consume too many resources and affect other operations.
In most cases, BGP runs in complex networks where route changes are more frequent. To solve the problem caused by route flapping, you can use BGP route dampening to suppress unstable routes.
BGP route dampening uses a penalty value to judge the stability of a route. The bigger the value, the less stable the route. Each time a route state change (from reachable to unreachable) occurs, or a reachable route's attribute changes, BGP adds a penalty value (1000, which is a fixed number and cannot be changed) to the route. When the penalty value of the route exceeds the suppress value, the route is suppressed and cannot become the optimal route. When the penalty value reaches the upper limit, no penalty value is added.
If the suppressed route does not flap, its penalty value gradually decreases to half of the suppress value after a period of time. This period is called "Half-life." When the value decreases to the reusable threshold value, the route is usable again.
Figure 22 BGP route dampening
Penalty value
Suppress threshold
Reusable threshold
Suppress time
Time
Half-life
•
Peer group
You can organize BGP peers with the same attributes into a group to simplify their configurations.
When a peer joins the peer group, the peer obtains the same configuration as the peer group. If the configuration of the peer group is changed, the configuration of group members is changed.
•
Community
You can apply a community list or an extended community list to a routing policy for route control.
For more information, see " BGP path attributes
."
•
Route reflector
IBGP peers must be fully meshed to maintain connectivity. If n routers exist in an AS, the number of
IBGP connections is n(n-1)/2. If a large number of IBGP peers exist, large amounts of network and
CPU resources are consumed to maintain sessions.
79
Using route reflectors can solve this issue. In an AS, a router acts as a route reflector, and other routers act as clients connecting to the route reflector. The route reflector forwards routing information received from a client to other clients. In this way, all clients can receive routing information from one another without establishing BGP sessions.
, must establish BGP sessions to the route reflector and other non-clients.
Figure 23 Network diagram for a route reflector
The route reflector and clients form a cluster. Typically a cluster has one route reflector. The ID of the route reflector is the Cluster_ID. You can configure more than one route reflector in a cluster to improve availability, as shown in
. The configured route reflectors must have the same
Cluster_ID to avoid routing loops.
Figure 24 Network diagram for route reflectors
When the BGP routers in an AS are fully meshed, route reflection is unnecessary because it consumes more bandwidth resources. You can use commands to disable route reflection instead of modifying network configuration or changing network topology.
After route reflection is disabled between clients, routes can still be reflected between a client and a non-client.
•
Confederation
80
Confederation is another method to manage growing IBGP connections in an AS. It splits an AS into multiple sub-ASs. In each sub-AS, IBGP peers are fully meshed. As shown in
, intra-confederation EBGP connections are established between sub-ASs in AS 200.
Figure 25 Confederation network diagram
A non-confederation BGP speaker does not need to know sub-ASs in the confederation. It considers the confederation as one AS, and the confederation ID as the AS number. In the above figure, AS 200 is the confederation ID.
Confederation has a deficiency. When you change an AS into a confederation, you must reconfigure the routers, and the topology will be changed.
In large-scale BGP networks, you can use both route reflector and confederation.
MP-BGP
BGP-4 carries only IPv4 unicast routing information. IETF extended BGP-4 by introducing Multiprotocol
Extensions for BGP-4 (MP-BGP).
MP-BGP is backward compatible with BGP.
MP-BGP extended attributes
Prefixes and next hops are key routing information. BGP-4 uses update messages to carry feasible route prefixes in the Network Layer Reachability Information (NLRI) field, unfeasible route prefixes in the withdrawn routes field, and next hops in the NEXT_HOP attribute. These attributes cannot carry routing information for multiple network layer protocols.
To support multiple network layer protocols, MP-BGP defines the following path attributes:
•
MP_REACH_NLRI—Carries feasible route prefixes and next hops for multiple network layer protocols.
• MP_UNREACH_NLRI—Carries unfeasible route prefixes for multiple network layer protocols.
MP-BGP uses these two attributes to advertise feasible and unfeasible routes for different network layer protocols. BGP speakers not supporting MP-BGP ignore updates containing these attributes and do not forward them to its peers.
81
Address family
MP-BGP uses address families and subsequent address families to identify different network layer protocols for routes contained in the MP_REACH_NLRI and MP_UNREACH_NLRI attributes. For example, an Address Family Identifier (AFI) of 2 and a Subsequent Address Family Identifier (SAFI) of 1 identify
IPv6 unicast routing information carried in the MP_REACH_NLRI attribute. For address family values, see
RFC 1700.
BGP configuration views
BGP uses different views to manage routing information for different address families and different VPN instances. Most BGP commands are available in all BGP views. BGP supports multiple VPN instances by establishing a separate routing table for each VPN.
describes different BGP views.
Table 3 BGP views
View names
BGP view
BGP IPv4 unicast address family view
BGP IPv6 unicast address family view
BGP-VPN instance view
BGP-VPN IPv4 unicast address family view
Ways to enter the views
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp]
Remarks
Configurations in this view are effective for routes and peers of all address families on the public network and in all VPN instances
(such as confederation, GR, and logging configurations), or only for routes and peers of all address families on the public network.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] address-family ipv4 unicast
[Sysname-bgp-ipv4]
Configurations in this view are effective for IPv4 unicast routes and peers on the public network.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] address-family ipv6 unicast
[Sysname-bgp-ipv6]
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ip vpn-instance vpn1
[Sysname-bgp-vpn1]
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ip vpn-instance vpn1
[Sysname-bgp-vpn1] address-family ipv4 unicast
[Sysname-bgp-ipv4-vpn1]
Configurations in this view are effective for IPv6 unicast routes and peers on the public network.
Configurations in this view are effective for routes and peers of all address families in the specified VPN instance.
Configurations in this view are effective for IPv4 unicast routes and peers in the specified VPN instance.
82
View names
BGP-VPN IPv6 unicast address family view
Ways to enter the views Remarks
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ip vpn-instance vpn1
[Sysname-bgp-vpn1] address-family ipv6 unicast
[Sysname-bgp-ipv6-vpn1]
Configurations in this view are effective for IPv6 unicast routes and peers in the specified VPN instance.
Protocols and standards
• RFC 1700, ASSIGNED NUMBERS
•
RFC 1771, A Border Gateway Protocol 4 (BGP-4)
•
RFC 2858, Multiprotocol Extensions for BGP-4
• RFC 3392, Capabilities Advertisement with BGP-4
• RFC 2918, Route Refresh Capability for BGP-4
•
RFC 2439, BGP Route Flap Damping
•
RFC 1997, BGP Communities Attribute
• RFC 2796, BGP Route Reflection
• RFC 3065, Autonomous System Confederations for BGP
•
RFC 4271, A Border Gateway Protocol 4 (BGP-4)
•
RFC 4724, Graceful Restart Mechanism for BGP
• RFC 4360, BGP Extended Communities Attribute
•
RFC 4760, Multiprotocol Extensions for BGP-4
BGP configuration task list
In a basic BGP network, you only need to perform the following configurations:
•
Enable BGP.
•
Configure BGP peers or peer groups. If you configure a BGP setting at both the peer group and the peer level, the most recent configuration takes effect on the peer.
• Control BGP route generation.
To control BGP route distribution and path selection, you must perform additional configuration tasks.
To configure BGP, perform the following tasks (IPv4):
Tasks at a glance
:
•
(Required.)
•
(Required.) Perform one of the following tasks:
{
{
•
(Optional.) Specifying the source interface for TCP connections
Remarks
HP recommends that you configure BGP peer groups on large scale
BGP networks for easy configuration and maintenance.
83
Tasks at a glance
(perform at least one of the following tasks):
•
•
(Optional.) Controlling route distribution and reception :
•
Configuring BGP route summarization
•
Advertising optimal routes in the IP routing table
•
Advertising a default route to a peer or peer group
•
Limiting routes received from a peer or peer group
•
Configuring BGP route filtering policies
•
Configuring BGP route dampening
(Optional.) Controlling BGP path selection :
•
Specifying a preferred value for routes received
•
Configuring preferences for BGP routes
•
Configuring the default local preference
•
•
Configuring the NEXT_HOP attribute
•
Configuring the AS_PATH attribute
Remarks
N/A
N/A
N/A
(Optional.) Tuning and optimizing BGP networks
:
•
Configuring the keepalive interval and hold time
•
Configuring the interval for sending updates for the same route
•
Enabling BGP to establish an EBGP session over multiple hops
•
Enabling immediate reestablishment of direct EBGP connections upon link failure
•
Enabling 4-byte AS number suppression
•
Enabling MD5 authentication for BGP peers
•
Configuring BGP load balancing
•
Disabling BGP to establish a session to a peer or peer group
•
•
Protecting an EBGP peer when memory usage reaches level 2 threshold
N/A
(Optional.) Configuring a large-scale BGP network
:
•
•
Configuring BGP route reflection
•
Ignoring the ORIGINATOR_ID attribute
•
Configuring a BGP confederation
N/A
(Optional.) Configuring BGP GR N/A
(Optional.) Enabling SNMP notifications for BGP
N/A
(Optional.) Enabling logging of session state changes
N/A
(Optional.) Configuring BFD for BGP N/A
To configure BGP, perform the following tasks (IPv6):
84
Tasks at a glance
:
•
(Required.)
•
(Required.) Perform one of the following tasks:
{
{
•
(Optional.) Specifying the source interface for TCP connections
(perform at least one of the following tasks):
•
•
(Optional.) Controlling route distribution and reception :
•
Configuring BGP route summarization
•
Advertising optimal routes in the IP routing table
•
Advertising a default route to a peer or peer group
•
Limiting routes received from a peer or peer group
•
Configuring BGP route filtering policies
•
Configuring BGP route dampening
i (Optional.)
Controlling BGP path selection :
•
Specifying a preferred value for routes received
•
Configuring preferences for BGP routes
•
Configuring the default local preference
•
•
Configuring the NEXT_HOP attribute
•
Configuring the AS_PATH attribute
(Optional.) Tuning and optimizing BGP networks
:
•
Configuring the keepalive interval and hold time
•
Configuring the interval for sending updates for the same route
•
Enabling BGP to establish an EBGP session over multiple hops
•
Enabling immediate reestablishment of direct EBGP connections upon link failure
•
Enabling 4-byte AS number suppression
•
Enabling MD5 authentication for BGP peers
•
Configuring BGP load balancing
•
•
Protecting an EBGP peer when memory usage reaches level 2 threshold
(Optional.) Configuring a large-scale BGP network
:
•
•
Configuring BGP route reflection
•
Ignoring the ORIGINATOR_ID attribute
•
Configuring a BGP confederation
Remarks
HP recommends that you configure BGP peer groups on large scale
BGP networks for easy configuration and maintenance.
N/A
N/A
N/A
N/A
N/A
(Optional.) Configuring BGP GR N/A
(Optional.) Enabling SNMP notifications for BGP
N/A
(Optional.) Enabling logging of session state changes
N/A
(Optional.) Configuring BFD for BGP N/A
85
Configuring basic BGP
This section describes the basic settings required for a BGP network to run.
Enabling BGP
A router ID is the unique identifier of a BGP router in an AS.
•
To ensure the uniqueness of a router ID and enhance availability, specify in BGP view the IP address of a local loopback interface as the router ID.
•
If no router ID is specified in BGP view, the global router ID is used.
•
To modify a non-zero router ID of BGP, use the router-id command in BGP view, rather than the router id command in system view.
• If you specify a router ID in BGP view and then remove the interface that owns the router ID, the router does not select a new router ID. To select a new router ID, use the undo router-id command in BGP view.
To enable BGP:
1. Enter system view.
2. Configure a global router ID. router id router-id
3. Enable BGP and enter BGP view or BGP-VPN instance view.
4. Configure the router ID. system-view
•
Enable BGP and enter BGP view: bgp as-number
•
Enable BGP and enter
BGP-VPN instance view: a. bgp as-number b. ip vpn-instance
vpn-instance-name router-id { router-id | auto-select }
N/A
By default, no global router ID is configured, and BGP uses the highest loopback interface IP address—if any—as the router ID. If no loopback interface IP address is available, BGP uses the highest physical interface IP address as the route ID regardless of the interface status.
By default, BGP is not enabled.
A router can reside in only one AS, so the router can run only one BGP process.
To enter BGP-VPN instance view, the specified VPN instance must already exist and have the route distinguisher
(RD) configured. For more information, see MCE Configuration
Guide.
By default, the global router ID is used.
The auto-select keyword is supported only in BGP-VPN instance view.
86
Configuring a BGP peer
Configuring an IPv4 BGP peer
1. Enter system view.
2. Enter BGP view or BGP-VPN instance view.
3. Create an IPv4 BGP peer and specify its AS number.
4. (Optional.) Configure a description for a peer.
5. Create the BGP IPv4 unicast address family or BGP-VPN
IPv4 unicast address family and enter its view.
6. Enable the router to exchange
IPv4 unicast routing information with the specified peer.
Configuring an IPv6 BGP peer system-view
•
Enter BGP view: bgp as-number
•
Enter BGP-VPN instance view: a. bgp as-number b. ip vpn-instance
vpn-instance-name peer ip-address as-number
as-number peer ip-address description
description-text address-family ipv4 [ unicast ] peer ip-address enable
N/A
N/A
By default, no IPv4 BGP peer is created.
By default, no description is configured for a peer.
By default, the BGP IPv4 unicast address family or BGP-VPN IPv4 unicast address family is not created.
By default, the router cannot exchange IPv4 unicast routing information with the peer.
1. Enter system view.
2. Enter BGP view or BGP-VPN instance view.
3. Create an IPv6 BGP peer and specify its AS number.
4. (Optional.) Configure a description for a peer.
5. Create the BGP IPv6 unicast address family or BGP-VPN
IPv6 unicast address family and enter its view.
6. Enable the router to exchange
IPv6 unicast routing information with the specified peer. system-view
•
Enter BGP view: bgp as-number
•
Enter BGP-VPN instance view: a. bgp as-number b. ip vpn-instance
vpn-instance-name peer ipv6-address as-number
as-number peer ipv6-address description
description-text address-family ipv6 [ unicast ] peer ipv6-address enable
N/A
N/A
By default, no IPv6 BGP peer is created.
By default, no description is configured for a peer.
By default, the BGP IPv6 unicast address family or BGP-VPN IPv6 unicast address family is not created.
By default, the router cannot exchange IPv6 unicast routing information with the peer.
87
Configuring a BGP peer group
The peers in a peer group use the same route selection policy.
In a large-scale network, many peers can use the same route selection policy. You can configure a peer group and add these peers into this group. When you change the policy for the group, the modification also applies to the peers in the group.
A peer group is an IBGP peer group if peers in it belong to the local AS, and is an EBGP peer group if peers in it belong to different ASs.
Configuring an IBGP peer group
After you create an IBGP peer group and then add a peer into it, the system creates the peer in BGP view and specifies the local AS number for the peer.
To configure an IBGP peer group (IPv4):
1. Enter system view.
2. Enter BGP view or BGP-VPN instance view. system-view
•
Enter BGP view: bgp as-number
•
Enter BGP-VPN instance view: a. bgp as-number b. ip vpn-instance
vpn-instance-name
N/A
N/A
3.
4.
Create an IBGP peer group.
Add a peer into the IBGP peer group.
5. (Optional.) Configure a description for a peer group. group group-name [ internal ] peer ip-address group group-name
[ as-number as-number ] peer group-name description
description-text
6. Create the BGP IPv4 unicast address family or BGP-VPN
IPv4 unicast address family and enter its view.
7. Enable the router to exchange
IPv4 unicast routing information with peers in the specified peer group. address-family ipv4 [ unicast ] peer group-name enable
To configure an IBGP peer group (IPv6):
By default, no IBGP peer group is created.
By default, no peer exists in the peer group.
To use the as-number as-number option, you must specify the local
AS number.
By default, no description is configured for the peer group.
By default, the BGP IPv4 unicast address family or BGP-VPN IPv4 unicast address family is not created.
By default, the router cannot exchange IPv4 unicast routing information with the peers.
1. Enter system view. system-view N/A
88
2. Enter BGP view or BGP-VPN instance view.
•
Enter BGP view: bgp as-number
•
Enter BGP-VPN instance view: a. bgp as-number b. ip vpn-instance
vpn-instance-name
N/A
3. Create an IBGP peer group. group group-name [ internal ]
By default, no IBGP peer group is created.
4. Add a peer into the IBGP peer group.
5. (Optional.) Configure a description for a peer group.
6. Create the BGP IPv6 unicast address family or BGP-VPN
IPv6 unicast address family and enter its view.
7. Enable the router to exchange
IPv6 unicast routing information with peers in the specified peer group. peer ipv6-address group
group-name [ as-number
as-number ] peer group-name description
description-text address-family ipv6 [ unicast ] peer group-name enable
By default, no peer exists in the peer group.
To use the as-number as-number option, you must specify the local
AS number.
By default, no description is configured for the peer group.
By default, the BGP IPv6 unicast address family or BGP-VPN IPv6 unicast address family is not created.
By default, the router cannot exchange IPv6 unicast routing information with the peers.
Configuring an EBGP peer group
If peers in an EBGP group belong to the same external AS, the EBGP peer group is a pure EBGP peer group. If not, it is a mixed EBGP peer group.
Use one of the following methods to configure an EBGP peer group:
•
Method 1—Create an EBGP peer group, specify its AS number, and add peers into it. All the added peers have the same AS number. All peers in the peer group have the same AS number as the peer group. You can specify an AS number for a peer before adding it into the peer group. The
AS number must be the same as that of the peer group.
•
Method 2—Create an EBGP peer group, specify an AS number for a peer, and add the peer into the peer group. Peers added in the group can have different AS numbers.
• Method 3—Create an EBGP peer group and add a peer with an AS number into it. Peers added in the group can have different AS numbers.
To configure an EBGP peer group by using Method 1 (IPv4):
Step Command
1. Enter system view. system-view
Remarks
N/A
89
Step Command
2. Enter BGP view or BGP-VPN instance view.
•
Enter BGP view: bgp as-number
•
Enter BGP-VPN instance view: a. bgp as-number b. ip vpn-instance
vpn-instance-name
Remarks
N/A
3.
4.
5.
Create an EBGP peer group. group group-name external
Specify the AS number for the group.
Add a peer into the EBGP peer group.
6. (Optional.) Configure a description for a peer group. peer group-name as-number
as-number peer ip-address group group-name
[ as-number as-number ] peer group-name description
description-text
7. Create the BGP IPv4 unicast address family or BGP-VPN
IPv4 unicast address family and enter its view.
8. Enable the router to exchange
IPv4 unicast routing information with peers in the specified peer group. address-family ipv4 [ unicast ] peer group-name enable
To configure an EBGP peer group by using Method 1 (IPv6):
By default, no EBGP peer group is created.
By default, no AS number is specified.
If a peer group contains peers, you cannot remove or change its AS number.
By default, no peer exists in the peer group.
The as-number as-number option, if used, must specify the same AS number as the peer group-name as-number as-number command.
By default, no description is configured for the peer group.
By default, the BGP IPv4 unicast address family or BGP-VPN IPv4 unicast address family is not created.
By default, the router cannot exchange IPv4 unicast routing information with the peers.
Step Command
1. Enter system view. system-view
2. Enter BGP view or BGP-VPN instance view.
•
Enter BGP view: bgp as-number
•
Enter BGP-VPN instance view: a. bgp as-number b. ip vpn-instance
vpn-instance-name
Remarks
N/A
N/A
3. Create an EBGP peer group. group group-name external
4. Specify the AS number for the group. peer group-name as-number
as-number
By default, no EBGP peer group is created.
By default, no AS number is specified.
If a peer group contains peers, you cannot remove or change its AS number.
90
Step Command
5. Add a peer into the EBGP peer group. peer ipv6-address group
group-name [ as-number
as-number ]
6. (Optional.) Configure a description for a peer group. peer group-name description
description-text
7. Create the BGP IPv6 unicast address family or BGP-VPN
IPv6 unicast address family and enter its view.
8. Enable the router to exchange
IPv6 unicast routing information with peers in the specified peer group. address-family ipv6 [ unicast ] peer group-name enable
To configure an EBGP peer group by using Method 2 (IPv4):
Remarks
By default, no peer exists in the peer group.
The as-number as-number option, if used, must specify the same AS number as the peer group-name as-number as-number command.
By default, no description is configured for the peer group.
By default, the BGP IPv6 unicast address family or BGP-VPN IPv6 unicast address family is not created.
By default, the router cannot exchange IPv6 unicast routing information with the peers.
Step Command
1. Enter system view. system-view
2. Enter BGP view or BGP-VPN instance view.
•
Enter BGP view: bgp as-number
•
Enter BGP-VPN instance view: a. bgp as-number b. ip vpn-instance
vpn-instance-name
Remarks
N/A
N/A
3.
4.
5.
6.
Create an EBGP peer group. group group-name external
Create an IPv4 BGP peer and specify its AS number.
Add the peer into the EBGP peer group.
(Optional.) Configure a description for a peer group.
7. Create the BGP IPv4 unicast address family or BGP-VPN
IPv4 unicast address family and enter its view.
8. Enable the router to exchange
IPv4 unicast routing information with peers in the specified peer group. peer ip-address as-number
as-number peer ip-address group group-name
[ as-number as-number ] peer group-name description
description-text address-family ipv4 [ unicast ] peer group-name enable
By default, no EBGP peer group is created.
By default, no IPv4 BGP peer is created.
By default, no peer exists in the peer group.
The as-number as-number option, if used, must specify the same AS number as the peer ip-address as-number as-number command.
By default, no description is configured for the peer group.
By default, the BGP IPv4 unicast address family or BGP-VPN IPv4 unicast address family is not created.
By default, the router cannot exchange IPv4 unicast routing information with the peers.
91
To configure an EBGP peer group by using Method 2 (IPv6):
Step Command
1. Enter system view. system-view
2. Enter BGP view or BGP-VPN instance view.
•
Enter BGP view: bgp as-number
•
Enter BGP-VPN instance view: a. bgp as-number b. ip vpn-instance
vpn-instance-name
Remarks
N/A
N/A
3. Create an EBGP peer group. group group-name external
4. Create an IPv6 BGP peer and specify its AS number.
5. Add the peer into the EBGP peer group. peer ipv6-address as-number
as-number peer ipv6-address group
group-name [ as-number
as-number ]
6. (Optional.) Configure a description for the peer group. peer group-name description
description-text
7. Create the BGP IPv6 unicast address family or BGP-VPN
IPv6 unicast address family and enter its view.
8. Enable the router to exchange
IPv6 unicast routing information with peers in the specified peer group. address-family ipv6 [ unicast ] peer group-name enable
To configure an EBGP peer group by using Method 3 (IPv4):
By default, no EBGP peer group is created.
By default, no IPv6 BGP peer is created.
By default, no peer exists in the peer group.
The as-number as-number option, if used, must specify the same AS number as the peer ip-address as-number as-number command.
By default, no description is configured for the peer group.
By default, the BGP IPv6 unicast address family or BGP-VPN IPv6 unicast address family is not created.
By default, the router cannot exchange IPv6 unicast routing information with the peers.
Step Command
1. Enter system view. system-view
2. Enter BGP view or BGP-VPN instance view.
•
Enter BGP view: bgp as-number
•
Enter BGP-VPN instance view: a. bgp as-number b. ip vpn-instance
vpn-instance-name
Remarks
N/A
N/A
3.
4.
5.
Create an EBGP peer group. group group-name external
Add a peer into the EBGP peer group.
(Optional.) Configure a description for the peer group. peer ip-address group group-name as-number as-number peer group-name description
description-text
By default, no EBGP peer group is created.
By default, no peer exists in the peer group.
By default, no description is configured for the peer group.
92
Step Command
6. Create the BGP IPv4 unicast address family or BGP-VPN
IPv4 unicast address family and enter its view. address-family ipv4 [ unicast ]
7. Enable the router to exchange
IPv4 unicast routing information with peers in the specified peer group. peer group-name enable
To configure an EBGP peer group by using Method 3 (IPv6):
Step Command
1. Enter system view. system-view
2. Enter BGP view or BGP-VPN instance view.
•
Enter BGP view: bgp as-number
•
Enter BGP-VPN instance view: a. bgp as-number b. ip vpn-instance
vpn-instance-name
Remarks
By default, the BGP IPv4 unicast address family or BGP-VPN IPv4 unicast address family is not created.
By default, the router cannot exchange IPv4 unicast routing information with the peers.
Remarks
N/A
N/A
3. Create an EBGP peer group. group group-name external
4. Add a peer into the EBGP peer group.
5. (Optional.) Configure a description for the peer group.
6. Create the BGP IPv6 unicast address family or BGP-VPN
IPv6 unicast address family and enter its view.
7. Enable the router to exchange
IPv6 unicast routing information with peers in the specified peer group. peer ipv6-address group
group-name as-number as-number peer group-name description
description-text address-family ipv6 [ unicast ] peer group-name enable
By default, no EBGP peer group is created.
By default, no peer exists in the peer group.
By default, no description is configured for the peer group.
By default, the BGP IPv6 unicast address family or BGP-VPN IPv6 unicast address family is not created.
By default, the router cannot exchange IPv6 unicast routing information with the peers.
Specifying the source interface for TCP connections
By default, BGP uses the output interface of the optimal route to a peer or peer group as the source interface for establishing TCP connections to the peer or peer group, and it uses the IP address/IPv6 address of the output interface as the source IP address/IPv6 address of TCP connections. You can change the source interface in the following scenarios:
•
If the peer's IP address/IPv4 address belongs to an interface indirectly connected to the local router, you must specify that interface as the source interface for TCP connections on the peer. For example, interface A on the local end is directly connected to interface B on the peer. If you use the peer x.x.x.x as-number as-number command in which x.x.x.x is not the IP address of interface B on the local end, you must use the peer connect-interface command on the peer to specify the interface whose IP address is x.x.x.x as the source interface for establishing a TCP connection.
93
• On a BGP router that has multiple links to a peer, if the source interface fails, BGP has to reestablish
TCP connections. To avoid this problem, use a loopback interface as the source interface.
•
To establish multiple BGP sessions between two routers, specify the source interface for establishing
TCP connections to each peer on the local router. Otherwise, the local BGP router may fail to establish a TCP connection to a peer when using the outbound interface of the best route to the peer as the source interface.
To specify the source interface for TCP connections (IPv4):
1. Enter system view.
2. Enter BGP view or BGP-VPN instance view. system-view
•
Enter BGP view: bgp as-number
•
Enter BGP-VPN instance view: a. bgp as-number b. ip vpn-instance
vpn-instance-name
N/A
N/A
3. Specify the source interface for establishing TCP connections to a peer or peer group. peer { group-name | ip-address } connect-interface interface-type
interface-number
By default, BGP uses the outbound interface of the best route to the
BGP peer or peer group as the source interface for establishing a
TCP connection to the peer or peer group.
To specify the source interface for TCP connections (IPv6):
1. Enter system view.
2. Enter BGP view or BGP-VPN instance view. system-view
•
Enter BGP view: bgp as-number
•
Enter BGP-VPN instance view: a. bgp as-number b. ip vpn-instance
vpn-instance-name
N/A
N/A
3. Specify the source interface for establishing TCP connections to a peer or peer group. peer { group-name |
ipv6-address } connect-interface
interface-type interface-number
By default, BGP uses the outbound interface of the best route to the
BGP peer or peer group as the source interface for establishing a
TCP connection to the peer or peer group.
Generating BGP routes
BGP can generate routes in the following ways:
•
Advertise local networks.
•
Redistribute IGP routes.
94
Injecting a local network
Perform this task to inject a network in the local routing table to the BGP routing table, so BGP can advertise the network to BGP peers. The ORIGIN attribute of BGP routes advertised in this way is IGP.
You can also use a routing policy to control route advertisement.
The specified network must be available and active in the local IP routing table.
To inject a local network (IPv4):
Step Command
1. Enter system view. system-view
2. Enter BGP view or BGP-VPN instance view.
•
Enter BGP view: bgp as-number
•
Enter BGP-VPN instance view: a. bgp as-number b. ip vpn-instance
vpn-instance-name
3. Enter BGP IPv4 unicast address family view or
BGP-VPN IPv4 unicast address family view. address-family ipv4 [ unicast ]
4. Inject a local network to the
BGP routing table. network ip-address [ mask |
mask-length ] [ route-policy
route-policy-name ]
To inject a local network (IPv6):
Remarks
N/A
N/A
N/A
By default, BGP does not advertise any local network.
Step Command
1. Enter system view. system-view
2. Enter BGP view or BGP-VPN instance view.
•
Enter BGP view: bgp as-number
•
Enter BGP-VPN instance view: a. bgp as-number b. ip vpn-instance
vpn-instance-name
3. Enter BGP IPv6 unicast address family view or
BGP-VPN IPv6 unicast address family view. address-family ipv6 [ unicast ]
4. Inject a local network to the
IPv6 BGP routing table. network ipv6-address prefix-length
[ route-policy route-policy-name ]
Remarks
N/A
N/A
N/A
By default, BGP does not advertise any local network.
Redistributing IGP routes
Perform this task to configure route redistribution from an IGP to BGP.
By default, BGP does not redistribute default IGP routes. You can use the default-route imported command to redistribute default IGP routes into the BGP routing table.
95
Only active routes can be redistributed. To view route state information, use the display ip routing-table protocol or display ipv6 routing-table protocol command.
The ORIGIN attribute of BGP routes redistributed from IGPs is INCOMPLETE.
To configure BGP to redistribute IGP routes (IPv4):
Step Command
1. Enter system view. system-view
2. Enter BGP view or BGP-VPN instance view.
•
Enter BGP view: bgp as-number
•
Enter BGP-VPN instance view: a. bgp as-number b. ip vpn-instance
vpn-instance-name
3. Enter BGP IPv4 unicast address family view or
BGP-VPN IPv4 unicast address family view. address-family ipv4 [ unicast ]
4. Enable route redistribution from the specified IGP into
BGP. import-route protocol [ { process-id
| all-processes } [ allow-direct | med med-value | route-policy
route-policy-name ] * ]
5. (Optional.) Enable default route redistribution into BGP. default-route imported
To configure BGP to redistribute IGP routes (IPv6):
Remarks
N/A
N/A
N/A
By default, BGP does not redistribute IGP routes.
By default, BGP does not redistribute default routes.
Step Command
1. Enter system view. system-view
2. Enter BGP view or BGP-VPN instance view.
•
Enter BGP view: bgp as-number
•
Enter BGP-VPN instance view: a. bgp as-number b. ip vpn-instance
vpn-instance-name
3. Enter BGP IPv6 unicast address family view or
BGP-VPN IPv6 unicast address family view. address-family ipv6 [ unicast ]
4. Enable route redistribution from the specified IGP into
BGP. import-route protocol [ process-id
[ allow-direct | med med-value | route-policy route-policy-name ] * ]
5. (Optional.) Enable default route redistribution into BGP. default-route imported
Remarks
N/A
N/A
N/A
By default, BGP does not redistribute IGP routes.
By default, BGP does not redistribute default routes.
Controlling route distribution and reception
This section describes how to control route distribution and reception.
96
Configuring BGP route summarization
Route summarization can reduce the number of redistributed routes and the routing table size. IPv4 BGP supports automatic route summarization and manual route summarization. Manual summarization takes precedence over automatic summarization. IPv6 BGP supports only manual route summarization.
The output interface of a BGP summary route is Null 0 on the originating router. Therefore, a summary route must not be an optimal route on the originating router. Otherwise, BGP will fail to forward packets matching the route. If a summarized specific route has the same mask as the summary route, but has a lower priority, the summary route becomes the optimal route. In this case, you must change the priority of the summary or the specific route to make the specific route as the optimal route.
Configuring automatic route summarization
Automatic route summarization enables BGP to summarize IGP subnet routes redistributed by the import-route command so BGP advertises only natural network routes.
To configure automatic route summarization (IPv4):
Step Command
1. Enter system view. system-view
2. Enter BGP view or BGP-VPN instance view.
•
Enter BGP view: bgp as-number
•
Enter BGP-VPN instance view: a. bgp as-number b. ip vpn-instance
vpn-instance-name
3. Enter BGP IPv4 unicast address family view or
BGP-VPN IPv4 unicast address family view. address-family ipv4 [ unicast ]
4. Configure automatic route summarization. summary automatic
Configuring manual route summarization
Remarks
N/A
N/A
N/A
By default, automatic route summarization is not configured.
By configuring manual route summarization, you can summarize both redistributed routes and routes injected using the network command and determine the mask length for a summary route as needed.
To configure BGP manual route summarization (IPv4):
Step Command
1. Enter system view. system-view
2. Enter BGP view or BGP-VPN instance view.
•
Enter BGP view: bgp as-number
•
Enter BGP-VPN instance view: a. bgp as-number b. ip vpn-instance
vpn-instance-name
Remarks
N/A
N/A
97
Step Command
3. Enter BGP IPv4 unicast address family view or
BGP-VPN IPv4 unicast address family view. address-family ipv4 [ unicast ]
4. Create a summary route in the
BGP routing table. aggregate ip-address { mask |
mask-length } [ as-set | attribute-policy route-policy-name
| detail-suppressed | origin-policy
route-policy-name | suppress-policy
route-policy-name ] *
To configure BGP manual route summarization (IPv6):
Remarks
N/A
By default, no summary route is configured.
Step Command
1. Enter system view. system-view
2. Enter BGP view.
3. Enter BGP IPv6 unicast address family view. bgp as-number address-family ipv6 [ unicast ]
4. Create a summary route in the
IPv6 BGP routing table. aggregate ipv6-address
prefix-length [ as-set | attribute-policy route-policy-name
| detail-suppressed | origin-policy
route-policy-name | suppress-policy
route-policy-name ] *
Remarks
N/A
N/A
N/A
By default, no summary route is configured.
Advertising optimal routes in the IP routing table
By default, BGP advertises optimal routes in the BGP routing table, which may not be optimal in the IP routing table. This task allows you to advertise BGP routes that are optimal in the IP routing table to all
BGP peers.
To enable BGP to advertise optimal routes in the IP routing table:
Step Command
1. Enter system view. system-view
2. Enter BGP view.
3. Enable BGP to advertise optimal routes in the IP routing table. bgp as-number advertise-rib-active
Remarks
N/A
N/A
By default, BGP advertises optimal routes in the BGP routing table.
Advertising a default route to a peer or peer group
Perform this task to advertise a default BGP route with the next hop being the advertising router to a peer or peer group.
To advertise a default route to a peer or peer group (IPv4):
98
Step Command
1. Enter system view. system-view
2. Enter BGP view or BGP-VPN instance view.
•
Enter BGP view: bgp as-number
•
Enter BGP-VPN instance view: a. bgp as-number b. ip vpn-instance
vpn-instance-name
3. Enter BGP IPv4 unicast address family view or
BGP-VPN IPv4 unicast address family view. address-family ipv4 [ unicast ]
4. Advertise a default route to a peer or peer group. peer { group-name | ip-address } default-route-advertise
[ route-policy route-policy-name ]
To advertise a default route to a peer or peer group (IPv6):
Step Command
1. Enter system view. system-view
2. Enter BGP view.
3. Enter BGP IPv6 unicast address family view. bgp as-number address-family ipv6 [ unicast ]
4. Advertise a default route to a peer or peer group. peer { group-name |
ipv6-address } default-route-advertise
[ route-policy route-policy-name ]
Remarks
N/A
N/A
N/A
By default, no default route is advertised.
Remarks
N/A
N/A
N/A
By default, no default route is advertised.
Limiting routes received from a peer or peer group
This feature can prevent attacks that send a large number of BGP routes to the router.
If the number of routes received from a peer or peer group exceeds the upper limit, the router takes one of the following actions based on your configuration:
•
Tears down the BGP session to the peer or peer group and does not attempt to re-establish the session.
• Continues to receive routes from the peer or peer group and generates a log message.
•
Retains the session to the peer or peer group, but it discards excess routes and generates a log message.
•
Tears down the BGP session to the peer or peer group and, after a specified period of time, re-establishes a BGP session to the peer or peer group.
You can specify a percentage threshold for the router to generate a log message. When the ratio of the number of received routes to the maximum number reaches the percentage value, the router generates a log message.
To limit routes that a router can receive from a peer or peer group (IPv4):
99
Step Command
1. Enter system view. system-view
2. Enter BGP view or BGP-VPN instance view.
•
Enter BGP view: bgp as-number
•
Enter BGP-VPN instance view: a. bgp as-number b. ip vpn-instance
vpn-instance-name
3. Enter BGP IPv4 unicast address family view or
BGP-VPN IPv4 unicast address family view. address-family ipv4 [ unicast ]
Remarks
N/A
N/A
N/A
4. Specify the maximum number of routes that a router can receive from a peer or peer group. peer { group-name | ip-address } route-limit prefix-number
[ { alert-only | discard | reconnect
reconnect-time } |
percentage-value ] *
By default, the number of routes that a router can receive from a peer or peer group is not limited.
To limit routes that a router can receive from a peer or peer group (IPv6):
Remarks
N/A
N/A
Step Command
1. Enter system view. system-view
2. Enter BGP view.
3. Enter BGP IPv6 unicast address family view. bgp as-number address-family ipv6 [ unicast ]
4. Specify the maximum number of routes that a router can receive from a peer or peer group. peer { group-name |
ipv6-address } route-limit
prefix-number [ { alert-only | discard | reconnect
reconnect-time } |
percentage-value ] *
N/A
By default, the number of routes that a router can receive from a peer or peer group is not limited.
Configuring BGP route filtering policies
Configuration prerequisites
Before you configure BGP routing filtering policies, configure the following filters used for route filtering as needed:
• ACL (see ACL and QoS Configuration Guide)
•
Prefix list (see " Configuring a routing policy ")
•
Routing policy (see " Configuring a routing policy
")
•
AS path list (see "
")
Configuring BGP route distribution filtering policies
To configure BGP route distribution filtering policies, use the following methods:
•
Use an ACL or prefix list to filter routing information advertised to all peers.
100
• Use a routing policy, ACL, AS path list, or prefix list to filter routing information advertised to a peer or peer group.
If you configure multiple filtering policies, apply them in the following sequence:
1. filter-policy export
2. peer filter-policy export
3. peer as-path-acl export
4. peer prefix-list export
5. peer route-policy export
Only routes passing all the configured policies can be advertised.
To configure BGP route distribution filtering policies (IPv4):
Step Command
1. Enter system view. system-view
2. Enter BGP view or BGP-VPN instance view.
•
Enter BGP view: bgp as-number
•
Enter BGP-VPN instance view: a. bgp as-number b. ip vpn-instance
vpn-instance-name
3. Enter BGP IPv4 unicast address family view or
BGP-VPN IPv4 unicast address family view. address-family ipv4 [ unicast ]
Remarks
N/A
N/A
N/A
101
Step Command
4. Configure BGP route distribution filtering policies.
•
Reference an ACL or IP prefix list to filter advertised BGP routes: filter-policy { acl-number | prefix-list prefix-list-name } export [ direct | isis process-id
| ospf process-id | rip
process-id | static ]
•
Reference a routing policy to filter BGP routes advertised to a peer or peer group: peer { group-name |
ip-address } route-policy
route-policy-name export
•
Reference an ACL to filter BGP routes advertised to a peer or peer group: peer { group-name |
ip-address } filter-policy
acl-number export
•
Reference an AS path list to filter BGP routes advertised to a peer or peer group: peer { group-name |
ip-address } as-path-acl
as-path-acl-number export
•
Reference an IPv4 prefix list to filter BGP routes advertised to a peer or peer group: peer { group-name |
ip-address } prefix-list
prefix-list-name export
To configure BGP route distribution filtering policies (IPv6):
Step Command
1. Enter system view. system-view
2. Enter BGP view or BGP-VPN instance view.
•
Enter BGP view: bgp as-number
•
Enter BGP-VPN instance view: a. bgp as-number b. ip vpn-instance
vpn-instance-name
3. Enter BGP IPv6 unicast address family view or
BGP-VPN IPv6 unicast address family view. address-family ipv6 [ unicast ]
Remarks
Use at least one method.
By default, no BGP distribution filtering policy is configured.
Remarks
N/A
N/A
N/A
102
Step Command
4. Configure BGP route distribution filtering policies.
•
Reference an ACL or IPv6 prefix list to filter advertised BGP routes: filter-policy { acl6-number | prefix-list ipv6-prefix-name } export [ direct | isisv6
process-id | ospfv3 process-id
| static ]
•
Reference a routing policy to filter BGP routes advertised to a peer or peer group: peer { group-name |
ipv6-address } route-policy
route-policy-name export
•
Reference an ACL to filter BGP routes advertised to a peer or peer group: peer { group-name |
ipv6-address } filter-policy
acl6-number export
•
Reference an AS path list to filter BGP routes advertised to a peer or peer group: peer { group-name |
ipv6-address } as-path-acl
as-path-acl-number export
•
Reference an IPv6 prefix list to filter BGP routes advertised to a peer or peer group
peer { group-name |
ipv6-address } prefix-list
ipv6-prefix-name export
Configuring BGP route reception filtering policies
Remarks
Use at least one method.
Not configured by default.
You can use the following methods to configure BGP route reception filtering policies:
•
Use an ACL or prefix list to filter routing information received from all peers.
• Use a routing policy, ACL, AS path list, or prefix list to filter routing information received from a peer or peer group.
If you configure multiple filtering policies, apply them in the following sequence:
1. filter-policy import
2. peer filter-policy import
3. peer as-path-acl import
4. peer prefix-list import
5. peer route-policy import
Only routes passing all the configured policies can be received.
To configure BGP route reception filtering policies (IPv4):
103
Step Command Remarks
1. Enter system view.
2. Enter BGP view or BGP-VPN instance view. system-view
•
Enter BGP view: bgp as-number
•
Enter BGP-VPN instance view: a. bgp as-number b. ip vpn-instance
vpn-instance-name
N/A
N/A
3. Enter BGP IPv4 unicast address family view or
BGP-VPN IPv4 unicast address family view. address-family ipv4 [ unicast ] N/A
4. Configure BGP route reception filtering policies.
•
Reference an ACL or IP prefix list to filter BGP routes received from all peers: filter-policy { acl-number | prefix-list
prefix-list-name } import
•
Reference a routing policy to filter
BGP routes received from a peer or peer group: peer { group-name | ip-address } route-policy route-policy-name import
•
Reference an ACL to filter BGP routes received from a peer or peer group: peer { group-name | ip-address } filter-policy acl-number import
•
Reference an AS path list to filter
BGP routes received from a peer or peer group: peer { group-name | ip-address } as-path-acl as-path-acl-number import
•
Reference an IPv4 prefix list to filter
BGP routes received from a peer or peer group: peer { group-name | ip-address } prefix-list prefix-list-name import
Use at least one method.
By default, no route reception filtering is configured.
To configure BGP route reception filtering policies (IPv6):
Step Command Remarks
1. Enter system view.
2. Enter BGP view or BGP-VPN instance view. system-view
•
Enter BGP view: bgp as-number
•
Enter BGP-VPN instance view: a. bgp as-number b. ip vpn-instance
vpn-instance-name
N/A
N/A
104
Step Command Remarks
3. Enter BGP IPv6 unicast address family view or
BGP-VPN IPv6 unicast address family view. address-family ipv6 [ unicast ] N/A
4. Configure BGP route reception filtering policies.
•
Reference ACL or IPv6 prefix list to filter BGP routes received from all peers: filter-policy { acl6-number | prefix-list ipv6-prefix-name } import
•
Reference a routing policy to filter
BGP routes received from a peer or peer group: peer { group-name | ipv6-address } route-policy route-policy-name import
•
Reference an ACL to filter BGP routes received from a peer or peer group: peer { group-name | ipv6-address } filter-policy acl6-number import
•
Reference an AS path list to filter
BGP routes received from a peer or peer group: peer { group-name | ipv6-address } as-path-acl as-path-acl-number import
•
Reference an IPv6 prefix list to filter
BGP routes received from a peer or peer group: peer { group-name | ipv6-address } prefix-list ipv6-prefix-name import
Use at least one method.
By default, no route reception filtering is configured.
Configuring BGP route dampening
Route dampening enables BGP to not select unstable routes as optimal routes.
To configure BGP route dampening (IPv4):
Step Command
1. Enter system view. system-view
2. Enter BGP view or BGP-VPN instance view.
•
Enter BGP view: bgp as-number
•
Enter BGP-VPN instance view: a. bgp as-number b. ip vpn-instance
vpn-instance-name
3. Enter BGP IPv4 unicast address family view or
BGP-VPN IPv4 unicast address family view.
Remarks
N/A
N/A address-family ipv4 [ unicast ] N/A
105
Step Command
4. Configure BGP route dampening. dampening [ half-life-reachable
half-life-unreachable reuse suppress
ceiling | route-policy
route-policy-name ] *
To configure BGP route dampening (IPv6):
Remarks
By default, BGP route dampening is not configured.
Step Command
1. Enter system view. system-view
2. Enter BGP view or BGP-VPN instance view.
•
Enter BGP view: bgp as-number
•
Enter BGP-VPN instance view: a. bgp as-number b. ip vpn-instance
vpn-instance-name
3. Enter BGP IPv6 unicast address family view or
BGP-VPN IPv6 unicast address family view.
Remarks
N/A
N/A address-family ipv6 [ unicast ] N/A
4. Configure IPv6 BGP route dampening. dampening [ half-life-reachable
half-life-unreachable reuse suppress
ceiling | route-policy
route-policy-name ] *
By default, IPv6 BGP route dampening is not configured.
Controlling BGP path selection
By configuring BGP path attributes, you can control BGP path selection.
Specifying a preferred value for routes received
Perform this task to set a preferred value for specific routes to control BGP path selection.
Among multiple routes that have the same destination/mask and are learned from different peers, the one with the greatest preferred value is selected as the optimal route.
To specify a preferred value for routes from a peer or peer group (IPv4):
Step Command
1. Enter system view. system-view
2. Enter BGP view or BGP-VPN instance view.
•
Enter BGP view: bgp as-number
•
Enter BGP-VPN instance view: a. bgp as-number b. ip vpn-instance
vpn-instance-name
Remarks
N/A
N/A
106
Step Command
3. Enter BGP IPv4 unicast address family view or
BGP-VPN IPv4 unicast address family view. address-family ipv4 [ unicast ]
4. Specify a preferred value for routes received from a peer or peer group. peer { group-name | ip-address } preferred-value value
Remarks
N/A
The default preferred value is 0.
To specify a preferred value for routes from a peer or peer group (IPv6):
Remarks
N/A
Step Command
1. Enter system view. system-view
2. Enter BGP view or BGP-VPN instance view.
•
Enter BGP view: bgp as-number
•
Enter BGP-VPN instance view: a. bgp as-number b. ip vpn-instance
vpn-instance-name
3. Enter BGP IPv6 unicast address family view or
BGP-VPN IPv6 unicast address family view. address-family ipv6 [ unicast ]
4. Specify a preferred value for routes received from a peer or peer group. peer { group-name |
ipv6-address } preferred-value
value
N/A
N/A
The default preferred value is 0.
Configuring preferences for BGP routes
Routing protocols each have a default preference. If they find multiple routes destined for the same network, the route found by the routing protocol with the highest preference is selected as the optimal route.
You can use the preference command to modify preferences for EBGP, IBGP, and local BGP routes, or reference a routing policy to set a preference for matching routes (for routes not matching the routing policy, the default preference applies).
If a device has an EBGP route and a local BGP route to reach the same destination, it does not select the
EBGP route because the EBGP route has a lower preference than the local BGP route by default. You can use the network short-cut command to configure the EBGP route as a shortcut route that has the same preference as the local BGP route so that the EBGP route will more likely become the optimal route.
To configure preferences for BGP routes (IPv4):
Step Command
1. Enter system view. system-view
Remarks
N/A
107
Step Command
2. Enter BGP view or BGP-VPN instance view.
•
Enter BGP view: bgp as-number
•
Enter BGP-VPN instance view: a. bgp as-number b. ip vpn-instance
vpn-instance-name
3. Enter BGP IPv4 unicast address family view or
BGP-VPN IPv4 unicast address family view. address-family ipv4 [ unicast ]
4. Configure preferences for
EBGP, IBGP, and local BGP routes. preference { external-preference
internal-preference
local-preference | route-policy
route-policy-name }
5. Configure an EBGP route as a shortcut route. network ip-address [ mask |
mask-length ] short-cut
To configure preferences for BGP routes (IPv6):
Step Command
1. Enter system view. system-view
2. Enter BGP view or BGP-VPN instance view.
•
Enter BGP view: bgp as-number
•
Enter BGP-VPN instance view: a. bgp as-number b. ip vpn-instance
vpn-instance-name
3. Enter BGP IPv6 unicast address family view or
BGP-VPN IPv6 unicast address family view. address-family ipv6 [ unicast ]
4. Configure preferences for
EBGP, IBGP, and local BGP routes. preference { external-preference
internal-preference
local-preference | route-policy
route-policy-name }
5. Configure an EBGP route as a shortcut route. network ipv6-address prefix-length short-cut
Remarks
N/A
N/A
The default preferences for EBGP,
IBGP, and local BGP routes are
255, 255, and 130.
By default, an EBGP route has a preference of 255.
Remarks
N/A
N/A
N/A
The default preferences for EBGP,
IBGP, and local BGP routes are
255, 255, and 130.
By default, an EBGP route has a preference of 255.
Configuring the default local preference
The local preference is used to determine the best route for traffic leaving the local AS. When a BGP router obtains from several IBGP peers multiple routes to the same destination, but with different next hops, it considers the route with the highest local preference as the best route.
This task allows you to specify the default local preference for routes sent to IBGP peers.
To specify the default local preference (IPv4):
108
1. Enter system view.
2. Enter BGP view or BGP-VPN instance view. system-view
•
Enter BGP view: bgp as-number
•
Enter BGP-VPN instance view: a. bgp as-number b. ip vpn-instance
vpn-instance-name
N/A
N/A
3. Enter BGP IPv4 unicast address family view or
BGP-VPN IPv4 unicast address family view.
4. Configure the default local preference. address-family ipv4 [ unicast ] N/A default local-preference value
To specify the default local preference (IPv6):
The default local preference is
100.
1. Enter system view.
2. Enter BGP view or BGP-VPN instance view. system-view
•
Enter BGP view: bgp as-number
•
Enter BGP-VPN instance view: a. bgp as-number b. ip vpn-instance
vpn-instance-name
N/A
N/A
3. Enter BGP IPv6 unicast address family view or
BGP-VPN IPv6 unicast address family view.
4. Configure the default local preference. address-family ipv6 [ unicast ] N/A default local-preference value
The default local preference is
100.
Configuring the MED attribute
BGP uses MED to determine the best route for traffic going into an AS. When a BGP router obtains from
EBGP peers multiple routes to the same destination but with different next hops, it considers the route with the smallest MED value as the best route if other conditions are the same.
Configuring the default MED value
To configure the default MED value (IPv4):
1. Enter system view. system-view N/A
109
2. Enter BGP view or BGP-VPN instance view.
•
Enter BGP view: bgp as-number
•
Enter BGP-VPN instance view: a. bgp as-number b. ip vpn-instance
vpn-instance-name
3. Enter BGP IPv4 unicast address family view or
BGP-VPN IPv4 unicast address family view.
4. Configure the default MED value. address-family ipv4 [ unicast ] default med med-value
To configure the default MED value (IPv6):
N/A
N/A
The default MED value is 0.
1. Enter system view.
2. Enter BGP view or BGP-VPN instance view. system-view
•
Enter BGP view: bgp as-number
•
Enter BGP-VPN instance view: a. bgp as-number b. ip vpn-instance
vpn-instance-name
3. Enter BGP IPv6 unicast address family view or
BGP-VPN IPv6 unicast address family view.
4. Configure the default MED value. address-family ipv6 [ unicast ] default med med-value
Enabling MED comparison for routes from different ASs
N/A
N/A
N/A
The default MED value is 0.
This task enables BGP to compare the MEDs of routes from different ASs.
To enable MED comparison for routes from different ASs (IPv4):
1. Enter system view.
2. Enter BGP view or BGP-VPN instance view. system-view
•
Enter BGP view: bgp as-number
•
Enter BGP-VPN instance view: a. bgp as-number b. ip vpn-instance
vpn-instance-name
N/A
N/A
3. Enter BGP IPv4 unicast address family view or
BGP-VPN IPv4 unicast address family view. address-family ipv4 [ unicast ] N/A
110
4. Enable MED comparison for routes from different ASs. compare-different-as-med
To enable MED comparison for routes from different ASs (IPv6):
By default, this feature is disabled.
1. Enter system view. system-view N/A
2. Enter BGP view.
3. Enter BGP IPv6 unicast address family view.
4. Enable MED comparison for routes from different ASs. bgp as-number address-family ipv6 [ unicast ] N/A compare-different-as-med
Enabling MED comparison for routes on a per-AS basis
This task enables BGP to compare the MEDs of routes from an AS.
Figure 26 Route selection based on MED (in an IPv4 network)
N/A
By default, this feature is disabled.
AS 400
Router E
10.0.0.0
AS 200
Router ID : 3.3.3.3
Router A
Eth1/1
3.3.3.3/24
Router ID : 1.1.1.1
Router C
Eth1/1
1.1.1.1
Router ID : 2.2.2.2
AS 300
Router B
Eth1/1
2.2.2.2/24
AS 100
Router D
, Router D learns network 10.0.0.0 from both Router A and Router B. Because
Router B has a smaller router ID, the route learned from Router B is optimal.
Network NextHop MED LocPrf PrefVal Path/Ogn
*>i 10.0.0.0 2.2.2.2 50 0 300e
* i 3.3.3.3 50 0 200e
When Router D learns network 10.0.0.0 from Router C, it compares the route with the optimal route in its routing table. Because Router C and Router B reside in different ASs, BGP does not compare the MEDs of the two routes. Router C has a smaller router ID than Router B so the route from Router C becomes optimal.
Network NextHop MED LocPrf PrefVal Path/Ogn
*>i 10.0.0.0 1.1.1.1 60 0 200e
* i 10.0.0.0 2.2.2.2 50 0 300e
111
* i 3.3.3.3 50 0 200e
However, Router C and Router A reside in the same AS, and Router C has a greater MED, so network
10.0.0.0 learned from Router C should not be optimal.
You can configure the bestroute compare-med command to enable MED comparison for routes from the same AS on Router D. After that, Router D puts the routes received from each AS into a group, selects the route with the lowest MED from each group, and compares routes from different groups. This mechanism avoids the above-mentioned problem. The following output shows the BGP routing table on Router D after this feature is enabled. Network 10.0.0.0 learned from Router B is the optimal route.
Network NextHop MED LocPrf PrefVal Path/Ogn
*>i 10.0.0.0 2.2.2.2 50 0 300e
* i 3.3.3.3 50 0 200e
* i 1.1.1.1 60 0 200e
To enable MED comparison for routes on a per-AS basis (IPv4):
Step Command
1. Enter system view. system-view
2. Enter BGP view or BGP-VPN instance view.
•
Enter BGP view: bgp as-number
•
Enter BGP-VPN instance view: a. bgp as-number b. ip vpn-instance
vpn-instance-name
3. Enter BGP IPv4 unicast address family view or
BGP-VPN IPv4 unicast address family view.
4. Enable MED comparison for routes on a per-AS basis. address-family ipv4 [ unicast ] bestroute compare-med
To enable MED comparison for routes on a per-AS basis (IPv6):
Remarks
N/A
N/A
N/A
By default, this feature is disabled.
Step Command
1. Enter system view. system-view
2. Enter BGP view.
3. Enter BGP IPv6 unicast address family view.
4. Enable MED comparison for routes on a per-AS basis. bgp as-number address-family ipv6 [ unicast ] bestroute compare-med
Enabling MED comparison for routes from confederation peers
Remarks
N/A
N/A
N/A
By default, this feature is disabled.
This task enables BGP to compare the MEDs of routes received from confederation peers. However, if a route received from a confederation peer has an AS number that does not belong to the confederation,
BGP does not compare the route with other routes. For example, a confederation has three AS numbers
65006, 65007, and 65009. BGP receives three routes from different confederation peers. The AS_PATH attributes of these routes are 65006 65009, 65007 65009, and 65008 65009, and the MED values of them are 2, 3, and 1. Because the third route's AS_PATH attribute contains AS number 65008 that does
112
not belong to the confederation, BGP does not compare it with other routes. As a result, the first route becomes the optimal route.
To enable MED comparison for routes from confederation peers (IPv4):
1. Enter system view.
2. Enter BGP view or BGP-VPN instance view. system-view
•
Enter BGP view: bgp as-number
•
Enter BGP-VPN instance view: a. bgp as-number b. ip vpn-instance
vpn-instance-name
N/A
N/A
3. Enter BGP IPv4 unicast address family view or
BGP-VPN IPv4 unicast address family view.
4. Enable MED comparison for routes from confederation peers. address-family ipv4 [ unicast ] N/A bestroute med-confederation By default, this feature is disabled.
To enable MED comparison for routes from confederation peers (IPv6):
1. Enter system view.
2. Enter BGP view.
3. Enter BGP IPv6 unicast address family view.
4. Enable MED comparison for routes from confederation peers. system-view bgp as-number
N/A
N/A address-family ipv6 [ unicast ] N/A bestroute med-confederation By default, this feature is disabled.
Configuring the NEXT_HOP attribute
By default, a BGP router does not set itself as the next hop for routes advertised to an IBGP peer or peer group. In some cases, however, you must configure the advertising router as the next hop to make sure the BGP peer can find the correct next hop.
For example, as shown in
Figure 27 , Router A and Router B establish an EBGP neighbor relationship, and
Router B and Router C establish an IBGP neighbor relationship. If Router C has no route destined for IP address 1.1.1.1/24, you must configure Router B to set itself 3.1.1.1/24 as the next hop for the network
2.1.1.1/24 advertised to Router C.
113
Figure 27 NEXT_HOP attribute configuration
If a BGP router has two peers on a broadcast network, it does not set itself as the next hop for routes sent
to an EBGP peer by default. As shown in Figure 28
, Router A and Router B establish an EBGP neighbor relationship, and Router B and Router C establish an IBGP neighbor relationship. They are on the same broadcast network 1.1.1.0/24. When Router B sends EBGP routes to Router A, it does not set itself as the next hop by default. However, you can configure Router B to set it (1.1.1.2/24) as the next hop for routes sent to Router A by using the peer next-hop-local command as needed.
Figure 28 NEXT_HOP attribute configuration
IMPORTANT:
If you have configured BGP load balancing, the router sets itself as the next hop for routes sent to an IBGP peer or peer group regardless of whether the peer next-hop-local command is configured.
To configure the NEXT_HOP attribute (IPv4):
Step Command
1. Enter system view. system-view
2. Enter BGP view or BGP-VPN instance view.
•
Enter BGP view: bgp as-number
•
Enter BGP-VPN instance view: a. bgp as-number b. ip vpn-instance
vpn-instance-name
3. Enter BGP IPv4 unicast address family view or
BGP-VPN IPv4 unicast address family view. address-family ipv4 [ unicast ]
Remarks
N/A
N/A
N/A
4. Specify the router as the next hop for routes sent to a peer or peer group. peer { group-name | ip-address } next-hop-local
By default, the router sets itself as the next hop for routes sent to an
EBGP peer or peer group, but does not set itself as the next hop for routes sent to an IBGP peer or peer group.
114
To configure the NEXT_HOP attribute (IPv6):
Step Command
1. Enter system view. system-view
2. Enter BGP view. bgp as-number
3. Enter BGP IPv6 unicast address family view. address-family ipv6 [ unicast ]
4. Specify the router as the next hop for routes sent to a peer or peer group. peer { group-name |
ipv6-address } next-hop-local
Remarks
N/A
N/A
N/A
By default, the router sets itself as the next hop for routes sent to an
EBGP peer or peer group, but does not set itself as the next hop for routes sent to an IBGP peer or peer group.
Configuring the AS_PATH attribute
Permitting local AS number to appear in routes from a peer or peer group
In general, BGP checks whether the AS_PATH attribute of a route from a peer contains the local AS number. If yes, it discards the route to avoid routing loops.
In certain network environments, however, the AS_PATH attribute of a route from a peer must be allowed to contain the local AS number. Otherwise, the route cannot be advertised correctly.
To permit the local AS number to appear in routes from a peer or peer group and specify the appearance times (IPv4):
Step Command
1. Enter system view. system-view
2. Enter BGP view or BGP-VPN instance view.
•
Enter BGP view: bgp as-number
•
Enter BGP-VPN instance view: a. bgp as-number b. ip vpn-instance
vpn-instance-name
3. Enter BGP IPv4 unicast address family view or
BGP-VPN IPv4 unicast address family view.
4. Permit the local AS number to appear in routes from a peer or peer group and specify the appearance times. address-family ipv4 [ unicast ] peer { group-name | ip-address } allow-as-loop [ number ]
Remarks
N/A
N/A
N/A
By default, the local AS number is not allowed in routes from a peer or peer group.
To permit the local AS number to appear in routes from a peer or peer group and specify the appearance times (IPv6):
Step Command
1. Enter system view. system-view
Remarks
N/A
115
Step Command
2. Enter BGP view or BGP-VPN instance view.
•
Enter BGP view: bgp as-number
•
Enter BGP-VPN instance view: a. bgp as-number b. ip vpn-instance
vpn-instance-name
3. Enter BGP IPv6 unicast address family view or
BGP-VPN IPv6 unicast address family view.
4. Permit the local AS number to appear in routes from a peer or peer group and specify the appearance times. address-family ipv6 [ unicast ] peer { group-name |
ipv6-address } allow-as-loop
[ number ]
Disabling BGP from considering AS_PATH during best route selection
Remarks
N/A
N/A
By default, the local AS number is not allowed in routes from a peer or peer group.
To disable BGP from considering AS_PATH during best route selection (IPv4):
1. Enter system view.
2. Enter BGP view or BGP-VPN instance view. system-view
•
Enter BGP view: bgp as-number
•
Enter BGP-VPN instance view: a. bgp as-number b. ip vpn-instance
vpn-instance-name
N/A
N/A
3. Enter BGP IPv4 unicast address family view or
BGP-VPN IPv4 unicast address family view.
4. Disable BGP from considering
AS_PATH during best route selection. address-family ipv4 [ unicast ] N/A bestroute as-path-neglect
By default, BGP considers
AS_PATH during best route selection.
To disable BGP from considering AS_PATH during best route selection (IPv6):
1. Enter system view.
2. Enter BGP view or BGP-VPN instance view. system-view
•
Enter BGP view: bgp as-number
•
Enter BGP-VPN instance view: a. bgp as-number b. ip vpn-instance
vpn-instance-name
N/A
N/A
116
3. Enter BGP IPv6 unicast address family view or
BGP-VPN IPv6 unicast address family view.
4. Disable BGP from considering
AS_PATH during best route selection. address-family ipv6 [ unicast ] N/A bestroute as-path-neglect
Advertising a fake AS number to a peer or peer group
By default, BGP considers
AS_PATH during best route selection.
After you move a BGP router from an AS to another AS (from AS 2 to AS 3 for example), you have to modify the AS number of the router on all its EBGP peers. To avoid such modifications, you can configure the router to advertise a fake AS number 2 to its EBGP peers so that the EBGP peers still think that Router
A is in AS 2.
To advertise a fake AS number to a peer or peer group (IPv4):
Step Command
1. Enter system view. system-view
2. Enter BGP view or BGP-VPN instance view.
•
Enter BGP view: bgp as-number
•
Enter BGP-VPN instance view: a. bgp as-number b. ip vpn-instance
vpn-instance-name
Remarks
N/A
N/A
3. Advertise a fake AS number to a peer or peer group. peer { group-name | ip-address } fake-as as-number
By default, no fake AS number is advertised to a peer or peer group.
This command applies to only
EBGP peers or EBGP peer groups.
To advertise a fake AS number to a peer or peer group (IPv6):
Step Command
1. Enter system view. system-view
2. Enter BGP view or BGP-VPN instance view.
•
Enter BGP view: bgp as-number
•
Enter BGP-VPN instance view: a. bgp as-number b. ip vpn-instance
vpn-instance-name
Remarks
N/A
N/A
3. Advertise a fake AS number to a peer or peer group. peer { group-name |
ipv6-address } fake-as as-number
By default, no fake AS number is advertised to a peer or peer group.
This command applies to only
EBGP peers or EBGP peer groups.
117
Configuring AS number substitution
IMPORTANT:
Do not configure AS number substitution in normal circumstances. Otherwise, routing loops might occur.
To use BGP between PE and CE in MPLS L3VPN, VPN sites in different geographical areas should have different AS numbers. Otherwise, BGP discards route updates containing the local AS number. If two CEs connected to different PEs use the same AS number, you must configure AS number substitution on each
PE to replace the AS number in route updates originated by the remote CE as its own AS number before advertising them to the connected CE.
Figure 29 AS number substitution configuration (in an IPv4 network)
For example, as shown in Figure 29 , CE 1 and CE 2 use the same AS number 800. To implement
bidirectional communication between the two sites, configure AS number substitution on PE 2 to replace
AS 800 as AS 100 for the BGP route update originated from CE 1 before advertising it to CE 2, and perform the same configuration on PE 1.
To configure AS number substitution for a peer or peer group (IPv4):
Step Command
1. Enter system view. system-view
2. Enter BGP view or BGP-VPN instance view.
•
Enter BGP view: bgp as-number
•
Enter BGP-VPN instance view: a. bgp as-number b. ip vpn-instance
vpn-instance-name
3. Configure AS number substitution for a peer or peer group. peer { group-name | ip-address } substitute-as
To configure AS number substitution for a peer or peer group (IPv6):
Remarks
N/A
N/A
By default, AS number substitution is not configured.
Step Command
1. Enter system view. system-view
Remarks
N/A
118
Step Command
2. Enter BGP view or BGP-VPN instance view.
•
Enter BGP view: bgp as-number
•
Enter BGP-VPN instance view: a. bgp as-number b. ip vpn-instance
vpn-instance-name
3. Configure AS number substitution for a peer or peer group. peer { group-name |
ipv6-address } substitute-as
Remarks
N/A
By default, AS number substitution is not configured.
Removing private AS numbers from updates sent to an EBGP peer or peer group
Private AS numbers are typically used in test networks, and should not be transmitted in public networks.
The range of private AS numbers is from 64512 to 65535.
To remove private AS numbers from updates sent to an EBGP peer or peer group (IPv4):
Step Command
1. Enter system view. system-view
2. Enter BGP view or BGP-VPN instance view.
•
Enter BGP view: bgp as-number
•
Enter BGP-VPN instance view: a. bgp as-number b. ip vpn-instance
vpn-instance-name
3. Enter BGP IPv4 unicast address family view or
BGP-VPN IPv4 unicast address family view.
4. Configure BGP to remove private AS numbers from the
AS_PATH attribute of updates sent to an EBGP peer or peer group. address-family ipv4 [ unicast ] peer { group-name | ip-address } public-as-only
Remarks
N/A
N/A
N/A
By default, this feature is not configured.
This command is only applicable to
EBGP peers or peer groups.
To remove private AS numbers from updates sent to an EBGP peer or peer group (IPv6):
Step Command
1. Enter system view. system-view
2. Enter BGP view or BGP-VPN instance view.
•
Enter BGP view: bgp as-number
•
Enter BGP-VPN instance view: a. bgp as-number b. ip vpn-instance
vpn-instance-name
3. Enter BGP IPv6 unicast address family view or
BGP-VPN IPv6 unicast address family view. address-family ipv6 [ unicast ]
Remarks
N/A
N/A
N/A
119
Step Command
4. Configure BGP to remove private AS numbers from the
AS_PATH attribute of updates sent to an EBGP peer or peer group. peer { group-name |
ipv6-address } public-as-only
Remarks
By default, this feature is not configured.
This command is only applicable to
EBGP peers or peer groups.
Ignoring the first AS number of EBGP route updates
By default, BGP checks whether the first AS number in the AS_PATH attribute of a route update received from a peer is the AS number of that peer. If not, BGP discards the route update.
To ignore the first AS number of EBGP route updates:
1. Enter system view.
2. Enter BGP view.
3. Configure BGP to ignore the first AS number of EBGP route updates. system-view bgp as-number ignore-first-as
Tuning and optimizing BGP networks
This section describes how to tune and optimize BGP networks.
N/A
N/A
By default, BGP checks the first AS number of EBGP route updates.
Configuring the keepalive interval and hold time
BGP sends keepalive messages at a specific interval to keep the BGP session between two routers.
If a router receives no keepalive or update message from a peer within the hold time, it tears down the session.
You can configure the keepalive interval and hold time globally or for a specific peer or peer group. The individual settings take precedence over the global settings.
The actual keepalive interval and hold time are determined as follows:
•
If the hold time settings on the local and peer routers are different, the smaller setting is used. If the hold time is 0, BGP does not send keepalive messages to its peers and never tears down the session.
•
If the keepalive interval is 0 and the negotiated hold time is not 0, the actual keepalive interval equals 1/3 of the hold time. If the keepalive interval is not 0, the actual keepalive interval is the smaller one between 1/3 of the hold time and the keepalive interval.
To configure the keepalive interval and hold time (IPv4):
Step Command
1. Enter system view. system-view
Remarks
N/A
120
Step Command
2. Enter BGP view or BGP-VPN instance view.
•
Enter BGP view: bgp as-number
•
Enter BGP-VPN instance view: a. bgp as-number b. ip vpn-instance
vpn-instance-name
Remarks
N/A
3. Configure the keepalive interval and hold time.
•
Configure the global keepalive interval and hold time: timer keepalive keepalive hold
holdtime
•
Configure the keepalive interval and hold time for a peer or peer group: peer { group-name |
ip-address } timer keepalive
keepalive hold holdtime
Use either method.
By default, the keepalive interval is
60 seconds, and hold time is 180 seconds.
The timer command takes effect for new BGP sessions and does not affect existing sessions.
If you modify the timers with the peer timer command, BGP immediately closes the existing
BGP session and creates a new session to the peer by using the new settings.
To configure the keepalive interval and hold time (IPv6):
Step Command
1. Enter system view. system-view
2. Enter BGP view or BGP-VPN instance view.
•
Enter BGP view: bgp as-number
•
Enter BGP-VPN instance view: a. bgp as-number b. ip vpn-instance
vpn-instance-name
3. Configure the keepalive interval and hold time.
Remarks
N/A
N/A
•
Configure the global keepalive interval and hold time: timer keepalive keepalive hold
holdtime
•
Configure the keepalive interval and hold time for a peer or peer group: peer { group-name |
ipv6-address } timer keepalive
keepalive hold holdtime
Use either method.
By default, the keepalive interval is
60 seconds, and hold time is 180 seconds.
The timer command takes effect for new BGP sessions and does not affect existing sessions.
If you modify the timers with the peer timer command, BGP immediately closes the existing
BGP session and creates a new session to the peer by using the new settings.
Configuring the interval for sending updates for the same route
A BGP router sends an update message to its peers when a route is changed. If the route changes frequently, the BGP router keeps sending updates for the same route, resulting route flapping. To prevent
121
this situation, perform this task to configure the interval for sending updates for the same route to a peer or peer group.
To configure the interval for sending the same update to a peer or peer group (IPv4):
Step Command
1. Enter system view. system-view
2. Enter BGP view or BGP-VPN instance view.
•
Enter BGP view: bgp as-number
•
Enter BGP-VPN instance view: a. bgp as-number b. ip vpn-instance
vpn-instance-name
Remarks
N/A
N/A
3. Configure the interval for sending updates for the same route to a peer or peer group. peer { group-name | ip-address } route-update-interval interval
By default, the interval is 15 seconds for an IBGP peer and 30 seconds for an EBGP peer.
To configure the interval for sending the same update to a peer or peer group (IPv6):
Remarks
N/A
Step Command
1. Enter system view. system-view
2. Enter BGP view or BGP-VPN instance view.
•
Enter BGP view: bgp as-number
•
Enter BGP-VPN instance view: a. bgp as-number b. ip vpn-instance
vpn-instance-name
3. Configure the interval for sending updates for the same route to a peer or peer group. peer { group-name |
ipv6-address } route-update-interval interval
N/A
By default, the interval is 15 seconds for an IBGP peer and 30 seconds for an EBGP peer.
Enabling BGP to establish an EBGP session over multiple hops
To establish an EBGP connection, two routers must have a direct physical link. If no direct link is available, you must use the peer ebgp-max-hop command to enable BGP to establish an EBGP session over multiple hops and specify the maximum hops.
If directly connected EBGP peers use loopback interfaces to establish a BGP session, you do not need to configure the peer ebgp-max-hop command.
To enable BGP to establish an indirect EBGP session (IPv4):
Step Command
1. Enter system view. system-view
Remarks
N/A
122
Step Command
2. Enter BGP view or BGP-VPN instance view.
•
Enter BGP view: bgp as-number
•
Enter BGP-VPN instance view: a. bgp as-number b. ip vpn-instance
vpn-instance-name
3. Enable BGP to establish an
EBGP session to an indirectly-connected peer or peer group and specify the maximum hop count. peer { group-name | ip-address } ebgp-max-hop [ hop-count ]
To enable BGP to establish an indirect EBGP session (IPv6):
Step Command
1. Enter system view. system-view
2. Enter BGP view or BGP-VPN instance view.
•
Enter BGP view: bgp as-number
•
Enter BGP-VPN instance view: a. bgp as-number b. ip vpn-instance
vpn-instance-name
3. Enable BGP to establish an
EBGP session to an indirectly-connected peer or peer group and specify the maximum hop count. peer { group-name |
ipv6-address } ebgp-max-hop
[ hop-count ]
Remarks
N/A
By default, BGP cannot establish an EBGP session to an indirectly-connected peer or peer group.
Remarks
N/A
N/A
By default, BGP cannot establish an EBGP session to an indirectly-connected peer or peer group.
Enabling immediate reestablishment of direct EBGP connections upon link failure
When the link to a directly-connected EBGP peer goes down, the router does not reestablish a session to the peer until the hold time timer expires. This feature enables BGP to immediately recreate the session in that situation. When this feature is disabled, route flapping does not affect EBGP session state.
To enable immediate reestablishment of direct EBGP connections:
1. Enter system view.
2. Enter BGP view.
3. Enable immediate reestablishment of direct EBGP connections upon link failure. system-view bgp as-number ebgp-interface-sensitive
N/A
N/A
By default, this feature is enabled.
123
Enabling 4-byte AS number suppression
BGP supports 4-byte AS numbers. The 4-byte AS number occupies four bytes, in the range of 1 to
4294967295. By default, a device sends an Open message to the peer device for session establishment.
The Open message indicates that the device supports 4-byte AS numbers. If the peer device supports
2-byte AS numbers instead of 4-byte AS numbers, the session cannot be established. To resolve this issue, enable the 4-byte AS number suppression function. The device then sends an Open message to inform the peer that it does not support 4-byte AS numbers, so the BGP session can be established.
If the peer device supports 4-byte AS numbers, do not enable the 4-byte AS number suppression function.
Otherwise, the BGP session cannot be established.
To enable 4-byte AS number suppression (IPv4):
1. Enter system view.
2. Enter BGP view or BGP-VPN instance view. system-view N/A
•
Enter BGP view: bgp as-number
•
Enter BGP-VPN instance view: a. bgp as-number b. ip vpn-instance
vpn-instance-name
N/A
3. Enable 4-byte AS number suppression. peer { group-name | ip-address } capability-advertise suppress-4-byte-as
To enable 4-byte AS number suppression (IPv6):
By default, 4-byte AS number suppression is not enabled.
1. Enter system view.
2. Enter BGP view or BGP-VPN instance view.
3. Enable 4-byte AS number suppression. system-view N/A
•
Enter BGP view: bgp as-number
•
Enter BGP-VPN instance view: a. bgp as-number b. ip vpn-instance
vpn-instance-name
N/A peer { group-name |
ipv6-address } capability-advertise suppress-4-byte-as
By default, 4-byte AS number suppression is not enabled.
Enabling MD5 authentication for BGP peers
MD5 authentication provides the following benefits:
•
Peer authentication makes sure that only BGP peers that have the same password can establish TCP connections.
•
Integrity check makes sure that BGP packets exchanged between peers are intact.
To enable MD5 authentication for BGP peers (IPv4):
124
1. Enter system view.
2. Enter BGP view or BGP-VPN instance view.
system-view
•
Enter BGP view: bgp as-number
•
Enter BGP-VPN instance view: a. bgp as-number b. ip vpn-instance
vpn-instance-name
3. Enable MD5 authentication for a BGP peer group or peer.
peer { group-name | ip-address } password { cipher | simple }
password
To enable MD5 authentication for BGP peers (IPv6):
N/A
Use either method.
By default, MD5 authentication is disabled.
1. Enter system view.
2. Enter BGP view or BGP-VPN instance view.
system-view
•
Enter BGP view: bgp as-number
•
Enter BGP-VPN instance view: a. bgp as-number b. ip vpn-instance
vpn-instance-name
3. Enable MD5 authentication for a BGP peer group or peer.
peer { group-name |
ipv6-address } password { cipher | simple } password
N/A
Use either method.
By default, MD5 authentication is disabled.
Configuring BGP load balancing
Perform this task to specify the maximum number of BGP ECMP routes for load balancing.
To specify the maximum number of BGP ECMP routes for load balancing (IPv4):
Remarks
N/A
Step Command
1. Enter system view. system-view
2. Enter BGP view or BGP-VPN instance view.
•
Enter BGP view: bgp as-number
•
Enter BGP-VPN instance view: a. bgp as-number b. ip vpn-instance
vpn-instance-name
3. Enter BGP IPv4 unicast address family view or
BGP-VPN IPv4 unicast address family view.
4.
Specify the maximum number of BGP ECMP routes for load balancing. address-family ipv4 [ unicast ] balance number
N/A
N/A
By default, load balancing is disabled.
125
To specify the maximum number of BGP ECMP routes for load balancing (IPv6):
Step Command
1. Enter system view.
2. Enter BGP view or BGP-VPN instance view.
3. Enter BGP IPv6 unicast address family view or
BGP-VPN IPv6 unicast address family view.
4. Specify the maximum number of BGP ECMP routes for load balancing. system-view
•
Enter BGP view: bgp as-number
•
Enter BGP-VPN instance view: a. bgp as-number b. ip vpn-instance
vpn-instance-name
address-family ipv6 [ unicast ] balance number
Remarks
N/A
N/A
N/A
By default, load balancing is disabled.
Disabling BGP to establish a session to a peer or peer group
This task enables you to temporarily tear down the BGP session to a specific peer or peer group so that you can perform network upgrade and maintenance without needing to delete and reconfigure the peer or peer group. To recover the session, execute the undo peer ignore command.
To disable BGP to establish a session to a peer or peer group (IPv4):
Step Command
1. Enter system view. system-view
2. Enter BGP view or BGP-VPN instance view.
•
Enter BGP view: bgp as-number
•
Enter BGP-VPN instance view: a. bgp as-number b. ip vpn-instance
vpn-instance-name
3. Disable BGP to establish a session to a peer or peer group. peer { group-name | ip-address } ignore
To disable BGP to establish a session to a peer or peer group (IPv6):
Remarks
N/A
N/A
By default, BGP can establish a session to a peer or peer group.
Step Command
1. Enter system view. system-view
2. Enter BGP view or BGP-VPN instance view.
•
Enter BGP view: bgp as-number
•
Enter BGP-VPN instance view: a. bgp as-number b. ip vpn-instance
vpn-instance-name
Remarks
N/A
N/A
126
Step Command
3. Disable BGP to establish a session to a peer or peer group. peer { group-name |
ipv6-address } ignore
Remarks
By default, BGP can establish a session to a peer.
Configuring BGP soft-reset
After you modify the route selection policy (for example, modify the preferred value), you must reset BGP sessions to apply the new policy. The reset operation tears down and re-establishes BGP sessions.
To avoid tearing down BGP sessions, you can use one of the following soft-reset methods to apply the new policy:
•
Enabling route-refresh—The BGP router advertises a route-refresh message to the specified peer, and the peer resends its routing information to the router. After receiving the routing information, the router filters the routing information by using the new policy.
This method requires that both the local router and the peer support route refresh.
•
Saving updates—Use the peer keep-all-routes command to save all route updates from the specified peer. After modifying the route selection policy, filter routing information by using the new policy.
This method does not require that the local router and the peer support route refresh but it uses more memory resources to save routes.
•
Manual soft-reset—Use the refresh bgp command to enable BGP to send local routing information or advertise a route-refresh message to the specified peer so the peer resends its routing information.
After receiving the routing information, the router filters the routing information by using the new policy.
This method requires that both the local router and the peer support route refresh.
Enabling route-refresh
To enable BGP route refresh for a peer or peer group (IPv4):
Step Command
1. Enter system view. system-view
2. Enter BGP view or BGP-VPN instance view.
•
Enter BGP view: bgp as-number
•
Enter BGP-VPN instance view: a. bgp as-number b. ip vpn-instance
vpn-instance-name
Remarks
N/A
N/A
127
Step Command
3. Enable BGP route refresh for a peer or peer group.
•
Enable BGP route refresh for the specified peer or peer group: peer { group-name |
ip-address } capability-advertise route-refresh
•
Enable BGP route refresh and multi-protocol extension capability for the specified peer or peer group: undo peer { group-name |
ip-address } capability-advertise conventional
To enable BGP route refresh for a peer or peer group (IPv6):
Remarks
Use either method.
By default, BGP route refresh is enabled.
Step Command
1. Enter system view. system-view
2. Enter BGP view or BGP-VPN instance view.
3. Enable BGP route refresh for a peer or peer group.
•
Enter BGP view: bgp as-number
•
Enter BGP-VPN instance view: a. bgp as-number b. ip vpn-instance
vpn-instance-name
•
Enable BGP route refresh for the specified peer or peer group: peer { group-name |
ipv6-address } capability-advertise route-refresh
•
Enable BGP route refresh and multi-protocol extension capability for the specified peer or peer group: undo peer { group-name |
ipv6-address } capability-advertise conventional
Remarks
N/A
N/A
Saving updates
To save all route updates from the specified peer or peer group (IPv4):
Use either method.
By default, BGP route refresh is enabled.
Step Command
1. Enter system view. system-view
Remarks
N/A
128
Step Command
2. Enter BGP view or BGP-VPN instance view.
•
Enter BGP view: bgp as-number
•
Enter BGP-VPN instance view: a. bgp as-number b. ip vpn-instance
vpn-instance-name
3. Enter BGP IPv4 unicast address family view or
BGP-VPN IPv4 unicast address family view. address-family ipv4 [ unicast ]
Remarks
N/A
N/A
4. Save all route updates from the peer or peer group. peer { group-name | ip-address } keep-all-routes
By default, the routes are not saved.
This command takes effect only for the routes received after this command is executed.
To save all route updates from the specified peer or peer group (IPv6):
Step Command
1. Enter system view. system-view
2. Enter BGP view bgp as-number
3. Enter BGP IPv6 unicast address family view. address-family ipv6 [ unicast ]
Remarks
N/A
N/A
N/A
4. Save all route updates from the peer or peer group. peer { group-name |
ipv6-address } keep-all-routes
By default, the routes are not saved.
This command takes effect only for the routes received after this command is executed.
Configuring manual soft-reset
To configure manual soft-reset (IPv4):
Step Command
1. Enter system view. system-view
2. Enter BGP view or BGP-VPN instance view.
•
Enter BGP view: bgp as-number
•
Enter BGP-VPN instance view: a. bgp as-number b. ip vpn-instance
vpn-instance-name
Remarks
N/A
N/A
129
Step Command
3. Enable BGP route refresh for a peer or peer group.
•
Enable BGP route refresh for the specified peer or peer group: peer { group-name |
ip-address } capability-advertise route-refresh
•
Enable BGP route refresh and multi-protocol extension capability for the specified peer or peer group: undo peer { group-name |
ip-address } capability-advertise conventional
Remarks
By default, BGP route refresh is enabled.
4. Return to user view. return N/A
5. Perform manual soft-reset. refresh bgp { ip-address | all | external | group group-name | internal } { export | import } ipv4
[ unicast ] [ vpn-instance
vpn-instance-name ]
To configure manual soft-reset (IPv6):
N/A
Step Command
1. Enter system view. system-view
2. Enter BGP view or BGP-VPN instance view.
3. Enable BGP route refresh for a peer or peer group.
•
Enter BGP view: bgp as-number
•
Enter BGP-VPN instance view: a. bgp as-number b. ip vpn-instance
vpn-instance-name
•
Enable BGP route refresh for the specified peer or peer group: peer { group-name |
ipv6-address } capability-advertise route-refresh
•
Enable BGP route refresh and multi-protocol extension capability for the specified peer or peer group: undo peer { group-name |
ipv6-address } capability-advertise conventional
Remarks
N/A
N/A
By default, BGP route refresh is enabled.
4. Return to user view. return N/A
130
Step Command
5. Perform manual soft-reset. refresh bgp { ipv6-address | all | external | group group-name | internal } { export | import } ipv6
[ unicast ] [ vpn-instance
vpn-instance-name ]
Remarks
N/A
Protecting an EBGP peer when memory usage reaches level 2 threshold
Memory usage includes the following threshold levels: normal, level 1, level 2, and level 3. When the level 2 threshold is reached, BGP periodically tears down an EBGP session to release memory resources until the memory usage falls below the level 2 threshold. You can configure this feature to avoid tearing down the EBGP session with a specific EBGP peer when the memory usage reaches the level 2 threshold.
For more information about memory usage thresholds, see Fundamentals Configuration Guide.
To configure BGP to protect an EBGP peer or peer group when the memory usage reaches level 2 threshold (IPv4):
Step Command
1. Enter system view. system-view
2. Enter BGP view or BGP-VPN instance view.
•
Enter BGP view: bgp as-number
•
Enter BGP-VPN instance view: a. bgp as-number b. ip vpn-instance
vpn-instance-name
3. Configure BGP to protect an
EBGP peer or peer group when the memory usage reaches level 2 threshold. peer { group-name | ip-address } low-memory-exempt
Remarks
N/A
N/A
By default, BGP periodically tears down an EBGP session to release memory resources when level 2 threshold is reached.
To configure BGP to protect an EBGP peer or peer group when the memory usage reaches level 2 threshold (IPv6):
Remarks
N/A
Step Command
1. Enter system view. system-view
2. Enter BGP view or BGP-VPN instance view.
•
Enter BGP view: bgp as-number
•
Enter BGP-VPN instance view: a. bgp as-number b. ip vpn-instance
vpn-instance-name
3. Configure BGP to protect an
EBGP peer or peer group when the memory usage reaches level 2 threshold. peer { group-name |
ipv6-address } low-memory-exempt
N/A
By default, BGP tears down an
EBGP session to release memory resources periodically when level
2 threshold is reached.
131
Configuring a large-scale BGP network
In a large network, the number of BGP connections is huge and BGP configuration and maintenance are complicated. To simply BGP configuration, you can use the peer group, community, route reflector, and confederation features as needed. For more information about configuring peer groups, see
"
Configuring a BGP peer group ."
Configuring BGP community
By default, a router does not advertise the COMMUNITY or extended community attribute to its peers or peer groups. When the router receives a route carrying the COMMUNITY or extended community attribute, it removes the attribute before advertising the route to other peers or peer groups.
Perform this task to enable a router to advertise the COMMUNITY or extended community attribute to its peers for route filtering and control. You can also reference a routing policy to add or modify the
COMMUNITY or extended community attribute for specific routes. For more information about routing
policy, see " Configuring a routing policy ."
To configure BGP community (IPv4):
1. Enter system view.
2. Enter BGP view or BGP-VPN instance view. system-view
•
Enter BGP view: bgp as-number
•
Enter BGP-VPN instance view: a. bgp as-number b. ip vpn-instance
vpn-instance-name
3. Enter BGP IPv4 unicast address family view or
BGP-VPN IPv4 unicast address family view. address-family ipv4 [ unicast ]
4. Advertise the COMMUNITY or extended community attribute to a peer or peer group.
•
Advertise the COMMUNITY attribute to a peer or peer group: peer { group-name |
ip-address } advertise-community
•
Advertise the extended community attribute to a peer or peer group: peer { group-name |
ip-address } advertise-ext-community
5. (Optional.) Apply a routing policy to routes advertised to a peer or peer group.
To configure BGP community (IPv6): peer { group-name | ip-address } route-policy route-policy-name export
N/A
N/A
N/A
By default, the COMMUNITY or extended community attribute is not advertised.
By default, no routing policy is applied.
132
1. Enter system view.
2. Enter BGP view.
3. Enter BGP IPv6 unicast address family view. system-view bgp as-number
4. Advertise the COMMUNITY or extended community attribute to a peer or peer group.
5. (Optional.) Apply a routing policy to routes advertised to a peer or peer group. address-family ipv6 [ unicast ]
•
Advertise the COMMUNITY attribute to a peer or peer group: peer { group-name |
ipv6-address } advertise-community
•
Advertise the extended community attribute to a peer or peer group: peer { group-name |
ipv6-address } advertise-ext-community peer { group-name |
ipv6-address } route-policy
route-policy-name export
N/A
N/A
N/A
By default, the COMMUNITY or extended community attribute is not advertised.
By default, no routing policy is applied.
Configuring BGP route reflection
Configuring a BGP route reflector
Perform this task to configure a BGP route reflector and its clients. The route reflector and its clients automatically form a cluster identified by the router ID of the route reflector. The route reflector forwards route updates among its clients.
To improve availability, you can specify multiple route reflectors for a cluster. The route reflectors in the cluster must have the same cluster ID to avoid routing loops.
To configure a BGP route reflector (IPv4):
1. Enter system view.
2. Enter BGP view or BGP-VPN instance view. system-view
•
Enter BGP view: bgp as-number
•
Enter BGP-VPN instance view: a. bgp as-number b. ip vpn-instance
vpn-instance-name
3. Enter BGP IPv4 unicast address family view or
BGP-VPN IPv4 unicast address family view.
4. Configure the router as a route reflector and specify a peer or peer group as its client. address-family ipv4 [ unicast ] peer { group-name | ip-address } reflect-client
N/A
N/A
N/A
By default, no route reflector or client is configured.
133
5. Enable route reflection between clients. reflect between-clients
6. (Optional.) Configure the cluster ID of the route reflector. reflector cluster-id { cluster-id |
ip-address }
To configure a BGP route reflector (IPv6):
By default, route reflection between clients is enabled.
By default, a route reflector uses its own router ID as the cluster ID.
1. Enter system view. system-view N/A
2. Enter BGP view.
3. Enter BGP IPv6 unicast address family view.
4. Configure the router as a route reflector and specify a peer or peer group as its client.
5. Enable route reflection between clients. bgp as-number address-family ipv6 [ unicast ] peer { group-name |
ipv6-address } reflect-client
N/A
N/A
By default, no route reflector or client is configured.
6. (Optional.) Configure the cluster ID of the route reflector.
Ignoring the ORIGINATOR_ID attribute reflect between-clients reflector cluster-id { cluster-id |
ip-address }
By default, route reflection between clients is enabled.
By default, a route reflector uses its own router ID as the cluster ID.
By default, BGP drops incoming route updates whose ORIGINATOR_ID attribute is the same as the local router ID. Some special networks such as firewall networks require BGP to accept such route updates. To meet the requirement, you must configure BGP to ignore the ORIGINATOR_ID attribute.
To ignore the ORIGINATOR_ID attribute (IPv4):
1. Enter system view.
2. Enter BGP view or BGP-VPN instance view.
3. Ignore the ORIGINATOR_ID attribute. system-view
•
Enter BGP view: bgp as-number
•
Enter BGP-VPN instance view: a. bgp as-number b. ip vpn-instance
vpn-instance-name
N/A
N/A peer { group-name | ip-address } ignore-originatorid
By default, BGP does not ignore the ORIGINATOR_ID attribute.
Make sure that this command does not result in a routing loop.
After you execute this command,
BGP also ignores the
CLUSTER_LIST attribute.
To ignore the ORIGINATOR_ID attribute (IPv6):
134
1. Enter system view.
2. Enter BGP view or BGP-VPN instance view.
3. Ignore the ORIGINATOR_ID attribute. system-view
•
Enter BGP view: bgp as-number
•
Enter BGP-VPN instance view: a. bgp as-number b. ip vpn-instance
vpn-instance-name
N/A
N/A peer { group-name |
ipv6-address } ignore-originatorid
By default, BGP does not ignore the ORIGINATOR_ID attribute.
Make sure this command does not result in a routing loop.
After you execute this command,
BGP also ignores the
CLUSTER_LIST attribute.
Configuring a BGP confederation
BGP confederation provides another way to reduce IBGP connections in an AS.
A confederation contains sub-ASs. In each sub-AS, IBGP peers are fully meshed. Sub-ASs establish EBGP connections in between.
Configuring a BGP confederation
After you split an AS into multiple sub-ASs, configure a router in a sub-AS as follows:
1. Enable BGP and specify the AS number of the router. For more information, see "
2. Specify the confederation ID. From an outsider's perspective, the sub-ASs of the confederation is a single AS, which is identified by the confederation ID.
3. If the router needs to establish EBGP connections to other sub-ASs, you must specify the peering sub-ASs in the confederation.
A confederation can contain a maximum of 32 sub-ASs. The AS number of a sub-AS is effective only in the confederation.
To configure a BGP confederation:
1. Enter system view.
2. Enter BGP view. system-view bgp as-number
N/A
N/A
3. Configure a confederation ID. confederation id as-number
4. Specify peering sub-ASs in the confederation.
Configuring confederation compatibility confederation peer-as
as-number-list
By default, no confederation ID is configured.
By default, no peering sub-AS is specified.
If any routers in the confederation do not comply with RFC 3065, enable confederation compatibility to allow the router to work with those routers.
135
To configure confederation compatibility:
1. Enter system view.
2. Enter BGP view.
3. Enable confederation compatibility. system-view bgp as-number confederation nonstandard
N/A
N/A
By default, confederation compatibility is disabled.
Configuring BGP GR
GR ensures forwarding continuous when a routing protocol restarts or an active/standby switchover occurs. Two routers are required to complete a GR process. The following are router roles in a GR process:
• GR restarter—Performs GR upon a BGP restart or active/standby switchover.
• GR helper—Helps the GR restarter to complete the GR process.
A device can act as a GR restarter and GR helper at the same time.
NOTE:
The HP FlexFabric 5930 switch series can act only as a GR helper.
BGP GR works as follows:
1. The BGP GR restarter and helper exchange Open messages for GR capability negotiation. If both parties have the GR capability, they establish a GR-capable session. The GR restarter sends the GR timer set by the graceful-restart timer restart command to the GR helper in an Open message.
2. When an active/standby switchover occurs or BGP restarts, the GR restarter does not remove existing BGP routes, and it still uses these routes for packet forwarding. The GR helper marks all routes learned from the GR restarter as stale instead of deleting them, and it still uses these routes for packet forwarding. During the GR process, packet forwarding is not interrupted.
3. After the active/standby switchover or BGP restart completes, the GR restarter reestablishes a BGP session with the GR helper. If the BGP session fails to be established within the GR timer advertised by the GR restarter, the GR helper removes the stale routes.
4. If the BGP session is established, routing information is exchanged for the GR restarter to retrieve route entries and for the GR helper to recover stale routes. You can use the graceful-restart timer wait-for-rib command to configure the time for the local router to wait for the End-Of-RIB (End of
Routing-Information-Base) marker, and control the route convergence speed. If routing information exchange is not completed within the time, the GR restarter does not receive new routes. Instead, the GR restarter updates its routing table and forwarding table with the BGP routes already learned to complete BGP route convergence. The GR helper removes the stale routes.
Follow these guidelines when you configure BGP GR:
•
The End-Of-RIB indicates the end of route updates.
•
The maximum time to wait for the End-of-RIB marker configured on the local end is not advertised to the peer. It controls the time for the local end to receive updates from the peer.
Perform the following configuration on the GR restarter and GR helper.
To configure BGP GR:
136
Step Command
1. Enter system view. system-view
2. Enter BGP view. bgp as-number
3. Enable GR capability for BGP. graceful-restart
4. Configure the GR timer. graceful-restart timer restart
timer
Remarks
N/A
N/A
By default, GR capability is disabled for BGP.
The default setting is 150 seconds.
The time that a peer waits to reestablish a session must be less than the hold time.
5. Configure the maximum time to wait for the End-of-RIB marker. graceful-restart timer wait-for-rib timer
The default setting is 180 seconds.
Enabling SNMP notifications for BGP
This feature enables generating SNMP notifications for BGP upon neighbor state changes, as defined in
RFC 4273. The SNMP notifications include the neighbor address, the code and subcode of the most recent error, and the current neighbor state. The generated SNMP notifications are sent to the SNMP module. The SNMP module determines how to output the notifications according to the configured output rules.
For more information about SNMP notifications, see Network Management and Monitoring
Configuration Guide.
To enable SNMP notifications for BGP:
Step Command
1. Enter system view. system-view
2. Enable SNMP notifications for BGP. snmp-agent trap enable bgp
Remarks
N/A
By default, SNMP notifications for BGP are enabled.
Enabling logging of session state changes
Perform this task to enable BGP to log BGP session establishment and disconnection events. To view the log information, use the display bgp peer ipv4 unicast log-info command or the display bgp peer ipv6 unicast log-info command. The logs are sent to the information center. The output rules of the logs
(whether to output the logs and where to output) are determined by the information center configuration.
For more information about information center configuration, see Network Management and Monitoring
Configuration Guide.
To enable the logging of session state changes:
1. Enter system view.
2. Enter BGP view. system-view bgp as-number
N/A
N/A
137
3. Enable the logging of session state changes globally. log-peer-change
By default, logging of session state changes is enabled globally.
Configuring BFD for BGP
IMPORTANT:
If you have enabled GR, use BFD with caution because BFD might detect a failure before the system performs GR, which will result in GR failure. If you have enabled both BFD and GR for BGP, do not disable
BFD during a GR process to avoid GR failure.
BGP maintains neighbor relationships based on the keepalive timer and hold timer in seconds. It requires that the hold time must be at least three times the keepalive interval. This mechanism makes link failure detection slow. Once a failure occurs on a high-speed link, a large quantity of packets will be dropped before routing convergence completes. BFD for BGP can solve this problem by fast detecting link failures to reduce convergence time.
For more information about BFD, see High Availability Configuration Guide.
Before you can enable BFD for the BGP peer, establish a BGP session between the local router and the peer.
To enable BFD for a BGP peer (IPv4):
Step Command
1. Enter system view.
system-view
2. Enter BGP view or BGP-VPN instance view.
•
Enter BGP view: bgp as-number
•
Enter BGP-VPN instance view: a. bgp as-number b. ip vpn-instance vpn-instance-name
3. Enable BFD to detect the link to the specified BGP peer.
To enable BFD for a BGP peer (IPv6): peer ip-address bfd [ multi-hop | single-hop ]
Step Command
1. Enter system view. system-view
Remarks
N/A
N/A
By default, BFD is not enabled.
Remarks
N/A
2. Enter BGP view or BGP-VPN instance view.
•
Enter BGP view: bgp as-number
•
Enter BGP-VPN instance view: a. bgp as-number b. ip vpn-instance vpn-instance-name
N/A
3. Enable BFD to detect the link to the specified IPv6 BGP peer. peer ipv6-address bfd [ multi-hop | single-hop ]
By default, BFD is not enabled.
138
Displaying and maintaining BGP
Execute display commands in any view and reset commands in user view (IPv4).
Task Command
Display BGP IPv4 unicast peer group information. display bgp group ipv4 [ unicast ] [ vpn-instance
vpn-instance-name ] [ group-name ]
Display BGP IPv4 unicast peer or peer group information.
Display BGP IPv4 unicast routing information.
Display BGP IPv4 unicast route advertisement information.
Display BGP IPv4 unicast routing information sent to/received from the specified BGP peer.
Display BGP IPv4 unicast routing statistics. display bgp peer ipv4 [ unicast ] [ vpn-instance
vpn-instance-name ] [ ip-address { log-info | verbose } |
group-name log-info | verbose ] display bgp routing-table ipv4 [ unicast ] [ vpn-instance
vpn-instance-name ] [ network-address [ { mask | mask-length }
[ longest-match ] ] ] display bgp routing-table ipv4 [ unicast ] [ vpn-instance
vpn-instance-name ] network-address [ mask | mask-length ] advertise-info display bgp routing-table ipv4 [ unicast ] [ vpn-instance
vpn-instance-name ] peer ip-address { advertised-routes | received-routes } [ network-address [ mask | mask-length ] | statistic ] display bgp routing-table ipv4 [ unicast ] [ vpn-instance
vpn-instance-name ] statistic
Display BGP IPv4 unicast routing information matching the specified AS path list. display bgp routing-table ipv4 [ unicast ] [ vpn-instance
vpn-instance-name ] as-path-acl as-path-acl-number
Display BGP IPv4 unicast routing information matching the specified BGP community list.
Display dampened BGP IPv4 unicast routing information.
Display BGP dampening parameter information. display bgp routing-table ipv4 [ unicast ] [ vpn-instance
vpn-instance-name ] community-list
{ { basic-community-list-number | comm-list-name }
[ whole-match ] | adv-community-list-number } display bgp routing-table dampened ipv4 [ unicast ]
[ vpn-instance vpn-instance-name ] display bgp dampening parameter ipv4 [ unicast ] [ vpn-instance
vpn-instance-name ]
Display BGP IPv4 unicast routing flap statistics. display bgp routing-table flap-info ipv4 [ unicast ] [ vpn-instance
vpn-instance-name ] [ network-address [ { mask | mask-length }
[ longest-match ] ] | as-path-acl as-path-acl-number ]
Display information about routes advertised by the network command and shortcut routes configured by the network short-cut command.
Display BGP path attribute information.
Display BGP IPv4 unicast address family update group information.
Reset all BGP sessions.
Reset IPv4 unicast BGP sessions. display bgp network ipv4 [ unicast ] [ vpn-instance
vpn-instance-name ] display bgp paths [ as-regular-expression ] display bgp update-group ipv4 [ unicast ] [ vpn-instance
vpn-instance-name ] [ ip-address ] reset bgp all reset bgp { as-number | ip-address | all | external | group
group-name | internal } ipv4 [ unicast ] [ vpn-instance
vpn-instance-name ]
139
Task Command
Clear dampened BGP IPv4 unicast routing information and release suppressed routes. reset bgp dampening ipv4 [ unicast ] [ vpn-instance
vpn-instance-name ] [ network-address [ mask | mask-length ] ]
Clear BGP IPv4 unicast route flap information. reset bgp flap-info ipv4 [ unicast ] [ vpn-instance
vpn-instance-name ] [ network-address [ mask | mask-length ] | as-path-acl as-path-acl-number | peer peer-address ]
Execute display commands in any view and reset commands in user view (IPv6).
Task Command
Display BGP IPv6 unicast peer group information. display bgp group ipv6 [ unicast ] [ vpn-instance
vpn-instance-name ] [ group-name ]
Display BGP IPv6 unicast peer or peer group information.
Display BGP IPv6 unicast routing information.
Display BGP IPv6 unicast routing information sent to/received from the specified BGP peer. display bgp peer ipv6 [ unicast ] [ group-name log-info |
ip-address { log-info | verbose } | ipv6-address { log-info | verbose } | verbose ] display bgp peer ipv6 [ unicast ] vpn-instance vpn-instance-name
[ group-name log-info | ipv6-address { log-info | verbose } | verbose ] display bgp routing-table ipv6 [ unicast ] [ vpn-instance
vpn-instance-name ] [ network-address prefix-length
[ advertise-info ] ] display bgp routing-table ipv6 [ unicast ] peer { ip-address |
ipv6-address } { advertised-routes | received-routes }
[ network-address prefix-length | statistics ] display bgp routing-table ipv6 [ unicast ] vpn-instance
vpn-instance-name peer ipv6-address { advertised-routes | received-routes } [ network-address prefix-length | statistics ]
Display BGP IPv6 unicast routing statistics. display bgp routing-table ipv6 [ unicast ] [ vpn-instance
vpn-instance-name ] statistics
Display BGP IPv6 unicast routing information matching the specified AS path list. display bgp routing-table ipv6 [ unicast ] [ vpn-instance
vpn-instance-name ] as-path-acl as-path-acl-number
Display BGP IPv6 unicast routing information matching the specified BGP community list.
Display dampened BGP IPv6 unicast routing information.
Display BGP dampening parameter information.
Display BGP IPv6 unicast routing flap statistics. display bgp routing-table ipv6 [ unicast ] [ vpn-instance
vpn-instance-name ] community-list
{ { basic-community-list-number | comm-list-name }
[ whole-match ] | adv-community-list-number } display bgp routing-table dampened ipv6 [ unicast ]
[ vpn-instance vpn-instance-name ] display bgp dampening parameter ipv6 [ unicast ] [ vpn-instance
vpn-instance-name ] display bgp routing-table flap-info ipv6 [ unicast ] [ vpn-instance
vpn-instance-name ] [ network-address prefix-length | as-path-acl
as-path-acl-number ]
Display the incoming label of BGP IPv6 unicast routing information. display bgp routing-table ipv6 [ unicast ] inlabel
140
Task Command
Display the outgoing label of BGP IPv6 unicast routing information. display bgp routing-table ipv6 [ unicast ] outlabel
Display information about routes advertised by the network command and shortcut routes configured by the network short-cut command.
Display BGP path attribute information. display bgp network ipv6 [ unicast ] [ vpn-instance
vpn-instance-name ] display bgp paths [ as-regular-expression ]
Display BGP IPv6 unicast address family update group information.
Reset IPv6 unicast BGP sessions. display bgp update-group ipv6 [ unicast ] [ ip-address |
ipv6-address ] display bgp update-group ipv6 [ unicast ] vpn-instance
vpn-instance-name [ ipv6-address ] reset bgp { as-number | ipv6-address | all | external | group
group-name | internal } ipv6 [ unicast ] [ vpn-instance
vpn-instance-name ] reset bgp ip-address ipv6 [ unicast ]
Clear dampened BGP IPv6 unicast routing information and release suppressed routes. reset bgp dampening ipv6 [ unicast ] [ vpn-instance
vpn-instance-name ] [ network-address prefix-length ]
Clear BGP IPv6 unicast route flap information. reset bgp flap-info ipv6 [ unicast ] [ vpn-instance
vpn-instance-name ] [ network-address prefix-length | as-path-acl
as-path-acl-number | peer ipv6-address ]
IPv4 BGP configuration examples
Basic BGP configuration example
Network requirements
, run EBGP between Switch A and Switch B, and run IBGP between Switch B and Switch C so that Switch C can access the network 8.1.1.0/24 connected to Switch A.
Figure 30 Network diagram
Configuration considerations
To prevent route flapping caused by port state changes, this example uses loopback interfaces to establish IBGP connections. Because loopback interfaces are virtual interfaces, use the peer connect-interface command to specify the loopback interface as the source interface for establishing
141
BGP connections. Enable OSPF in AS 65009 to make sure that Switch B can communicate with Switch
C through loopback interfaces.
The EBGP peers, Switch A and Switch B (usually belong to different carriers), are located in different ASs.
Typically, their loopback interfaces are not reachable to each other, so directly connected interfaces are used for establishing BGP sessions. To enable Switch C to access the network 8.1.1.0/24 connected directly to Switch A, inject network 8.1.1.0/24 to the BGP routing table of Switch A.
Configuration procedure
1. Configure IP addresses for interfaces. (Details not shown.)
2. Configure IBGP:
# Configure Switch B.
<SwitchB> system-view
[SwitchB] bgp 65009
[SwitchB-bgp] router-id 2.2.2.2
[SwitchB-bgp] peer 3.3.3.3 as-number 65009
[SwitchB-bgp] peer 3.3.3.3 connect-interface loopback 0
[SwitchB-bgp] address-family ipv4 unicast
[SwitchB-bgp-ipv4] peer 3.3.3.3 enable
[SwitchB-bgp-ipv4] quit
[SwitchB-bgp] quit
[SwitchB] ospf 1
[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 9.1.1.1 0.0.0.255
[SwitchB-ospf-1-area-0.0.0.0] quit
[SwitchB-ospf-1] quit
# Configure Switch C.
<SwitchC> system-view
[SwitchC] bgp 65009
[SwitchC-bgp] router-id 3.3.3.3
[SwitchC-bgp] peer 2.2.2.2 as-number 65009
[SwitchC-bgp] peer 2.2.2.2 connect-interface loopback 0
[SwitchC-bgp] address-family ipv4 unicast
[SwitchC-bgp-ipv4] peer 2.2.2.2 enable
[SwitchC-bgp-ipv4] quit
[SwitchC-bgp] quit
[SwitchC] ospf 1
[SwitchC-ospf-1] area 0
[SwitchC-ospf-1-area-0.0.0.0] network 3.3.3.3 0.0.0.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] quit
[SwitchC-ospf-1] quit
[SwitchC] display bgp peer ipv4
BGP local router ID : 3.3.3.3
Local AS number : 65009
Total number of peers : 1 Peers in established state : 1
142
Peer AS MsgRcvd MsgSent OutQ PrefRcv Up/Down State
2.2.2.2 65009 2 2 0 0 00:00:13 Established
The output shows that Switch C has established an IBGP peer relationship with Switch B.
3. Configure EBGP:
# Configure Switch A.
<SwitchA> system-view
[SwitchA] bgp 65008
[SwitchA-bgp] router-id 1.1.1.1
[SwitchA-bgp] peer 3.1.1.1 as-number 65009
[SwitchA-bgp] address-family ipv4 unicast
[SwitchA-bgp-ipv4] peer 3.1.1.1 enable
[SwitchA-bgp-ipv4] network 8.1.1.0 24
[SwitchA-bgp-ipv4] quit
[SwitchA-bgp] quit
# Configure Switch B.
[SwitchB] bgp 65009
[SwitchB-bgp] peer 3.1.1.2 as-number 65008
[SwitchB-bgp] address-family ipv4 unicast
[SwitchB-bgp-ipv4] peer 3.1.1.2 enable
[SwitchB-bgp-ipv4] quit
[SwitchB-bgp] quit
# Display BGP peer information on Switch B.
[SwitchB] display bgp peer ipv4
BGP local router ID : 2.2.2.2
Local AS number : 65009
Total number of peers : 2 Peers in established state : 2
Peer AS MsgRcvd MsgSent OutQ PrefRcv Up/Down State
3.3.3.3 65009 4 4 0 0 00:02:49 Established
3.1.1.2 65008 2 2 0 0 00:00:05 Established
The output shows that Switch B has established an IBGP peer relationship with Switch C and an
EBGP peer relationship with Switch A.
# Display the BGP routing table on Switch A.
[SwitchA] display bgp routing-table ipv4
Total number of routes: 1
BGP local router ID is 1.1.1.1
Status codes: * - valid, > - best, d - dampened, h - history,
s - suppressed, S - stale, i - internal, e - external
Origin: i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal Path/Ogn
143
* > 8.1.1.0/24 8.1.1.1 0 32768 i
# Display the BGP routing table on Switch B.
[SwitchB] display bgp routing-table ipv4
Total number of routes: 1
BGP local router ID is 2.2.2.2
Status codes: * - valid, > - best, d - dampened, h - history,
s - suppressed, S - stale, i - internal, e - external
Origin: i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal Path/Ogn
* >e 8.1.1.0/24 3.1.1.2 0 0 65008i
# Display the BGP routing table on Switch C.
[SwitchC] display bgp routing-table ipv4
Total number of routes: 1
BGP local router ID is 3.3.3.3
Status codes: * - valid, > - best, d - dampened, h - history,
s - suppressed, S - stale, i - internal, e - external
Origin: i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal Path/Ogn
i 8.1.1.0/24 3.1.1.2 0 100 0 65008i
The outputs show that Switch A has learned no route to AS 65009, and Switch C has learned network 8.1.1.0, but the next hop 3.1.1.2 is unreachable. As a result, the route is invalid.
4. Redistribute direct routes:
Configure BGP to redistribute direct routes on Switch B, so that Switch A can obtain the route to
9.1.1.0/24, and Switch C can obtain the route to 3.1.1.0/24.
# Configure Switch B.
[SwitchB] bgp 65009
[SwitchB-bgp] address-family ipv4 unicast
[SwitchB-bgp-ipv4] import-route direct
[SwitchB-bgp-ipv4] quit
[SwitchB-bgp] quit
# Display the BGP routing table on Switch A.
[SwitchA] display bgp routing-table ipv4
Total number of routes: 4
BGP local router ID is 1.1.1.1
Status codes: * - valid, > - best, d - dampened, h - history,
s - suppressed, S - stale, i - internal, e - external
Origin: i - IGP, e - EGP, ? - incomplete
144
Network NextHop MED LocPrf PrefVal Path/Ogn
* >e 2.2.2.2/32 3.1.1.1 0 0 65009?
* >e 3.1.1.0/24 3.1.1.1 0 0 65009?
* > 8.1.1.0/24 8.1.1.1 0 32768 i
* >e 9.1.1.0/24 3.1.1.1 0 0 65009?
Two routes, 2.2.2.2/32 and 9.1.1.0/24, have been added in Switch A's routing table.
# Display the BGP routing table on Switch C.
[SwitchC] display bgp routing-table ipv4
Total number of routes: 4
BGP local router ID is 3.3.3.3
Status codes: * - valid, > - best, d - dampened, h - history,
s - suppressed, S - stale, i - internal, e - external
Origin: i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal Path/Ogn
* >i 2.2.2.2/32 2.2.2.2 0 100 0 ?
* >i 3.1.1.0/24 2.2.2.2 0 100 0 ?
* >i 8.1.1.0/24 3.1.1.2 0 100 0 65008i
* >i 9.1.1.0/24 2.2.2.2 0 100 0 ?
The output shows that the route 8.1.1.0 becomes valid with the next hop as Switch A.
Verifying the configuration
# Ping 8.1.1.1 on Switch C.
[SwitchC] ping 8.1.1.1
Ping 8.1.1.1 (8.1.1.1): 56 data bytes, press CTRL_C to break
56 bytes from 8.1.1.1: icmp_seq=0 ttl=254 time=10.000 ms
56 bytes from 8.1.1.1: icmp_seq=1 ttl=254 time=4.000 ms
56 bytes from 8.1.1.1: icmp_seq=2 ttl=254 time=4.000 ms
56 bytes from 8.1.1.1: icmp_seq=3 ttl=254 time=3.000 ms
56 bytes from 8.1.1.1: icmp_seq=4 ttl=254 time=3.000 ms
--- Ping statistics for 8.1.1.1 ---
5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss round-trip min/avg/max/stddev = 3.000/4.800/10.000/2.638 ms
BGP and IGP route redistribution configuration example
Network requirements
As shown in
Figure 31 , all devices of company A belong to AS 65008, and all devices of company B
belong to AS 65009. AS 65008 and AS 65009 are connected through Switch A and Switch B. It is required that Switch A can access network 9.1.2.0/24 in AS 65009, and Switch C can access network
8.1.1.0/24 in AS 65008.
145
Figure 31 Network diagram
Configuration considerations
Configure BGP to redistribute routes from OSPF on Switch B, so Switch A can obtain the route to
9.1.2.0/24. Configure OSPF to redistribute routes from BGP on Switch B, so Switch C can obtain the route to 8.1.1.0/24.
Configuration procedure
1. Configure IP addresses for interfaces. (Details not shown.)
2. Configure OSPF:
Enable OSPF in AS 65009, so Switch B can obtain the route to 9.1.2.0/24.
# Configure Switch B.
<SwitchB> system-view
[SwitchB] ospf 1
[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 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> system-view
[SwitchC] ospf 1
[SwitchC-ospf-1] import-route direct
[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] quit
[SwitchC-ospf-1] quit
3. Configure the EBGP connection:
Configure the EBGP connection and inject network 8.1.1.0/24 to the BGP routing table of Switch
A, so that Switch B can obtain the route to 8.1.1.0/24.
# Configure Switch A.
<SwitchA> system-view
[SwitchA] bgp 65008
[SwitchA-bgp] router-id 1.1.1.1
[SwitchA-bgp] peer 3.1.1.1 as-number 65009
[SwitchA-bgp] address-family ipv4 unicast
[SwitchA-bgp-ipv4] peer 3.1.1.1 enable
[SwitchA-bgp-ipv4] network 8.1.1.0 24
[SwitchA-bgp-ipv4] quit
[SwitchA-bgp] quit
146
# Configure Switch B.
[SwitchB] bgp 65009
[SwitchB-bgp] router-id 2.2.2.2
[SwitchB-bgp] peer 3.1.1.2 as-number 65008
[SwitchB-bgp] address-family ipv4 unicast
[SwitchB-bgp-ipv4] peer 3.1.1.2 enable
4. Configure BGP and IGP route redistribution:
# Configure route redistribution between BGP and OSPF on Switch B.
[SwitchB-bgp-ipv4] import-route ospf 1
[SwitchB-bgp-ipv4] quit
[SwitchB-bgp] quit
[SwitchB] ospf 1
[SwitchB-ospf-1] import-route bgp
[SwitchB-ospf-1] quit
# Display the BGP routing table on Switch A.
[SwitchA] display bgp routing-table ipv4
Total number of routes: 3
BGP local router ID is 1.1.1.1
Status codes: * - valid, > - best, d - dampened, h - history,
s - suppressed, S - stale, i - internal, e - external
Origin: i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal Path/Ogn
* >e 3.3.3.3/32 3.1.1.1 1 0 65009?
* > 8.1.1.0/24 8.1.1.1 0 32768 i
* >e 9.1.2.0/24 3.1.1.1 1 0 65009?
# Display the OSPF routing table on 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
9.1.1.0/24 1 Transit 9.1.1.2 3.3.3.3 0.0.0.0
2.2.2.2/32 1 Stub 9.1.1.1 2.2.2.2 0.0.0.0
Routing for ASEs
Destination Cost Type Tag NextHop AdvRouter
8.1.1.0/24 1 Type2 1 9.1.1.1 2.2.2.2
Total Nets: 3
Intra Area: 2 Inter Area: 0 ASE: 1 NSSA: 0
147
Verifying the configuration
# Use ping for verification.
[SwitchA] ping -a 8.1.1.1 9.1.2.1
Ping 9.1.2.1 (9.1.2.1) from 8.1.1.1: 56 data bytes, press CTRL_C to break
56 bytes from 9.1.2.1: icmp_seq=0 ttl=254 time=10.000 ms
56 bytes from 9.1.2.1: icmp_seq=1 ttl=254 time=12.000 ms
56 bytes from 9.1.2.1: icmp_seq=2 ttl=254 time=2.000 ms
56 bytes from 9.1.2.1: icmp_seq=3 ttl=254 time=7.000 ms
56 bytes from 9.1.2.1: icmp_seq=4 ttl=254 time=9.000 ms
--- Ping statistics for 9.1.2.1 ---
5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss round-trip min/avg/max/stddev = 2.000/8.000/12.000/3.406 ms
[SwitchC] ping -a 9.1.2.1 8.1.1.1
Ping 8.1.1.1 (8.1.1.1) from 9.1.2.1: 56 data bytes, press CTRL_C to break
56 bytes from 8.1.1.1: icmp_seq=0 ttl=254 time=9.000 ms
56 bytes from 8.1.1.1: icmp_seq=1 ttl=254 time=4.000 ms
56 bytes from 8.1.1.1: icmp_seq=2 ttl=254 time=3.000 ms
56 bytes from 8.1.1.1: icmp_seq=3 ttl=254 time=3.000 ms
56 bytes from 8.1.1.1: icmp_seq=4 ttl=254 time=3.000 ms
--- Ping statistics for 8.1.1.1 ---
5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss round-trip min/avg/max/stddev = 3.000/4.400/9.000/2.332 ms
BGP route summarization configuration example
Network requirements
As shown in
Figure 32 , run EBGP between Switch C and Switch D, so the internal network and external
network can communicate with each other.
In AS 65106, configure static routing between Switch A and Switch B, configure OSPF between Switch
B and Switch C, and configure OSPF to redistribute static routes, so the devices in the internal network can communicate with each other.
Configure route summarization on Switch C so BGP advertises a summary route instead of the specific networks 192.168.64.0/24, 192.168.74.0/24, and 192.168.99.0/24 to Switch D.
148
Figure 32 Network diagram
Configuration procedure
1. Configure IP addresses for interfaces. (Details not shown.)
2. Configure static routing between Switch A and Switch B:
# Configure a default route with the next hop 192.168.212.1 on Switch A.
<SwitchA> system-view
[SwitchA] ip route-static 0.0.0.0 0 192.168.212.1
# Configure static routes to 192.168.64.0/24, 192.168.74.0/24, and 192.168.99.0/24 with the same next hop 192.168.212.161 on Switch B.
<SwitchB> system-view
[SwitchB] ip route-static 192.168.64.0 24 192.168.212.161
[SwitchB] ip route-static 192.168.74.0 24 192.168.212.161
[SwitchB] ip route-static 192.168.99.0 24 192.168.212.161
3. Configure OSPF between Switch B and Switch C and configure OSPF on Switch B to redistribute static routes:
# Configure OSPF to advertise the local network and enable OSPF to redistribute static routes on
Switch B.
[SwitchB] ospf
[SwitchB-ospf-1] area 0
[SwitchB-ospf-1-area-0.0.0.0] network 172.17.100.0 0.0.0.255
[SwitchB-ospf-1-area-0.0.0.0] quit
[SwitchB-ospf-1] import-route static
[SwitchB-ospf-1] quit
# Configure OSPF to advertise the local networks on Switch C.
[SwitchC] ospf
[SwitchC-ospf-1] area 0
[SwitchC-ospf-1-area-0.0.0.0] network 172.17.100.0 0.0.0.255
[SwitchC-ospf-1-area-0.0.0.0] network 10.220.2.0 0.0.0.255
[SwitchC-ospf-1-area-0.0.0.0] quit
[SwitchC-ospf-1] quit
# Display the IP routing table on Switch C.
[SwitchC] display ip routing-table protocol ospf
149
Summary Count : 5
OSPF Routing table Status : <Active>
Summary Count : 3
Destination/Mask Proto Pre Cost NextHop Interface
192.168.64.0/24 OSPF 150 1 172.17.100.1 Vlan100
192.168.74.0/24 OSPF 150 1 172.17.100.1 Vlan100
192.168.99.0/24 OSPF 150 1 172.17.100.1 Vlan100
OSPF Routing table Status : <Inactive>
Summary Count : 2
Destination/Mask Proto Pre Cost NextHop Interface
10.220.2.0/24 OSPF 10 1 10.220.2.16 Vlan200
172.17.100.0/24 OSPF 10 1 172.17.100.2 Vlan100
The output shows that Switch C has learned routes to 192.168.64.0/24, 192.168.99.0/24, and
192.168.64.0/18 through OSPF.
4. Configure BGP between Switch C and Switch D and configure BGP on Switch C to redistribute
OSPF routes:
# On Switch C, enable BGP, specify Switch D as an EBGP peer, and configure BGP to redistribute
OSPF routes.
[SwitchC] bgp 65106
[SwitchC-bgp] router-id 3.3.3.3
[SwitchC-bgp] peer 10.220.2.217 as-number 64631
[SwitchC-bgp] address-family ipv4 unicast
[SwitchC-bgp-ipv4] peer 10.220.2.217 enable
[SwitchC-bgp-ipv4] import-route ospf
# Enable BGP, and configure Switch C as an EBGP peer on Switch D.
[SwitchD] bgp 64631
[SwitchD-bgp] router-id 4.4.4.4
[SwitchD-bgp] peer 10.220.2.16 as-number 65106
[SwitchD-bgp] address-family ipv4 unicast
[SwitchD-bgp-ipv4] peer 10.220.2.16 enable
[SwitchD-bgp-ipv4] quit
[SwitchD-bgp] quit
# Display the IP routing table on Switch D.
[SwitchD] display ip routing-table protocol bgp
Summary Count : 3
BGP Routing table Status : <Active>
Summary Count : 3
Destination/Mask Proto Pre Cost NextHop Interface
192.168.64.0/24 BGP 255 1 10.220.2.16 Vlan200
192.168.74.0/24 BGP 255 1 10.220.2.16 Vlan200
150
192.168.99.0/24 BGP 255 1 10.220.2.16 Vlan200
BGP Routing table Status : <Inactive>
Summary Count : 0
The output shows that Switch D has learned routes to 192.168.64.0/24, 192.168.74.0/24, and
192.168.99.0/24 through BGP.
After the above configurations, ping hosts on networks 192.168.74.0/24, 192.168.99.0/24, and 192.168.64.0/18 from Switch D. The ping operations succeed.
5.
Configure route summarization on Switch C to summarize 192.168.64.0/24,
192.168.74.0/24, and 192.168.99.0/24 into a single route 192.168.64.0/18 on Switch C, and disable advertisement of the specific routes.
[SwitchC-bgp-ipv4] aggregate 192.168.64.0 18 detail-suppressed
[SwitchC-bgp-ipv4] quit
[SwitchC-bgp] quit
Verifying the configuration
# Display IP routing table on Switch C.
[SwitchC] display ip routing-table | include 192.168
192.168.64.0/18 BGP 130 0 127.0.0.1 NULL0
192.168.64.0/24 OSPF 150 1 172.17.100.1 Vlan100
192.168.74.0/24 OSPF 150 1 172.17.100.1 Vlan100
192.168.99.0/24 OSPF 150 1 172.17.100.1 Vlan100
The output shows that Switch C has a summary route 192.168.64.0/18 with the output interface Null0.
# Display IP routing table on Switch D.
[SwitchD] display ip routing-table protocol bgp
Summary Count : 1
BGP Routing table Status : <Active>
Summary Count : 1
Destination/Mask Proto Pre Cost NextHop Interface
192.168.64.0/18 BGP 255 0 10.220.2.16 Vlan200
BGP Routing table Status : <Inactive>
Summary Count : 0
The output shows that Switch D has only one route 192.168.64.0/18 to AS 65106.
After the above configurations, ping the hosts on networks 192.168.64.0/24, 192.168.74.0/24 and
192.168.99.0/24 from Switch D. The ping operations succeed.
BGP load balancing configuration example
Network requirements
, run EBGP between Switch A and Switch B and between Switch A and Switch C.
Run IBGP between Switch B and Switch C. Configure load balancing over the two EBGP links on Switch
A.
151
Figure 33 Network diagram
Configuration considerations
On Switch A, establish EBGP connections with Switch B and Switch C. Configure BGP to advertise network 8.1.1.0/24 to Switch B and Switch C, so that Switch B and Switch C can access the internal network connected to Switch A.
On Switch B, establish an EBGP connection with Switch A and an IBGP connection with Switch C.
Configure BGP to advertise network 9.1.1.0/24 to Switch A, so that Switch A can access the intranet through Switch B. Configure a static route to interface loopback 0 on Switch C (or use a routing protocol like OSPF) to establish the IBGP connection.
On Switch C, establish an EBGP connection with Switch A and an IBGP connection with Switch B.
Configure BGP to advertise network 9.1.1.0/24 to Switch A, so that Switch A can access the intranet through Switch C. Configure a static route to interface loopback 0 on Switch B (or use another protocol like OSPF) to establish the IBGP connection.
Configure load balancing on Switch A.
Configuration procedure
1. Configure IP addresses for interfaces. (Details not shown.)
2. Configure BGP connections:
# Configure Switch A.
<SwitchA> system-view
[SwitchA] bgp 65008
[SwitchA-bgp] router-id 1.1.1.1
[SwitchA-bgp] peer 3.1.1.1 as-number 65009
[SwitchA-bgp] peer 3.1.2.1 as-number 65009
[SwitchA-bgp] address-family ipv4 unicast
[SwitchA-bgp-ipv4] peer 3.1.1.1 enable
[SwitchA-bgp-ipv4] peer 3.1.2.1 enable
[SwitchA-bgp-ipv4] network 8.1.1.1 24
[SwitchA-bgp-ipv4] quit
[SwitchA-bgp] quit
# Configure Switch B.
<SwitchB> system-view
152
[SwitchB] bgp 65009
[SwitchB-bgp] router-id 2.2.2.2
[SwitchB-bgp] peer 3.1.1.2 as-number 65008
[SwitchB-bgp] peer 3.3.3.3 as-number 65009
[SwitchB-bgp] peer 3.3.3.3 connect-interface loopback 0
[SwitchB-bgp] address-family ipv4 unicast
[SwitchB-bgp-ipv4] peer 3.1.1.2 enable
[SwitchB-bgp-ipv4] peer 3.3.3.3 enable
[SwitchB-bgp-ipv4] network 9.1.1.0 24
[SwitchB-bgp-ipv4] quit
[SwitchB-bgp] quit
[SwitchB] ip route-static 3.3.3.3 32 9.1.1.2
# Configure Switch C.
<SwitchC> system-view
[SwitchC] bgp 65009
[SwitchC-bgp] router-id 3.3.3.3
[SwitchC-bgp] peer 3.1.2.2 as-number 65008
[SwitchC-bgp] peer 2.2.2.2 as-number 65009
[SwitchC-bgp] peer 2.2.2.2 connect-interface loopback 0
[SwitchC-bgp] address-family ipv4 unicast
[SwitchC-bgp-ipv4] peer 3.1.2.2 enable
[SwitchC-bgp-ipv4] peer 2.2.2.2 enable
[SwitchC-bgp-ipv4] network 9.1.1.0 24
[SwitchC-bgp-ipv4] quit
[SwitchC-bgp] quit
[SwitchC] ip route-static 2.2.2.2 32 9.1.1.1
# Display the BGP routing table on Switch A.
[SwitchA] display bgp routing-table ipv4
Total number of routes: 3
BGP local router ID is 1.1.1.1
Status codes: * - valid, > - best, d - dampened, h - history,
s - suppressed, S - stale, i - internal, e - external
Origin: i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal Path/Ogn
* > 8.1.1.0/24 8.1.1.1 0 32768 i
* >e 9.1.1.0/24 3.1.1.1 0 0 65009i
* e 3.1.2.1 0 0 65009i
{
The output shows two valid routes to destination 9.1.1.0/24. The route with next hop 3.1.1.1 is marked with a greater-than sign (>), indicating it is the best route (because the ID of Switch B is smaller). The route with next hop 3.1.2.1 is marked with an asterisk (*), indicating it is a valid route, but not the best.
{
By using the display ip routing-table command, you can find only one route to 9.1.1.0/24 with next hop 3.1.1.1 and outbound interface VLAN-interface 200.
3. Configure loading balancing:
153
Because Switch A has two routes to reach AS 65009, configuring load balancing over the two
BGP routes on Switch A can improve link usage.
# Configure Switch A.
[SwitchA] bgp 65008
[SwitchA-bgp] address-family ipv4 unicast
[SwitchA-bgp-ipv4] balance 2
[SwitchA-bgp-ipv4] quit
[SwitchA-bgp] quit
Verifying the configuration
# Display the BGP routing table on Switch A.
[SwitchA] display bgp routing-table ipv4
Total number of routes: 3
BGP local router ID is 1.1.1.1
Status codes: * - valid, > - best, d - dampened, h - history,
s - suppressed, S - stale, i - internal, e - external
Origin: i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal Path/Ogn
* > 8.1.1.0/24 8.1.1.1 0 32768 i
* >e 9.1.1.0/24 3.1.1.1 0 0 65009i
* >e 3.1.2.1 0 0 65009i
•
The route 9.1.1.0/24 has two next hops, 3.1.1.1 and 3.1.2.1, both of which are marked with a greater-than sign (>), indicating they are the best routes.
• By using the display ip routing-table command, you can find two routes to 9.1.1.0/24. One has next hop 3.1.1.1 and outbound interface VLAN-interface 200, and the other has next hop 3.1.2.1 and outbound interface VLAN-interface 300.
BGP community configuration example
Network requirements
As shown in
, Switch B establishes EBGP connections with Switch A and C. Configure
NO_EXPORT community attribute on Switch A to make routes from AS 10 not advertised by AS 20 to any other AS.
154
Figure 34 Network diagram
Configuration procedure
1. Configure IP addresses for interfaces. (Details not shown.)
2. Configure EBGP:
# Configure Switch A.
<SwitchA> system-view
[SwitchA] bgp 10
[SwitchA-bgp] router-id 1.1.1.1
[SwitchA-bgp] peer 200.1.2.2 as-number 20
[SwitchA-bgp] address-family ipv4 unicast
[SwitchA-bgp-ipv4] peer 200.1.2.2 enable
[SwitchA-bgp-ipv4] network 9.1.1.0 255.255.255.0
[SwitchA-bgp] quit
# Configure Switch B.
<SwitchB> system-view
[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] address-family ipv4 unicast
[SwitchB-bgp-ipv4] peer 200.1.2.1 enable
[SwitchB-bgp-ipv4] peer 200.1.3.2 enable
[SwitchB-bgp-ipv4] quit
[SwitchB-bgp] quit
# Configure Switch C.
<SwitchC> system-view
[SwitchC] bgp 30
[SwitchC-bgp] router-id 3.3.3.3
[SwitchC-bgp] peer 200.1.3.1 as-number 20
[SwitchC-bgp] address-family ipv4 unicast
[SwitchC-bgp-ipv4] peer 200.1.3.1 enable
[SwitchC-bgp-ipv4] quit
[SwitchC-bgp] quit
# Display the BGP routing table on Switch B.
155
[SwitchB] display bgp routing-table ipv4 9.1.1.0
BGP local router ID: 2.2.2.2
Local AS number: 20
Paths: 1 available, 1 best
BGP routing table information of 9.1.1.0/24:
From : 200.1.2.1 (1.1.1.1)
Relay nexthop : 200.1.2.1
Original nexthop: 200.1.2.1
OutLabel : NULL
AS-path : 10
Origin : igp
Attribute value : pref-val 0
State : valid, external, best,
# Display advertisement information of network 9.1.1.0 on Switch B.
[SwitchB] display bgp routing-table ipv4 9.1.1.0 advertise-info
BGP local router ID: 2.2.2.2
Local AS number: 20
Paths: 1 best
BGP routing table information of 9.1.1.0/24:
Advertised to peers (1 in total):
200.1.3.2
The output shows that Switch B can advertise the route with the destination 9.1.1.0/24 to other
ASs through BGP.
# Display the BGP routing table on Switch C.
[SwitchC] display bgp routing-table ipv4
Total number of routes: 1
BGP local router ID is 3.3.3.3
Status codes: * - valid, > - best, d - dampened, h - history,
s - suppressed, S - stale, i - internal, e - external
Origin: i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal Path/Ogn
* >e 9.1.1.0/24 200.1.3.1 0 20 10i
The output shows that Switch C has learned route 9.1.1.0/24 from Switch B.
3. Configure BGP community:
# Configure a routing policy.
[SwitchA] route-policy comm_policy permit node 0
[SwitchA-route-policy-comm_policy-0] apply community no-export
156
[SwitchA-route-policy-comm_policy-0] quit
# Apply the routing policy.
[SwitchA] bgp 10
[SwitchA-bgp] address-family ipv4 unicast
[SwitchA-bgp-ipv4] peer 200.1.2.2 route-policy comm_policy export
[SwitchA-bgp-ipv4] peer 200.1.2.2 advertise-community
Verifying the configuration
# Display the routing table on Switch B.
[SwitchB] display bgp routing-table ipv4 9.1.1.0
BGP local router ID: 2.2.2.2
Local AS number: 20
Paths: 1 available, 1 best
BGP routing table information of 9.1.1.0/24:
From : 200.1.2.1 (1.1.1.1)
Relay nexthop : 200.1.2.1
Original nexthop: 200.1.2.1
OutLabel : NULL
Community : No-Export
AS-path : 10
Origin : igp
Attribute value : pref-val 0
State : valid, external, best,
# Display advertisement information for the route 9.1.1.0 on Switch B.
[SwitchB] display bgp routing-table ipv4 9.1.1.0 advertise-info
BGP local router ID: 2.2.2.2
Local AS number: 20
Paths: 1 best
BGP routing table information of 9.1.1.0/24:
Not advertised to any peers yet
# Display the BGP routing table on Switch C.
[SwitchC] display bgp routing-table ipv4
Total number of routes: 0
You can see the NO_EXPORT community attribute in the output. In this case, Switch B does not advertise the route 9.1.1.0/24 through BGP.
BGP route reflector configuration example
Network requirements
, all switches run BGP.
157
• Between Switch A and Switch B is an EBGP connection, between Switch C and Switch B, and between Switch C and Switch D are IBGP connections.
•
Switch C is a route reflector with clients Switch B and D.
• Switch D can learn route 20.0.0.0/8 from Switch C.
Figure 35 Network diagram
Configuration procedure
1. Configure IP addresses for interfaces. (Details not shown.)
2. Configure BGP connections:
# Configure Switch A.
<SwitchA> system-view
[SwitchA] bgp 100
[SwitchA-bgp] router-id 1.1.1.1
[SwitchA-bgp] peer 192.1.1.2 as-number 200
[SwitchA-bgp] address-family ipv4 unicast
[SwitchA-bgp-ipv4] peer 192.1.1.2 enable
# Inject network 20.0.0.0/8 to the BGP routing table.
[SwitchA-bgp-ipv4] network 20.0.0.0
[SwitchA-bgp-ipv4] quit
[SwitchA-bgp] quit
# Configure Switch B.
<SwitchB> system-view
[SwitchB] bgp 200
[SwitchB-bgp] router-id 2.2.2.2
[SwitchB-bgp] peer 192.1.1.1 as-number 100
[SwitchB-bgp] peer 193.1.1.1 as-number 200
[SwitchB-bgp] address-family ipv4 unicast
[SwitchB-bgp-ipv4] peer 192.1.1.1 enable
[SwitchB-bgp-ipv4] peer 193.1.1.1 enable
[SwitchB-bgp-ipv4] peer 193.1.1.1 next-hop-local
[SwitchB-bgp-ipv4] quit
[SwitchB-bgp] quit
# Configure Switch C.
<SwitchC> system-view
[SwitchC] bgp 200
158
[SwitchC-bgp] router-id 3.3.3.3
[SwitchC-bgp] peer 193.1.1.2 as-number 200
[SwitchC-bgp] peer 194.1.1.2 as-number 200
[SwitchC-bgp] address-family ipv4 unicast
[SwitchC-bgp-ipv4] peer 193.1.1.2 enable
[SwitchC-bgp-ipv4] peer 194.1.1.2 enable
[SwitchC-bgp-ipv4] quit
[SwitchC-bgp] quit
# Configure Switch D.
<SwitchD> system-view
[SwitchD] bgp 200
[SwitchD-bgp] router-id 4.4.4.4
[SwitchD-bgp] peer 194.1.1.1 as-number 200
[SwitchD-bgp] address-family ipv4 unicast
[SwitchD-bgp-ipv4] peer 194.1.1.1 enable
[SwitchD-bgp-ipv4] quit
[SwitchD-bgp] quit
3. Configure Switch C as the route reflector.
[SwitchC] bgp 200
[SwitchC-bgp] address-family ipv4 unicast
[SwitchC-bgp-ipv4] peer 193.1.1.2 reflect-client
[SwitchC-bgp-ipv4] peer 194.1.1.2 reflect-client
[SwitchC-bgp-ipv4] quit
[SwitchC-bgp] quit
Verifying the configuration
# Display the BGP routing table on Switch B.
[SwitchB] display bgp routing-table ipv4
Total number of routes: 1
BGP local router ID is 2.2.2.2
Status codes: * - valid, > - best, d - dampened, h - history,
s - suppressed, S - stale, i - internal, e - external
Origin: i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal Path/Ogn
* >e 20.0.0.0 192.1.1.1 0 0 100i
# Display the BGP routing table on Switch D.
[SwitchD] display bgp routing-table ipv4
Total number of routes: 1
BGP local router ID is 4.4.4.4
Status codes: * - valid, > - best, d - dampened, h - history,
s - suppressed, S - stale, i - internal, e - external
Origin: i - IGP, e - EGP, ? - incomplete
159
Network NextHop MED LocPrf PrefVal Path/Ogn
i 20.0.0.0 193.1.1.2 0 100 0 100i
Switch D has learned route 20.0.0.0/8 from Switch C.
BGP confederation configuration example
Network requirements
, to reduce IBGP connections, AS 200 is split into three sub-ASs: AS65001,
AS65002, and AS65003. Switches in AS65001 are fully meshed.
Figure 36 Network diagram
Switch C
Switch F
Switch B
Vlan-int600
Vlan-int200
Vlan-int300
AS 65002
AS 65003
Vlan-int100
AS 100
Vlan-int100
Switch A
Vlan-int500
Vl an
-int300
Vlan-int400
Vlan-int400
Switch D
Vlan-int200
Vlan-int500
AS 65001
Vlan-int200
Switch E
AS 200
Switch A Vlan-int100 200.1.1.1/24 Switch D
Switch B
Switch C
Configuration procedure
Vlan-int200
Vlan-int300
10.1.1.2/24
10.1.2.2/24
Switch F
1. Configure IP addresses for interfaces. (Details not shown.)
2. Configure BGP confederation:
# Configure Switch A.
<SwitchA> system-view
[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] address-family ipv4 unicast
160
Vlan-int200 10.1.5.1/24
Vlan-int400 10.1.3.2/24
Vlan-int500 10.1.4.2/24
Vlan-int100 200.1.1.2/24
Vlan-int600 9.1.1.1/24
[SwitchA-bgp-ipv4] peer 10.1.1.2 enable
[SwitchA-bgp-ipv4] peer 10.1.2.2 enable
[SwitchA-bgp-ipv4] peer 10.1.1.2 next-hop-local
[SwitchA-bgp-ipv4] peer 10.1.2.2 next-hop-local
[SwitchA-bgp-ipv4] quit
[SwitchA-bgp] quit
# Configure Switch B.
<SwitchB> system-view
[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] address-family ipv4 unicast
[SwitchB-bgp-ipv4] peer 10.1.1.1 enable
[SwitchB-bgp-ipv4] quit
[SwitchB-bgp] quit
# Configure Switch C.
<SwitchC> system-view
[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] address-family ipv4 unicast
[SwitchC-bgp-ipv4] peer 10.1.2.1 enable
[SwitchC-bgp-ipv4] quit
[SwitchC-bgp] quit
3. Configure IBGP connections 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] address-family ipv4 unicast
[SwitchA-bgp-ipv4] peer 10.1.3.2 enable
[SwitchA-bgp-ipv4] peer 10.1.4.2 enable
[SwitchA-bgp-ipv4] peer 10.1.3.2 next-hop-local
[SwitchA-bgp-ipv4] peer 10.1.4.2 next-hop-local
[SwitchA-bgp-ipv4] quit
[SwitchA-bgp] quit
# Configure Switch D.
<SwitchD> system-view
[SwitchD] bgp 65001
[SwitchD-bgp] router-id 4.4.4.4
[SwitchD-bgp] confederation id 200
[SwitchD-bgp] peer 10.1.3.1 as-number 65001
[SwitchD-bgp] peer 10.1.5.2 as-number 65001
161
[SwitchD-bgp] address-family ipv4 unicast
[SwitchD-bgp-ipv4] peer 10.1.3.1 enable
[SwitchD-bgp-ipv4] peer 10.1.5.2 enable
[SwitchD-bgp-ipv4] quit
[SwitchD-bgp] quit
# Configure Switch E.
<SwitchE> system-view
[SwitchE] bgp 65001
[SwitchE-bgp] router-id 5.5.5.5
[SwitchE-bgp] confederation id 200
[SwitchE-bgp] peer 10.1.4.1 as-number 65001
[SwitchE-bgp] peer 10.1.5.1 as-number 65001
[SwitchE-bgp] address-family ipv4 unicast
[SwitchE-bgp-ipv4] peer 10.1.4.1 enable
[SwitchE-bgp-ipv4] peer 10.1.5.1 enable
[SwitchE-bgp-ipv4] quit
[SwitchE-bgp] quit
4. Configure the 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] address-family ipv4 unicast
[SwitchA-bgp-ipv4] peer 200.1.1.2 enable
[SwitchA-bgp-ipv4] quit
[SwitchA-bgp] quit
# Configure Switch F.
<SwitchF> system-view
[SwitchF] bgp 100
[SwitchF-bgp] router-id 6.6.6.6
[SwitchF-bgp] peer 200.1.1.1 as-number 200
[SwitchF-bgp] address-family ipv4 unicast
[SwitchF-bgp-ipv4] peer 200.1.1.1 enable
[SwitchF-bgp-ipv4] network 9.1.1.0 255.255.255.0
[SwitchF-bgp-ipv4] quit
[SwitchF-bgp] quit
Verifying the configuration
# Display the routing table on Switch B, which is similar to that on Switch C.
[SwitchB] display bgp routing-table ipv4
Total number of routes: 1
BGP local router ID is 2.2.2.2
Status codes: * - valid, > - best, d - dampened, h - history,
s - suppressed, S - stale, i - internal, e - external
Origin: i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal Path/Ogn
162
* >i 9.1.1.0/24 10.1.1.1 0 100 0 (65001)
100i
[SwitchB] display bgp routing-table ipv4 9.1.1.0
BGP local router ID: 2.2.2.2
Local AS number: 65002
Paths: 1 available, 1 best
BGP routing table information of 9.1.1.0/24:
From : 10.1.1.1 (1.1.1.1)
Relay nexthop : 10.1.1.1
Original nexthop: 10.1.1.1
OutLabel : NULL
AS-path : (65001) 100
Origin : igp
Attribute value : MED 0, localpref 100, pref-val 0, pre 255
State : valid, external-confed, best,
# Display the BGP routing table on Switch D.
[SwitchD] display bgp routing-table ipv4
Total number of routes: 1
BGP local router ID is 4.4.4.4
Status codes: * - valid, > - best, d - dampened, h - history,
s - suppressed, S - stale, i - internal, e - external
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
[SwitchD] display bgp routing-table ipv4 9.1.1.0
BGP local router ID: 4.4.4.4
Local AS number: 65001
Paths: 1 available, 1 best
BGP routing table information of 9.1.1.0/24:
From : 10.1.3.1 (1.1.1.1)
Relay nexthop : 10.1.3.1
Original nexthop: 10.1.3.1
OutLabel : NULL
AS-path : 100
Origin : igp
Attribute value : MED 0, localpref 100, pref-val 0, pre 255
State : valid, internal-confed, best,
163
The output indicates the following:
•
Switch F can send route information to Switch B and Switch C through the confederation by establishing only an EBGP connection with Switch A.
• Switch B and Switch D are in the same confederation, but belong to different sub-ASs. They obtain external route information from Switch A and generate identical BGP route entries although they have no direct connection in between.
BGP path selection configuration example
Network requirements
Switch C. IBGP runs between Switch B and Switch D, and between Switch D and Switch C. OSPF is the
IGP protocol in AS 200.
Configure routing policies, making Switch D use the route 1.0.0.0/8 from Switch C as the optimal.
Figure 37 Network diagram
Device
Switch A Vlan-int101 1.0.0.1/8
Vlan-int100
Switch D
Vlan-int200 Switch C
Switch B Vlan-int100 192.1.1.2/24
Vlan-int300
Configuration procedure
1. Configure IP addresses for interfaces. (Details not shown.)
2. Configure OSPF on Switch B, Switch C, and Switch D:
# Configure Switch B.
<SwitchB> system-view
Vlan-int400 195.1.1.1/24
Vlan-int300 194.1.1.1/24
Vlan-int400 195.1.1.2/24
Vlan-int200 193.1.1.2/24
[SwitchB] ospf
[SwitchB-ospf] area 0
[SwitchB-ospf-1-area-0.0.0.0] network 192.1.1.0 0.0.0.255
[SwitchB-ospf-1-area-0.0.0.0] network 194.1.1.0 0.0.0.255
[SwitchB-ospf-1-area-0.0.0.0] quit
[SwitchB-ospf-1] quit
# Configure Switch C.
<SwitchC> system-view
164
[SwitchC] ospf
[SwitchC-ospf] area 0
[SwitchC-ospf-1-area-0.0.0.0] network 193.1.1.0 0.0.0.255
[SwitchC-ospf-1-area-0.0.0.0] network 195.1.1.0 0.0.0.255
[SwitchC-ospf-1-area-0.0.0.0] quit
[SwitchC-ospf-1] quit
# Configure Switch D.
<SwitchD> system-view
[SwitchD] ospf
[SwitchD-ospf] area 0
[SwitchD-ospf-1-area-0.0.0.0] network 194.1.1.0 0.0.0.255
[SwitchD-ospf-1-area-0.0.0.0] network 195.1.1.0 0.0.0.255
[SwitchD-ospf-1-area-0.0.0.0] quit
[SwitchD-ospf-1] quit
3. Configure BGP connections:
# Configure Switch A.
<SwitchA> system-view
[SwitchA] bgp 100
[SwitchA-bgp] peer 192.1.1.2 as-number 200
[SwitchA-bgp] peer 193.1.1.2 as-number 200
[SwitchA-bgp] address-family ipv4 unicast
[SwitchA-bgp-ipv4] peer 192.1.1.2 enable
[SwitchA-bgp-ipv4] peer 193.1.1.2 enable
# Inject network 1.0.0.0/8 to the BGP routing table on Switch A.
[SwitchA-bgp-ipv4] network 1.0.0.0 8
[SwitchA-bgp-ipv4] quit
[SwitchA-bgp] quit
# Configure Switch B.
[SwitchB] bgp 200
[SwitchB-bgp] peer 192.1.1.1 as-number 100
[SwitchB-bgp] peer 194.1.1.1 as-number 200
[SwitchB-bgp] address-family ipv4 unicast
[SwitchB-bgp-ipv4] peer 192.1.1.1 enable
[SwitchB-bgp-ipv4] peer 194.1.1.1 enable
[SwitchB-bgp-ipv4] quit
[SwitchB-bgp] quit
# Configure Switch C.
[SwitchC] bgp 200
[SwitchC-bgp] peer 193.1.1.1 as-number 100
[SwitchC-bgp] peer 195.1.1.1 as-number 200
[SwitchC-bgp] address-family ipv4 unicast
[SwitchC-bgp-ipv4] peer 193.1.1.1 enable
[SwitchC-bgp-ipv4] peer 195.1.1.1 enable
[SwitchC-bgp-ipv4] quit
[SwitchC-bgp] quit
# Configure Switch D.
[SwitchD] bgp 200
165
[SwitchD-bgp] peer 194.1.1.2 as-number 200
[SwitchD-bgp] peer 195.1.1.2 as-number 200
[SwitchD-bgp] address-family ipv4 unicast
[SwitchD-bgp-ipv4] peer 194.1.1.2 enable
[SwitchD-bgp-ipv4] peer 195.1.1.2 enable
[SwitchD-bgp-ipv4] quit
[SwitchD-bgp] quit
4. Configure attributes for route 1.0.0.0/8, making Switch D give priority to the route learned from
Switch C:
{
(Method 1.) Configure a higher MED value for the route 1.0.0.0/8 advertised from Switch A to peer 192.1.1.2:
# Define an ACL numbered 2000 to permit route 1.0.0.0/8.
[SwitchA] acl number 2000
[SwitchA-acl-basic-2000] rule permit source 1.0.0.0 0.255.255.255
[SwitchA-acl-basic-2000] quit
# Define two routing policies, apply_med_50, which sets the MED for route 1.0.0.0/8 to 50, and apply_med_100, which sets the MED for route 1.0.0.0/8 to 100.
[SwitchA] route-policy apply_med_50 permit node 10
[SwitchA-route-policy-apply_med_50-10] if-match ip address acl 2000
[SwitchA-route-policy-apply_med_50-10] apply cost 50
[SwitchA-route-policy-apply_med_50-10] quit
[SwitchA] route-policy apply_med_100 permit node 10
[SwitchA-route-policy-apply_med_100-10] if-match ip address acl 2000
[SwitchA-route-policy-apply_med_100-10] apply cost 100
[SwitchA-route-policy-apply_med_100-10] quit
# Apply routing policy apply_med_50 to the route advertised to peer 193.1.1.2 (Switch C), and apply_med_100 to the route advertised to peer 192.1.1.2 (Switch B).
[SwitchA] bgp 100
[SwitchA-bgp] address-family ipv4 unicast
[SwitchA-bgp-ipv4] peer 193.1.1.2 route-policy apply_med_50 export
[SwitchA-bgp-ipv4] peer 192.1.1.2 route-policy apply_med_100 export
[SwitchA-bgp-ipv4] quit
[SwitchA-bgp] quit
# Display the BGP routing table on Switch D.
[SwitchD] display bgp routing-table ipv4
Total number of routes: 2
BGP local router ID is 195.1.1.1
Status codes: * - valid, > - best, d - dampened, h - history,
s - suppressed, S - stale, i - internal, e - external
Origin: i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal Path/Ogn
* >i 1.0.0.0 193.1.1.1 50 100 0 100i
* i 192.1.1.1 100 100 0 100i
166
{
Route 1.0.0.0/8 is the optimal.
(Method 2.) Configure different local preferences on Switch B and C for route 1.0.0.0/8, making Switch D give priority to the route from Switch C:
# Define an ACL numbered 2000 on Switch C, permitting route 1.0.0.0/8.
[SwitchC] acl number 2000
[SwitchC-acl-basic-2000] rule permit source 1.0.0.0 0.255.255.255
[SwitchC-acl-basic-2000] quit
# Configure a routing policy named localpref on Switch C, setting the local preference of route
1.0.0.0/8 to 200 (the default is 100).
[SwitchC] route-policy localpref permit node 10
[SwitchC-route-policy-localpref-10] if-match ip address acl 2000
[SwitchC-route-policy-localpref-10] apply local-preference 200
[SwitchC-route-policy-localpref-10] quit
# Apply routing policy localpref to routes from peer 193.1.1.1.
[SwitchC] bgp 200
[SwitchC-bgp] address-family ipv4 unicast
[SwitchC-bgp-ipv4] peer 193.1.1.1 route-policy localpref import
[SwitchC-bgp-ipv4] quit
[SwitchC-bgp] quit
# Display the BGP routing table on Switch D.
[SwitchD] display bgp routing-table ipv4
Total number of routes: 2
BGP local router ID is 195.1.1.1
Status codes: * - valid, > - best, d - dampened, h - history,
s - suppressed, S - stale, i - internal, e - external
Origin: i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal Path/Ogn
* >i 1.0.0.0 193.1.1.1 200 0 100i
* i 192.1.1.1 100 0 100i
Route 1.0.0.0/8 learned from Switch C is the optimal.
BGP GR configuration example
Network requirements
are all BGP switches. EBGP runs between Switch A and Switch B. IBGP runs between Switch
B and Switch C. Enable GR capability for BGP so that the communication between Switch A and Switch
C is not affected when an active/standby switchover occurs on Switch B.
167
Figure 38 Network diagram
Configuration procedure
1. Configure Switch A:
# Configure IP addresses for interfaces. (Details not shown.)
# Configure the EBGP connection.
<SwitchA> system-view
[SwitchA] bgp 65008
[SwitchA-bgp] router-id 1.1.1.1
[SwitchA-bgp] peer 200.1.1.1 as-number 65009
# Enable GR capability for BGP.
[SwitchA-bgp] graceful-restart
# Inject network 8.0.0.0/8 to the BGP routing table.
[SwitchA-bgp] address-family ipv4
[SwitchA-bgp-ipv4] network 8.0.0.0
# Enable Switch A to exchange IPv4 unicast routing information with Switch B.
[SwitchA-bgp-ipv4] peer 200.1.1.1 enable
2. Configure Switch B:
# Configure IP addresses for interfaces. (Details not shown.)
# Configure the EBGP connection.
<SwitchB> system-view
[SwitchB] bgp 65009
[SwitchB-bgp] router-id 2.2.2.2
[SwitchB-bgp] peer 200.1.1.2 as-number 65008
# Configure the IBGP connection.
[SwitchB-bgp] peer 9.1.1.2 as-number 65009
# Enable GR capability for BGP.
[SwitchB-bgp] graceful-restart
# Inject networks 200.1.1.0/24 and 9.1.1.0/24 to the BGP routing table.
[SwitchB-bgp] address-family ipv4
[SwitchB-bgp-ipv4] network 200.1.1.0 24
[SwitchB-bgp-ipv4] network 9.1.1.0 24
# Enable Switch B to exchange IPv4 unicast routing information with Switch A and Switch C.
[SwitchB-bgp-ipv4] peer 200.1.1.2 enable
[SwitchB-bgp-ipv4] peer 9.1.1.2 enable
3. Configure Switch C:
# Configure IP addresses for interfaces. (Details not shown.)
# Configure the IBGP connection.
168
<SwitchC> system-view
[SwitchC] bgp 65009
[SwitchC-bgp] router-id 3.3.3.3
[SwitchC-bgp] peer 9.1.1.1 as-number 65009
# Enable GR capability for BGP.
[SwitchC-bgp] graceful-restart
# Enable Switch C to exchange IPv4 unicast routing information with Switch B.
[SwitchC-bgp-ipv4] peer 9.1.1.1 enable
Verifying the configuration
Ping Switch C on Switch A. Meanwhile, perform an active/standby switchover on Switch B. The ping operation is successful during the whole switchover process.
BFD for BGP configuration example
Network requirements
As shown in
•
Configure OSPF as the IGP in AS 200.
•
Establish two IBGP connections between Switch A and Switch C. When both paths are working,
Switch C adopts the path Switch A<—>Switch B<—>Switch C to exchange packets with network
1.1.1.0/24. Configure BFD over the path. If the path fails, BFD can quickly detect the failure and notify it to BGP. Then the path Switch A<—>Switch D<—>Switch C takes effect immediately.
Figure 39 Network diagram
Switch A
Switch B
Vlan-int100
Vlan-int100
3.0.1.1/24
3.0.1.2/24
Device
Switch C
Switch D
Vlan-int101 3.0.2.2/24
Vlan-int201 2.0.2.2/24
Vlan-int200 2.0.1.2/24
169
Configuration procedure
1. Configure IP addresses for interfaces. (Details not shown.)
2. Configure OSPF to make sure that Switch A and Switch C are reachable to each other. (Details not shown.)
3. Configure BGP on Switch A:
# Establish two IBGP connections to Switch C.
<SwitchA> system-view
[SwitchA] bgp 200
[SwitchA-bgp] peer 3.0.2.2 as-number 200
[SwitchA-bgp] peer 2.0.2.2 as-number 200
[SwitchA-bgp] address-family ipv4 unicast
[SwitchA-bgp-ipv4] peer 3.0.2.2 enable
[SwitchA-bgp-ipv4] peer 2.0.2.2 enable
[SwitchA-bgp-ipv4] quit
[SwitchA-bgp] quit
# Create ACL 2000 to permit 1.1.1.0/24 to pass.
[SwitchA] acl number 2000
[SwitchA-acl-basic-2000] rule permit source 1.1.1.0 0.0.0.255
[SwitchA-acl-basic-2000] quit
# Create two route policies, apply_med_50 and apply_med_100. Policy apply_med_50 sets the
MED for route 1.1.1.0/24 to 50. Policy apply_med_100 sets that to 100.
[SwitchA] route-policy apply_med_50 permit node 10
[SwitchA-route-policy-apply_med_50-10] if-match ip address acl 2000
[SwitchA-route-policy-apply_med_50-10] apply cost 50
[SwitchA-route-policy-apply_med_50-10] quit
[SwitchA] route-policy apply_med_100 permit node 10
[SwitchA-route-policy-apply_med_100-10] if-match ip address acl 2000
[SwitchA-route-policy-apply_med_100-10] apply cost 100
[SwitchA-route-policy-apply_med_100-10] quit
# Apply routing policy apply_med_50 to routes outgoing to peer 3.0.2.2, and apply routing policy apply_med_100 to routes outgoing to peer 2.0.2.2.
[SwitchA] bgp 200
[SwitchA-bgp] address-family ipv4 unicast
[SwitchA-bgp-ipv4] peer 3.0.2.2 route-policy apply_med_50 export
[SwitchA-bgp-ipv4] peer 2.0.2.2 route-policy apply_med_100 export
[SwitchA-bgp-ipv4] quit
# Enable BFD for peer 3.0.2.2.
[SwitchA-bgp] peer 3.0.2.2 bfd
[SwitchA-bgp] quit
4. Configure BGP on Switch C:
# Establish two IBGP connections to Switch A.
<SwitchC> system-view
[SwitchC] bgp 200
[SwitchC-bgp] peer 3.0.1.1 as-number 200
[SwitchC-bgp] peer 2.0.1.1 as-number 200
[SwitchC-bgp] address-family ipv4 unicast
170
[SwitchC-bgp-ipv4] peer 3.0.1.1 enable
[SwitchC-bgp-ipv4] peer 2.0.1.1 enable
[SwitchC-bgp-ipv4] quit
[SwitchC-bgp] quit
# Enable BFD for peer 3.0.1.1.
[SwitchC-bgp] peer 3.0.1.1 bfd
[SwitchC-bgp] quit
[SwitchC] quit
Verifying the configuration
# Display detailed BFD session information on Switch C.
<SwitchC> display bfd session verbose
Total Session Num: 1 Up Session Num: 1 Init Mode: Active
IPv4 Session Working Under Ctrl Mode:
Local Discr: 513 Remote Discr: 513
Source IP: 3.0.2.2 Destination IP: 3.0.1.1
Session State: Up Interface: N/A
Min Tx Inter: 500ms Act Tx Inter: 500ms
Min Rx Inter: 500ms Detect Inter: 2500ms
Rx Count: 135 Tx Count: 135
Connect Type: Indirect Running Up for: 00:00:58
Hold Time: 2457ms Auth mode: None
Detect Mode: Async Slot: 0
Protocol: BGP
Diag Info: No Diagnostic
The output shows that a BFD session has been established between Switch A and Switch C.
# Display BGP peer information on Switch C.
<SwitchC> display bgp peer ipv4
BGP local router ID: 3.3.3.3
Local AS number: 200
Total number of peers: 2 Peers in established state: 2
Peer AS MsgRcvd MsgSent OutQ PrefRcv Up/Down State
2.0.1.1 200 4 5 0 0 00:01:55 Established
3.0.1.1 200 4 5 0 0 00:01:52 Established
The output shows that Switch C has established two BGP connections with Switch A, and both connections are in Established state.
# Display route 1.1.1.0/24 on Switch C.
<SwitchC> display ip routing-table 1.1.1.0 24 verbose
Summary Count : 1
Destination: 1.1.1.0/24
171
Protocol: BGP Process ID: 0
SubProtID: 0x1 Age: 00h00m09s
Cost: 50 Preference: 255
Tag: 0 State: Active Adv
OrigTblID: 0x1 OrigVrf: default-vrf
TableID: 0x2 OrigAs: 0
NBRID: 0x15000001 LastAs: 0
AttrID: 0x1 Neighbor: 3.0.1.1
Flags: 0x10060 OrigNextHop: 3.0.1.1
Label: NULL RealNextHop: 3.0.2.1
BkLabel: NULL BkNextHop: N/A
Tunnel ID: Invalid Interface: Vlan-interface101
BkTunnel ID: Invalid BkInterface: N/A
The output shows that Switch C communicates with network 1.1.1.0/24 through the path Switch
C<—>Switch B<—>Switch A.
# Break down the path Switch C<—>Switch B<—>Switch A and then display route 1.1.1.0/24 on Switch C.
<SwitchC> display ip routing-table 1.1.1.0 24 verbose
Summary Count : 1
Destination: 1.1.1.0/24
Protocol: BGP Process ID: 0
SubProtID: 0x1 Age: 00h03m08s
Cost: 100 Preference: 255
Tag: 0 State: Active Adv
OrigTblID: 0x1 OrigVrf: default-vrf
TableID: 0x2 OrigAs: 0
NBRID: 0x15000000 LastAs: 0
AttrID: 0x0 Neighbor: 2.0.1.1
Flags: 0x10060 OrigNextHop: 2.0.1.1
Label: NULL RealNextHop: 2.0.2.1
BkLabel: NULL BkNextHop: N/A
Tunnel ID: Invalid Interface: Vlan-interface201
BkTunnel ID: Invalid BkInterface: N/A
The output shows that Switch C communicates with network 1.1.1.0/24 through the path Switch
C<—>Switch D<—>Switch A.
IPv6 BGP configuration examples
IPv6 BGP basic configuration example
Network requirements
, run EBGP between Switch A and Switch B, and run IBGP between Switch B and Switch C so that Switch C can access the network 50::/64 connected to Switch A.
172
Figure 40 Network diagram
Configuration procedure
1. Configure IP addresses for interfaces. (Details not shown.)
2. Configure IBGP:
# Configure Switch B.
<SwitchB> system-view
[SwitchB] bgp 65009
[SwitchB-bgp] router-id 2.2.2.2
[SwitchB-bgp] peer 9::2 as-number 65009
[SwitchB-bgp] address-family ipv6
[SwitchB-bgp-ipv6] peer 9::2 enable
[SwitchB-bgp-ipv6] quit
# Configure Switch C.
<SwitchC> system-view
[SwitchC] bgp 65009
[SwitchC-bgp] router-id 3.3.3.3
[SwitchC-bgp] peer 9::1 as-number 65009
[SwitchC-bgp] address-family ipv6
[SwitchC-bgp-ipv6] peer 9::1 enable
3. Configure EBGP:
# Configure Switch A.
<SwitchA> system-view
[SwitchA] bgp 65008
[SwitchA-bgp] router-id 1.1.1.1
[SwitchA-bgp] peer 10::1 as-number 65009
[SwitchA-bgp] address-family ipv6
[SwitchA-bgp-ipv6] peer 10::1 enable
# Configure Switch B.
[SwitchB-bgp] peer 10::2 as-number 65008
[SwitchB-bgp] address-family ipv6
[SwitchB-bgp-ipv6] peer 10::2 enable
4. Inject network routes to the BGP routing table:
# Configure Switch A.
[SwitchA-bgp-ipv6] network 10:: 64
[SwitchA-bgp-ipv6] network 50:: 64
[SwitchA-bgp-ipv6] quit
[SwitchA-bgp] quit
173
# Configure Switch B.
[SwitchB-bgp-ipv6] network 10:: 64
[SwitchB-bgp-ipv6] network 9:: 64
[SwitchB-bgp-ipv6] quit
[SwitchB-bgp] quit
# Configure Switch C.
[SwitchC-bgp-ipv6] network 9:: 64
[SwitchC-bgp-ipv6] quit
[SwitchC-bgp] quit
Verifying the configuration
# Display IPv6 BGP peer information on Switch B.
[SwitchB] display bgp peer ipv6
BGP local router ID: 2.2.2.2
Local AS number: 65009
Total number of peers: 2 Peers in established state: 2
Peer AS MsgRcvd MsgSent OutQ PrefRcv Up/Down State
9::2 65009 41 43 0 1 00:29:00 Established
10::2 65008 38 38 0 2 00:27:20 Established
The output shows that Switch A and Switch B have established an EBGP connection, and Switch B and
Switch C have established an IBGP connection.
# Display IPv6 BGP routing table information on Switch A.
[SwitchA] display bgp routing-table ipv6
Total number of routes: 4
BGP local router ID is 1.1.1.1
Status codes: * - valid, > - best, d - dampened, h - history,
s - suppressed, S - stale, i - internal, e - external
Origin: i - IGP, e - EGP, ? - incomplete
* >e Network : 9:: PrefixLen : 64
NextHop : 10::1 LocPrf :
PrefVal : 0 OutLabel : NULL
MED : 0
Path/Ogn: 65009i
* > Network : 10:: PrefixLen : 64
NextHop : :: LocPrf :
PrefVal : 32768 OutLabel : NULL
MED : 0
Path/Ogn: i
* e Network : 10:: PrefixLen : 64
NextHop : 10::1 LocPrf :
174
PrefVal : 0 OutLabel : NULL
MED : 0
Path/Ogn: 65009i
* > Network : 50:: PrefixLen : 64
NextHop : :: LocPrf :
PrefVal : 32768 OutLabel : NULL
MED : 0
Path/Ogn: i
The output shows that Switch A has learned routing information of AS 65009.
# Display IPv6 BGP routing table information on Switch C.
[SwitchC] display bgp routing-table ipv6
Total number of routes: 4
BGP local router ID is 3.3.3.3
Status codes: * - valid, > - best, d - dampened, h - history,
s - suppressed, S - stale, i - internal, e - external
Origin: i - IGP, e - EGP, ? - incomplete
* > Network : 9:: PrefixLen : 64
NextHop : :: LocPrf :
PrefVal : 32768 OutLabel : NULL
MED : 0
Path/Ogn: i
* i Network : 9:: PrefixLen : 64
NextHop : 9::1 LocPrf : 100
PrefVal : 0 OutLabel : NULL
MED : 0
Path/Ogn: i
* >i Network : 10:: PrefixLen : 64
NextHop : 9::1 LocPrf : 100
PrefVal : 0 OutLabel : NULL
MED : 0
Path/Ogn: i
* >i Network : 50:: PrefixLen : 64
NextHop : 10::2 LocPrf : 100
PrefVal : 0 OutLabel : NULL
MED : 0
Path/Ogn: 65008i
The output shows that Switch C has learned the route 50::/64.
# Ping hosts on network 50::/64 on Switch C. The ping operations succeed.
175
IPv6 BGP route reflector configuration example
Network requirements
In Figure 41 , run EBGP between Switch A and Switch B, run IBGP between Switch C and Switch B, and
between Switch C and Switch D. Switch C is a route reflector with clients Switch B and D.
Figure 41 Network diagram
Configuration procedure
1. Configure IPv6 addresses for interfaces and IPv4 addresses for loopback interfaces. (Details not shown.)
2. Configure IBGP and EBGP connections and advertise network routes through IPv6 BGP:
# Configure Switch A.
<SwitchA> system-view
[SwitchA] bgp 100
[SwitchA-bgp] router-id 1.1.1.1
[SwitchA-bgp] peer 100::2 as-number 200
[SwitchA-bgp] address-family ipv6
[SwitchA-bgp-ipv6] peer 100::2 enable
[SwitchA-bgp-ipv6] network 1:: 64
[SwitchA-bgp-ipv6] network 100:: 96
[SwitchA-bgp-ipv6] quit
[SwitchA-bgp] quit
# Configure Switch B
<SwitchB> system-view
[SwitchB] bgp 200
[SwitchB-bgp] router-id 2.2.2.2
[SwitchB-bgp] peer 100::1 as-number 100
[SwitchB-bgp] peer 101::1 as-number 200
[SwitchB-bgp] address-family ipv6
[SwitchB-bgp-ipv6] peer 100::1 enable
[SwitchB-bgp-ipv6] peer 101::1 enable
[SwitchB-bgp-ipv6] peer 101::1 next-hop-local
[SwitchB-bgp-ipv6] network 100:: 96
[SwitchB-bgp-ipv6] network 101:: 96
[SwitchB-bgp-ipv6] quit
176
[SwitchB-bgp] quit
# Configure Switch C.
<SwitchC> system-view
[SwitchC] bgp 200
[SwitchC-bgp] router-id 3.3.3.3
[SwitchC-bgp] peer 101::2 as-number 200
[SwitchC-bgp] peer 102::2 as-number 200
[SwitchC-bgp] address-family ipv6
[SwitchC-bgp-ipv6] peer 101::2 enable
[SwitchC-bgp-ipv6] peer 102::2 enable
[SwitchC-bgp-ipv6] network 101:: 96
[SwitchC-bgp-ipv6] network 102:: 96
# Configure Switch D.
<SwitchD> system-view
[SwitchD] bgp 200
[SwitchD-bgp] router-id 4.4.4.4
[SwitchD-bgp] peer 102::1 as-number 200
[SwitchD-bgp] address-family ipv6
[SwitchD-bgp-ipv6] peer 102::1 enable
[SwitchD-bgp-ipv6] network 102:: 96
3. Configure Switch C as a route reflector, and configure Switch B and Switch D as its clients.
[SwitchC-bgp-ipv6] peer 101::2 reflect-client
[SwitchC-bgp-ipv6] peer 102::2 reflect-client
[SwitchC-bgp-ipv6] quit
[SwitchC-bgp] quit
Verifying the configuration
# Execute the display bgp routing-table ipv6 command on Switch D.
[SwitchD] display bgp routing-table ipv6
Total number of routes: 5
BGP local router ID is 4.4.4.4
Status codes: * - valid, > - best, d - dampened, h - history,
s - suppressed, S - stale, i - internal, e - external
Origin: i - IGP, e - EGP, ? - incomplete
* >i Network : 1:: PrefixLen : 64
NextHop : 101::2 LocPrf : 100
PrefVal : 0 OutLabel : NULL
MED : 0
Path/Ogn: 100i
* >i Network : 100:: PrefixLen : 96
NextHop : 101::2 LocPrf : 100
PrefVal : 0 OutLabel : NULL
MED : 0
Path/Ogn: i
177
* >i Network : 101:: PrefixLen : 96
NextHop : 102::1 LocPrf : 100
PrefVal : 0 OutLabel : NULL
MED : 0
Path/Ogn: i
* > Network : 102:: PrefixLen : 96
NextHop : :: LocPrf :
PrefVal : 32768 OutLabel : NULL
MED : 0
Path/Ogn: i
* i Network : 102:: PrefixLen : 96
NextHop : 102::1 LocPrf : 100
PrefVal : 0 OutLabel : NULL
MED : 0
Path/Ogn: i
The output shows that Switch D has learned the network 1::/64 from Switch C through route reflection.
BFD for IPv6 BGP configuration example
Network requirements
As shown in
Figure 42 , configure OSPFv3 as the IGP in AS 200.
Establish two IBGP connections between Switch A and Switch C. When both paths are working, Switch
C adopts the path Switch A<—>Switch B<—>Switch C to exchange packets with network 1200::0/64.
Configure BFD over the path. Then if the path fails, BFD can quickly detect the failure and notify it to IPv6
BGP. Then the path Switch A<—>Switch D<—>Switch C takes effect immediately.
Figure 42 Network diagram
AS 100
1200::0/64
Switch A
Switch B
Vlan-int100 Vlan-int101
Vlan-int100
Vlan-int101
Switch A
Vlan-int200
AS 200
Vlan-int201
Switch C
Vlan-int200
Switch D
Vlan-int201
Vlan-int100 3000::1/64
178
Device
Switch C
AS 300
Vlan-int101 3001::3/64
Switch B Vlan-int100 3000::2/64 Switch D
Vlan-int201 2001::3/64
Vlan-int200 2000::2/64
Vlan-int201 2001::2/64
Configuration procedure
1. Configure IPv6 addresses for interfaces. (Details not shown.)
2. Configure OSPFv3 so that Switch A and Switch C can reach each other. (Details not shown.)
3. Configure IPv6 BGP on Switch A:
# Establish two IBGP connections to Switch C.
<SwitchA> system-view
[SwitchA] bgp 200
[SwitchA-bgp] router-id 1.1.1.1
[SwitchA-bgp] peer 3001::3 as-number 200
[SwitchA-bgp] peer 2001::3 as-number 200
[SwitchA-bgp] address-family ipv6
[SwitchA-bgp-ipv6] peer 3001::3 enable
[SwitchA-bgp-ipv6] peer 2001::3 enable
[SwitchA-bgp-ipv6] quit
# Create IPv6 ACL 2000 to permit 1200::0/64 to pass.
[SwitchA] acl ipv6 number 2000
[SwitchA-acl6-basic-2000] rule permit source 1200:: 64
[SwitchA-acl6-basic-2000] quit
# Create two route policies, apply_med_50 and apply_med_100. Policy apply_med_50 sets the
MED for route 1200::0/64 to 50. Policy apply_med_100 sets that to 100.
[SwitchA] route-policy apply_med_50 permit node 10
[SwitchA-route-policy-apply_med_50-10] if-match ipv6 address acl 2000
[SwitchA-route-policy-apply_med_50-10] apply cost 50
[SwitchA-route-policy-apply_med_50-10] quit
[SwitchA] route-policy apply_med_100 permit node 10
[SwitchA-route-policy-apply_med_100-10] if-match ipv6 address acl 2000
[SwitchA-route-policy-apply_med_100-10] apply cost 100
[SwitchA-route-policy-apply_med_100-10] quit
# Apply routing policy apply_med_50 to routes outgoing to peer 3001::3, and apply routing policy apply_med_100 to routes outgoing to peer 2001::3.
[SwitchA] bgp 200
[SwitchA-bgp] address-family ipv6 unicast
[SwitchA-bgp-ipv6] peer 3001::3 route-policy apply_med_50 export
[SwitchA-bgp-ipv6] peer 2001::3 route-policy apply_med_100 export
[SwitchA-bgp-ipv6] quit
# Enable BFD for peer 3001::3.
[SwitchA-bgp] peer 3001::3 bfd
[SwitchA-bgp] quit
4. Configure IPv6 BGP on Switch C:
# Establish two IBGP connections to Switch A.
<SwitchC> system-view
[SwitchC] bgp 200
179
[SwitchC-bgp] router-id 3.3.3.3
[SwitchC-bgp] peer 3000::1 as-number 200
[SwitchC-bgp] peer 2000::1 as-number 200
[SwitchC-bgp] address-family ipv6
[SwitchC-bgp-ipv6] peer 3000::1 enable
[SwitchC-bgp-ipv6] peer 2000::1 enable
[SwitchC-bgp-ipv6] quit
# Enable BFD for peer 3001::1.
[SwitchC-bgp] peer 3000::1 bfd
[SwitchC-bgp] quit
[SwitchC] quit
Verifying the configuration
# Display detailed BFD session information on Switch C.
<SwitchC> display bfd session verbose
Total Session Num: 1 Up Session Num: 1 Init Mode: Active
IPv6 Session Working Under Ctrl Mode:
Local Discr: 513 Remote Discr: 513
Source IP: 3001::3
Destination IP: 3000::1
Session State: Up Interface: N/A
Min Tx Inter: 500ms Act Tx Inter: 500ms
Min Rx Inter: 500ms Detect Inter: 2500ms
Rx Count: 13 Tx Count: 14
Connect Type: Indirect Running Up for: 00:00:05
Hold Time: 2243ms Auth mode: None
Detect Mode: Async Slot: 0
Protocol: BGP6
Diag Info: No Diagnostic
The output shows that a BFD session has been established between Switch A and Switch C.
# Display BGP peer information on Switch C.
<SwitchC> display bgp peer ipv6
BGP local router ID: 3.3.3.3
Local AS number: 200
Total number of peers: 2 Peers in established state: 2
Peer AS MsgRcvd MsgSent OutQ PrefRcv Up/Down State
2000::1 200 8 8 0 0 00:04:45 Established
3000::1 200 5 4 0 0 00:01:53 Established
The output shows that Switch C has established two BGP connections with Switch A, and both connections are in Established state.
# Display route 1200::0/64 on Switch C.
<SwitchC> display ipv6 routing-table 1200::0 64 verbose
180
Summary Count : 1
Destination: 1200::/64
Protocol: BGP4+ Process ID: 0
SubProtID: 0x1 Age: 00h01m07s
Cost: 50 Preference: 255
Tag: 0 State: Active Adv
OrigTblID: 0x1 OrigVrf: default-vrf
TableID: 0xa OrigAs: 0
NBRID: 0x25000001 LastAs: 0
AttrID: 0x1 Neighbor: 3000::1
Flags: 0x10060 OrigNextHop: 3000::1
Label: NULL RealNextHop: FE80::20C:29FF:FE4A:3873
BkLabel: NULL BkNextHop: N/A
Tunnel ID: Invalid Interface: Vlan-interface101
BkTunnel ID: Invalid BkInterface: N/A
The output shows that Switch C communicates with network 1200::0/64 through the path Switch
C<—>Switch B<—>Switch A.
# Break down the path Switch C<—>Switch B<—>Switch A and then display route 1200::0/64 on
Switch C.
<SwitchC> display ipv6 routing-table 1200::0 64 verbose
Summary Count : 1
Destination: 1200::/64
Protocol: BGP4+ Process ID: 0
SubProtID: 0x1 Age: 00h00m57s
Cost: 100 Preference: 255
Tag: 0 State: Active Adv
OrigTblID: 0x1 OrigVrf: default-vrf
TableID: 0xa OrigAs: 0
NBRID: 0x25000000 LastAs: 0
AttrID: 0x0 Neighbor: 2000::1
Flags: 0x10060 OrigNextHop: 2000::1
Label: NULL RealNextHop: FE80::20C:29FF:FE40:715
BkLabel: NULL BkNextHop: N/A
Tunnel ID: Invalid Interface: Vlan-interface201
BkTunnel ID: Invalid BkInterface: N/A
The output shows that Switch C communicates with network 1200::0/64 through the path Switch
C<—>Switch D<—>Switch A.
181
Troubleshooting BGP
Symptom
Display BGP peer information by using the display bgp peer ipv4 unicast or display bgp peer ipv6 unicast command. The state of the connection to a peer cannot become established.
Analysis
To become BGP peers, any two routers must establish a TCP connection using port 179 and exchange
Open messages successfully.
Solution
1. Use the display current-configuration command to verify the current configuration, and verify that the peer's AS number is correct.
2. Use the display bgp peer ipv4 unicast or display bgp peer ipv6 unicast command to verify that the peer's IP address/IPv6 address is correct.
3. If a loopback interface is used, verify that the loopback interface is specified with the peer connect-interface command.
4. If the peer is a non-direct EBGP peer, verify that the peer ebgp-max-hop command is configured.
5. Verify that a valid route to the peer is available.
6. Use the ping command to verify the connectivity to the peer.
7. Use the display tcp verbose or display ipv6 tcp verbose command to verify the TCP connection.
8. Verify that no ACL rule is applied to disable TCP port 179.
182
Configuring PBR
Introduction to PBR
Policy-based routing (PBR) uses user-defined policies to route packets. A policy can specify the next hop for packets that match specific criteria such as ACLs.
A device forwards received packets using the following process:
1. The device uses PBR to forward matching packets.
2. If the packets do not match the PBR policy or the PBR-based forwarding fails, the device uses the routing table, excluding the default route, to forward the packets.
3. If the routing table-based forwarding fails, the device uses the default next hop or default output interface defined in PBR to forward packets.
4. If the default next hop or default output interface-based forwarding fails, the device uses the default route to forward packets.
PBR includes local PBR and interface PBR:
•
Local PBR guides the forwarding of locally generated packets, such as the ICMP packets generated by using the ping command.
•
Interface PBR guides the forwarding of packets received on an interface only.
Policy
A policy includes match criteria and actions to be taken on the matching packets. A policy can have one or multiple nodes as follows:
• Each node is identified by a node number. A smaller node number has a higher priority.
•
A node contains if-match and apply clauses. An if-match clause specifies a match criterion, and an apply clause specifies an action.
• A node has a match mode of permit or deny.
A policy matches nodes in priority order against packets. If a packet matches the criteria on a node, it is processed by the action on the node. Otherwise, it goes to the next node for a match. If the packet does not match the criteria on any node, it is forwarded according to the routing table. if-match clause
PBR supports the if-match acl clause to set an ACL match criterion. You can specify only one if-match acl clause for a node. apply clause
PBR supports the apply next-hop clause to set next hops for packets.
183
Relationship between the match mode and clauses on the node
Does a packet match all the if-match clauses on the node?
Yes.
Match mode
Permit Deny
•
If the node is configured with an apply clause, PBR executes the apply clause on the node.
•
If PBR successfully guides the forwarding of the packet, PBR does not match the packet against the next node.
•
If the node is configured with no apply clause, the packet is forwarded according to the routing table.
The packet is forwarded according to the routing table.
No.
PBR matches the packet against the next node.
A node that has no if-match clauses matches any packet.
PBR matches the packet against the next node.
PBR configuration task list
Tasks at a glance
(Required.) Configuring a policy :
•
•
Configuring match criteria for a node
•
Configuring actions for a node
•
•
Configuring a policy
Creating a node
Step Command
1. Enter system view. system-view
2. Create a node for a policy, and enter policy node view. policy-based-route policy-name
[ deny | permit ] node node-number
Remarks
N/A
By default, no policy node is created.
Configuring match criteria for a node
Step Command
1. Enter system view. system-view
Remarks
N/A
184
Step Command
2. Enter policy node view. policy-based-route policy-name [ deny | permit ] node
node-number
3. Configure an
ACL match criterion. if-match acl acl-number{ acl-number | name acl-name }
Remarks
N/A
By default, no ACL match criterion is configured.
NOTE:
An ACL match criterion uses the specified ACL to match packets regardless of the permit or deny action and the time range of the ACL. If the specified ACL does not exist, no packet can match the criterion.
Configuring actions for a node
Step Command
1. Enter system view. system-view
2. Enter policy node view. policy-based-route policy-name [ deny | permit ] node node-number
Remarks
N/A
N/A
3. Set next hops. apply next-hop [ vpn-instance
vpn-instance-name ] { ip-address
[ direct ] }&<1-n>
By default, no next hop is specified.
You can specify multiple next hops for backup or load sharing by executing this command once or multiple times.
You can specify a maximum of two next hops for a node.
Configuring PBR
Configuring local PBR
Configure PBR by applying a policy locally. PBR uses the policy to guide the forwarding of locally generated packets. The specified policy must already exist. Otherwise, the local PBR configuration fails.
You can apply only one policy locally. Before you apply a new policy, you must first remove the current policy.
Do not configure local PBR unless required.
To configure local PBR:
Step Command
1. Enter system view. system-view
2. Apply a policy locally. ip local policy-based-route
policy-name
Remarks
N/A
By default, no policy is locally applied.
185
Configuring interface PBR
Configure PBR by applying a policy to an interface. PBR uses the policy to guide the forwarding of packets received on the interface. The specified policy must already exist. Otherwise, the interface PBR configuration fails.
You can apply only one policy to an interface. Before you apply a new policy, you must first remove the current policy from the interface.
You can apply a policy to multiple interfaces.
To configure interface PBR:
Step Command
1. Enter system view. system-view
2. Enter interface view.
Remarks
N/A interface interface-type interface-number N/A
3. Apply a policy to the interface. ip policy-based-route policy-name
By default, no policy is applied to the interface.
Displaying and maintaining PBR
Execute display commands in any view and reset commands in user view.
Task Command
Display PBR policy information. display ip policy-based-route [ policy policy-name ]
Display PBR configuration. display ip policy-based-route setup
Display local PBR configuration and statistics. display ip policy-based-route local
Display interface PBR configuration and statistics.
Clear PBR statistics. display ip policy-based-route interface interface-type
interface-number reset ip policy-based-route statistics [ policy policy-name ]
PBR configuration examples
Packet type-based local PBR configuration example
Network requirements
, configure PBR on Switch A to forward all TCP packets to the next hop 1.1.2.2.
Switch A forwards other packets according to the routing table.
186
Figure 43 Network diagram
Switch A
Vlan-int10
1.1.2.1/24
Vlan-int10
1.1.2.2/24
Switch B
Vlan-int20
1.1.3.1/24
Configuration procedure
1. Configure Switch A:
# Create VLAN 10 and VLAN 20.
<SwitchA> system-view
Vlan-int20
1.1.3.2/24
Switch C
[SwitchA] vlan 10
[SwitchA-vlan10] quit
[SwitchA] vlan 20
[SwitchA-vlan20] quit
# Configure the IP addresses of VLAN-interface 10 and VLAN-interface 20.
[SwitchA] interface vlan-interface 10
[SwitchA-Vlan-interface10] ip address 1.1.2.1 24
[SwitchA-Vlan-interface10] quit
[SwitchA] interface vlan-interface 20
[SwitchA-Vlan-interface20] ip address 1.1.3.1 24
[SwitchA-Vlan-interface20] quit
# Configure ACL 3101 to match TCP packets.
[SwitchA] acl number 3101
[SwitchA-acl-adv-3101] rule permit tcp
[SwitchA-acl-adv-3101] quit
# Configure Node 5 for policy aaa to forward TCP packets to next hop 1.1.2.2.
[SwitchA] policy-based-route aaa permit node 5
[SwitchA-pbr-aaa-5] if-match acl 3101
[SwitchA-pbr-aaa-5] apply next-hop 1.1.2.2
[SwitchA-pbr-aaa-5] quit
# Configure local PBR by applying policy aaa to Switch A.
[SwitchA] ip local policy-based-route aaa
2. Configure Switch B:
# Create VLAN 10.
<SwitchB> system-view
[SwitchB] vlan 10
[SwitchB-vlan10] quit
# Configure the IP address of VLAN-interface 10.
[SwitchB] interface vlan-interface 10
[SwitchB-Vlan-interface10] ip address 1.1.2.2 24
3. Configure Switch C:
# Create VLAN 20.
<SwitchC> system-view
187
[SwitchC] vlan 20
[SwitchC-vlan20] quit
# Configure the IP address of VLAN-interface 20.
[SwitchC] interface vlan-interface 20
[SwitchC-Vlan-interface20] ip address 1.1.3.2 24
Verifying the configuration
# Telnet to Switch B on Switch A. The operation succeeds.
# Telnet to Switch C on Switch A. The operation fails.
# Ping Switch C from Switch A. The operation succeeds.
Telnet uses TCP and ping uses ICMP. The preceding results show that all TCP packets sent from Switch A are forwarded to the next hop 1.1.2.2, and other packets are forwarded through VLAN-interface 20. The local PBR configuration is effective.
Packet type-based interface PBR configuration example
Network requirements
, configure PBR on Switch A to forward all TCP packets received on VLAN-interface
11 to the next hop 1.1.2.2. Switch A forwards other packets according to the routing table.
Figure 44 Network diagram
Configuration procedure
1. Configure Switch A:
# Create VLAN 10 and VLAN 20.
<SwitchA> system-view
[SwitchA] vlan 10
[SwitchA-vlan10] quit
188
[SwitchA] vlan 20
[SwitchA-vlan20] quit
# Configure the IP addresses of VLAN-interface 10 and VLAN-interface 20.
[SwitchA] interface vlan-interface 10
[SwitchA-Vlan-interface10] ip address 1.1.2.1 24
[SwitchA-Vlan-interface10] quit
[SwitchA] interface vlan-interface 20
[SwitchA-Vlan-interface20] ip address 1.1.3.1 24
[SwitchA-Vlan-interface20] quit
# Configure ACL 3101 to match TCP packets.
[SwitchA] acl number 3101
[SwitchA-acl-adv-3101] rule permit tcp
[SwitchA-acl-adv-3101] quit
# Configure Node 5 for policy aaa to forward TCP packets to next hop 1.1.2.2.
[SwitchA] policy-based-route aaa permit node 5
[SwitchA-pbr-aaa-5] if-match acl 3101
[SwitchA-pbr-aaa-5] apply next-hop 1.1.2.2
[SwitchA-pbr-aaa-5] quit
# Configure interface PBR by applying policy aaa to VLAN-interface 11.
[SwitchA] interface vlan-interface 11
[SwitchA-Vlan-interface11] ip address 10.110.0.10 24
[SwitchA-Vlan-interface11] ip policy-based-route aaa
[SwitchA-Vlan-interface11] quit
2. Configure Switch B:
# Create VLAN 10.
<SwitchB> system-view
[SwitchB] vlan 10
[SwitchB-vlan10] quit
# Configure the IP address of VLAN-interface 10.
[SwitchB] interface vlan-interface 10
[SwitchB-Vlan-interface10] ip address 1.1.2.2 24
[SwitchB-Vlan-interface10] quit
# Configure a static route to subnet 10.110.0.0/24.
[SwitchB] ip route-static 10.110.0.0 24 1.1.2.1
3. Configure Switch C:
# Create VLAN 20.
<SwitchC> system-view
[SwitchC] vlan 20
[SwitchC-vlan20] quit
# Configure the IP address of VLAN-interface 20.
[SwitchC] interface vlan-interface 20
[SwitchC-Vlan-interface20] ip address 1.1.3.2 24
[SwitchC-Vlan-interface20] quit
# Configure a static route to subnet 10.110.0.0/24.
[SwitchC] ip route-static 10.110.0.0 24 1.1.3.1
189
Verifying the configuration
# Configure the IP address 10.110.0.20/24 for Host A, and specify its gateway address as 10.110.0.10.
# On Host A, Telnet to Switch B that is directly connected to Switch A. The operation succeeds.
# On Host A, Telnet to Switch C that is directly connected to Switch A. The operation fails.
# Ping Switch C from Host A. The operation succeeds.
Telnet uses TCP and ping uses ICMP. The preceding results show that all TCP packets arriving on
VLAN-interface 11 of Switch A are forwarded to next hop 1.1.2.2, and other packets are forwarded through VLAN-interface 20. The interface PBR configuration is effective.
190
Configuring IPv6 static routing
Static routes are manually configured and cannot adapt to network topology changes. If a fault or a topological change occurs in the network, the network administrator must modify the static routes manually. IPv6 static routing works well in a simple IPv6 network.
Configuring an IPv6 static route
Before you configure an IPv6 static route, complete the following tasks:
•
Configure parameters for the related interfaces.
•
Configure link layer attributes for the related interfaces.
• Ensure that the neighboring nodes can reach each other.
To configure an IPv6 static route:
Step Command
1. Enter system view. system-view
2.
Configure an IPv6 static route.
•
Method 1: ipv6 route-static ipv6-address prefix-length
{ interface-type interface-number
[ next-hop-address ] | next-hop-address | vpn-instance d-vpn-instance-name
next-hop-address } [ permanent ] [ preference
preference-value ] [ tag tag-value ]
[ description description-text ]
•
Method 2: ipv6 route-static vpn-instance
s-vpn-instance-name ipv6-address
prefix-length { interface-type interface-number
[ next-hop-address ] | next-hop-address
[ public ] | vpn-instance d-vpn-instance-name
next-hop-address } [ permanent ] [ preference
preference-value ] [ tag tag-value ]
[ description description-text ]
3. (Optional.) Configure the default preference for IPv6 static routes. ipv6 route-static default-preference
default-preference-value
Remarks
N/A
Use either method.
By default, no IPv6 static route is configured.
The default setting is 60.
4. (Optional.) Delete all IPv6 static routes, including the default route. delete ipv6 [ vpn-instance vpn-instance-name ] static-routes all
The undo ipv6 route-static command deletes one IPv6 static route.
Configuring BFD for IPv6 static routes
BFD provides a general purpose, standard, and medium- and protocol-independent fast failure detection mechanism. It can uniformly and quickly detect the failures of the bidirectional forwarding paths between
191
two routers for protocols, such as routing protocols. For more information about BFD, see High
Availability Configuration Guide.
IMPORTANT:
Enabling BFD for a flapping route could worsen the situation.
Bidirectional control mode
To use BFD bidirectional control detection between two devices, enable BFD control mode for each device's static route destined to the peer.
To configure a static route and enable BFD control mode for it, specify an output interface and a direct next hop, or specify an indirect next hop and a specific BFD packet source address for the static route.
To configure BFD control mode for an IPv6 static route (direct next hop):
Step Command
1. Enter system view. system-view
2. Configure BFD control mode for an
IPv6 static route.
•
Method 1: ipv6 route-static ipv6-address prefix-length
interface-type interface-number next-hop-address bfd control-packet [ preference preference-value ] [ tag
tag-value ] [ description description-text ]
•
Method 2: ipv6 route-static vpn-instance s-vpn-instance-name
ipv6-address prefix-length interface-type
interface-number next-hop-address bfd control-packet
[ preference preference-value ] [ tag tag-value ]
[ description description-text ]
To configure BFD control mode for an IPv6 static route (indirect next hop):
Remarks
N/A
Step Command
1. Enter system view. system-view
2. Configure BFD control mode for an
IPv6 static route.
•
Method 1: ipv6 route-static ipv6-address prefix-length
{ next-hop-address bfd control-packet bfd-source
ipv6-address | vpn-instance d-vpn-instance-name
next-hop-address bfd control-packet bfd-source ip-address }
[ preference preference-value ] [ tag tag-value ] [ description
description-text ]
•
Method 2: ipv6 route-static vpn-instance s-vpn-instance-name
ipv6-address prefix-length { next-hop-address bfd control-packet bfd-source ipv6-address | vpn-instance
d-vpn-instance-name next-hop-address bfd control-packet bfd-source ipv6-address } [ preference preference-value ]
[ tag tag-value ] [ description description-text ]
Use either method.
By default, BFD control mode for an
IPv6 static route is not configured.
Remarks
N/A
Use either method.
By default, BFD control mode for an IPv6 static route is not configured.
192
Single-hop echo mode
With BFD echo mode enabled for a static route, the output interface sends BFD echo packets to the destination device, which loops the packets back to test the link reachability.
IMPORTANT:
Do not use BFD for a static route with the output interface in spoofing state.
To configure BFD echo mode for an IPv6 static route:
Step Command
1. Enter system view. system-view
2. Configure the source address of echo packets. bfd echo-source-ipv6 ipv6-address
Remarks
N/A
By default, the source address of echo packets is not configured.
The source address of echo packets must be a global unicast address.
For more information about this command, see High
Availability Command
Reference.
3. Configure BFD echo mode for an IPv6 static route.
•
Method 1: ipv6 route-static ipv6-address prefix-length
interface-type interface-number
next-hop-address bfd echo-packet
[ preference preference-value ] [ tag
tag-value ] [ description description-text ]
•
Method 2: ipv6 route-static vpn-instance
s-vpn-instance-name ipv6-address
prefix-length interface-type
interface-number next-hop-address bfd echo-packet [ preference preference-value ]
[ tag tag-value ] [ description
description-text ]
Use either method.
By default, BFD echo mode for an IPv6 static route is not configured.
The next hop IPv6 address must be a global unicast address.
Displaying and maintaining IPv6 static routes
Execute display commands in any view.
Task Command
Display IPv6 static route information. display ipv6 routing-table protocol static [ inactive | verbose ]
Display IPv6 static route next hop information. display ipv6 route-static nib [ nib-id ] [ verbose ]
Display IPv6 static routing table information. display ipv6 route-static routing-table [ vpn-instance
vpn-instance-name ] [ ipv6-address prefix-length ]
193
IPv6 static routing configuration examples
Basic IPv6 static route configuration example
Network requirements
As shown in
, configure IPv6 static routes so that hosts can reach one another.
Figure 45 Network diagram
Host B
2::2/64
Vlan-int400
2::1/64
Vlan-int200
4::2/64
Switch B
Vlan-int300
5::2/64
Vlan-int200
4::1/64
Vlan-int300
5::1/64
Host A
1::2/64
Vlan-int100
1::1/64
Switch A
Vlan-int500
Switch C
3::1/64
Host C
3::2/64
Configuration procedure
1. Configure the IPv6 addresses for all VLAN interfaces. (Details not shown.)
2. Configure IPv6 static routes:
# Configure a default IPv6 static route on Switch A.
<SwitchA> system-view
[SwitchA] ipv6 route-static :: 0 4::2
# Configure two IPv6 static routes on Switch B.
<SwitchB> system-view
[SwitchB] ipv6 route-static 1:: 64 4::1
[SwitchB] ipv6 route-static 3:: 64 5::1
# Configure a default IPv6 static route on Switch C.
<SwitchC> system-view
[SwitchC] ipv6 route-static :: 0 5::2
3. Configure the IPv6 addresses for all the hosts and configure the default gateway of Host A, Host
B, and Host C as 1::1, 2::1, and 3::1.
Verifying the configuration
# Display the IPv6 static route information on Switch A.
[SwitchA] display ipv6 routing-table protocol static
Summary Count : 1
Static Routing table Status : <Active>
Summary Count : 1
194
Destination: :: Protocol : Static
NextHop : 4::2 Preference: 60
Interface : Vlan-interface200 Cost : 0
Static Routing table Status : <Inactive>
Summary Count : 0
# Display the IPv6 static route information on Switch B.
[SwitchB] display ipv6 routing-table protocol static
Summary Count : 2
Static Routing table Status : <Active>
Summary Count : 2
Destination: 1::/64 Protocol : Static
NextHop : 4::1 Preference: 60
Interface : Vlan-interface200 Cost : 0
Destination: 3::/64 Protocol : Static
NextHop : 5::1 Preference: 60
Interface : Vlan-interface300 Cost : 0
Static Routing table Status : <Inactive>
Summary Count : 0
# Use the ping command to test the reachability.
[SwitchA] ping ipv6 3::1
Ping6(104=40+8+56 bytes) 4::1 --> 3::1, press CTRL_C to break
56 bytes from 3::1, icmp_seq=0 hlim=62 time=0.700 ms
56 bytes from 3::1, icmp_seq=1 hlim=62 time=0.351 ms
56 bytes from 3::1, icmp_seq=2 hlim=62 time=0.338 ms
56 bytes from 3::1, icmp_seq=3 hlim=62 time=0.373 ms
56 bytes from 3::1, icmp_seq=4 hlim=62 time=0.316 ms
--- Ping6 statistics for 3::1 ---
5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss round-trip min/avg/max/std-dev = 0.316/0.416/0.700/0.143 ms
BFD for IPv6 static routes configuration example (direct next hop)
Network requirements
route to subnet 121::/64 on Switch B. Enable BFD for both routes. Configure an IPv6 static route to subnet
120::/64 and an IPv6 static route to subnet 121::/64 on Switch C. When the link between Switch A and
Switch B through the Layer 2 switch fails, BFD can detect the failure immediately, and Switch A and
Switch B can communicate through Switch C.
195
Figure 46 Network diagram
Device
Switch A
Interface
Vlan-int10
IPv6 address
12::1/64
Device
Switch B
Interface IPv6 address
Vlan-int10 12::2/64
Vlan-int13 13::1/64
Configuration procedure
1. Configure IPv6 addresses for interfaces. (Details not shown.)
2. Configure IPv6 static routes and BFD:
# Configure IPv6 static routes on Switch A and enable BFD control mode for the static route that traverses the Layer 2 switch.
<SwitchA> system-view
[SwitchA] interface vlan-interface 10
[SwitchA-vlan-interface10] bfd min-transmit-interval 500
[SwitchA-vlan-interface10] bfd min-receive-interval 500
[SwitchA-vlan-interface10] bfd detect-multiplier 9
[SwitchA-vlan-interface10] quit
[SwitchA] ipv6 route-static 120:: 64 vlan-interface 10 FE80::2E0:FCFF:FE58:123E bfd control-packet
[SwitchA] ipv6 route-static 120:: 64 10::100 preference 65
[SwitchA] quit
# Configure IPv6 static routes on Switch B and enable BFD control mode for the static route that traverses the Layer 2 switch.
<SwitchB> system-view
[SwitchB] interface vlan-interface 10
[SwitchB-vlan-interface10] bfd min-transmit-interval 500
[SwitchB-vlan-interface10] bfd min-receive-interval 500
[SwitchB-vlan-interface10] bfd detect-multiplier 9
[SwitchB-vlan-interface10] quit
[SwitchB] ipv6 route-static 121:: 64 vlan-interface 10 FE80::2A0:FCFF:FE00:580A bfd control-packet
[SwitchB] ipv6 route-static 121:: 64 vlan-interface 13 13::2 preference 65
[SwitchB] quit
# Configure IPv6 static routes on Switch C.
<SwitchC> system-view
[SwitchC] ipv6 route-static 120:: 64 13::1
[SwitchC] ipv6 route-static 121:: 64 10::102
196
Verifying the configuration
# Display the BFD sessions on Switch A.
<SwitchA> display bfd session
Total Session Num: 1 Up Session Num: 1 Init Mode: Active
IPv6 Session Working Under Ctrl Mode:
Local Discr: 513 Remote Discr: 33
Source IP: FE80::2A0:FCFF:FE00:580A (link-local address of VLAN-interface 10 on
Switch A)
Destination IP: FE80::2E0:FCFF:FE58:123E (link-local address of VLAN-interface 10 on
Switch B)
Session State: Up Interface: Vlan10
Hold Time: 2012ms
The output shows that the BFD session has been created.
# Display IPv6 static routes on Switch A.
<SwitchA> display ipv6 routing-table protocol static
Summary Count : 1
Static Routing table Status : <Active>
Summary Count : 1
Destination: 12::/64 Protocol : Static
NextHop : 12::2 Preference: 60
Interface : Vlan10 Cost : 0
Direct Routing table Status : <Inactive>
Summary Count : 0
The output shows that Switch A communicates with Switch B through VLAN-interface 10. The link over
VLAN-interface 10 fails.
# Display IPv6 static routes on Switch A again.
<SwitchA> display ipv6 routing-table protocol static
Summary Count : 1
Static Routing table Status : <Active>
Summary Count : 1
Destination: 120::/64 Protocol : Static
NextHop : 10::100 Preference: 65
Interface : Vlan11 Cost : 0
Static Routing table Status : < Inactive>
Summary Count : 0
197
The output shows that Switch A communicates with Switch B through VLAN-interface 11.
BFD for IPv6 static routes configuration example (indirect next hop)
Network requirements
In
Figure 47 , Switch A has a route to interface Loopback 1 (2::9/128) on Switch B, with the output
interface being VLAN-interface 10. Switch B has a route to interface Loopback 1 (1::9/128) on Switch A, with the output interface being VLAN-interface 12. Switch D has a route to 1::9/128, with the output interface being VLAN-interface 10, and a route to 2::9/128, with the output interface being
VLAN-interface 12.
Configure an IPv6 static route to subnet 120::/64 on Switch A, and configure an IPv6 static route to subnet 121::/64 on Switch B. Enable BFD for both routes. Configure an IPv6 static route to subnet
120::/64 and an IPv6 static route to subnet 121::/64 on both Switch C and Switch D. When the link between Switch A and Switch B through Switch D fails, BFD can detect the failure immediately and
Switch A and Switch B can communicate through Switch C.
Figure 47 Network diagram
121::/64
Loop1
1::9/128
Switch D
Vlan-int10
Switch A
Vl anint11
Vlan-int10
BFD
Loop1
2::9/128
Vlan-int12
Vlan-int12
Vlanint13
Switch B
120::/64
Vlan-int11 Vlan-int13
Switch A Vlan-int10
Switch C
12::1/64
Device
Switch B
Interface IPv6 address
Vlan-int12 11::2/64
Switch C Vlan-int11 10::100/64 Switch D
Loop1 2::9/128
Vlan-int10 12::2/64
Configuration procedure
1. Configure IPv6 addresses for interfaces. (Details not shown.)
2. Configure IPv6 static routes and BFD:
# Configure IPv6 static routes on Switch A and enable BFD control packet mode for the IPv6 static route that traverses Switch D.
<SwitchA> system-view
[SwitchA] bfd multi-hop min-transmit-interval 500
[SwitchA] bfd multi-hop min-receive-interval 500
[SwitchA] bfd multi-hop detect-multiplier 9
[SwitchA] ipv6 route-static 120:: 64 2::9 bfd control-packet bfd-source 1::9
[SwitchA] ipv6 route-static 120:: 64 10::100 preference 65
[SwitchA] quit
198
# Configure IPv6 static routes on Switch B and enable BFD control packet mode for the static route that traverses Switch D.
<SwitchB> system-view
[SwitchB] bfd multi-hop min-transmit-interval 500
[SwitchB] bfd multi-hop min-receive-interval 500
[SwitchB] bfd multi-hop detect-multiplier 9
[SwitchB] ipv6 route-static 121:: 64 1::9 bfd control-packet bfd-source 2::9
[SwitchB] ipv6 route-static 121:: 64 13::2 preference 65
[SwitchB] quit
# Configure IPv6 static routes on Switch C.
<SwitchC> system-view
[SwitchC] ipv6 route-static 120:: 64 13::1
[SwitchC] ipv6 route-static 121:: 64 10::102
# Configure IPv6 static routes on Switch D.
<SwitchD> system-view
[SwitchD] ipv6 route-static 120:: 64 11::2
[SwitchD] ipv6 route-static 121:: 64 12::1
Verifying the configuration
# Display the BFD sessions on Switch A.
<SwitchA> display bfd session
Total Session Num: 1 Up Session Num: 1 Init Mode: Active
IPv6 Session Working Under Ctrl Mode:
Local Discr: 513 Remote Discr: 33
Source IP: FE80::1:1B49 (link-local address of Loopback1 on Switch A)
Destination IP: FE80::1:1B49 (link-local address of Loopback1 on Switch B)
Session State: Up Interface: N/A
Hold Time: 2012ms
The output shows that the BFD session has been created.
# Display the IPv6 static routes on Switch A.
<SwitchA> display ipv6 routing-table protocol static
Summary Count : 1
Static Routing table Status : <Active>
Summary Count : 1
Destination: 120::/64 Protocol : Static
NextHop : 2::9 Preference: 60
Interface : Vlan10 Cost : 0
Static Routing table Status : <Inactive>
Summary Count : 0
199
The output shows that Switch A communicates Switch B through VLAN-interface 10. The link over
VLAN-interface 10 fails.
# Display IPv6 static routes on Switch A again.
<SwitchA> display ipv6 routing-table protocol static
Summary Count : 1
Static Routing table Status : <Active>
Summary Count : 1
Destination: 120::/64 Protocol : Static
NextHop : 10::100 Preference: 65
Interface : Vlan11 Cost : 0
Static Routing table Status : <Inactive>
Summary Count : 0
The output shows that Switch A communicates with Switch B through VLAN-interface 11.
200
Configuring an IPv6 default route
A default IPv6 route is used to forward packets that match no entry in the routing table.
A default IPv6 route can be configured in either of the following ways:
•
The network administrator can configure a default route with a destination prefix of ::/0. For more information, see "
Configuring an IPv6 static route
."
• Some dynamic routing protocols, such as OSPFv3, IPv6 IS-IS, and RIPng, can generate a default
IPv6 route. For example, an upstream router running OSPFv3 can generate a default IPv6 route and advertise it to other routers, which install the default IPv6 route with the next hop being the upstream router. For more information, see the respective chapters on those routing protocols in this configuration guide.
201
Configuring OSPFv3
This chapter describes how to configure RFC 2740-compliant Open Shortest Path First version 3 (OSPFv3) for an IPv6 network. For more information about OSPFv2, see "
OSPFv3 overview
OSPFv3 and OSPFv2 have the following in common:
• 32-bit router ID and area ID
•
Hello, Database Description (DD), Link State Request (LSR), Link State Update (LSU), Link State
Acknowledgment (LSAck)
• Mechanisms for finding neighbors and establishing adjacencies
• Mechanisms for advertising and aging LSAs
OSPFv3 and OSPFv2 have the following differences:
•
OSPFv3 runs on a per-link basis. OSPFv2 runs on a per-IP-subnet basis.
• OSPFv3 supports running multiple processes on an interface, but OSPFv2 does not support.
•
OSPFv3 identifies neighbors by router ID. OSPFv2 identifies neighbors by IP address.
OSPFv3 packets
OSPFv3 uses the following packet types:
•
Hello—Periodically sent to find and maintain neighbors, containing timer values, information about the DR, BDR, and known neighbors.
• DD—Describes the digest of each LSA in the LSDB, exchanged between two routers for data synchronization.
•
LSR—Requests needed LSAs from the neighbor. After exchanging the DD packets, the two routers know which LSAs of the neighbor are missing from their LSDBs. They then send an LSR packet to each other, requesting the missing LSAs. The LSA packet contains the digest of the missing LSAs.
• LSU—Transmits the requested LSAs to the neighbor
•
LSAck—Acknowledges received LSU packets.
OSPFv3 LSA types
OSPFv3 sends routing information in LSAs. The following LSAs are commonly used:
•
Router LSA—Type-1 LSA, originated by all routers. This LSA describes the collected states of the router's interfaces to an area, and is flooded throughout a single area only.
• Network LSA—Type-2 LSA, originated for broadcast and NBMA networks by the DR. This LSA contains the list of routers connected to the network, and is flooded throughout a single area only.
•
Inter-Area-Prefix LSA—Type-3 LSA, originated by ABRs and flooded throughout the LSA's associated area. Each Inter-Area-Prefix LSA describes a route with IPv6 address prefix to a destination outside the area, yet still inside the AS.
202
• Inter-Area-Router LSA—Type-4 LSA, originated by ABRs and flooded throughout the LSA's associated area. Each Inter-Area-Router LSA describes a route to ASBR.
•
AS External LSA—Type-5 LSA, originated by ASBRs, and flooded throughout the AS, except stub and NSSA areas. Each AS External LSA describes a route to another AS. A default route can be described by an AS External LSA.
•
NSSA LSA—Type-7 LSA, originated by ASBRs in NSSAs and flooded throughout a single NSSA.
NSSA LSAs describe routes to other ASs.
• Link LSA—Type-8 LSA. A router originates a separate Link LSA for each attached link. Link LSAs have link-local flooding scope. Each Link LSA describes the IPv6 address prefix of the link and
Link-local address of the router.
•
Intra-Area-Prefix LSA—Type-9 LSA. Each Intra-Area-Prefix LSA contains IPv6 prefix information on a router, stub area, or transit area information, and has area flooding scope. It was introduced because Router LSAs and Network LSAs contain no address information.
•
Grace LSA—Type-11 LSA, generated by a GR restarter at reboot and transmitted on the local link.
The GR restarter describes the cause and interval of the reboot in the Grace LSA to notify its neighbors that it performs a GR operation.
Protocols and standards
• RFC 5340, OSPF for IPv6
• RFC 2328, OSPF Version 2
•
RFC 3101, OSPF Not-So-Stubby Area (NSSA) Option
•
RFC 5187, OSPFv3 Graceful Restart
OSPFv3 configuration task list
Tasks at a glance
(Optional.) Configuring OSPFv3 area parameters :
•
•
•
Configuring an OSPFv3 virtual link
(Optional.) Configuring OSPFv3 network types
:
•
Configuring the OSPFv3 network type for an interface
•
Configuring an NBMA or P2MP neighbor
(Optional.) Configuring OSPFv3 route control :
•
Configuring OSPFv3 route summarization
•
Configuring OSPFv3 received route filtering
•
Configuring Inter-Area-Prefix LSA filtering
•
Configuring an OSPFv3 cost for an interface
•
Configuring the maximum number of OSPFv3 ECMP routes
•
Configuring a preference for OSPFv3
•
Configuring OSPFv3 route redistribution
203
Tasks at a glance
(Optional.) Tuning and optimizing OSPFv3 networks :
•
•
Specifying LSA transmission delay
•
Configuring a DR priority for an interface
•
Specifying SPF calculation interval
•
Specifying the LSA generation interval
•
Ignoring MTU check for DD packets
•
Disabling interfaces from receiving and sending OSPFv3 packets
•
Enabling the logging of neighbor state changes
•
Configuring the LSU transmit rate
(Optional.) Configuring OSPFv3 GR
:
•
(Optional.) Configuring BFD for OSPFv3
Enabling OSPFv3
Before you enable OSPFv3, configure IPv6 addresses for interfaces to ensure IPv6 connectivity between neighboring nodes.
To enable an OSPFv3 process on a router:
•
Enable the OSPFv3 process globally.
•
Assign the OSPFv3 process a router ID.
• Enable the OSPFv3 process on related interfaces.
The router ID uniquely identifies the router within an AS. If a router runs multiple OSPFv3 processes, you must specify a unique router ID for each process.
An OSPFv3 process ID has only local significance. Process 1 on a router can exchange packets with process 2 on another router.
To enable OSPFv3:
Step Command
1. Enter system view.
Remarks system-view N/A
2. Enable an OSPFv3 process and enter its view. ospfv3 [ process-id | vpn-instance
vpn-instance-name ] *
By default, no OSPFv3 process is enabled.
3. Specify a router ID. router-id router-id
By default, no router ID is configured.
4. Enter interface view. interface interface-type
interface-number
N/A
5. Enable an OSPFv3 process on the interface. ospfv3 process-id area area-id
[ instance instance-id ]
No OSPFv3 process is enabled on an interface by default.
204
Configuring OSPFv3 area parameters
OSPFv3 has the same stub area, NSSA area, and virtual link features as OSPFv2.
After you split an OSPFv3 AS into multiple areas, the LSA number is reduced and OSPFv3 applications are extended. To further reduce the size of routing tables and the number of LSAs, configure the non-backbone areas at an AS edge as stub areas.
A stub area cannot import external routes, but an NSSA area can import external routes into the OSPF routing domain while retaining other stub area characteristics.
Non-backbone areas exchange routing information through the backbone area, so the backbone and non-backbone areas (including the backbone itself) must be fully meshed. If no connectivity can be achieved, configure virtual links.
Configuration prerequisites
Before you configure OSPFv3 area parameters, enable OSPFv3.
Configuring a stub area
All the routers attached to a stub area must be configured with the stub command. The keyword no-summary is only available on the ABR of the stub area.
If you use the stub command with the keyword no-summary on an ABR, the ABR advertises a default route in an Inter-Area-Prefix LSA into the stub area. No AS External LSA, Inter-Area-Prefix LSA, or other
Inter-Area-Router LSA is advertised in the area. The stub area of this kind is also known as a "totally stub area."
To configure an OSPFv3 stub area:
Remarks
N/A
Step Command
1. Enter system view. system-view
2. Enter OSPFv3 view. ospfv3 [ process-id | vpn-instance
vpn-instance-name ] *
3. Enter OSPFv3 area view.
4. Configure the area as a stub area. area area-id stub
[ default-route-advertise-always | no-summary ] *
5. (Optional.) Specify a cost for the default route advertised to the stub area. default-cost value
N/A
N/A
By default, no area is configured as a stub area.
The default setting is 1.
Configuring an NSSA area
An NSSA area can import external routes into the OSPF routing domain while retaining other stub area characteristics.
To configure an NSSA area, configure the nssa command on all the routers attached to the area.
To configure a totally NSSA area, configure the nssa no-summary command on the ABR. The ABR of a totally NSSA area does not advertise inter-area routes into the area.
205
To configure an NSSA area:
Step Command
1. Enter system view. system-view
2. Enter OSPFv3 view.
3. Enter OSPFv3 area view. ospfv3 [ process-id | vpn-instance
vpn-instance-name ] * area area-id
4. Configure the area as an
NSSA area. nssa [ default-route-advertise
[ cost cost | nssa-only | route-policy route-policy-name | tag tag | type type ] * | no-import-route | no-summary |
[ translate-always | translate-never ] | suppress-fa | translator-stability-interval value ]
*
Remarks
N/A
N/A
N/A
By default, no area is configured as an NSSA area.
5. (Optional.) Specify a cost for the default route advertised to the NSSA area. default-cost cost
The default setting is 1.
This command takes effect only on the ABR/ASBR of an NSSA or totally
NSSA area.
Configuring an OSPFv3 virtual link
You can configure a virtual link to maintain connectivity between a non-backbone area and the backbone, or in the backbone itself.
IMPORTANT:
• Both ends of a virtual link are ABRs that must be configured with the vlink-peer command.
•
Do not configure virtual links in the areas of a GR-capable process.
To configure a virtual link:
Step Command
1. Enter system view. system-view
2. Enter OSPFv3 view. ospfv3 [ process-id | vpn-instance
vpn-instance-name ] *
3. Enter OSPFv3 area view.
4. Configure a virtual link. area area-id vlink-peer router-id [ dead seconds | hello seconds | instance instance-id | retransmit seconds | trans-delay
seconds ] *
Remarks
N/A
N/A
N/A
By default, no virtual link is configured.
Configuring OSPFv3 network types
OSPFv3 classifies networks into the following types by the link layer protocol:
206
• Broadcast—When the link layer protocol is Ethernet or FDDI, OSPFv3 considers the network type as broadcast by default.
•
NBMA—When the link layer protocol is ATM, Frame Relay, or X.25, OSPFv3 considers the network type as NBMA by default.
•
P2P—When the link layer protocol is PPP, LAPB, HDLC, or POS, OSPFv3 considers the network type as P2P by default.
Follow these guidelines when you change the network type of an OSPFv3 interface:
• An NBMA network must be fully connected. Any two routers in the network must be directly reachable to each other through a virtual circuit. If no such direct link is available, you must change the network type through a command.
• If direct connections are not available between some routers in an NBMA network, the type of interfaces associated must be configured as P2MP, or as P2P for interfaces with only one neighbor.
Configuration prerequisites
Before you configure OSPFv3 network types, enable OSPFv3.
Configuring the OSPFv3 network type for an interface
Step Command
1. Enter system view. system-view
Remarks
N/A
2. Enter interface view.
3. Configure a network type for the OSPFv3 interface. interface interface-type
interface-number
ospfv3 network-type { broadcast | nbma | p2mp [ unicast ] | p2p }
[ instance instance-id ]
N/A
By default, the network type of an interface depends on the media type of the interface.
Configuring an NBMA or P2MP neighbor
For NBMA and P2MP interfaces (only when in unicast mode), you must specify the link-local IP addresses of their neighbors because these interfaces cannot find neighbors through broadcasting hello packets.
For NBMA interfaces, you can also specify DR priorities for neighbors.
To configure an NBMA or P2MP (unicast) neighbor and its DR priority:
Remarks
N/A
Step Command
1. Enter system view. system-view
2. Enter interface view.
3. Specify an NBMA or P2MP
(unicast) neighbor and its DR priority. interface interface-type
interface-number ospfv3 peer ipv6-address [ cost
value | dr-priority dr-priority ]
[ instance instance-id ]
N/A
By default, no link-local address is specified for the neighbor interface.
207
Configuring OSPFv3 route control
Configuration prerequisites
Before you configure OSPFv3 route control, complete the following tasks:
•
Configure IPv6 addresses for interfaces to ensure IPv6 connectivity between neighboring nodes.
•
Enable OSPFv3.
Configuring OSPFv3 route summarization
If contiguous network segments exist in an area, you can use the abr-summary command to summarize them into one network segment on the ABR. The ABR will advertise only the summary route. Any LSA on the specified network segment will not be advertised, reducing the LSDB size in other areas.
To configure route summarization:
Step Command
1. Enter system view. system-view
2. Enter OSPFv3 view. ospfv3 [ process-id | vpn-instance
vpn-instance-name ] *
3. Enter OSPFv3 area view. area area-id
Remarks
N/A
N/A
4. Configure route summarization. abr-summary ipv6-address prefix-length
[ not-advertise ] [ cost value ]
N/A
By default, route summarization is not configured.
The abr-summary command takes effect only on ABRs.
Configuring OSPFv3 received route filtering
According to some rules, you can configure OSPFv3 to filter routes calculated using received LSAs.
To configure OSPFv3 to filter routes calculated using received LSAs:
Step Command
1. Enter system view. system-view
2. Enter OSPFv3 view. ospfv3 [ process-id | vpn-instance
vpn-instance-name ] *
Remarks
N/A
N/A
3. Configure OSPFv3 to filter routes calculated using received LSAs. filter-policy { acl6-number [ gateway
prefix-list-name ] | prefix-list
prefix-list-name [ gateway
prefix-list-name ] | gateway
prefix-list-name | route-policy
route-policy-name } import
By default, OSPFv3 accepts all routes calculated using received
LSAs.
This command can only filter routes computed by OSPFv3. Only routes not filtered out can be added into the local routing table.
208
Configuring Inter-Area-Prefix LSA filtering
Step Command
1. Enter system view. system-view
2. Enter OSPFv3 view. ospfv3 [ process-id | vpn-instance
vpn-instance-name ] *
3. Enter OSPFv3 area view. area area-id
4. Configure OSPFv3 to filter
Inter-Area-Prefix LSAs.
Remarks
N/A
N/A filter { acl6-number | prefix-list
prefix-list-name | route-policy
route-policy-name } { export | import }
N/A
By default, OSPFv3 accepts all
Inter-Area-Prefix LSAs.
This command takes effect only on
ABRs.
Configuring an OSPFv3 cost for an interface
You can configure an OSPFv3 cost for an interface with one of the following methods:
• Configure the cost value in interface view.
•
Configure a bandwidth reference value for the interface, and OSPFv3 computes the cost automatically based on the bandwidth reference value: Interface OSPFv3 cost = Bandwidth reference value (100 Mbps)/Interface bandwidth (Mbps). If the calculated cost is greater than
65535, the value of 65535 is used; if the calculated cost is smaller than 1, the value of 1 is used.
If no cost is configured for an interface, OSPFv3 automatically computes the cost for the interface.
To configure an OSPFv3 cost for an interface:
Step Command
1. Enter system view. system-view
2. Enter interface view. interface interface-type
interface-number
Remarks
N/A
N/A
3. Configure an OSPFv3 cost for the interface. ospfv3 cost value [ instance
instance-id ]
By default, the OSPFv3 cost is 1 for a VLAN interface, is 0 for a loopback interface, and is automatically computed according to the interface bandwidth for other interfaces.
To configure a bandwidth reference value:
Step Command
1. Enter system view. system-view
2. Enter OSPFv3 view. ospfv3 [ process-id | vpn-instance
vpn-instance-name ] *
3. Configure a bandwidth reference value. bandwidth-reference value
Remarks
N/A
N/A
The default setting is 100 Mbps.
Configuring the maximum number of OSPFv3 ECMP routes
Perform this task to implement load sharing over ECMP routes.
209
To configure the maximum number of ECMP routes:
Step Command
1. Enter system view. system-view
2. Enter OSPFv3 view. ospfv3 [ process-id | vpn-instance
vpn-instance-name ] *
Remarks
N/A
N/A
3. Specify the maximum number of ECMP routes. maximum load-balancing
maximum
By default, the maximum number of OSPFv3 ECMP routes equals the maximum number of ECMP routes supported by the system.
Use the max-ecmp-num command to configure the maximum number of ECMP routes supported by the system. For more information about the max-ecmp-num command, see Layer 3—IP Routing
Command Reference.
Configuring a preference for OSPFv3
A router can run multiple routing protocols. The system assigns a priority for each protocol. When these routing protocols find the same route, the route found by the protocol with the highest priority is selected.
To configure a preference for OSPFv3:
Step Command
1. Enter system view. system-view
2. Enter OSPFv3 view. ospfv3 [ process-id | vpn-instance
vpn-instance-name ] *
Remarks
N/A
N/A
3. Configure a preference for OSPFv3. preference [ ase ] [ route-policy
route-policy-name ] preference
By default, the preference of OSPFv3 internal routes is 10, and the priority of
OSPFv3 external routes is 150.
Configuring OSPFv3 route redistribution
Because OSPFv3 is a link state routing protocol, it cannot directly filter LSAs to be advertised. OSPFv3 filters only redistributed routes. Only routes that are not filtered out can be advertised in LSAs.
Executing the import-route or default-route-advertise command on a router makes it become an ASBR.
To configure OSPFv3 route redistribution:
Step Command
1. Enter system view. system-view
2. Enter OSPFv3 view. ospfv3 [ process-id | vpn-instance
vpn-instance-name ] *
3. (Optional.) Specify a default cost for redistributed routes. default cost value
Remarks
N/A
N/A
The default setting is 1.
210
Step Command
4. Configure OSPFv3 to redistribute routes from other routing protocols. import-route protocol [ process-id | all-processes | allow-ibgp ]
[ allow-direct | cost cost | nssa-only | route-policy route-policy-name | tag tag
| type type ] *
Remarks
By default, route redistribution is disabled.
5. (Optional.) Configure
OSPFv3 to redistribute a default route.
6. (Optional.) Configure
OSPFv3 to filter redistributed routes. default-route-advertise [ [ always | permit-calculate-other ] | cost cost | route-policy route-policy-name | type
type ] * filter-policy { acl6-number | prefix-list
prefix-list-name } export [ protocol
[ process-id ] ]
By default, no default route is redistributed.
This command can only inject and advertise a default route.
By default, OSPFv3 accepts all redistributed routes.
This command filters only routes redistributed with the import-route command. If the import-route command is not configured, executing this command does not take effect.
Tuning and optimizing OSPFv3 networks
This section describes configurations of OSPFv3 timers, interface DR priority, and the logging of neighbor state changes.
Configuration prerequisites
Before you tune and optimize OSPFv3 networks, complete the following tasks:
• Configure IPv6 addresses for interfaces to ensure IPv6 connectivity between neighboring nodes.
• Enable OSPFv3.
Configuring OSPFv3 timers
Step Command
1. Enter system view. system-view
2. Enter interface view. interface interface-type
interface-number
3. Configure the hello interval. ospfv3 timer hello seconds
Remarks
N/A
N/A
4. Configure the dead interval. ospfv3 timer dead seconds
5. Configure the poll interval. ospfv3 timer poll seconds
[ instance instance-id ]
By default, the hello interval on P2P and broadcast interfaces is 10 seconds.
By default, the dead interval on P2P and broadcast interfaces is 40 seconds.
The dead interval set on neighboring interfaces cannot be too short.
Otherwise, a neighbor is easily considered down.
By default, the poll interval is 120 seconds.
211
Step Command
6. Configure the LSA retransmission interval. ospfv3 timer retransmit
interval [ instance instance-id ]
Remarks
The default setting is 5 seconds.
The LSA retransmission interval cannot be too short. Otherwise, unnecessary retransmissions will occur.
Specifying LSA transmission delay
Each LSA in the LSDB has an age that is incremented by 1 every second, but the age does not change during transmission. Therefore, it is necessary to add a transmission delay into the age time, especially for low-speed links.
To specify the LSA transmission delay on an interface:
Remarks
N/A
Step Command
1. Enter system view. system-view
2. Enter interface view.
3. Specify the LSA transmission delay. interface interface-type
interface-number ospfv3 trans-delay seconds
[ instance instance-id ]
N/A
By default, the LSA transmission delay is 1 second.
Specifying SPF calculation interval
LSDB changes result in SPF calculations. When the topology changes frequently, a large amount of network and router resources are occupied by SPF calculation. You can adjust the SPF calculation interval to reduce the impact.
When network changes are not frequent, the minimum-interval is adopted. If network changes become frequent, the SPF calculation interval is incremented by incremental-interval × 2 n-2
(n is the number of generation times) each time an SPF calculation occurs until the maximum-interval is reached.
To configure SPF calculation interval:
Step Command
1. Enter system view. system-view
2. Enter OSPFv3 view. ospfv3 [ process-id | vpn-instance
vpn-instance-name ] *
Remarks
N/A
N/A
3. Specify the SPF calculation interval. spf-schedule-interval maximum-interval
[ minimum-interval
[ incremental-interval ] ]
By default:
•
The maximum interval is 5 seconds.
•
The minimum interval is 50 milliseconds.
•
The incremental interval is 200 milliseconds.
212
Specifying the LSA generation interval
You can adjust the LSA generation interval to protect network resources and routers from being over consumed by frequent network changes.
When network changes are not frequent, LSAs are generated at the minimum-interval. If network changes become frequent, the LSA generation interval is incremented by incremental-interval × 2 n-2
(n is the number of generation times) each time an LSA generation occurs until the maximum-interval is reached.
To configure the LSA generation interval:
Step Command
1. Enter system view. system-view
2. Enter OSPFv3 view. ospfv3 [ process-id | vpn-instance
vpn-instance-name ] *
Remarks
N/A
N/A
3. Configure the LSA generation interval. lsa-generation-interval
maximum-interval [ minimum-interval
[ incremental-interval ] ]
By default, the maximum interval is 5 seconds, the minimum interval is 0 milliseconds, and the incremental interval is 0 milliseconds.
Configuring a DR priority for an interface
The router priority is used for DR election. Interfaces having the priority 0 cannot become a DR or BDR.
To configure a DR priority for an interface:
Step Command
1. Enter system view. system-view
2. Enter interface view. interface interface-type interface-number
3. Configure a router priority. ospfv3 dr-priority priority [ instance
instance-id ]
Remarks
N/A
N/A
The default router priority is 1.
Ignoring MTU check for DD packets
When LSAs are few in DD packets, it is unnecessary to check the MTU in DD packets to improve efficiency.
To ignore MTU check for DD packets:
Remarks
N/A
Step Command
1. Enter system view. system-view
2. Enter interface view.
3. Ignore MTU check for DD packets. interface interface-type
interface-number
ospfv3 mtu-ignore [ instance
instance-id ]
N/A
By default, OSPFv3 does not ignore MTU check for DD packets.
213
Disabling interfaces from receiving and sending OSPFv3 packets
After an OSPFv3 interface is set to silent, direct routes of the interface can still be advertised in
Intra-Area-Prefix LSAs through other interfaces, but other OSPFv3 packets cannot be advertised. No neighboring relationship can be established on the interface. This feature can enhance the adaptability of OSPFv3 networking.
To disable interfaces from receiving and sending OSPFv3 packets:
Step Command
1. Enter system view. system-view
2. Enter OSPFv3 view. ospfv3 [ process-id | vpn-instance
vpn-instance-name ] *
Remarks
N/A
N/A
3. Disable interfaces from receiving and sending
OSPFv3 packets. silent-interface { interface-type
interface-number | all }
By default, the interfaces are able to receive and send OSPFv3 packets.
This command disables only the interfaces associated with the current process, though multiple
OSPFv3 processes can disable the same interface from receiving and sending OSPFv3 packets.
Enabling the logging of neighbor state changes
With this feature enabled, the router delivers logs about neighbor state changes to its information center, which processes logs according to user-defined output rules (whether to output logs and where to output).
For more information about the information center, see Network Management and Monitoring
Configuration Guide.
To enable the logging of neighbor state changes:
Step Command
1. Enter system view. system-view
2. Enter OSPFv3 view. ospfv3 [ process-id | vpn-instance
vpn-instance-name ] *
3. Enable the logging of neighbor state changes. log-peer-change
Remarks
N/A
N/A
By default, this feature is enabled.
Configuring the LSU transmit rate
Sending large numbers of LSU packets affects router performance and consumes too much network bandwidth. You can configure the router to send LSU packets at a proper interval and limit the maximum number of LSU packets sent out of an OSPFv3 interface each time.
To configure the LSU transmit rate:
214
Step Command
1. Enter system view. system-view
2. Enter OSPFv3 view. ospfv3 [ process-id | vpn-instance
vpn-instance-name ] *
Remarks
N/A
3. Configure the LSU transmit rate. transmit-pacing interval interval count count
N/A
By default, an OSPFv3 interface sends a maximum of three LSU packets every 20 milliseconds.
Configuring OSPFv3 GR
GR ensures forwarding continuity when a routing protocol restarts or an active/standby switchover occurs:
Two routers are required to complete a GR process. The following are router roles in a GR process.
•
GR restarter—Graceful restarting router. It must be Graceful Restart capable.
• GR helper—The neighbor of the GR restarter. It helps the GR restarter to complete the GR process.
To prevent service interruption after a master/backup switchover, a GR restarter running OSPFv3 must complete the following tasks:
•
Keep the GR restarter forwarding entries stable during reboot.
• Establish all adjacencies and obtain complete topology information after reboot.
After the active/standby switchover, the GR restarter sends a Grace LSA to tell its neighbors that it performs a GR. Upon receiving the Grace LSA, the neighbors with the GR helper capability enter the helper mode (and are called "GR helpers"). Then, the GR restarter retrieves its adjacencies and LSDB with the help of the GR helpers.
The switch can act only as a GR helper.
Configuring GR helper
You can configure the GR helper capability on a GR helper.
To configure GR helper:
Step Command
1. Enter system view. system-view
2. Enter OSPFv3 view. ospfv3 [ process-id | vpn-instance
vpn-instance-name ] *
3.
Enable the GR helper capability.
4. Enable strict LSA checking. graceful-restart helper enable graceful-restart helper strict-lsa-checking
Remarks
N/A
N/A
By default, the GR helper capability is enabled.
By default, strict LSA checking is disabled.
215
Configuring BFD for OSPFv3
Bidirectional forwarding detection (BFD) provides a mechanism to quickly detect the connectivity of links between OSPFv3 neighbors, improving the convergence speed of OSPFv3. For more information about
BFD, see High Availability Configuration Guide.
After discovering neighbors by sending hello packets, OSPFv3 notifies BFD of the neighbor addresses, and BFD uses these addresses to establish sessions. Before a BFD session is established, it is in the down state. In this state, BFD control packets are sent at an interval of no less than 1 second to reduce BFD control packet traffic. After the BFD session is established, BFD control packets are sent at the negotiated interval, thereby implementing fast fault detection.
To configure BFD for OSPFv3, you need to configure OSPFv3 first.
To configure BFD for OSPFv3:
Step Command
1. Enter system view. system-view
2. Enter OSPFv3 view.
3. Specify a router ID.
4. Quit the OSPFv3 view. ospfv3 [ process-id | vpn-instance
vpn-instance-name ] * router-id router-id
5. Enter interface view. quit interface interface-type
interface-number
6. Enable an OSPFv3 process on the interface. ospfv3 process-id area area-id
[ instance instance-id ]
Remarks
N/A
N/A
N/A
N/A
N/A
N/A
7. Enable BFD on the interface. ospfv3 bfd enable [ instance
By default, BFD on the interface is disabled.
Displaying and maintaining OSPFv3
Execute display commands in any view.
Purpose Command
Display information about the routes to
OSPFv3 ABR and ASBR. display ospfv3 [ process-id ] abr-asbr
Display summary route information on the OSPFv3 ABR. display ospfv3 [ process-id ] [ area area-id ] abr-summary
[ ipv6-address prefix-length ] [ verbose ]
Display OSPFv3 process information. display ospfv3 [ process-id ] [ verbose ]
Display OSPFv3 GR information. display ospfv3 [ process-id ] graceful-restart
Display OSPFv3 interface information. display ospfv3 [ process-id ] interface [ interface-type
interface-number | verbose ]
Display OSPFv3 LSDB information. display ospfv3 [ process-id ] lsdb [ { external | grace | inter-prefix | inter-router | intra-prefix | link | network | nssa | router | unknown [ type ] } [ link-state-id ] [ originate-router router-id | self-originate ] | statistics | total | verbose ]
216
Purpose Command
Display OSPFv3 next hop information. display ospfv3 [ process-id ] nexthop
Display OSPFv3 neighbor information.
Display OSPFv3 request list information.
Display OSPFv3 retransmission list information. display ospfv3 [ process-id ] [ area area-id ] peer [ [ interface-type
interface-number ] [ verbose ] | peer-router-id | statistics ] display ospfv3 [ process-id ] [ area area-id ] request-queue
[ interface-type interface-number ] [ neighbor-id ] display ospfv3 [ process-id ] [ area area-id ] retrans-queue
[ interface-type interface-number ] [ neighbor-id ]
Display OSPFv3 routing information. display ospfv3 [ process-id ] routing [ ipv6-address prefix-length ]
Display OSPFv3 topology information. display ospfv3 [ process-id ] [ area area-id ] spf-tree [ verbose ] display ospfv3 [ process-id ] statistics [ error ] Display OSPFv3 statistics.
Display OSPFv3 virtual link information. display ospfv3 [ process-id ] vlink
OSPFv3 configuration examples
OSPFv3 stub area configuration example
Network requirements
As shown in
:
•
Enable OSPFv3 on all switches.
•
Split the AS into three areas.
• Configure Switch B and Switch C as ABRs to forward routing information between areas.
• Configure Area 2 as a stub area to reduce LSAs in the area without affecting route reachability.
Figure 48 Network diagram
Configuration procedure
1. Configure IPv6 addresses for interfaces. (Details not shown.)
2. Configure basic OSPFv3:
# Configure Switch A: enable OSPFv3 and specify the router ID as 1.1.1.1.
<SwitchA> system-view
217
[SwitchA] ospfv3
[SwitchA-ospfv3-1] router-id 1.1.1.1
[SwitchA-ospfv3-1] quit
[SwitchA] interface vlan-interface 300
[SwitchA-Vlan-interface300] ospfv3 1 area 1
[SwitchA-Vlan-interface300] quit
[SwitchA] interface vlan-interface 200
[SwitchA-Vlan-interface200] ospfv3 1 area 1
[SwitchA-Vlan-interface200] quit
# Configure Switch B: enable OSPFv3 and specify the router ID as 2.2.2.2.
<SwitchB> system-view
[SwitchB] ospfv3
[SwitchB-ospfv3-1] router-id 2.2.2.2
[SwitchB-ospfv3-1] quit
[SwitchB] interface vlan-interface 100
[SwitchB-Vlan-interface100] ospfv3 1 area 0
[SwitchB-Vlan-interface100] quit
[SwitchB] interface vlan-interface 200
[SwitchB-Vlan-interface200] ospfv3 1 area 1
[SwitchB-Vlan-interface200] quit
# Configure Switch C: enable OSPFv3 and specify the router ID as 3.3.3.3.
<SwitchC> system-view
[SwitchC] ospfv3
[SwitchC-ospfv3-1] router-id 3.3.3.3
[SwitchC-ospfv3-1] quit
[SwitchC] interface vlan-interface 100
[SwitchC-Vlan-interface100] ospfv3 1 area 0
[SwitchC-Vlan-interface100] quit
[SwitchC] interface vlan-interface 400
[SwitchC-Vlan-interface400] ospfv3 1 area 2
[SwitchC-Vlan-interface400] quit
# Configure Switch D: enable OSPFv3 and specify the router ID as 4.4.4.4.
<SwitchD> system-view
[SwitchD] ospfv3
[SwitchD-ospfv3-1] router-id 4.4.4.4
[SwitchD-ospfv3-1] quit
[SwitchD] interface vlan-interface 400
[SwitchD-Vlan-interface400] ospfv3 1 area 2
[SwitchD-Vlan-interface400] quit
# Display OSPFv3 neighbors on Switch B.
[SwitchB] display ospfv3 peer
OSPFv3 Process 1 with Router ID 2.2.2.2
Area: 0.0.0.0
-------------------------------------------------------------------------
Router ID Pri State Dead-Time InstID Interface
3.3.3.3 1 Full/BDR 00:00:40 0 Vlan100
218
Area: 0.0.0.1
-------------------------------------------------------------------------
Router ID Pri State Dead-Time InstID Interface
1.1.1.1 1 Full/DR 00:00:40 0 Vlan200
# Display OSPFv3 neighbors on Switch C.
[SwitchC] display ospfv3 peer
OSPFv3 Process 1 with Router ID 3.3.3.3
Area: 0.0.0.0
-------------------------------------------------------------------------
Router ID Pri State Dead-Time InstID Interface
2.2.2.2 1 Full/DR 00:00:40 0 Vlan100
Area: 0.0.0.2
-------------------------------------------------------------------------
Router ID Pri State Dead-Time InstID Interface
4.4.4.4 1 Full/BDR 00:00:40 0 Vlan400
# Display OSPFv3 routing table information on Switch D.
[SwitchD] display ospfv3 routing
OSPFv3 Process 1 with Router ID 4.4.4.4
-------------------------------------------------------------------------
I - Intra area route, E1 - Type 1 external route, N1 - Type 1 NSSA route
IA - Inter area route, E2 - Type 2 external route, N2 - Type 2 NSSA route
* - Selected route
*Destination: 2001::/64
Type : IA Cost : 2
NextHop : FE80::F40D:0:93D0:1 Interface: Vlan400
AdvRouter : 3.3.3.3 Area : 0.0.0.0
Preference : 10
*Destination: 2001:1::/64
Type : IA Cost : 3
NextHop : FE80::F40D:0:93D0:1 Interface: Vlan400
AdvRouter : 3.3.3.3 Area : 0.0.0.0
Preference : 10
*Destination: 2001:2::/64
Type : I Cost : 1
Nexthop : :: Interface: Vlan400
AdvRouter : 4.4.4.4 Area : 0.0.0.2
Preference : 10
*Destination: 2001:3::/64
Type : IA Cost : 4
219
NextHop : FE80::F40D:0:93D0:1 Interface: Vlan400
AdvRouter : 3.3.3.3 Area : 0.0.0.0
Preference : 10
Total: 4
Intra area: 1 Inter area: 3 ASE: 0 NSSA: 0
3. Configure Area 2 as a stub area:
# Configure Switch D.
[SwitchD] ospfv3
[SwitchD-ospfv3-1] area 2
[SwitchD-ospfv3-1-area-0.0.0.2] stub
# Configure Switch C, and specify the cost of the default route sent to the stub area as 10.
[SwitchC] ospfv3
[SwitchC-ospfv3-1] area 2
[SwitchC-ospfv3-1-area-0.0.0.2] stub
[SwitchC-ospfv3-1-area-0.0.0.2] default-cost 10
# Display OSPFv3 routing table information on Switch D.
[SwitchD] display ospfv3 routing
OSPFv3 Process 1 with Router ID 4.4.4.4
-------------------------------------------------------------------------
I - Intra area route, E1 - Type 1 external route, N1 - Type 1 NSSA route
IA - Inter area route, E2 - Type 2 external route, N2 - Type 2 NSSA route
* - Selected route
*Destination: ::/0
Type : IA Cost : 11
NextHop : FE80::F40D:0:93D0:1 Interface: Valn2
AdvRouter : 4.4.4.4 Area : 0.0.0.2
Preference : 10
*Destination: 2001::/64
Type : IA Cost : 2
NextHop : FE80::F40D:0:93D0:1 Interface: Vlan400
AdvRouter : 3.3.3.3 Area : 0.0.0.0
Preference : 10
*Destination: 2001:1::/64
Type : IA Cost : 3
NextHop : FE80::F40D:0:93D0:1 Interface: Vlan400
AdvRouter : 3.3.3.3 Area : 0.0.0.0
Preference : 10
*Destination: 2001:2::/64
Type : I Cost : 1
Nexthop : :: Interface: Vlan400
AdvRouter : 4.4.4.4 Area : 0.0.0.2
Preference : 10
220
*Destination: 2001:3::/64
Type : IA Cost : 4
NextHop : FE80::F40D:0:93D0:1 Interface: Vlan400
AdvRouter : 3.3.3.3 Area : 0.0.0.0
Preference : 10
Total: 5
Intra area: 1 Inter area: 4 ASE: 0 NSSA: 0
The output shows that a default route is added, and its cost is the cost of a direct route plus the configured cost.
4. Configure Area 2 as a totally stub area:
# Configure Area 2 as a totally stub area on Switch C.
[SwitchC-ospfv3-1-area-0.0.0.2] stub no-summary
# Display OSPFv3 routing table information on Switch D.
[SwitchD] display ospfv3 routing
OSPFv3 Process 1 with Router ID 4.4.4.4
-------------------------------------------------------------------------
I - Intra area route, E1 - Type 1 external route, N1 - Type 1 NSSA route
IA - Inter area route, E2 - Type 2 external route, N2 - Type 2 NSSA route
* - Selected route
*Destination: ::/0
Type : IA Cost : 11
NextHop : FE80::F40D:0:93D0:1 Interface: Vlan2
AdvRouter : 4.4.4.4 Area : 0.0.0.2
Preference : 10
*Destination: 2001:2::/64
Type : I Cost : 1
Nexthop : :: Interface: Vlan400
AdvRouter : 4.4.4.4 Area : 0.0.0.2
Preference : 10
Total: 2
Intra area: 1 Inter area: 1 ASE: 0 NSSA: 0
The output shows that route entries are reduced. All indirect routes are removed, except the default route.
OSPFv3 NSSA area configuration example
Network requirements
•
Configure OSPFv3 on all switches and split the AS into three areas.
• Configure Switch B and Switch C as ABRs to forward routing information between areas.
•
Configure Area 1 as an NSSA area and configure Switch A as an ASBR to redistribute static routes into the AS.
221
Figure 49 Network diagram
Configuration procedure
1. Configure IPv6 addresses for interfaces. (Details not shown.)
2. Configure basic OSPFv3 (see "
OSPFv3 stub area configuration example
").
3. Configure Area 1 as an NSSA area:
# Configure Switch A.
[SwitchA] ospfv3
[SwitchA-ospfv3-1] area 1
[SwitchA-ospfv3-1-area-0.0.0.2] nssa
[SwitchA-ospfv3-1-area-0.0.0.2] quit
[SwitchA-ospfv3-1] quit
# Configure Switch B.
[SwitchB] ospfv3
[SwitchB-ospfv3-1] area 1
[SwitchB-ospfv3-1-area-0.0.0.2] nssa
[SwitchB-ospfv3-1-area-0.0.0.2] quit
[SwitchB-ospfv3-1] quit
NOTE:
•
To allow Switch A in the NSSA area to reach other areas within the AS, you must provide the keyword default-route-advertise for the nssa command issued on Switch B (the ABR) so that Switch
A can obtain a default route.
•
Configuring the nssa command with the keyword no-summary on Switch B can reduce the routing table size on NSSA routers. On other NSSA routers, you only need to configure the nssa command.
# Display OSPFv3 routing information on Switch A.
[SwitchA] display ospfv3 1 routing
OSPFv3 Process 1 with Router ID 1.1.1.1
-------------------------------------------------------------------------
I - Intra area route, E1 - Type 1 external route, N1 - Type 1 NSSA route
IA - Inter area route, E2 - Type 2 external route, N2 - Type 2 NSSA route
* - Selected route
*Destination: 2001::/64
222
Type : IA Cost : 2
NextHop : FE80::20C:29FF:FE74:59C6 Interface: Vlan200
AdvRouter : 2.2.2.2 Area : 0.0.0.1
Preference : 10
*Destination: 2001:1::/64
Type : I Cost : 1
Nexthop : :: Interface: Vlan200
AdvRouter : 1.1.1.1 Area : 0.0.0.2
Preference : 10
*Destination: 2001:2::/64
Type : IA Cost : 3
NextHop : FE80::20C:29FF:FE74:59C6 Interface: Vlan200
AdvRouter : 2.2.2.2 Area : 0.0.0.1
Preference : 10
Total: 3
Intra area: 1 Inter area: 2 ASE: 0 NSSA: 0
4. Configure route redistribution:
# Configure an IPv6 static route, and configure OSPFv3 to redistribute the static route on Switch A.
[SwitchA] ipv6 route-static 1234:: 64 null 0
[SwitchA] ospfv3 1
[SwitchA-ospfv3-1] import-route static
[SwitchA-ospfv3-1] quit
# Display OSPFv3 routing information on Switch D.
[SwitchD] display ospfv3 1 routing
OSPFv3 Process 1 with Router ID 4.4.4.4
-------------------------------------------------------------------------
I - Intra area route, E1 - Type 1 external route, N1 - Type 1 NSSA route
IA - Inter area route, E2 - Type 2 external route, N2 - Type 2 NSSA route
* - Selected route
*Destination: 2001::/64
Type : IA Cost : 2
NextHop : FE80::20C:29FF:FEB9:F2EF Interface: Vlan400
AdvRouter : 3.3.3.3 Area : 0.0.0.2
Preference : 10
*Destination: 2001:1::/64
Type : IA Cost : 3
NextHop : FE80::20C:29FF:FEB9:F2EF Interface: Vlan400
AdvRouter : 3.3.3.3 Area : 0.0.0.2
Preference : 10
*Destination: 2001:2::/64
Type : I Cost : 1
223
NextHop : :: Interface: Vlan400
AdvRouter : 4.4.4.4 Area : 0.0.0.2
Preference : 10
*Destination: 1234::/64
Type : E2 Cost : 1
NextHop : FE80::20C:29FF:FEB9:F2EF Interface: Vlan400
AdvRouter : 2.2.2.2 Tag : 0
Preference : 10
Total: 4
Intra area: 1 Inter area: 2 ASE: 1 NSSA: 0
The output shows an AS external route imported from the NSSA area exists on Switch D.
OSPFv3 DR election configuration example
Network requirements
• Configure router priority 100 for Switch A, the highest priority on the network, so it will become the
DR.
•
Configure router priority 2 for Switch C, the second highest priority on the network, so it will become the BDR.
•
Configure router priority 0 for Switch B, so it cannot become a DR or BDR.
•
Switch D uses the default router priority 1.
Figure 50 Network diagram
Configuration procedure
1. Configure IPv6 addresses for interfaces. (Details not shown.)
2. Configure basic OSPFv3:
# Configure Switch A: enable OSPFv3 and specify the router ID as 1.1.1.1.
<SwitchA> system-view
[SwitchA] ospfv3
[SwitchA-ospfv3-1] router-id 1.1.1.1
[SwitchA-ospfv3-1] quit
[SwitchA] interface vlan-interface 100
224
[SwitchA-Vlan-interface100] ospfv3 1 area 0
[SwitchA-Vlan-interface100] quit
# Configure Switch B: enable OSPFv3 and specify the router ID as 2.2.2.2.
<SwitchB> system-view
[SwitchB] ospfv3
[SwitchB-ospfv3-1] router-id 2.2.2.2
[SwitchB-ospfv3-1] quit
[SwitchB] interface vlan-interface 200
[SwitchB-Vlan-interface200] ospfv3 1 area 0
[SwitchB-Vlan-interface200] quit
# Configure Switch C: enable OSPFv3 and specify the router ID as 3.3.3.3.
<SwitchC> system-view
[SwitchC] ospfv3
[SwitchC-ospfv3-1] router-id 3.3.3.3
[SwitchC-ospfv3-1] quit
[SwitchC] interface vlan-interface 100
[SwitchC-Vlan-interface100] ospfv3 1 area 0
[SwitchC-Vlan-interface100] quit
# Configure Switch D: enable OSPFv3 and specify the router ID as 4.4.4.4.
<SwitchD> system-view
[SwitchD] ospfv3
[SwitchD-ospfv3-1] router-id 4.4.4.4
[SwitchD-ospfv3-1] quit
[SwitchD] interface vlan-interface 200
[SwitchD-Vlan-interface200] ospfv3 1 area 0
[SwitchD-Vlan-interface200] quit
# Display neighbor information on Switch A. The switches have the same default DR priority 1, so
Switch D (the switch with the highest Router ID) is elected as the DR, and Switch C is the BDR.
[SwitchA] display ospfv3 peer
OSPFv3 Process 1 with Router ID 1.1.1.1
Area: 0.0.0.0
-------------------------------------------------------------------------
Router ID Pri State Dead-Time InstID Interface
2.2.2.2 1 2-Way/DROther 00:00:36 0 Vlan200
3.3.3.3 1 Full/BDR 00:00:35 0 Vlan100
4.4.4.4 1 Full/DR 00:00:33 0 Vlan200
# Display neighbor information on Switch D. The neighbor states are all full.
[SwitchD] display ospfv3 peer
OSPFv3 Process 1 with Router ID 4.4.4.4
Area: 0.0.0.0
-------------------------------------------------------------------------
Router ID Pri State Dead-Time InstID Interface
1.1.1.1 1 Full/DROther 00:00:30 0 Vlan100
225
2.2.2.2 1 Full/DROther 00:00:37 0 Vlan200
3.3.3.3 1 Full/BDR 00:00:31 0 Vlan100
3. Configure router priorities for interfaces:
# Configure the router priority of VLAN-interface 100 as 100 on Switch A.
[SwitchA] interface Vlan-interface 100
[SwitchA-Vlan-interface100] ospfv3 dr-priority 100
[SwitchA-Vlan-interface100] quit
# Configure the router priority of VLAN-interface 200 as 0 on Switch B.
[SwitchB] interface vlan-interface 200
[SwitchB-Vlan-interface200] ospfv3 dr-priority 0
[SwitchB-Vlan-interface200] quit
# Configure the router priority of VLAN-interface 100 of Switch C as 2.
[SwitchC] interface Vlan-interface 100
[SwitchC-Vlan-interface100] ospfv3 dr-priority 2
[SwitchC-Vlan-interface100] quit
# Display neighbor information on Switch A. Router priorities have been updated, but the DR and
BDR are not changed.
[SwitchA] display ospfv3 peer
OSPFv3 Process 1 with Router ID 1.1.1.1
Area: 0.0.0.0
-------------------------------------------------------------------------
Router ID Pri State Dead-Time InstID Interface
2.2.2.2 0 2-Way/DROther 00:00:36 0 Vlan200
3.3.3.3 2 Full/BDR 00:00:35 0 Vlan200
4.4.4.4 1 Full/DR 00:00:33 0 Vlan200
# Display neighbor information on Switch D. Switch D is still the DR.
[SwitchD] display ospfv3 peer
OSPFv3 Process 1 with Router ID 4.4.4.4
Area: 0.0.0.0
-------------------------------------------------------------------------
Router ID Pri State Dead-Time InstID Interface
1.1.1.1 100 Full/DROther 00:00:30 0 Vlan100
2.2.2.2 0 Full/DROther 00:00:37 0 Vlan200
3.3.3.3 2 Full/BDR 00:00:31 0 Vlan100
4. Restart DR and BDR election:
# Use the shutdown and undo shutdown commands on interfaces to restart DR and BDR election.
(Details not shown.)
# Display neighbor information on Switch A. The output shows that Switch C becomes the BDR.
[SwitchA] display ospfv3 peer
OSPFv3 Process 1 with Router ID 1.1.1.1
Area: 0.0.0.0
226
-------------------------------------------------------------------------
Router ID Pri State Dead-Time InstID Interface
2.2.2.2 0 Full/DROther 00:00:36 0 Vlan200
3.3.3.3 2 Full/BDR 00:00:35 0 Vlan100
4.4.4.4 1 Full/DROther 00:00:33 0 Vlan200
# Display neighbor information on Switch D.
[SwitchD] display ospfv3 peer
OSPFv3 Process 1 with Router ID 4.4.4.4
Area: 0.0.0.0
-------------------------------------------------------------------------
Router ID Pri State Dead-Time InstID Interface
1.1.1.1 100 Full/DR 00:00:30 0 Vlan100
2.2.2.2 0 2-Way/DROther 00:00:37 0 Vlan200
3.3.3.3 2 Full/BDR 00:00:31 0 Vlan100
The output shows that Switch A becomes the DR.
OSPFv3 route redistribution configuration example
Network requirements
As shown in
•
Switch A, Switch B, and Switch C are in Area 2.
• OSPFv3 process 1 and OSPFv3 process 2 run on Switch B. Switch B communicates with Switch A and Switch C through OSPFv3 process 1 and OSPFv3 process 2.
•
Configure OSPFv3 process 2 to redistribute direct routes and the routes from OSPFv3 process 1 on
Switch B, and set the default metric for redistributed routes to 3. Switch C can then learn the routes destined for 1::0/64 and 2::0/64, and Switch A cannot learn the routes destined for 3::0/64 or
4::0/64.
Figure 51 Network diagram
Configuration procedure
1. Configure IPv6 addresses for interfaces. (Details not shown.)
2. Configure basic OSPFv3:
# Enable OSPFv3 process 1 on Switch A.
<SwitchA> system-view
[SwitchA] ospfv3 1
227
[SwitchA-ospfv3-1] router-id 1.1.1.1
[SwitchA-ospfv3-1] quit
[SwitchA] interface vlan-interface 100
[SwitchA-Vlan-interface100] ospfv3 1 area 2
[SwitchA-Vlan-interface100] quit
[SwitchA] interface vlan-interface 200
[SwitchA-Vlan-interface200] ospfv3 1 area 2
[SwitchA-Vlan-interface200] quit
# Enable OSPFv3 process 1 and OSPFv3 process 2 on Switch B.
<SwitchB> system-view
[SwitchB] ospfv3 1
[SwitchB-ospfv3-1] router-id 2.2.2.2
[SwitchB-ospfv3-1] quit
[SwitchB] interface vlan-interface 100
[SwitchB-Vlan-interface100] ospfv3 1 area 2
[SwitchB-Vlan-interface100] quit
[SwitchB] ospfv3 2
[SwitchB-ospfv3-2] router-id 3.3.3.3
[SwitchB-ospfv3-2] quit
[SwitchB] interface vlan-interface 300
[SwitchB-Vlan-interface300] ospfv3 2 area 2
[SwitchB-Vlan-interface300] quit
# Enable OSPFv3 process 2 on Switch C.
<SwitchC> system-view
[SwitchC] ospfv3 2
[SwitchC-ospfv3-2] router-id 4.4.4.4
[SwitchC-ospfv3-2] quit
[SwitchC] interface vlan-interface 300
[SwitchC-Vlan-interface300] ospfv3 2 area 2
[SwitchC-Vlan-interface300] quit
[SwitchC] interface vlan-interface 400
[SwitchC-Vlan-interface400] ospfv3 2 area 2
[SwitchC-Vlan-interface400] quit
# Display the routing table on Switch C.
[SwitchC] display ipv6 routing-table
Destinations : 7 Routes : 7
Destination: ::1/128 Protocol : Direct
NextHop : ::1 Preference: 0
Interface : InLoop0 Cost : 0
Destination: 3::/64 Protocol : Direct
NextHop : 3::2 Preference: 0
Interface : Vlan300 Cost : 0
Destination: 3::2/128 Protocol : Direct
NextHop : ::1 Preference: 0
228
Interface : InLoop0 Cost : 0
Destination: 4::/64 Protocol : Direct
NextHop : 4::1 Preference: 0
Interface : Vlan400 Cost : 0
Destination: 4::1/128 Protocol : Direct
NextHop : ::1 Preference: 0
Interface : InLoop0 Cost : 0
Destination: FE80::/10 Protocol : Direct
NextHop : :: Preference: 0
Interface : NULL0 Cost : 0
Destination: FF00::/8 Protocol : Direct
NextHop : :: Preference: 0
Interface : NULL0
3. Configure OSPFv3 route redistribution:
# Configure OSPFv3 process 2 to redistribute direct routes and the routes from OSPFv3 process 1 on Switch B.
[SwitchB] ospfv3 2
[SwitchB-ospfv3-2] default cost 3
[SwitchB-ospfv3-2] import-route ospfv3 1
[SwitchB-ospfv3-2] import-route direct
[SwitchB-ospfv3-2] quit
# Display the routing table on Switch C.
[SwitchC] display ipv6 routing-table
Destinations : 9 Routes : 9
Destination: ::1/128 Protocol : Direct
NextHop : ::1 Preference: 0
Interface : InLoop0 Cost : 0
Destination: 1::/64 Protocol : OSPFv3
NextHop : FE80::200:CFF:FE01:1C03 Preference: 150
Interface : Vlan300 Cost : 3
Destination: 2::/64 Protocol : OSPFv3
NextHop : FE80::200:CFF:FE01:1C03 Preference: 150
Interface : Vlan300 Cost : 3
Destination: 3::/64 Protocol : Direct
NextHop : 3::2 Preference: 0
Interface : Vlan300 Cost : 0
Destination: 3::2/128 Protocol : Direct
NextHop : ::1 Preference: 0
229
Interface : InLoop0 Cost : 0
Destination: 4::/64 Protocol : Direct
NextHop : 4::1 Preference: 0
Interface : Vlan400 Cost : 0
Destination: 4::1/128 Protocol : Direct
NextHop : ::1 Preference: 0
Interface : InLoop0 Cost : 0
Destination: FE80::/10 Protocol : Direct
NextHop : :: Preference: 0
Interface : NULL0 Cost : 0
Destination: FF00::/8 Protocol : Direct
NextHop : :: Preference: 0
Interface : NULL0
BFD for OSPFv3 configuration example
Network requirements
As shown in
:
• Configure OSPFv3 on Switch A, Switch B and Switch C and configure BFD over the link Switch
A<—>L2 Switch<—>Switch B.
•
After the link Switch A<—>L2 Switch<—>Switch B fails, BFD can quickly detect the failure and notify OSPFv3 of the failure. Then Switch A and Switch B communicate through Switch C.
Figure 52 Network diagram
Device
Switch A
Interface
Vlan-int10
IPv6 address
2001::1/64
Device
Switch B
Interface IPv6 address
Vlan-int10 2001::2/64
Vlan-int13 2001:3::2/64
Configuration procedure
1. Configure IPv6 addresses for the interfaces. (Details not shown.)
230
2. Configure basic OSPFv3:
# On Switch A, enable OSPFv3 and specify the router ID as 1.1.1.1.
<SwitchA> system-view
[SwitchA] ospfv3
[SwitchA-ospfv3-1] router-id 1.1.1.1
[SwitchA-ospfv3-1] quit
[SwitchA] interface vlan-interface 10
[SwitchA-Vlan-interface10] ospfv3 1 area 0
[SwitchA-Vlan-interface10] quit
[SwitchA] interface vlan-interface 11
[SwitchA-Vlan-interface11] ospfv3 1 area 0
[SwitchA-Vlan-interface11] quit
# On Switch B, enable OSPFv3 and specify the router ID as 2.2.2.2.
<SwitchB> system-view
[SwitchB] ospfv3
[SwitchB-ospfv3-1] router-id 2.2.2.2
[SwitchB-ospfv3-1] quit
[SwitchB] interface vlan-interface 10
[SwitchB-Vlan-interface10] ospfv3 1 area 0
[SwitchB-Vlan-interface10] quit
[SwitchB] interface vlan-interface 13
[SwitchB-Vlan-interface13] ospfv3 1 area 0
[SwitchB-Vlan-interface13] quit
# On Switch C, enable OSPFv3 and configure the router ID as 3.3.3.3.
<SwitchC> system-view
[SwitchC] ospfv3
[SwitchC-ospfv3-1] router-id 3.3.3.3
[SwitchC-ospfv3-1] quit
[SwitchC] interface vlan-interface 11
[SwitchC-Vlan-interface11] ospfv3 1 area 0
[SwitchC-Vlan-interface11] quit
[SwitchC] interface vlan-interface 13
[SwitchC-Vlan-interface13] ospfv3 1 area 0
[SwitchC-Vlan-interface13] quit
3. Configure BFD:
# Enable BFD and configure BFD parameters on Switch A.
[SwitchA] bfd session init-mode active
[SwitchA] interface vlan-interface 10
[SwitchA-Vlan-interface10] ospfv3 bfd enable
[SwitchA-Vlan-interface10] bfd min-transmit-interval 500
[SwitchA-Vlan-interface10] bfd min-receive-interval 500
[SwitchA-Vlan-interface10] bfd detect-multiplier 7
[SwitchA-Vlan-interface10] return
# Enable BFD and configure BFD parameters on Switch B.
[SwitchB] bfd session init-mode active
[SwitchB] interface vlan-interface 10
[SwitchB-Vlan-interface10] ospfv3 bfd enable
231
[SwitchB-Vlan-interface10] bfd min-transmit-interval 500
[SwitchB-Vlan-interface10] bfd min-receive-interval 500
[SwitchB-Vlan-interface10] bfd detect-multiplier 6
Verifying the configuration
# Display the BFD information on Switch A.
<SwitchA> display bfd session
Total Session Num: 1 Init Mode: Active
IPv6 Session Working Under Ctrl Mode:
Local Discr: 1441 Remote Discr: 1450
Source IP: FE80::20F:FF:FE00:1202 (link-local address of VLAN-interface 10 on
Switch A)
Destination IP: FE80::20F:FF:FE00:1200 (link-local address of VLAN-interface 10 on
Switch B)
Session State: Up Interface: Vlan10
Hold Time: 2319ms
# Display routes destined for 2001:4::0/64 on Switch A.
<SwitchA> display ipv6 routing-table 2001:4::0 64
Summary Count : 1
Destination: 2001:4::/64 Protocol : OSPFv3
NextHop : FE80::20F:FF:FE00:1200 Preference: 10
Interface : Vlan10 Cost : 1
The output information shows that Switch A communicates with Switch B through VLAN-interface 10. The link over VLAN-interface 10 fails.
# Display routes to 2001:4::0/64 on Switch A.
<SwitchA> display ipv6 routing-table 2001:4::0 64
Summary Count : 1
Destination: 2001:4::/64 Protocol : OSPFv3
NextHop : FE80::BAAF:67FF:FE27:DCD0 Preference: 10
Interface : Vlan11 Cost : 2
The output shows that Switch A communicates with Switch B through VLAN-interface 11.
232
Configuring IPv6 PBR
Introduction to IPv6 PBR
Policy-based routing (PBR) uses user-defined policies to route packets. A policy can specify the next hop for packets that match specific criteria such as ACLs.
A device forwards received packets using the following process:
1. The device uses PBR to forward matching packets.
2. If the packets do not match the PBR policy or the PBR-based forwarding fails, the device uses the routing table, excluding the default route, to forward the packets.
3. If the routing table-based forwarding fails, the device uses the default next hop or default output interface defined in PBR to forward packets.
4. If the default next hop or default output interface-based forwarding fails, the device uses the default route to forward packets.
PBR includes local PBR and interface PBR:
•
Local PBR guides the forwarding of locally generated packets, such as the ICMP packets generated by using the ping command.
•
Interface PBR guides the forwarding of packets received on an interface only.
Policy
An IPv6 policy includes match criteria and actions to be taken on the matching packets. A policy can have one or multiple nodes as follows:
• Each node is identified by a node number. A smaller node number has a higher priority.
•
A node contains if-match and apply clauses. An if-match clause specifies a match criterion, and an apply clause specifies an action.
• A node has a match mode of permit or deny.
An IPv6 policy matches nodes in priority order against packets. If a packet matches the criteria on a node, it is processed by the action on the node. Otherwise, it goes to the next node for a match. If the packet does not match the criteria on any node, it is forwarded according to the routing table. if-match clause
IPv6 PBR supports the if-match acl clause to set an ACL match criterion. You can specify only one if-match acl clause for a node. apply clause
IPv6 PBR supports the apply next-hop clause to set next hops for packets.
233
Relationship between the match mode and clauses on the node
Does a packet match all the if-match clauses on the node?
Yes
Match mode
In permit mode
•
If the node is configured with an apply clause, IPv6 PBR executes the apply clause on the node.
•
If IPv6 PBR successfully guides the forwarding of the packet,
IPv6 PBR does not match the packet against the next node.
•
If the node is configured with no apply clause, the packet is forwarded according to the routing table.
No
IPv6 PBR matches the packet against the next node.
A node that has no if-match clauses matches any packet.
In deny mode
The packet is forwarded according to the routing table.
IPv6 PBR matches the packet against the next node.
IPv6 PBR configuration task list
Tasks at a glance
(Required.) Configuring an IPv6 policy :
•
•
Configuring match criteria for an IPv6 node
•
Configuring actions for an IPv6 node
(Required.) Configuring IPv6 PBR
:
•
•
Configuring IPv6 interface PBR
Configuring an IPv6 policy
Creating an IPv6 node
Step Command
1. Enter system view. system-view
2. Create an IPv6 policy or policy node, and enter IPv6 policy node view. ipv6 policy-based-route policy-name [ deny | permit ] node node-number
Configuring match criteria for an IPv6 node
Step Command
Remarks
N/A
By default, no IPv6 policy node is created.
Remarks
234
Step Command
1. Enter system view. system-view
2. Enter IPv6 policy node view. ipv6 policy-based-route policy-name [ deny | permit ] node node-number
Remarks
N/A
N/A
3. Configure an ACL match criterion. if-match acl { acl6-number | name acl6-name }
By default, no ACL match criterion is configured.
NOTE:
An ACL match criterion uses the specified ACL to match packets regardless of the permit or deny action and the time range of the ACL. If the specified ACL does not exist, no packet can match the criterion.
Configuring actions for an IPv6 node
Step Command
1. Enter system view. system-view
2. Enter IPv6 policy node view. ipv6 policy-based-route policy-name [ deny
| permit ] node node-number
Remarks
N/A
N/A
3. Set next hops for permitted IPv6 packets. apply next-hop [ vpn-instance
vpn-instance-name ] { ipv6-address
[ direct ] }&<1-n>
By default, no next hop is specified.
You can specify multiple next hops for backup or load sharing by executing this command once or multiple times.
You can specify a maximum of two next hops for a node.
Configuring IPv6 PBR
Configuring IPv6 local PBR
Configure IPv6 PBR by applying a policy locally. IPv6 PBR uses the policy to guide the forwarding of locally generated packets. The specified policy must already exist. Otherwise, the IPv6 local PBR configuration fails.
You can apply only one policy locally. Before you apply a new policy, you must first remove the current policy.
Do not configure IPv6 local PBR unless required.
To configure IPv6 local PBR:
Step Command
1. Enter system view. system-view
2. Apply a policy locally. ipv6 local policy-based-route
policy-name
Remarks
N/A
By default, no policy is locally applied.
235
Configuring IPv6 interface PBR
Configure IPv6 PBR by applying an IPv6 policy to an interface. IPv6 PBR uses the policy to guide the forwarding of IPv6 packets received on the interface. The specified policy must already exist. Otherwise, the IPv6 interface PBR configuration fails.
You can apply only one policy to an interface. Before you apply a new policy, you must first remove the current policy from the interface.
You can apply a policy to multiple interfaces.
To configure IPv6 interface PBR:
Step Command
1. Enter system view. system-view
Remarks
N/A
2. Enter interface view. interface interface-type interface-number N/A
3. Apply an IPv6 policy to the interface. ipv6 policy-based-route policy-name
By default, no IPv6 policy is applied to the interface.
Displaying and maintaining IPv6 PBR
Execute display commands in any view and reset commands in user view.
Task Command
Display IPv6 PBR policy information. display ipv6 policy-based-route [ policy policy-name ] display ipv6 policy-based-route setup Display IPv6 PBR configuration.
Display IPv6 local PBR configuration and statistics.
Display IPv6 interface PBR configuration and statistics.
Clear IPv6 PBR statistics. display ipv6 policy-based-route local display ipv6 policy-based-route interface interface-type
interface-number reset ipv6 policy-based-route statistics [ policy policy-name ]
IPv6 PBR configuration examples
Packet type-based IPv6 local PBR configuration example
Network requirements
As shown in
, configure IPv6 PBR on Switch A to forward all TCP packets to the next hop 1::2.
Switch A forwards other packets according to the routing table.
236
Figure 53 Network diagram
Configuration procedure
1. Configure Switch A:
# Create VLAN 10 and VLAN 20.
<SwitchA> system-view
[SwitchA] vlan 10
[SwitchA-vlan10] quit
[SwitchA] vlan 20
[SwitchA-vlan20] quit
# Configure the IPv6 addresses of VLAN-interface 10 and VLAN-interface 20.
[SwitchA] interface vlan-interface 10
[SwitchA-Vlan-interface10] ipv6 address 1::1 64
[SwitchA-Vlan-interface10] quit
[SwitchA] interface vlan-interface 20
[SwitchA-Vlan-interface20] ipv6 address 2::1 64
[SwitchA-Vlan-interface20] quit
# Configure ACL 3001 to match TCP packets.
[SwitchA] acl ipv6 number 3001
[SwitchA-acl6-adv-3001] rule permit tcp
[SwitchA-acl6-adv-3001] quit
# Configure Node 5 for policy aaa to forward TCP packets to next hop 1::2.
[SwitchA] ipv6 policy-based-route aaa permit node 5
[SwitchA-pbr6-aaa-5] if-match acl 3001
[SwitchA-pbr6-aaa-5] apply next-hop 1::2
[SwitchA-pbr6-aaa-5] quit
# Configure IPv6 local PBR by applying policy aaa to Switch A.
[SwitchA] ipv6 local policy-based-route aaa
2. Configure Switch B:
# Create VLAN 10.
<SwitchB> system-view
[SwitchB] vlan 10
[SwitchB-vlan10] quit
# Configure the IPv6 address of VLAN-interface 10.
[SwitchB] interface vlan-interface 10
[SwitchB-Vlan-interface10] ipv6 address 1::2 64
3. Configure Switch C:
# Create VLAN 20.
<SwitchC> system-view
237
[SwitchC] vlan 20
[SwitchC-vlan20] quit
# Configure the IPv6 address of VLAN-interface 20.
[SwitchC] interface vlan-interface 20
[SwitchC-Vlan-interface20] ipv6 address 2::2 64
Verifying the configuration
# Telnet to Switch B on Switch A. The operation succeeds.
# Telnet to Switch C on Switch A. The operation fails.
# Ping Switch C from Switch A. The operation succeeds.
Telnet uses TCP and ping uses ICMP. The preceding results show that all TCP packets sent from Switch A are forwarded to the next hop 1::2, and other packets are forwarded through VLAN-interface 20. The
IPv6 local PBR configuration is effective.
238
Configuring routing policies
Routing policies control routing paths by filtering and modifying routing information. This chapter describes both IPv4 and IPv6 routing policies.
Overview
Routing policies can filter advertised, received, and redistributed routes, and modify attributes for specific routes.
To configure a routing policy:
1. Configure filters based on route attributes, such as destination address and the advertising router's address.
2. Create a routing policy and apply filters to the routing policy.
Filters
Routing policies can use the following filters to match routes.
ACL
ACLs include IPv4 ACLs and IPv6 ACLs. An ACL can match the destination or next hop of routing information.
For more information about ACLs, see ACL and QoS Configuration Guide.
IP prefix list
IP prefix lists include IPv4 prefix lists and IPv6 prefix lists.
An IP prefix list matches the destination address of routing information. You can use the gateway option to receive routing information only from specific routers. For more information about the gateway option, see "
An IP prefix list, identified by name, can contain multiple items. Each item, identified by an index number, specifies a prefix range to match. An item with a smaller index number is matched first. A route that matches one item matches the IP prefix list.
AS path list
An AS path list matches the AS_PATH attribute of BGP routing information.
For more information about AS path lists, see " Configuring BGP ."
Community list
A community list matches the COMMUNITY attribute of BGP routing information.
For more information about community lists, see " Configuring BGP ."
Extended community list
An extended community list matches the extended community attribute (Route-Target for VPN) of BGP routing information.
239
Routing policy
A routing policy can contain multiple nodes, which are in a logical OR relationship. A node with a smaller number is matched first. A route (except the route configured with the continue clauses) that matches one node matches the routing policy.
Each node has a match mode of permit or deny.
• permit—Specifies the permit match mode for a routing policy node. If a route matches all the if-match clauses of the node, it is handled by the apply clauses of the node. The route does not match against the next node unless the continue clause is configured. If a route does not match all the if-match clauses of the node, it matches against the next node.
• deny—Specifies the deny match mode for a routing policy node. The apply and continue clauses of a deny-mode node are never executed. If a route matches all the if-match clauses of the node, it is discarded and does not match against the next node. If a route does not match all the if-match clauses of the node, it matches against the next node.
A node can contain a set of if-match, apply, and continue clauses.
• if-match clauses—Configure the match criteria that match the attributes of routing information. The if-match clauses are in a logical AND relationship. A route must match all the if-match clauses to match the node.
• apply clauses—Specify the actions to be taken on permitted routes, such as modifying a route attribute.
• continue clause—Specifies the next node. A route that matches the current node (permit-mode node) must match the specified next node in the same routing policy. The continue clause combines the if-match and apply clauses of the two nodes to improve flexibility of the routing policy.
Follow these guidelines when you configure if-match, apply, and continue clauses:
•
If you only want to filter routes, do not configure apply clauses.
• If you do not configure any if-match clauses for a permit-mode node, the node will permit all routes.
• Configure a permit-mode node containing no if-match or apply clauses behind multiple deny-mode nodes to allow unmatched routes to pass.
Configuring filters
Configuration prerequisites
Determine the IP prefix list name, matching address range, and community list number.
Configuring an IP prefix list
Configuring an IPv4 prefix list
If all the items are set to deny mode, no routes can pass the IPv4 prefix list. To allow other IPv4 routing information to pass, you must configure the permit 0.0.0.0 0 less-equal 32 item following multiple deny items.
To configure an IPv4 prefix list:
240
Step Command
1. Enter system view. system-view
Remarks
N/A
2. Configure an IPv4 prefix list. ip prefix-list prefix-list-name [ index index-number ]
{ deny | permit } ip-address mask-length
[ greater-equal min-mask-length ] [ less-equal
max-mask-length ]
By default, no IPv4 prefix list is configured.
Configuring an IPv6 prefix list
If all items are set to deny mode, no routes can pass the IPv6 prefix list. To allow other IPv6 routing information to pass, you must configure the permit :: 0 less-equal 128 item following multiple deny items.
To configure an IPv6 prefix list:
Step Command
1. Enter system view. system-view
2. Configure an IPv6 prefix list. ipv6 prefix-list prefix-list-name [ index index-number ]
{ deny | permit } ipv6-address prefix-length
[ greater-equal min-prefix-length ] [ less-equal
max-prefix-length ]
Remarks
N/A
By default, no IPv6 prefix list is configured.
Configuring an AS path list
You can configure multiple items for an AS path list that is identified by a number. The relationship between the items is logical OR. A route that matches one item matches the AS path list.
To configure an AS path list:
Step Command
1. Enter system view. system-view
2. Configure an AS path list. ip as-path as-path-number { deny | permit } regular-expression
Remarks
N/A
By default, no AS path list is configured.
Configuring a community list
You can configure multiple items for a community list that is identified by a number. The relationship between the items is logical OR. A route that matches one item matches the community list.
To configure a community list:
Step Command
1. Enter system view. system-view
Remarks
N/A
241
Step Command
2. Configure a community list.
•
Configure a basic community list: ip community-list { basic-comm-list-num | basic
basic-comm-list-name } { deny | permit }
[ community-number&<1-32> | aa:nn&<1-32> ]
[ internet | no-advertise | no-export | no-export-subconfed ] *
•
Configure an advanced community list: ip community-list { adv-comm-list-num | advanced
adv-comm-list-name } { deny | permit }
regular-expression
Remarks
Use either method.
By default, no community list is configured.
Configuring an extended community list
You can configure multiple items for an extended community list that is identified by a number. The relationship between the items is logic OR. A route that matches one item matches the extended community list.
To configure an extended community list:
Step Command
1. Enter system view. system-view
2. Configure an extended community list. ip extcommunity-list ext-comm-list-number { deny | permit } { rt route-target }&<1-32>
Remarks
N/A
By default, no extended community list is configured.
Configuring a routing policy
Configuration prerequisites
Configure filters and routing protocols, and determine the routing policy name, node numbers, match criteria, and the attributes to be modified.
Creating a routing policy
For a routing policy that has more than one node, configure at least one permit-mode node. A route that does not match any node cannot pass the routing policy. If all the nodes are in deny mode, no routing information can pass the routing policy.
To create a routing policy:
Step Command
1. Enter system view. system-view
2. Create a routing policy and a node, and enter routing policy node view. route-policy
route-policy-name { deny | permit } node node-number
Remarks
N/A
By default, no routing policy is created.
242
Configuring if-match clauses
You can either specify no if-match clauses or multiple if-match clauses for a routing policy node. If no if-match clause is specified for a permit-mode node, all routing information can pass the node. If no if-match clause is specified for a deny-mode node, no routing information can pass the node.
The if-match clauses of a routing policy node have a logical AND relationship. A route must meet all if-match clauses before it can be executed by the apply clauses of the node. If an if-match command exceeds the maximum length, multiple identical if-match clauses are generated. These clauses have a logical OR relationship. A route only needs to match one of them.
To configure if-match clauses:
Step Command
1. Enter system view. system-view
Remarks
N/A
2. Enter routing policy node view. route-policy route-policy-name { deny
3. Match routes whose destination, next hop, or source matches a specified prefix list.
•
Match IPv4 routes whose destination, next hop, or source matches the IPv4 prefix list: if-match ip { address | next-hop | route-source } { acl acl-number | prefix-list prefix-list-name }
•
Match IPv6 routes whose destination, next hop, or source matches the IPv6 prefix list: if-match ipv6 { address | next-hop | route-source } { acl
acl6-number | prefix-list
prefix-list-name }
N/A
By default, no IPv4 or IPv6 prefix list match criterion is configured.
If the ACL used by an if-match clause does not exist, the clause is always matched. If no rules of the specified ACL are matched or the match rules are inactive, the clause is not matched.
The ACL specified in an if-match clause must be a non-VPN ACL.
4. Match BGP routes whose
AS_PATH attribute matches a specified AS path list. if-match as-path
as-path-number&<1-32>
By default, no AS path match criterion is configured.
5. Match BGP routes whose
COMMUNITY attribute matches a specified community list. if-match community
{ { basic-community-list-number | name comm-list-name }
[ whole-match ] |
adv-community-list-number }&<1-32>
6. Match routes having the specified cost.
7. Match BGP routes whose extended community attribute matches a specified extended community list. if-match cost value if-match extcommunity
ext-comm-list-number&<1-32>
8. Match routes having the specified output interface. if-match interface { interface-type
interface-number }&<1-16>
By default, no COMMUNITY match criterion is matched.
By default, no cost match criterion is configured.
By default, no extended community list match criterion is configured.
By default, no output interface match criterion is configured.
This command is not supported by BGP.
243
Step Command
9. Match BGP routes having the specified local preference.
10. Match routes having the specified route type. if-match local-preference preference
Remarks
By default, no local preference is configured for
BGP routes. if-match route-type { external-type1 | external-type1or2 | external-type2 | internal | nssa-external-type1 | nssa-external-type1or2 | nssa-external-type2 } *
By default, no route type match criterion is configured.
11. Match OSPF routes having the specified tag value. if-match tag value
By default, no tag match criterion is configured.
Configuring apply clauses
Except for the apply commands used for setting the next hop for IPv4 and IPv6 routes, all apply commands are the same for IPv4 and IPv6 routing.
To configure apply clauses:
Remarks
N/A
Step Command
1. Enter system view. system-view
2. Enter routing policy node view.
3. Set the AS_PATH attribute for
BGP routes.
4.
Delete the specified
COMMUNITY attribute for
BGP routes.
5. Set the specified COMMUNITY attribute for BGP routes.
6. Set a cost for routes.
7. Set a cost type for routes.
8. Set the extended community attribute for BGP routes. route-policy route-policy-name
{ deny | permit } node
node-number apply as-path
as-number&<1-32> [ replace ] apply comm-list
{ comm-list-number |
comm-list-name } delete apply community { none | additive |
{ community-number&<1-32> |
aa:nn&<1-32> | internet | no-advertise | no-export | no-export-subconfed } *
[ additive ] } apply cost [ + | - ] value apply cost-type { type-1 | type-2 } apply extcommunity { rt
route-target }&<1-32>
[ additive ]
N/A
By default, no AS_PATH attribute is set for BGP routes.
By default, no COMMUNITY attribute is deleted for BGP routes.
By default, no community attribute is set for BGP routes.
By default, no cost is set for routes.
By default, no cost type is set for routes.
By default, no extended community attribute is set for BGP routes.
244
Step Command
9. Set the next hop for routes.
•
Set the next hop for IPv4 routes: apply ip-address next-hop
ip-address [ public | vpn-instance
vpn-instance-name ]
•
Set the next hop for IPv6 routes: apply ipv6 next-hop
ipv6-address
10. Set a local preference for BGP routes. apply local-preference
preference
11. Set the ORIGIN attribute for
BGP routes.
12. Set a preference.
13. Set a preferred value for BGP routes.
14.
15.
Set a prefix priority. apply origin { egp as-number | igp | incomplete } apply preference preference apply preferred-value
preferred-value apply prefix-priority { critical | high | medium }
Set a tag value for OSPF routes. apply tag value
Remarks
By default, no next hop is set for
IPv4/IPv6 routes.
The apply ip-address next-hop and apply ipv6 next-hop commands do not apply to redistributed IPv4 and
IPv6 routes.
By default, no local preference is set for BGP routes.
By default, no ORIGIN attribute is set for BGP routes.
By default, no preference is set.
By default, no preferred value is set for BGP routes.
By default, no prefix priority is set, which means the prefix priority is low.
By default, no tag value is set for
OSPF routes.
Configuring a continue clause
Follow these guidelines when you configure a continue clause:
• If you configure the same type of apply clauses that set different values on nodes that are combined by the continue clause, and the apply clauses are not configured with the additive keyword, the apply clause configured on the last matching node takes effect. If the apply clauses are configured with the additive keyword (including the apply as-path clauses without the replace keyword, the apply cost clauses with the + or - keyword, the apply community clauses with the additive keyword, and the apply extcommunity clauses with the additive keyword), all the apply clauses configured on the matching nodes take effect.
• If you configure the apply community clause for multiple nodes that are combined by the continue clause, the apply comm-list delete clause configured on the current node cannot delete the community attributes set by preceding nodes.
To configure a continue clause:
1. Enter system view. system-view N/A
2. Enter routing policy node view. route-policy route-policy-name
245
3. Specify the next node to be matched. continue [ node-number ]
By default, no continue clause is configured.
The specified next node must have a larger number than the current node.
Displaying and maintaining the routing policy
Execute display commands in any view and reset commands in user view.
Task Command
Display BGP AS path list information. display ip as-path [ as-path-number ]
Display BGP community list information. display ip community-list [ basic-community-list-number |
adv-community-list-number | name comm-list-name ]
Display BGP extended community list information.
Display IPv4 prefix list statistics.
Display IPv6 prefix list statistics.
Display routing policy information.
Clear IPv4 prefix list statistics.
Clear IPv6 prefix list statistics. display ip extcommunity-list [ ext-comm-list-number ] display ip prefix-list [ name prefix-list-name ] display ipv6 prefix-list [ name prefix-list-name ] display route-policy [ name route-policy-name ] reset ip prefix-list [ prefix-list-name ] reset ipv6 prefix-list [ prefix-list-name ]
246
Support and other resources
Contacting HP
For worldwide technical support information, see the HP support website: http://www.hp.com/support
Before contacting HP, collect the following information:
• Product model names and numbers
•
Technical support registration number (if applicable)
•
Product serial numbers
• Error messages
•
Operating system type and revision level
•
Detailed questions
Subscription service
HP recommends that you register your product at the Subscriber's Choice for Business website: http://www.hp.com/go/wwalerts
After registering, you will receive email notification of product enhancements, new driver versions, firmware updates, and other product resources.
Related information
Documents
To find related documents, browse to the Manuals page of the HP Business Support Center website: http://www.hp.com/support/manuals
• For related documentation, navigate to the Networking section, and select a networking category.
•
For a complete list of acronyms and their definitions, see HP FlexNetwork Technology Acronyms.
Websites
• HP.com http://www.hp.com
• HP Networking http://www.hp.com/go/networking
•
HP manuals http://www.hp.com/support/manuals
•
HP download drivers and software http://www.hp.com/support/downloads
• HP software depot http://www.software.hp.com
•
HP Education http://www.hp.com/learn
247
Conventions
This section describes the conventions used in this documentation set.
Command conventions
Convention Description
Boldface Bold text represents commands and keywords that you enter literally as shown.
Italic
[ ]
{ x | y | ... }
[ x | y | ... ]
{ x | y | ... } *
[ x | y | ... ] *
&<1-n>
Italic text represents arguments that you replace with actual values.
Square brackets enclose syntax choices (keywords or arguments) that are optional.
Braces enclose a set of required syntax choices separated by vertical bars, from which you select one.
Square brackets enclose a set of optional syntax choices separated by vertical bars, from which you select one or none.
Asterisk-marked braces enclose a set of required syntax choices separated by vertical bars, from which you select at least one.
Asterisk-marked square brackets enclose optional syntax choices separated by vertical bars, from which you select one choice, multiple choices, or none.
The argument or keyword and argument combination before the ampersand (&) sign can be entered 1 to n times.
A line that starts with a pound (#) sign is comments. #
GUI conventions
Symbols
Convention Description
Boldface
Window names, button names, field names, and menu items are in bold text. For example, the New User window appears; click OK.
> Multi-level menus are separated by angle brackets. For example, File > Create > Folder.
Convention Description
WARNING
An alert that calls attention to important information that if not understood or followed can result in personal injury.
CAUTION
An alert that calls attention to important information that if not understood or followed can result in data loss, data corruption, or damage to hardware or software.
IMPORTANT
NOTE
An alert that calls attention to essential information.
An alert that contains additional or supplementary information.
TIP
An alert that provides helpful information.
248
Network topology icons
Represents a generic network device, such as a router, switch, or firewall.
Represents a routing-capable device, such as a router or Layer 3 switch.
Represents a generic switch, such as a Layer 2 or Layer 3 switch, or a router that supports
Layer 2 forwarding and other Layer 2 features.
Represents an access controller, a unified wired-WLAN module, or the switching engine on a unified wired-WLAN switch.
Represents an access point.
Represents a security product, such as a firewall, a UTM, or a load-balancing or security card that is installed in a device.
Port numbering in examples
Represents a security card, such as a firewall card, a load-balancing card, or a
NetStream card.
The port numbers in this document are for illustration only and might be unavailable on your device.
249
Index
Numerics
4-byte
IPv4 BGP AS number suppression,
IPv6 BGP AS number suppression,
A
ABR
OSPF route summarization on ABR, 34
OSPF router type,
action
address
MP-BGP address family,
adjacency
OSPFv3 configuration,
,
OSPFv3 DR election configuration,
OSPFv3 NSSA area configuration,
OSPFv3 route redistribution, 227
OSPFv3 stub area configuration,
advertising
BGP COMMUNITY NO_ADVERTISE path attribute,
,
BGP default route to peer/peer group, 98
BGP optimal route advertisement, 98
BGP route advertisement rules,
IPv4 BGP basic configuration,
IPv4 BGP BFD configuration, 169
IPv4 BGP COMMUNITY
,
IPv4 BGP confederation configuration,
IPv4 BGP configuration,
IPv4 BGP fake AS number advertisement,
IPv4 BGP GR configuration, 167
IPv4 BGP load balancing configuration,
IPv4 BGP path selection configuration, 164
IPv4 BGP route reflector configuration, 157
IPv4 BGP route summarization,
IPv4 BGP-IGP route redistribution,
IPv6 BGP basic configuration, 172
IPv6 BGP BFD configuration, 178
IPv6 BGP COMMUNITY configuration, 132
IPv6 BGP configuration,
IPv6 BGP fake AS number advertisement, 117
IPv6 BGP route reflector configuration, 176
,
OSPF host route advertisement,
OSPF summary route advertisement,
applying
routing policy apply clause,
routing policy apply clause configuration,
area
OSPF area authentication configuration,
OSPF backbone,
OSPF network type configuration, 31
OSPF NSSA area,
OSPF NSSA area configuration, 30
,
OSPF stub area,
OSPF stub area configuration,
,
OSPF totally stub area,
OSPF virtual link configuration,
OSPFv3 area parameter configuration, 205
OSPFv3 NSSA area configuration,
OSPFv3 stub area configuration,
OSPFv3 virtual link configuration,
AS
BGP confederation,
BGP confederation compatibility, 135
BGP configuration,
BGP first AS number of EBGP route updates, 120
BGP MED attribute configuration, 109
BGP path AS_PATH attribute, 73
BGP path AS_SEQUENCE attribute,
250
BGP path AS_SET attribute,
IPv4 BGP 4-byte AS number suppression, 124
IPv4 BGP AS number substitution, 118
IPv4 BGP basic configuration,
IPv4 BGP BFD configuration, 169
IPv4 BGP COMMUNITY configuration),
IPv4 BGP confederation configuration,
IPv4 BGP configuration,
IPv4 BGP fake AS number advertisement,
IPv4 BGP GR configuration, 167
IPv4 BGP load balancing configuration,
IPv4 BGP local AS number
IPv4 BGP MED AS route comparison
(confederation peers), 112 , 112
IPv4 BGP MED AS route comparison (diff
IPv4 BGP MED AS route comparison
(per-AS),
IPv4 BGP MED default value, 109
IPv4 BGP path selection configuration, 164
IPv4 BGP private AS number removal,
IPv4 BGP route reflector configuration, 157
IPv4 BGP route summarization,
IPv4 BGP-IGP route redistribution,
IPv6 BGP 4-byte AS number suppression, 124
IPv6 BGP AS number substitution, 118
IPv6 BGP basic configuration,
IPv6 BGP BFD configuration, 178
IPv6 BGP configuration,
IPv6 BGP fake AS number advertisement,
IPv6 BGP MED AS route comparison
(confederation peers), 112 , 112
IPv6 BGP MED AS route comparison (diff
IPv6 BGP MED AS route comparison
(per-AS),
IPv6 BGP MED default value, 109
IPv6 BGP private AS number removal,
IPv6 BGP route reflector configuration, 176
OSPF AS External LSA,
routing policy AS_PATH list, 239
routing policy AS_PATH list configuration, 241
AS_PATH
BGP attribute configuration,
IPv4 BGP best route selection,
IPv6 BGP best route selection,
ASBR
OSPF redistributed route summarization on
ASBR,
OSPF router type,
attribute
BGP AS_PATH attribute,
BGP MED attribute configuration, 109
BGP path AS_PATH,
BGP path ORIGIN,
IPv4 BGP AS number substitution,
IPv4 BGP AS_PATH best route selection,
IPv4 BGP COMMUNITY configuration,
,
IPv4 BGP fake AS number advertisement, 117
IPv4 BGP local AS number appearance, 115 , 115
IPv4 BGP MED AS route comparison (confederation peers),
IPv4 BGP MED AS route comparison (diff ASs), 110
IPv4 BGP MED AS route comparison (per-AS),
IPv4 BGP MED default value,
IPv4 BGP private AS number removal, 119
IPv6 BGP AS number substitution,
IPv6 BGP AS_PATH best route selection,
IPv6 BGP fake AS number advertisement, 117
IPv6 BGP MED AS route comparison (confederation peers),
IPv6 BGP MED AS route comparison (diff ASs), 110
IPv6 BGP MED AS route comparison (per-AS),
IPv6 BGP MED default value,
IPv6 BGP private AS number removal, 119
MP-BGP MP_REACH_NLRI extended attribute, 81
MP-BGP MP_UNREACH_NLRI extended attribute,
authenticating
IPv4 BGP peer MD5 authentication,
IPv6 BGP peer MD5 authentication,
251
OSPF area authentication configuration, 43 , 43
authentication
automatic
IPv4 BGP route automatic summarization, 97
B backbone
OSPF router type,
backing up
bandwidth
BDR
BFD
OSPF election,
IPv4 BGP configuration,
IPv6 BGP configuration,
IPv6 static route BFD configuration, 191
IPv6 static route BFD control mode (direct next hop),
IPv6 static route BFD control mode (indirect next hop),
IPv6 static route BFD echo mode (single hop),
IPv6 static routing BFD (direct next hop), 195
IPv6 static routing BFD (indirect next hop),
OSPF detection (bidirectional control), 51
OSPF detection (single-hop echo), 51
,
static route BFD bidirectional control mode
static route BFD bidirectional control mode
(indirect next hop), 9 static route BFD configuration, 9
static route BFD single-hop echo mode,
static routing BFD configuration (direct next hop),
static routing BFD configuration (indirect next hop),
BGP,
, See also
AS_PATH attribute configuration,
basic configuration,
252
confederation,
confederation compatibility, 135
confederation configuration,
configuration,
,
default route advertisement to peer/peer group,
EBGP direct connections after link failure, 123
first AS number of EBGP route updates, 120
GR configuration,
GR helper configuration,
GR restarter configuration, 136
IPv4 EBGP peer protection (low memory exemption),
IPv6 EBGP peer protection (low memory exemption),
large scale network management,
large-scale network configuration, 132
load balancing,
MED attribute configuration,
message types,
MP-BGP,
MP-BGP extended attributes,
network optimization,
optimal route advertisement, 98
peer,
peer configuration,
route dampening,
route distribution control, 96
route recursion,
route reflection configuration, 133
,
route summarization,
session state change logging,
soft reset configuration,
TCP connection source interface, 93
trap enable,
troubleshooting, 182 troubleshooting peer connection state, 182
tuning network,
bidirectional
IPv6 static route BFD control mode (direct next hop),
IPv6 static route BFD control mode (indirect next hop),
IPv6 static route BFD echo mode (single hop),
OSPF BFD detection (bidirectional control), 51
OSPF BFD detection (single-hop echo),
static route BFD bidirectional control mode
static route BFD bidirectional control mode
Border Gateway Protocol. See
broadcast
OSPF network type,
OSPF network type configuration,
OSPF network type configuration for
OSPFv3 network type configuration,
OSPFv3 network type configuration (for interface),
C calculating
OSPF SPF calculation interval,
OSPFv3 SPF calculation interval,
checking
OSPFv3 DD packet ignore MTU check,
classless inter-domain routing. See CIDR community
BGP COMMUNITY path attribute, 73
IPv4 BGP COMMUNITY
,
IPv4 BGP ORIGINATOR_ID attribute,
IPv4 BGP route reflector configuration, 133
IPv6 BGP COMMUNITY configuration, 132
IPv6 BGP ORIGINATOR_ID attribute,
IPv6 BGP route reflector configuration, 133
routing policy community list configuration, 241
routing policy extended community list, 239
routing policy extended community list configuration,
routing policy list,
comparing
IPv4 BGP MED AS route comparison (confederation peers),
IPv4 BGP MED AS route comparison (diff ASs), 110
IPv4 BGP MED AS route comparison (per-AS),
IPv6 BGP MED AS route comparison (confederation peers),
IPv6 BGP MED AS route comparison (diff ASs), 110
IPv6 BGP MED AS route comparison (per-AS),
confederating
BGP confederation,
BGP confederation compatibility, 135
IPv4 BGP confederation configuration,
IPv4 BGP MED AS route comparison (confederation peers),
IPv6 BGP MED AS route comparison (confederation peers),
configuring
BGP AS_PATH attribute,
BGP confederation,
BGP confederation compatibility, 135
BGP MED attribute,
BGP peer,
BGP route filtering policies, 100
IP routing,
253
IP routing FIB route max lifetime, 4
IP routing max number ECMP routes, 5
IP routing RIB label max lifetime, 3
IP routing RIB route max lifetime, 3
IPv4 BGP,
IPv4 BGP AS number substitution, 118
IPv4 BGP basics,
,
IPv4 BGP COMMUNITY,
,
IPv4 BGP default local preference,
IPv4 BGP holdtime,
IPv4 BGP keepalive interval, 120
IPv4 BGP load balancing,
IPv4 BGP manual soft reset,
IPv4 BGP MED default value,
IPv4 BGP NEXT_HOP attribute, 113
IPv4 BGP path selection,
IPv4 BGP route automatic summarization, 97
IPv4 BGP route dampening,
IPv4 BGP route distribution filtering policies,
IPv4 BGP route manual summarization, 97
IPv4 BGP route preference,
IPv4 BGP route reception filtering policies, 103
,
IPv4 BGP route summarization,
IPv4 BGP route update interval,
IPv4 BGP-IGP route redistribution,
IPv4 IBGP peer group,
IPv6 BGP,
IPv6 BGP AS number substitution, 118
IPv6 BGP basics,
,
IPv6 BGP COMMUNITY,
IPv6 BGP default local preference,
IPv6 BGP holdtime,
IPv6 BGP keepalive interval, 120
IPv6 BGP load balancing,
IPv6 BGP manual soft reset,
IPv6 BGP MED default value,
IPv6 BGP NEXT_HOP attribute, 113
254
IPv6 BGP route distribution filtering policies, 100
IPv6 BGP route preference, 107
IPv6 BGP route reception filtering policies, 103
IPv6 BGP route update interval, 121
IPv6 EBGP peer group,
IPv6 IBGP peer group,
IPv6 node match criteria,
IPv6 PBR,
,
,
IPv6 PBR (local),
IPv6 PBR (local/packet type-based),
IPv6 static route BFD,
IPv6 static route BFD control mode (direct next
IPv6 static route BFD control mode (indirect next
IPv6 static route BFD echo mode (single hop),
IPv6 static routing basics, 194
IPv6 static routing BFD (direct next hop),
IPv6 static routing BFD (indirect next hop),
,
,
OSPF area,
OSPF area authentication,
,
OSPF authentication,
OSPF basics,
OSPF BFD,
OSPF BFD detection (bidirectional control), 51
OSPF BFD detection (single-hop echo), 51
OSPF broadcast network type for interface, 31
OSPF DD packet interface MTU, 43
OSPF default route redistribution, 37
OSPF exit overflow interval, 44
OSPF GR helper,
OSPF host route advertisement,
OSPF interface authentication,
OSPF LSDB max number external LSAs, 44
OSPF max number ECMP routes, 36
OSPF NBMA network type for interface,
OSPF network type,
OSPF NSSA area,
OSPF P2MP network type for interface, 32
OSPF P2P network type for interface,
OSPF packet DSCP value,
OSPF preference,
OSPF prefix prioritization,
OSPF prefix suppression (global),
OSPF prefix suppression (on interface),
OSPF received route filtering, 35
OSPF redistributed route default parameters,
OSPF redistributed route summarization on
OSPF route redistribution,
OSPF route redistribution from different routing
OSPF route summarization,
OSPF route summarization on ABR, 34
OSPF summary route advertisement,
,
OSPFv3 area parameter,
,
OSPFv3 DR election,
OSPFv3 GR,
OSPFv3 GR helper,
OSPFv3 Inter-Area-Prefix LSA filtering,
OSPFv3 interface DR priority,
OSPFv3 LSU transmit rate,
OSPFv3 max number ECMP routes, 209
OSPFv3 NBMA neighbor,
OSPFv3 network type (for interface),
OSPFv3 NSSA area,
OSPFv3 P2MP neighbor,
OSPFv3 preference,
OSPFv3 received route filtering, 208
OSPFv3 route redistribution, 210
,
OSPFv3 route summarization, 208
OSPFv3 stub area,
OSPFv3 virtual link,
PBR,
,
PBR (local),
PBR configuration (interface/packet
PBR configuration (local/packet type-based), 186
PBR node action,
PBR node match criteria,
routing policy apply clause,
routing policy AS_PATH list,
241 routing policy community list, 241
routing policy continue clause,
routing policy extended community list, 242
routing policy filter,
routing policy if-match clause, 243
routing policy IP prefix list,
routing policy IPv4 prefix list,
routing policy IPv6 prefix list,
static route BFD,
static route BFD bidirectional control mode (direct next hop),
static route BFD bidirectional control mode (indirect next hop),
static route BFD single-hop echo mode, 10
static routing BFD (direct next hop),
static routing BFD (indirect next hop),
static routing default route,
connecting
255
BGP TCP connection source interface,
EBGP direct connections after link failure,
continue clause (routing policy), 240
controlling
BGP path selection,
BGP route distribution,
IPv6 static route BFD control mode (direct next hop),
IPv6 static route BFD control mode (indirect next hop),
OSPFv3 route control configuration, 208
cost
OSPFv3 interface cost configuration, 209
creating
IPv6 node,
D dampening
BGP route dampening,
IPv4 BGP route dampening,
IPv6 BGP route dampening,
database
DD
OSPFv3 DD packet ignore MTU check,
default
BGP default route advertisement to peer/peer group,
IPv4 BGP default local preference,
IPv4 BGP MED default value,
IPv6 BGP default local preference,
IPv6 BGP MED default value,
IPv6 default route configuration, 201
OSPF default route redistribution, 37
OSPF redistributed route default parameters,
static route configuration. See under static routing delaying
OSPFv3 LSA transmission delay, 212
detecting
IPv4 BGP BFD configuration, 138
IPv6 BGP BFD configuration, 138
OSPF BFD configuration,
OSPF BFD detection (bidirectional control), 51
OSPF BFD detection (single-hop echo), 51
device
IPv4 BGP basic configuration, 141
IPv4 BGP BFD configuration, 169
IPv4 BGP COMMUNITY configuration, 154
IPv4 BGP confederation configuration,
IPv4 BGP configuration,
IPv4 BGP GR configuration,
IPv4 BGP load balancing configuration,
IPv4 BGP path selection configuration, 164
IPv4 BGP route reflector configuration, 157
IPv4 BGP route summarization,
IPv4 BGP-IGP route redistribution,
IPv6 BGP basic configuration, 172
IPv6 BGP BFD configuration, 178
IPv6 BGP configuration,
IPv6 BGP route reflector configuration, 176
IPv6 PBR configuration (local/packet
IPv6 static routing basics, 194
IPv6 static routing BFD (direct next hop),
IPv6 static routing BFD (indirect next hop),
OSPF basic configuration,
OSPF DR election configuration, 64
OSPF internal router type,
OSPF NSSA area configuration, 62
OSPF stub area configuration,
OSPF stub router configuration,
OSPF summary route advertisement,
OSPF virtual link configuration,
OSPFv3 BFD configuration,
OSPFv3 DR election configuration, 224
OSPFv3 NSSA area configuration,
OSPFv3 route redistribution, 227
256
OSPFv3 stub area configuration,
PBR configuration (interface/packet type-based),
PBR configuration (local/packet type-based),
static routing basic configuration, 11
static routing BFD configuration (direct next hop),
static routing BFD configuration (indirect next hop),
static routing configuration, 11
disabling
IPv4 BGP AS_PATH best route selection, 116
IPv4 BGP session establishment disable, 126
IPv6 BGP AS_PATH best route selection, 116
IPv6 BGP session establishment disable, 126
OSPF interface packet send/receive disable,
OSPFv3 interface packet send/receive,
displaying
IP routing table,
IPv4 BGP,
IPv6 BGP,
IPv6 static routing,
static routes,
distributing
BGP route distribution control, 96
IP routing extension attribute redistribution, 3
IP routing route redistribution, 3
IPv4 BGP-IGP route redistribution,
OSPFv3 route redistribution, 210
DR
OSPF DR election configuration, 64
OSPF election,
OSPFv3 DR election configuration,
OSPFv3 interface DR priority,
DSCP
OSPF packet DSCP value,
dynamic
IP routing dynamic routing protocols, 2
E
EBGP
BGP first AS number of route updates, 120
direct connections after link failure, 123
IPv4 BGP multiple hop EBGP session establishment,
IPv4 BGP private AS number removal from EBGP
IPv6 BGP multiple hop EBGP session establishment,
IPv6 BGP private AS number removal from EBGP
peer,
echo
IPv6 static route BFD echo mode (single hop),
static route BFD single-hop echo mode, 10
, See also
IP routing ECMP route max number configuration,
IP routing enhanced ECMP mode enable,
IPv4 BGP load balancing,
IPv6 BGP load balancing,
OSPF ECMP route max number, 36
OSPFv3 max number ECMP routes,
electing
OSPF DR election configuration, 64
OSPFv3 DR election configuration, 224
enabling
BGP session state change logging,
BGP trap,
EBGP direct connections after link failure, 123
IPv4 BGP 4-byte AS number suppression,
IPv4 BGP MED AS route comparison (confederation peers),
IPv4 BGP MED AS route comparison (diff ASs), 110
IPv4 BGP MED AS route comparison (per-AS),
IPv4 BGP multiple hop EBGP session establishment,
IPv4 BGP peer MD5 authentication,
IPv6 BGP 4-byte AS number suppression,
IPv6 BGP MED AS route comparison (confederation peers),
IPv6 BGP MED AS route comparison (diff ASs), 110
257
IPv6 BGP MED AS route comparison
(per-AS),
IPv6 BGP multiple hop EBGP session establishment,
IPv6 BGP peer MD5 authentication,
IPv6 BGP route refresh,
OSPF neighbor state change logging,
OSPF on network,
OSPF RFC 1583 compatibility,
OSPFv3 neighbor state change logging, 214
support for IPv6 routes with prefixes longer than
establishing
IPv4 BGP multiple hop EBGP session establishment,
IPv4 BGP session establishment disable, 126
IPv6 BGP multiple hop EBGP session establishment,
IPv6 BGP session establishment disable, 126
exchange routing information over TCP, 72
exit overflow interval (OSPF),
extending
MP-BGP MP_REACH_NLRI extended attribute,
MP-BGP MP_UNREACH_NLRI extended attribute,
Exterior Gateway Protocol. See EGP external
OSPF LSDB max number external LSAs, 44
F
FIB
IP routing table,
filtering
,
BGP route filtering policies,
IPv4 BGP basic configuration,
IPv4 BGP BFD configuration, 169
IPv4 BGP COMMUNITY configuration,
IPv4 BGP confederation configuration,
IPv4 BGP configuration,
IPv4 BGP GR configuration,
IPv4 BGP load balancing configuration,
IPv4 BGP path selection configuration, 164
IPv4 BGP route distribution filtering policies, 100
IPv4 BGP route reception filtering policies, 103
IPv4 BGP route reflector configuration, 157
IPv4 BGP route summarization,
IPv4 BGP-IGP route redistribution,
IPv6 BGP basic configuration, 172
IPv6 BGP BFD configuration, 178
IPv6 BGP configuration,
IPv6 BGP route distribution filtering policies, 100
IPv6 BGP route reception filtering policies, 103
IPv6 BGP route reflector configuration, 176
OSPF received route filtering, 35
OSPFv3 Inter-Area-Prefix LSA filtering, 209
OSPFv3 received route filtering, 208
routing policy apply clause configuration,
routing policy AS_PATH list,
routing policy AS_PATH list configuration,
routing policy community list, 239
routing policy community list configuration, 241
routing policy configuration, 239
,
routing policy continue clause configuration, 245
routing policy creation,
routing policy extended community list, 239
routing policy extended community list configuration,
routing policy filter configuration, 240
routing policy if-match clause configuration, 243
routing policy IP prefix list,
routing policy IP prefix list configuration,
forwarding
IPv6 PBR configuration,
,
IPv6 PBR configuration (local/packet
IPv6 PBR interface configuration,
IPv6 PBR local configuration, 235
IPv6 policy configuration, 234
OSPF GR helper configuration, 50
OSPF GR restarter configuration, 49
258
PBR configuration,
,
PBR configuration (interface), 186
PBR configuration (interface/packet type-based),
PBR configuration (local),
PBR configuration (local/packet type-based),
G generating
OSPFv3 LSA generation interval, 213
GR helper
OSPFv3 GR configuration,
OSPFv3 GR helper configuration,
GR restarter
OSPFv3 GR configuration,
Graceful Restart (GR),
, See also GR helper, GR restarter
IPv4 BGP GR configuration, 167
OSPF GR helper configuration, 50
OSPF GR restarter configuration,
OSPF trigger,
OSPFv3 GR configuration,
OSPFv3 GR helper configuration,
group
BGP peer group configuration, 88
H hello
OSPF hello packet,
holdtime
IPv4 BGP,
IPv6 BGP,
I
IBGP
BGP confederation,
IPv4 BGP ORIGINATOR_ID attribute,
IPv4 BGP route reflector configuration, 133
IPv6 BGP ORIGINATOR_ID attribute,
IPv6 BGP route reflector configuration, 133
peer,
ICMP
OSPF basic configuration,
,
,
OSPF DR election configuration, 64
OSPF NSSA area configuration, 62
OSPF stub area configuration,
OSPF summary route advertisement,
OSPF virtual link configuration,
IETF
OSPF GR helper,
ignoring
BGP first AS number of EBGP route updates, 120
IPv4 BGP ORIGINATOR_ID attribute,
IPv6 BGP ORIGINATOR_ID attribute,
OSPFv3 DD packet MTU check,
IGP
BGP ORIGIN path attribute, 73 , 73
IPv4 BGP-IGP route redistribution,
INCOMPLETE
Incremental Shortest Path First. Use ISPF
injecting
IPv4 BGP local network,
IPv6 BGP local network,
inter-area
OSPF route type,
interface
IPv6 PBR interface configuration,
PBR configuration (interface/packet
PBR interface configuration, 186
internal
BGP. See
OSPF router type,
INTERNET
BGP COMMUNITY path attribute,
259
interval
BGP soft reset,
IPv4 BGP keepalive interval, 120
IPv4 BGP route update interval,
IPv6 BGP keepalive interval, 120
IPv6 BGP route update interval,
OSPF exit overflow interval,
OSPF LSA arrival interval,
OSPF LSA generation interval, 41
OSPF SPF calculation interval,
OSPFv3 LSA generation interval, 213
OSPFv3 LSU transmit rate,
OSPFv3 SPF calculation interval,
intra-area
OSPF route type,
IP routing
BGP AS_PATH attribute configuring, 115
BGP confederation compatibility,
BGP confederation configuration,
,
BGP default route advertisement to peer/peer group,
BGP first AS number of EBGP route updates,
BGP GR helper configuration,
BGP GR restarter configuration, 136
BGP large scale network management,
BGP large-scale network configuration, 132
BGP load balancing,
BGP network optimization,
BGP optimal route advertisement, 98
BGP path selection,
BGP peer configuration,
BGP peer group configuration, 88
BGP route dampening,
BGP route distribution,
BGP route filtering policies,
260
BGP route recursion,
BGP route reflection configuration,
,
BGP route summarization,
BGP session state change logging,
BGP soft reset configuration, 127
BGP TCP connection source interface, 93
configuration,
displaying routing table,
ECMP route max number configuration, 5
enhanced ECMP mode enable,
extension attribute redistribution,
FIB route max lifetime,
IPv4. See
IPv6 default route. See under IPv6 static routing
IPv6 policy-based routing. See IPv6 PBR
IPv6 static routing. See
maintaining routing table,
OSPF area authentication configuration,
OSPF authentication configuration,
OSPF BFD configuration,
OSPF DD packet interface MTU, 43
OSPF interface packet send/receive disable,
OSPF stub router configuration,
OSPF timer configuration,
OSPFv3 area parameter configuration, 205
OSPFv3 BFD configuration,
,
,
OSPFv3 DD packet ignore MTU check, 213
OSPFv3 DR election configuration, 224
OSPFv3 GR helper,
OSPFv3 Inter-Area-Prefix LSA filtering, 209
OSPFv3 interface cost configuration,
OSPFv3 interface DR priority,
OSPFv3 interface packet send/receive disable,
OSPFv3 LSA generation interval,
OSPFv3 LSA transmission delay,
OSPFv3 max number ECMP routes, 209
OSPFv3 NBMA neighbor configuration, 207
OSPFv3 neighbor state change logging, 214
OSPFv3 network optimization, 211
OSPFv3 network type configuration,
OSPFv3 network type configuration (for interface),
OSPFv3 NSSA area configuration,
OSPFv3 P2MP neighbor configuration,
OSPFv3 preference configuration,
OSPFv3 received route filtering, 208
OSPFv3 route control configuration, 208
OSPFv3 route redistribution, 210
OSPFv3 route redistribution configuration, 227
OSPFv3 route summarization,
OSPFv3 SPF calculation interval,
OSPFv3 stub area configuration, 205 ,
OSPFv3 timer configuration, 211
OSPFv3 virtual link configuration, 206
PBR interface configuration, 186
PBR local configuration,
policy apply clause configuration,
policy AS_PATH list configuration,
policy community list configuration,
,
policy continue clause configuration,
policy creation,
policy extended community list
policy filter configuration, 240
policy filtering,
policy if-match clause configuration, 243
policy IP prefix list configuration,
policy-based routing. See
RIB label max lifetime,
RIB route max lifetime, 3 route backup, 3
route preference,
route recursion, 3 route redistribution, 3
static route BFD bidirectional control mode
static route BFD bidirectional control mode (indirect next hop),
static route BFD configuration,
static route BFD single-hop echo mode, 10
static routing basic configuration,
static routing BFD configuration (direct next hop),
static routing BFD configuration (indirect next
static routing configuration, 8
,
static routing default route configuration,
support for IPv6 routes with prefixes longer than 64 bits,
IP services
OSPF basic configuration,
,
,
OSPF DR election configuration, 64
OSPF NSSA area configuration, 62
OSPF stub area configuration,
OSPF summary route advertisement,
OSPF virtual link configuration,
IPv4
FIB route max lifetime,
OSPF basic configuration,
,
,
OSPF DR election configuration, 64
OSPF NSSA area configuration, 62
OSPF stub area configuration,
OSPF summary route advertisement,
OSPF virtual link configuration,
RIB label max lifetime,
RIB route max lifetime,
routing policy ACLs, 239 routing policy configuration, 239
routing policy IP prefix list configuration,
routing policy prefix list,
IPv4 BGP
4-byte AS number suppression, 124
AS number substitution,
AS_PATH best route selection,
BGP-IGP route redistribution, 145
261
COMMUNITY configuration,
,
confederation configuration,
default route advertisement to peer/peer group,
fake AS number advertisement,
holdtime,
load balancing configuration,
local AS number appearance,
,
local network injection,
manual soft reset configuration,
MED AS route comparison (confederation
MED AS route comparison (diff ASs), 110
MED AS route comparison (per-AS), 111
multiple hop EBGP session establishment,
path selection configuration, 164
peer configuration,
private AS number removal,
received route preferred value,
route automatic summarization, 97
route dampening,
route distribution filtering policies,
route manual summarization, 97
route preference configuration,
route reception filtering policies, 103
route reflector configuration, 133
route update interval,
routes received from peer/peer group,
session establishment disable, 126
IPv4 EBGP
peer protection (low memory exemption),
IPv4 IBGP
IPv6
FIB route max lifetime,
OSPFv3 area parameter configuration, 205
OSPFv3 BFD configuration,
,
,
OSPFv3 DD packet ignore MTU check, 213
OSPFv3 DR election configuration, 224
OSPFv3 GR helper,
OSPFv3 Inter-Area-Prefix LSA filtering, 209
OSPFv3 interface cost configuration,
OSPFv3 interface DR priority,
OSPFv3 interface packet send/receive disable,
OSPFv3 LSA generation interval,
OSPFv3 LSA transmission delay,
OSPFv3 max number ECMP routes,
OSPFv3 NBMA neighbor configuration, 207
OSPFv3 neighbor state change logging,
OSPFv3 network optimization, 211
OSPFv3 network type configuration, 206
OSPFv3 network type configuration (for
OSPFv3 NSSA area configuration,
OSPFv3 P2MP neighbor configuration, 207
OSPFv3 preference,
OSPFv3 received route filtering, 208
OSPFv3 route control configuration,
OSPFv3 route redistribution, 210
OSPFv3 route redistribution configuration, 227
OSPFv3 route summarization, 208
OSPFv3 SPF calculation interval,
OSPFv3 stub area configuration,
OSPFv3 timer configuration,
OSPFv3 virtual link configuration,
policy-based routing. See IPv6 PBR
RIB label max lifetime,
RIB route max lifetime,
routing policy ACLs, 239 routing policy configuration, 239
routing policy IP prefix list configuration,
262
routing policy prefix list, 239
IPv6 BGP
4-byte AS number suppression,
AS_PATH best route selection, 116
basic configuration,
BFD configuration,
,
COMMUNITY configuration,
default route advertisement to peer/peer group,
fake AS number advertisement,
holdtime,
local network injection,
manual soft reset configuration,
MED AS route comparison (confederation
MED AS route comparison (diff ASs), 110
MED AS route comparison (per-AS), 111
multiple hop EBGP session establishment,
peer configuration,
private AS number removal,
received route preferred value,
route dampening,
route distribution filtering policies,
route preference,
route reception filtering policies, 103
route reflector configuration, 133
route update interval,
routes received from peer/peer group,
session establishment disable, 126
IPv6 EBGP
peer protection (low memory exemption),
IPv6 IBGP
IPv6 PBR apply clause,
configuration,
,
,
configuration (local/packet type-based),
if-match clause,
interface configuration,
IPv6 node action configuration,
IPv6 node match criteria configuration,
IPv6 policy configuration, 234
match mode/node clause relationship,
IPv6 static routing
BFD configuration (direct next hop), 195
BFD configuration (indirect next hop), 198
configuration,
,
default route configuration, 201
route BFD control mode (direct next hop), 192
route BFD control mode (indirect next hop),
route BFD echo mode (single hop),
ISPF
OSPF ISPF enable,
K keepalive
IPv4 BGP keepalive interval,
IPv4 BGP route update interval, 121
IPv6 BGP keepalive interval,
IPv6 BGP route update interval, 121
L label
IP routing RIB label max lifetime,
level
IPv4 EBGP peer protection (level 2 threshold exemption),
263
IPv6 EBGP peer protection (level 2 threshold exemption),
limiting
IPv4 BGP routes received from peer/peer group,
IPv6 BGP routes received from peer/peer group,
link
EBGP direct connection after link failure,
IPv4 BGP BFD configuration, 138
IPv6 BGP BFD configuration, 138
OSPF BFD configuration,
OSPF virtual link configuration,
OSPFv3 virtual link configuration, 206
list
routing policy AS_PATH list, 239
routing policy AS_PATH list configuration, 241
routing policy community list,
routing policy community list configuration, 241
routing policy extended community list,
routing policy extended community list
routing policy IP prefix list, 239
routing policy IP prefix list configuration, 240
IP routing ECMP route max number
IP routing enhanced ECMP mode enable, 5
IPv4 BGP,
IPv4 BGP load balancing configuration,
IPv6 BGP,
OSPF ECMP route max number, 36
OSPFv3 max number ECMP routes, 209
load sharing
IP routing load sharing,
local
BGP LOCAL_PREF path attribute, 73
IPv4 BGP default local preference,
IPv6 BGP default local preference,
IPv6 PBR configuration (local/packet type-based),
IPv6 PBR local configuration,
PBR configuration (local/packet type-based),
264
logging
BGP session state change logging,
OSPF neighbor state change,
OSPFv3 neighbor state change logging,
LSA
OSPF exit overflow interval, 44
OSPF LSA generation interval,
OSPF LSA retransmission packet timer,
OSPF LSA transmission delay,
OSPF LSDB max number external LSAs,
OSPF network summary LSA,
OSPFv3 AS external LSA,
OSPFv3 inter-area-prefix LSA, 202
OSPFv3 Inter-Area-Prefix LSA filtering, 209
OSPFv3 inter-area-router LSA, 202
OSPFv3 intra-area-prefix LSA,
OSPFv3 LSA generation interval, 213
OSPFv3 LSA transmission delay,
OSPFv3 router LSA,
LSAck
OSPF LSAck packet,
OSPFv3 packet type,
LSDB
OSPF LSDB max number external LSAs,
LSR
OSPF LSR packet,
OSPFv3 packet type,
LSU
OSPFv3 packet type,
M maintaining
IP routing table,
IPv4 BGP,
IPv6 BGP,
managing
BGP large scale network management,
manual
IPv4 BGP route manual summarization, 97
matching
PBR if-match clause,
PBR node match criteria,
PBR permit match mode,
routing policy if-match clause,
routing policy if-match clause
MD5
IPv4 BGP peer MD5 authentication,
MED
IPv6 BGP peer MD5 authentication,
BGP MED attribute configuration,
IPv4 BGP MED AS route comparison
IPv4 BGP MED AS route comparison (diff
IPv4 BGP MED AS route comparison
(per-AS),
IPv4 BGP MED default value, 109
IPv6 BGP MED AS route comparison
IPv6 BGP MED AS route comparison (diff
IPv6 BGP MED AS route comparison
(per-AS),
IPv6 BGP MED default value, 109
memory
IPv4 EBGP peer protection (low memory exemption),
IPv6 EBGP peer protection (low memory exemption),
message
BGP notification,
mode enhanced ECMP mode enable,
IPv6 static route BFD control mode (direct next
IPv6 static route BFD control mode (indirect next
IPv6 static route BFD echo mode (single hop),
PBR deny match mode,
PBR permit match mode,
routing policy deny match, 240 routing policy permit match, 240
static route BFD bidirectional control mode (direct next hop),
static route BFD bidirectional control mode (indirect next hop),
static route BFD single-hop echo mode, 10
MP_REACH_NLRI (MP-BGP),
MP_UNREACH_NLRI (MP-BGP),
MP-BGP,
, See also
address family,
BGP configuration,
IPv4 BGP basic configuration, 141
IPv4 BGP BFD configuration, 169
IPv4 BGP COMMUNITY configuration, 154
IPv4 BGP confederation configuration,
IPv4 BGP configuration,
IPv4 BGP GR configuration,
IPv4 BGP load balancing configuration,
IPv4 BGP path selection configuration, 164
IPv4 BGP route reflector configuration, 157
IPv4 BGP route summarization,
IPv4 BGP-IGP route redistribution,
IPv6 BGP basic configuration, 172
IPv6 BGP BFD configuration, 178
IPv6 BGP configuration,
IPv6 BGP route reflector configuration, 176
265
overview,
MTU
OSPF DD packet interface MTU,
OSPFv3 DD packet ignore MTU check,
multicast
OSPF network type,
Multiprotocol Extensions for BGP-4. See MP-BGP
N
NBMA
OSPF network type,
OSPF network type configuration,
OSPF network type configuration for
OSPFv3 NBMA neighbor configuration, 207
OSPFv3 network type configuration,
OSPFv3 network type configuration (for interface),
neighbor
IPv4 BGP BFD configuration, 138
IPv6 BGP BFD configuration, 138
OSPF neighbor state change logging,
neighbor discovery
OSPFv3 configuration,
,
OSPFv3 DR election configuration,
OSPFv3 NBMA neighbor configuration, 207
OSPFv3 neighbor state change logging, 214
OSPFv3 NSSA area configuration,
OSPFv3 P2MP neighbor configuration,
OSPFv3 route control configuration, 208
OSPFv3 route redistribution, 227
OSPFv3 stub area configuration,
network
BGP basic configuration,
,
,
BGP default route advertisement to peer/peer group,
BGP GR helper configuration,
BGP GR restarter configuration, 136
BGP large-scale network configuration, 132
BGP load balancing,
266
BGP MED attribute,
BGP optimal route advertisement rules, 98
BGP peer group configuration,
BGP route filtering policies, 100
BGP route generation,
BGP route recursion,
BGP route reflection configuration,
,
BGP route summarization,
BGP session state change logging,
BGP TCP connection source interface, 93
IP routing dynamic routing protocols, 2
IP routing ECMP route max number configuration,
IP routing enhanced ECMP mode enable,
IP routing extension attribute redistribution, 3
IP routing FIB route max lifetime, 4
IP routing RIB label max lifetime,
IP routing RIB route max lifetime, 3
IP routing route preference, 2
IP routing route redistribution, 3
IP routing support for IPv6 routes with prefixes
IPv4 BGP 4-byte AS number suppression,
IPv4 BGP AS number substitution,
IPv4 BGP AS_PATH best route selection,
IPv4 BGP BFD configuration, 138
IPv4 BGP community configuration,
IPv4 BGP default local preference,
IPv4 BGP fake AS number advertisement, 117
IPv4 BGP IGP route redistribution, 95
IPv4 BGP keepalive interval,
IPv4 BGP load balancing,
IPv4 BGP local AS number
IPv4 BGP local network injection,
IPv4 BGP manual soft reset,
IPv4 BGP multiple hop EBGP session establishment,
IPv4 BGP NEXT_HOP attribute, 113
IPv4 BGP ORIGINATOR_ID attribute, 134
IPv4 BGP peer MD5 authentication,
IPv4 BGP private AS number removal,
IPv4 BGP received route preferred value, 106
IPv4 BGP route dampening,
IPv4 BGP route distribution filtering policies,
IPv4 BGP route preference,
IPv4 BGP route reception filtering policies, 103
IPv4 BGP route reflector configuration, 133
IPv4 BGP route update interval,
IPv4 BGP route update save, 128
IPv4 BGP route-refresh,
IPv4 BGP routes received from peer/peer group,
IPv4 BGP session establishment disable, 126
IPv6 BGP 4-byte AS number suppression, 124
IPv6 BGP AS number substitution, 118
IPv6 BGP AS_PATH best route selection, 116
IPv6 BGP BFD configuration, 138
IPv6 BGP COMMUNITY configuration,
IPv6 BGP default local preference,
IPv6 BGP fake AS number advertisement,
IPv6 BGP holdtime,
IPv6 BGP IGP route redistribution, 95
IPv6 BGP keepalive interval, 120
IPv6 BGP load balancing,
IPv6 BGP local network injection,
IPv6 BGP manual soft reset,
IPv6 BGP multiple hop EBGP session establishment,
IPv6 BGP NEXT_HOP attribute, 113
IPv6 BGP ORIGINATOR_ID attribute, 134
IPv6 BGP peer MD5 authentication,
IPv6 BGP private AS number removal,
IPv6 BGP received route preferred value, 106
IPv6 BGP route dampening,
IPv6 BGP route distribution filtering policies,
267
IPv6 BGP route preference, 107
IPv6 BGP route reception filtering policies, 103
IPv6 BGP route reflector configuration, 133
IPv6 BGP route update interval, 121
IPv6 BGP route update save,
IPv6 BGP routes received from peer/peer group, 99
IPv6 BGP session establishment disable,
IPv6 node match criteria,
IPv6 PBR configuration,
IPv6 PBR interface configuration,
IPv6 PBR local configuration, 235
IPv6 policy configuration, 234
IPv6 static route BFD configuration,
IPv6 static route BFD control mode (direct next
IPv6 static route BFD control mode (indirect next
IPv6 static route BFD echo mode (single hop),
IPv6 static route configuration, 191
MP-BGP,
OSPF area authentication configuration,
OSPF BFD configuration,
OSPF BFD detection (bidirectional control), 51
OSPF BFD detection (single-hop echo), 51
OSPF broadcast network type configuration for
OSPF DD packet interface MTU, 43
OSPF default route redistribution, 37
OSPF ECMP route max number, 36
OSPF exit overflow interval, 44
OSPF GR helper configuration, 50
OSPF GR restarter configuration, 49
OSPF host route advertisement,
OSPF interface cost,
OSPF interface packet send/receive disable,
OSPF ISPF enable,
OSPF LSA generation interval,
OSPF LSA transmission delay,
OSPF LSDB max number external LSAs,
OSPF NBMA network type configuration for
OSPF neighbor state change logging,
OSPF network LSA,
OSPF network type configuration,
OSPF NSSA area configuration,
OSPF P2MP network type configuration for
OSPF P2P network type configuration for
OSPF packet DSCP value,
OSPF PIC configuration,
OSPF preference,
OSPF prefix prioritization,
OSPF received route filtering, 35
OSPF redistributed route default parameters,
OSPF redistributed route summarization on
OSPF RFC 1583 compatibility,
OSPF route control configuration, 33
OSPF route redistribution,
OSPF route redistribution from different routing
OSPF route summarization configuration, 34
OSPF route summarization on ABR, 34
OSPF SPF calculation interval,
OSPF stub area configuration,
OSPF stub router configuration, 42
OSPF tuning,
OSPF virtual link configuration,
OSPFv3 area parameter configuration,
OSPFv3 DD packet ignore MTU check,
OSPFv3 GR,
OSPFv3 GR helper,
OSPFv3 Inter-Area-Prefix LSA filtering,
268
OSPFv3 interface cost configuration,
OSPFv3 interface DR priority,
OSPFv3 interface packet send/receive disable,
OSPFv3 LSA generation interval,
OSPFv3 LSA transmission delay,
OSPFv3 max number ECMP routes,
OSPFv3 NBMA neighbor configuration, 207
OSPFv3 neighbor state change logging,
OSPFv3 network type configuration, 206
OSPFv3 network type configuration (for
OSPFv3 NSSA area configuration,
OSPFv3 P2MP neighbor configuration, 207
OSPFv3 preference configuration, 210
OSPFv3 received route filtering, 208
OSPFv3 route control configuration,
OSPFv3 route redistribution, 210
OSPFv3 route summarization, 208
OSPFv3 SPF calculation interval,
OSPFv3 stub area configuration,
OSPFv3 timer configuration,
OSPFv3 virtual link configuration,
PBR node action,
PBR node match criteria,
PBR policy configuration,
routing policy apply clause configuration,
routing policy AS_PATH list configuration,
241 routing policy community list configuration, 241
routing policy configuration, 242
routing policy continue clause configuration, 245
routing policy creation,
routing policy extended community list configuration,
routing policy filter configuration, 240
routing policy if-match clause configuration, 243
routing policy IP prefix list configuration,
static route BFD bidirectional control mode (direct next hop),
static route BFD bidirectional control mode (indirect next hop),
static route BFD configuration,
static route BFD single-hop echo mode, 10
tuning BGP,
network management
,
BGP large scale networks,
IPv4 BGP basic configuration,
IPv4 BGP BFD configuration, 169
IPv4 BGP COMMUNITY configuration,
IPv4 BGP confederation configuration,
IPv4 BGP configuration,
IPv4 BGP GR configuration, 167
IPv4 BGP load balancing configuration,
IPv4 BGP path selection configuration, 164
IPv4 BGP route reflector configuration, 157
IPv4 BGP route summarization,
IPv4 BGP-IGP route redistribution,
IPv6 BGP basic configuration,
IPv6 BGP BFD configuration, 178
IPv6 BGP configuration,
IPv6 BGP route reflector configuration, 176
IPv6 default route configuration, 201
IPv6 PBR configuration (local/packet type-based),
IPv6 static routing basic configuration, 194
IPv6 static routing BFD (direct next hop), 195
IPv6 static routing BFD (indirect next hop),
IPv6 static routing configuration, 191
,
OSPF DR election configuration, 64
OSPF NSSA area configuration,
OSPF route redistribution,
OSPF stub area configuration,
OSPF summary route advertisement,
OSPF virtual link configuration,
OSPFv3 configuration,
,
OSPFv3 DR election configuration,
OSPFv3 network optimization, 211
OSPFv3 NSSA area configuration,
OSPFv3 route redistribution, 227
OSPFv3 stub area configuration,
PBR configuration,
,
PBR configuration (interface/packet
PBR configuration (local/packet type-based), 186
routing policy configuration, 239
static routing basic configuration,
static routing BFD configuration (direct next hop),
static routing BFD configuration (indirect next
static routing configuration, 8
,
static routing default route configuration,
NEXT_HOP
BGP path attribute,
IPV4 BGP NEXT_HOP attribute configuration,
IPV6 BGP NEXT_HOP attribute configuration,
NO_ADVERTISE
BGP COMMUNITY path attribute,
NO_EXPORT
BGP COMMUNITY path attribute,
NO_EXPORT_SUBCONFED
BGP COMMUNITY path attribute,
node
IPv6 node match criteria configuration,
PBR creation,
PBR if-match clause,
PBR node action,
routing policy apply clause,
routing policy apply clause configuration,
routing policy continue clause,
routing policy continue clause configuration, 245
routing policy if-match clause, 240
routing policy if-match clause configuration, 243
non-IETF
OSPF GR helper,
notifying
NSSA
269
OSPF NSSA area,
OSPF NSSA area configuration,
OSPF totally NSSA area,
OSPFv3 NSSA area configuration,
number
BGP first AS number of EBGP route updates,
IPv4 BGP 4-byte AS number suppression, 124
IPv4 BGP AS number substitution, 118
IPv4 BGP fake AS number advertisement,
IPv4 BGP local AS number
IPv4 BGP private AS number removal,
IPv6 BGP 4-byte AS number suppression, 124
IPv6 BGP AS number substitution, 118
IPv6 BGP fake AS number advertisement,
IPv6 BGP private AS number removal,
O open
BGP message,
Open Shortest Path First. Use OSPF
Open Shortest Path First version 3. Use
optimal
optimizing
ORIGIN
area authentication configuration,
,
areas,
basic configuration,
BDR election,
BFD configuration,
BFD detection (bidirectional control), 51
BFD detection (single-hop echo),
broadcast network type configuration for
,
,
270 configuring authentication,
DD packet interface MTU add,
default route redistribution,
DR election configuration,
ECMP route max number configuration, 36
exit overflow interval,
GR configuration,
GR helper configuration,
GR restarter configuration, 49
GR trigger,
interface authentication configuration, 42
interface cost configuration, 35
interface enable,
interface packet send/receive disable,
ISPF enable,
LSA arrival interval,
LSDB max number external LSAs, 44
LSU transmit rate,
NBMA network type configuration for interface, 32
neighbor state change logging, 45
network enable,
network management,
network optimization,
network type configuration,
,
P2MP network type configuration for interface, 32
P2P network type configuration for interface,
packet DSCP value configuration,
packet types,
prefix suppression,
prefix suppression (global configuration),
prefix suppression (interface configuration), 48
received route filtering configuration, 35
redistributed route default parameters, 38
redistributed route summarization on ASBR,
RFC 1583 compatibility,
route calculation,
route control configuration, 33
route redistribution configuration,
route redistribution from different routing
route summarization configuration,
route summarization on ABR,
SPF calculation interval,
stub area,
stub area configuration,
,
stub router configuration,
summary route advertisement, 57
totally stub area,
troubleshooting configuration, 70
troubleshooting incorrect routing
troubleshooting no neighbor relationship established,
Type-3 LSA filtering configuration,
virtual link configuration,
area parameter configuration, 205
BFD configuration,
,
DD packet ignore MTU check, 213
DR election configuration, 224
enable,
Inter-Area-Prefix LSA filtering, 209
interface cost configuration,
interface DR priority,
interface packet send/receive disable,
LSU transmit rate,
max number ECMP routes,
NBMA neighbor configuration,
neighbor state change logging, 214
network optimization,
network type configuration,
network type configuration (for interface), 207
NSSA area configuration, 205 ,
P2MP neighbor configuration,
packet types,
preference configuration,
received route filtering, 208 route control configuration, 208
route redistribution configuration,
route summarization,
stub area configuration, 205 ,
virtual link configuration, 206
P
P2MP
P2P
OSPF network type configuration for interface, 32
OSPFv3 P2MP neighbor configuration, 207
OSPF network type configuration, 31
OSPF network type configuration for interface, 33
OSPFv3 network type configuration, 206
OSPFv3 network type configuration (for
packet
IP routing configuration,
IP routing dynamic routing protocols,
IP routing ECMP route max number configuration,
IP routing extension attribute redistribution, 3
271
IP routing route preference, 2
IP routing route redistribution, 3
,
IPv6 PBR configuration (local/packet type-based),
IPv6 PBR interface configuration, 236
IPv6 PBR local configuration,
IPv6 policy configuration, 234
OSPF area authentication configuration, 43 , 43
OSPF BFD configuration,
OSPF DD packet interface MTU,
OSPF exit overflow interval,
OSPF GR helper configuration, 50
OSPF GR restarter configuration,
OSPF interface packet send/receive disable,
OSPF LSDB max number external LSAs, 44
OSPF packet DSCP value,
OSPF RFC 1583 compatibility,
OSPF stub router configuration, 42
OSPFv3 configuration,
,
OSPFv3 DD,
OSPFv3 DD packet ignore MTU check,
OSPFv3 DR election configuration,
OSPFv3 interface packet send/receive disable,
OSPFv3 LSU transmit rate,
OSPFv3 NSSA area configuration,
OSPFv3 route redistribution, 227
OSPFv3 stub area configuration,
PBR configuration,
,
,
,
PBR configuration (interface/packet
PBR configuration (local/packet type-based), 186
PBR interface configuration, 186
PBR policy configuration,
parameter
OSPF redistributed route default parameters, 38
OSPFv3 area parameter configuration, 205
path
BGP MED attribute configuration, 109
IPv4 BGP COMMUNITY configuration, 154
IPv4 BGP MED AS route comparison (confederation peers),
IPv4 BGP MED AS route comparison (diff ASs), 110
IPv4 BGP MED AS route comparison (per-AS),
IPv4 BGP MED default value,
IPv4 BGP NEXT_HOP attribute,
IPv4 BGP path selection configuration,
IPv6 BGP MED AS route comparison (confederation peers),
IPv6 BGP MED AS route comparison (diff ASs), 110
IPv6 BGP MED AS route comparison (per-AS),
IPv6 BGP MED default value,
IPv6 BGP NEXT_HOP attribute,
PBR configuration,
,
configuration (interface/packet type-based), 188
configuration (local/packet type-based),
interface configuration,
node action configuration,
node match criteria,
policy configuration,
peer
272
BGP default route advertisement to peer/peer group,
BGP peer group configuration, 88
IPv4 BGP configuration,
IPv4 BGP MED AS route comparison
IPv4 BGP peer MD5 authentication,
IPv4 BGP session establishment disable, 126
IPv4 EBGP peer group configuration, 89
IPv4 EBGP peer protection (low memory exemption),
IPv4 IBGP peer group configuration,
IPv6 BGP configuration,
IPv6 BGP MED AS route comparison
IPv6 BGP peer MD5 authentication,
IPv6 BGP session establishment disable, 126
IPv6 EBGP peer group configuration, 89
permitting
IPv4 BGP local AS number
PIC
IPv6 EBGP peer protection (low memory exemption),
IPv6 IBGP peer group configuration,
policy
BGP route filtering policy, 100
IPv4 BGP route distribution filtering policy, 100
IPv4 BGP route reception filtering policy, 103
IPv6 BGP route distribution filtering policy, 100
IPv6 BGP route reception filtering policy, 103
,
IPv6 PBR configuration (local/packet type-based),
IPv6 PBR if- apply clause,
IPv6 PBR interface configuration, 236
IPv6 PBR local configuration,
IPv6 PBR match mode/node clause
IPv6 policy configuration, 234
PBR,
PBR configuration,
,
,
,
PBR configuration (interface/packet
PBR configuration (local/packet type-based), 186
PBR interface configuration, 186
PBR node action,
PBR node match criteria,
routing policy apply clause configuration,
routing policy AS_PATH list configuration,
241 routing policy community list configuration, 241
routing policy configuration, 239
,
routing policy continue clause configuration, 245
routing policy creation,
routing policy extended community list configuration,
routing policy filter configuration, 240
routing policy filtering,
routing policy if-match clause configuration, 243
routing policy IP prefix list configuration,
poll packet timer (OSPF),
preference
IP routing route preference, 2
OSPF default route redistribution, 37
OSPF host route advertisement,
OSPF protocol preference configuration, 37
OSPF redistributed route default parameters, 38
OSPF route redistribution configuration, 37
OSPF route redistribution configuration from
different routing protocol, 37
OSPFv3 preference configuration, 210
preferred value
prefix
OSPF prefix prioritization,
routing policy IP prefix list,
routing policy IP prefix list configuration,
Prefix Independent Convergence. Use PIC
prioritizing
273
OSPF prefix prioritization,
priority
OSPFv3 interface DR priority,
procedure advertising BGP default route to peer/peer group,
advertising IPv4 BGP fake AS number, 117 advertising IPv6 BGP fake AS number, 117
configuring an IPv6 BGP peer,
configuring BGP,
configuring BGP AS_PATH attribute, 115
configuring BGP basics,
configuring BGP confederation, 135
configuring BGP confederation compatibility,
configuring BGP GR, 136 configuring BGP GR helper, 136
configuring BGP GR restarter,
configuring BGP large-scale network,
configuring BGP MED attribute, 109
configuring BGP peer group, 88
configuring BGP route filtering policies,
configuring BGP route reflection, 133
configuring BGP route summarization, 97
configuring BGP soft reset,
configuring IP routing FIB route max lifetime,
configuring IP routing max number ECMP routes,
configuring IP routing RIB label max lifetime, 3 configuring IP routing RIB route max lifetime, 3
configuring IPv4 BGP,
configuring IPv4 BGP AS number
configuring IPv4 BGP basics,
configuring IPv4 BGP BFD,
,
configuring IPv4 BGP COMMUNITY, 132
,
configuring IPv4 BGP confederation, 160
configuring IPv4 BGP default local
configuring IPv4 BGP holdtime,
120 configuring IPv4 BGP keepalive interval, 120
configuring IPv4 BGP load balancing, 151
274 configuring IPv4 BGP MED default value,
configuring IPv4 BGP NEXT_HOP attribute,
configuring IPv4 BGP path selection, 164
configuring IPv4 BGP peer,
configuring IPv4 BGP route automatic
configuring IPv4 BGP route dampening,
configuring IPv4 BGP route distribution filtering policies,
configuring IPv4 BGP route manual
configuring IPv4 BGP route preference,
configuring IPv4 BGP route reception filtering policies,
configuring IPv4 BGP route reflector, 133
configuring IPv4 BGP route summarization,
configuring IPv4 BGP route update interval, 121
configuring IPv4 BGP soft reset manually,
configuring IPv4 BGP-IGP route redistribution,
configuring IPv4 EBGP peer group, 89
configuring IPv4 IBGP peer group,
configuring IPv6 BGP AS number substitution,
configuring IPv6 BGP basics,
configuring IPv6 BGP COMMUNITY,
configuring IPv6 BGP default local preference,
configuring IPv6 BGP holdtime,
configuring IPv6 BGP keepalive interval,
configuring IPv6 BGP load balancing,
configuring IPv6 BGP MED default value,
configuring IPv6 BGP NEXT_HOP attribute,
configuring IPv6 BGP route dampening,
configuring IPv6 BGP route distribution filtering policies,
configuring IPv6 BGP route preference,
configuring IPv6 BGP route reception filtering policies,
configuring IPv6 BGP route reflector, 133
configuring IPv6 BGP route update interval, 121
configuring IPv6 BGP soft reset manually,
configuring IPv6 EBGP peer group, 89
configuring IPv6 IBGP peer group,
configuring IPv6 node action, 235
configuring IPv6 node match criteria,
,
configuring IPv6 PBR (interface),
configuring IPv6 PBR (local), 235
configuring IPv6 PBR (local/packet type-based),
configuring IPv6 policy,
configuring IPv6 static route,
191 configuring IPv6 static route BFD, 191
configuring IPv6 static route BFD control mode
configuring IPv6 static route BFD control mode
configuring IPv6 static route BFD echo mode
(single hop),
configuring IPv6 static routing, 194 configuring IPv6 static routing basics, 194
configuring IPv6 static routing BFD (direct next hop),
configuring IPv6 static routing BFD (indirect next hop),
configuring OSPF area,
configuring OSPF area authentication,
,
,
configuring OSPF authentication, 42
configuring OSPF BFD,
configuring OSPF BFD detection (bidirectional
configuring OSPF BFD detection (single-hop echo),
configuring OSPF broadcast network type for
configuring OSPF DD packet interface MTU,
configuring OSPF default route redistribution,
configuring OSPF DR election,
configuring OSPF exit overflow interval,
configuring OSPF GR,
configuring OSPF GR helper,
configuring OSPF GR restarter, 49
configuring OSPF host route advertisement, 38
configuring OSPF interface authentication, 42
configuring OSPF interface cost, 35
configuring OSPF LSDB max number external
LSAs,
configuring OSPF LSU transmit rate,
275 configuring OSPF max number ECMP routes,
configuring OSPF NBMA network type for
configuring OSPF network management,
configuring OSPF network type, 31
configuring OSPF NSSA area,
configuring OSPF P2MP network type for
configuring OSPF P2P network type for
configuring OSPF packet DSCP value, 44
configuring OSPF PIC,
configuring OSPF preference,
configuring OSPF prefix prioritization,
configuring OSPF prefix suppression, 47 configuring OSPF prefix suppression (global), 47
configuring OSPF prefix suppression (on
configuring OSPF received route filtering, 35
configuring OSPF redistributed route default parameters,
configuring OSPF redistributed route summarization on ASBR,
configuring OSPF route control,
configuring OSPF route redistribution, 37
configuring OSPF route redistribution from different
configuring OSPF route summarization, 34 configuring OSPF route summarization on ABR, 34
configuring OSPF stub area,
configuring OSPF stub router, 42
configuring OSPF summary route advertisement, 57
configuring OSPF timer,
configuring OSPF Type-3 LSA filtering, 35
configuring OSPF virtual link, 30
configuring OSPFv3,
,
configuring OSPFv3 area parameter,
configuring OSPFv3 BFD,
,
configuring OSPFv3 DR election,
configuring OSPFv3 GR,
configuring OSPFv3 GR helper,
configuring OSPFv3 Inter-Area-Prefix LSA
filtering, 209 configuring OSPFv3 interface cost, 209
configuring OSPFv3 interface DR priority,
configuring OSPFv3 LSU transmit rate, 214
configuring OSPFv3 max number ECMP routes,
configuring OSPFv3 NBMA neighbor,
configuring OSPFv3 network type,
configuring OSPFv3 network type (for interface),
configuring OSPFv3 NSSA area, 205 ,
configuring OSPFv3 P2MP neighbor,
configuring OSPFv3 preference, 210
configuring OSPFv3 received route
filtering, 208 configuring OSPFv3 route control, 208
configuring OSPFv3 route redistribution,
,
configuring OSPFv3 route summarization,
configuring OSPFv3 stub area,
configuring OSPFv3 timer,
configuring OSPFv3 virtual link,
,
configuring PBR (interface),
configuring PBR configuration (interface/packet type-based),
configuring PBR configuration (local/packet type-based),
configuring PBR node action, 185
configuring PBR node match criteria, 184
configuring PBR policy,
configuring routing policy, 242
configuring routing policy apply clause, 244
configuring routing policy AS_PATH list, 241
configuring routing policy community list,
configuring routing policy continue clause,
configuring routing policy extended community list,
configuring routing policy filter, 240
configuring routing policy if-match clause,
configuring routing policy IP prefix list, 240
configuring routing policy IPv4 prefix list,
configuring routing policy IPv6 prefix list,
configuring static route,
configuring static route BFD, 9
configuring static route BFD bidirectional control
configuring static route BFD bidirectional control
276 configuring static route BFD single-hop echo mode,
configuring static routing, 11 configuring static routing basics, 11
configuring static routing BFD (direct next hop),
configuring static routing BFD (indirect next hop),
configuring static routing default route,
controlling BGP path selection,
controlling BGP route distribution, 96 controlling BGP route reception, 96
creating IPv6 node,
creating PBR node,
disabling IPv4 BGP AS_PATH best route selection,
disabling IPv4 BGP session establishment,
disabling IPv6 BGP AS_PATH best route selection,
disabling IPv6 BGP session establishment,
disabling OSPF interface packet send/receive,
disabling OSPFv3 interface packet
displaying IP routing table,
displaying IPv4 BGP, 139 displaying IPv6 BGP, 139
displaying IPv6 PBR,
displaying IPv6 static routing, 193
displaying OSPF,
displaying OSPFv3,
displaying PBR,
displaying routing policy,
enabling BGP,
enabling BGP session state change logging,
enabling EBGP direct connections upon link
enabling enhanced ECMP mode,
enabling IPv4 BGP 4-byte AS number
enabling IPv4 BGP load balancing, 125
enabling IPv4 BGP MED AS route comparison
(confederation peers),
enabling IPv4 BGP MED AS route comparison (diff
enabling IPv4 BGP MED AS route comparison
(per-AS),
enabling IPv4 BGP multiple hop EBGP session establishment,
enabling IPv4 BGP peer MD5 authentication,
enabling IPv4 BGP route-refresh, 127
enabling IPv6 BGP 4-byte AS number suppression,
enabling IPv6 BGP MED AS route comparison
enabling IPv6 BGP MED AS route comparison
enabling IPv6 BGP MED AS route comparison
(per-AS),
enabling IPv6 BGP multiple hop EBGP session establishment,
enabling IPv6 BGP peer MD5 authentication,
enabling IPv6 BGP route-refresh, 127
enabling OSPF,
enabling OSPF ISPF,
enabling OSPF neighbor state change logging,
enabling OSPF on interface,
28 enabling OSPF on network, 28
enabling OSPF RFC 1583 compatibility, 45
enabling OSPFv3,
enabling OSPFv3 neighbor state change logging,
enabling support for IPv6 routes with prefixes
generating BGP route,
ignoring BGP first AS number of EBGP route updates,
ignoring BGP ORIGINATOR_ID attribute,
ignoring IPv4 BGP ORIGINATOR_ID attribute,
ignoring IPv6 BGP ORIGINATOR_ID attribute,
ignoring OSPFv3 DD packet MTU check,
injecting IPv4 BGP local network, 95 injecting IPv6 BGP local network, 95
limiting IPv4 BGP routes received from
limiting IPv6 BGP routes received from
maintaining IP routing table,
maintaining IPv4 BGP, 139 maintaining IPv6 BGP, 139
maintaining IPv6 PBR,
maintaining OSPF,
maintaining PBR,
maintaining routing policy,
optimizing BGP network,
optimizing OSPF network,
optimizing OSPFv3 network, 211
permitting IPv4 BGP local AS number appearance,
,
protecting IPv4 EBGP peer (low memory exemption),
protecting IPv6 EBGP peer (low memory exemption),
redistributing IPv4 BGP IGP routes, 95 redistributing IPv6 BGP IGP routes, 95
removing IPv4 BGP private AS number from EBGP
removing IPv6 BGP private AS number from EBGP
saving IPv4 BGP route update,
saving IPv6 BGP route update,
specifying BGP TCP connection source interface, 93
specifying IPv4 BGP received route preferred value,
specifying IPv6 BGP received route preferred value,
specifying OSPF LSA arrival interval,
41 specifying OSPF LSA generation interval, 41
specifying OSPF LSA transmission delay,
specifying OSPF SPF calculation interval,
specifying OSPFv3 LSA generation interval, 213
specifying OSPFv3 LSA transmission delay, 212
specifying OSPFv3 SPF calculation interval,
troubleshooting BGP peer connection state, 182
troubleshooting OSPF incorrect routing
troubleshooting OSPF no neighbor relationship established,
tuning OSPF network,
tuning OSPFv3 network,
protecting
277
IPv4 EBGP peer (low memory exemption),
IPv6 EBGP peer (low memory exemption),
protocols and standards
IP routing dynamic routing protocols, 2
OSPF preference,
OSPF RFC 1583 compatibility,
R receiving
IPv4 BGP routes received from peer/peer group,
IPv6 BGP routes received from peer/peer group,
recursion
redistributing
IP routing extension attribute redistribution, 3
IP routing route redistribution, 3
IPv4 BGP IGP routes,
IPv4 BGP-IGP route redistribution,
IPv6 BGP IGP routes,
OSPF route redistribution,
OSPFv3 route redistribution, 227
reflecting
removing
IPv4 BGP private AS number removal,
IPv6 BGP private AS number,
RFC 1583 compatibility (OSPF),
RIB
IP routing FIB route max lifetime, 4
route
IP routing RIB label max lifetime, 3
IP routing RIB route max lifetime, 3
BGP default route advertisement to peer/peer group,
BGP optimal route advertisement rules,
BGP route advertisement rules,
BGP route dampening,
278
BGP route filtering policies, 100
BGP route generation,
BGP route recursion,
BGP route reflection configuration,
,
BGP route summarization,
FIB table optimal routes,
filters,
IP routing ECMP route max number configuration,
IP routing FIB route max lifetime, 4
IP routing RIB label max lifetime,
IP routing RIB route max lifetime, 3
IP routing route preference, 2
IP routing route redistribution, 3
IPv4 BGP IGP route redistribution, 95
IPv4 BGP MED AS route comparison (confederation peers),
IPv4 BGP MED AS route comparison (diff ASs), 110
IPv4 BGP MED AS route comparison (per-AS),
IPv4 BGP ORIGINATOR_ID attribute,
IPv4 BGP route distribution filtering policies, 100
IPv4 BGP route reception filtering policies, 103
IPv4 BGP route reflector configuration, 133
,
IPv4 BGP route summarization,
IPv4 BGP route update interval, 121
IPv4 BGP route update save,
IPv4 BGP routes received from peer/peer group, 99
IPv4 BGP-IGP route redistribution,
IPv6 BGP IGP route redistribution, 95
IPv6 BGP MED AS route comparison (confederation peers),
IPv6 BGP MED AS route comparison (diff ASs), 110
IPv6 BGP MED AS route comparison (per-AS),
IPv6 BGP ORIGINATOR_ID attribute,
IPv6 BGP route distribution filtering policies, 100
IPv6 BGP route reception filtering policies, 103
IPv6 BGP route reflector configuration, 133
,
IPv6 BGP route refresh,
IPv6 BGP route update interval,
IPv6 BGP route update save, 128
IPv6 BGP routes received from peer/peer group,
IPv6 default route configuration, 201
IPv6 static route BFD configuration, 191
IPv6 static route BFD control mode (direct next hop),
IPv6 static route BFD control mode (indirect next hop),
IPv6 static route BFD echo mode (single hop),
IPv6 static route configuration,
IPv6 static routing basic configuration, 194
IPv6 static routing BFD (direct next hop), 195
IPv6 static routing BFD (indirect next hop),
IPv6 static routing configuration, 191
OSPF default route redistribution, 37
OSPF ECMP route max number
OSPF host route advertisement, 38
OSPF NSSA area configuration,
OSPF preference configuration,
OSPF received route filtering, 35
OSPF redistributed route default parameters,
OSPF redistributed route summarization on
OSPF route control configuration, 33
OSPF route redistribution,
OSPF route redistribution configuration, 37
OSPF route redistribution from different routing
OSPF route summarization configuration, 34
OSPF route summarization on ABR, 34
OSPF stub area configuration,
OSPF summary route advertisement,
OSPFv3 max number ECMP routes, 209
OSPFv3 received route filtering, 208
OSPFv3 route control configuration, 208
OSPFv3 route redistribution, 210
OSPFv3 route summarization,
static route BFD configuration, 9
static routing basic configuration,
static routing BFD configuration (direct next hop),
static routing BFD configuration (indirect next
static routing configuration, 8
,
static routing default route configuration,
router
BGP peer,
EBGP peer,
OSPF internal router type,
OSPF stub router configuration,
routing
IPv4 BGP load balancing,
IPv6 BGP load balancing,
IPv6 default route. See under IPv6 static routing
IPv6 policy-based routing. See IPv6 PBR
IPv6 static routing. See
MP-BGP,
OSPF basic configuration,
OSPF BFD configuration,
OSPF BFD detection (bidirectional control), 51
OSPF BFD detection (single-hop echo), 51
OSPF broadcast network type configuration for
,
,
OSPF default route redistribution, 37
OSPF DR election configuration, 64
OSPF ECMP route max number, 36
OSPF GR helper configuration, 50
OSPF GR restarter configuration, 49
OSPF host route advertisement,
OSPF interface cost,
OSPF ISPF enable,
OSPF LSA generation interval,
279
OSPF LSA transmission delay,
OSPF NBMA network type configuration for
OSPF network management traps, 45
OSPF network type configuration,
OSPF NSSA area configuration,
OSPF P2MP network type configuration for
OSPF P2P network type configuration for
OSPF PIC configuration,
OSPF preference,
OSPF prefix prioritization,
OSPF received route filtering, 35
OSPF redistributed route default parameters,
OSPF redistributed route summarization on
OSPF route control configuration, 33
OSPF route redistribution,
OSPF route redistribution from different routing
OSPF route summarization configuration, 34
OSPF route summarization on ABR, 34
OSPF SPF calculation interval,
OSPF stub area configuration,
OSPF summary route advertisement,
OSPF virtual link configuration,
OSPFv3 configuration,
,
OSPFv3 DR election configuration,
OSPFv3 LSU transmit rate,
OSPFv3 NSSA area configuration,
OSPFv3 route redistribution, 227
OSPFv3 stub area configuration,
policy apply clause configuration,
policy AS_PATH list configuration,
policy community list configuration,
,
policy continue clause configuration,
policy creation,
policy extended community list configuration,
policy filter configuration,
policy if-match clause configuration,
policy IP prefix list configuration, 240
rule
BGP route advertisement rules, 77
S saving
IPv4 BGP route update,
IPv6 BGP route update,
security
OSPF area authentication configuration,
OSPF prefix prioritization,
selecting
IPv4 BGP path selection configuration,
session
BGP session state change logging,
IPv4 BGP multiple hop EBGP session establishment,
IPv4 BGP session establishment disable,
IPv6 BGP multiple hop EBGP session establishment,
IPv6 BGP session establishment disable,
soft reset
BGP configuration,
IPv4 BGP manual configuration,
IPv6 BGP manual configuration,
speaker
specifying
BGP TCP connection source interface, 93
IPv4 BGP received route preferred value, 106
IPv6 BGP received route preferred value, 106
OSPF LSA generation interval,
OSPF LSA transmission delay,
280
OSPF SPF calculation interval,
OSPFv3 LSA generation interval, 213
OSPFv3 LSA transmission delay, 212
OSPFv3 SPF calculation interval,
SPF
OSPF SPF calculation interval,
OSPFv3 SPF calculation interval,
state
BGP session state change logging,
OSPF neighbor state change logging,
static
static routing basic configuration,
BFD configuration (direct next hop),
BFD configuration (indirect next hop), 15
,
default route configuration,
IPv6. See
static route BFD bidirectional control mode
static route BFD bidirectional control mode
(indirect next hop), 9 static route BFD configuration, 9
stub static route BFD single-hop echo mode,
OSPF stub area configuration,
OSPF stub router configuration, 42
OSPF totally stub area,
OSPFv3 stub area configuration, 205
substituting
IPv4 BGP AS number substitution, 118
IPv6 BGP AS number substitution, 118
summarizing
,
IPv4 BGP route automatic summarization, 97
IPv4 BGP route manual summarization, 97
IPv4 BGP route summarization,
OSPF redistributed route summarization on
OSPF route summarization,
OSPF route summarization on ABR, 34
OSPF summary route advertisement,
OSPFv3 route summarization, 208
suppressing
IPv4 BGP 4-byte AS number suppression,
IPv6 BGP 4-byte AS number suppression,
switch
IPv6 PBR configuration (local/packet
IPv6 static routing basics, 194
IPv6 static routing BFD (direct next hop),
IPv6 static routing BFD (indirect next hop),
OSPF basic configuration,
OSPF DR election configuration, 64
OSPF NSSA area configuration, 62
OSPF stub area configuration,
OSPF summary route advertisement,
OSPF virtual link configuration,
OSPFv3 BFD configuration,
OSPFv3 DR election configuration, 224
OSPFv3 NSSA area configuration,
OSPFv3 route redistribution, 227
OSPFv3 stub area configuration,
PBR configuration (interface/packet
PBR configuration (local/packet type-based), 186
static routing basic configuration,
static routing BFD configuration (direct next hop),
static routing BFD configuration (indirect next
static routing configuration, 11
T table
IP routing,
TCP
BGP configuration,
BGP TCP connection source interface, 93
IPv4 BGP basic configuration, 141
IPv4 BGP BFD configuration, 169
IPv4 BGP COMMUNITY configuration, 154
IPv4 BGP confederation configuration,
281
IPv4 BGP configuration,
IPv4 BGP GR configuration, 167
IPv4 BGP load balancing configuration,
IPv4 BGP path selection configuration, 164
IPv4 BGP route reflector configuration, 157
IPv4 BGP route summarization,
IPv4 BGP-IGP route redistribution,
IPv6 BGP basic configuration,
IPv6 BGP BFD configuration, 178
IPv6 BGP configuration,
IPv6 BGP route reflector configuration, 176
threshold
IPv4 EBGP peer protection (level 2 threshold exemption),
time
IPv6 EBGP peer protection (level 2 threshold exemption),
IPv4 BGP holdtime,
IPv6 BGP holdtime,
timer
OSPF LSA retransmission packet timer, 39
OSPF packet timer,
OSPFv3 timer configuration, 211
topology
IPv6 default route configuration, 201
IPv6 static route configuration,
IPv6 static routing basic configuration, 194
IPv6 static routing BFD (direct next hop), 195
IPv6 static routing BFD (indirect next hop),
track
IPv6 static routing configuration, 191
static route configuration,
trapping
BGP trap enable,
triggering
OSPF GR,
troubleshooting
BGP peer connection state, 182
OSPF incorrect routing information,
OSPF no neighbor relationship established,
tuning
OSPFv3 network,
Type 1 external
OSPF route type,
Type 2 external
OSPF route type,
U unicast
IP routing configuration,
IP routing dynamic routing protocols,
IP routing ECMP route max number configuration,
IP routing enhanced ECMP mode enable,
IP routing extension attribute redistribution, 3
IP routing route preference, 2
IP routing route redistribution, 3
updating
BGP update message,
IPv4 BGP route update,
IPv4 BGP route update interval, 121
IPv6 BGP route update,
IPv6 BGP route update interval, 121
V value
BGP received route preferred value, 106
IPv4 BGP MED default value,
IPv6 BGP MED default value,
282
Shkarko
Reklamë