CPC H04L 45/021 (2013.01) [H04L 45/04 (2013.01); H04L 45/18 (2013.01); H04L 45/22 (2013.01)] | 17 Claims |
1. A method comprising:
obtaining, by a network device, a border gateway protocol (BGP) route, wherein the BGP route comprises an autonomous system path attribute (AS_PATH attribute), the AS_PATH attribute comprises one or more autonomous system (AS) numbers corresponding to one or more autonomous systems, among which BGP route information is routed starting from an origin autonomous system originating routing of the BGP route information, and wherein the one or more AS numbers comprise a first AS number, the network device is located in or manages a first autonomous system corresponding to a second AS number, and the first AS number is equal to the second AS number; and
determining, by the network device based on the BGP route, the first AS number, the second AS number, and whether the first AS number corresponds to the origin autonomous system, whether the BGP route is abnormal, wherein determining whether the BGP route is abnormal comprises:
when the first AS number does not correspond to the origin autonomous system, and no BGP session is established between the first autonomous system and a second autonomous system corresponding to a fourth AS number in the one or more AS numbers, determining, by the network device, that the BGP route is abnormal, wherein the fourth AS number corresponds to a neighbor autonomous system of the first autonomous system.
|