Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dynamic Address Allocation

Status
Not open for further replies.

sabelo

Programmer
Apr 7, 2003
9
NZ
Guys I really need your help! Things have changed, most stations use dynamic allocation of Ip addresses, how do I now uniquely identify my station on the internet coz each time I connect I am allocated a new IP address. e.g. if I want to write a program that connects to a remote station connected to the internet, how do I identify that station. I hope this doesn't go as far as using the network card #!

worried!
 
Hello,

A solution can be using dns and dhcp but working together. I don't know in other plattforms but in Solaris (Unix) Bind (dns) can work together with the dhcp server. I mean, when an IP is dinamically given by the dhcp server to a host, this IP is updated on the dns server and this way you can refer to every host by the hostname, because there's a hostname-dinamic_IP relationship. I've heard that it can be done in windows too, but I'm not sure.

I hope this will help you. Bye,

jmiturbe
 
What is the address range you are currently using?

In order for your system to have a permanent IP address on the internet, you have to rent that IP address!
 
So there's no way I can connect to my pc remotely without a static ip address? How does 'PC Anywhere' work? Do you also have to specify the ip address? If that's the case, how would you access your work intranet pc from home, because its ip address is not visible to the internet? There must be a way....please help!
 

If your intranet (e.g. work) is behind a NAT firewall/router, you need to enable port forwarding on the router. This is where anyone connecting to your WAN IP address on the specifed port is forwarded to the LAN IP which you specify. <marc>[ul]help us help![li]please give us feedback on what works / doesn't[/li][li]not sure where to start? click here: faq581-3339[/li][/sup][/ul][/sup]
 
The problem with using Port Forwarding is that his internal IP will change with every reboot requiring the Port Forwarding to be updated with the new IP address of the internal computer. Unless, of course, the router is smart enough to be able to update the port forwarding each time the IP changes.

I still think he needs to give his internal computer a static IP (or a very long lease time from DHCP).
 
Accessdabler - It depends if his internal IP is a private IP or a public IP.


If the machine uses a public IP, then DNS will allow users to connect straight to that dynamic IP.

If the machine uses a private IP in a LAN with a router (assigned a dynamic IP from the ISP) then port forwarding to an internal static IP can be combined with DNS resolving the dynamic WAN IP. :)
<marc>[ul]help us help![li]please give us feedback on what works / doesn't[/li][li]not sure where to start? click here: faq581-3339[/li][/sup][/ul][/sup]
 
Thank you very much jimbopalmer...your buzzword helped. I registered for a free DNS and got a program that binds my IP with my domain name each time I login.

I have written my program now...but i have a problem again. I left the server program running at home on my laptop and tried to connect to it from work but it could only establish a one way connection. The client on my laptop could not connect on the server side at work. After connecting, the client at work sends the IP for the machine @ work so that the client (at home) can connect to the server at work, establishing a two way communication. But the client @ home can't connect to the server @ work. The other day I tried to ping the domain after binding my ip with the machine @ work but it did not respond though the ping cmd showed the IP @ work. I'm not too sure if we're behind a firewall @ work and I really wouldn't do much about that...it it's the case.

That was long....anyway, I still need your help guys...
Thank u very much!
 
sabelo - your description suggests a firewall at work. If your IT services would be kind enough to allocate your work PC a static IP, and enable port forwarding (of the appropriate port/s) to your machine's IP address, this would resolve the issue.


For the keen who want the explanation:

The firewall has 2 sides - the WAN side is given a public IP by the ISP.
The LAN side is given a private IP address chosen by your IT services.

Because the private IPs are not visible on the internet, nothing on the internet can initiate a connection to your office PCs.
A machine on the internet can only initiate a connection to the public IP - i.e. the IP of the firewall. The firewall then has to decide what to do with that connection. If port forwarding is not setup, the firewall will simply ignore the attempt to connect.

If port forwarding is setup, the firewall will examine the port number that someone is trying to connect to, and forward the connection to the appropriate office PC.

Common ports are 80 for web browsing, 21 for FTP, and 23 for Telnet. So a typical firewall is setup to forward Port 80 to the IP address of the company's webserver, Port 21 to the IP address of the company's FTP server, etc.

<marc>[ul]help us help![li]please give us feedback on what works / doesn't[/li][li]not sure where to start? click here: faq581-3339[/li][/sup][/ul][/sup]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top