The invention discloses a method for distributing and updating routing information in an SD-WAN network and a controller, relating to the field of controllers and routing, including collecting routing information after the SD-WAN controller is connected to the SD-WAN network, and converting the entire network The routing information, the routing information sent to the device, and the routing information associated with the network are stored separately; when the user establishes a service, the controller sends part of the routing information to the associated device as needed according to the network identifier and routing prefix, and stores the information of the network and the device. corresponding relationship, and refresh the mapping relationship between routing information and network. In the method for distributing and updating routing information in the SD-WAN network of the present invention, the SD-WAN controller serves as the control plane to establish a connection with the device, centrally manage the device, collect the routing information of the SD-WAN network and update it in time, so that the device is only responsible for forwarding, Improve data forwarding performance.