Router
Router
Router
Router
Router
Router Router Router Router Router Router Router Router
Router Router
Router
Go Back  Xtreme Visual Basic Talk > > > Router


Reply
 
Thread Tools Display Modes
  #1  
Old 07-04-2006, 04:32 AM
zelos_88 zelos_88 is offline
Centurion
 
Join Date: Jan 2006
Posts: 160
Default Router


WHen it comes to routers, do u ahve to do in a special way to make the winsock work witht hose aswell? if so how?
__________________
Tremble inferior beings and dispare. Homo superior have come to this world. So prepare for your destinated future as slaves under a new and glorius empire, controlled by me. Homo superior have arrived to stay.
Reply With Quote
  #2  
Old 07-04-2006, 08:14 AM
zelos_88 zelos_88 is offline
Centurion
 
Join Date: Jan 2006
Posts: 160
Default

im creating a mmorpg. and a friend of mine who dont use router is capable to join the server. but another friend who uses a router cant. So i think its the router but i am asking if its the router that could cause that and then im also asking if there is in someway possible by winsock make it so it worx also with a router
__________________
Tremble inferior beings and dispare. Homo superior have come to this world. So prepare for your destinated future as slaves under a new and glorius empire, controlled by me. Homo superior have arrived to stay.
Reply With Quote
  #3  
Old 07-04-2006, 10:16 AM
Tarh's Avatar
Tarh Tarh is offline
Junior Contributor
 
Join Date: Jan 2004
Location: Ontario, Canada
Posts: 357
Default

NAT routers will drop any unsolicited packets. That is, any connection that is coming IN from the internet will be dropped, unless it was requested by a connection going OUT first. That means that, in terms of the Winsock control, you were attempting to create a connection to the Client from the Server, and the Client was behind a NAT router, it would not work. However, the Client would be able to connect to the Server with no problems. Likewise, if the Client sent data to the Server recently, the Server would be able to connect back through the router.

You can avoid this issue by setting up Port Forwarding in the router. In this case, all unsolicited packets on a given port will be routed to a computer on the LAN with a given IP address (you may want to disable DHCP for that computer to keep this address static).

Applications can create this configuration without user interaction using Universal Plug n' Play, although I don't know if this technology is supported in Visual Basic. If it is, you must still be aware that some clients have Universal Plug n' Play disabled.

Another solution is called NAT traversal, in which a server is used as a bridge allowing 2 clients with NAT routers to connect to each other. This complicated technology isn't needed if either one of the clients has a direct connection to the internet, though.

Can you post the specifications of how one of the clients would connect to your server? How are you using the winsock control to create the connection? Knowing these things will allow us to pinpoint the reason for connection failure.
__________________
[Use [VB][/VB] tags when writing code in a post] [Search the forum before posting] [Have Fun]

[Follow the Posting Guidelines]
[Post your code] [Do not ask help for viruses] [Be kind when asking for help]
Reply With Quote
  #4  
Old 07-04-2006, 11:45 PM
zelos_88 zelos_88 is offline
Centurion
 
Join Date: Jan 2006
Posts: 160
Default

ive done so that when the game open it tries to connect to the server. and the server then accept the connection and then send some info back to the client
__________________
Tremble inferior beings and dispare. Homo superior have come to this world. So prepare for your destinated future as slaves under a new and glorius empire, controlled by me. Homo superior have arrived to stay.
Reply With Quote
  #5  
Old 07-05-2006, 07:22 AM
Tarh's Avatar
Tarh Tarh is offline
Junior Contributor
 
Join Date: Jan 2004
Location: Ontario, Canada
Posts: 357
Default

That is completely router-friendly; your problem lies elsewhere.

What part of the code won't work, exactly? Does the client open the connection to the server without problems? If not, then either the route from the client to the server is broken (extremely unlikely due to alternate routes), or something in-between is dropping the packets. If this is the case, you'll want to try the connection again with any firewalls disabled.

Is the problem with the actual data being transferred? If you don't know, you may have to test the application on his computer by using some form of a log system (log all connection attempts, errors, connection closures, and all data from the raw packets). From there, you should be able to trace why the data isn't arriving correctly.
__________________
[Use [VB][/VB] tags when writing code in a post] [Search the forum before posting] [Have Fun]

[Follow the Posting Guidelines]
[Post your code] [Do not ask help for viruses] [Be kind when asking for help]
Reply With Quote
  #6  
Old 07-05-2006, 11:37 AM
zelos_88 zelos_88 is offline
Centurion
 
Join Date: Jan 2006
Posts: 160
Default

client
Code:
Form1.Winsock.RemoteHost = "192.168.0.1" Form1.Winsock.RemotePort = 14444 Form1.Winsock.Connect
ive checked with a friend all data is correct for the client
Code:
Winsock(0).LocalPort = 14444 Winsock(0).Listen
server when it listen
the thing is when i use the client to connect with my own pc it worx, but when others try it wont.
and its so that when they try the se4rver dont even get the request could viruses cause this kind of problem?
__________________
Tremble inferior beings and dispare. Homo superior have come to this world. So prepare for your destinated future as slaves under a new and glorius empire, controlled by me. Homo superior have arrived to stay.
Reply With Quote
  #7  
Old 07-05-2006, 11:41 AM
Tarh's Avatar
Tarh Tarh is offline
Junior Contributor
 
Join Date: Jan 2004
Location: Ontario, Canada
Posts: 357
Default

Code:
Form1.Winsock.RemoteHost = "192.168.0.1"

You aren't using that line in the code that you gave your friends, are you?
__________________
[Use [VB][/VB] tags when writing code in a post] [Search the forum before posting] [Have Fun]

[Follow the Posting Guidelines]
[Post your code] [Do not ask help for viruses] [Be kind when asking for help]
Reply With Quote
  #8  
Old 07-05-2006, 11:43 AM
zelos_88 zelos_88 is offline
Centurion
 
Join Date: Jan 2006
Posts: 160
Default

thats what im using and it have worked before
__________________
Tremble inferior beings and dispare. Homo superior have come to this world. So prepare for your destinated future as slaves under a new and glorius empire, controlled by me. Homo superior have arrived to stay.
Reply With Quote
  #9  
Old 07-05-2006, 11:45 AM
Tarh's Avatar
Tarh Tarh is offline
Junior Contributor
 
Join Date: Jan 2004
Location: Ontario, Canada
Posts: 357
Default

When the program runs on those computers, does it still use that IP address?
__________________
[Use [VB][/VB] tags when writing code in a post] [Search the forum before posting] [Have Fun]

[Follow the Posting Guidelines]
[Post your code] [Do not ask help for viruses] [Be kind when asking for help]
Reply With Quote
  #10  
Old 07-05-2006, 11:46 AM
zelos_88 zelos_88 is offline
Centurion
 
Join Date: Jan 2006
Posts: 160
Default

if the server/my computer does? yes
when i use that IP to connect to myself it worx, but if i change it the client reacts like there werent any server
__________________
Tremble inferior beings and dispare. Homo superior have come to this world. So prepare for your destinated future as slaves under a new and glorius empire, controlled by me. Homo superior have arrived to stay.
Reply With Quote
  #11  
Old 07-05-2006, 11:52 AM
Tarh's Avatar
Tarh Tarh is offline
Junior Contributor
 
Join Date: Jan 2004
Location: Ontario, Canada
Posts: 357
Default

When multiple computers are hooked up to a router, you essentially end up with 2 different IP "scopes," so to speak. If you simply had a computer hooked up to your modem (like you would in the old days), then that computer would get whatever public IP address was assigned to it by the ISP. However, in the "NAT era" of the internet, where most people now have multiple computers behind NAT routers, this doesn't work anymore. Each computer on a client's network has a so-called "private IP," which is an IP that is only local to that network. For example, most linksys routers have a default IP of 192.168.1.1 or 192.168.0.1. The router then obtains the public IP which it uses on behalf of all of the computers in the network.

Assuming that your server computer is located on your network at 192.168.0.1, and that is what you are trying to connect to, your friends outside the router could not connect because the program was trying to connect to that computer on their network; which doesn't exist, of course.

--------------------

Just to clear things up, you are using:
Code:
Form1.Winsock.RemoteHost = "192.168.0.1"
(exactly as written) on the computers where you distributed your program, and you are running server software that you made on a computer called 192.168.0.1 on your network, right?

If that is correct, I can give you step-by-step instructions to get this set up properly. I just need verification that I understand you fully first before I start telling you these things and I have the whole thing wrong...
__________________
[Use [VB][/VB] tags when writing code in a post] [Search the forum before posting] [Have Fun]

[Follow the Posting Guidelines]
[Post your code] [Do not ask help for viruses] [Be kind when asking for help]
Reply With Quote
  #12  
Old 07-05-2006, 12:02 PM
zelos_88 zelos_88 is offline
Centurion
 
Join Date: Jan 2006
Posts: 160
Default

im on getting this whole thing corrected. but i am not behind a router. i have a ADSL and is the only computer in this house. if this is a router or not i dont know but i dont think so
__________________
Tremble inferior beings and dispare. Homo superior have come to this world. So prepare for your destinated future as slaves under a new and glorius empire, controlled by me. Homo superior have arrived to stay.
Reply With Quote
  #13  
Old 07-05-2006, 12:04 PM
Tarh's Avatar
Tarh Tarh is offline
Junior Contributor
 
Join Date: Jan 2004
Location: Ontario, Canada
Posts: 357
Default

Your computer is connected directly to your internet connection?

If so, where did you get "192.168.0.1" from?

Run "cmd" from Start > Run and type "ipconfig /all". What address is listed as "IP Address" ?
__________________
[Use [VB][/VB] tags when writing code in a post] [Search the forum before posting] [Have Fun]

[Follow the Posting Guidelines]
[Post your code] [Do not ask help for viruses] [Be kind when asking for help]
Reply With Quote
  #14  
Old 07-05-2006, 12:06 PM
zelos_88 zelos_88 is offline
Centurion
 
Join Date: Jan 2006
Posts: 160
Default

ip: 192.168.0.1
255.255.255.0
192.168.0.254

thats all numbers that look like IP i can see
__________________
Tremble inferior beings and dispare. Homo superior have come to this world. So prepare for your destinated future as slaves under a new and glorius empire, controlled by me. Homo superior have arrived to stay.
Reply With Quote
  #15  
Old 07-05-2006, 12:11 PM
Tarh's Avatar
Tarh Tarh is offline
Junior Contributor
 
Join Date: Jan 2004
Location: Ontario, Canada
Posts: 357
Default

Those being:

IP Address: 192.168.0.1
Subnet Mask: 255.255.255.0
Default Gateway: 192.168.0.254

Yes, you ARE indeed behind a router. Your router has an IP of 192.168.0.254, your computer has a private IP of 192.168.0.1, and all computers on your network will start with 192.168.0.

Therefore, my assumptions were accurate.

For the first step towards correcting this problem, you will need access to your router's web administration panel. You can do this by opening http://192.168.0.254 in your web browser. If you are prompted for a username and password, and you have not yet set these up, they are most likely no username and "admin" for a password. Tell me if you're having troubles, or if you managed to get into the administration panel so we can continue to the next step.
__________________
[Use [VB][/VB] tags when writing code in a post] [Search the forum before posting] [Have Fun]

[Follow the Posting Guidelines]
[Post your code] [Do not ask help for viruses] [Be kind when asking for help]
Reply With Quote
  #16  
Old 07-05-2006, 12:13 PM
zelos_88 zelos_88 is offline
Centurion
 
Join Date: Jan 2006
Posts: 160
Default

seems to be no problem changing stuff
__________________
Tremble inferior beings and dispare. Homo superior have come to this world. So prepare for your destinated future as slaves under a new and glorius empire, controlled by me. Homo superior have arrived to stay.
Reply With Quote
  #17  
Old 07-05-2006, 12:18 PM
Tarh's Avatar
Tarh Tarh is offline
Junior Contributor
 
Join Date: Jan 2004
Location: Ontario, Canada
Posts: 357
Default

Look for the page that says something about "Port Forwarding". On some routers, this is located in the "Applications / Gaming" tab.

Once you are there, depending on your router model, you may see many empty fields, or a button to add a new port forward. Regardless, use the controls to add a new port forward. The details that you should fill in are:

"Name" or "Application": "MMORPG Server"
"Start": "14444"
"End": "14444"
"Protocol": "TCP"
"IP Address": "192.168.0.1"
"Enable": Checked
__________________
[Use [VB][/VB] tags when writing code in a post] [Search the forum before posting] [Have Fun]

[Follow the Posting Guidelines]
[Post your code] [Do not ask help for viruses] [Be kind when asking for help]
Reply With Quote
  #18  
Old 07-05-2006, 12:20 PM
zelos_88 zelos_88 is offline
Centurion
 
Join Date: Jan 2006
Posts: 160
Default

System Information

Connections

System Log

'
Diagnostics

Easy Setup

IP Addresses

IP Routing

NAPT

DHCP

DNS

System

System Password

Templates

Language

i have this to choose one, wich one should i take?
__________________
Tremble inferior beings and dispare. Homo superior have come to this world. So prepare for your destinated future as slaves under a new and glorius empire, controlled by me. Homo superior have arrived to stay.
Reply With Quote
  #19  
Old 07-05-2006, 12:23 PM
Tarh's Avatar
Tarh Tarh is offline
Junior Contributor
 
Join Date: Jan 2004
Location: Ontario, Canada
Posts: 357
Default

"IP Routing" would appear to be the most likely. If it isn't, search through all of the options until you find something where you can do port forwarding. The characteristics of such a page would be the ability to enter an IP Address, and a port number, or a port number range. Some may also offer a Protocol option.
__________________
[Use [VB][/VB] tags when writing code in a post] [Search the forum before posting] [Have Fun]

[Follow the Posting Guidelines]
[Post your code] [Do not ask help for viruses] [Be kind when asking for help]
Reply With Quote
  #20  
Old 07-05-2006, 12:32 PM
zelos_88 zelos_88 is offline
Centurion
 
Join Date: Jan 2006
Posts: 160
Default

Destination:

Label:

Gateway:

Interface:

Metric:

in it it looks like this, does that look right?
__________________
Tremble inferior beings and dispare. Homo superior have come to this world. So prepare for your destinated future as slaves under a new and glorius empire, controlled by me. Homo superior have arrived to stay.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Router
Router
Router Router
Router
Router
Router Router Router Router Router Router Router
Router
Router
 
Router
Router
 
-->