Go Back   ZeroC Forums > Help Center

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 10-03-2004
stephan stephan is offline
Registered User
 
Name: Stephan Stapel
Organization: Stephan Stapel
Project: BristolNG
 
Join Date: Oct 2003
Location: Essen, Germany
Posts: 169
dhcp questions

Hi there,

I have to support DHCP driven networks for an application I'm working on.

My first question on this is if anyone can give me some hints on this scenario to avoid running into too many pitfalls.

In particular, one "server" object has to keep track on each machine (the "clients", represented by Ice objects in this case) in the network, currently the machine is identified on it's IP address. However, this will not work any more with DHCP so I thought, creating UUID tokens for identification is the only solution.
These tokens would have to be stored locally on the clients and be submitted on re-registering to the server object.

Also, I suspect that storing proxy handles for the clients will not help in case that a particular client reconnects with a different IP address. To put it another way: I assume that an Ice proxy handle breaks on IP changes, right?

regs,

Stephan
Reply With Quote
  #2 (permalink)  
Old 10-04-2004
michi's Avatar
michi michi is offline
ZeroC Staff
 
Name: Michi Henning
Organization: ZeroC
Project: Ice
 
Join Date: Feb 2003
Location: Brisbane, Australia
Posts: 912
Whether a proxy breaks on change of IP address depends on your setup. If the proxy contains the IP address (instead of a domain name), it will break (obviously). If the proxy contains a domain name instead of an IP address, and if your DNS is up to date, there is no problem.

Machines that get their IP via DHCP can often be configured to update the local DNS with their new IP. Doing this would probably be the best way to keep everything working. Alternatively, you could come up with a session concept where clients contact the server with their details when they first come up. But, ideally, try to fix the problem at the DNS level. That will not only solve the problem for Ice, but for anything else that is IP-based.

Cheers,

Michi.
Reply With Quote
  #3 (permalink)  
Old 10-04-2004
marc's Avatar
marc marc is offline
ZeroC Staff
 
Name: Marc Laukien
Organization: ZeroC, Inc.
Project: The Internet Communications Engine
 
Join Date: Feb 2003
Location: Florida
Posts: 1,781
You might also consider to use indirect proxies with IcePack. Then you only need to configure the IcePack locator, and all your proxies will only have symbolic addressing information (adapter id plus object identity). The real IP address is then resolved with IcePack. This happens transparently at runtime. For more information, please see the chapter about IcePack in the manual.
Reply With Quote
  #4 (permalink)  
Old 10-04-2004
stephan stephan is offline
Registered User
 
Name: Stephan Stapel
Organization: Stephan Stapel
Project: BristolNG
 
Join Date: Oct 2003
Location: Essen, Germany
Posts: 169
Thanks for your answer michi,

it answers quite a lot of my questions.

Quote:
Originally posted by michi
Alternatively, you could come up with a session concept where clients contact the server with their details when they first come up. But, ideally, try to fix the problem at the DNS level. That will not only solve the problem for Ice, but for anything else that is IP-based.
If I don't know about the DNS/ DHCP setup at the place where the app is being installed, I assume that the session concept will be the only choice I can make, right?

regs,

Stephan
Reply With Quote
  #5 (permalink)  
Old 10-04-2004
bernard's Avatar
bernard bernard is online now
ZeroC Staff
 
Name: Bernard Normier
Organization: ZeroC, Inc.
Project: Ice
 
Join Date: Feb 2003
Location: Palm Beach Gardens, FL
Posts: 816
At least for the server, I think it's a reasonable requirement to have an up-to-date DNS entry!

For the clients, if you need to call them back, the safest is to register a callback at start-up with a unique (per-client) id. Assuming you use IP addresses and no DNS for the clients, this IP will remain valid as long as this client maintains the DHCP lease. In particular, if the client machine stays up and connected to the network (DHCP server), its IP address won't change, unless there is some administrative action like a reassignment of the IP-space offered by the DHCP server.

Now, if the client machine is shut down and restarted after the expiration of its DHCP lease, your client app can re-register its callback when it's restarted. Easy. A more interesting scenario is if your client application keeps running while the IP address changes: for example the machine was disconnected for a long time -- maybe it's a laptop "suspended" for a while. In this case, the application would need to detect this IP address change, restart its object adapter and re-register the callback ... typically in a background thread.

Cheers,
Bernard
Reply With Quote
  #6 (permalink)  
Old 10-05-2004
michi's Avatar
michi michi is offline
ZeroC Staff
 
Name: Michi Henning
Organization: ZeroC
Project: Ice
 
Join Date: Feb 2003
Location: Brisbane, Australia
Posts: 912
Finally, as Marc suggested, have a look at IcePack. With IcePack, you only need a single machine with a fixed domain name that resolves correctly to an IP, and all the other machines can have dynamically assigned IPs. IcePack then takes care of working out where a particular service is running, and clients transparently resolve the current address of a server they want to call.

Cheers,

Michi.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
two questions yanhbo Help Center 1 09-15-2005 12:34 AM
Questions about IceFreeze. OrNot Help Center 2 07-18-2005 06:49 AM
Questions. OrNot Help Center 4 07-12-2005 09:40 PM
IcePack questions brian Help Center 6 01-27-2004 07:04 PM
two questions simpley Help Center 6 11-06-2003 11:11 AM


All times are GMT -4. The time now is 05:12 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0
(c) 2008 ZeroC, Inc.