SDN——实验脚本6-1:http.json

JSON

Tips:

可以先阅读一下流表的内容,

  • 关注 match 匹配字段以及对应的 instructions 指令中的动作 action,这里是直接 drop 数据包。
  • 为了让流表能够匹配,将优先级 priority 调到最大。

JSON 格式的请求代码如下:

{
	"flow":[
		{
			"id":"1",
			"match":{
				"in-port":"1",
				"ethernet-match":{
					"ethernet-type":{
						"type":"0x0800"
					}
				},
				"ipv4-destination":"10.0.0.3/32"
			},
			"instructions":{
				"instruction":[
					{
						"order":"0",
						"apply-actions":{
							"action":[
								{
									"order":"0",
									"drop-action":{}
								}
							]
						}
					}
				]
			},
			"flow-name":"flow1",
			"priority":"65535",
			"hard-timeout":"10",
			"cookie":"2",
			"table_id":"0"
		}
	]
}
posted @ 2020-10-08 20:21  兰小路  阅读(124)  评论(0编辑  收藏  举报