Ask Your Question
1

track dynamic ips

asked 2012-05-26 22:02:51 -0500

callkalpa gravatar image

I have a LAN with a several windows machines and a f16 box. IPs for windows machines are dynamically allocated and they have their own host names. I want to access a particular windows machine from my f16 box. I tried with the host name (ex ping <hostname>) but it doesn't work. ping works with the ip but since the ip changes (after a reboot of the windows machine) it is hard to access through ip.

What I want is to ping to that particular windows machine any time (unknowing what it's ip at the moment is)

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
0

answered 2012-05-27 02:42:35 -0500

misc gravatar image

I would suggest to give static ip allocation for that if you can, as it would solve lots of headaches. You can set the ip as fixed in dhcp server, and still benefit from dhcp ( ie, be able to use your computers on other lan without touching to their configuration ). The server will just give the same ip each time, thus solving your problem.

If you can't or do not want for some reason, another solution is to have a dynamic dns integration with dhcp, this documentation should help you : http://www.semicomplete.com/articles/dynamic-dns-with-dhcp/. This however requires more setup than the first documentation, and depending on your network, it may not be doable nor a good idea.

A third option would be to look for multicast dns, using nss_mdns, and zeroconf/bonjour pack from apple on windows side. This permit to use <hostname>.local to contact computer on the local network. This requires to open port 5353 on your fedora box firewall, and do the same on windows.

One last option would be to use WINS for resolution. But I am not that familiar with it, and do not know if newer Windows version still support it. So I would not recommend this, unless you know what you are doing.

edit flag offensive delete link more
0

answered 2012-05-27 02:37:58 -0500

ztank1013 gravatar image

If you have those Windows machines in the same f16 machine subnet you may work with the MAC address which will stay the same (always) unless the nic card breaks and you have to replace it!

I am assuming your f16 host has an eth0 network card configured.

Run this command to get the subnet mask:

ifconfig eth0 | grep Mask
          inet addr:192.168.1.7  Bcast:192.168.1.255  Mask:255.255.255.0

Mask:255.255.255.0 was the info we were looking for.

Now you could ping (remember that ping scans are well done by specific tools like nmap or fping) each of the 255 IP address in your /24 (CIDR notation equivalent to 255.255.255.0) subnet and then run

arp -a

The previous command will return IP/MAC couples. You should annotate these results so the next time you do this procedure again if some windows machine has a different IP (DHCP assigned) you can still find the right one by browsing and comparing the MAC addresses lists.

arp is considered obslete and you should use ip neighbor instead.

Another (probably better) way to do so is to use nmap.

A simple OS scan as root in the same subnet will return the information you are looking for (MAC addresses and currently associated IP).

nmap -O 192.168.1.0/24 | egrep 'Nmap scan report|MAC Address'
Nmap scan report for 192.168.1.1         # <- my dhcp router
MAC Address: 00:14:7F:FF:FF:FF (Thomson Telecom Belgium)
Nmap scan report for 192.168.1.6         # <- another f16 in the same subnet
MAC Address: 00:16:6F:EE:EE:EE (Intel)
Nmap scan report for 192.168.1.7         # <- my f16 host

I intentionally obfuscated the last 3 bytes of my MACs

edit flag offensive delete link more
0

answered 2012-05-27 08:20:42 -0500

FranciscoD_ gravatar image

Why not just use dyndns.org, no-ip.com or a similar service?

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2012-05-26 22:02:51 -0500

Seen: 178 times

Last updated: May 27 '12