Archived

This topic is now archived and is closed to further replies.

Lubb

Whose Network Is It Anyway: LAN/Internet?

Recommended Posts

- I could have put this in either the Network Forum or the Borland forum, but I couldn''t decide and there''s more people here than both of them''s anyhow: - Just for my own educational exerience, I am attempting to write a simple client/server application using Borland C++Builder5 Pro, that should run between two PC''s I have connected on a 10/100 Ethernet hub. The problem that I have is that no matter how I specify the host address in the client socket, the client always tries to call out on the internet line rather than look on the LAN for its server. (I should point out that I am not trying to use the server as an internet server/proxy at all; this is just a client/server application over the LAN) If I go to dial-up networking and try to specify a new connection, there is no option for setting up a connection across the LAN even though the network cards are installed and working properly in Network Neighborhood. The two computers are running Win95/98 and have no other networking software; is this type of setup simply not possible with the ordinary Windows networking services? Some setup guides I have found online mention the need to get an IP address for any computer connected to both the LAN and the internet; is this necessary considering my intended use? - Also if yer really the sheet, the Borland manual mentions a service for sending small simple text streams back and forth, but never says what the service is. They say how to call the SendText and ReadText functions, but that''s all. Is this just IP, or is there something else?

Share this post


Link to post
Share on other sites
If youve got a hub which is connected to an internet router of some sort, than you will trouble cause your systems are prolly set for obtaining Ip addressed on the fly. If you simply have a hub, 2 nics and couple cat5's and that it, then you need to be sure these 2 systems can pass TCP/IP in some sort of peer/peer or official client/server (NT network for example) See below if this is the case. Need more info on your network? Cant help w/ software, cause I dont code. I've some experince with NT networks, but peripherally, not a expert. I know peopel in high places though, so if you give me enuff info on your current net setup, I can prolly get an answer.

Another possibility is enableing Netbeui (SP?). This would be somehting to try if you already have your 2 comps on an internet setup, because its not TCP, and its faster, but not routable. Check into that. Problem there is, Im not sure what you would need to do to your app to use this protocol, if anything? I would imagine you might need to, in which case you would need to know more about netbuei than I do. Which aint much

If you answer yes to having to no internet router and these 2 systems are not configured to work with said ficticious router, then see below:

Since you are stating a client/server app, then a simple peer to peer might suffice supposing you wrote a listen server for your app which can run on any client. You will need to define your network up to any subnet you decide. Most people go with somthing like this.

10.1.1.1
subnet 255.255.255.0

and for the other system
10.1.1.2
and I think you need the same subnet. Also in the The Identifaction Tab of your Tcp/ip control panel, you will need to specify a uniqe computer name for each system, and a univeral workgroup. At that point you should be able to talk to one another (double click Network Neighborhood and you should see your computer names). Also, be sure that each NIC has 802.1 support enabled under the Advanced tab of the NIC Adapter (not the protocol) under the TCP/IP control panel.

As a side note I find it funny that pple call them "IP" address and not "TCP" addresses. The IP, just stands for Internet protocol, because TCP is the official internet protocol (since 1985 I believe). Just bein picky, but even the big shots make this slip.. at least I consider it innacurrate

Edited by - TheEnderBean on July 1, 2001 9:38:06 PM

Share this post


Link to post
Share on other sites
- Actually I don''t know a thing about it. And I can''t seem to find out much, either.
-What I do know:
1. At this point in time, one PC is Win98/Mandrake, and the other is Win95. They are set on a peer-to-peer network through a 10/100 powered hub.
2. Linux will not operate the LAN cards I have right now.
3. Neither system shows any conflicts or problems with the LAN cards, and all the normal manual sharing works both ways.
-Some things I don''t know:
1. What ports are associated with which services, or, more to the point, which ports I can use freely for anything.
2. What the difference between a regular net address and an internet address is.
quote:
Um, you just need to connect to the server''s LAN IP address... they''re usually of the format 192.168.*.*. - SHilbert

-Do you mean, an address specifically beginning with 192.168.xxx.xxx has to be used? Or is that just a number you pulled out of thin air? If I set both PC''s to the addresses 10.x.x.x/subnet 255.255.255.0 and set the clientsocket to the server''s address, the client always tries to dial out on the modem. If I let each automatically select an address and use the hostname, the client still dials out on the modem. If I enter the local address "\\serverPCname", it''s still the same result. I only get an attempt to use the modem, and then a lookup or DNS error when I cancel that, because using the modem shouldn''t be necessary at all. And as far as I can tell, in both the Borland or MS Vis C++ clientsocket, I can either enter a hostname, or an IP address, but the hostname is resolved to an IP address in the HOSTS.SAM file. If there is some special IP address that tells the computer to use the LAN, I can''t find it mentioned anywhere. Both the Borland and MS Vis C++ book both speak of examples of LAN applications, but don''t give the specifics of how it is done ~as oposed to a net app~. All they really explain is internet apps.

Share this post


Link to post
Share on other sites
To find out the IP address of your system go into a DOS box and at the prompt type "ipconfig" (without the quotes) and hit the Enter key. This will list the current IP address for your system, the netmask that is being used, and the Default gateway (if any). If you have a machine connected to the Internet via modem you will see two sets - the first is for your Lan and the second should be for your modem connection to the Internet.

If you are trying to connect two machines on a local network that is running TCP/IP this should give you all the addresses you need to know.

Share this post


Link to post
Share on other sites