Question:
How to test network continuity?
John
2015-02-05 21:01:27 UTC
I want to open a TCP connection to a server, and keep it live as long as possible, to see how long my internet can maintain a continous connection.


Is there maybe an online website that already does this (spare me having to make my own)?
Three answers:
Landon783
2015-02-06 05:28:32 UTC
You may need to forward the tcp and udp ports that xbox live connects thru. Thats what I had to do. Ports are as follows:

UDP-88

UDP-3074

TCP-3074

You will also need your xbox's ip which can usually be found on the clients connected page in your router config pages.

To get there type this into your browser: 192.168.(0,1,2,3,4).1

test the third number between those 4 until it shows up(it different with every router)

It also shouldnt hurt, if you have a DMZ function in your router, put your xbox's ip in that field too.
John
2015-02-06 17:26:17 UTC
Answering my own question here.



In the end I used netcat and upnpc.



I used upnpc to open a port in my router, then netcat open a server, and netcat again to remotely connect to the same server.



Here's the one-liner I came up with:



gnome-terminal --command="nc -l -p 4040" & while true; do echo `date` hello; sleep 2; done | nc `upnpc -a 10.0.0.3 4040 4040 tcp | grep 'ExternalIPAddress' | sed 's/ExternalIPAddress = //g'` 4040



Here's one without upnpc (assumes you've already done the port forwarding):

gnome-terminal --command="nc -l -p 4040" & while true; do echo `date` hello; sleep 2; done | nc `curl -s checkip.dyndns.org | sed -e 's/.*Current IP Address: //' -e 's/<.*$//'` 4040



First it opens a new terminal window, giving it the command "nc -l -p 4040" just to open a server.



Then in the current window, it runs upnpc to open port in the router (which also gives external IP, second one-liner just grabs external IP and thats it). Then connects to external IP and port and infinitely sends the date & time. You'll know when it disconnected by the last date and time sent.



My internet was dropping the connection approx every 10 mins.
Krowten Nimda
2015-02-06 07:23:42 UTC
What exactly are you trying to do? You could open a connection to a web server by using telnet to port 80. That will open a connection until it times out.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...