Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use the Ryu REST API to add flow tables using MAC address matching. #173

Open
zhang-xiaofeng opened this issue Sep 16, 2022 · 2 comments

Comments

@zhang-xiaofeng
Copy link

How to use Ryu restAPI to add stream entries to a switch?
for example:
curl -X POST -d '{
"dpid": 2,
"cookie": 1,
"cookie_mask": 1,
"table_id": 0,
"idle_timeout": 0,
"hard_timeout": 0,
"priority": 11111,
"flags": 1,
"match":{
"in_port":3,
"dl_dst":"00:00:00:00:00:01"
},
"actions":[
{
"type":"OUTPUT",
"port": 1
}
]
}' http://localhost:8080/stats/flowentry/add
In the example above, what format should the MAC address match be in? What went wrong?

@xetxezarreta
Copy link

xetxezarreta commented Sep 21, 2022

I just tested Mininet + Ryu and your POST request works as expected.
The following flow entry is added to dpid 2:
image

If a packet matches with those match fields (in_port=3 and eth_dst = 00:00:00:00:00:01) it is forwarded from port 1.

@zhang-xiaofeng
Copy link
Author

Thanks! now,I have a new question.The OVS is used as a router to connect two hosts on different network segments. In this case, the host will send ARP broadcast packets to ask for the MAC address of the gateway when the ping command is executed between the hosts, but the gateway does not reply. How to set the flow entry so that the host can get the MAC address of the gateway

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants