A method for switching a primary broadband network gateway, BNG, and a backup BNG, wherein the method is applied to a system comprising a database, a first BNG, and a second BNG; the first BNG is the primary BNG, and the second BNG is the backup BNG; the primary BNG processes a service of a user; and the method comprises after common attribute information of the first BNG and the second BNG is written by the first BNG into the database and before the second BNG switches to the primary BNG, reading, by the second BNG, the common attribute information of the first BNG and the second BNG from the database, wherein the common attribute information of the first BNG and the second BNG includes an Internet Protocol, IP, address pool, information associated with virtual local area network, VLAN, or a quality of service, QoS, policy; after static information of the user is written by the first BNG into the database and before the second BNG switches to the primary BNG, reading, by the second BNG, the static information of the user from the database, wherein the static information of the user is used to identify the user; monitoring a status of the first BNG by the second BNG through link detection to determine whether the first BNG encounters a fault; when the second BNG determines that the first BNG encounters the fault and is incapable of continuing processing the service, reading, by the second BNG from the database, dynamic information generated by the service on the first BNG, wherein the dynamic information generated by the service on the first BNG is synchronously written by the first BNG into the database, wherein the dynamic information generated by the service on the first BNG includes charging information that is used for real-time traffic statistics collection; and switching, by the second BNG, to the primary BNG, and replacing the first BNG to process the service when the second BNG determines that the first BNG encounters the fault. after common attribute information of the first BNG and the second BNG is written by the first BNG into the database and before the second BNG switches to the primary BNG, reading, by the second BNG, the common attribute information of the first BNG and the second BNG from the database, wherein the common attribute information of the first BNG and the second BNG includes an Internet Protocol, IP, address pool, information associated with virtual local area network, VLAN, or a quality of service, QoS, policy; after static information of the user is written by the first BNG into the database and before the second BNG switches to the primary BNG, reading, by the second BNG, the static information of the user from the database, wherein the static information of the user is used to identify the user; monitoring a status of the first BNG by the second BNG through link detection to determine whether the first BNG encounters a fault; when the second BNG determines that the first BNG encounters the fault and is incapable of continuing processing the service, reading, by the second BNG from the database, dynamic information generated by the service on the first BNG, wherein the dynamic information generated by the service on the first BNG is synchronously written by the first BNG into the database, wherein the dynamic information generated by the service on the first BNG includes charging information that is used for real-time traffic statistics collection; and switching, by the second BNG, to the primary BNG, and replacing the first BNG to process the service when the second BNG determines that the first BNG encounters the fault.