openshift / openshift-sdn

Apache License 2.0
69 stars 63 forks source link

local and remote node flow entries #118

Closed ghost closed 9 years ago

ghost commented 9 years ago

Hello Team, I have a multi-node openshift installation. My node1 has the following config

export OPENSHIFT_SDN_TAP1_ADDR=10.1.2.1 export OPENSHIFT_CLUSTER_SUBNET=10.1.0.0/16

When I dump the flows on this node, it gives the following output

cookie=0x0, duration=416185.862s, table=0, n_packets=595, n_bytes=66923, priority=50 action s=output:2 cookie=0x0, duration=416185.859s, table=0, n_packets=287, n_bytes=12054, priority=100,arp,a rp_tpa=10.1.2.1 actions=output:2 cookie=0x0, duration=416185.856s, table=0, n_packets=0, n_bytes=0, priority=100,ip,nw_dst=1 0.1.2.1 actions=output:2 cookie=0xac100019, duration=167.766s, table=0, n_packets=264, n_bytes=11088, priority=100,a rp,arp_tpa=10.1.2.0/24 actions=set_field:172.16.0.25->tun_dst,output:1 cookie=0xc0a80202, duration=167.776s, table=0, n_packets=0, n_bytes=0, priority=75,ip,nw_ds t=10.1.1.0/24 actions=output:9 cookie=0xac100019, duration=167.769s, table=0, n_packets=0, n_bytes=0, priority=100,ip,nw_d st=10.1.2.0/24 actions=set_field:172.16.0.25->tun_dst,output:1 cookie=0xac100018, duration=167.763s, table=0, n_packets=0, n_bytes=0, priority=100,ip,nw_d st=10.1.0.0/24 actions=set_field:172.16.0.24->tun_dst,output:1 cookie=0xac100018, duration=167.759s, table=0, n_packets=0, n_bytes=0, priority=100,arp,arp _tpa=10.1.0.0/24 actions=set_field:172.16.0.24->tun_dst,output:1 cookie=0xac10001b, duration=167.780s, table=0, n_packets=0, n_bytes=0, priority=100,arp,arp _tpa=10.1.3.0/24 actions=set_field:172.16.0.27->tun_dst,output:1 cookie=0xac10001b, duration=167.783s, table=0, n_packets=0, n_bytes=0, priority=100,ip,nw_d st=10.1.3.0/24 actions=set_field:172.16.0.27->tun_dst,output:1 cookie=0xc0a80202, duration=167.772s, table=0, n_packets=198, n_bytes=8316, priority=75,arp ,arp_tpa=10.1.1.0/24 actions=output:9

One of the entry is cookie=0xac100019, duration=167.769s, table=0, n_packets=0, n_bytes=0, priority=100,ip,nw_d st=10.1.2.0/24 actions=set_field:172.16.0.25->tun_dst,output:1

The above entry is almost identical to the entry made for a remote node subnet below for eg: cookie=0xac100018, duration=167.763s, table=0, n_packets=0, n_bytes=0, priority=100,ip,nw_d st=10.1.0.0/24 actions=set_field:172.16.0.24->tun_dst,output:1

I was under the assumption that the flows are different depending on whether the traffic is intended for the local machine subnet or the remote machine subnet.

Why does it need to specify the external IP based tun_dst for the local subnet?

Regards, Shilpa

rajatchopra commented 9 years ago

That is wrong. Likely cause is that the node name/hostname as it resolves from the node is not the same as it resolves from the master (i.e. they are different IP addresses). Check the node name from the master by listing 'oc get nodes' and then nslookup/dig or check in /etc/hosts as to what IPAddress it resolves to. Then check on the node what IP address it resolves to. The above case occurs when there is a mismatch between the two IP addresses.

codificat commented 9 years ago

I believe this has been addressed via #84

pravisankar commented 9 years ago

Yes, Fixed in https://github.com/openshift/origin/pull/4056