[go: up one dir, main page]

CN103825823B - Data forwarding method based on different priorities in software-defined network - Google Patents

Data forwarding method based on different priorities in software-defined network Download PDF

Info

Publication number
CN103825823B
CN103825823B CN201410074396.4A CN201410074396A CN103825823B CN 103825823 B CN103825823 B CN 103825823B CN 201410074396 A CN201410074396 A CN 201410074396A CN 103825823 B CN103825823 B CN 103825823B
Authority
CN
China
Prior art keywords
routing
route
forwarding
static
enabled
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN201410074396.4A
Other languages
Chinese (zh)
Other versions
CN103825823A (en
Inventor
黄刘生
张鑫
徐宏力
孙文君
牛庆功
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
University of Science and Technology of China USTC
Original Assignee
University of Science and Technology of China USTC
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by University of Science and Technology of China USTC filed Critical University of Science and Technology of China USTC
Priority to CN201410074396.4A priority Critical patent/CN103825823B/en
Publication of CN103825823A publication Critical patent/CN103825823A/en
Application granted granted Critical
Publication of CN103825823B publication Critical patent/CN103825823B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a data forwarding method based on different priorities in a software-defined network. Through the method, a routing flow table is divided into a static route, a dynamic route and a default route which respectively represent forwarding routes with different priorities. When a route is decided, an exchanger is used for detecting the route according to the priorities from the highest to the lowest and selecting the route with the highest priority to forward data. According to the route policy, the forwarding route can be selected by the data forwarding method according to real-time flow condition and user demand of the network, so that the data transmission efficiency is increased and the network jam is effectively relieved; therefore, the data forwarding method disclosed by the invention has wide application prospect.

Description

基于不同优先级的软件定义网络中数据转发方法Data forwarding method in software-defined network based on different priorities

技术领域technical field

本发明属于网络路由技术领域,具体涉及一种在软件定义网络(SoftwareDefined Network,SDN)中基于优先级的路由框架。The invention belongs to the technical field of network routing, and in particular relates to a priority-based routing framework in a software-defined network (Software Defined Network, SDN).

背景技术Background technique

由于现有网络架构的种种局限性,催生了SDN的产生。如果将网络中所有的网络设备视为被管理的资源,那么参考操作系统的原理,可以抽象出一个网络操作系统(NetworkOS)的概念—这个网络操作系统一方面抽象了底层网络设备的具体细节,同时还为上层应用提供了统一的管理视图和编程接口,这样,基于网络操作系统这个平台,用户可以开发各种应用程序,通过软件来定义逻辑上的网络拓扑,以满足对网络资源的不同需求,而无需关心底层网络的物理拓扑结构,这就是SDN。Due to various limitations of the existing network architecture, SDN was born. If all network devices in the network are regarded as managed resources, then the concept of a network operating system (NetworkOS) can be abstracted by referring to the principle of the operating system. On the one hand, this network operating system abstracts the specific details of the underlying network devices. At the same time, it also provides a unified management view and programming interface for upper-layer applications. In this way, based on the network operating system platform, users can develop various applications and define logical network topology through software to meet different requirements for network resources. , without having to care about the physical topology of the underlying network, this is SDN.

SDN相对于传统的网络有很多优势。控制器可以掌握整个网络的状态、数据等拓扑信息,根据这些信息,可以实现很多功能,例如:(1)将开放式最短路径优先(Open ShortestPath First,OSPF)网络中的路径开销放在控制器中计算,比现有的计算方式快很多。(2)计算路由的速度会比原有的计算方式快很多。(3)可为一些问题预先提供解决方法,当问题出现时可以更快的解决。SDN has many advantages over traditional networks. The controller can grasp the topology information such as the status and data of the entire network. Based on this information, many functions can be realized, for example: (1) Put the path cost in the Open Shortest Path First (OSPF) network on the controller The calculation is much faster than the existing calculation method. (2) The speed of calculating the route will be much faster than the original calculation method. (3) It can provide solutions to some problems in advance, and can solve problems faster when they appear.

现有的网络中路由表的生成靠的是自学习算法,每台路由器只能从邻居了解路由信息,很容易产生环路。学习和维护路由表的数据包会占用一定链路带宽和路由器资源。随着SDN的发展和普及,在SDN中为用户提供的服务会越来越多。openflow实现了数据层和控制层的分离,其中openflow交换机进行数据层的转发,而Controller实现了控制层的功能。Controller通过openflow协议这个标准接口对openflow交换机中的流表进行控制,从而实现对整个网络进行集中控制。流表由很多个流表项组成,每个流表项就是一个转发规则。进入交换机的数据包通过查询流表来获得转发的目的端口。流表项由头域、计数器和操作组成;其中头域是个十元组,是流表项的标识;计数器用来计数流表项的统计数据;操作标明了与该流表项匹配的数据包应该执行的操作。现有网络的路由协议通常不适合于软件定义网络,本发明因此而来。The generation of the routing table in the existing network relies on the self-learning algorithm, and each router can only learn the routing information from its neighbors, which is easy to generate loops. The data packets for learning and maintaining the routing table will occupy certain link bandwidth and router resources. With the development and popularization of SDN, more and more services will be provided to users in SDN. Openflow realizes the separation of the data layer and the control layer, in which the openflow switch forwards the data layer, and the Controller realizes the function of the control layer. The controller controls the flow table in the openflow switch through the standard interface of the openflow protocol, so as to realize centralized control of the entire network. A flow table consists of many flow entries, and each flow entry is a forwarding rule. The data packet entering the switch obtains the forwarding destination port by querying the flow table. A flow entry is composed of a header field, a counter, and an operation; the header field is a ten-tuple, which is the identifier of the flow entry; the counter is used to count the statistical data of the flow entry; the operation indicates that the data packet matching the flow entry should The action to perform. The routing protocols of existing networks are generally not suitable for software-defined networking, and the present invention follows.

发明内容Contents of the invention

本发明提供了一种基于不同优先级的SDN路由框架,该框架提供一种根据不同优先级选择转发下一跳的方法,根据不同的用户需求提供不同的网络转发服务。The present invention provides an SDN routing framework based on different priorities. The framework provides a method for selecting forwarding next hops according to different priorities, and provides different network forwarding services according to different user requirements.

为了实现上述服务,本发明提供的技术方案是:In order to realize above-mentioned service, the technical scheme that the present invention provides is:

一种基于不同优先级的软件定义网络中数据转发方法,其特征在于所述方法按照如下步骤进行:A method for forwarding data in a software-defined network based on different priorities, characterized in that the method is performed according to the following steps:

(1)当源需要向汇发送数据包时,控制器判断从源到汇的静态路由是否启用;如果静态路由已启用,则交换机按照静态路由选择下一跳转发节点;否则,执行步骤(2);(1) When the source needs to send data packets to the sink, the controller judges whether the static route from the source to the sink is enabled; if the static route is enabled, the switch selects the next hop forwarding node according to the static route; otherwise, execute the steps ( 2);

(2)控制器判断从源到汇的动态路由是否启用;如果已启用,控制器根据路由选择规则和网络的实时状态计算出从源到汇的转发路径,交换机按计算出来的转发路径选择下一跳转发节点;如果未启用,则执行步骤(3);(2) The controller judges whether the dynamic routing from source to sink is enabled; if it is enabled, the controller calculates the forwarding path from source to sink according to the routing selection rules and the real-time status of the network, and the switch selects the forwarding path according to the calculated forwarding path. One-hop forwarding node; if not enabled, perform step (3);

(3)交换机根据默认路由来选择下一跳转发节点。(3) The switch selects the next hop forwarding node according to the default route.

优选的,所述方法中启用或不启用静态路由以及启用或不启动动态路由是软件定义网络中管理员根据需求在控制器中进行设置。Preferably, enabling or disabling static routing and enabling or disabling dynamic routing in the method are set in the controller according to requirements by the administrator in the software-defined network.

优选的,所述方法中静态路由是管理员手动设置的转发路径;当启用静态路由时,交换机根据设置的静态路由选择下一跳转发节点。Preferably, in the method, the static route is a forwarding path manually set by the administrator; when the static route is enabled, the switch selects the next-hop forwarding node according to the set static route.

优选的,所述方法中默认路由是控制器根据最短路径方法计算出从源到汇的转发路径。Preferably, the default route in the method is the forwarding path from the source to the sink calculated by the controller according to the shortest path method.

优选的,所述方法中软件定义网络为采用openflow协议的软件定义网络,openflow交换机根据数据报头(packet header)的匹配结果选择转发路由。Preferably, the software-defined network in the method is a software-defined network using the openflow protocol, and the openflow switch selects a forwarding route according to a matching result of a packet header.

优选的,所述方法中数据报头设置有匹配字段Match Fields、优先权字段Priority、计数字段Counters、指令字段Instructions、超时字段Timeouts、Cookie;当存在多条匹配路由表项时,选择优先级最高的路由表项转发;其中Priority字段为路由表项的优先级,优先级排序为静态路由>动态路由>默认路由。Preferably, in the method, the data header is provided with matching fields Match Fields, priority field Priority, counting field Counters, instruction field Instructions, timeout field Timeouts, Cookie; when there are multiple matching routing entries, select the highest priority Routing table entry forwarding; the Priority field is the priority of the routing table entry, and the order of priority is static route > dynamic route > default route.

优选的,所述方法中管理员根据openflow协议在openflow控制器中增加、删除、修改路由表项。Preferably, in the method, the administrator adds, deletes, and modifies routing table items in the openflow controller according to the openflow protocol.

优选的,所述方法中管理员设置的静态路由启用后,openflow控制器将该静态路由写入openflow交换机,同时检查流表,如果有静态路由与刚写入的静态路由的源和汇相同,则删除。Preferably, after the static route set by the administrator in the method is enabled, the openflow controller writes the static route into the openflow switch, and checks the flow table at the same time. If there is a static route with the same source and sink as the static route just written, is deleted.

优选的,所述方法中静态路由未启用,而管理员启用动态路由后,控制器依据路由选择规则和网络的实时状态计算出从源到汇的转发路径,并将计算的路由结果写入openflow交换机。Preferably, static routing is not enabled in the method, and after the administrator enables dynamic routing, the controller calculates the forwarding path from the source to the sink according to the routing rules and the real-time state of the network, and writes the calculated routing result into openflow switch.

优选的,所述方法中默认路由是openflow控制器会根据最短路径方法计算出从源到汇的转发路径,并将默认路由写入openflow交换机;在静态路由或动态路由都未启用时,openflow交换机会根据默认路由选择下一跳转发节点。Preferably, the default route in the method is that the openflow controller will calculate the forwarding path from the source to the sink according to the shortest path method, and write the default route into the openflow switch; when static routing or dynamic routing is not enabled, the openflow switch The next hop forwarding node will be selected according to the default route.

本发明的原理在于将路由分为三大类型:静态路由、动态路由或默认路由。将按优先级转发过程通过路由选择进行体现,其中静态路由的优先级最高,动态路由的优先级其次,默认路由的优先级最低。静态路由是管理员手动设置的转发路径,其优先级最高;当启用静态路由时,交换机根据设置的静态路由选择下一跳转发节点。动态路由是控制器依据路由选择规则,根据网络的实时状态计算出的从源到汇的一条转发路径,其优先级比静态路由低,比默认路由高;当启用动态路由时,交换机根据动态路由选择下一跳转发节点。默认路由是控制器按照指定算法计算出的最短路径路由,其优先级最低;在没有启用动态路由或静态路由时,交换机会按照默认路由选择下一跳转发节点。The principle of the present invention is to classify routes into three types: static routes, dynamic routes or default routes. The priority forwarding process is reflected through route selection, in which static routes have the highest priority, dynamic routes have the second priority, and default routes have the lowest priority. Static routing is a forwarding path manually set by the administrator, and its priority is the highest; when static routing is enabled, the switch selects the next-hop forwarding node according to the set static routing. Dynamic routing is a forwarding path from source to sink calculated by the controller according to the routing selection rules and the real-time state of the network. Its priority is lower than static routing and higher than default routing; when dynamic routing is enabled, the switch Select the next hop forwarding node. The default route is the shortest path route calculated by the controller according to the specified algorithm, and its priority is the lowest; when dynamic routing or static routing is not enabled, the switch will select the next-hop forwarding node according to the default route.

软件定义网络大多使用openflow协议,交换机会匹配数据报头(packetheader)来选择转发路由。当存在多条匹配路由表项时,会选择优先级最高的路由表项转发。数据报头中的Priority字段为路由表项的优先级,优先级排序为:静态路由>动态路由>默认路由。同时,openflow协议提供了增加、删除、修改路由表项的功能,为实现路由选择提供了操作接口。Most software-defined networks use the openflow protocol, and the switch will match the data header (packet header) to select the forwarding route. When there are multiple matching routing entries, the routing entry with the highest priority will be selected for forwarding. The Priority field in the datagram header is the priority of the routing table entry, and the priority order is: static route > dynamic route > default route. At the same time, the openflow protocol provides the functions of adding, deleting, and modifying routing table items, and provides an operation interface for implementing routing selection.

数据报头如下所示:The datagram header looks like this:

MatchFieldsMatchFields Prioritypriority CountersCounters InstructionsInstructions TimeoutsTimeouts Cookiecookies

其中,Match Fields是匹配字段,对数据包匹配,包括入口端口和数据包报头等;Priority是优先级,表示流表项的匹配次序,本转发方法中静态路由、动态路由和默认路由由该字段;Counters是计数器,用于更新匹配数据包的计数;Instructions是指令,用于修改行动集或流水线处理;Timeouts是超时字段,表示最大时间计数或流有效时间;cookie是由控制器选择的不透明数据值,控制器用来过滤流统计数据、流改变和流删除,但处理数据包时不能使用。Among them, Match Fields is a matching field, which matches data packets, including entry ports and data packet headers; Priority is a priority, indicating the matching order of flow table items. ;Counters is a counter, used to update the count of matching packets; Instructions is an instruction, used to modify the action set or pipeline processing; Timeouts is a timeout field, indicating the maximum time count or flow valid time; cookie is an opaque data selected by the controller Values that the controller uses to filter flow statistics, flow changes, and flow deletions, but not when processing packets.

以下是本发明框架的一些基本策略:(1)静态路由策略:管理员设置的静态路由启用后,控制器将该静态路由写入交换机,同时检查流表,如果有静态路由与刚写入的静态路由的源和汇相同,则删除。(2)动态路由策略:管理员启用动态路由后,即静态路由未启用,控制器依据路由选择规则(例如延迟最小、路径上的最大负载最小等),根据网络的实时状态计算出的从源到汇的一条转发路径,即将网络拓扑视为加权图,根据规则计算出每条边的权重,利用Dijkstra最短路径算法计算从源到汇的最短路径,并将计算的路由结果写入交换机,即为动态路由。这里的路由选择并不是唯一的,可以根据不同的应用设置不同的路由选择规则。(3)默认路由策略:默认路由是控制器会根据最短路径方法计算出从源到汇的转发路径,即将网络拓扑视为无权图,利用Dijkstra最短路径算法计算从源到汇的最短路径,并将计算的路由结果写入交换机,即为默认路由。在静态路由或动态路由都未启用时,交换机会根据默认路由选择下一跳转发节点。The following are some basic strategies of the framework of the present invention: (1) Static routing strategy: after the static routing set by the administrator is enabled, the controller writes the static routing into the switch, and checks the flow table at the same time. If the source and sink of the static route are the same, delete them. (2) Dynamic routing strategy: After the administrator enables dynamic routing, that is, static routing is not enabled, the controller calculates the routing information from the source based on the real-time status of the network according to the routing selection rules (such as the smallest delay, the smallest maximum load on the path, etc.). A forwarding path to the sink, that is, the network topology is regarded as a weighted graph, the weight of each edge is calculated according to the rules, the shortest path from the source to the sink is calculated using the Dijkstra shortest path algorithm, and the calculated routing result is written into the switch, that is, for dynamic routing. The routing selection here is not unique, and different routing selection rules can be set according to different applications. (3) Default routing strategy: The default routing is that the controller will calculate the forwarding path from the source to the sink according to the shortest path method, that is, the network topology is regarded as an unweighted graph, and the Dijkstra shortest path algorithm is used to calculate the shortest path from the source to the sink. And write the calculated routing result to the switch, which is the default route. When neither static routing nor dynamic routing is enabled, the switch will select the next-hop forwarding node according to the default route.

根据以上基本策略,本发明所述的软件定义网络路由框架可以表述成如下步骤:According to the above basic strategy, the software-defined network routing framework described in the present invention can be expressed as the following steps:

(1)管理员根据需求启用或不启用静态路由、动态路由。(1) The administrator enables or disables static routing and dynamic routing according to requirements.

(2)当源需要向汇发送数据包时,如果从源到汇的静态路由已启用,则按照静态路由选择下一跳转发节点。否则,执行步骤(3)。(2) When the source needs to send data packets to the sink, if the static route from the source to the sink is enabled, select the next hop forwarding node according to the static route. Otherwise, go to step (3).

(3)检测从源到汇的动态路由是否启用,如果已启用,控制器依据路由选择规则(例如延迟最小、路径上的最大负载最小等),根据网络的实时状态计算出的从源到汇的一条转发路径。如果未启用,则执行步骤(4)。(3) Detect whether the dynamic routing from source to sink is enabled. If it is enabled, the controller calculates the route from source to sink according to the routing selection rules (such as minimum delay, minimum maximum load on the path, etc.) according to the real-time state of the network. a forwarding path. If not enabled, go to step (4).

(4)源节点根据默认路由来选择下一跳转发节点,其中默认路由是控制器根据最短路径方法计算出从源到汇的转发路径。(4) The source node selects the next hop forwarding node according to the default route, where the default route is the forwarding path from the source to the sink calculated by the controller according to the shortest path method.

SDN提供了一种新的网络,基于优先级提供不同的路由是很重要的一种服务。openflow协议是SDN的网络协议,提供了对于流表的增加、删除、修改功能,为本发明方案的实现提供了技术上的可能。用户的需求、网络的实时状态都是影响路由优先级的因素,所以在不同的条件下,网络为用户提供不同的路由服务,具有很广阔的应用前景。SDN provides a new network, and it is an important service to provide different routes based on priority. The openflow protocol is a network protocol of SDN, which provides functions of adding, deleting and modifying flow tables, and provides technical possibility for the realization of the solution of the present invention. The user's needs and the real-time status of the network are all factors that affect the routing priority. Therefore, under different conditions, the network provides different routing services for users, which has a broad application prospect.

相对于现有技术中的方案,本发明的优点是:Compared with the scheme in the prior art, the advantages of the present invention are:

(1)本方法基于软件定义网络,通过将网络设备控制面与数据面分离开来,从而实现了对交换机转发的灵活控制。(1) This method is based on software-defined networking, and realizes flexible control of switch forwarding by separating the control plane of network equipment from the data plane.

(2)不同的路由获得方式对应不同的优先级,突出了管理员的权限。静态路由是管理员设置的,优先级最高;动态路由是根据网络实时状态计算得出,优先级次高;默认路由是根据最短路径方法计算得出,优先级最低。(2) Different route acquisition methods correspond to different priorities, highlighting the authority of administrators. The static route is set by the administrator and has the highest priority; the dynamic route is calculated based on the real-time network status and has the second highest priority; the default route is calculated based on the shortest path method and has the lowest priority.

本发明公开了一种软件定义网络中基于优先级的路由框架。该框架将路由流表项分为静态路由、动态路由和默认路由,分别代表不同优先级的转发路径。在进行路由决策时,交换机根据优先级由高到低的顺序来检测路由,选择最高优先级路由进行转发。根据该路由策略,本发明可根据网络的实时流量状况和用户需求选择转发路径,提高了数据传输效率,有效缓解了网络拥塞,具有很广阔的应用前景。The invention discloses a priority-based routing framework in a software-defined network. The framework divides routing flow entries into static routing, dynamic routing and default routing, which represent forwarding paths with different priorities. When making routing decisions, the switch detects routes in descending order of priority, and selects the route with the highest priority for forwarding. According to the routing strategy, the present invention can select forwarding paths according to real-time traffic conditions of the network and user demands, thereby improving data transmission efficiency, effectively alleviating network congestion, and having broad application prospects.

附图说明Description of drawings

下面结合附图及实施例对本发明作进一步描述:The present invention will be further described below in conjunction with accompanying drawing and embodiment:

图1为本发明框架中交换机判断转发路径的流程图;Fig. 1 is the flow chart of switch judging forwarding path in the frame of the present invention;

图2为本发明框架为说明路由策略的网络拓扑图。FIG. 2 is a network topology diagram illustrating a routing policy within the framework of the present invention.

具体实施方式detailed description

以下结合具体实施例对上述方案做进一步说明。应理解,这些实施例是用于说明本发明而不限于限制本发明的范围。实施例中采用的实施条件可以根据具体厂家的条件做进一步调整,未注明的实施条件通常为常规实验中的条件。The above solution will be further described below in conjunction with specific embodiments. It should be understood that these examples are used to illustrate the present invention and not to limit the scope of the present invention. The implementation conditions used in the examples can be further adjusted according to the conditions of specific manufacturers, and the implementation conditions not indicated are usually the conditions in routine experiments.

实施例Example

本实施例是软件定义网络中交换机基于优先级选择转发路径,可以实现动态转发。将路由分为静态路由、默认路由、动态路由,其中静态路由是管理员手动设置的转发路径,其优先级最高;动态路由是控制器依据路由选择规则,根据网络的实时状态计算出的从源到汇的一条转发路径,其优先级比静态路由低,比默认路由高;在本实施例中,设定时延最小的转发路径为动态路由,此规则不唯一,可根据具体需求更改。默认路由是控制器按照指定算法计算出的最短路径路由,其优先级最低。本实施例的路由策略如下:In this embodiment, a switch in a software-defined network selects a forwarding path based on priority, which can realize dynamic forwarding. Routes are divided into static routes, default routes, and dynamic routes. Static routes are forwarding paths manually set by administrators with the highest priority; dynamic routes are calculated by the controller based on routing selection rules and real-time network status A forwarding path to the sink has a lower priority than the static route and higher than the default route; in this embodiment, the forwarding path with the smallest delay is set as a dynamic route. This rule is not unique and can be changed according to specific needs. The default route is the shortest route calculated by the controller according to the specified algorithm, and its priority is the lowest. The routing policy of this embodiment is as follows:

(1)静态路由策略:管理员设置的静态路由启用后,控制器将该静态路由写入交换机,同时检查流表,如果有静态路由与刚写入的静态路由的源和汇相同,则删除。(1) Static routing policy: After the static routing set by the administrator is enabled, the controller writes the static routing into the switch and checks the flow table at the same time. If there is a static routing with the same source and sink as the static routing just written, delete it .

(2)动态路由策略:管理员启用动态路由后,即静态路由未启用,控制器依据路由选择规则(本实施例的选择规则是时延最小)和网络的实时状态计算出的从源到汇的一条转发路径,即将网络拓扑视为加权图,将每个交换机的实时转发时延按比例计算成从交换机转出边的权值,利用Dijkstra最短路径算法计算从源到汇的最短路径,即为动态路由,并将计算的路由结果写入交换机。(2) Dynamic routing strategy: After the administrator enables dynamic routing, that is, static routing is not enabled, the controller calculates the route from source to sink based on the routing selection rules (the selection rule in this embodiment is the minimum delay) and the real-time status of the network. A forwarding path of a forwarding path, that is, the network topology is regarded as a weighted graph, and the real-time forwarding delay of each switch is calculated proportionally as the weight of the outgoing edge from the switch, and the shortest path from the source to the sink is calculated using the Dijkstra shortest path algorithm, that is, It is a dynamic route, and writes the calculated route result to the switch.

(3)默认路由策略:默认路由是控制器会根据最短路径方法计算出的从源到汇的转发路径,即将网络拓扑视为无权图,利用Dijkstra算法计算从源到汇的最短路径,即为默认路由,将计算的路由结果写入交换机。在静态路由或动态路由都未启用时,交换机会根据默认路由选择下一跳转发节点。(3) Default routing strategy: Default routing is the forwarding path from source to sink calculated by the controller according to the shortest path method, that is, the network topology is regarded as an unweighted graph, and the shortest path from source to sink is calculated using Dijkstra algorithm, namely For the default route, write the calculated route result to the switch. When neither static routing nor dynamic routing is enabled, the switch will select the next-hop forwarding node according to the default route.

为了说明本发明框架,本实施例使用了如图2所示的网络,动态路由选择转发路径的规则是时延最小,假设所有链路状况都相同,实施步骤如下:In order to illustrate the framework of the present invention, the present embodiment has used the network as shown in Figure 2, and the rule of dynamic routing selection forwarding path is that time delay is minimum, assuming that all link conditions are all the same, the implementation steps are as follows:

(1)在实施例的整个过程中,从h2向h3以恒定的速率发送数据包,使得从S6转发所需时间是从空闲交换机转发所需时间的10倍,所有通过S6->S5的所有路由时延变大;(1) During the entire process of the embodiment, the data packets are sent from h2 to h3 at a constant rate, so that the time required for forwarding from S6 is 10 times the time required for forwarding from an idle switch, all through S6->S5 The routing delay becomes larger;

(2)从h1向h4发送数据包,观察转发路径,观察完毕后停止从h1向h4发送数据包;(2) Send data packets from h1 to h4, observe the forwarding path, and stop sending data packets from h1 to h4 after the observation;

(3)设置从h1到h4的静态路由h1->S1->S2->S3->S4->S5->h4,从h1向h4发送数据包,观察转发路径,观察完毕后停止从h1向h4发送数据包;(3) Set the static route h1->S1->S2->S3->S4->S5->h4 from h1 to h4, send data packets from h1 to h4, observe the forwarding path, stop from h1 to h4 after observation h4 sends data packets;

(4)启用从h1到h4的动态路由,从h1向h4发送数据包,观察转发路径,观察完毕后停止从h1向h4发送数据包;(4) Enable dynamic routing from h1 to h4, send data packets from h1 to h4, observe the forwarding path, and stop sending data packets from h1 to h4 after observation;

(5)关闭从h1到h4的静态路由和动态路由,重新启用从h1到h4的动态路由,从h1向h4发送数据包,观察转发路径,观察完毕后停止从h1向h4发送数据包;(5) Turn off the static routing and dynamic routing from h1 to h4, re-enable the dynamic routing from h1 to h4, send data packets from h1 to h4, observe the forwarding path, and stop sending data packets from h1 to h4 after the observation;

(6)关闭从h1到h4的动态路由,观察转发路径,观察完毕后停止从h1向h4发送数据包。(6) Turn off the dynamic routing from h1 to h4, observe the forwarding path, and stop sending data packets from h1 to h4 after the observation is completed.

所述步骤(1)的作用是为了让S6->S5这条链路过载,交换机S6的转发负荷变大,使得所有通过S6->S5的路由时延变大。The function of the step (1) is to overload the link S6->S5, and the forwarding load of the switch S6 becomes larger, so that the delay of all routes passing through S6->S5 becomes larger.

在步骤(2)中,将网络拓扑图视为无权图,控制器根据Dijkstra最短路径算法,求得最短路径为h1->S1->S6->S5->h4,即为默认路由。所以观察到转发路径为h1->S1->S6->S5->h4。In step (2), the network topology graph is regarded as an unweighted graph, and the controller obtains the shortest path h1->S1->S6->S5->h4 according to the Dijkstra shortest path algorithm, which is the default route. So it is observed that the forwarding path is h1->S1->S6->S5->h4.

在步骤(3)中观察到转发路径为h1->S1->S2->S3->S4->S5->h4,该路径为管理员设置的静态路由。In step (3), it is observed that the forwarding path is h1->S1->S2->S3->S4->S5->h4, which is a static route set by the administrator.

在步骤(4)中观察到转发路径仍为h1->S1->S2->S3->S4->S5->h4,因为静态路由的优先级比动态路由高,所以转发路径仍为在步骤(3)中设置的静态路由。In step (4), it is observed that the forwarding path is still h1->S1->S2->S3->S4->S5->h4, because the priority of static routing is higher than that of dynamic routing, so the forwarding path is still in step (3) Static routing set.

在步骤(5)中观察到转发路径为h1->S1->S3->S4->S5->h4,在执行步骤(5)后,控制器根据时延最小的原则计算出动态路由,因为关闭了静态路由和动态路由后又重新开启了动态路由,此时开启的动态路由的优先级最高,控制器计算动态路由,将网络拓扑图视为加权图,由步骤(1)知从S6转发所需时间是从空闲交换机转发所需时间的10倍,控制器给S6->S5边赋权值为10,图中其他边赋权值为1,根据Dijkstra最短路径算法求得从h1到h4的最短路径,求得最短路径为h1->S1->S3->S4->S5->h4,所以观察到的转发路径为h1->S1->S3->S4->S5->h4;In step (5), it is observed that the forwarding path is h1->S1->S3->S4->S5->h4. After performing step (5), the controller calculates the dynamic route according to the principle of minimum delay, because After turning off the static routing and dynamic routing, the dynamic routing is turned on again. The dynamic routing turned on at this time has the highest priority. The controller calculates the dynamic routing, regards the network topology map as a weighted map, and forwards it from S6 according to step (1). The time required is 10 times the time required for forwarding from an idle switch. The controller assigns a value of 10 to the S6->S5 edge, and 1 to the other edges in the figure. According to Dijkstra’s shortest path algorithm, it is obtained from h1 to h4 The shortest path obtained is h1->S1->S3->S4->S5->h4, so the observed forwarding path is h1->S1->S3->S4->S5->h4;

在步骤(6)中,观察到转发路径为h1->S1->S6->S5->h4,因为管理员没有启用静态路由或动态路由,所以交换机会根据默认路由进行转发。In step (6), it is observed that the forwarding path is h1->S1->S6->S5->h4, because the administrator has not enabled static routing or dynamic routing, so the switch will forward according to the default route.

上述实例只为说明本发明的技术构思及特点,其目的在于让熟悉此项技术的人是能够了解本发明的内容并据以实施,并不能以此限制本发明的保护范围。凡根据本发明精神实质所做的等效变换或修饰,都应涵盖在本发明的保护范围之内。The above examples are only to illustrate the technical conception and characteristics of the present invention, and its purpose is to allow people familiar with this technology to understand the content of the present invention and implement it accordingly, and cannot limit the protection scope of the present invention. All equivalent changes or modifications made according to the spirit of the present invention shall fall within the protection scope of the present invention.

Claims (9)

1.一种基于不同优先级的软件定义网络中数据转发方法,其特征在于所述方法按照如下步骤进行:1. A data forwarding method in a software-defined network based on different priorities, characterized in that the method is carried out according to the following steps: (1)当源需要向汇发送数据包时,控制器判断从源到汇的静态路由是否启用;如果静态路由已启用,则交换机按照静态路由选择下一跳转发节点;否则,执行步骤(2);(1) When the source needs to send data packets to the sink, the controller judges whether the static route from the source to the sink is enabled; if the static route is enabled, the switch selects the next hop forwarding node according to the static route; otherwise, execute the steps ( 2); (2)控制器判断从源到汇的动态路由是否启用;如果已启用,控制器根据路由选择规则和网络的实时状态计算出从源到汇的转发路径,交换机按计算出来的转发路径选择下一跳转发节点;如果未启用,则执行步骤(3);(2) The controller judges whether the dynamic routing from source to sink is enabled; if it is enabled, the controller calculates the forwarding path from source to sink according to the routing selection rules and the real-time status of the network, and the switch selects the forwarding path according to the calculated forwarding path. One-hop forwarding node; if not enabled, perform step (3); (3)交换机根据默认路由来选择下一跳转发节点;(3) The switch selects the next hop forwarding node according to the default route; 交换机根据数据报头的匹配结果选择转发路由;数据报头设置有匹配字段、优先权字段、计数字段、指令字段、超时字段;当存在多条匹配路由表项时,选择优先级最高的路由表项转发;其中优先权字段为路由表项的优先级,优先级排序为静态路由>动态路由>默认路由。The switch selects the forwarding route according to the matching result of the data header; the data header is set with a matching field, a priority field, a count field, an instruction field, and a timeout field; when there are multiple matching routing entries, the routing entry with the highest priority is selected for forwarding ; The priority field is the priority of the routing entry, and the priority order is static route > dynamic route > default route. 2.根据权利要求1所述的数据转发方法,其特征在于所述方法中启用或不启用静态路由以及启用或不启动动态路由是软件定义网络中管理员根据需求在控制器中进行设置。2. The data forwarding method according to claim 1, characterized in that enabling or disabling static routing and enabling or disabling dynamic routing in the method are set in the controller by an administrator in a software-defined network according to requirements. 3.根据权利要求2所述的数据转发方法,其特征在于所述方法中静态路由是管理员手动设置的转发路径;当启用静态路由时,交换机根据设置的静态路由选择下一跳转发节点。3. The data forwarding method according to claim 2, wherein in the method, the static route is a forwarding path manually set by the administrator; when the static route is enabled, the switch selects the next hop forwarding node according to the static route set . 4.根据权利要求2所述的数据转发方法,其特征在于所述方法中默认路由是控制器根据最短路径方法计算出从源到汇的转发路径。4. The data forwarding method according to claim 2, wherein the default route in the method is the forwarding path from the source to the sink calculated by the controller according to the shortest path method. 5.根据权利要求1所述的数据转发方法,其特征在于所述方法中软件定义网络为采用openflow协议的软件定义网络,交换机为openflow交换机。5. The data forwarding method according to claim 1, wherein the software-defined network in the method is a software-defined network using the openflow protocol, and the switch is an openflow switch. 6.根据权利要求5所述的数据转发方法,其特征在于所述方法中管理员根据openflow协议在openflow控制器中增加、删除、修改路由表项。6. The data forwarding method according to claim 5, characterized in that in the method, the administrator adds, deletes, and modifies routing table items in the openflow controller according to the openflow protocol. 7.根据权利要求5所述的数据转发方法,其特征在于所述方法中管理员设置的静态路由启用后,openflow控制器将该静态路由写入openflow交换机,同时检查流表,如果有静态路由与刚写入的静态路由的源和汇相同,则删除。7. The data forwarding method according to claim 5, characterized in that after the static routing set by the administrator in the method is enabled, the openflow controller writes the static routing into the openflow switch, and checks the flow table simultaneously, if there is a static routing If the source and sink of the static route just written are the same, delete it. 8.根据权利要求5所述的数据转发方法,其特征在于所述方法中静态路由未启用,而管理员启用动态路由后,控制器依据路由选择规则和网络的实时状态计算出从源到汇的转发路径,并将计算的路由结果写入openflow交换机。8. The data forwarding method according to claim 5, characterized in that static routing is not enabled in the method, and after the administrator enables dynamic routing, the controller calculates the route from source to sink according to the routing rules and the real-time status of the network. forwarding path, and write the calculated routing result to the openflow switch. 9.根据权利要求5所述的数据转发方法,其特征在于所述方法中默认路由是openflow控制器会根据最短路径方法计算出从源到汇的转发路径,并将默认路由写入openflow交换机;在静态路由或动态路由都未启用时,openflow交换机会根据默认路由选择下一跳转发节点。9. The data forwarding method according to claim 5, characterized in that in the method, the default route is that the openflow controller can calculate the forwarding path from the source to the sink according to the shortest path method, and write the default route into the openflow switch; When neither static routing nor dynamic routing is enabled, the openflow switch will select the next-hop forwarding node according to the default route.
CN201410074396.4A 2014-02-21 2014-02-21 Data forwarding method based on different priorities in software-defined network Expired - Fee Related CN103825823B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410074396.4A CN103825823B (en) 2014-02-21 2014-02-21 Data forwarding method based on different priorities in software-defined network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410074396.4A CN103825823B (en) 2014-02-21 2014-02-21 Data forwarding method based on different priorities in software-defined network

Publications (2)

Publication Number Publication Date
CN103825823A CN103825823A (en) 2014-05-28
CN103825823B true CN103825823B (en) 2017-02-01

Family

ID=50760662

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410074396.4A Expired - Fee Related CN103825823B (en) 2014-02-21 2014-02-21 Data forwarding method based on different priorities in software-defined network

Country Status (1)

Country Link
CN (1) CN103825823B (en)

Families Citing this family (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105207951B (en) * 2014-06-05 2020-06-09 北京邮电大学 Method and device for optimal control of wide area network traffic
CN104079651B (en) * 2014-06-27 2017-09-15 东南大学 Broadcasting and TV multi-outlet intelligent scheduling system and method based on SDN frameworks
CN104104718B (en) * 2014-07-02 2017-05-17 北京邮电大学 User autonomous routing customization system based on software-defined network
CN104113482B (en) * 2014-07-23 2017-11-24 华为技术有限公司 The methods, devices and systems of flow table renewal
CN105634986B (en) 2014-11-30 2019-04-23 中国科学院沈阳自动化研究所 A switch implementation method and system
CN104767695B (en) * 2015-04-20 2017-11-14 清华大学 A kind of stream scheduling method of task rank in data center
TWI585593B (en) 2015-06-03 2017-06-01 鴻海精密工業股份有限公司 Method and system for optimizing transfer path
US9866483B2 (en) * 2015-07-20 2018-01-09 Schweitzer Engineering Laboratories, Inc. Routing of traffic in network through automatically generated and physically distinct communication paths
WO2017067577A1 (en) * 2015-10-20 2017-04-27 Huawei Technologies Co., Ltd. Direct replying actions in sdn switches
CN108234314B (en) * 2016-12-15 2020-11-06 新华三技术有限公司 Service scheduling method and device
CN106888163A (en) * 2017-03-31 2017-06-23 中国科学技术大学苏州研究院 The method for routing divided based on network domains in software defined network
CN106789660B (en) * 2017-03-31 2020-08-28 中国科学技术大学苏州研究院 A QoS-aware approach to traffic management in software-defined networking
CN107333312B (en) * 2017-08-01 2019-03-05 陕西师范大学 Route selection method in opportunistic network
CN107809381B (en) * 2017-10-19 2021-08-10 北京邮电大学 Method for realizing active audit based on routing loop in SDN
CN108199970B (en) * 2017-12-15 2020-08-04 浙江大学 Method for reconstructing data packet path in software defined network
CN109451552B (en) * 2018-11-21 2022-03-15 上海事凡物联网科技有限公司 Data transmission method, equipment, terminal and storage medium based on hybrid routing networking
CN109413709B (en) * 2018-11-21 2022-03-29 上海事凡物联网科技有限公司 Ad hoc network static routing method, device, communication node and storage medium
CN113315698B (en) * 2021-05-25 2022-07-05 中国电子科技集团公司第二十九研究所 Task-based sensor networking message routing method

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7664119B2 (en) * 2001-03-30 2010-02-16 Intel Corporation Method and apparatus to perform network routing
CN101695047B (en) * 2009-10-26 2015-01-28 中兴通讯股份有限公司 Method and switch for realizing forwarding of dynamic tunnel message
CN101902391B (en) * 2010-03-15 2013-01-16 杭州华三通信技术有限公司 Intelligent static route based method and equipment for forwarding messages
CN102170394B (en) * 2011-04-19 2014-02-12 杭州华三通信技术有限公司 Method and apparatus for message forwarding
CN103457854B (en) * 2013-09-16 2017-03-08 杭州华三通信技术有限公司 A kind of message forwarding method and equipment

Also Published As

Publication number Publication date
CN103825823A (en) 2014-05-28

Similar Documents

Publication Publication Date Title
CN103825823B (en) Data forwarding method based on different priorities in software-defined network
CN114073052B (en) Systems, methods, and computer readable media for slice-based routing
CN104104718B (en) User autonomous routing customization system based on software-defined network
CN104702522B (en) Computer implemented method, device, the controller of software defined network routing data
CN107005485B (en) A method, corresponding device and system for determining routing
CN105337857B (en) A kind of multi-path transmission method based on software defined network
CN103685009B (en) Data packet processing method and system as well as controller
Vanbever et al. Seamless network-wide IGP migrations
JP5652565B2 (en) Information system, control device, communication method and program
CN104717098B (en) A kind of data processing method and device
CN106559330B (en) SDN-based dynamic path planning method
CN101436995B (en) A Method of Fast IP Address Blocking Based on BGP Virtual Next Hop
CN103346922A (en) Controller for determining network state based on SDN (Software Defined Networking) and determination method thereof
CN108400934A (en) Software defined network controller, service function catenary system and route tracing method
CN106817299B (en) The list item generation method and device and message forwarding method of software defined network
CN103916265B (en) Method and controller system for the network that configuration software defines
CN101321134A (en) Quality of Service Routing Selection Method under Dynamic Network Conditions
CN110891019A (en) A data center traffic scheduling method based on load balancing
CN103841040A (en) Network system and load balance method
WO2017084448A1 (en) Network system and network operating method
CN105743804A (en) Data flow control method and system
CN103780425A (en) A method and a controller device for configuring a software-defined network
WO2023050874A1 (en) Packet forwarding method and apparatus, and dragonfly network
CN105553855B (en) Method and system for dynamically adjusting spanning tree topology of underlying network
CN107809381B (en) Method for realizing active audit based on routing loop in SDN

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20170201