A method for detecting connectivity of user network interface in a layer 2 virtual private network, L2VPN, comprising: acquiring a configuration parameter used for detecting connectivity of a user network interface between a source address and a destination address in the L2VPN; transmitting an Internet Control Message Protocol, ICMP, request packet from the source address to the destination address based on the configuration parameter and receiving an ICMP response packet responded by the destination address; and calculating out a round-trip time value of a link between the source address and the destination address after receiving the ICMP response packet responded by the destination address, and then collecting statistics on the connectivity of the user network interface between the source address and the destination address according to the round-trip time value obtained by calculation, characterized in that, before receiving the ICMP response packet responded by the destination address, the method further comprises: determining whether the configuration parameter can be matched to control and information protocol, CIP, information; prompting an error of the configuration parameter when the configuration parameter cannot be matched to the CIP information; and sending the configuration parameter to an access control list and adding a rule used for receiving the ICMP response packet responded by the destination address into the access control list when the configuration parameter can be matched to the CIP information. acquiring a configuration parameter used for detecting connectivity of a user network interface between a source address and a destination address in the L2VPN; transmitting an Internet Control Message Protocol, ICMP, request packet from the source address to the destination address based on the configuration parameter and receiving an ICMP response packet responded by the destination address; and calculating out a round-trip time value of a link between the source address and the destination address after receiving the ICMP response packet responded by the destination address, and then collecting statistics on the connectivity of the user network interface between the source address and the destination address according to the round-trip time value obtained by calculation, characterized in that, before receiving the ICMP response packet responded by the destination address, the method further comprises: determining whether the configuration parameter can be matched to control and information protocol, CIP, information; prompting an error of the configuration parameter when the configuration parameter cannot be matched to the CIP information; and sending the configuration parameter to an access control list and adding a rule used for receiving the ICMP response packet responded by the destination address into the access control list when the configuration parameter can be matched to the CIP information. determining whether the configuration parameter can be matched to control and information protocol, CIP, information; prompting an error of the configuration parameter when the configuration parameter cannot be matched to the CIP information; and sending the configuration parameter to an access control list and adding a rule used for receiving the ICMP response packet responded by the destination address into the access control list when the configuration parameter can be matched to the CIP information.