goncaloSemedo / MALOB

MALOB is a SDN load balancer application for the Floodlight controller.
0 stars 10 forks source link

RE:Server's script and tcpdump? #3

Open TINCEHUANG opened 9 years ago

TINCEHUANG commented 9 years ago

Hi, I beg your help again. Recently, I run your script in Ubuntu, and its TCPDUMP seems like have some problem. I paste part of your code below.


String[] tcpdumpCmd = {"/usr/sbin/tcpdump","-l", "-nntt" ,"-i", "eth0"}; try { Process p = new ProcessBuilder(tcpdumpCmd).start(); BufferedReader in = new BufferedReader(new InputStreamReader(p.getInputStream())); String tcpdumpOut = null; while ((tcpdumpOut = in.readLine()) != null ) {

System.out.println(tcpdumpOut);

The script can not print or any info from tcpdump, which means the buffer is null. As a result, the reponseTime is always 0. Are your script depending on specific OS? And if so, could you give me some pointer to achieve reponseTime? Another question is about computeReponseTime algorithm. Does the flag.contains("P") equals true means that packet is TCP or UDP? As long as two packet match in IP level, no matter what transport layer protocol is and what transport layer port is, they're considered as a same connection, and the response time count from that? So if a TCP packet send from h1 to h2, and h2 send a UDP packet right after that by chance, this two packet will therefore be considered as a same connection?

Thanks. TINCEHUANG

goncaloSemedo commented 9 years ago

Hi, I do not think the script depends of the OS. Note that the script makes the tcpdump listen eth1.

The flag.contains("P"), i seriously do not recall what it is for, but I do not think is for that.

Gonçalo