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 add a CT action in the switch's flow table? #163

Closed
TheMasterOfMagic opened this issue Nov 17, 2021 · 0 comments
Closed

How to add a CT action in the switch's flow table? #163

TheMasterOfMagic opened this issue Nov 17, 2021 · 0 comments

Comments

@TheMasterOfMagic
Copy link

TheMasterOfMagic commented Nov 17, 2021

I'm a new beginner learning ovs and ryu and I encountered a problem, which I still cannot solve after searching the
official documents
.

As far as I know, for example, to tell the switch to hand in any incoming ARP flows to the controller, I can do the below thing in python:

match = parser.OFPMatch(eth_type=ether_types.ETH_TYPE_ARP)
actions = [
    parser.OFPActionOutput(ofproto.OFPP_CONTROLLER, ofproto.OFPCML_NO_BUFFER)
]
self.add_flow(datapath, 1, match, actions)

which are equivalent to the followings ovs-ofctl command.

ovs-ofctl add-flow <bridge> "priority=1,arp,actions=CONTROLLER:65535"

And my question is, how to tell the switch to do the specified CT action? or what are equivalent to the command below?

ovs-ofctl add-flow <bridge> "ip,nw_dst=10.0.0.1,actions=ct(commit,table=1,nat(dst=10.0.0.2))"

PS:

If there is any info that may help but not posted here, please feel free to let me know!

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

1 participant