06-Layer 3—IP Routing Configuration Guide

HomeSupportConfigure & DeployConfiguration GuidesH3C S9825 & S9855 Switch Series Configuration Guides-R932x-6W10006-Layer 3—IP Routing Configuration Guide
15-Adaptive routing configuration
Title Size Download
15-Adaptive routing configuration 383.96 KB

Configuring adaptive routing

About adaptive routing

As a network routing technology, adaptive routing enables routers to detect network-wide topology or traffic changes, and dynamically perform path selection based on the changes. This can optimize network performance, ensure packet forwarding efficiency, reduce latency, avoid congestion, and enhance the overall reliability and efficiency of the network.

Application scenario

Adaptive routing applies to the following traffic switchover scenario.

Figure 1 Application scenario

 

As shown in Figure 1, in the spine-leaf network architecture, east-west traffic between servers across different leaf devices must be forwarded through spine devices. In this network, multiple spine devices are deployed to enhance reliability. The spine devices, acting as route reflectors (RR), establish BGP sessions with each leaf device. The leaf devices exchange server route information through BGP route reflection. This scenario uses data exchange between Server A and Server H as an example. Leaf 1 has two paths to reach Leaf 4 (through Spine 1 and Spine 2). Each path contains two segments, namely, "local leaf to spine" and "spine to remote leaf." If the path that traverses Spine 1 is the preferred path, when this path fails, path switchover is typically performed through BGP route reselection. If the "local leaf to spine" segment (marked by callout 1 in the figure) fails, Leaf 1 can fast detect the failure for the BGP connection with Spine 1 through specific BGP settings (BFD for BGP). Leaf 1 then performs route reselection, and switch traffic to the path that traverses Spine 2. When the "spine to remote leaf" segment (marked by callout 2 in the figure) fails, Leaf 1 cannot detect directly the failure because it does not have a direct BGP connection to Leaf 4. Leaf 1 can reselect the optimal route, update the routing information, and then switch traffic destined for Leaf 4 to the path that traverses Spine 2 only after the spine device detects the link failure. Typically this path switchover process takes a long time, which might result in traffic loss.

After you enable adaptive routing, the leaf device can fast respond to link state changes across the network. For both the "local leaf to spine" and "spine to remote leaf" segments, the leaf device can rapidly detect link status changes, calculate the optimal route, and complete the path switchover while ensuring service quality.

ARN packets

Adaptive routing introduced a new type of proprietary protocol packets, called (adaptive routing notification) ARN packets, which are advertised between spine and leaf devices. ARN packets are sent via the UDP protocol. After you enable adaptive routing, the device sends various types of ARN packets to carry different information.

Adaptive routing uses the following types of ARN packets:

·     AD packets—Device ID advertisement packets used for advertising the local device ID.

·     LS packets—Link state advertisement packets used to advertise the link up or down state events.

·     ACK packets—Used to acknowledge receipt of LS packets on the receiving end.

Among the previous types of packets, AD packets are sent at fixed intervals during the operation of adaptive routing. LS packet sending is triggered in specific conditions. A device keeps retransmitting LS packets until it receives the corresponding type of ACK packets from the peer end. If the local device ID has changed, the device immediately triggers the sending of AD packets to notify other devices of its new device ID.

Operating mechanism

Figure 2 Adaptive routing network diagram

 

As shown in Figure 2, FGLB adaptive routing operates as follows:

1.     Each leaf device establishes EBGP connections with the two spine devices. The leaf devices advertise server route information between each other through BGP.

2.     Configure load balancing on all leaf devices to implement ECMP for routes with the same prefix from Spine 1 and Spine 2.

3.     After you configure the peer advertise device-id command on each leaf device, the leaf devices will advertise the device ID extended community attribute in public network unicast routes. The device ID extended community attribute is a proprietary extended community attribute that uses the global router ID to identify a device within an adaptive routing network.

4.     Enable adaptive routing on the leaf and spine devices globally and on the specified interfaces.

5.     After you enable adaptive routing, as shown in Figure 3, both spine and leaf devices periodically send AD packets to advertise their device IDs. The devices record the device IDs upon receiving the AD packets.

Figure 3 Network diagram for advertising AD packets

 

6.     As shown in Figure 4, when the link between Leaf 4 and Spine 1 is down, Spine 1 sends LS packets to the other three leaf devices other than Leaf 4. An LS packet contains the following information:

¡     Device ID of the remote leaf device.

¡     Information that the link between Spine 1 and Leaf 4 is down.

Figure 4 Network diagram for sending LS packets upon a link down event

 

After receiving the LS packets with link down information, Leaf 1, Leaf 2, and Leaf 3 locate the BGP routes carrying the device ID extended community attribute based on the device ID of Leaf 4. They then mark the next hops associated with these routes destined for Spine 1 in the forwarding table as invalid, and perform traffic load balancing among the remaining next hops, implementing fast path switchover upon the link failure.

 

 

NOTE:

If a leaf device has a statically configured traffic matrix flow table associated with the failed link, the device will also invalidate the flow table upon receiving an LS packet.

 

Adaptive routing tasks at a glance

To configure adaptive routing, perform the following tasks:

1.     Enabling adaptive routing:

2.     Establishing a BGP IPv4 or IPv6 unicast session

3.     (Optional.) Configuring a global router ID

4.     (Optional.) Configuring ARN packet parameters

Enabling adaptive routing:

About this task

To enable general adaptive routing, you only need to enable adaptive routing globally and for the specified interface.

Restrictions and guidelines

Adaptive routing can take effect correctly on an interface only after an IPv4 address is configured for that interface.

Procedure

1.     Enter system view.

system-view

2.     Enable adaptive routing globally and enter adaptive routing view.

adaptive-routing enable

By default, adaptive routing is disabled globally.

3.     Return to system view.

quit

4.     Enter interface view.

interface interface-type interface-number

5.     Enable adaptive routing for the interface.

adaptive-routing detect

By default, adaptive routing is disabled for an interface.

Establishing a BGP IPv4 or IPv6 unicast session

About this task

In an adaptive routing network, you must establish an EBGP IPv4 or IPv6 unicast session between a spine device and a leaf device, and enable the spine and leaf devices to advertise the device ID extended community attribute via BGP IPv4 or IPv6 unicast routes.

The device ID extended community attribute is an H3C-proprietary attribute. For interoperability purposes, you can use this command to change the type value for the device ID extended community attribute to a value that can be identified by other vendors.

Configuring a spine device

1.     Enter system view.

system-view

2.     Enable a BGP instance for establishing an EBGP IPv4 or IPv6 unicast session with the leaf device.

For more information, see BGP configuration in Layer 3—IP Routing Configuration Guide.

3.     Enter BGP instance view.

bgp as-number [ instance instance-name ]

4.     (Optional.) Configure the type value for the device ID extended community attribute.

extcommunity-type device-id device-type-value

By default, the type value for the device ID extended community attribute is 84ef in hexadecimal format.

5.     Enter BGP IPv4 unicast address family view or BGP IPv6 unicast address family view.

¡     Enter BGP IPv4 unicast address family view.

address-family ipv4 [ unicast ]

¡     Enter BGP IPv6 unicast address family view.

address-family ipv6 [ unicast ]

6.     Enable load balancing and set the maximum number of BGP ECMP routes for load balancing.

balance [ ebgp | eibgp | ibgp ] number [ ecmp-nexthop-local | ecmp-nexthop-unchanged ]

By default, load balancing is disabled for BGP.

7.     (Optional.) Enable BGP to ignore the AS_PATH attribute when it implements load balancing.

balance as-path-neglect

By default, BGP does not ignore the AS_PATH attribute when it implements load balancing.

8.     Enable BGP to advertise the device ID extended community attribute to the leaf device.

peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } advertise device-id

By default, BGP does not advertise the device ID extended community attribute to a peer or peer group.

9.     Enable BGP to advertise the extended community attribute to the leaf device.

peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } advertise-ext-community

By default, BGP does not advertise the extended community attribute to a peer or peer group.

For more information about this command, see Layer 3—IP Routing Command Reference.

Configuring a leaf device

1.     Enter system view.

system-view

2.     Enable a BGP instance for establishing an EBGP IPv4 or IPv6 unicast session with the spine device.

For more information, see BGP configuration in Layer 3—IP Routing Configuration Guide.

3.     Enter BGP instance view.

bgp as-number [ instance instance-name ]

4.     (Optional.) Configure the type value for the device ID extended community attribute.

extcommunity-type device-id device-type-value

By default, the type value for the device ID extended community attribute is 84ef in hexadecimal format.

5.     Enter BGP IPv4 unicast address family view or BGP IPv6 unicast address family view.

¡     Enter BGP IPv4 unicast address family view.

address-family ipv4 [ unicast ]

¡     Enter BGP IPv6 unicast address family view.

address-family ipv6 [ unicast ]

6.     Enable load balancing and set the maximum number of BGP ECMP routes for load balancing.

balance [ ebgp | eibgp | ibgp ] number [ ecmp-nexthop-local | ecmp-nexthop-unchanged ]

By default, load balancing is disabled.

7.     (Optional.) Enable BGP to ignore the AS_PATH attribute when it implements load balancing.

balance as-path-neglect

By default, BGP does not ignore the AS_PATH attribute when it implements load balancing.

8.     Enable BGP to advertise the device ID extended community attribute to the spine device.

peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } advertise device-id

By default, BGP does not advertise the device ID extended community attribute to a peer or peer group.

9.     Enable BGP to advertise the extended community attribute to a peer or peer group.

peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } advertise-ext-community

By default, BGP does not advertise the extended community attribute to a peer or peer group.

For more information about this command, see Layer 3—IP Routing Command Reference.

Configuring a global router ID

About this task

After you enable adaptive routing, the device will advertise the configured global router ID as its device ID. You can perform this task to edit the global router ID.

Procedure

1.     Enter system view.

system-view

2.     Configure a global router ID.

router id router-id

By default, if no global router ID is configured, the device selects a router ID as follows:

a.     If loopback interfaces configured with IP addresses exist, the device uses the highest loopback interface IP address as the router ID.

b.     If no loopback interface configured with an IP address exists, the device uses the highest IP address of other interfaces as the router ID, regardless of the interface state (up or down).

c.     If no IP address is configured for any interface, the router ID is 0.0.0.0. BGP cannot use router ID 0.0.0.0 for session establishment, because the router ID is invalid.

For more information about this command, see Layer 3—IP Routing Command Reference.

Configuring ARN packet parameters

Configuring the ARN packet sending interval

About this task

Adaptive routing requires the peer end to acknowledge the sent ARN packets. If no acknowledgment packets are received, the device will retransmit the ARN packets at the specified intervals.

Procedure

1.     Enter system view.

system-view

2.     Enter adaptive routing view.

adaptive-routing enable

3.     Configure the ARN packet sending interval.

adaptive-routing interval interval-value

By default, the ARN packet sending interval is 500 milliseconds.

Specifying the source and destination UDP ports for ARN packets

Restrictions and guidelines

You must configure the same UDP port numbers for both the ARN packet receiving and sending devices.

Procedure

1.     Enter system view.

system-view

2.     Enter adaptive routing view.

adaptive-routing enable

3.     Configure the source and destination UDP port numbers for ARN packets.

adaptive-routing udp-port port-number

By default, the source and destination UDP port numbers for ARN packets are both 4780.

Configuring the source IPv4 address for ARN packets

Procedure

1.     Enter system view.

system-view

2.     Enter adaptive routing view.

adaptive-routing enable

3.     Configure the source IPv4 address for ARN packets.

adaptive-routing udp-source-ip ipv4-address

By default, the source IPv4 address for ARN packets is 1.1.1.1.

Display and maintenance commands for adaptive routing

Execute display commands in any view.

 

Task

Command

Display device ID-to-interface mapping information.

display adaptive-routing device status [ device-id ]

 

Adaptive routing configuration examples

Example: Configuring basic adaptive routing

Network configuration

Leaf 1 resides in AS 10, Spine 1 resides in AS 20, Spine 2 resides in AS 30, and Leaf 2 resides in AS 40. Spine 1 and Spine 2 establish EBGP connections with Leaf 1 and Leaf 2, respectively.

Configure adaptive routing to enable Leaf 1 and Leaf 2 to detect link state changes of the entire backbone in real time, and perform fast traffic path switchover.

Figure 5 Network diagram

Procedure

1.     Configure IP addresses for interfaces. (Details not shown.)

2.     Configure Spine 1:

# Configure a global router ID, and enable adaptive routing globally and on the specified interfaces.

<Spine1> system-view

[Spine1] router id 2.2.2.2

[Spine1] adaptive-routing enable

[Spine1-adaptive-routing] quit

[Spine1] interface gigabitethernet 1/0/1

[Spine1-GigabitEthernet1/0/1] adaptive-routing detect

[Spine1-GigabitEthernet1/0/1] quit

[Spine1] interface gigabitethernet 1/0/2

[Spine1-GigabitEthernet1/0/2] adaptive-routing detect

[Spine1-GigabitEthernet1/0/2] quit

# Configure BGP.

[Spine1] bgp 20

[Spine1-bgp-default] router-id 2.2.2.2

[Spine1-bgp-default] peer 11.1.1.2 as-number 10

[Spine1-bgp-default] peer 12.1.1.2 as-number 40

[Spine1-bgp-default] address-family ipv4 unicast

[Spine1-bgp-default-ipv4] peer 11.1.1.2 enable

[Spine1-bgp-default-ipv4] peer 12.1.1.2 enable

[Spine1-bgp-default-ipv4] peer 11.1.1.2 advertise device-id

[Spine1-bgp-default-ipv4] peer 12.1.1.2 advertise device-id

[Spine1-bgp-default-ipv4] peer 11.1.1.2 advertise-ext-community

[Spine1-bgp-default-ipv4] peer 12.1.1.2 advertise-ext-community

[Spine1-bgp-default-ipv4] quit

[Spine1-bgp-default] quit

3.     Configure Spine 2:

# Configure a global router ID, and enable adaptive routing globally and on the specified interfaces.

<Spine2> system-view

[Spine2] router id 3.3.3.3

[Spine2] adaptive-routing enable

[Spine2-adaptive-routing] quit

[Spine2] interface gigabitethernet 1/0/1

[Spine2-GigabitEthernet1/0/1] adaptive-routing detect

[Spine2-GigabitEthernet1/0/1] quit

[Spine2] interface gigabitethernet 1/0/2

[Spine2-GigabitEthernet1/0/2] adaptive-routing detect

[Spine2-GigabitEthernet1/0/2] quit

# Configure BGP.

[Spine2] bgp 30

[Spine2-bgp-default] router-id 3.3.3.3

[Spine2-bgp-default] peer 11.1.1.2 as-number 10

[Spine2-bgp-default] peer 12.1.1.2 as-number 40

[Spine2-bgp-default] address-family ipv4 unicast

[Spine2-bgp-default-ipv4] peer 11.1.1.2 enable

[Spine2-bgp-default-ipv4] peer 12.1.1.2 enable

[Spine2-bgp-default-ipv4] peer 11.1.1.2 advertise device-id

[Spine2-bgp-default-ipv4] peer 12.1.1.2 advertise device-id

[Spine2-bgp-default-ipv4] peer 11.1.1.2 advertise-ext-community

[Spine2-bgp-default-ipv4] peer 12.1.1.2 advertise-ext-community

[Spine2-bgp-default-ipv4] quit

[Spine2-bgp-default] quit

4.     Configure Leaf 1:

# Configure a global router ID, and enable adaptive routing globally and on the specified interfaces.

<Leaf1> system-view

[Leaf1] router id 1.1.1.1

[Leaf1] adaptive-routing enable

[Leaf1-adaptive-routing] quit

[Leaf1] interface gigabitethernet 1/0/1

[Leaf1-GigabitEthernet1/0/1] adaptive-routing detect

[Leaf1-GigabitEthernet1/0/1] quit

[Leaf1] interface gigabitethernet 1/0/2

[Leaf1-GigabitEthernet1/0/2] adaptive-routing detect

[Leaf1-GigabitEthernet1/0/2] quit

# Configure BGP.

[Leaf1] bgp 10

[Leaf1-bgp-default] router-id 1.1.1.1

[Leaf1-bgp-default] peer 11.1.1.1 as-number 20

[Leaf1-bgp-default] peer 21.1.1.1 as-number 30

[Leaf1-bgp-default] address-family ipv4 unicast

[Leaf1-bgp-default] balance 2

[Leaf1-bgp-default] balance as-path-neglect

[Leaf1-bgp-default-ipv4] peer 11.1.1.1 enable

[Leaf1-bgp-default-ipv4] peer 21.1.1.1 enable

[Leaf1-bgp-default-ipv4] peer 11.1.1.1 advertise device-id

[Leaf1-bgp-default-ipv4] peer 21.1.1.1 advertise device-id

[Leaf1-bgp-default-ipv4] peer 11.1.1.1 advertise-ext-community

[Leaf1-bgp-default-ipv4] peer 21.1.1.1 advertise-ext-community

[Leaf1-bgp-default-ipv4] network 10.1.1.0 24

[Leaf1-bgp-default-ipv4] quit

[Leaf1-bgp-default] quit

5.     Configure Leaf 2:

# Configure a global router ID, and enable adaptive routing globally and on the specified interfaces.

<Leaf2> system-view

[Leaf2] router id 4.4.4.4

[Leaf2] adaptive-routing enable

[Leaf2-adaptive-routing] quit

[Leaf2] interface gigabitethernet 1/0/1

[Leaf2-GigabitEthernet1/0/1] adaptive-routing detect

[Leaf2-GigabitEthernet1/0/1] quit

[Leaf2] interface gigabitethernet 1/0/2

[Leaf2-GigabitEthernet1/0/2] adaptive-routing detect

[Leaf2-GigabitEthernet1/0/2] quit

# Configure BGP.

[Leaf2] bgp 40

[Leaf2-bgp-default] router-id 4.4.4.4

[Leaf2-bgp-default] peer 12.1.1.1 as-number 20

[Leaf2-bgp-default] peer 22.1.1.1 as-number 30

[Leaf2-bgp-default] address-family ipv4 unicast

[Leaf2-bgp-default] balance 2

[Leaf2-bgp-default] balance as-path-neglect

[Leaf2-bgp-default-ipv4] peer 12.1.1.1 enable

[Leaf2-bgp-default-ipv4] peer 22.1.1.1 enable

[Leaf2-bgp-default-ipv4] peer 12.1.1.1 advertise device-id

[Leaf2-bgp-default-ipv4] peer 22.1.1.1 advertise device-id

[Leaf2-bgp-default-ipv4] peer 12.1.1.1 advertise-ext-community

[Leaf2-bgp-default-ipv4] peer 22.1.1.1 advertise-ext-community

[Leaf2-bgp-default-ipv4] network 10.2.1.0 24

[Leaf2-bgp-default-ipv4] quit

[Leaf2-bgp-default] quit

  • Cloud & AI
  • InterConnect
  • Intelligent Computing
  • Intelligent Storage
  • Security
  • SMB Products
  • Intelligent Terminal Products
  • Product Support Services
  • Technical Service Solutions
All Services
  • Resource Center
  • Policy
  • Online Help
  • Technical Blogs
All Support
  • Become A Partner
  • Partner Policy & Program
  • Global Learning
  • Partner Sales Resources
  • Partner Business Management
  • Service Business
All Partners
  • Profile
  • News & Events
  • Online Exhibition Center
  • Contact Us
All About Us
新华三官网