- Community Home
- >
- Networking
- >
- Software Defined Networking
- >
- Re: CURL with an drop "apply_actions"
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2014 07:43 AM
03-25-2014 07:43 AM
Hello,
I don't know how to add "drop" as an apply_actions:
curl --noproxy 130.223.16.128 --header 'X-Auth-Token: a97daad3ea18489eb38c8c6a7ae5236e' --header "Accept: application/json" --header "Content-type: application/json" --fail -ksSfL -X POST -d '{"flow":{"priority":20,"table_id":100,"idle_timeout":60,"match":[{"eth_type":"arp"}],"instructions":[{"apply_actions":[{"drop"}]}]}}' --url https://130.223.16.128:8443/sdn/v2.0/of/datapaths/00:14:f0:92:1c:21:fa:c0/flows
I obtained: curl: (22) The requested URL returned error: 400 Bad Request
Do you know how to do that ?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2014 02:14 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2014 01:56 PM
03-28-2014 01:56 PM
Re: CURL with an drop "apply_actions"
Hello sbotkine,
We hope the response from Shaun answers your query.
Please feel free to reply incase you have more questions around the same topic or open a new thread if new topic.
Thanks
HP SDN Team
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2015 03:24 AM
08-27-2015 03:24 AM
Re: CURL with an drop "apply_actions"
Please can you give an example of the curl command for this.
I keep getting ivaliud json format.
Cheers,
Dave.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2015 04:23 AM
08-27-2015 04:23 AM
Re: CURL with an drop "apply_actions"
Hi,
as per the answer already marked as the solution of this thread, please just leave the apply_action section empty.
This will drop packets:
curl --noproxy 130.223.16.128 --header 'X-Auth-Token: a97daad3ea18489eb38c8c6a7ae5236e' --header "Accept: application/json" --header "Content-type: application/json" --fail -ksSfL -X POST -d '{"flow":{"priority":20,"table_id":100,"idle_timeout":60,"match":[{"eth_type":"arp"}],"instructions":[{"apply_actions":[{""}]}]}}'
Regards,
Antonio
SDN Team
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2015 05:36 AM
08-27-2015 05:36 AM
Re: CURL with an drop "apply_actions"
OK, I worked it out.
To add or remove a drop action for specific IP or IP range>
curl --header "X-Auth-Token:$AUTH_TOKEN" -H "Content-Type:application/json" -ksS --url "https://$CONTROLER_IP:8443/sdn/v2.0/of/datapaths/$SW_DPID/flows" -d "{\"flow\": {\"priority\": 20100,\"table_id\":100,\"idle_timeout\": 60000,\"match\": [{\"ipv4_dst\":\"10.0.0.120\",\"mask\":\"255.255.255.255\"},{\"eth_type\": \"ipv4\"}]}}" --request POST
curl --header "X-Auth-Token:$AUTH_TOKEN" -H "Content-Type:application/json" -ksS --url "https://$CONTROLER_IP:8443/sdn/v2.0/of/datapaths/$SW_DPID0/flows" -d "{\"flow\": {\"priority\": 20100,\"table_id\":100,\"idle_timeout\": 60000,\"match\": [{\"ipv4_dst\":\"10.1.0.120\",\"mask\":\"255.255.255.255\"},{\"eth_type\": \"ipv4\"}]}}" --request DELETE
Dave.