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. >
net_test_1.sh
Description: Bourne shell script
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"
}
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"
}
#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",
"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"
}
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",
"active":"true",
"actions":"push_mpls=0x8847,set_field=mpls_label->0x04d2,output=1"
# "actions":"output=1"
}
pusher.set(flowB1_1)
pusher.set(flowB1_2)
pusher.set(flowB2_1)
pusher.set(flowB2_2)
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(flowB7_1)
pusher.set(flowB7_2)
_______________________________________________ discuss mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-discuss
