A method for detecting a state of a border gateway protocol, BGP, session, wherein the method is applied to a first network device , the first network device and a second network device have a BGP neighbor relationship, and the method comprises the steps of : creating (S501), by the first network device , a seamless bidirectional forwarding detection SBFD session, wherein the SBFD session is an SBFD session corresponding to a BGP session between the first network device and the second network device , the first network device is an initiator of the SBFD session, the second network device is a reflector of the SBFD session, and the BGP session is a session created based on the BGP neighbor relationship; sending (S502), by the first network device , an SBFD packet to the second network device based on the SBFD session; and determining (S503), by the first network device , a state of the BGP session based on a state of feedback by the second network device for the SBFD packet, wherein a remaining processing capability of the first network device is not lower than a remaining processing capability of the second network device , and wherein the method further comprises the steps of : receiving, by the first network device , a configuration parameter that is of the SBFD session and that is statically configured for the BGP session; or obtaining, by the first network device , neighbor information of the BGP session that is dynamically created, wherein the neighbor information comprises a configuration parameter of the SBFD session, and the configuration parameter is a parameter used by the first network device to create the SBFD session; and the creating, by the first network device , an SBFD session comprises: creating, by the first network device , the SBFD session based on the configuration parameter. creating (S501), by the first network device , a seamless bidirectional forwarding detection SBFD session, wherein the SBFD session is an SBFD session corresponding to a BGP session between the first network device and the second network device , the first network device is an initiator of the SBFD session, the second network device is a reflector of the SBFD session, and the BGP session is a session created based on the BGP neighbor relationship; sending (S502), by the first network device , an SBFD packet to the second network device based on the SBFD session; and determining (S503), by the first network device , a state of the BGP session based on a state of feedback by the second network device for the SBFD packet, wherein a remaining processing capability of the first network device is not lower than a remaining processing capability of the second network device , and wherein the method further comprises the steps of : receiving, by the first network device , a configuration parameter that is of the SBFD session and that is statically configured for the BGP session; or obtaining, by the first network device , neighbor information of the BGP session that is dynamically created, wherein the neighbor information comprises a configuration parameter of the SBFD session, and the configuration parameter is a parameter used by the first network device to create the SBFD session; and the creating, by the first network device , an SBFD session comprises: creating, by the first network device , the SBFD session based on the configuration parameter. <EOS>