The invention discloses a method and device for correcting
network topology, relates to the field of
information technology, and can improve the accuracy of
network topology. The method includes: firstly determining the connection relationship between the three-
layer interface and the subnet, then searching for the three-
layer interface connected with the virtual
private network routing and forwarding table VRF interface on the
service provider border
router PE, and connecting the VRF interface on the PE The routing identifier RD corresponding to the interface is added to the Layer 3 interface connected to the VRF interface on the PE, and then added according to the connection relationship between the Layer 3 interface and the subnet, and the Layer 3 interface connected to the VRF interface on the PE. RD, determine the subnet that needs to create a subnet copy, and create a subnet copy, and finally correct the
network topology based on the connection relationship between the Layer 3 interface and the subnet, and the subnet copy. The invention is suitable for creating a copy of the subnet when a subnet is connected with multiple customer border routers, and correcting the network topology according to the created copy of the subnet.