IP Library Granted Patent US 12,301,442
Granted Patent B2
US 12,301,442 · App. 18/303,894 · Granted May 13, 2025

Method and apparatus for establishing border gateway protocol BGP peer, device, and system

Inventors: Hongjie Yang (Beijing, CN); Shuanglong Chen (Beijing, CN); Zhenbin Li (Beijing, CN)
Assignee: HUAWEI TECHNOLOGIES CO., LTD.
H04L45/04H04L45/026H04L69/164
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,301,442
App. No.
18/303,894
Granted
May 13, 2025
Kind
B2
Abstract

A method and an apparatus for establishing a BGP peer, a device, and a system. A first network device sends a first packet to a second network device in a UDP manner, where the first packet is used to establish a BGP peer with the second network device; and if the first network device can receive a second packet sent by the second network device in the UDP manner, the first network device establishes a BGP peer relationship with the second network device in response to the received second packet.

Claims (43)

1. A method for establishing a border gateway protocol (BGP) peer, comprising:

sending, by a first network device, a first packet to a second network device in a user datagram protocol (UDP) manner, wherein the first packet is used to establish the BGP peer with the second network device;

receiving, by the first network device, a second packet sent by the second network device in the UDP manner, wherein the second packet is used to establish the BGP peer with the first network device; and

establishing, by the first network device, a BGP peer relationship with the second network device in response to receiving the second packet by using an idle state and an open sent state, wherein the idle state and the open sent state in the first network device are two consecutive states in a state machine of the BGP peer relationship.

2. The method according to claim 1 , wherein the first packet is an open packet, and the open packet comprises an identifier of an autonomous system (AS) to which the first network device belongs and a BGP identifier of the first network device.

3. The method according to claim 1 , wherein the first network device stores the state machine of the BGP peer relationship, the state machine is in the idle state before the first network device sends the first packet to the second network device in the UDP manner, and after the sending, by the first network device, the first packet to the second network device in the UDP manner, the method further comprises:

switching, by the first network device, the state machine from the idle state to the open sent state.

4. The method according to claim 1 , wherein the first network device stores a state machine of the BGP peer relationship, and before the sending, by the first network device, the first packet to the second network device in the UDP manner, the method further comprises:

switching, by the first network device, the state machine from the idle state to the open sent state.

5. The method according to claim 1 , wherein the first network device stores a state machine of the BGP peer relationship, and the method further comprises:

switching, by the first network device, the state machine from the idle state to the open sent state when sending the first packet to the second network device in the UDP manner.

6. The method according to claim 1 , wherein after the sending, by the first network device, the first packet to the second network device in the UDP manner, the method further comprises:

sending, by the first network device, an open packet to the second network device in the UDP manner when no reply packet that is for the first packet and that is sent by the second network device is received within first preset duration.

7. The method according to claim 1 , wherein the second packet is a Keepalive packet, and the second packet indicates that the second network device is reachable.

8. The method according to claim 1 , wherein after the sending, by the first network device, the first packet to the second network device in the UDP manner, the method further comprises:

receiving, by the first network device, a third packet sent by the second network device in the UDP manner, wherein the third packet is used to establish a BGP peer relationship with the first network device; and

determining, by the first network device, whether the third packet is correct, wherein that the third packet is correct means that a capability that is supported by the second network device and that is indicated by the third packet and a capability that is supported by the first network device and that is indicated by the first packet have matching content.

9. The method according to claim 1 , wherein the second packet is an open packet.

10. A network device, comprising:

at least one processor;

one or more memories coupled to the at least one processor and storing programming instructions, wherein the at least one processor is configured to execute the programming instructions to cause the network device to:

send a first packet to a second network device in a user datagram protocol (UDP) manner, wherein the first packet is used to establish a border gateway protocol (BGP) peer with the second network device;

receive a second packet sent by the second network device in the UDP manner, wherein the second packet is used to establish a BGP peer with the first network device; and

establish a BGP peer relationship with the second network device in response to receiving the second packet by using an idle state and an open sent state, wherein the idle state and the open sent state in the first network device are two consecutive states in a state machine of the BGP peer relationship.

11. The network device according to claim 10 , wherein the first packet is an open packet, and the open packet comprises an identifier of an autonomous system (AS) to which the first network device belongs and a BGP identifier of the first network device.

12. The network device according to claim 10 , wherein the first network device stores the state machine of the BGP peer relationship, the state machine is in the idle state before the first network device sends the first packet to the second network device in the UDP manner, and wherein the programming instructions, when executed by the at least one processor, further cause the network device to:

switch the state machine from the idle state to the open sent state.

13. The network device according to claim 10 , wherein the first network device stores the state machine of the BGP peer relationship, and wherein the programming instructions, when executed by the at least one processor, further cause the network device to:

switch the state machine from the idle state to the open sent state.

14. The network device according to claim 10 , wherein the first network device stores the state machine of the BGP peer relationship, and wherein the programming instructions, when executed by the at least one processor, further cause the network device to:

switch the state machine from the idle state to the open sent state when sending the first packet to the second network device in the UDP manner.

15. The network device according to claim 10 , wherein the programming instructions, when executed by the at least one processor, further cause the network device to:

send an open packet to the second network device in the UDP manner when no reply packet that is for the first packet and that is sent by the second network device is received within first preset duration.

16. The network device according to claim 10 , wherein the second packet is a Keepalive packet, and the second packet indicates that the second network device is reachable.

17. The network device according to claim 10 , wherein the programming instructions, when executed by the at least one processor, further cause the network device to:

receive a third packet sent by the second network device in the UDP manner, wherein the third packet is used to establish a BGP peer relationship with the first network device; and

determine whether the third packet is correct, wherein that the third packet is correct means that a capability that is supported by the second network device and that is indicated by the third packet and a capability that is supported by the first network device and that is indicated by the first packet have matching content.

18. The network device according to claim 10 , wherein the second packet is an open packet.

19. A network system comprising a first network device and a second network device, wherein the network device is configured to:

send a first packet to the second network device in a user datagram protocol (UDP) manner, wherein the first packet is used to establish a border gateway protocol (BGP) peer with the second network device;

receive a second packet sent by the second network device in the UDP manner, wherein the second packet is used to establish a BGP peer with the first network device; and

establish a BGP peer relationship with the second network device in response to receiving the second packet by using an idle state and an open sent state, wherein the idle state and the open sent state in the first network device are two consecutive states in a state machine of the BGP peer relationship.

20. The network system according to claim 19 , wherein the first packet is an open packet, and the open packet comprises an identifier of an autonomous system (AS) to which the first network device belongs and a BGP identifier of the first network device.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 21, 2025
From: YANG, HONGJIE; CHEN, SHUANGLONG; LI, ZHENBIN
To: HUAWEI TECHNOLOGIES CO., LTD.
Reel/Frame 070285/0840 →
Priority Claims (3)
CN 202011135818.6 · Oct 22, 2020 · national
CN 202011248641.0 · Nov 10, 2020 · national
CN 202110263464.1 · Mar 11, 2021 · national
Continuity (2)
Continuation PCTCN2021125882 · Oct 22, 2021
Related Publication 20230269168A1 · Aug 24, 2023
References Cited (9)
US 10200274B1 · Suryanarayana et al. · 2019 [cited by applicant]
US 10764120B1 · Means · 2020 [cited by examiner]
US 20060087977A1 · Tatman · 2006 [cited by examiner]
US 20120120812A1 · Gerber · 2012 [cited by examiner]
US 20150207728A1 · Gagliano · 2015 [cited by examiner]
US 20210360716A1 · Yang · 2021 [cited by examiner]
Liao et al., “The Realization of Inter-Domain Routing Protocol Based on UDP for Integrated Network”, Journal of Guangxi Normal University (Nature Science Edition), China Academic Journal Electronic Publishing House, Dec… [cited by applicant]
Rekhter et al., “A Border Gateway Protocol 4 (BGP-4)”, Network Working Group, The Internet Society, Jan. 2006, 104 pages. [cited by applicant]
IETF et al., “QUIC-Communication Protocol”, Wikipedia, Oct. 12, 2012, 14 pages. [cited by applicant]