摘要 |
Disclosed are a method for upgrading a network device version and a network device, which relate to the field of communications and solve the technical problem of network congestion caused by over occupancy of network bandwidths which results from a large number of broadcast packets being required to be sent in network device version upgrading. The specific solution is: configuring a forwarding plane of the network device to be a first forwarding plane and a second forwarding plane; sampling a forwarded packet at a pre-determined sampling proportion on the first forwarding plane to obtain a sampled packet; broadcasting and forwarding, by the second forwarding plane, the sampled packet to learn a MAC address; and when the number of MAC addresses learned by the second forwarding plane reaches a preset threshold value, upgrading the second forwarding plane for packet forwarding of the network device. The technical solution provided in the embodiments of the present invention can effectively avoid producing a large number of broadcast packets in the process of version upgrading, and can be beneficial to reduce over occupancy of network bandwidths so as to avoid network congestion. |