# An Optimization Routing Algorithm Based on Segment Routing in Software-Defined Networks
## 1 Introduction  
Software-Defined networks (SDNs) [1] are becoming an innovative paradigm for next-generation networks. The defining feature of SDNs compared to traditional networks is that they decouple the network control plane from the data plane, simplify network management, and make it more flexible. SDN abstracts the network to shield the underlying complexity and the SDN controller provides simple and efficient configuration for the upper application layer [2]. The SDN controller determines the forwarding path for each flow in the network. OpenFlow [3] is a standardized interface that can communicate with the data plane by the controller. OpenFlow separates control functions from the network devices and maintains the flow table structure on the network devices. Segment routing (SR) [4] can help optimize the network capabilities of IP and MPLS and enable the network to achieve better scalability. The key idea of SR is to perform routing by a few middle points based on a sequence of logical segments formed between the ingress and egress nodes. And the intermediate switch only needs to know how to reach the middle points and to forward packets. SR [5] avoids the requirement for millions of tag encodings to be stored along each path in each network device, so SR reduces the number of forwarding rules in TCAM [6]. In addition, SR eliminates the complexity of maintaining a mass of forwarding rules, so it is able to reduce overhead and the cost of traffic engineering (TE) [7, 8]. In network services, users or networks have different requirements. For example, some users have requirements of providing independent paths to achieve routing separation in their networks. Some users need to avoid special paths in routing, and some price-insensitive users require the minimum delay or higher bandwidth. The combination of SR and SDN can well meet the differentiatednetwork services and quickly set up and implement deployment. Traffic engineering is necessary to improve the efficiency of the network and application performance for operators. The SDN controller does not need to add extra forwarding rules to each individual switch along a path [9]. The SDN controller only needs to code end-to-end routing information into an ordered list of tags and store it in the packet header. The intermediate nodes do not need to run complex signaling protocols to maintain the state information of each flow. So, SR greatly simplifies the complexity of network equipment. SR adds a packet header containing an ordered list of labels in the ingress node of the network edge. The intermediate nodes only need to forward the IP packets according to the ordered lists in the segment header [4]. All the state information of routing is maintained by the ingress node. With the gradual expansion of the network scale, the complexity of networks is constantly increasing. Therefore, routing algorithms face severe challenges and oreals. The most common performance indicators of routing calculation are cost, hop count, throughput, load balance, delay, jitter, bandwidth, packet loss rate and so on. The evaluation indicators of traditional routing algorithms are mainly divided into two parts. One is for the requirement of overall service quality of the network, such as hop count, throughput, cost, load balance, bandwidth and so on and the other is for the requirement of quality of data transmission based on business, such as delay, jitter, packet loss rate and so on. Most routing algorithms optimize one or more indicators for the overall service quality of the network or optimize the overall service quality under the condition of satisfying certain transmission quality. Since each business has different requirements on transmission quality, most of the existing routing algorithms are not informed by much research on how different businesses can obtain better transmission with a certain network performance guarantees. In this paper, we address traffic engineering with SR in SDN.