How does Terminal Services Assign IP Addresses to Each Session?

Posted on 2005-04-28
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
    LVL 15

    Accepted Solution

    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

    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

    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

    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..

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Recently, I had the need to build a standalone system to run a point-of-sale system. I’m running this on a low-voltage Atom processor, so I wanted a light-weight operating system, but still needed Windows. I chose to use Microsoft Windows Server 200…
    Learn about cloud computing and its benefits for small business owners.
    how to add IIS SMTP to handle application/Scanner relays into office 365.
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…

    737 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

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now