Re: [ovs-discuss] [SFC NSH] Update "eth_dst" for original packet after decap nsh encapsulation packet.
here are the document I am following: https://github.com/openvswitch/ovs/blob/master/tests/nsh.at#L65-L68 My ovs version is 2.9.0 and when I check ovs, in version 2.9.0, NSH is supported. Vào Th 7, 12 thg 1, 2019 vào lúc 01:52 Ben Pfaff đã viết: > I don't think OVS supports this kind of encapsulation. > > On Fri, Jan 11, 2019 at 10:42:10AM +0900, Hoàng Công Phước wrote: > > Hi Ben, thank for your > > > > I am sorry because I didn't show the encapsulation command. In this case, > > original packet is encapsulated 2 times, with nsh and ethernet headers. > > Here is the flow: > > > > table=0, n_packets=0, n_bytes=0, > > priority=30,tcp,in_port="tap09d8de0e-20",nw_src=10.10.0.111,nw_dst= > > 10.10.0.0/24,tp_dst=80 > > > actions=encap(nsh),set_field:0x33->nsh_spi,set_field:255->nsh_si,encap(ethernet),set_field:fa:16:3e:05:3a:12->eth_dst,resubmit(,5) > > > > As I known, after using decap() 2 times, I can get the original packet. > So, > > I can update eth_dst to it. > > > > > > > > > > > > Vào Th 6, 11 thg 1, 2019 vào lúc 04:32 Ben Pfaff đã > viết: > > > > > On Fri, Jan 11, 2019 at 04:26:03AM +0900, Hoàng Công Phước wrote: > > > > Hi experts, > > > > > > > > I am trying to update "eth_dst" for original packet after decap nsh > > > > encapsulation packet. Here is my command about it: > > > > > > > > $ sudo ovs-ofctl add-flow br-int "table=10, priority=1, dl_vlan=4, > > > > dl_dst=fa:16:3e:05:3a:12, dl_type=0x894f, nsh_mdtype=1, nsh_spi=0x33, > > > > nsh_si=254, actions=strip_vlan, > > > > move:NXM_OF_ETH_DST->OXM_OF_PKT_REG0[0..47], decap(), decap(), > > > > move:OXM_OF_PKT_REG0[0..47]->NXM_OF_ETH_DST, output:tap62c2fc56-14" > > > > > > > > However, I got an error, that is: > > > > "2019-01-10T19:11:27Z|1|meta_flow|WARN|destination field eth_dst > > > lacks > > > > correct prerequisites > > > > ovs-ofctl: actions are invalid with specified match > > > > (OFPBAC_MATCH_INCONSISTENT)" > > > > > > > > If I remove "move:NXM_OF_ETH_DST->OXM_OF_PKT_REG0[0..47]" and > > > > "move:OXM_OF_PKT_REG0[0..47]->NXM_OF_ETH_DST", it worked. So there > is an > > > > error with copy eth_dst value from outer to inner packet. I am > beginner > > > > with Open vSwitch, so it's very helpful if someone can help me to > figure > > > > the problem out. > > > > > > It looks to me that the first decap removes the NSH header and the > > > second decap removes the Ethernet header. At that point, there's no > > > Ethernet destination field to set, so the error seems reasonable. > > > > > > > > > -- > > Hoàng Công Phước > -- Hoàng Công Phước ___ discuss mailing list disc...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-discuss
Re: [ovs-discuss] [SFC NSH] Update "eth_dst" for original packet after decap nsh encapsulation packet.
Hi Ben, thank for your I am sorry because I didn't show the encapsulation command. In this case, original packet is encapsulated 2 times, with nsh and ethernet headers. Here is the flow: table=0, n_packets=0, n_bytes=0, priority=30,tcp,in_port="tap09d8de0e-20",nw_src=10.10.0.111,nw_dst= 10.10.0.0/24,tp_dst=80 actions=encap(nsh),set_field:0x33->nsh_spi,set_field:255->nsh_si,encap(ethernet),set_field:fa:16:3e:05:3a:12->eth_dst,resubmit(,5) As I known, after using decap() 2 times, I can get the original packet. So, I can update eth_dst to it. Vào Th 6, 11 thg 1, 2019 vào lúc 04:32 Ben Pfaff đã viết: > On Fri, Jan 11, 2019 at 04:26:03AM +0900, Hoàng Công Phước wrote: > > Hi experts, > > > > I am trying to update "eth_dst" for original packet after decap nsh > > encapsulation packet. Here is my command about it: > > > > $ sudo ovs-ofctl add-flow br-int "table=10, priority=1, dl_vlan=4, > > dl_dst=fa:16:3e:05:3a:12, dl_type=0x894f, nsh_mdtype=1, nsh_spi=0x33, > > nsh_si=254, actions=strip_vlan, > > move:NXM_OF_ETH_DST->OXM_OF_PKT_REG0[0..47], decap(), decap(), > > move:OXM_OF_PKT_REG0[0..47]->NXM_OF_ETH_DST, output:tap62c2fc56-14" > > > > However, I got an error, that is: > > "2019-01-10T19:11:27Z|1|meta_flow|WARN|destination field eth_dst > lacks > > correct prerequisites > > ovs-ofctl: actions are invalid with specified match > > (OFPBAC_MATCH_INCONSISTENT)" > > > > If I remove "move:NXM_OF_ETH_DST->OXM_OF_PKT_REG0[0..47]" and > > "move:OXM_OF_PKT_REG0[0..47]->NXM_OF_ETH_DST", it worked. So there is an > > error with copy eth_dst value from outer to inner packet. I am beginner > > with Open vSwitch, so it's very helpful if someone can help me to figure > > the problem out. > > It looks to me that the first decap removes the NSH header and the > second decap removes the Ethernet header. At that point, there's no > Ethernet destination field to set, so the error seems reasonable. > -- Hoàng Công Phước ___ discuss mailing list disc...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-discuss
[ovs-discuss] [SFC NSH] Update "eth_dst" for original packet after decap nsh encapsulation packet.
Hi experts, I am trying to update "eth_dst" for original packet after decap nsh encapsulation packet. Here is my command about it: $ sudo ovs-ofctl add-flow br-int "table=10, priority=1, dl_vlan=4, dl_dst=fa:16:3e:05:3a:12, dl_type=0x894f, nsh_mdtype=1, nsh_spi=0x33, nsh_si=254, actions=strip_vlan, move:NXM_OF_ETH_DST->OXM_OF_PKT_REG0[0..47], decap(), decap(), move:OXM_OF_PKT_REG0[0..47]->NXM_OF_ETH_DST, output:tap62c2fc56-14" However, I got an error, that is: "2019-01-10T19:11:27Z|1|meta_flow|WARN|destination field eth_dst lacks correct prerequisites ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)" If I remove "move:NXM_OF_ETH_DST->OXM_OF_PKT_REG0[0..47]" and "move:OXM_OF_PKT_REG0[0..47]->NXM_OF_ETH_DST", it worked. So there is an error with copy eth_dst value from outer to inner packet. I am beginner with Open vSwitch, so it's very helpful if someone can help me to figure the problem out. Thank you so much! -- Hoàng Công Phước ___ discuss mailing list disc...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-discuss
[ovs-discuss] SFC with NSH
Hi folks, I am using Open vSwitch to create service function chain with NSH (network service header) enabled. However, I have a bug when I add new flow rule to bridge. Here are my command to add flow rule manually: $ sudo ovs-ofctl add-flow br-int "table=0, tcp,in_port=11,nw_src=10.10.0.8,nw_dst=10.10.0.0/24,tp_dst=1024 actions=encap(nsh(md_type=1)),set_field:0x33->nsh_spi,set_field:255->nsh_si,encap(ethernet),group:1" As the error log, it shown: bad action at offset 0 (OFPBAC_BAD_VENDOR_TYPE). More detail in this link: http://paste.openstack.org/show/739456. My Open vSwitch environment: ovs-vswitchd (Open vSwitch) 2.9.0. As I known, NSH feature was already merged into master branch of Open vSwitch in version 2.9.0. I want to known what I should do to fix that issue or . I hope someone can help me about it. Thank in advance. Best regards, Phuoc Hoang Cong ___ discuss mailing list disc...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-discuss