CN115514691A - Blockchain-based SDN inter-domain cooperative forwarding control architecture and method - Google Patents

Blockchain-based SDN inter-domain cooperative forwarding control architecture and method Download PDF

Info

Publication number
CN115514691A
CN115514691A CN202211079285.3A CN202211079285A CN115514691A CN 115514691 A CN115514691 A CN 115514691A CN 202211079285 A CN202211079285 A CN 202211079285A CN 115514691 A CN115514691 A CN 115514691A
Authority
CN
China
Prior art keywords
domain
policy
sdn
block chain
strategy
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.)
Granted
Application number
CN202211079285.3A
Other languages
Chinese (zh)
Other versions
CN115514691B (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.)
Information Engineering University Of Chinese People's Liberation Army Cyberspace Force
Zhengzhou Institute of Technology
Original Assignee
Zhengzhou Institute of Technology
PLA Information Engineering University
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 Zhengzhou Institute of Technology, PLA Information Engineering University filed Critical Zhengzhou Institute of Technology
Priority to CN202211079285.3A priority Critical patent/CN115514691B/en
Publication of CN115514691A publication Critical patent/CN115514691A/en
Application granted granted Critical
Publication of CN115514691B publication Critical patent/CN115514691B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/02Topology update or discovery
    • H04L45/04Interdomain routing, e.g. hierarchical routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/50Reducing energy consumption in communication networks in wire-line communication networks, e.g. low power modes or reduced link rate

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention belongs to the technical field of internet, and particularly relates to a cooperative forwarding control architecture and method between SDN domains based on a block chain, wherein a block chain function node and an SDN controller of each SDN domain are deployed in an SDN domain local server, the block chain function node forms a block chain network in a P2P mode, a block chain global account book is stored in each SDN domain, and a local application program interface is utilized to realize interaction between a block chain-based policy forwarding control application and the controller and the block chain, wherein the policy forwarding control application comprises: the system comprises a domain information manager used for registering and dynamically updating domain information, generating domain information transaction and uploading the domain information transaction to a block chain, a policy manager used for formulating an inter-domain forwarding control policy, generating a policy transaction and uploading the policy transaction to the block chain, and a policy coordination engine used for executing attribute mapping, policy matching and path synthesis by inquiring a local cache and acquiring a global coordination policy. The invention controls the forwarding path of the SDN cross-domain data flow through a strategy facing to the data flow and the path attribute, and realizes the high-efficiency and safe forwarding control between SDN domains by using a block chain.

Description

基于区块链的SDN域间协同转发控制架构及方法Blockchain-based SDN inter-domain collaborative forwarding control architecture and method

技术领域technical field

本发明属于互联网技术领域,特别涉及一种基于区块链的SDN域间协同转发控制架构及方法。The invention belongs to the technical field of the Internet, and in particular relates to a blockchain-based SDN inter-domain coordinated forwarding control framework and method.

背景技术Background technique

随着互联网业务和应用的不断丰富与发展,用户需求逐渐从单纯的可达性向安全性、服务质量、流量工程等多方面的需求转变,这对网络表达能力和网络管控能力提出了更高的要求。SDN作为新型网络体系架构,具有转发控制分离、逻辑集中和开放可编程的特性,为灵活高效的网络转发控制提供了良好的基础。随着SDN被广泛应用于云、数据中心、移动通信网、物联网、工业互联网等领域,如何实现SDN跨域转发控制成为了一个亟待解决的问题。With the continuous enrichment and development of Internet services and applications, user needs are gradually changing from simple accessibility to security, service quality, traffic engineering and other aspects, which puts higher demands on network expression ability and network management and control ability. Require. As a new network architecture, SDN has the characteristics of separation of forwarding control, centralized logic, and open programmability, which provides a good foundation for flexible and efficient network forwarding control. As SDN is widely used in cloud, data center, mobile communication network, Internet of Things, industrial Internet and other fields, how to realize SDN cross-domain forwarding control has become an urgent problem to be solved.

目前,绝大多数SDN转发控制方案集中在SDN域内,关于SDN域间转发控制的方案极少。现有方案中,基于策略的SDN安全架构PbSA具有跨域转发控制功能。PbSA通过定义面向数据流和路径的安全策略范式,在SDN数据平面通过策略令牌传递策略,策略令牌随数据包一起传递,每到达一个传输域,则将策略令牌上传SDN控制器,并联合传输域的策略,共同决定数据包的下一转发域。然而,该方案面临以下2个不足:一方面,当源域与传输域存在策略冲突时,会导致数据传输中断;另一方面,通过数据平面转发策略令牌,由于未采用安全技术,因此策略传递面临安全隐患。At present, most of the SDN forwarding control schemes are concentrated in the SDN domain, and there are very few schemes about the forwarding control between SDN domains. In existing solutions, the policy-based SDN security architecture PbSA has the function of cross-domain forwarding control. PbSA defines a data flow and path-oriented security policy paradigm, and transmits policies through policy tokens on the SDN data plane. The policy tokens are transmitted together with the data packets. Every time a transport domain is reached, the policy tokens are uploaded to the SDN controller, and The strategy of the joint transport domain jointly determines the next forwarding domain of the data packet. However, this solution faces the following two shortcomings: on the one hand, when there is a policy conflict between the source domain and the transmission domain, it will cause data transmission interruption; Transmission faces security risks.

区块链技术在数据共享和访问控制方面得到了广泛应用,但是,尚未有研究将区块链技术用于SDN跨域转发控制。由于转发控制与访问控制的研究目的和对象的不同,更重要的是相比访问控制,转发控制对时延和计算开销具有更高的敏感性,因此,如何将区块链合理地应用于SDN域间策略转发控制有待进一步研究,即在提供安全性、构建可信服务的基础上,将对数据转发的影响保持在合理范围内,并尽量减少对数据转发的影响。Blockchain technology has been widely used in data sharing and access control, however, there is no research on using blockchain technology for SDN cross-domain forwarding control. Since the research purposes and objects of forwarding control and access control are different, and more importantly, compared with access control, forwarding control is more sensitive to delay and computing overhead. Therefore, how to reasonably apply blockchain to SDN Inter-domain policy forwarding control needs to be further studied, that is, on the basis of providing security and building trusted services, keep the impact on data forwarding within a reasonable range, and minimize the impact on data forwarding.

在区块链与SDN结合的研究中,其架构因研究目标不同而存在差异。第一类,区块链和SDN分别独立部署,通过REST API进行远程通信。但由于二者独立部署导致远程通信开销较大,同时为保证SDN和区块链节点远程通信的安全性需要引入安全机制,会进一步增大计算和时延开销,因此不适用于时延敏感性应用。第二类,区块链节点通过SDN网络基础设施通信,即区块链节点间数据转发受SDN控制器集中管控。该类方案的缺点是区块链节点受SDN控制器控制,失去了区块链去中心化的本质属性,一旦SDN控制器被攻击成功,则攻击者可控制整个区块链网络的通信,从而严重威胁区块链业务的安全性和可信性。第三类,将区块链部署到SDN控制平面,该方法适合SDN跨域管理,但尚未有研究提出面向SDN域间转发控制的解决方案。综上所述,针对SDN域间转发控制面临的挑战和现有技术的不足,目前还没有好的解决方案。In the research on the combination of blockchain and SDN, its architecture is different due to different research objectives. In the first category, the blockchain and SDN are independently deployed and communicate remotely through the REST API. However, due to the independent deployment of the two, the remote communication overhead is relatively high. At the same time, in order to ensure the security of remote communication between SDN and blockchain nodes, a security mechanism needs to be introduced, which will further increase the calculation and delay overhead, so it is not suitable for delay sensitivity. application. In the second category, blockchain nodes communicate through the SDN network infrastructure, that is, data forwarding between blockchain nodes is centrally controlled by the SDN controller. The disadvantage of this type of scheme is that the blockchain nodes are controlled by the SDN controller, which loses the essential attribute of blockchain decentralization. Once the SDN controller is successfully attacked, the attacker can control the communication of the entire blockchain network, thereby Seriously threaten the security and credibility of the blockchain business. The third category is to deploy the blockchain to the SDN control plane. This method is suitable for SDN cross-domain management, but no research has yet proposed a solution for SDN inter-domain forwarding control. To sum up, there is no good solution to the challenges faced by SDN inter-domain forwarding control and the deficiencies of existing technologies.

发明内容Contents of the invention

为此,本发明提供一种基于区块链的SDN域间协同转发控制架构及方法,从安全性的角度出发,通过策略控制SDN跨域数据流的转发路径,实现数据流转发路径的物理隔离和渠化管理,利用区块链来实现SDN域间高效安全地转发控制,便于实际场景应用。For this reason, the present invention provides a block chain-based SDN inter-domain cooperative forwarding control architecture and method. From the perspective of security, the forwarding path of SDN cross-domain data flow is controlled through policies to realize the physical isolation of the data flow forwarding path. And channelized management, using blockchain to realize efficient and safe forwarding control between SDN domains, which is convenient for actual scene applications.

按照本发明所提供的设计方案,提供一种基于区块链的SDN域间协同转发控制架构,包含:基于区块链的策略转发控制应用,各SDN域的区块链功能节点与SDN控制器部署在SDN域本地服务器,且区块链功能节点通过P2P方式构成区块链网络,各SDN域存储有区块链全局账本,利用本地应用程序接口来实现策略转发控制应用与控制器和区块链之间的交互。其中,策略转发控制应用包含:用于登记及动态更新域信息并生成域信息交易上传至区块链的域信息管理器,用于制定域间转发控制策略并生成策略交易上传至区块链的策略管理器,及用于通过查询SDN控制器本地缓存来执行属性映射、策略匹配和路径合成来获取全局协同策略的策略协同引擎。According to the design scheme provided by the present invention, a block chain-based SDN inter-domain cooperative forwarding control architecture is provided, including: block chain-based policy forwarding control applications, block chain function nodes and SDN controllers in each SDN domain Deployed in the local server of the SDN domain, and the blockchain functional nodes form a blockchain network through P2P, each SDN domain stores the global account book of the blockchain, and uses the local application program interface to realize the policy forwarding control application and the controller and the block Interaction between chains. Among them, the policy forwarding control application includes: a domain information manager for registering and dynamically updating domain information and generating domain information transactions to upload to the blockchain; A policy manager, and a policy coordination engine for performing attribute mapping, policy matching, and path composition by querying the local cache of the SDN controller to obtain a global coordination policy.

作为本发明基于区块链的SDN域间协同转发控制架构,进一步地,区块链功能节点利用域信息管理智能合约执行域信息发布或更新,利用策略管理智能合约执行策略发布或更新,利用共识机制对发布或更新的域信息或策略信息进行上链确认并将确认的域信息和策略写入各SDN域区块链节点的账本数据库,随后将智能合约账户中的域信息和策略信息实时动态同步到SDN控制器本地缓存,最终实现分布式SDN域间环境下安全可信地域信息和策略共享。As the block chain-based SDN inter-domain collaborative forwarding control architecture of the present invention, further, block chain function nodes use domain information to manage smart contracts to execute domain information release or update, use policy management smart contracts to execute policy release or update, use consensus The mechanism confirms the released or updated domain information or policy information on the chain and writes the confirmed domain information and policies into the ledger database of each SDN domain blockchain node, and then dynamically updates the domain information and policy information in the smart contract account in real time Synchronize to the local cache of the SDN controller, and finally realize safe and trusted regional information and policy sharing in the distributed SDN inter-domain environment.

进一步地,基于上述的架构,本发明还提供一种基于区块链的SDN域间协同转发控制方法,包含如下内容:Further, based on the above-mentioned architecture, the present invention also provides a blockchain-based SDN inter-domain collaborative forwarding control method, including the following content:

将各SDN域的域信息及跨域转发策略上传至区块链,由区块链中的智能合约进行域信息和跨域转发策略的发布或更新,并利用区块链功能节点将发布或更新的域信息和转发控制策略同步到本地缓存;The domain information and cross-domain forwarding strategy of each SDN domain are uploaded to the blockchain, and the domain information and cross-domain forwarding strategy are released or updated by the smart contract in the blockchain, and the functional nodes of the blockchain will be used to publish or update Synchronize the domain information and forwarding control policy to the local cache;

针对入口交换机接收到的新数据流,通过查询流表,若存在匹配流表项,则按匹配流表项转发,若不存在匹配流表项,则将数据流首包通过pack-in消息上传至SDN控制器,SDN基线控制器通过与策略协同引擎进行交互来获取全局协同策略;For the new data flow received by the ingress switch, by querying the flow table, if there is a matching flow entry, it will be forwarded according to the matching flow entry; if there is no matching flow entry, the first packet of the data flow will be uploaded through the pack-in message To the SDN controller, the SDN baseline controller interacts with the policy coordination engine to obtain the global coordination strategy;

SDN基线控制器依据获取的全局协同策略,联合全局域级别的网络视图并通过域间路径计算来获取满足全局策略约束下的域级别转发路径;利用SDN控制器间的东西向接口向转发域控制器分发路径片段,各SDN控制器根据路径片段下发流表项,实现跨域转发控制。Based on the obtained global collaboration policy, the SDN baseline controller combines the global domain-level network view and obtains the domain-level forwarding path that meets the constraints of the global policy through inter-domain path calculation; uses the east-west interface between SDN controllers to control the forwarding domain The controller distributes path segments, and each SDN controller issues flow entries according to the path segments to realize cross-domain forwarding control.

作为本发明基于区块链的SDN域间协同转发控制方法,进一步地,由区块链进行域信息和跨域转发策略的发布或更新中,将各SDN域的域信息生成域信息交易,通过签名上传至区块链;并将各域的跨域转发策略封装成策略交易,通过签名上传至区块链;区块链验签交易,通过调用域信息管理合约或策略管理合约来实现域信息或转发控制策略的发布与更新,并利用区块链功能节点将智能合约中的域信息和策略管理合约中的转发控制策略自实时动态同步到本地缓存。As the block chain-based SDN inter-domain cooperative forwarding control method of the present invention, further, when the block chain releases or updates domain information and cross-domain forwarding strategies, the domain information of each SDN domain is generated into a domain information transaction, through The signature is uploaded to the blockchain; the cross-domain forwarding strategy of each domain is encapsulated into a policy transaction, and uploaded to the blockchain through the signature; Or release and update the forwarding control strategy, and use the blockchain function node to dynamically synchronize the domain information in the smart contract and the forwarding control strategy in the policy management contract to the local cache in real time.

作为本发明基于区块链的SDN域间协同转发控制方法,进一步地,上传至区块链上的各SDN域的域信息至少包含:实体属性信息及标识映射关系,其中,实体属性信息包含:本域内的域、用户及设备信息,标识映射关系包含:IP地址与用户标识和设备标识之间的映射关系。As the blockchain-based SDN inter-domain collaborative forwarding control method of the present invention, further, the domain information uploaded to each SDN domain on the blockchain at least includes: entity attribute information and identification mapping relationship, wherein the entity attribute information includes: The domain, user, and device information in the domain, and the identification mapping relationship include: the mapping relationship between the IP address, the user identification, and the equipment identification.

作为本发明基于区块链的SDN域间协同转发控制方法,进一步地,上传至区块链上的各SDN域的跨域转发策略由多元组进行表示,具体范式表示为:policy=<domID,policyID,policyType,SrcAP,DstAP,ServAP,Path,action>,其中,domID表示制定策略的域标识,policyID表示策略在该域的标识,policyType表示策略类型,该策略类型划分为用于约束本域源发数据流的源发策略及用于过滤来自其他域数据流的承载策略,SrcAP表示对数据流的源发属性约束,DstAP表示对数据流的目的属性约束,ServAP表示对数据流的网络服务属性约束,Path表示对数据流的路径约束,action表示对满足策略约束的数据流在策略约束路径上的转发动作。As the blockchain-based SDN inter-domain cooperative forwarding control method of the present invention, further, the cross-domain forwarding policy of each SDN domain uploaded to the blockchain is represented by a tuple, and the specific paradigm is expressed as: policy=<domID, policyID, policyType, SrcAP, DstAP, ServAP, Path, action>, among them, domID indicates the domain ID of the policy formulation, policyID indicates the identification of the policy in this domain, and policyType indicates the policy type, and the policy type is divided into constraining the domain source Source policy for sending data streams and bearer policies for filtering data streams from other domains. SrcAP represents the source attribute constraints on data streams, DstAP represents the destination attribute constraints on data streams, and ServAP represents network service attributes on data streams Constraint, Path represents the path constraint on the data flow, and action represents the forwarding action on the policy-constrained path for the data flow that satisfies the policy constraint.

作为本发明基于区块链的SDN域间协同转发控制方法,进一步地,在SDN基线控制器与策略协同引擎进行交互来获取全局协同策略中,首先,通过解析流策略请求来获取数据包首部关键字段,通过查询SDN控制器本地缓存中的域信息来将数据流网络标识与业务属性进行映射;然后,根据数据流属性读取SDN控制器本地缓存中的策略集,通过策略匹配来获取匹配策略集;最后,通过对匹配策略集执行路径合成来获取具有全局路径约束的全局协同策略。As the block chain-based SDN inter-domain cooperative forwarding control method of the present invention, further, in the interaction between the SDN baseline controller and the policy coordination engine to obtain the global coordination strategy, firstly, the data packet header key is obtained by parsing the flow policy request field, by querying the domain information in the local cache of the SDN controller to map the data flow network identifier with the business attribute; then, according to the data flow attribute, read the policy set in the local cache of the SDN controller, and obtain the match through policy matching strategy set; finally, a global collaborative strategy with global path constraints is obtained by performing path composition on the matched strategy set.

作为本发明基于区块链的SDN域间协同转发控制方法,进一步地,将数据流网络标识与业务属性进行映射时,根据数据包首部关键字段,读取源IP、目的IP及端口号或协议类型;根据源IP获取源域、源用户、源设备的属性名值对集合,组成数据流的源属性;根据目的IP获取目的域、目的用户、目的设备的属性名值对集合,组成数据流的目的属性;根据端口号或协议类型获取网络服务属性;联合源属性、目的属性及网络服务属性构成数据流的业务属性集,依据数据流关键字段生成对应的流标识;通过联合流标识与业务属性集来完成数据流网络标识与业务属性之间的映射。As the block chain-based SDN inter-domain cooperative forwarding control method of the present invention, further, when mapping the data flow network identifier and business attributes, read the source IP, destination IP and port number or Protocol type; obtain the set of attribute name-value pairs of the source domain, source user, and source device according to the source IP to form the source attribute of the data flow; obtain the set of attribute name-value pairs of the destination domain, destination user, and destination device according to the destination IP to form data The destination attribute of the flow; obtain the network service attribute according to the port number or protocol type; combine the source attribute, destination attribute and network service attribute to form the business attribute set of the data flow, and generate the corresponding flow identifier according to the key field of the data flow; through the joint flow identifier and business attribute sets to complete the mapping between data flow network identifiers and business attributes.

作为本发明基于区块链的SDN域间协同转发控制方法,进一步地,通过策略匹配获取匹配策略集时,首先,根据数据流的源域标识获取源域的源发策略并根据策略类型获取各域的承载策略,将源发策略和承载策略构成相关策略集;然后,对相关策略集中的每条策略,如果数据流的属性集满足策略中的所有属性谓词约束,则将对应策略作为匹配策略,否则,遍历下一条策略,直至遍历完相关策略集中的所有策略,进而得到匹配策略集。As the block chain-based SDN inter-domain cooperative forwarding control method of the present invention, further, when obtaining the matching policy set through policy matching, firstly, obtain the originating policy of the source domain according to the source domain identifier of the data stream and obtain each The bearing policy of the domain, the source policy and the bearer policy constitute a related policy set; then, for each policy in the related policy set, if the attribute set of the data flow satisfies all the attribute predicate constraints in the policy, the corresponding policy is used as the matching policy , otherwise, traverse the next policy until all the policies in the relevant policy set are traversed, and then the matching policy set is obtained.

作为本发明基于区块链的SDN域间协同转发控制方法,进一步地,在执行路径合成时,通过由匹配策略集中的策略类型、路径约束及动作来获取具有全局路径约束的全局协同策略,其中,由匹配策略集中的策略类型、路径约束及动作获取全局协同策略,具体包含如下情形:对于匹配策略集中的每一条源发策略,如果动作为forward,则将其路径约束写入流路径约束,如果其动作为drop,则将其路径约束取反后,写入流路径约束;对于匹配策略集中的每一条承载策略,如果其路径约束不为空,则违反约定,报告错误,如果其路径约束为空、且动作为drop,则将对应域标识取反并写入流路径约束,如果其路径约束为空、且动作为forward,则不影响数据转发,直至遍历所有承载策略;最后,联合流识别符、流路径约束和动作forward构成具有全局路径约束的全局协同策略。As the blockchain-based SDN inter-domain collaborative forwarding control method of the present invention, further, when performing path synthesis, the global collaborative policy with global path constraints is obtained by matching the policy type, path constraints, and actions in the policy set, wherein , obtain the global collaborative policy from the policy type, path constraint and action in the matching policy set, specifically including the following situations: for each source policy in the matching policy set, if the action is forward, write its path constraint into the flow path constraint, If its action is drop, its path constraint will be reversed and written into the stream path constraint; for each bearer policy in the matching policy set, if its path constraint is not empty, the contract will be violated and an error will be reported. If its path constraint If it is empty and the action is drop, the corresponding domain identifier will be reversed and written into the flow path constraint. If the path constraint is empty and the action is forward, data forwarding will not be affected until all bearer policies are traversed; finally, the combined flow Identifier, flow path constraints and action forward constitute a global collaborative strategy with global path constraints.

本发明的有益效果:Beneficial effects of the present invention:

本发明利用从服务层面定义的面向数据流和路径属性的策略范式,保证跨域策略管控的友好性,避免IP地址多义性和动态性给策略管控带来不必要的干扰;利用SDN域间策略共享和策略协同解决跨域策略不可知和策略冲突问题;通过区块链技术为SDN域间策略转发控制提供安全性和可信性服务,具有较好的应用前景。The present invention utilizes the data flow and path attribute-oriented policy paradigm defined from the service level to ensure the friendliness of cross-domain policy management and control, avoiding unnecessary interference caused by IP address ambiguity and dynamics to policy management and control; using SDN inter-domain Policy sharing and policy coordination solve the problems of cross-domain policy agnosticity and policy conflict; blockchain technology provides security and credibility services for SDN inter-domain policy forwarding control, which has a good application prospect.

附图说明:Description of drawings:

图1为实施例中SDN域间协同转发控制架构示意;FIG. 1 is a schematic diagram of an SDN inter-domain coordinated forwarding control architecture in an embodiment;

图2为实施例中SDN域间协同转发控制架构工作原理示意;FIG. 2 is a schematic diagram of the working principle of the SDN inter-domain coordinated forwarding control framework in the embodiment;

图3为实施例中SDN域间协同转发控制流程示意;FIG. 3 is a schematic diagram of an SDN inter-domain coordinated forwarding control process in an embodiment;

图4为实施例中交易消息格式示意。Fig. 4 is a schematic diagram of the transaction message format in the embodiment.

具体实施方式:detailed description:

为使本发明的目的、技术方案和优点更加清楚、明白,下面结合附图和技术方案对本发明作进一步详细的说明。In order to make the purpose, technical solution and advantages of the present invention more clear and understandable, the present invention will be further described in detail below in conjunction with the accompanying drawings and technical solutions.

早在SDN雏形Ethane中,就基于自定义策略来控制数据转发。目前,基于策略实现SDN转发控制已达成一种共识。然而,在基于策略的SDN域间转发控制中,面临如下挑战:(1)定义什么样的域间策略范式;(2)如何解决跨域策略不可知问题和策略冲突问题;(3)如何在分布式不可信环境中实现安全可信的策略转发控制。(4)如何应对转发控制的时延敏感性。本发明实施例,参见图1所示,提供一种基于区块链的SDN域间协同转发控制架构,包含:基于区块链的策略转发控制应用,各SDN域的区块链功能节点与SDN控制器部署在SDN域本地服务器,且区块链功能节点通过P2P方式构成区块链网络,各SDN域存储有区块链全局账本,利用本地应用程序接口来实现策略转发控制应用与控制器和区块链之间的交互,其中,策略转发控制应用包含:用于登记及动态更新域信息并生成域信息交易上传至区块链的域信息管理器,用于制定域间转发控制策略并生成策略交易上传至区块链的策略管理器,及用于通过查询本地缓存来执行属性映射、策略匹配和路径合成并获取全局协同策略的策略协作引擎。As early as in Ethane, the prototype of SDN, data forwarding was controlled based on custom policies. At present, a consensus has been reached on implementing SDN forwarding control based on policies. However, in the policy-based SDN inter-domain forwarding control, the following challenges are faced: (1) what kind of inter-domain policy paradigm is defined; (2) how to solve the problem of cross-domain policy agnostic and policy conflict; (3) how to Realize safe and reliable policy forwarding control in a distributed untrusted environment. (4) How to deal with the delay sensitivity of forwarding control. The embodiment of the present invention, as shown in Figure 1, provides a block chain-based SDN inter-domain cooperative forwarding control architecture, including: block chain-based policy forwarding control applications, block chain function nodes of each SDN domain and SDN The controller is deployed on the local server in the SDN domain, and the blockchain functional nodes form a blockchain network through P2P. Each SDN domain stores the blockchain global ledger, and uses the local application program interface to realize the policy forwarding control application and the controller and Interaction between blockchains, where the policy forwarding control application includes: a domain information manager for registering and dynamically updating domain information and generating domain information transactions to upload to the blockchain, for formulating inter-domain forwarding control strategies and generating A policy manager that uploads policy transactions to the blockchain, and a policy collaboration engine that performs attribute mapping, policy matching, and path synthesis by querying local caches and obtains global collaborative policies.

图1所示的架构中,将各域的区块链节点功能与SDN控制器均部署在SDN域内本地服务器,基于区块链的策略转发控制应用通过本地应用程序接口与控制器和区块链交互。各域的区块链功能节点作为区块链的记账节点,通过P2P的方式构成区块链网络,因此,各SDN域存储有区块链全局账本。通过将区块链账本数据同步到SDN控制器本地缓存中,可以使SDN控制器本地扩展的基于区块链的策略转发控制应用快速读取可信的全局共享数据。由于实现转发控制需要网络拓扑信息,各域位于网络系统层的东西桥WE-bridge以fullmesh连接的方式、基于SSL协议、通过Json文件安全、快速地交换域间网络视图,从而为各域提供全局域级别的网络视图。各域控制器可通过东西桥WE-bridge动态实时地获取SDN域间全局网络视图。各SDN域的控制功能是安全可信的,即与SDN控制相关的SDN网络操作系统、基于区块链的策略转发控制应用、东西桥WE-Bridge组件是安全可信的。In the architecture shown in Figure 1, the blockchain node functions of each domain and the SDN controller are deployed on the local server in the SDN domain, and the blockchain-based policy forwarding control application communicates with the controller and the blockchain through the local application program interface. interact. The block chain function nodes of each domain are used as the bookkeeping nodes of the block chain, and form a block chain network through P2P. Therefore, each SDN domain stores a block chain global ledger. By synchronizing the blockchain ledger data to the local cache of the SDN controller, the blockchain-based policy forwarding control application locally extended by the SDN controller can quickly read trusted global shared data. Since forwarding control requires network topology information, the East-West bridge WE-bridge located at the network system layer in each domain uses a fullmesh connection, based on the SSL protocol, to exchange inter-domain network views safely and quickly through Json files, thereby providing global information for each domain. Domain-level network view. Each domain controller can obtain the SDN inter-domain global network view dynamically and in real time through the WE-bridge. The control function of each SDN domain is safe and credible, that is, the SDN network operating system related to SDN control, the policy forwarding control application based on blockchain, and the WE-Bridge components of the east-west bridge are safe and credible.

BPCF-SDNs基于交易签名机制保证各SDN域上传域信息和策略信息的可认证性和完整性;通过智能合约技术实现自动、透明的域信息和策略发布与更新;基于账户状态机制保证当前区块内存放的是全局域信息和策略的最新状态,避免UTXO模式下遍历整条区块链来获取最新状态,提高数据检索速率;基于PBFT(Practical Byzantine Fault Tolerance,实用拜占庭容错算法)的共识机制,能够较高效地保证跨域共享数据的可信性;最后,基于块链式存储保证域信息及策略的难篡改和可追溯,最终实现安全可信的SDN域信息和策略共享。BPCF-SDNs ensures the authenticity and integrity of domain information and policy information uploaded by each SDN domain based on the transaction signature mechanism; realizes automatic and transparent domain information and policy release and update through smart contract technology; guarantees the current block based on the account status mechanism It stores the latest state of global domain information and policies, avoids traversing the entire blockchain in UTXO mode to obtain the latest state, and improves the data retrieval rate; based on the consensus mechanism of PBFT (Practical Byzantine Fault Tolerance, Practical Byzantine Fault Tolerance Algorithm), It can more efficiently guarantee the credibility of cross-domain shared data; finally, based on block chain storage, domain information and policies are guaranteed to be tamper-resistant and traceable, and finally realize safe and credible SDN domain information and policy sharing.

本案实施例中,参见图2所示,将基于策略的SDN域间转发控制分为三层逻辑——策略、路由和转发。其一,策略作为高层逻辑,应具备管理友好性。即网络管理者关注的是服务层面的某一类数据流,而非网络层面的某一条数据流。另一方面,考虑到IP地址无法直观地表达出业务逻辑,同时具有动态变化性。如果策略使用IP地址来标识数据流势必会影响策略管控的友好性,而且应用层策略需随IP地址动态配置,徒增策略配置的复杂度和出错率。因此,将从服务层面设计面向数据流和路径属性的策略范式,保证跨域策略管控的友好性,避免IP地址多义性和动态性给策略管控带来不必要的干扰。其二,由于各管理域独立制定转发控制策略,在数据流传输过程中,传输域不知道源发域的策略约束,因而无法按源发域的策略约束转发数据流。所以,本案实施例中,通过策略共享解决跨域策略不可知问题。同理,由于源发域不知道传输域对业务流的过滤规则,所以可能因承载策略与源发策略冲突导致数据传输中断,所以,本案实施例中,通过策略协同解决策略冲突。即,本案实施例中实现跨域策略管控的前提是实现SDN域间策略共享和策略协同。其三,由于域间通信环境缺乏安全性和可信性,因此如何保证SDN域间策略共享和协同的安全性和可信性是一个难题。区块链技术作为一种将P2P网络、密码学、智能合约、共识机制等多种技术深度融合的分布式账本技术,可在分布式不可信环境中提供自动、透明、安全可信的数据共享服务。因此,本案实施例中,应用区块链技术为SDN域间策略转发控制提供安全性和可信性服务。其四,转发控制具有时延敏感性,而使用区块链技术会引入大量的计算和时延开销,因此,本案实施实例中,设计一种物理上集中、逻辑上隔离的架构,将区块链节点功能部署在本地控制器上,使SDN能够安全高效地与区块链交换数据,同时将转发控制功能与基于区块链的数据共享功能分离,在控制器本地执行基于策略协同的转发控制,在保证安全性的同时避免引入过多的时延。In the embodiment of this case, as shown in FIG. 2 , the policy-based SDN inter-domain forwarding control is divided into three layers of logic—policy, routing, and forwarding. First, strategy, as a high-level logic, should be management-friendly. That is, the network manager focuses on a certain type of data flow at the service level, rather than a certain data flow at the network level. On the other hand, considering that the IP address cannot intuitively express the business logic, it also has dynamic changes. If the policy uses IP addresses to identify data flows, it will inevitably affect the friendliness of policy management and control, and the application layer policy needs to be dynamically configured with the IP address, which will increase the complexity and error rate of policy configuration. Therefore, a policy paradigm oriented to data flow and path attributes will be designed from the service level to ensure the friendliness of cross-domain policy control and avoid unnecessary interference to policy control caused by IP address ambiguity and dynamics. Second, since each management domain independently formulates forwarding control policies, the transmission domain does not know the policy constraints of the source domain during data stream transmission, so it cannot forward data streams according to the policy constraints of the source domain. Therefore, in the embodiment of this case, the cross-domain policy agnostic problem is solved through policy sharing. Similarly, since the originating domain does not know the filtering rules of the transport domain for service flows, data transmission may be interrupted due to the conflict between the bearer policy and the originating policy. Therefore, in the embodiment of this case, the policy conflict is resolved through policy coordination. That is, the premise of implementing cross-domain policy control in the embodiment of this case is to implement SDN inter-domain policy sharing and policy coordination. Third, due to the lack of security and credibility in the inter-domain communication environment, how to ensure the security and credibility of SDN inter-domain policy sharing and coordination is a difficult problem. As a distributed ledger technology that deeply integrates P2P network, cryptography, smart contract, consensus mechanism and other technologies, blockchain technology can provide automatic, transparent, safe and credible data sharing in a distributed untrusted environment Serve. Therefore, in the embodiment of this case, blockchain technology is applied to provide security and credibility services for SDN inter-domain policy forwarding control. Fourth, forwarding control is time-delay sensitive, and the use of blockchain technology will introduce a large amount of computing and time-delay overhead. Therefore, in the implementation example of this case, a physically centralized and logically isolated The chain node function is deployed on the local controller, so that SDN can safely and efficiently exchange data with the blockchain, and at the same time separate the forwarding control function from the data sharing function based on the blockchain, and execute the forwarding control based on policy coordination locally on the controller , to avoid introducing too much delay while ensuring security.

进一步地,基于上述的架构,本案实施例还提供一种基于区块链的SDN域间协同转发控制方法,包含如下内容:Further, based on the above-mentioned architecture, the embodiment of this case also provides a blockchain-based SDN inter-domain collaborative forwarding control method, including the following content:

将各SDN域的域信息及跨域转发策略上传至区块链,由区块链中的智能合约进行域信息和跨域转发策略的发布或更新,并利用区块链功能节点将发布或更新的域信息和转发控制策略同步到本地缓存;The domain information and cross-domain forwarding strategy of each SDN domain are uploaded to the blockchain, and the domain information and cross-domain forwarding strategy are released or updated by the smart contract in the blockchain, and the functional nodes of the blockchain will be used to publish or update Synchronize the domain information and forwarding control policy to the local cache;

针对入口交换机接收到的新数据流,通过查询流表,若存在匹配流表项,则按匹配流表项转发,若不存在匹配流表项,则将数据流首包上传至SDN控制器,SDN基线控制器与控制器扩展的策略转发控制应用中的策略协同引擎进行交互来获取全局协同策略;For the new data flow received by the ingress switch, by querying the flow table, if there is a matching flow entry, it will be forwarded according to the matching flow entry; if there is no matching flow entry, the first packet of the data flow will be uploaded to the SDN controller. The SDN baseline controller interacts with the policy coordination engine in the policy forwarding control application extended by the controller to obtain the global coordination strategy;

SDN基线控制器依据获取的全局协同策略,联合全局域级别的网络视图,通过域间路径计算来获取满足全局策略约束下的域级别转发路径;利用SDN控制器间的东西向接口向转发域控制器分发域间路径片段,各域SDN控制器根据域间路径片段下发流表项,最终实现跨域转发控制。Based on the obtained global coordination policy, the SDN baseline controller combines the network view at the global domain level, and obtains the domain-level forwarding path that satisfies the constraints of the global policy through inter-domain path calculation; uses the east-west interface between SDN controllers to control the forwarding domain The controller distributes inter-domain path segments, and each domain SDN controller issues flow entries according to the inter-domain path segments, and finally realizes cross-domain forwarding control.

参见图3所示,可将协同转发控制流程划分为如下三个阶段:Referring to Figure 3, the cooperative forwarding control process can be divided into the following three stages:

(1)信息共享阶段:各域的域信息管理器将本域内的域、用户、设备等实体的属性信息以及IP地址与用户标识、设备标识的映射关系生成域信息交易并签名,上传至区块链;区块链验签交易并通过调用域信息管理智能合约实现域信息发布或更新。各域的策略管理器制定跨域的转发控制策略,并封装成策略交易并签名,上传至区块链,区块链验签交易,通过调用策略管理智能合约实现策略发布或更新。各域区块链功能节点将域信息管理合约账户中的域信息和策略管理合约账户中的策略动态同步到SDN控制器的本地缓存。至此,信息共享阶段实现了安全可信的SDN域信息和策略共享。(1) Information sharing stage: the domain information manager of each domain generates domain information transactions and signs the attribute information of entities such as domains, users, and devices in the domain, and the mapping relationship between IP addresses, user IDs, and device IDs, and uploads them to the domain. Block chain: block chain checks and signs transactions and implements domain information release or update by calling domain information management smart contracts. The policy manager of each domain formulates a cross-domain forwarding control strategy, encapsulates it into a policy transaction and signs it, uploads it to the blockchain, and the blockchain verifies the transaction, and implements policy release or update by calling the policy management smart contract. Each domain block chain function node dynamically synchronizes the domain information in the domain information management contract account and the policy in the policy management contract account to the local cache of the SDN controller. So far, the information sharing stage has realized safe and credible SDN domain information and policy sharing.

(2)策略协同阶段:当新流到达入口交换机,入口交换机查询流表,若存在匹配流表项则按匹配流表项转发;若不存在,则将数据流首包通过pack-in消息上传控制器。SDN基线控制器通过流策略请求器将包含跨域数据流首包的流策略请求上传至策略转发控制应用的策略协同引擎。策略协同引擎通过查询本地缓存数据,执行“属性映射”、“策略匹配”和“路径合成”,得到全局协同策略。策略协同引擎将该数据流的全局协同策略下发给SDN基线控制器。(2) Policy coordination stage: When the new flow arrives at the ingress switch, the ingress switch queries the flow table, and if there is a matching flow entry, it will be forwarded according to the matching flow entry; if not, the first packet of the data flow will be uploaded through the pack-in message controller. The SDN baseline controller uploads the flow policy request containing the first packet of the cross-domain data flow to the policy coordination engine of the policy forwarding control application through the flow policy requester. The strategy coordination engine obtains the global coordination strategy by querying the local cache data and performing "attribute mapping", "policy matching" and "path synthesis". The policy coordination engine sends the global coordination policy of the data flow to the SDN baseline controller.

(3)路径生成阶段:控制器收到全局协同策略,将其交给域间路径计算组件。域间路径计算组件联合东西桥WE-bridge组件提供的全局域级别的网络视图,计算满足全局协同策略约束下的域级别转发路径,并通过控制器间的东西向接口向转发域的控制器分发路径片段,各SDN域控制器根据路径片段下发流表项,从而实现跨域的面向策略的转发控制。(3) Path generation stage: the controller receives the global collaborative policy and hands it over to the inter-domain path calculation component. The inter-domain path calculation component combines the global domain-level network view provided by the east-west bridge WE-bridge component to calculate the domain-level forwarding path that meets the constraints of the global coordination policy, and distributes it to the controllers in the forwarding domain through the east-west interface between the controllers Each SDN domain controller issues flow entries according to the path segment, so as to realize cross-domain policy-oriented forwarding control.

进一步地,上传至区块链上的各SDN域的域信息至少包含:实体属性信息及标识映射关系,其中,实体属性信息包含:本域内的域、用户及设备信息,标识映射关系包含:IP地址与用户标识和设备标识之间的映射关系。Further, the domain information of each SDN domain uploaded to the blockchain includes at least: entity attribute information and identification mapping relationship, wherein the entity attribute information includes: domain, user and device information in the domain, and the identification mapping relationship includes: IP The mapping relationship between addresses and user IDs and device IDs.

本案实施例中的转发策略制定过程中,通过如下内容来获取策略范式表示:In the process of formulating the forwarding policy in the embodiment of this case, the following content is used to obtain the policy paradigm representation:

将属性Attribute描述为具有某种数据类型和值域的变量,可抽象为<attr,Value>,其中attr表示属性名,Value表示该属性的值域,Value={value1,value2,...,valuex},即每个属性都有自己的属性名和对应的取值范围。本案实施例中的属性用于描述数据流和路径。属性类别包括域、用户、设备、业务。其中,Attribute is described as a variable with a certain data type and value range, which can be abstracted as <attr, Value>, where attr represents the attribute name, Value represents the value range of the attribute, Value={value 1 ,value 2 ,.. .,value x }, that is, each attribute has its own attribute name and corresponding value range. The attributes in this example are used to describe the data flow and path. Attribute categories include domain, user, device, and business. in,

域属性:包括域标识符、网络地址、域的入口网关或出口网关标识、域类型(如商业域、政府域)或域的社会法定名称、域的安全等级、域的信任等级等;Domain attributes: including domain identifier, network address, domain entry gateway or exit gateway identifier, domain type (such as commercial domain, government domain) or social legal name of the domain, domain security level, domain trust level, etc.;

用户属性:具有用户标识符、用户所属单位、部门、级别等;User attributes: user identifier, user unit, department, level, etc.;

设备属性:包括设备标识符、MAC地址、设备位置、所属部门、保密等级等;Device attributes: including device identifier, MAC address, device location, department, confidentiality level, etc.;

业务属性:业务标识符、协议、端口号、业务类型等,通过协议、端口号或自定义业务类别指明该条策略针对的报文类型或业务类型。Business attributes: business identifier, protocol, port number, business type, etc., specify the packet type or business type targeted by this policy through the protocol, port number or user-defined business category.

属性名值对avp用于表示一个属性的具体取值,可抽象为二元组<attr,value>,表示attr=value。属性名值对集合可用AVP表示。本案实施例使用属性名值对集合来描述域、用户、设备、业务所具有的属性,详细表示见表1。The attribute name-value pair avp is used to represent the specific value of an attribute, which can be abstracted into a tuple <attr, value>, which means attr=value. A set of attribute name value pairs can be represented by AVP. The embodiment of this case uses a set of attribute name-value pairs to describe the attributes of domains, users, devices, and services. See Table 1 for details.

表1属性名值对对照表Table 1 Property name value pair comparison table

Figure BDA0003833070510000071
Figure BDA0003833070510000071

Figure BDA0003833070510000081
Figure BDA0003833070510000081

如domAVP={<domID,001>,<dom_net,202.20.2.0/24>,<dom_type,EDU>,<dom_sl,3>,<dom_tl=2>}表示001号域的子网地址是202.20.2.0/24,属于教育类型的组织,该域的安全等级为3,信任等级为2。For example, domAVP={<domID,001>,<dom_net,202.20.2.0/24>,<dom_type,EDU>,<dom_sl,3>,<dom_tl=2>} indicates that the subnet address of domain 001 is 202.20.2.0 /24, which belongs to the education type organization, the security level of this domain is 3, and the trust level is 2.

userAVP={<userID,00001>,<user_org,orgnationA>,<user_depart,depatmentB>,<user_type,manager>,<user_tl,2>}表示用户标识为“00001”的用户来自于“organizationA”的“departmentB”,其角色为“manager”,信任等级为“2”级。userAVP={<userID,00001>,<user_org,organizationA>,<user_depart,depatmentB>,<user_type,manager>,<user_tl,2>} indicates that the user whose user ID is "00001" comes from "departmentB" of "organizationA" ", its role is "manager", and its trust level is "2".

devAVP={<devID,00001>,<dev_mac,4f:3e:32:62:53:3f>,<dev_loc,locationA>,<dev_org,orgnationA>,<dev_depart,departmentC>,<dev_sl,2>}表示设备标识为“00001”的MAC地址为“4f:3e:32:62:53:3f”,地理位置位于“loacationA”,属于组织“orgnationA”的“departmentB”部门,设备的保密等级为“2”级。devAVP={<devID,00001>,<dev_mac,4f:3e:32:62:53:3f>,<dev_loc,locationA>,<dev_org,organizationA>,<dev_depart,departmentC>,<dev_sl,2>} means The MAC address of the device with the identifier "00001" is "4f:3e:32:62:53:3f", the geographical location is located in "loacationA", belongs to the department "departmentB" of the organization "organizationA", and the security level of the device is "2" class.

servAVP={<servID,0001>,<serv_type,vedioconferencing><ser_protocol,SIP>,<ser_dport,5060>}表示业务标识为“0001”的网络业务的类型为“vedioconferencing”,使用的协议为“SIP”,对应的端口号为“5060”。servAVP={<servID,0001>,<serv_type,vedioconferencing><ser_protocol,SIP>,<ser_dport,5060>} indicates that the type of network service with the service identifier "0001" is "vedioconferencing", and the protocol used is "SIP" , and the corresponding port number is "5060".

servAVP={<servID,0002>,<serv_type,双11>,<ser_protocol,https>,<ser_dport,443>}表示业务标识为“0002”的网络业务是“双11”,使用的协议是“https”,对应的端口号是“443”。servAVP={<servID,0002>,<serv_type,Double 11>,<ser_protocol,https>,<ser_dport,443>} indicates that the network service with service ID "0002" is "Double 11" and the protocol used is "https ", the corresponding port number is "443".

在本案实施例中从业务层面,可将数据流(dataflow)抽象为七元组<SrcDom,SrcUser,SrcDev,DestDom,DestUser,DestDev,Serv>,即用数据流的源域、源用户、源设备、目的域、目的用户、目的设备和网络服务的属性集合来表示一个数据流。In the embodiment of this case, from the business level, the data flow (dataflow) can be abstracted into a seven-tuple <SrcDom, SrcUser, SrcDev, DestDom, DestUser, DestDev, Serv>, that is, the source domain, source user, and source device of the data flow , destination domain, destination user, destination device, and network service attribute set to represent a data flow.

一个数据流的源属性可以由其源域、源用户、源设备的属性名值对集合构成,可形式化表示为:srcAVP={srcdomAVP,srcuserAVP,srcdevAVP}。The source attribute of a data flow can be composed of a set of attribute name-value pairs of its source domain, source user, and source device, which can be expressed formally as: srcAVP={srcdomAVP, srcuserAVP, srcdevAVP}.

一个数据流的目的属性可以由其目的域、目的用户、目的设备的属性名值对集合构成,形式化表示为:dstAVP={dstdomAVP,dstuserAVP,dstdevAVP}。The destination attribute of a data stream may be composed of a set of attribute name-value pairs of its destination domain, destination user, and destination device, which is formally expressed as: dstAVP={dstdomAVP, dstuserAVP, dstdevAVP}.

因此,一个数据流可以表示为dataflow=srcAVPUdstAVPUservAVP。Therefore, a data flow can be expressed as dataflow=srcAVPUdstAVPUservAVP.

属性谓词ap用于限定属性的取值范围,ap可抽象为三元组<attr,∝,value>,其中∝∈{=,≠,<,≤,>,≥,in,not in,between}。在本案实施例中,属性谓词用作策略范式中的属性约束条件。The attribute predicate ap is used to limit the value range of the attribute. ap can be abstracted as a triplet <attr,∝,value>, where ∝∈{=,≠,<,≤,>,≥,in,not in,between} . In this embodiment, attribute predicates are used as attribute constraints in the policy paradigm.

属性谓词评估指给定属性名值对avp和属性谓词ap,ap对avp的评估结果为真当且仅当二者的属性名相同且avp中的属性值属于ap限定的取值范围,可形式化定义为:

Figure BDA0003833070510000093
Attribute predicate evaluation refers to a given attribute name-value pair avp and attribute predicate ap, and the evaluation result of ap to avp is true if and only if the attribute names of the two are the same and the attribute value in avp belongs to the value range limited by ap, which can be in the form is defined as:
Figure BDA0003833070510000093

面向数据流和路径属性的转发控制策略范式可设计如下:The forwarding control strategy paradigm for data flow and path attributes can be designed as follows:

policy=<domID,policyID,policyType,SrcAP,DstAP,ServAP,Path,action>policy=<domID, policyID, policyType, SrcAP, DstAP, ServAP, Path, action>

其中,domID:表示制定该策略的域标识;policyID:表示本条策略在该域的标识,domID和policyID联合可在多域环境中唯一指明一条策略;policyType:表示策略类型,策略分为2类,policyType=SOURCE表示源发策略,用于约束本域源发的数据流,policyType=TRANSFER表示承载策略,用于过滤来自其他域的数据流;SrcAP:表示对数据流的源发属性约束,由源域属性谓词、源用户谓词约束、源设备属性谓词通过逻辑合取构成,即

Figure BDA0003833070510000091
DstAP:表示对数据流的目的属性约束,由目的域属性谓词、目的用户属性谓词、目的设备属性谓词通过逻辑合取构成,即
Figure BDA0003833070510000092
ServAP:表示对数据流的业务属性约束,通过协议、端口号或自定义业务类型等属性谓词的逻辑合取构成,即ServAP=servap1∧servap2,...∧servapg;Path:表示对数据流的路径约束,通过传输域的安全级别、信任等级或者域标识等属性谓词的逻辑合取构成,即Path=pathap1∧pathap2∧...∧pathapp,可用于源域限定传输该源发数据流的域的安全等级、信任等级,或限定该数据流必须经过或不能经过的域;action表示对满足策略约束的数据流在策略约束路径上的转发动作,包括丢弃drop、转发forward。Among them, domID: indicates the domain ID that formulates the policy; policyID: indicates the ID of this policy in this domain, and the combination of domID and policyID can uniquely specify a policy in a multi-domain environment; policyType: indicates the policy type, and the policy is divided into two types, policyType=SOURCE means the origination policy, which is used to restrict the data flow originating from this domain; policyType=TRANSFER means the bearer policy, which is used to filter the data flow from other domains; Domain attribute predicates, source user predicate constraints, and source device attribute predicates are formed by logical conjunction, namely
Figure BDA0003833070510000091
DstAP: Represents the constraint on the destination attribute of the data stream, which is composed of the destination domain attribute predicate, destination user attribute predicate, and destination device attribute predicate through logical conjunction, that is,
Figure BDA0003833070510000092
ServAP: Indicates the business attribute constraints on the data flow, formed by the logical conjunction of attribute predicates such as protocol, port number or custom service type, that is, ServAP=servap 1 ∧servap 2 ,...∧servap g ; Path: indicates the The path constraint of the data flow is formed by the logical conjunction of attribute predicates such as the security level, trust level, or domain identifier of the transmission domain, that is, Path=pathap 1 ∧pathap 2 ∧...∧pathap p , which can be used to limit the transmission of the data in the source domain. The security level and trust level of the domain that sends the data flow, or the domain that limits the data flow must or cannot pass through; action indicates the forwarding action on the policy-constrained path of the data flow that meets the policy constraints, including discarding drop and forwarding forward .

策略类型、路径约束和动作联合可确定一个数据流的转发路径决策,如表2所示。本案实施例中,约定数据流的源域可以限定源发数据流的转发路径,传输域不能限定其他域源发数据流的转发路径,但有权决定是否承载该数据流,即有权决定接收并转发该数据流或者丢弃该数据流。The combination of policy type, path constraint and action can determine the forwarding path decision of a data flow, as shown in Table 2. In the embodiment of this case, the source domain of the agreed data flow can limit the forwarding path of the original data flow, and the transmission domain cannot limit the forwarding path of the data flow originating from other domains, but has the right to decide whether to carry the data flow, that is, the right to decide to receive And forward the data flow or discard the data flow.

表2策略的转发控制含义Table 2 The forwarding control meaning of the policy

Figure BDA0003833070510000101
Figure BDA0003833070510000101

一个数据流匹配一条策略当且仅当对于策略中的每个属性谓词,数据流对应的属性名值对的值属于该属性谓词的取值范围,可形式化表示为:A data flow matches a policy if and only if, for each attribute predicate in the policy, the value of the attribute name-value pair corresponding to the data flow belongs to the value range of the attribute predicate, which can be formally expressed as:

Figure BDA0003833070510000102
Figure BDA0003833070510000102

本案实施例包括域信息交易和策略交易,交易格式如图4所示,交易一般格式(a)中,ID代表交易标识;PK代表域的区块链账户公钥,各SDN域的策略转发控制应用具有自己的公私钥对,公钥作为该外部账户在区块链上的唯一标识,私钥用于对该外部账户上传到区块链上的交易进行签名;TxType:交易类型;TxData:交易数据;tp代表交易发布的时间戳;sign是交易发起账户对交易的签名;域信息交易格式如(b)所示,其交易数据为DomInf,以键值对形式存储,包含域标识、该SDN域内IP地址与用户标识和设备标识的映射关系的集合以及域、用户、设备的属性名值对集合,它的形式化表示如(d)所示;策略交易格式如(c)所示,其交易数据为PolicySet,以键值对形式存储,包含域标识和该SDN域制定的源发策略集和承载策略集,形式化表示如(e)所示。The embodiment of this case includes domain information transactions and policy transactions. The transaction format is shown in Figure 4. In the general transaction format (a), ID represents the transaction identifier; PK represents the blockchain account public key of the domain, and the policy forwarding control of each SDN domain The application has its own public-private key pair, the public key is used as the unique identifier of the external account on the blockchain, and the private key is used to sign the transaction uploaded by the external account to the blockchain; TxType: transaction type; TxData: transaction data; tp represents the timestamp of the transaction release; sign is the signature of the transaction originating account; the domain information transaction format is shown in (b), and its transaction data is DomInf, which is stored in the form of key-value pairs, including the domain identifier, the SDN The set of mapping relations between IP addresses in the domain and user IDs and device IDs, and the set of attribute name-value pairs of domains, users, and devices. Its formal representation is shown in (d); the policy transaction format is shown in (c), and its The transaction data is PolicySet, which is stored in the form of key-value pairs, including the domain identifier and the source policy set and bearer policy set formulated by the SDN domain. The formal representation is shown in (e).

域信息管理智能合约DIM Contract通过域信息发布DomInfPublish接口实现域信息发布或更新,可设计如算法1所示。域信息交易DomInfTx通过调用DomInfPublish接口,把DomInf中的IP地址与实体的映射关系以及实体的属性信息以domID为索引写入DIMContract账户中。各域的区块链功能节点把DIM Contract账户中的数据同步到SDN控制器本地缓存中,记为DomInfDB。The domain information management smart contract DIM Contract implements domain information publishing or updating through the domain information publishing DomInfPublish interface, which can be designed as shown in Algorithm 1. The domain information transaction DomInfTx writes the mapping relationship between the IP address and the entity in DomInf and the attribute information of the entity into the DIMContract account with domID as the index by calling the DomInfPublish interface. The blockchain functional nodes of each domain synchronize the data in the DIM Contract account to the local cache of the SDN controller, which is recorded as DomInfDB.

Figure BDA0003833070510000111
Figure BDA0003833070510000111

策略管理合约PM Contract通过PolicyPublish接口实现策略发布和更新,可设计如算法2所示。策略交易PolicyTx通过调用PolicyPublish接口将PolicySet中的策略按域标识和策略类型写入PM Contract账户中。各域的区块链功能节点把PM Contract账户中的数据同步到SDN控制器本地缓存中,记为PolicyDB。The policy management contract PM Contract implements policy publishing and updating through the PolicyPublish interface, which can be designed as shown in Algorithm 2. Policy transaction PolicyTx writes the policies in the PolicySet into the PM Contract account according to the domain identifier and policy type by calling the PolicyPublish interface. The blockchain function nodes of each domain synchronize the data in the PM Contract account to the local cache of the SDN controller, which is recorded as PolicyDB.

Figure BDA0003833070510000112
Figure BDA0003833070510000112

进一步地,本案实施例中,SDN基线控制器与策略协同引擎进行交互来获取全局协同策略中,首先,通过解析流策略请求来获取数据包首部关键字段,通过查询SDN控制器本地缓存中的DomInfDB将数据流网络标识与业务属性进行映射;然后,根据数据流属性对SDN控制器本地缓存中的PolicyDB执行策略匹配来获取匹配策略集;最后,通过对匹配策略集执行路径合成来获取全局路径约束的全局协同策略。Further, in the embodiment of this case, when the SDN baseline controller interacts with the policy coordination engine to obtain the global coordination policy, firstly, the key field of the data packet header is obtained by parsing the flow policy request, and by querying the local cache of the SDN controller DomInfDB maps the data flow network identifier and business attributes; then, according to the data flow attributes, executes policy matching on the PolicyDB in the local cache of the SDN controller to obtain the matching policy set; finally, obtains the global path by performing path synthesis on the matching policy set Constrained global collaborative strategy.

当新流达到时,触发策略协同引擎执行策略协同算法,可设计如算法3所示。策略协同算法PolicyCollaborate()由属性映射AttibuteMap()、策略匹配PolicyMatch()及路径合成PathSynthesize()3个功能步骤实现:When a new flow arrives, the policy coordination engine is triggered to execute the policy coordination algorithm, which can be designed as shown in Algorithm 3. The policy collaboration algorithm PolicyCollaborate() is implemented by three functional steps: attribute mapping AttributeMap(), policy matching PolicyMatch() and path synthesis PathSynthesize():

(1)通过解析flowPolicyRequest,获取数据流首包的首部,AttibuteMap()根据首部中的网络标识字段映出数据流所对应的属性,即mapAttrSet(lines 1-2);(1) Obtain the header of the first packet of the data flow by parsing the flowPolicyRequest, and AttributeMap() maps the attributes corresponding to the data flow according to the network identification field in the header, that is, mapAttrSet(lines 1-2);

(2)PolicyMatch()根据数据流属性执行策略匹配,获得约束该数据流的所有策略,即匹配策略集matchPolicySet(line 3);(2) PolicyMatch() performs policy matching according to the data flow attributes, and obtains all policies that constrain the data flow, that is, the matching policy set matchPolicySet (line 3);

(3)PathSynthesize()对匹配策略集执行路径合成,返回该数据流的全局路径约束(lines 4-5)。(3) PathSynthesize() performs path synthesis on the matching strategy set, and returns the global path constraints of the data flow (lines 4-5).

Figure BDA0003833070510000113
Figure BDA0003833070510000113

Figure BDA0003833070510000121
Figure BDA0003833070510000121

进一步地,将数据流网络标识与业务属性进行映射时,根据数据包首部关键字段,读取源IP、目的IP及端口号或协议类型;根据源IP获取源域、源用户、源设备的属性名值对集合,并组成数据流的源属性;根据目的IP获取目的域、目的用户、目的设备的属性名值对集合,并组成数据流的目的属性;将端口号或协议类型作为业务标识,根据端口号或协议类型获取网络服务属性;联合源属性、目的属性及网络服务属性构成数据流的业务属性集,并依据数据流关键字段生成对应的流标识;通过联合流标识与业务属性集来完成数据流网络标识与业务属性之间的映射。Further, when mapping the data stream network identifier and business attributes, read the source IP, destination IP, port number or protocol type according to the key fields of the data packet header; obtain the source domain, source user, and source device information according to the source IP A collection of attribute name-value pairs, and form the source attribute of the data flow; obtain the set of attribute name-value pairs of the destination domain, destination user, and destination device according to the destination IP, and form the destination attribute of the data flow; use the port number or protocol type as the service identifier , obtain the network service attribute according to the port number or protocol type; combine the source attribute, destination attribute and network service attribute to form the business attribute set of the data flow, and generate the corresponding flow identifier according to the key field of the data flow; through the combination of the flow identifier and the business attribute Set to complete the mapping between data flow network identifiers and business attributes.

属性映射函数AttributeMap()根据数据流首包的关键字段映射出数据流属性。方法是查询DomInfDB,首先根据数据包头的关键字段映射出对应的标识,然后根据标识映出对应的属性,最后联合这些属性构成数据流属性。AttributeMap()可设计如算法4所示:The attribute mapping function AttributeMap() maps the data stream attributes according to the key fields of the first packet of the data stream. The method is to query DomInfDB, first map the corresponding identifier according to the key field of the data packet header, then map the corresponding attribute according to the identifier, and finally combine these attributes to form the data flow attribute. AttributeMap() can be designed as shown in Algorithm 4:

(1)读取源ip,根据源ip从DomInfDB中获取源域、源用户、源设备的属性名值对集合,构成数据流的源属性(lines 2-4);(1) Read the source ip, and obtain the set of attribute name-value pairs of the source domain, source user, and source device from DomInfDB according to the source ip to form the source attribute of the data stream (lines 2-4);

(2)读取目的ip,根据目的ip从DomInfDB中获取目的域、目的用户、目的设备的属性名值对集合,构成数据流的目的属性(lines 5-7);(2) Read the destination ip, and obtain the attribute name-value pair set of the destination domain, destination user, and destination device from the DomInfDB according to the destination IP, to form the destination attribute of the data stream (lines 5-7);

(3)读取端口号或协议类型作为业务标识,有端口号读取端口号,无端口号读取协议类型,根据端口号或协议类型从DomInfDB中获取网络服务的属性名值对的集合(lines8-9);(3) Read the port number or protocol type as the business identifier, read the port number with the port number, read the protocol type without the port number, and obtain the set of attribute name-value pairs of the network service from DomInfDB according to the port number or protocol type (lines8 -9);

(4)联合源发属性、目的属性、网络服务属性构成该数据流对应的属性集FlowAttrSet(line 10);(4) Combining source attributes, destination attributes, and network service attributes to form an attribute set FlowAttrSet (line 10) corresponding to the data flow;

(5)根据该数据流数据包首部的关键字段生成对应的流标识FlowSN(line 11);(5) Generate a corresponding flow identifier FlowSN (line 11) according to the key field of the data flow packet header;

(6)联合流标识与流属性集,作为属性映射函数结果返回(lines 12-13)。(6) Combine the flow identifier and the flow attribute set, and return it as the result of the attribute mapping function (lines 12-13).

Figure BDA0003833070510000122
Figure BDA0003833070510000122

Figure BDA0003833070510000131
Figure BDA0003833070510000131

进一步地,本案实施例中,通过策略匹配获取匹配策略集时,首先,根据数据流的源域标识获取源发策略并根据策略类型获取各域的承载策略,将源发策略和承载策略构成相关策略集;然后,对相关策略集中的每条策略,如果数据流的属性集满足策略中的所有属性谓词约束,则将对应策略作为匹配策略,否则,遍历下一条策略,直至遍历完相关策略集中的所有策略,进而得到匹配策略集。Furthermore, in the embodiment of this case, when obtaining the matching policy set through policy matching, firstly, the source policy is obtained according to the source domain identifier of the data flow, and the bearer policy of each domain is obtained according to the policy type, and the source policy and the bearer policy are related policy set; then, for each policy in the relevant policy set, if the attribute set of the data flow satisfies all the attribute predicate constraints in the policy, the corresponding policy will be used as the matching policy; otherwise, the next policy will be traversed until the relevant policy set is traversed All policies, and then get the matching policy set.

策略匹配根据数据流属性执行策略匹配,获取约束该数据流转发路径的策略集,可设计如算法5所示,PolicyMatch()算法流程如下:Policy matching performs policy matching according to data flow attributes, and obtains a policy set that constrains the forwarding path of the data flow. It can be designed as shown in Algorithm 5. The PolicyMatch() algorithm flow is as follows:

(1)初始化数据流属性集flowAVP为请求转发的流的属性集,属性匹配标记mark为0,源发策略集srcPolicySet、承载策略集transferPolicySet、相关策略集relevantPolicySet、匹配策略集matchPolicySet均为空(line 1);(1) Initialize the data flow attribute set flowAVP as the attribute set of the flow requested to be forwarded, the attribute matching mark is 0, the source policy set srcPolicySet, the bearer policy set transferPolicySet, the relevant policy set relevantPolicySet, and the matching policy set matchPolicySet are all empty (line 1);

(2)根据数据流的源域标识,从PolicyDB中读取该域的源发策略(line 2);(2) According to the source domain identifier of the data flow, read the source policy of the domain from PolicyDB (line 2);

(3)根据策略类型TRANSFER,从PolicyDB中读取各域的承载策略(line 3);(3) According to the policy type TRANSFER, read the bearer policy of each domain from PolicyDB (line 3);

(4)源发策略和承载策略构成相关策略集(line 4);(4) The source policy and the bearer policy constitute a related policy set (line 4);

(5)对相关策略集中的每一条策略,如果数据流属性集满足该策略的所有属性谓词约束,则该策略为匹配策略;否则,遍历下一条策略,直至遍历所有策略。(lines 5-11)(5) For each policy in the relevant policy set, if the data flow attribute set satisfies all the attribute predicate constraints of the policy, the policy is a matching policy; otherwise, traverse the next policy until all policies are traversed. (lines 5-11)

(6)返回匹配策略集(line 12)。(6) Return the matching strategy set (line 12).

Figure BDA0003833070510000132
Figure BDA0003833070510000132

进一步地,本案实施例中,执行路径合成,通过匹配策略集中的策略类型、路径约束及动作来获取全局路径约束的全局协同策略,其中,由匹配策略集中的策略类型、路径约束及动作获取全局协同策略,具体包含如下情形:对于匹配策略集中的每一条源发策略,如果动作为forward,则将其路径约束写入流路径约束,如果其动作为drop,则将其路径约束取反后,写入流路径约束;对于匹配策略集中的每一条承载策略,如果其路径约束不为空,则违反约定,报告错误,如果路径约束为空、且动作为drop,则将对应域标识取反并写入流路径约束,如果其路径约束为空、且动作为forward,则不影响数据转发,直至遍历所有承载策略;最后,联合流识别符、流路径约束和动作forward构成具有全局路径约束的全局协同策略。Furthermore, in the embodiment of this case, path synthesis is performed, and the global collaborative strategy of global path constraints is obtained by matching the policy types, path constraints, and actions in the policy set, wherein the global collaborative policy is obtained by matching the policy types, path constraints, and actions in the policy set. Collaborative strategy, specifically includes the following situations: for each source strategy in the matching strategy set, if the action is forward, write its path constraint into the flow path constraint; if its action is drop, then reverse its path constraint, Write stream path constraints; for each bearer policy in the matching policy set, if the path constraint is not empty, the contract will be violated and an error will be reported; if the path constraint is empty and the action is drop, the corresponding domain ID will be reversed and Write flow path constraints. If the path constraints are empty and the action is forward, data forwarding will not be affected until all bearer policies are traversed; finally, the joint flow identifier, flow path constraints and action forward form a global path constraint with global collaborative strategy.

路径合成算法对该流的匹配策略集进行路径约束合成,获取全局路径约束,可设计如算法6所示,PathSynthesize()算法流程如下:The path synthesis algorithm performs path constraint synthesis on the matching policy set of the flow to obtain the global path constraints. It can be designed as shown in Algorithm 6. The PathSynthesize() algorithm flow is as follows:

(1)初始化该流的路径约束flowPath为全集,路径变量path和动作变量action为null,全局协同策略collaborativePolicy为空(line 1);(1) Initialize the path constraint flowPath of the flow to be the complete set, the path variable path and the action variable action to be null, and the global collaborative policy collaborativePolicy to be empty (line 1);

(2)对于匹配策略集中的每一条源发策略,如果动作为forward,则将其路径约束写入流路径约束,如果其动作为drop,则将其路径约束取反后,写入流路径约束(line2-4,lines5-13);(2) For each source policy in the matching policy set, if the action is forward, write its path constraint into the stream path constraint; if its action is drop, reverse its path constraint and write it into the stream path constraint (lines2-4, lines5-13);

(3)对于匹配策略集中的每一条承载策略,如果其约束不为空,则违反约定,报告错误;如果其路径约束为空、且动作为drop,则将该域标识取反写入流路径约束;如果路径约束为空、且动作为forward,则不影响数据转发(line2-4,lines 14-25);(3) For each bearer policy in the matching policy set, if its constraint is not empty, the agreement will be violated and an error will be reported; if its path constraint is empty and the action is drop, the domain identifier will be reversed and written into the flow path Constraint; if the path constraint is empty and the action is forward, it will not affect data forwarding (line2-4, lines 14-25);

(4)联合流标识符、流路径约束和forward动作作为全局协同策略,并返回(lines31~32)。(4) Combine flow identifier, flow path constraint and forward action as a global collaborative strategy, and return (lines31~32).

Figure BDA0003833070510000141
Figure BDA0003833070510000141

Figure BDA0003833070510000151
Figure BDA0003833070510000151

本案实施例中,基于属性而非IP的转发控制策略范式,可以从服务管理的角度对数据流转发路径进行细粒度控制;而基于属性的方法为SDN跨域转发策略提供了统一、灵活的表达能力;并实现基于区块链的域信息和策略共享,解决了跨域策略不可知的问题,保证了分布式无信任环境下策略传递的安全性和可信度,创新性地实现了基于全局协同策略的跨域转发控制,消除了跨域策略冲突的问题;实现物理上集中、逻辑上隔离的架构,将区块链节点功能部署在本地控制器上,使SDN能够安全高效地与区块链交换数据;通过链上和链下的结合的功能模型,将转发控制与区块链分离,在本地控制器上执行策略协同,实现基于可信数据的策略协同,避免链上执行策略协同给数据流转发带来过多的延迟和复杂计算,便于部署实施。In the embodiment of this case, the forwarding control strategy paradigm based on attributes instead of IP can carry out fine-grained control on the data flow forwarding path from the perspective of service management; while the attribute-based method provides a unified and flexible expression for SDN cross-domain forwarding strategies capabilities; and achieve blockchain-based domain information and policy sharing, which solves the problem of unknowable cross-domain policies, ensures the security and credibility of policy delivery in a distributed trustless environment, and innovatively implements global-based The cross-domain forwarding control of collaborative policies eliminates the problem of cross-domain policy conflicts; realizes a physically centralized and logically isolated architecture, and deploys blockchain node functions on local controllers, enabling SDN to safely and efficiently communicate with blockchain Chain exchange data; through the combination of chain and off-chain functional models, the forwarding control is separated from the blockchain, and policy coordination is executed on the local controller to achieve policy coordination based on trusted data, avoiding the risk of execution of policy coordination on the chain. Data flow forwarding brings excessive delay and complex calculation, which is convenient for deployment and implementation.

除非另外具体说明,否则在这些实施例中阐述的部件和步骤的相对步骤、数字表达式和数值并不限制本发明的范围。Relative steps, numerical expressions and numerical values of components and steps set forth in these embodiments do not limit the scope of the present invention unless specifically stated otherwise.

最后应说明的是:以上所述实施例,仅为本发明的具体实施方式,用以说明本发明的技术方案,而非对其限制,本发明的保护范围并不局限于此,尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,其依然可以对前述实施例所记载的技术方案进行修改或可轻易想到变化,或者对其中部分技术特征进行等同替换;而这些修改、变化或者替换,并不使相应技术方案的本质脱离本发明实施例技术方案的精神和范围,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应所述以权利要求的保护范围为准。Finally, it should be noted that: the above-described embodiments are only specific implementations of the present invention, to illustrate the technical solutions of the present invention, rather than to limit it, and the scope of protection of the present invention is not limited thereto, although referring to the foregoing The embodiment has described the present invention in detail, and those of ordinary skill in the art should understand that any person familiar with the technical field can still modify the technical solutions described in the foregoing embodiments within the technical scope disclosed in the present invention Changes can be easily thought of, or equivalent replacements are made to some of the technical features; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be covered by the scope of the present invention. within the scope of protection. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims (10)

1. An inter-SDN domain cooperative forwarding control architecture based on a blockchain, comprising: the strategy forwarding control application based on the block chain is characterized in that the block chain function nodes of each SDN domain and an SDN controller are deployed in a local server of the SDN domain, the block chain function nodes form a block chain network in a P2P mode, a block chain global account book is stored in each SDN domain, and the interaction between the strategy forwarding control application and the controller and the block chain is realized by utilizing a local application program interface, wherein the strategy forwarding control application comprises the following steps: the system comprises a domain information manager used for registering and dynamically updating domain information, generating domain information transaction and uploading the domain information transaction to a block chain, a policy manager used for formulating an inter-domain forwarding control policy, generating a policy transaction and uploading the policy transaction to the block chain, and a policy cooperation engine used for executing attribute mapping, policy matching and path synthesis by inquiring a local cache and acquiring a global cooperation policy.
2. The inter-domain collaborative forwarding control architecture for SDNs based on blockchains according to claim 1, wherein the blockchain function nodes utilize a consensus mechanism to perform uplink acknowledgement on published or updated domain information or policy information, write the uplink acknowledgement into an account book database of each SDN domain blockchain node, and dynamically synchronize the domain information and policy information of an intelligent contract account in the consensus mechanism to a local cache of the SDN controller in real time.
3. An SDN inter-domain cooperative forwarding control method based on a block chain, characterized in that, based on the architecture implementation of claim 1, the method comprises the following steps:
uploading domain information and a cross-domain forwarding strategy of each SDN domain to a block chain, issuing or updating the domain information and the cross-domain forwarding strategy by an intelligent contract in the block chain, and synchronizing the issued or updated domain information and the forwarding control strategy to a local cache of an SDN controller by using a block chain function node;
for a new data flow received by an entrance switch, forwarding according to a flow rule by inquiring a flow table if a matched flow table entry exists, uploading a data flow first packet to an SDN controller if the flow table entry does not exist, and interacting the SDN baseline controller and a strategy coordination engine to acquire a global coordination strategy;
the SDN baseline controller combines a network view of a full-local level according to the obtained global cooperative strategy and obtains a domain-level forwarding path meeting the global strategy constraint through inter-domain path calculation; and distributing the path segments to the forwarding domain controller by utilizing east-west directional interfaces among the SDN controllers, and issuing a flow table entry by each SDN controller according to the path segments to realize cross-domain forwarding control.
4. The inter-domain collaborative forwarding control method for the SDN based on the block chain according to claim 3, wherein in the issuing or updating of the domain information and the cross-domain forwarding policy by the block chain, the domain information of each SDN domain is generated into a domain information transaction, which is signed and then uploaded to the block chain, the block chain verifies the signature of the domain information transaction, if the domain information transaction is verified, a domain information management intelligent contract is invoked to implement the issuing and updating of the domain information, and the domain information in the domain information management intelligent contract account is synchronized to a local cache of the SDN controller by using a function node of the block chain; the cross-domain forwarding strategies of the SDN domains are packaged into strategy transactions, the strategy transactions are uploaded to a block chain after signature, the signature of the strategy transactions is verified by the block chain, the strategy management contract is called to realize the release and the update of the forwarding control strategies when the strategy transactions are verified, and the forwarding control strategies in the intelligent contract account for strategy management are synchronized to the local cache of the SDN controller by using the block chain function nodes.
5. The inter-domain collaborative forwarding control method for SDNs based on a blockchain according to claim 3 or 4, wherein the domain information uploaded to each SDN domain on the blockchain at least includes: entity attribute information and an identifier mapping relationship, wherein the entity attribute information comprises: the mapping relation of the domain, the user and the equipment information in the domain comprises the following steps: and the mapping relation among the IP address, the user identification and the equipment identification.
6. The inter-domain collaborative forwarding control method for SDNs based on a blockchain according to claim 3 or 4, wherein the cross-domain forwarding policy uploaded to each SDN domain on the blockchain is represented by a tuple, and a specific paradigm is represented as:
policy = < domID, policyID, policyType, srcAP, dstAP, servAP, path, action >, wherein domID represents a domain identifier for making a policy, policyID represents an identifier of the policy in the domain, policyType represents a policy type, the policy type is divided into an originating policy for restricting originating data flow of the domain and a bearer policy for filtering data flow from other domains, srcAP represents an originating attribute constraint for data flow, dstAP represents a destination attribute constraint for data flow, servAP represents a network service attribute constraint for data flow, path represents a Path constraint for data flow, and action represents a forwarding action on a policy constraint Path for data flow satisfying the policy constraint.
7. The method of claim 3, wherein in acquiring the global coordination policy by interaction between the SDN baseline controller and the policy coordination engine, a key field of a packet header is acquired by parsing a stream policy request, and a data stream network identifier is mapped with a service attribute by querying locally cached domain information; then, reading a strategy set of the local cache according to the data stream attribute, and obtaining a matching strategy set through strategy matching; and finally, performing path synthesis on the matching strategy set to obtain a global cooperative strategy of global path constraint.
8. The inter-domain collaborative forwarding control method for SDN based on a blockchain according to claim 7, wherein when mapping a data flow network identifier and a service attribute, a source IP, a destination IP, and a port number or a protocol type are read according to a key field of a header of a data packet; acquiring attribute name value pair sets of a source domain, a source user and source equipment according to a source IP (Internet protocol), and forming source attributes of a data stream; acquiring attribute name value pair sets of a destination domain, a destination user and destination equipment according to a destination IP (Internet protocol), and forming a destination attribute of the data stream; acquiring a network service attribute value pair set according to the port number or the protocol type, and using the network service attribute value pair set as the network service attribute of the data stream; combining the source attribute, the destination attribute and the network service attribute to form a service attribute set of the data stream, and generating a corresponding stream identifier according to a key field at the head part of the data stream; and the mapping between the data stream network identifier and the service attribute is completed by combining the stream identifier and the service attribute set.
9. The inter-domain collaborative forwarding control method for SDN based on a block chain according to claim 7, wherein when obtaining the matching policy set through policy matching, first, a source policy of a source domain is obtained according to a source domain identifier of a data stream and a bearer policy of each domain is obtained according to a policy type, and the source policy of the source domain and the bearer policy of each domain form a relevant policy set; then, for each strategy in the relevant strategy set, if the attribute set of the data stream meets all attribute predicate constraints in the strategy, the corresponding strategy is used as a matching strategy, otherwise, the next strategy is traversed until all strategies in the relevant strategy set are traversed, and then a matching strategy set is obtained.
10. The SDN inter-domain cooperative forwarding control method according to claim 7, wherein when performing path synthesis, the global cooperative policy with global path constraints is obtained by matching policy types, path constraints, and actions in the policy set, where obtaining the global cooperative policy from the policy types, path constraints, and actions in the matching policy set specifically includes the following situations: for each source policy in the matching policy set, if the action is forward, writing the path constraint into the flow path constraint, and if the action is drop, writing the flow path constraint after negating the path constraint; for each bearer policy in the matching policy set, if the path constraint is not null, violating the convention, reporting an error, if the path constraint is null and the action is drop, negating the corresponding domain identifier and writing the reversed domain identifier into the flow path constraint, and if the path constraint is null and the action is forward, not affecting data forwarding until all bearer policies are traversed; finally, the joint flow identifier, flow path constraints and action forward constitute a global collaborative policy with global path constraints.
CN202211079285.3A 2022-09-05 2022-09-05 Blockchain-based SDN inter-domain cooperative forwarding control system and method Active CN115514691B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211079285.3A CN115514691B (en) 2022-09-05 2022-09-05 Blockchain-based SDN inter-domain cooperative forwarding control system and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211079285.3A CN115514691B (en) 2022-09-05 2022-09-05 Blockchain-based SDN inter-domain cooperative forwarding control system and method

Publications (2)

Publication Number Publication Date
CN115514691A true CN115514691A (en) 2022-12-23
CN115514691B CN115514691B (en) 2023-06-27

Family

ID=84502369

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211079285.3A Active CN115514691B (en) 2022-09-05 2022-09-05 Blockchain-based SDN inter-domain cooperative forwarding control system and method

Country Status (1)

Country Link
CN (1) CN115514691B (en)

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105871718A (en) * 2016-03-21 2016-08-17 东南大学 SDN (Software-Defined Networking) inter-domain routing implementation method
US20190014124A1 (en) * 2017-07-10 2019-01-10 Cisco Technology, Inc. End-to-end policy management for a chain of administrative domains
CN109246176A (en) * 2018-07-03 2019-01-18 北京邮电大学 Based on the multi-controller synchronous method and device of block chain in software defined network
US20190260714A1 (en) * 2018-02-19 2019-08-22 Electronics And Telecommunications Research Institute Decentralized software-defined networking method and apparatus
CN110417739A (en) * 2019-06-27 2019-11-05 华东师范大学 A secure network in-band measurement method based on blockchain technology
WO2020112436A1 (en) * 2018-11-26 2020-06-04 The University Of Akron 3s-chain: smart, secure, and software-defined networking (sdn)-powered blockchain-powered networking and monitoring system
US20200374127A1 (en) * 2019-05-21 2020-11-26 The University Of Akron Blockchain-powered cloud management system
CN112235252A (en) * 2020-09-21 2021-01-15 西安电子科技大学 Blockchain-based security identification method, security identification system and storage medium
US20210160171A1 (en) * 2019-11-22 2021-05-27 Guangzhou University Blockchain-based verifiable inter-domain routing validation method
CN113572734A (en) * 2021-06-24 2021-10-29 福建师范大学 Blockchain-based cross-domain access control method in mobile edge computing
CN114827002A (en) * 2022-03-17 2022-07-29 西安电子科技大学 Multi-domain network security path calculation method, system, device, medium and terminal
CN114844902A (en) * 2022-06-30 2022-08-02 南京邮电大学 SDN controller and equipment interaction method based on block chain technology

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105871718A (en) * 2016-03-21 2016-08-17 东南大学 SDN (Software-Defined Networking) inter-domain routing implementation method
US20190014124A1 (en) * 2017-07-10 2019-01-10 Cisco Technology, Inc. End-to-end policy management for a chain of administrative domains
US20190260714A1 (en) * 2018-02-19 2019-08-22 Electronics And Telecommunications Research Institute Decentralized software-defined networking method and apparatus
CN109246176A (en) * 2018-07-03 2019-01-18 北京邮电大学 Based on the multi-controller synchronous method and device of block chain in software defined network
WO2020112436A1 (en) * 2018-11-26 2020-06-04 The University Of Akron 3s-chain: smart, secure, and software-defined networking (sdn)-powered blockchain-powered networking and monitoring system
US20200374127A1 (en) * 2019-05-21 2020-11-26 The University Of Akron Blockchain-powered cloud management system
CN110417739A (en) * 2019-06-27 2019-11-05 华东师范大学 A secure network in-band measurement method based on blockchain technology
US20210160171A1 (en) * 2019-11-22 2021-05-27 Guangzhou University Blockchain-based verifiable inter-domain routing validation method
CN112235252A (en) * 2020-09-21 2021-01-15 西安电子科技大学 Blockchain-based security identification method, security identification system and storage medium
CN113572734A (en) * 2021-06-24 2021-10-29 福建师范大学 Blockchain-based cross-domain access control method in mobile edge computing
CN114827002A (en) * 2022-03-17 2022-07-29 西安电子科技大学 Multi-domain network security path calculation method, system, device, medium and terminal
CN114844902A (en) * 2022-06-30 2022-08-02 南京邮电大学 SDN controller and equipment interaction method based on block chain technology

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
ANICHUR RAHMAN;MD. JAHIDUL ISLAM;ANTONIO MONTIERI;MOSTOFA KAMAL NASIR;MD. MAHFUZ REZA;SHAHAB S. BAND;ANTONIO PESCAPE;MAHEDI HASAN;: "SmartBlock-SDN: An Optimized Blockchain-SDN Framework for Resource Management in IoT", 《WFFJ》, vol. 9 *
YINGYING MA, ZHAOCHENG WANG, CHAOWEN CHANG, PING WU: "BPFC-SDNs: A Blockchain-Based and Policy-Oriented Forwarding Control for the SDN Interdomain", 《SECURITY AND COMMUNICATION NETWORKS》 *
李萍: "基于多控制器的软件定义网络安全关键技术研究", 《WFCD》 *
马莹莹; 王哲: "区块链关键技术研究", 《福建电脑》 *

Also Published As

Publication number Publication date
CN115514691B (en) 2023-06-27

Similar Documents

Publication Publication Date Title
US20210243033A1 (en) Blockchain network interaction controller
CN113169968B (en) Collaborative DNS security updates
CN104426766B (en) The end-to-end network path of dynamic across multiple network layers is established
CN107395500B (en) Intelligent network architecture integrating perception, calculation and storage and implementation method
WO2008092351A1 (en) Dynamic linking method of virtual private network
CN106059921B (en) A content routing system of network layer based on SDN technology and CCN framework and its working method
Karakus et al. Qoschain: Provisioning inter-as qos in software-defined networks with blockchain
CN102694732B (en) Method and system for constructing virtual network based on local virtualization
CN108259356A (en) Route control method and device
CN102594924B (en) Internet architecture and internet service method and system thereof
US20250080378A1 (en) Scalable distribution of identity information in overlay networks with identity-based policies
Zhang et al. Intelligent requests orchestration for microservice management based on blockchain in software defined networking: A security guarantee
Bryskin et al. Policy-enabled path computation framework
CN108881471B (en) Union-based whole-network unified trust anchor system and construction method
CN117424747A (en) Cross-domain access control method and system based on multi-block chain
CN113726665A (en) Updating method of border gateway route based on block chain
CN116016164A (en) A virtual service network construction method based on software-defined network
CN104158736B (en) A kind of method and apparatus for determining next-hop, issuing routing iinformation
CN115514691B (en) Blockchain-based SDN inter-domain cooperative forwarding control system and method
CN112132581A (en) PKI identity authentication system and method based on IOTA
CN114079632B (en) Trusted inter-domain routing method and system based on blockchain
Qiao et al. Credible routing scheme of SDN-based cloud using blockchain
Neto et al. Transformation based routing overlay for privacy and reusability in multi-domain iot
Gedeon et al. Sunstone: Navigating the way through the fog
CN106817261B (en) A routing information updating method, device and system for NDN network

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address

Address after: No. 18, Ying Cai street, Hui Ji District, Zhengzhou, Henan Province

Patentee after: ZHENGZHOU University OF TECHNOLOGY

Country or region after: China

Patentee after: Information Engineering University of the Chinese People's Liberation Army Cyberspace Force

Address before: No. 18, Ying Cai street, Hui Ji District, Zhengzhou, Henan Province

Patentee before: ZHENGZHOU University OF TECHNOLOGY

Country or region before: China

Patentee before: Information Engineering University of Strategic Support Force,PLA

CP03 Change of name, title or address