意图网络架构下的智能配置模块如下图所示,包括四层结构:应用层包含意图解析引擎,向上为用户及网络管理人员提供服务,收集用户表达的意图并将提取意图关键词;抽象层包含业务编排器,根据网络资源状态及意图关键词生成网络策略;控制层包含全局SDN控制器及其下管的支持OpenFlow协议的域控制器与支持NETCONF协议的域控制器;数据层包含支持OpenFlow协议的底层网元设备与支持NETCONF协议的底层网元设备,这些设备分别受对应的域控制器的管控。
<script type="text/javascript"> function myFunction() { // 这里写入要执行的代码逻辑 // alert("Hello World!"); var table = document.getElementById("mytab1"); var td1=table.getElementsByTagName("tr").item(1).getElementsByTagName("td").item(0) code1 = 'import frenetic\nfrom frenetic.syntax import *\n \nclass MyApp(frenetic.App):\n p1 = IP4DstEq(220.181.38.148, 32)\n p2 = IP4DstEq(211.144.27.126, 32)\n p3 = IP4DstEq(106.11.226.158, 32)\n selectPacket = Or([p1, p2, p3])\n Drop(selectPacket)\n \napp = MyApp()\napp.start_event_loop()' code2 = '' defined_content = '' + code1 + '\n' + code2 + '';
td1.innerHTML = defined_content
}
function myFunction2() {
var table = document.getElementById("mytab2");
var td1=table.getElementsByTagName("tr").item(1).getElementsByTagName("td").item(0)
// XML数据(这里只作为示例)
var xmlString = "<access-lists><access-list><name>BlockEntertainment</name><aces><ace><name>DenyEntertainmentSite1</name><matches><ipv4><destination-ip-address>220.181.38.148</destination-ip-address></ipv4></matches><actions><forwarding>drop</forwarding></actions></ace><ace><name>DenyEntertainmentSite2</name><matches><ipv4><destination-ip-address>211.144.27.126</destination-ip-address></ipv4></matches><actions><forwarding>drop</forwarding></actions></ace><ace><name>DenyEntertainmentSite3</name><matches><ipv4><destination-ip-address>106.11.226.158</destination-ip-address></ipv4></matches><actions><forwarding>drop</forwarding></actions></ace></aces></access-list></access-lists>";
xmlString = "<access-lists>\n\t<access-list>\n\t\t<name>BlockEntertainment</name>\n\t\t<aces>\n\t\t\t<ace>\n\t\t\t\t<name>DenyEntertainmentSite1</name>\n\t\t\t\t<matches>\n\t\t\t\t\t<ipv4>\n\t\t\t\t\t\t<destination-ip-address>220.181.38.148</destination-ip-address>\n\t\t\t\t\t</ipv4>\n\t\t\t\t</matches>\n\t\t\t\t<actions>\n\t\t\t\t\t<forwarding>drop</forwarding>\n\t\t\t\t</actions>\n\t\t\t</ace>\n\t\t\t<ace>\n\t\t\t\t<name>DenyEntertainmentSite2</name>\n\t\t\t\t<matches>\n\t\t\t\t\t<ipv4>\n\t\t\t\t\t\t<destination-ip-address>211.144.27.126</destination-ip-address>\n\t\t\t\t\t</ipv4>\n\t\t\t\t</matches>\n\t\t\t\t<actions>\n\t\t\t\t\t<forwarding>drop</forwarding>\n\t\t\t\t</actions>\n\t\t\t</ace>\n\t\t\t<ace>\n\t\t\t\t<name>DenyEntertainmentSite3</name>\n\t\t\t\t<matches>\n\t\t\t\t\t<ipv4>\n\t\t\t\t\t\t<destination-ip-address>106.11.226.158</destination-ip-address>\n\t\t\t\t\t</ipv4>\n\t\t\t\t</matches>\n\t\t\t\t<actions>\n\t\t\t\t\t<forwarding>drop</forwarding>\n\t\t\t\t</actions>\n\t\t\t</ace>\n\t\t</aces>\n\t</access-list>\n</access-lists>";
<!-- xmlString = "<access-lists>\n<access-list>\n<name>BlockEntertainment</name>\n<aces>\n<ace>\n<name>DenyEntertainmentSite1</name>\n<matches>\n<ipv4>\n<destination-ip-address>220.181.38.148</destination-ip-address>\n</ipv4>\n</matches>\n<actions>\n<forwarding>drop</forwarding>\n</actions>\n</ace>\n<!-- Add more ACEs for other entertainment sites -->\n</aces>\n</access-list>\n</access-lists>"; -->
defined_content = '<pre><code>' + xmlString + '</code></pre>'
td1.innerHTML = defined_content
}
function progress() {
var bar = document.getElementById("progress1");
var width = 0;
var id = setInterval(frame, 10);
function frame() {
if (width >= 100) {
clearInterval(id);
myFunction();
}
else {
width++;
bar.style.width = width + '%';
}
}
}
function progress2() {
var bar = document.getElementById("progress2");
var width = 0;
var id = setInterval(frame, 10);
function frame() {
if (width >= 100) {
clearInterval(id);
myFunction2();
}
else {
width++;
bar.style.width = width + '%';
}
}
}
<textarea name="fname" style="width: 600px; height: 100px; margin-right: 50px;">请输入业务意图...</textarea> 确认业务
</tr>
</tbody>
</table>
配置生成
Frenetic网络策略输出 |
---|
</tr>
</tbody>
</table>
设备配置输出 |
---|