Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
no, but it's simple to add an additional IP on an existing ethernet interface to get to it. "ifconfig eth0:1 1.2.3.4" and you can directly hit 1.2.3.5.
the MAC address won't help you across subnets as you specified.
A MAC address is a Layer 2 component and doesn't cross layer 3 boundaries such as routers.
A router contains an arp cache table that tracks MAC addresses (layer 2) on each segment and translates IP addresses (layer 3) to the destination MAC addresses. (Yes this explanation is simplified.)
He stated they were in different subnets, that would imply a router has to be involved at some point.
Ahh I think I get it now.. (the light switch clicked on..) that's why the MAC address.
Static arp assignments then as 0.o suggested, should require no reconfiguration of the remote hosts.
exactly!
The issue is that I want to script the process that I have to do manually.
I have to log in into each devices that comes with random ip address (a user configured device that has been returned for some reason. ) and collect info about the radio.
So I figured if I could ssh using a MAC address I could just do an arp -a see the mac. Then log in get the information I need and dump it to a database then just continue down the loop until all the devices are done.
I think there is a way to MAC telnet, but the davices have ssh as default.
again, why not just add an eth0:1 to the box to put yourself on both subnets?
because I need to script the process if at all possible
when you receive a device that could have any possible ip address on it
it becomes a pain in the butt to reconfigure eth:1 ever time and figure out what subnet its on. now times that by 300 devices that you plug in ever day.
mikrotik has a utility that lets you get inside of its devices with only using the mac address.
because I need to script the process if at all possible
when you receive a device that could have any possible ip address on it
it becomes a pain in the butt to reconfigure eth:1 ever time and figure out what subnet its on. now times that by 300 devices that you plug in ever day.
mikrotik has a utility that lets you get inside of its devices with only using the mac address.
I would like to make such a utility.
Sorry to bump an old thread. Came across this while Googling. I working on some MikroTik RB411's. I think I have a script worked out that will update the firmware and apply the configuration I want to multiple units, but I would have to connect via SSH in PuTTY using MAC Add to do it. Anyone got any ideas?
Found this thread several times in the last days
searching for a solution!
So for all who still need a solution get mac2ip from https://sites.google.com/site/joergtinner/
-------------------------------------------------------
joe@CQ60:~$ mac2ip
Running programs with the MAC instead of the IP.
SYNTAX: mac2ip MAC "CMD"
MAC - is the Mac-Address (or distinctive[!] part)
you want to get substituted by the related IP.
CMD - is the command you want to execute. Please write
it in quotes and use "IP" instead of the IP.
Examples: mac2ip A1:B2:C34:E5:F6 "ssh root@IP"
mac2ip B2:C34 "vncviewer IP:1"
mac2ip A1:B2:C34:E5:F6 "krdc IP"
Tip: mac2ip x x (will give you a MAC list.)
Note: depends on ping, ifconfig and arp.
------------------------------------------------------
There is a block to edit in the script, if you need to
access some other subnets!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.