How can I telnet from Windows to my server by MAC address?

0

How can I telnet from Windows to my server by MAC address?

C:\Users\Asep>telnet D4:CA:6D:46:C9:98 23
Connecting To D4:CA:6D:46:C9:98...Could not open connection to the host, on port 23: Connect failed

Asep Saepuloh

Posted 2013-05-20T08:47:27.410

Reputation: 25

4

What would make you think you could connect to TCP port via a MAC address? I'd suggest you read up a little on the ISO/OSI or TCP/IP model and where the MAC sublayer and TCP fit in.

– slhck – 2013-05-20T09:09:33.860

@slhck i have router OS mikrotik i want to macc telnet from windows, i see on OSI no TCP for mac telnet – Asep Saepuloh – 2013-05-20T09:32:52.300

3You cannot do that. The TCP port 23 is at a much higher level than the MAC address (which is, simply put, only used to identify a device in your current network). As grawity said you'd first have to find out which IP address the device with the given MAC address has, and then connect to that. – slhck – 2013-05-20T09:38:31.153

1@slhck he did say "to his server" so it may well often be on his current network. I would note that TCP port is quite a bit higher than IP address too. hostnames are quite a bit higher than ips.. I don't think this higher/lower thing is that useful(or perhaps even that relevant) here. Just that the frame is discarded when/if a packet is routed. – barlop – 2013-05-20T11:07:04.430

Answers

6

I'm going to take a risk here and say.. Yes you can. In the same sense that you can telnet to a hostname.

Some people are saying you can't 'cos one says "Telnet is a Layer 3 network protocol. " I don't think that's correct, for one thing, telnet is an application layer protocol, that's layer 7. IP or IPX or whatever else, is the layer 3 network layer protocol. But that's not even relevant.

The whole layer concept is not useful here. It's used to identify different headers, and to identify which bunches of headers are stripped off and added(encapsulation).

The "packet" and by that I mean the whole lot(not just the layer 3). But looking at the whole thing all the fields. There's an IP address and a MAC address. You have to know a lot of things to get the packet sent. The application layer protocol(telnet), the TCP port, the IP address. In theory, you can telnet to a host given a MAC address, by getting the IP address. Just as you can telnet to a host given a hostname (you'd take the hostname and get the ip address). And just as you can get an IP from a hostname, one can also(though in a different way) get the IP given a MAC address.

RARP http://en.wikipedia.org/wiki/Reverse_Address_Resolution_Protocol it's apparently allegedly obsolete now(according to the first line of that wikipedia article) though I see the arp command on windows 7 and no doubt ARP is still used. RARP goes MAC->IP (getting IP from a MAC address). As opposed to ARP which goes IP->MAC (getting MAC address from IP). Just as you have DNS and rDNS.. that get you between IP addresses and hostnames. So too ARP and RARP get you between IP addresses and MAC addresses. So just as you can telnet to a hostname, you can with a similar principle, in theory, telnet to a host with a MAC address. Maybe that program you mention (mactelnet) does that.

ADDED I haven't got telnet on this machine but here's an example with a script

C:\blah>mactelnet 01-00-5e-00-00-16
Telnet 224.0.0.22
'Telnet' is not recognized as an internal or external command,
operable program or batch file.

C:\blah>

mactelnet.bat has one line

@for /f "tokens=1-5" %%f  in ('arp -a') do @IF "%%g"=="%1" Echo Telnet %%f & Tel
net %%f & EXIT /B

And as I said to ramhound " there is a 1-1 relationship [between ip and mac address], try the command arp -a The only limitation is it'd only apply locally. ARP or RARP won't tell you the ip address for a MAC address on a different subnetwork. You'd need your own list for that to do the conversion if you want to go beyond the local subnetwork. But locally the command arp -a will tell you in windows"

Also the OP mentioned a program http://tulas-tulis.com/blog/detail/mactelnet-from-linux-to-router-mikrotik

barlop

Posted 2013-05-20T08:47:27.410

Reputation: 18 677

You say its possible but don't show him how. – Ramhound – 2013-05-20T10:32:19.220

@Ramhound well, I suppose one could write a script to go from MAC address to IP address and telnet. But he provided a link of a program that does it, called mactelnet http://tulas-tulis.com/blog/detail/mactelnet-from-linux-to-router-mikrotik and by the way i'm not saying anything that different to what people that said "theoretically and practically no you need an ip address" said. I'm just being more philosophically correct I think, in saying theoretically yes, just as you can telnet to a hostname. i.e. no reason why you can't. e.g. with a script or that app he mentioned himself.

– barlop – 2013-05-20T10:33:59.647

2@Ramhound there is a 1-1 relationship, try the command arp -a The only limitation is it'd only apply locally. ARP or RARP won't tell you the ip address for a MAC address on a different subnetwork. You'd need your own list for that to do the conversion if you want to go beyond the local subnetwork. But locally the command arp -a will tell you in windows. – barlop – 2013-05-20T10:38:33.507

@Ramhound just added a script. – barlop – 2013-05-20T11:13:56.490

1

Simply put, you cannot. You will need to find out the IP address for that device.

user1686

Posted 2013-05-20T08:47:27.410

Reputation: 283 655

Yup thank's All i have reference from the site http://tulas-tulis.com/blog/detail/mactelnet-from-linux-to-router-mikrotik, But mactelnet from linux, Thank's All

– Asep Saepuloh – 2013-05-20T09:47:29.587

0

You simply can't telnet by mac-address. You need the IP address. Telnet is a Layer 3 network protocol. Mac-addresses are Layer 2.

The tool mentioned on that webpage you linked to in the comment (mactelnet) is not really telnet.

It looks like telnet, but uses a non-standard Layer2 protocol invented by the manufacturer of the router. It only works with those routers and the software supplied by the manufacturer.
It will not work on anything else.

Besides: Are you sure your server will actually accept telnet ?
Telnet is completely depreciated as it will send everything (including passwords) in plain text over the network.
Because of that these days most servers don't do telnet anymore. SSH is the new terminal protocol of choice.

Tonny

Posted 2013-05-20T08:47:27.410

Reputation: 19 919

re your second sentence, actually, telnet is a layer 7 application layer protocol. And any application layer protocol works with some layer 3 network protocol. – barlop – 2013-05-20T11:11:56.620

@barlop That is a bit nitpicking isn't it ? I meant to say "telnet uses L3" which in daily parlance is often rendered as "is a L3 protocol". Anyway if you start like that... You are mixing the 7 layer full OSI model and the 4 layer simplified model. In this case telnet should have been classified as a L4 protocol. In the TCP/IP world the 4-layer simplified model more closely resembles the real life implementation than the full 7-layer model and it is therefore preferable to be used. – Tonny – 2013-05-20T12:17:45.797

I am not sure if even your current phrase, "telnet uses L3" would be common parlance, for a start any application layer protocol (e.g. Telnet which is layer 7), would work with L3, telnet is no different to any other app layer protocol in that regard, so I can't see anybody saying what you just wrote either, or my more accurate rendition of what you wrote. You write "You are mixing the 7 layer full OSI model and the 4 layer simplified model" Actually not really no and if I was then you'd be too, but i'm not. There is such a thing as using the OSI as a reference model – barlop – 2013-05-20T20:44:09.697

Using the OSI -reference model- is distinct from speaking of the OSI architecture(an unused thing). It is common place as you know, to use the OSI reference model, to refer to the TCP/IP architecture. There is no contradiction or confusing or mixing things up in doing that. Use of OSI terminology there is strictly using OSI as a reference model, not as an architecture(which is what you were doing or trying to do, and that's fine). And I wouldn't say as you do that one "model" is "full" and one "simplified", that suggests one came from the other, but that's not so, as you probably know. – barlop – 2013-05-20T20:49:53.657

0

The RouterOS devices the OP is interested in do support "mac address telnet". You can do it from other RouterOS devices, but also I successfully used the open source tool to do it from Linux available here: http://lunatic.no/2010/10/routeros-mac-telnet-application-for-linux-users/

thorr18

Posted 2013-05-20T08:47:27.410

Reputation: 101

-1

This is an old thread but u might be interested to know that Microtik controllers have a "mactelnet" program to allow it to connect to their wireless access points before it is assigned an IP.

https://wiki.mikrotik.com/wiki/MAC_access

However, the device must be running a telnet daemon that's going to accept a MAC connection request.

kenneth lee

Posted 2013-05-20T08:47:27.410

Reputation: 1