I updated my example files.  The flow for host 1 to host 1 end
attempts to use MPLS and can be tested via
ip netns exec h1 ping -c1000 172.16.100.3
and gets host unreachable.  The flow for host 2 to host 2 end uses
vlan 20 and can be tested via
ip netns exec h2 ping -c1000 172.16.100.4
and works fine.  Both should travel over a veth pair using the same
flow between switches b4 and b5.  I am not sure why the MPLS is not
going over the veth pair

Thank you,
Tom

On Sun, Mar 12, 2017 at 7:46 AM, Thomas Crowley <[email protected]> wrote:
> I have attached a setup that demonstrates what I am talking about.  I
> am using floodlight to install my flows.
>
> Thank you,
> Tom
>
> On Sun, Mar 12, 2017 at 5:42 AM, Raymond Burkholder <[email protected]> 
> wrote:
>>> I am attempting to create a test network using OVS bridges.  I created
>>> 8 namespaces that represent hosts.  I connected all of my bridges with
>> patch
>>> ports except between b4 and b5 which are connected via an veth
>>> pair.   This configuration works fine until I start adding MPLS labels
>>> at b2 and b6.  If I switch the veth pairs to patch ports my mpls setup
>> works.
>>> What am I missing why are my veth pairs not sending my mpls packets
>>> through.
>>
>> Would you happen to have configs showing what you are attempting to
>> accomplish?  They help immensely in troubleshooting problems.  And many
>> times, when making something suitable for publication, a solution tends to
>> present itself!
>>
>>
>> --
>> This message has been scanned for viruses and
>> dangerous content by MailScanner, and is
>> believed to be clean.
>>
import httplib
import json
  
class StaticFlowPusher(object):
  
    def __init__(self, server):
        self.server = server
  
    def get(self, data):
        ret = self.rest_call({}, 'GET')
        return json.loads(ret[2])
  
    def set(self, data):
        ret = self.rest_call(data, 'POST')
        return ret[0] == 200
  
    def remove(self, objtype, data):
        ret = self.rest_call(data, 'DELETE')
        return ret[0] == 200
  
    def rest_call(self, data, action):
        path = '/wm/staticflowpusher/json'
        headers = {
            'Content-type': 'application/json',
            'Accept': 'application/json',
            }
        body = json.dumps(data)
        conn = httplib.HTTPConnection(self.server, 8080)
        conn.request(action, path, body, headers)
        response = conn.getresponse()
        ret = (response.status, response.reason, response.read())
        print ret
        conn.close()
        return ret
  
pusher = StaticFlowPusher('127.0.0.1')
  
flowB1_1 = {
    'switch':"99:00:00:00:00:00:00:b1",
    "name":"ADD_V10_B1",
    "cookie":"0",
    "priority":"32768",
    "in_port":"2",
    "active":"true",
    "actions":"push_vlan=0x8100,set_field=eth_vlan_vid->10,output=1"
    }

flowB1_2 = {
    'switch':"99:00:00:00:00:00:00:b1",
    "name":"REMOVE_V10_B1",
    "cookie":"0",
    "priority":"32768",
    "in_port":"1",
	"eth_vlan_vid":"0x100A",
    "active":"true",
	"instruction_apply_actions":"pop_vlan,output=2"
#    "actions":"pop_vlan,output=2"
    }
  



flowB1_3 = {
    'switch':"99:00:00:00:00:00:00:b1",
    "name":"ADD_V20_B3",
    "cookie":"0",
    "priority":"32768",
    "in_port":"3",
    "active":"true",
    "actions":"push_vlan=0x8100,set_field=eth_vlan_vid->20,output=1"
    }

flowB1_4 = {
    'switch':"99:00:00:00:00:00:00:b1",
    "name":"REMOVE_V20_B4",
    "cookie":"0",
    "priority":"32768",
    "in_port":"1",
	"eth_vlan_vid":"0x1014",
    "active":"true",
	"instruction_apply_actions":"pop_vlan,output=3"
#    "actions":"pop_vlan,output=2"
    }






flowB7_1 = {
    'switch':"99:00:00:00:00:00:00:b7",
    "name":"ADD_V10_B7",
    "cookie":"0",
    "priority":"32768",
    "in_port":"2",
    "active":"true",
    "actions":"push_vlan=0x8100,set_field=eth_vlan_vid->10,output=1"
    }
  
flowB7_2 = {
    'switch':"99:00:00:00:00:00:00:b7",
    "name":"REMOVE_V10_B7",
    "cookie":"0",
    "priority":"32768",
    "in_port":"1",
    "eth_vlan_vid":"0x100A",
    "active":"true",
	"instruction_apply_actions":"pop_vlan,output=2"
#    "actions":"strip_vlan,output=2"
    }



flowB7_3 = {
    'switch':"99:00:00:00:00:00:00:b7",
    "name":"ADD_V20_B7",
    "cookie":"0",
    "priority":"32768",
    "in_port":"3",
    "active":"true",
    "actions":"push_vlan=0x8100,set_field=eth_vlan_vid->20,output=1"
    }
  
flowB7_4 = {
    'switch':"99:00:00:00:00:00:00:b7",
    "name":"REMOVE_V20_B7",
    "cookie":"0",
    "priority":"32768",
    "in_port":"1",
    "eth_vlan_vid":"0x1014",
    "active":"true",
	"instruction_apply_actions":"pop_vlan,output=3"
#    "actions":"strip_vlan,output=2"
    }





#B2  1 = b2-b1   2 = b2-b3
# ADD MPLS
flowB2_1 = {
    'switch':"99:00:00:00:00:00:00:b2",
    "name":"B2_1",
    "cookie":"0",
    "priority":"32768",
    "in_port":"1",
    "eth_vlan_vid":"0x100A",
    "active":"true",
    "actions":"push_mpls=0x8847,set_field=mpls_label->0x04d2,output=2"
    }

#B2  REMOVE MPLS
flowB2_2 = {
    'switch':"99:00:00:00:00:00:00:b2",
    "name":"B2_2",
    "cookie":"0",
    "priority":"32768",
    "in_port":"2",
    "active":"true",
	"eth_type":"0x8847",
	"mpls_label":"0x04d2",
	"instruction_apply_actions":"pop_mpls=0x04d2,output=1"
#    "actions":"output=1"
    }



# V20
flowB2_3= {
    'switch':"99:00:00:00:00:00:00:b2",
    "name":"B2_3",
    "cookie":"0",
    "priority":"32768",
    "in_port":"1",
    "eth_vlan_vid":"0x1014",
    "active":"true",
    "actions":"output=2"
    }

#B2  V20
flowB2_4 = {
    'switch':"99:00:00:00:00:00:00:b2",
    "name":"B2_4",
    "cookie":"0",
    "priority":"32768",
    "in_port":"2",
    "eth_vlan_vid":"0x1014",
    "active":"true",
	"instruction_apply_actions":"output=1"
#    "actions":"output=1"
    }




	
flowB3_1 = {
    'switch':"99:00:00:00:00:00:00:b3",
    "name":"B3_1",
    "cookie":"0",
    "priority":"32768",
    "in_port":"1",
#	"eth_type":"0x8847",
#	"mpls_label":"0x04d2",
    "active":"true",
#	"instruction_apply_actions":"set_mpls_label=0x04d2,output=2"
    "actions":"output=2"
    }



flowB3_2 = {
    'switch':"99:00:00:00:00:00:00:b3",
    "name":"B3_2",
    "cookie":"0",
    "priority":"32768",
#	"eth_type":"0x8847",
#	"mpls_label":"0x04d2",
    "in_port":"2",
    "active":"true",
#	"instruction_apply_actions":"set_mpls_label=0x04d2,output=1"
    "actions":"output=1"
    }

flowB4_1 = {
    'switch':"99:00:00:00:00:00:00:b4",
    "name":"B4_1",
    "cookie":"0",
    "priority":"32768",
    "in_port":"1",
#	"eth_type":"0x8847",
#	"mpls_label":"0x04d2",
    "active":"true",
#	"instruction_apply_actions":"set_mpls_label=0x04d2,output=2"
    "actions":"output=2"
    }

flowB4_2 = {
    'switch':"99:00:00:00:00:00:00:b4",
    "name":"B4_2",
    "cookie":"0",
    "priority":"32768",
#	"eth_type":"0x8847",
#	"mpls_label":"0x04d2",
    "in_port":"2",
    "active":"true",
#	"instruction_apply_actions":"set_mpls_label=0x04d2,output=1"
    "actions":"output=1"
    }


flowB5_1 = {
    'switch':"99:00:00:00:00:00:00:b5",
    "name":"B5_1",
    "cookie":"0",
    "priority":"32768",
    "in_port":"1",
#	"eth_type":"0x8847",
#	"mpls_label":"0x04d2",
    "active":"true",
#	"instruction_apply_actions":"set_mpls_label=0x04d2,output=2"
    "actions":"output=2"
    }

flowB5_2 = {
    'switch':"99:00:00:00:00:00:00:b5",
    "name":"B5_2",
    "cookie":"0",
    "priority":"32768",
#	"eth_type":"0x8847",
#	"mpls_label":"0x04d2",
    "in_port":"2",
    "active":"true",
#	"instruction_apply_actions":"set_mpls_label=0x04d2,output=1"
    "actions":"output=1"
    }




#B6
# 1(b4-b3)   2(b4-b5)
#REMOVE MPLS
flowB6_1 = {
    'switch':"99:00:00:00:00:00:00:b6",
    "name":"B6_1",
    "cookie":"0",
    "priority":"32768",
	"eth_type":"0x8847",
	"mpls_label":"0x04d2",
    "in_port":"1",
    "active":"true",
	"instruction_apply_actions":"pop_mpls=0x04d2,output=2"#
#	"instruction_apply_actions":"output=2"#
    }

#ADD MPLS
flowB6_2 = {
    'switch':"99:00:00:00:00:00:00:b6",
    "name":"B6_2",
    "cookie":"0",
    "priority":"32768",
    "in_port":"2",
    "eth_vlan_vid":"0x100A",
    "active":"true",
    "actions":"push_mpls=0x8847,set_field=mpls_label->0x04d2,output=1"
#    "actions":"output=1"
    }


flowB6_3 = {
    'switch':"99:00:00:00:00:00:00:b6",
    "name":"B6_3",
    "cookie":"0",
    "priority":"32768",
    "eth_vlan_vid":"0x1014",
    "in_port":"1",
    "active":"true",
	"instruction_apply_actions":"output=2"#
#	"instruction_apply_actions":"output=2"#
    }

#ADD MPLS
flowB6_4 = {
    'switch':"99:00:00:00:00:00:00:b6",
    "name":"B6_4",
    "cookie":"0",
    "priority":"32768",
    "in_port":"2",
    "active":"true",
    "eth_vlan_vid":"0x1014",
    "actions":"output=1"
#    "actions":"output=1"
    }
	
	
pusher.set(flowB1_1)
pusher.set(flowB1_2)
pusher.set(flowB1_3)
pusher.set(flowB1_4)
pusher.set(flowB2_1)
pusher.set(flowB2_2)
pusher.set(flowB2_3)
pusher.set(flowB2_4)
pusher.set(flowB3_1)
pusher.set(flowB3_2)
pusher.set(flowB4_1)
pusher.set(flowB4_2)
pusher.set(flowB5_1)
pusher.set(flowB5_2)
pusher.set(flowB6_1)
pusher.set(flowB6_2)
pusher.set(flowB6_3)
pusher.set(flowB6_4)
pusher.set(flowB7_1)
pusher.set(flowB7_2)
pusher.set(flowB7_3)
pusher.set(flowB7_4)

Attachment: net_test_2.sh
Description: Bourne shell script

_______________________________________________
discuss mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss

Reply via email to