Murphy
Oops. It was in the original code that was deleted by mistak later.
Yes. It inmproved but still the entry is missing my match filelds
with this updated flow, the entry installed
cookie=0x0, duration=147.754s, table=0, n_packets=0, n_bytes=0, idle_age=147,
dl_type=0x8000 actions=NORMAL
But now pin works and subsequently, l2_learning can add aditional flows that
look like
virtunetx3@vnetx3:~$ ovs-dump
NXST_FLOW reply (xid=0x4):
cookie=0x0, duration=223.303s, table=0, n_packets=0, n_bytes=0, idle_age=223,
dl_type=0x8000 actions=NORMAL
virtunetx3@vnetx3:~$ ping -c 1 192.167.20.10
PING 192.167.20.10 (192.167.20.10) 56(84) bytes of data.
64 bytes from 192.167.20.10: icmp_req=1 ttl=64 time=145 ms
--- 192.167.20.10 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 145.199/145.199/145.199/0.000 ms
virtunetx3@vnetx3:~$ ovs-dump
NXST_FLOW reply (xid=0x4):
cookie=0x0, duration=228.874s, table=0, n_packets=0, n_bytes=0, idle_age=228,
dl_type=0x8000 actions=NORMAL
cookie=0x0, duration=3.203s, table=0, n_packets=1, n_bytes=98,
idle_timeout=10, hard_timeout=30, idle_age=3,
priority=65535,icmp,in_port=2,vlan_tci=0x0000,dl_src=08:00:27:d9:77:cd,dl_dst=92:76:cc:22:32:e9,nw_src=192.167.20.10,nw_dst=192.167.20.253,nw_tos=0,icmp_type=0,icmp_code=0
actions=output:4
cookie=0x0, duration=3.302s, table=0, n_packets=1, n_bytes=98,
idle_timeout=10, hard_timeout=30, idle_age=3,
priority=65535,icmp,in_port=4,vlan_tci=0x0000,dl_src=92:76:cc:22:32:e9,dl_dst=08:00:27:d9:77:cd,nw_src=192.167.20.253,nw_dst=192.167.20.10,nw_tos=0,icmp_type=8,icmp_code=0
actions=output:2
virtunetx3@vnetx3:~$ ^C
virtunetx3@vnetx3:~$
Please see if I miss anything such that my match fileld are not added in the
flow
My code:
My code:
def _vn_addNormalFlow(self, vn_context):
print 'Adding VN flow for dpid %s' %(vn_context["dpid"])
print "ip converted :",IPAddr(vn_context["src_ip"])
print "ip input :", vn_context["src_ip"]
msg = of.ofp_flow_mod()
msg.flags = of.OFPFF_CHECK_OVERLAP
msg.command = of.OFPFC_ADD
# msg.match.nw_src = IPAddr(vn_context["src_ip"])
msg.match.nw_src = IPAddr("192.167.10.10")
msg.match.nw_dst = IPAddr("192.167.20.10")
# msg.match.nw_dst = IPAddr(vn_context["dst_ip"])
msg.match.dl_type = 0x8000
msg.match.nw_proto = vn_context["proto"]
# msg.match.tp_src = vn_context.tcp_src
msg.match.tp_dst = vn_context["tcp_dst"]
print "tp_dst:",msg.match.tp_dst
msg.actions.append(of.ofp_action_output(port = of.OFPP_NORMAL))
# core.openflow.sendToDPID(str_to_dpid(vn_context["dpid"]),msg)
con = core.openflow.getConnection(str_to_dpid(vn_context["dpid"]))
con.send(msg)
return True
________________________________
________________________________
From: Murphy McCauley <[email protected]>
To: senthil arumugam <[email protected]>
Cc: "[email protected]" <[email protected]>
Sent: Thursday, March 7, 2013 2:03 AM
Subject: Re: [pox-dev] POX: Problem in installing a flow entry
On Mar 6, 2013, at 11:31 PM, senthil arumugam wrote:
msg = of.ofp_flow_mod()
> msg.flags = of.OFPFF_CHECK_OVERLAP
>
> msg.command = of.OFPFC_ADD
> msg.match.nw_src = IPAddr(vn_context["src_ip"])
> # msg.match.nw_src = IPAddr("192.167.10.10")
> # msg.match.nw_dst = IPAddr("192.167.20.10")
> msg.match.nw_dst =
IPAddr(vn_context["dst_ip"])
> msg.match.nw_proto = vn_context["proto"]
> msg.match.tp_dst = vn_context["tcp_dst"]
>
> msg.actions.append(of.ofp_action_output(port = of.OFPP_NORMAL))
>
Your first problem is that you need to specify dl_type = 0x0800 if you want to
match IP addresses and TCP/UDP ports.
-- Murphy