You are not logged in.

#1 2009-04-02 01:05:59

10thApeRag
Member
From: USA
Registered: 2009-04-02
Posts: 9
Website

Keeping two IP addresses in sync

I have two computers—a laptop and a desktop—that spend most of their time on a network configured with DHCP. Most of the time, DHCP addresses stay the same, but occasionally the leases expire and they get new IPs. The network is subnetted into several small networks and my laptop is sometimes wired and sometimes wireless with different IPs for each. Because of the subnetting and roaming, I can't guarantee that both my computers are on the same subnet. This rules out a simple Avahi setup, I think.

Ideally, I'd like to be able to have my computers talk to each other and exchange IP addresses automatically—on boot, for example—so that I don't have to update /etc/hosts and various other config files everytime the IP addresses change.

I've looked into services like Avahi and DNS. Avahi doesn't seem to have the capability I want, and DNS is a much too complicated solution for this, I think. I also don't have any experience with DNS and I really don't want to upset the network admins here by running a misconfigured DNS server that screws with theirs.

Any suggestions?

Thanks!

Offline

#2 2009-04-02 01:09:53

rson451
Member
From: Annapolis, MD USA
Registered: 2007-04-15
Posts: 1,233
Website

Re: Keeping two IP addresses in sync

If they already have a dns server configured, ask them to put your two machines into their dns.  Problem solved.


archlinux - please read this and this — twice — then ask questions.
--
http://rsontech.net | http://github.com/rson

Offline

#3 2009-04-02 01:18:29

10thApeRag
Member
From: USA
Registered: 2009-04-02
Posts: 9
Website

Re: Keeping two IP addresses in sync

My machines do have DNS entries in their servers, but the hostnames are all ip-xxx-xxx.domain.com, where the x's are the last two groups of an IP address, which doesn't aleviate the problem of having to know the new IPs. Anyway, I would like to avoid asking them for special favors if possible.

Offline

#4 2009-04-02 15:14:21

tomyeo
Member
Registered: 2009-03-31
Posts: 2

Re: Keeping two IP addresses in sync

This may upset your network guys more than asking them to reserve IP address for your computers, and probably more difficult than setting up DNS. The idea is the use netbios name broadcast.

1. Setup both computers as samba server and give it a unique netbios name
2. Configure winbind for transparent usage, or use "net lookup [netbios_name]" to get the IP address.

But still, it will fail if both computers are on different subnet and the router(s) in between do not relay netbios broadcast, which is normally the case.

Offline

#5 2009-04-02 15:29:51

whoops
Member
Registered: 2009-03-19
Posts: 891

Re: Keeping two IP addresses in sync

I'd just have both computers on start-up upload & download the data they need on some static server (free webspace/ftp if nothing else at had) and insert everything where it belongs with ugly little "copy&paste-programming-style"-scripts.

...which might most likely be a horribly wrong solution but could with some luck be got to work easily, depending on what exactly you're trying to do.

Offline

#6 2009-04-04 15:50:56

10thApeRag
Member
From: USA
Registered: 2009-04-02
Posts: 9
Website

Re: Keeping two IP addresses in sync

That just might work, whoops. I have shell access to a server here that might allow me to do that kind of syncing.

Thanks!

Offline

Board footer

Powered by FluxBB