P2P in a local routeri,

Ask any questions or talk about OpenTok here!

P2P in a local routeri,

Postby giladani » Tue May 22, 2012 8:36 am

Hi,


I'm using 2 PCs, both connect to the same router with NAT.

When I use your diagnostic tool, everything works fine in both PCs.
When I use one PC from this network with a remote PC, I have a P2P connection.
When I connect a session between these PCs, it seems like the P2P connection fails.
Why? Can you explain?
Is there something that I can do to fix that and enable P2P support?

Thanks,
Gil.
Was this post helpful? (0)
giladani
 
Posts: 187
Joined: Wed Apr 11, 2012 8:05 am
Thumbs Up: 2

Re: P2P in a local router

Postby giladani » Tue May 22, 2012 8:55 am

Hi,

Sorry, I was wrong. This is the full behavior that I see. IT's not important if it's remote PCs or they are on the same router.
I have 2 sessions working in parallel. One is publishing and one is subscribing (on each PC) - i.e. I created a 2way video chat.
When looking at the report I see the following: The publisher is not P2P. The subscriber is P2P. I see the same report on both PCs (i.e. on both the publisher is not P2P).

When I was on the 2 PCs on the same home router, I had a delay of a few seconds. When the PCs were remote, the delay was small. Any idea why? I expected that to b the other way around... If they are on the same router, is the video stay local or goes out to the internet?
I suspect the internet connection, but I have 12Mbps download and 1.2Mbps upload.

Thanks,
Gil.
Was this post helpful? (0)
giladani
 
Posts: 187
Joined: Wed Apr 11, 2012 8:05 am
Thumbs Up: 2

Re: P2P in a local routeri,

Postby jtsai » Tue May 22, 2012 1:23 pm

Hi Gil

It is very weird that the subscriber P2P is true and the publisher P2P was false. Can you try it, but do the command+shift+click maybe 10 seconds after they start subscribing?

If the delay was long, that would mean it fell back to RTMP (non-P2P). If the delay was short, that means P2P was successful.

Try checking your computers from here:
http://digitaltsai.com/ot/examples/check-p2p.php

John
Was this post helpful? (0)
Very helpful resource: Devs Checklist
Examples with OpenTok: Examples
User avatar
jtsai
 
Posts: 2019
Joined: Wed Sep 14, 2011 3:00 pm
Thumbs Up: 159

Re: P2P in a local routeri,

Postby giladani » Tue May 22, 2012 2:10 pm

Hi,

You can see here the results of the test you've suggested.
I'm currently using 2 PCs connected to the same router.

Cheers,
Gil.
Was this post helpful? (0)
Attachments
p2p-2.jpg
p2p-1.jpg
giladani
 
Posts: 187
Joined: Wed Apr 11, 2012 8:05 am
Thumbs Up: 2

Re: P2P in a local routeri,

Postby jtsai » Thu May 24, 2012 11:03 am

How long did you wait till you took this screenshot? When one fails on P2P, both are supposed to failback to rtmp, so it is weird that one says true and the other says false. Also, do you have a 3rd computer you can test this on? In this case, for the computer that took the screenshot, either the computer doesn't allow outgoing udp packets or the other computer doesn't allow incoming udp packets.

John
Was this post helpful? (0)
Very helpful resource: Devs Checklist
Examples with OpenTok: Examples
User avatar
jtsai
 
Posts: 2019
Joined: Wed Sep 14, 2011 3:00 pm
Thumbs Up: 159

Re: P2P in a local routeri,

Postby giladani » Sat May 26, 2012 9:34 am

I waited for 1min. Saw the same behavior on both computers.
I also tried a third computer.

Cheers,
Gil.
Was this post helpful? (0)
giladani
 
Posts: 187
Joined: Wed Apr 11, 2012 8:05 am
Thumbs Up: 2

Re: P2P in a local routeri,

Postby jtsai » Tue May 29, 2012 5:45 pm

Are you saying for all three computers, the left side was red and the right side was green for any combination of them?

John
Was this post helpful? (0)
Very helpful resource: Devs Checklist
Examples with OpenTok: Examples
User avatar
jtsai
 
Posts: 2019
Joined: Wed Sep 14, 2011 3:00 pm
Thumbs Up: 159

Re: P2P in a local routeri,

Postby giladani » Wed May 30, 2012 12:45 am

Hi,

I tried the link again tomorrow. I noticed a wired behavior:
I used 3 PCs:
PC1, PC2, PC3.
I also used 3 routers: R1, R2, R3.

In the test today, I didn't saw one p2p and one no, I only saw that both are the same.
These are the test that I've done. I can't figure out where the problem is:

PC1 and PC2 behind R1 and PC3 behind R2:
I tried all combinations, all of them were not-p2p.

I've connected PC2 and PC3 behind R3 (it's a new router). P2P didn't work either.

I connected the same PCs (2,3) to my iPhone, configured as a router. Only them P2P worked.
I tried again connecting PC2,3 behind router R3, and it's working now w/ p2p.

I waited at least 30 seconds to get the indication... but I get mixed result. I can be sure that R1, R2's configuration haven't changed. I can't say the same for R3 since it's in a coffee shop near my home. I can also safely say that the p2p worked fine with all 3 routers about 1-2 months ago...

I also tried your diagnostic tool on both router R1 and R3, with both PC1 & PC2, the result is good and the 1935 port is working fine.

Cheers,
Gil.
Was this post helpful? (0)
giladani
 
Posts: 187
Joined: Wed Apr 11, 2012 8:05 am
Thumbs Up: 2

Re: P2P in a local routeri,

Postby jtsai » Wed May 30, 2012 4:27 pm

My diagnostic tool does not check if P2P works. It only checks if regular streaming works. Have you installed any firewalls/virus protectors since 1-2 months ago when it worked? It seems like something is wrong with the routers if your pcs work through your iphone but not through your regular routers?

John
Was this post helpful? (0)
Very helpful resource: Devs Checklist
Examples with OpenTok: Examples
User avatar
jtsai
 
Posts: 2019
Joined: Wed Sep 14, 2011 3:00 pm
Thumbs Up: 159

Re: P2P in a local routeri,

Postby giladani » Wed May 30, 2012 10:27 pm

Wih all 3 routers?

In one of them, it sometimes works and sometimes doesn't work.
Do I need port forwarding support for p2p? Can you provide detailes of how can one computer access the other's port over NAT? Is that because they use udp to access the open took server and then use the same port to communicate with each other?

Thanks,
Gil
Was this post helpful? (0)
giladani
 
Posts: 187
Joined: Wed Apr 11, 2012 8:05 am
Thumbs Up: 2

Next

Return to Discussion and Questions



Who is online

Users browsing this forum: 4gatemedia and 1 guest

cron