IP addresses on NT networks

This is a discussion on IP addresses on NT networks within the Tech Board forums, part of the Community Boards category; For my current project I hope to have two apps communicating via TCP/IP (windows sockets). Now both of the apps ...

  1. #1
    Funniest man in this seat minesweeper's Avatar
    Join Date
    Mar 2002
    Posts
    801

    IP addresses on NT networks

    For my current project I hope to have two apps communicating via TCP/IP (windows sockets). Now both of the apps will be on PCs connected to my university network. I have seen people walk into the uni computer room with laptops and plug the laptop straight into one of the network ports and start surfing the web. I hope to be able to do this with the computers upon which my apps are situated. I have a couple of questions though regarding computers that are plugged into the network port in this way:

    1. Every time someone comes along with their computer and plugs it into the network, does it maintain the same IP address?

    2. Does the owner of the computer have to log into a user account on the network or does it somehow by-pass this?

    Thanks

    EDIT: By the way, I don't mean to be rude but can you only answer these questions if you really know what you are talking about and preferably have experience with NT networks. This is a crucial part of my MEng degree project so I can't be doing with rubbish coming from people who think they know the answers but are really just speculating. Cheers.
    Last edited by minesweeper; 02-10-2003 at 08:03 AM.

  2. #2
    C++ Developer XSquared's Avatar
    Join Date
    Jun 2002
    Location
    Ontario, Canada
    Posts
    2,718
    I know that with my school network, which is NT-based, you can just plug in, without logging in. You won't be able to access any files/programs on the network, but a TCP/IP program will work assuming that there is no filtering. For example, I wrote a basic TCP/IP client-server chat program, and there are no problems with plugging a computer in an connecting to the chat server.

    The one thing I'm not sure of is whether the IP address will remain static.
    Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah

    You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie

  3. #3
    RoD
    RoD is offline
    Redundantly Redundant RoD's Avatar
    Join Date
    Sep 2002
    Location
    Missouri
    Posts
    6,331
    1) Depends on the network, some are set to auto some are specified. All dependant.

    2) Also dependant on the network. theres so many options with NT domains/workgroups that its honerstly hard to say.

  4. #4
    Registered User
    Join Date
    Jan 2002
    Posts
    559
    For #1, it probably doesn't keep the same IP; DHCP usually leases out IP addresses for a set amount of time, which can be renewed, but not if the computer is gone (duh).
    But it can be set to a static IP, which is usually done on very small networks a/o for specific computers, such as a DNS server or gateway.
    Truth is a malleable commodity - Dick Cheney

  5. #5
    RoD
    RoD is offline
    Redundantly Redundant RoD's Avatar
    Join Date
    Sep 2002
    Location
    Missouri
    Posts
    6,331
    alot of incompetent admins will set static ip's because otherwise they can't manage the network. I perfer statics internally because i can then reference pcs quickly remotely or otherwise. I find it very easy to memorize ip address instead of actal names.

  6. #6
    5|-|1+|-|34|) ober's Avatar
    Join Date
    Aug 2001
    Posts
    4,429
    Originally posted by RoD
    alot of incompetent admins will set static ip's because otherwise they can't manage the network.
    and then...

    I perfer statics internally because i can then reference pcs quickly
    you trying to tell us something?

  7. #7
    UNBANNED OneStiffRod's Avatar
    Join Date
    Jan 2002
    Posts
    669
    I guarantee u they are running DHCP to automatically give out IP's to any comp connecting to the network.

    There is also an EXCELLENT chance that the network runs NAT (network address translation) which allows you to connect to another comp via '\\Server\persons name' or similar url.

    If u need a more windows non specific method that will be more difficult as u probably cant rely on a DNS server provided within the uni and u don't know the DHCP limits so u could set an IP out of range... U might then have to connect via mac-address which is not always reliable as it can be faked or even duplicated within a network. U would end up having to scan the network and try connecting on a specific port for the correct response.
    My Avatar says: "Stay in School"

    Rocco is the Boy!
    "SHUT YOUR LIPS..."

  8. #8
    RoD
    RoD is offline
    Redundantly Redundant RoD's Avatar
    Join Date
    Sep 2002
    Location
    Missouri
    Posts
    6,331
    @ober....

    haha


    I guarantee u they are running DHCP to automatically give out IP's to any comp connecting to the network.
    How can you possibly guarantee that?? DHCP isn't (if you look overall at most workplaces) even close to common! Sure its the better way to do it, but most networks don't.

    Its a 45/50 chance that they are using DHCP, and i would be interested to find out if they are(n't).

  9. #9
    Registered User
    Join Date
    Jan 2002
    Posts
    559
    Originally posted by RoD
    [BIts a 45/50 chance that they are using DHCP, and i would be interested to find out if they are(n't). [/B]
    What's the other 5% chance?
    Truth is a malleable commodity - Dick Cheney

  10. #10
    RoD
    RoD is offline
    Redundantly Redundant RoD's Avatar
    Join Date
    Sep 2002
    Location
    Missouri
    Posts
    6,331
    had to leave statistic for the networks that don't work :P

  11. #11
    Funniest man in this seat minesweeper's Avatar
    Join Date
    Mar 2002
    Posts
    801
    Ok, thanks for the replies guys. I have looked into how our home network is set up and it uses this DHCP thing. In light of this I now use my hostname instead of my IP address (cos this changes) to initiate comms between the apps (I am using a couple of PCs on our home network to develop and test the apps).

    gethostbyname() instead of gethostbyaddr()

    Is this the same as what OneStiffRod was saying with

    >>There is also an EXCELLENT chance that the network runs NAT (network address translation) which allows you to connect to another comp via '\\Server\persons name' or similar url<<?

    Also, this may sound silly. but if there is another PC somewhere on the internet with the same name as mine, won't my app attempt to connect to their PC too?

  12. #12
    Registered User
    Join Date
    Jan 2002
    Posts
    559
    Originally posted by minesweeper

    Also, this may sound silly. but if there is another PC somewhere on the internet with the same name as mine, won't my app attempt to connect to their PC too?
    The "name" of your computer doesn't matter. DNS and some other things take care of that. Your IP address must be unique. This is where stuff like subnetting comes in, which you probably don't want to get involved in too much with a home network.
    Truth is a malleable commodity - Dick Cheney

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Using postfix in C / detecting IP addresses
    By sean in forum Linux Programming
    Replies: 7
    Last Post: 02-26-2009, 08:39 PM
  2. Replies: 1
    Last Post: 09-11-2004, 09:52 AM
  3. resolving names and ip addresses
    By dicky in forum Networking/Device Communication
    Replies: 5
    Last Post: 07-01-2004, 04:32 PM
  4. increment IP addresses - newbie Q.
    By webwesen in forum C Programming
    Replies: 6
    Last Post: 09-09-2003, 09:25 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21