Route iteration includes two parts, iterating next-hop to an interface and iterating next-hop to a tunnel.

Iterating next-hop to an interface refers to searching in the IP routing table for the purpose of learning the next hop for BGP. After a route with the actual next hop and outbound interface information is found (usually an IGP route), the next hop and outbound interface information is filled in the IP routing entry and the corresponding FIB is generated.

Iterating next-hop to a tunnel refers to the private network route that advertised in the vpn-instance. Commonly, the next hop is the loopback address of the remote PE. There is no outgoing interface or OutGoingToken. The packets cannot be forwarded. The corresponding information is required. The routing management module will search the global tunnel list to find out if there are corresponding entries for the next-hop of those routes. If the corresponding entries are found, the tunnel information is filled in the routing entry and the corresponding FIB entry is generated.

Based on these information, we could know, to iterate next-hop to an interface successful, the IGP routes to the next-hop is required, and to iterate next-hop to the tunnel, LSP to the next-hop is required.

Take an example

[~NE5000E-bgp]disp bgp vpnv4 all routing-table 10.133.238.100

 BGP local router ID : 10.11.0.1

 Local AS number : 65501

 Total routes of Route Distinguisher(65501:111): 1

 BGP routing table entry information of 10.133.238.96/29:

 Label information (Received/Applied): 155666/4207

 From: 10.11.0.2 (10.11.0.2)

 Route Duration: 0d23h33m50s

 Relay IP Nexthop: 10.11.2.202

 Relay IP Out-interface: Eth-Trunk11

 //Based on the IGP routing table, it could be confirmed that the outward interface and the next-hop of the Original nexthop: 10.119.0.2 is iterated.

 Relay Tunnel Name: LDP LSP

 Original nexthop: 10.119.0.2

 Qos information : 0x0

 Ext-Community: RT <64512 : 101>, RT <65501 : 111>

 AS-path Nil, origin incomplete, MED 100, localpref 100, pref-val 0, valid, inte

rnal, pre 255, not preferred for PreVal

 Originator: 10.119.0.2

 Cluster list: 10.11.0.2

 Not advertised to any peer yet

The iterating result could get from the command display bgp vpnv4 all routing-table. Conclusions as below could get from the result.

1. In the VPNv4 routing table, the next hop and outbound interface is required to be iterated. The iteration is the next hop and the outbound interface of the route originator(Original nexthop). After the iteration is successful, the Relay IP Nexthop and Relay IP Out-Interface are generated in the VPNv4 routing table.

Iterative process: Find the route of Original nexthop (NextHop and Interface) in the IGP routing table, and fill it into Relay IP Nexthop and Relay IP Out-Interface of BGP VPNv4 routing table.

142141b2hodk78zmvm37r0.png

2. Iterating to a tunnel is required in the VPN instance routing table, and iteratively is the tunnel to the route originator Original nexthop (not the route publisher From). After the iteration is successful, the Relay Tunnel Out-Interface and the Relay token are in the VPN routing table.

Iterative process: Find if there is a TE LSP or LDP LSP to Original nexthop. If there is, it can be iterated normally, otherwise the iteration fails.

142155uzvkv040zvqq4qqk.png

Verification process

142205wnph5nhhfutugpji.png

P1 and P2 works as the RR, and IBGP relationship is established between these two routers.

TE Tunnel0/1/2 is established between P1 and P2.

RSG-3 and RSG-4 enables the VRRP function, a private network 20.133.238.100 connects to RSG-3 and RSG-4. IBGP peer is established between RR and RSG-3, RSG-4.

Private network 20.133.238.100 could be transferred to P1 router in different ways,

RSG3 —àP1

RSG3—-àRR(P2)—-àP1

RSG4 —àP1

RSG4—-àRR(P2)—-àP1

It could be confirmed that the result of iteration is the outbound interface to the route originator(Original nexthop) by querying the bgp vpnv4 route and IGP route.

[~P1-bgp]disp bgp vpnv4 all routing-table 20.133.238.100

 BGP local router ID : 10.11.0.1

 Local AS number : 65501

 Total routes of Route Distinguisher(65501:111): 2

 BGP routing table entry information of 20.133.238.96/29:

 Label information (Received/Applied): 155666/4207

 From: 10.119.0.2 (10.119.0.2) //From:The IP address of the route publisher. Indicates that the route was issued to P1 by RSG-3.

 Route Duration: 0d00h01m09s

 Relay IP Nexthop: 10.11.2.202 // Relay IP Nexthop 

 Relay IP Out-interface: Eth-Trunk11 // Relay IP Out-Interface

 Relay Tunnel Name: LDP LSP

 Original nexthop: 10.119.0.2 // The original next hop. Indicates that the private network route is generated on RSG-3 (10.119.0.2).

 Qos information : 0x0

 Ext-Community: RT <64512 : 101>, RT <65501 : 111>

 AS-path Nil, origin incomplete, MED 100, localpref 100, pref-val 200, valid, in

ternal, best, select, pre 255

 Advertised to such 6 peers:

 10.11.0.2

 10.11.2.254

 10.119.0.2

 10.159.5.11

 10.68.0.1

 10.68.0.2

 BGP routing table entry information of 20.133.238.96/29:

 Label information (Received/Applied): 155666/4207

 From: 10.11.0.2 (10.11.0.2) // Indicates that the route is advertised to P1 after P2 is learned.

 Route Duration: 0d23h33m50s

 Relay IP Nexthop: 10.11.2.202

 Relay IP Out-interface: Eth-Trunk11

 Relay Tunnel Name: LDP LSP

 Original nexthop: 10.119.0.2 // Indicates that the private network route is generated on RSG-3 (10.119.0.2).

 Qos information : 0x0

 Ext-Community: RT <64512 : 101>, RT <65501 : 111>

 AS-path Nil, origin incomplete, MED 100, localpref 100, pref-val 0, valid, inte

rnal, pre 255, not preferred for PreVal

 Originator: 10.119.0.2

 Cluster list: 10.11.0.2

 Not advertised to any peer yet

// According to the IGP routing table, it can be confirmed that the IP Nexthop and IP Out-interface iterations are the outgoing interface and the next hop to Original nexthop: 10.119.0.2.

 Total routes of Route Distinguisher(65501:114): 2

 BGP routing table entry information of 20.133.238.96/29:

 Label information (Received/Applied): 155668/4213

 From: 10.159.5.11 (10.159.6.2) // Indicates that the route was issued to P1 by RSG-4

 Route Duration: 0d23h34m10s

 Relay IP Nexthop: 10.11.0.1

Relay IP Out-interface: Tunnel0/1/2

 Relay Tunnel Name: LDP LSP

 Original nexthop: 10.159.5.11 // Indicates that the private network route is generated on RSG-4 (10.159.5.11).

 Qos information : 0x0

 Ext-Community: RT <64512 : 101>, RT <65501 : 111>

 AS-path Nil, origin incomplete, MED 100, localpref 100, pref-val 0, valid, inte

rnal, best, select, pre 255

 Advertised to such 6 peers:

 10.11.0.2

 10.11.2.254

 10.119.0.2

 10.159.5.11

 10.68.0.1

10.68.0.2

 BGP routing table entry information of 20.133.238.96/29:

 Label information (Received/Applied): 155668/4213

 From: 10.11.0.2 (10.11.0.2) // Indicates that the route is advertised to P1 after P2 is learned.

 Route Duration: 0d23h33m50s

 Relay IP Nexthop: 10.11.0.1

 Relay IP Out-interface: Tunnel0/1/2

 Relay Tunnel Name: LDP LSP

 Original nexthop: 10.159.5.11 // Indicates that the private network route is generated on RSG-4 (10.159.5.11).

 Qos information : 0x0

 Ext-Community: RT <64512 : 101>, RT <65501 : 111>

 AS-path Nil, origin incomplete, MED 100, localpref 100, pref-val 0, valid, inte

rnal, pre 255, not preferred for Cluster List

 Originator: 10.159.6.2

 Cluster list: 10.11.0.2

 Not advertised to any peer yet

//According to the IGP routing table, it can be confirmed that the IP Nexthop and IP Out-interface iterations are the outgoing interface and the next hop to Original nexthop: 10.159.5.11.

IGP routing-table:

//route from P1 to RSG-3

[~P1]disp ip routing-table 10.119.0.2

Route Flags: R – relay, D – download to fib, T – to vpn-instance

—————————————————————————— 

Routing Table : _public_

Summary Count : 1

Destination/Mask Proto Pre Cost Flags NextHop Interface

 10.119.0.2/32 OSPF 10 500 D 10.11.2.202 Eth-Trunk11

// route from P1 to RSG-4

[~P1]disp ip routing-table 10.159.5.11

Route Flags: R – relay, D – download to fib, T – to vpn-instance

—————————————————————————— 

Routing Table : _public_

Summary Count : 1

Destination/Mask Proto Pre Cost Flags NextHop Interface

10.159.5.11/32 OSPF 10 505 D 10.11.0.1 Tunnel0/1/2

//If the outbound interface is a tunnel interface, Nexthop is the local PE address.

// route from P1 to P2

[~P1]disp ip routing-table 10.11.0.2

Route Flags: R – relay, D – download to fib, T – to vpn-instance

—————————————————————————— 

Routing Table : _public_

Summary Count : 1

Destination/Mask Proto Pre Cost Flags NextHop Interface

 10.11.0.2/32 OSPF 10 5 D 10.11.0.1 Tunnel0/1/2