TUDelftNAS / SDN-OpenNetMon

Accurate and precise OpenFlow Monitoring POX module
GNU General Public License v3.0
50 stars 28 forks source link

somthing wrong with MeasureDelay() #2

Closed buptmuye closed 9 years ago

buptmuye commented 9 years ago

Glad to see your project about OpenNetMon. However, when I see the code about MeasureDelay() function, something confused me.

            eth_packet = pkt.ethernet(type=pkt.ethernet.IP_TYPE) #use something that does not interfer with regular traffic
            eth_packet.src = struct.pack("!Q", p.src)[2:] #convert dpid to EthAddr
            eth_packet.dst = struct.pack("!Q", p.dst)[2:]
            eth_packet.set_payload(ip_pck)

            msg = of.ofp_packet_out()
            msg.actions.append(of.ofp_action_output(port = p.first_port))
            msg.data = eth_packet.pack()
            switches[p.src].connection.send(msg)

            eth_packet = pkt.ethernet(type=pkt.ethernet.IP_TYPE)
            eth_packet.src = struct.pack("!Q", p.src)[2:]
            eth_packet.dst = struct.pack("!Q", p.src)[2:]
            eth_packet.set_payload(ip_pck)

            msg = of.ofp_packet_out()
            msg.actions.append(of.ofp_action_output(port = of.OFPP_CONTROLLER))
            msg.data = eth_packet.pack()                
            switches[p.src].connection.send(msg)

Why should send two packet-out message to p.src? what is the second packet-out message for?

buptmuye commented 9 years ago

Oh, I got it, it is for the interval between controller and switch.

NvanAdrichem commented 9 years ago

Correct, one is to measure the delay between switch and controller, the other one for the complete path for a specific flow. The delay for a path is then computed by subtracting the estimation of the delay to a switch (RTT/2).

Happy holidays, Niels


From: buptmuye [notifications@github.com] Sent: Wednesday, December 24, 2014 2:12 AM To: TUDelftNAS/SDN-OpenNetMon Subject: Re: [SDN-OpenNetMon] somthing wrong with MeasureDelay() (#2)

Oh, I got it, it is for the interval between controller and switch.

— Reply to this email directly or view it on GitHubhttps://github.com/TUDelftNAS/SDN-OpenNetMon/issues/2#issuecomment-68016203.