Hi,

I created a set-up of following 4 mahine :

Controller    ------->eth0   OpenvSwitch
eth4<--------------------Machine1(192.168.5.9/00:50:5:a2:00:92)

eth3<--------------------Machine2(192.168.5.12/00:50:56:a2:00:95)

Installed the openVswitch kernel module to OpenvSwitch machine and connected
both machine as shows above.

I wanted to try some experiment of adding flow entry to the openvswitch
using ovs-ofctl. Following is the datapath i added to the kernel module
switch

[root@localhost utilities]# ./ovs-dpctl show dp0
system@dp0:
        flows: cur:0, soft-max:1024, hard-max:1048576
        ports: cur:3, max:1024
        groups: max:16
        lookups: frags:0, hit:170128, missed:15799, lost:0
        queues: max-miss:100, max-action:100
        port 0: dp0 (internal)
        port 3: eth3
        port 4: eth4


i started the openflowd with the controller machine parameter. BUT i didn't
started the controller,because i wanted to avoid the learning of switch from
controller and wanted to add flow entries to the flow,which can do the
routing of packets.
I added following two flow to the datapath using the ovs-ofctl

[root@localhost utilities]# ./ovs-ofctl add-flow dp0
priority=65535,idle_timeout=50000,dl_type=0x0800,in_port=ANY,nw_src=ANY,nw_dst=192.168.5.12,actions=output:3,mod_dl_dst:00:50:56:a2:00:40
Apr 28 22:43:34|00001|ofctl|INFO|connecting to
unix:/usr/local/var/run/openvswitch/dp0.mgmt

[root@localhost utilities]# ./ovs-ofctl add-flow dp0
priority=65535,idle_timeout=50000,dl_type=0x0800,in_port=ANY,nw_src=ANY,nw_dst=192.168.5.9,actions=output:4,mod_dl_dst:00:0c:29:0f:40:28
Apr 28 22:43:59|00001|ofctl|INFO|connecting to
unix:/usr/local/var/run/openvswitch/dp0.mgmt

So i just wanted to route all the packets destined for 192.168.5.12 to port
3 and and 192.168.5.9 to port 4,i also added action for header re-writing
(the mac address),just to confirm header re-writing.

After adding the flows i pinged 5.12 machine from 5.9 machine and it worked.

i dumped the flows to check how many packet matched the added flow.

[root@localhost utilities]# ./ovs-ofctl dump-flows dp0
Apr 28 22:44:26|00001|ofctl|INFO|connecting to
unix:/usr/local/var/run/openvswitch/dp0.mgmt
stats_reply (xid=0x9a87a): flags=none type=1(flow)

  cookie=0x0, duration_sec=52s, duration_nsec=100000000ns, table_id=1,
priority=65535, *n_packets=0,
n_bytes=0,*idle_timeout=50000,ip,nw_dst=192.168.5.12,actions=output:3,mod_dl_dst:00:50:56:a2:00:40

  cookie=0x0, duration_sec=27s, duration_nsec=499000000ns, table_id=1,
priority=65535, *n_packets=0, n_bytes=0, *
idle_timeout=50000,ip,nw_dst=192.168.5.9,actions=output:4,mod_dl_dst:00:0c:29:0f:40:28

but its strange that it shows 0 packet match.There is no other flow added to
this datapath,so i was wondering how ping worked successfully between 5.9
and 5.12?Possibly the answer is that datapath keep some flow entry for
debugging purpose which is not openflow flow entries,and if nothing match in
switch flow table it broadcast the message to all port as a default
scenario.
I dumped those entry using ovs-dpctl and i found some entries which shows
the flow set for communication between 5.9 and 5.12.

So my question is why n_packets is showing 0 match?I did tcpdump on both
eth3 & eth4 and confirmed that ICMP packet reached to eth3 from eth4.

I am really stuck here and no clue on how to further debug to figure out why
these flow matching is not happening. Help needed.Thanks!!

Anil
_______________________________________________
openflow-discuss mailing list
[email protected]
https://mailman.stanford.edu/mailman/listinfo/openflow-discuss

Reply via email to