• Advertisement
Sign in to follow this  

Multiple networks on one PC

This topic is 4918 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi guys! I have one or maybe two understanding questions about Windows network programming: 1) Say I have a computer with an internet and a LAN network. When I use UDP and send to a specific IP address data, is it right that the data is sent over both networks? So, in fact that would mean if Im sending a big file for example over LAN to another PC by using UDP, the big file is also sent over the internet-provider and blocking it this way? Does the same happen with TCP when I already got a connection to a LAN PC and send data. Will it go over internet-provider too? Is there any way to choose which network to use? For UDP and TCP in this case? 2) Say I have a computer with two internet connections. Is there any difference between point 1) and point 2)? Is UDP data sent over both internet-providers then? And how to choose which one I want to send and receive data? Thanks in advance!!

Share this post


Link to post
Share on other sites
Advertisement
Shouldn't your LAN addresses be in the 192.168.* space? That would mean that LAN addys wouldn't have a corresponding internet address, and no worries then.

Share this post


Link to post
Share on other sites
@Pxtl
Yes they are. BUT does that mean that the internet-network driver on everyones Windows PC filters automatically EVERY 192.168.* pakets and deletes them before they are uploaded to the internet-provider??

Share this post


Link to post
Share on other sites
[I've a sneaky suspicion there's an image here my browser's not displaying, but]

Your OS will pick the correct network to send it on. Packets should not be sent out both interfaces. [but could be sent on alternating interfaces under some circumstances (ie, packet 1,2, and 5 might go out interface #1, packets 3 and 4 might go out interface #2, but the 5 packets won't go out both interfaces)]

Running 'route print' from a win2k/XP command line will list the windows routing table.

Routing tables are very common, and [google] can give you a great more detail than I could regarding their actual implimentation.

Share this post


Link to post
Share on other sites
Ok thanks!

But my point 2) is then a bit more complicated I think.

If I have two internet connections, one modem and one DSL for example, there won't help a simple IP filtering. So in this case data is sent over both providers right? And how to get it sent then to the right one?

Thanks again!

Share this post


Link to post
Share on other sites
The packets will be sent out on the default interface (determined by the metric).

Really, Google does have the answers to your questions.

Share this post


Link to post
Share on other sites
Indeed, the routing table metric will indicate which is preferred if there are two [or more] routes. bind() should pick which IP to use should your machine have multiple IPs.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement