[Last Call] Learn how to a build a cloud-first strategyRegister Now


How does Terminal Services Assign IP Addresses to Each Session?

Posted on 2005-04-28
Medium Priority
Last Modified: 2012-05-05
I'm developing a Visual Basic application that I'd like to get running on Terminal Server.  The application communicates over TCP/IP and each session/user on Terminal Server needs its own IP Address in order to communicate in and out.  I don't know Terminal Services.  Can each session get its own IP address?
Question by:samuel999
  • 2
LVL 15

Accepted Solution

scampgb earned 750 total points
ID: 13885676
Hi samuel999,
No - it's the Terminal Server itself that will have an IP address.

Every user on that server will be coming from the same machine, and subsequently have the same IP address.

Each user doesn't need their own IP address to use network applications - unless there's something specifically hard-coded in your app.

Does that help?

Author Comment

ID: 13885972
My application needs a separate IP address for each user because it sits there and 'listens' for messaging traffic on a specific IP port.  Can each session get the same view of all traffic over a specific port?
LVL 15

Expert Comment

ID: 13886167
You're moving more into the realms of programming here, but yes - that's how most applications work :-)

For example, a web server listens for connections on TCP port 80.  The web server would establish connections with huge numbers of clients, but each client connects to the same port on the server.
This mechanism is called "sockets", and I'm sure that there's loads of information around about how you'd implement it.
From a unix point of view, your main process would accept the connection and then fork a sub-process to handle the individual session.  I can't really advise on how you'd do it with VB though.

You might want to ask in the VB topic area - post the code that you've got so far so that people can see where you're up to.

Any help?

LVL 13

Expert Comment

ID: 13887120
You would have to write your Program to look at the clients session and find there IP Address.

 If you wrote the program to just find the IP Address of the computer it would always find the Terminal Server's IP Address because thats the computer your application is running on.

Here is a link with some code to get the clients IP Address, Username etc..


Featured Post

Transaction-level recovery for Oracle database

Veeam Explore for Oracle delivers low RTOs and RPOs with agentless transaction log backup and transaction-level recovery of Oracle databases. You can restore the database to a precise point in time, even to a specific transaction.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Numerous times I have been asked this questions that what is it that makes my machine log on so slow, there have been cases where computers took 23 minute exactly after taking password and getting to the desktop. Interesting thing was the fact th…
Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question