Conformément à la section 7.2.3.6 Spécifications du champ de correspondance de flux, section 1.3.5 (Spécifications du commutateur OpenFlow version 1.3.5 (version de protocole 0x04), section 7.2.3.8 Champs de correspondance d'en-tête, le flux permettant de modifier l'adresse IP ( dst_ip ou src_ip ) doit:
Code :
{
"flow": [
{
"id": "bwt",
"match": {
"ethernet-match": {
"ethernet-destination": {
"address": "02:42:4a:46:fc:01",
"mask": "ff:ff:ff:ff:ff:ff"
},
"ethernet-type": {
"type": "0x0800"
}
},
"ipv4-destination": "192.168.1.2/32"
},
"instructions": {
"instruction": [
{
"order": "0",
"apply-actions": {
"action": [
{
"order": "0",
"set-dl-dst-action": {
"address": "02:42:4a:46:fc:03"
}
},
{
"order": "1",
"set-nw-dst-action": {
"ipv4-address": "192.168.1.3/32"
}
},
{
"order": "2",
"output-action": {
"output-node-connector": "3",
"max-length": "65535"
}
}
]
}
}
]
},
"priority": "12",
"table_id": "0"
}
]
}