Hi,

On 2015年10月20日 06:49, Ezzat Zar wrote:
> Hi again,
> There seems to be another problem with rest_topology.py which I cannot figure 
> out how to resolve. When I use
> 
> GET /v1.0/topology/links 
> 
> at the beginning of network creation, it show links between switches 
> correctly. But when I start sending packets through the network, using this 
> shows up a whole bunch of new links which does not really exist in the 
> topology... For example if a packet had been forwarded from a switch to 
> another via multiple switch hops, a link shows up from source to destination 
> switch!

Could you show us the flow entries you installed?
On my environment, rest_topology.py outputs all links correctly.

$ sudo mn --topo linear,3 --mac --controller remote

$ ryu-manager --observe-links ryu.app.rest_topology ryu.app.simple_switch_13

Before ping:
mininet> sh ovs-ofctl dump-flows s1
NXST_FLOW reply (xid=0x4):
 cookie=0x0, duration=16.729s, table=0, n_packets=18, n_bytes=918, idle_age=1, 
priority=65535,dl_dst=01:80:c2:00:00:0e,dl_type=0x88cc actions=CONTROLLER:65535
 cookie=0x0, duration=16.730s, table=0, n_packets=64, n_bytes=8962, idle_age=6, 
priority=0 actions=CONTROLLER:65535

$ curl -X GET http://localhost:8080/v1.0/topology/links
[{"src": {"hw_addr": "66:df:c7:f7:0c:04", "name": "s2-eth3", "port_no": 
"00000003", "dpid": "0000000000000002"}, "dst": {"hw_addr": 
"16:3c:5a:66:aa:f6", "name": "s3-eth2", "port_no": "00000002", "dpid": 
"0000000000000003"}}, {"src": {"hw_addr": "4e:51:8c:48:4d:d8", "name": 
"s2-eth2", "port_no": "00000002", "dpid": "0000000000000002"}, "dst": 
{"hw_addr": "96:ae:dd:c4:0f:c0", "name": "s1-eth2", "port_no": "00000002", 
"dpid": "0000000000000001"}}, {"src": {"hw_addr": "16:3c:5a:66:aa:f6", "name": 
"s3-eth2", "port_no": "00000002", "dpid": "0000000000000003"}, "dst": 
{"hw_addr": "66:df:c7:f7:0c:04", "name": "s2-eth3", "port_no": "00000003", 
"dpid": "0000000000000002"}}, {"src": {"hw_addr": "96:ae:dd:c4:0f:c0", "name": 
"s1-eth2", "port_no": "00000002", "dpid": "0000000000000001"}, "dst": 
{"hw_addr": "4e:51:8c:48:4d:d8", "name": "s2-eth2", "port_no": "00000002", 
"dpid": "0000000000000002"}}]

mininet> h1 ping h3
PING 10.0.0.3 (10.0.0.3) 56(84) bytes of data.
64 bytes from 10.0.0.3: icmp_seq=1 ttl=64 time=21.6 ms
64 bytes from 10.0.0.3: icmp_seq=2 ttl=64 time=0.068 ms
  ...

After ping:
mininet> sh ovs-ofctl dump-flows s1
NXST_FLOW reply (xid=0x4):
 cookie=0x0, duration=55.786s, table=0, n_packets=62, n_bytes=3162, idle_age=0, 
priority=65535,dl_dst=01:80:c2:00:00:0e,dl_type=0x88cc actions=CONTROLLER:65535
 cookie=0x0, duration=4.954s, table=0, n_packets=4, n_bytes=336, idle_age=2, 
priority=1,in_port=2,dl_dst=00:00:00:00:00:01 actions=output:1
 cookie=0x0, duration=4.950s, table=0, n_packets=3, n_bytes=294, idle_age=2, 
priority=1,in_port=1,dl_dst=00:00:00:00:00:03 actions=output:2
 cookie=0x0, duration=55.787s, table=0, n_packets=71, n_bytes=9572, idle_age=4, 
priority=0 actions=CONTROLLER:65535

$ curl -X GET http://localhost:8080/v1.0/topology/links
[{"src": {"hw_addr": "66:df:c7:f7:0c:04", "name": "s2-eth3", "port_no": 
"00000003", "dpid": "0000000000000002"}, "dst": {"hw_addr": 
"16:3c:5a:66:aa:f6", "name": "s3-eth2", "port_no": "00000002", "dpid": 
"0000000000000003"}}, {"src": {"hw_addr": "4e:51:8c:48:4d:d8", "name": 
"s2-eth2", "port_no": "00000002", "dpid": "0000000000000002"}, "dst": 
{"hw_addr": "96:ae:dd:c4:0f:c0", "name": "s1-eth2", "port_no": "00000002", 
"dpid": "0000000000000001"}}, {"src": {"hw_addr": "16:3c:5a:66:aa:f6", "name": 
"s3-eth2", "port_no": "00000002", "dpid": "0000000000000003"}, "dst": 
{"hw_addr": "66:df:c7:f7:0c:04", "name": "s2-eth3", "port_no": "00000003", 
"dpid": "0000000000000002"}}, {"src": {"hw_addr": "96:ae:dd:c4:0f:c0", "name": 
"s1-eth2", "port_no": "00000002", "dpid": "0000000000000001"}, "dst": 
{"hw_addr": "4e:51:8c:48:4d:d8", "name": "s2-eth2", "port_no": "00000002", 
"dpid": "0000000000000002"}}]

Thanks,
Iwase

> 
> Any idea on how to resolve this issue?  I can use the topology from prior 
> data transfer phase but I need to periodically access topology info during 
> network runtime too.
> 
> Thanks.
> 
> 
> 
> ------------------------------------------------------------------------------
> 
> 
> 
> _______________________________________________
> Ryu-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/ryu-devel
> 

------------------------------------------------------------------------------
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to