Software Defined Networking
1833792 Members
2279 Online
110063 Solutions
New Discussion

HP Aruba 2920, HP SDN Controller, Modyfing packet content

 
SOLVED
Go to solution
roger_murphy
Occasional Advisor

HP Aruba 2920, HP SDN Controller, Modyfing packet content

Hello again. I wonder, if something like this is possible: I would like to redirect some packets from one port (let's say, port 1) to port 2, but I would like to change some fields inside the packet. Fields like source port, flags, etc.

I have some questions:

1) Is it possible? If so, ho can I do this?

2) What fields in packet I could possibly modify?

3) Can it be done using curl and REST API, or should I use, for instance Java/C++/Python and write an application to do this? Is there any example available how to start this?

3 REPLIES 3
Abhay_B
Valued Contributor
Solution

Re: HP Aruba 2920, HP SDN Controller, Modyfing packet content

Hello Roger

Yes, OpenFlow allows a SDN controller to program rules on OpenFlow Flow tables on the switch. The rule consists of both a match signature and an action to be executed on a packet matching the said rule.

If you look at the OpenFlow specification, it supports modification of various packet header fields.

Some of those include modification of ETH SRC, ETH DST, VLAN ID, IP DSCP, IP SRC, IP DST, TCP/UDP SRC/DST PORT etc.

Aruba switches support some of these packet field modifications in hardware and almost all in software (Table 200).

Based on the type of the switch, the fields that can be modified in hardware would vary.

You can use REST APIs to add an OpenFlow flow with an action to modify any of the fields that you wish to modify in the packet.

I would encourage you to read through the OpenFlow Administrator Guide to know more about the capabilities related to OpenFlow on Aruba switches and the Aruba VAN controller documentation on how to use VAN to send OpenFlow rules to switches via REST APIs.

Thanks!

Abhay

roger_murphy
Occasional Advisor

Re: HP Aruba 2920, HP SDN Controller, Modyfing packet content

Could you possibly give an example of a curl call which modifies any field in a packet? Even the simplest one, just to help me get started. Thank you.

Abhay_B
Valued Contributor

Re: HP Aruba 2920, HP SDN Controller, Modyfing packet content

Hello Roger,

Here is a sample flow-mod json that should work with VAN.

The flow modifies the eth_src in the packet to a different value. Let us know if you have trouble pushing this flow to the switch.

{
	"version": "1.3.0",
	"flow": {
		"table_id": 100,
		"priority": 46,
		"idle_timeout": 0,
		"hard_timeout": 0,
		"flow_mod_cmd": "add",
		"cookie": "0xc8c729412c4cc955",
		"cookie_mask": "0x0",
		"buffer_id": 4294967295,
		"out_port": 4294967295,
		"out_group": 4294967295,
		"flow_mod_flags": ["send_flow_rem", "reset_counts"],
		"match": [{
			"eth_src": "8b:c0:ab:b6:58:63"
		}, {
			"vlan_vid": 3
		}],
		"instructions": [{
			"apply_actions": [{
				"set_field": {
					"eth_src": "03:e1:77:4d:f6:0c"
				}
			}, {
				"output": 1
			}]
		}]
	}
}

Thanks!

Abhay