View Full Version : FTP to a mac address
scracha
3rd May 2012, 12:02
OK, is there any way of binding a MAC address to a given host name in Windows?
Specifically I want to FTP to a device. Device doesn't have capability to issue netbios name. Is on different networks so static IP is also a no-no.
nathanwhite
3rd May 2012, 12:07
assuming you have access to the server machine, why not just run ipconfig to get it's DHCP assigned address and put that into the client?
Buyasta
3rd May 2012, 12:10
It's not possible to just put an entry in your hosts file with a mac address in place of an IP, but you could write a script that uses arp to find the current ip of a given mac address and update your hosts file accordingy... arp -a will give you a list of every interface windows has an ARP entry for, listing the IP and MAC of each.
I should just note, I'm not 100% sure that's a native windows command, it could be from Cygwin or MingW.
CookMySock
4th May 2012, 10:49
Need more information. What do you mean "Is on different networks" ?
scracha
4th May 2012, 22:34
Different networks thingie. Device uses wifi on different customer networks or on end users android AP.
It's not possible to just put an entry in your hosts file with a mac address in place of an IP, but you could write a script that uses arp to find the current ip of a given mac address and update your hosts file accordingy... arp -a will give you a list of every interface windows has an ARP entry for, listing the IP and MAC of each.
I should just note, I'm not 100% sure that's a native windows command, it could be from Cygwin or MingW.
An excellent idea. arp was how I'd first found the bloody thing. File permissions on win 7 are actually pretty good and make changing hosts file a bit of a bitch. Quick batch file with some dos pipes and it now echo's correct ip to the user. If they'll pay me (fat bloody chance) I'll knock up summit to open up the ftp session.
dynamic Name server is another. Checkout rfc2136 .
Arp only stores mac addresses of local ip's. Anything out of your subnet gEts forwarded to the default gateway so no mac - ip conversion is required.
Dynamic dns could work but you need to run sofmething on the remote device - in which case you could setup anything that can let you know the ip of tne device, even a rregular ping back or something.
If you have good access to the remote network then access to the dhcp table on the server/router will give you mac addresses. Or possibly the wireless client table.Or you could run a port scanning tool overthe remote subnet.
CookMySock
5th May 2012, 22:27
Device uses wifi on different customer networks or on end users android AP.Cant you just give the box a name that resolves with intermal DNS on each respective network? That way, wherever you go you talk to it by name and it works.
scracha
6th May 2012, 20:41
Cant you just give the box a name that resolves with intermal DNS on each respective network? That way, wherever you go you talk to it by name and it works.
Tried....doesn't seem to resolve. Attempted it on 3 different routers routers. Removed firewall etc. etc. It's some bloody German thing :innocent:
DHCP...yeah...read original post. It's not ME using the device so I can't train the end user how to get onto different routers (assuming they're allowed to). Obviously I can assign it the same IP on their own network but it's a portable device going to different locations / networks. They want summit simple. Anyhoo...job done.
Mental Trousers
6th May 2012, 20:58
Add a second ip to your NIC then add a route for it.
EDIT what'd you do in the end?
CookMySock
8th May 2012, 20:18
Add a second ip to your NIC then add a route for it. You don't need to add a second NIC to do that. The O/S will quite happily allow you to attach two different subnets to the same interface.
If you want DNS to resolve internally, you are going to have to run your own custom DNS. It's a bit fiddly but it works.
Mental Trousers
8th May 2012, 20:34
You don't need to add a second NIC to do that. The O/S will quite happily allow you to attach two different subnets to the same interface.
If you want DNS to resolve internally, you are going to have to run your own custom DNS. It's a bit fiddly but it works.
I said a second ip to the NIC, not a second NIC. It's there in your quote!!
DNS isn't needed to get to the http interface or push a new binary using tftp.
p.dath
9th May 2012, 08:36
OK, is there any way of binding a MAC address to a given host name in Windows?
Specifically I want to FTP to a device. Device doesn't have capability to issue netbios name. Is on different networks so static IP is also a no-no.
No.
..10 chars..
CookMySock
10th May 2012, 13:03
I said a second ip to the NIC, not a second NIC. It's there in your quote!!Soz, was a bit pissed, lol.
scracha
13th May 2012, 21:05
Add a second ip to your NIC then add a route for it.
Typical IT guys....don't listen carefully to the problem.
EDIT what'd you do in the end?
Chucked the following in a batch file for the customer :eek:
@arp -a | findstr "MA-CA-DR-ES-OF-IT"
pause
If i was clever I'd launch filzilla or summit with the IP it returns.
mashman
14th May 2012, 21:06
I said a second ip to the NIC, not a second NIC. It's there in your quote!!
DNS isn't needed to get to the http interface or push a new binary using tftp.
Be fair, he had just NIC'd his finger in a tree :eek:
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.