[ovs-discuss] output action into write-actions vs apply-actions instructions
bogun.dmitriy at gmail.com
bogun.dmitriy at gmail.com
Wed Jul 24 11:22:23 UTC 2019
I am not sure that I have used correct syntax to "define" 2 vlans on packet
for ofproto/trace... but here what I got for my rules setup:
root at b9b4eb92ef34:/app/lab# ovs-appctl ofproto/trace system
'in_port(6),eth(src=00:11:22:33:44:55,dst=ff:ff:ff:ff:ff:ff),eth_type(0x8100),vlan(vid=127,pcp=0),encap(eth_type(0x8100),vlan(vid=128,pcp=0),encap(eth_type(0x0806)))'
Flow:
arp,in_port=2,dl_vlan=127,dl_vlan_pcp=0,dl_vlan1=128,dl_vlan_pcp1=0,dl_src=00:11:22:33:44:55,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=0.0.0.0,arp_tpa=0.0.0.0,arp_op=0,arp_sha=00:00:00:00:00:00,arp_tha=00:00:00:00:00:00
bridge("A")
-----------
0. priority 0, cookie 0x2140001
goto_table:1
1. in_port=2,dl_vlan=127, priority 16384, cookie 0x2160001
pop_vlan
write_actions(TABLE)
-> action set is: TABLE
write_metadata:0x400000000007f/0x4000000000fff
--. Executing action set:
TABLE
0. priority 0, cookie 0x2140001
goto_table:1
1. metadata=0x400000000007f/0x4000000000fff,in_port=2,dl_vlan=128,
priority 16394, cookie 0x2160001
pop_vlan
write_metadata:0x1000002160001/0x10000ffffffff
goto_table:2
2. arp,metadata=0x1000002160001/0x10000ffffffff, priority 16384, cookie
0x2160001
TABLE
0. metadata=0x1000000000000/0x1000000000000, priority 24676, cookie
0x2140001
write_metadata:0x2000000000000/0x2000000000000
goto_table:2
2. metadata=0x3000002160001/0x30000ffffffff, priority 24576,
cookie 0x2160001
write_actions(CONTROLLER:0)
-> action set is: CONTROLLER:0
goto_table:3
3. metadata=0x1000002160001/0x10000ffffffff, priority 16384, cookie
0x2160001
push_vlan:0x8100
set_field:4351->vlan_vid
write_actions(output:1)
-> action set is: output:1
Final flow:
arp,metadata=0x7000002160001,in_port=2,dl_vlan=255,dl_vlan_pcp=0,vlan_tci1=0x0000,dl_src=00:11:22:33:44:55,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=0.0.0.0,arp_tpa=0.0.0.0,arp_op=0,arp_sha=00:00:00:00:00:00,arp_tha=00:00:00:00:00:00
Megaflow:
recirc_id=0,eth,arp,in_port=2,dl_vlan=127,dl_vlan1=128,dl_vlan_pcp1=0
Datapath actions: drop
Flows dump:
root at b9b4eb92ef34:/app/lab# ovs-ofctl --no-stats -OOpenFlow13 dump-flows A
cookie=0x2140001, priority=24676,metadata=0x1000000000000/0x1000000000000
actions=write_metadata:0x2000000000000/0x2000000000000,goto_table:2
cookie=0x2140002, priority=24576,in_port="A-1" actions=goto_table:4
cookie=0x2140001, priority=0 actions=goto_table:1
cookie=0x2160001, table=1,
priority=16394,metadata=0x400000000007f/0x4000000000fff,in_port="A-2",dl_vlan=128
actions=pop_vlan,write_metadata:0x1000002160001/0x10000ffffffff,goto_table:2
cookie=0x2160001, table=1, priority=16384,in_port="A-2",dl_vlan=127
actions=pop_vlan,write_actions(TABLE),write_metadata:0x400000000007f/0x4000000000fff
cookie=0x2140001, table=1, priority=0 actions=drop
cookie=0x2160001, table=2,
priority=24576,metadata=0x3000002160001/0x30000ffffffff
actions=write_actions(CONTROLLER:0)
cookie=0x2140001, table=2,
priority=24566,metadata=0x2000000000000/0x2000000000000 actions=drop
cookie=0x2160001, table=2,
priority=16384,arp,metadata=0x1000002160001/0x10000ffffffff
actions=TABLE,goto_table:3
cookie=0x2140001, table=2, priority=0 actions=goto_table:3
cookie=0x2160001, table=3,
priority=16384,metadata=0x1000002160001/0x10000ffffffff
actions=push_vlan:0x8100,set_field:4351->vlan_vid,write_actions(output:"A-1")
cookie=0x2140001, table=3, priority=0 actions=drop
cookie=0x2160001, table=4, priority=16384,in_port="A-1",dl_vlan=255
actions=set_field:4224->vlan_vid,push_vlan:0x8100,set_field:4223->vlan_vid,write_actions(output:"A-2")
And ovs "layout" (forgot to include it in original message):
982ed09e-e3b2-4e38-968f-d07281901994
Bridge A
Controller "tcp:172.25.0.8:6653"
is_connected: true
fail_mode: secure
Port "A-1"
Interface "A-1"
Port "A-2"
Interface "A-2"
Port A
Interface A
type: internal
Bridge aswitch
fail_mode: secure
Port aswitch
Interface aswitch
type: internal
Bridge B
Controller "tcp:172.25.0.8:6653"
is_connected: true
fail_mode: secure
Port "B-1"
Interface "B-1"
Port "B-2"
Interface "B-2"
Port B
Interface B
type: internal
ovs_version: "2.10.0"
вт, 23 июл. 2019 г. в 20:15, Ben Pfaff <blp at ovn.org>:
> On Tue, Jul 23, 2019 at 01:40:49PM +0300, bogun.dmitriy at gmail.com wrote:
> > My question is - why traffic does not forward on A-1 despite action
> > "output:A-1" into write-actions set into last matched rule?
>
> ofproto/trace probably would help figure this out. Please try it and
> paste the output.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openvswitch.org/pipermail/ovs-discuss/attachments/20190724/4be45c2d/attachment.html>
More information about the discuss
mailing list