notes:odl-set-ipv4
ODL: modifier l'adresse IP ( dst_ip ou src_ip )
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:
- définir ethernet-destination-mask sur ff:ff:ff:ff:ff:ff
- définir ethernet-type à 0x0800 .
- définir le masque de ipv4 à 255.255.255.255 ou ip_addr/32
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"
}
]
}
notes/odl-set-ipv4.txt · Last modified: 2025/02/19 10:59 by 127.0.0.1
