No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

BGP Peer Relationship Fails to Be Established Due to the Incorrect Configuration of connect-interface for IPv6 BGP on Ro

Publication Date:  2013-09-03 Views:  36 Downloads:  0
Issue Description

As shown in the preceding figure, two NE40E-8 routers (VRP V600R003C00SPC900) are directly connected. OSPFv3 is used as the IGP. The two routers use loopback interfaces with IPv6 addresses as 2001:DB8:1::1 and 2001:DB8:2::1 to establish an IPv6 IBGP peer relationship. The configuration is as follows:
On R1:
ipv6
#
ospfv3 1
router-id 1.1.1.1
#
interface Ethernet0/0/2
undo shutdown
ipv6 enable
ipv6 address 2001:DB8:120::1/64
ospfv3 1 area 0.0.0.1
#
interface LoopBack0
ipv6 enable
ipv6 address 2011:DB8:1::1/128
ipv6 address 2001:DB8:1::1/128
ospfv3 1 area 0.0.0.1
#
bgp 65000
router-id 1.1.1.1
peer 2001:DB8:2::1 as-number 65000
peer 2001:DB8:2::1 connect-interface LoopBack0
#
ipv4-family unicast
undo synchronization
#
ipv6-family unicast
undo synchronization
peer 2001:DB8:2::1 enable

On R2:
ipv6
#
ospfv3 1
router-id 2.2.2.2
#
interface Ethernet0/0/3
undo shutdown
ipv6 enable
ipv6 address 2001:DB8:120::2/64
ospfv3 1 area 0.0.0.1
#
interface LoopBack0
ipv6 enable
ipv6 address 2011:DB8:2::1/128
ipv6 address 2001:DB8:2::1/128
ospfv3 1 area 0.0.0.1
#
bgp 65000
router-id 2.2.2.2
peer 2001:DB8:1::1 as-number 65000
peer 2001:DB8:1::1 connect-interface LoopBack0
#
ipv4-family unicast
undo synchronization
#
ipv6-family unicast
undo synchronization
peer 2001:DB8:1::1 enable

Check the status of the BGP peer relationship.

[R1]dis bgp ipv6 peer

BGP local router ID : 1.1.1.1
Local AS number : 65000
Total number of peers : 1 Peers in established state : 0

Peer V AS MsgRcvd MsgSent OutQ Up/Down State PrefRcv
2001:DB8:2::1 4 65000 0 0 0 00:09:27 Active 0

[R2]dis bgp ipv6 peer

BGP local router ID : 2.2.2.2
Local AS number : 65000
Total number of peers : 1 Peers in established state : 0

Peer V AS MsgRcvd MsgSent OutQ Up/Down State PrefRcv
2001:DB8:1::1 4 65000 0 0 0 00:10:21 Active 0


The command output shows that the BGP peer relationship keeps in Active state.
Handling Process

Capture packets for analysis.

R2 initiates a TCP connection with R1 using the source IPv6 address 2011:DB8:2::1 and destination IPv6 address 2001:DB8:1::1. R1 returns an [RST, ACK] packet with the source IPv6 address 2001:DB8:1::1 and destination IPv6 address 2011:DB8:2::1. The TCP connection is terminated, and the BGP peer relationship fails to be established.
The source IPv6 address in the TCP packet that R1 receives for establishing the BGP peer relationship is 2011:DB8:2::1, whereas the peer IPv6 address is specified as 2001:DB8:2::1 in the peer command on R1. The two IPv6 addresses are different. Therefore, R1 returns an [RST, ACK] packet.
Both peer IPv6 addresses are specified as 2001:DB8:X::1 in the peer command on R1 and R2. Therefore, the source IPv6 addresses of connect-interface must be specified as 2001:DB8:X::1 on the local device. However, two IPv6 addresses are configured for the Loopback 0 interface respectively on R1 and R2.
R1:
interface LoopBack0
ipv6 enable
ipv6 address 2011:DB8:1::1/128
ipv6 address 2001:DB8:1::1/128
ospfv3 1 area 0.0.0.1

R2:
interface LoopBack0
ipv6 enable
ipv6 address 2011:DB8:2::1/128
ipv6 address 2001:DB8:2::1/128
ospfv3 1 area 0.0.0.1
Obviously, R2 uses the first IPv6 address of Loopback 0 as the source address in the BGP packet.

 

Root Cause
When multiple IPv6 addresses are configured for a loopback interface, the first IPv6 address is preferentially used as the source IP address in negotiation packets. In this case, the second IPv6 address is configured as the peer address for BPG. Therefore, the BGP peer relationship fails to be established.
Solution
Change the sequence of the two IPv6 addresses for Loopback 0.
R1:
interface LoopBack0
ipv6 enable
ipv6 address 2001:DB8:1::1/128
ipv6 address 2011:DB8:1::1/128
ospfv3 1 area 0.0.0.1

R2:
interface LoopBack0
ipv6 enable
ipv6 address 2001:DB8:2::1/128
ipv6 address 2011:DB8:2::1/128
ospfv3 1 area 0.0.0.1

Check the status of the BGP peer relationship.
[R1]dis bgp ipv6 peer

BGP local router ID : 1.1.1.1
Local AS number : 65000
Total number of peers : 1 Peers in established state : 1

Peer V AS MsgRcvd MsgSent OutQ Up/Down State PrefRcv
2001:DB8:2::1 4 65000 6 6 0 00:04:38 Established 0

[R2]dis bgp ipv6 peer

BGP local router ID : 2.2.2.2
Local AS number : 65000
Total number of peers : 1 Peers in established state : 1

Peer V AS MsgRcvd MsgSent OutQ Up/Down State PrefRcv
2001:DB8:1::1 4 65000 6 6 0 00:04:58 Established 0

Capture packets again.


Suggestions
When two routers establish an IPv6 BGP relationship, use the first IPv6 address of the source interface.


END