summaryrefslogtreecommitdiff
path: root/index.html
blob: 24c7d37112ba6473d0b85bd4b5b31f2afdf746dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
<!doctype html>
<html>
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="chrome=1">
    <title>Mac-telnet by haakonnessjoen</title>

    <link rel="stylesheet" href="stylesheets/styles.css">
    <link rel="stylesheet" href="stylesheets/pygment_trac.css">
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <!--[if lt IE 9]>
    <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
  </head>
  <body>
    <div class="wrapper">
      <header>
        <h1>Mac-telnet</h1>
        <p>Open source MAC Telnet client and server for connecting to Microtik RouterOS routers and Linux machines via MAC address.</p>

        <p class="view"><a href="https://github.com/haakonnessjoen/MAC-Telnet">View the Project on GitHub <small>haakonnessjoen/MAC-Telnet</small></a></p>


        <ul>
          <li><a href="https://github.com/haakonnessjoen/MAC-Telnet/zipball/master">Download <strong>ZIP File</strong></a></li>
          <li><a href="https://github.com/haakonnessjoen/MAC-Telnet/tarball/master">Download <strong>TAR Ball</strong></a></li>
          <li><a href="https://github.com/haakonnessjoen/MAC-Telnet">View On <strong>GitHub</strong></a></li>
        </ul>
      </header>
      <section>
        <h1>MAC-Telnet for Linux</h1>

<p>Console tools for connecting to, and serving, devices using MikroTik RouterOS MAC-Telnet protocol.</p>

<h2>Installation</h2>

<p>Then download source tarball, extract, compile and install:</p>

<pre><code>wget http://github.com/haakonnessjoen/MAC-Telnet/tarball/master
tar zxvf haakonness*.tar.gz
cd haakonness*/
make all install
</code></pre>

<p>Now you're ready.</p>

<p>TIP: You can use the well known "expect" tool to automate/script dialogues via mactelnet!</p>

<h2>Usage</h2>

<pre><code># mactelnet -h
Usage: mactelnet &lt;MAC|identity&gt; [-h] [-n] [-t &lt;timeout&gt;] [-u &lt;user&gt;] [-p &lt;password&gt;] [-U &lt;user&gt;] | -l

Parameters:
  MAC            MAC-Address of the RouterOS/mactelnetd device. Use mndp to
                 discover it.
  identity       The identity/name of your destination device. Uses
                 MNDP protocol to find it.
  -l             List/Search for routers nearby. (using MNDP)
  -n             Do not use broadcast packets. Less insecure but requires
                 root privileges.
  -t &lt;timeout&gt;   Amount of seconds to wait for a response on each interface.
  -u &lt;user&gt;      Specify username on command line.
  -p &lt;password&gt;  Specify password on command line.
  -U &lt;user&gt;      Drop privileges to this user. Used in conjunction with -n
                 for security.
  -q             Quiet mode.
  -h             This help.
</code></pre>

<p>Example:</p>

<pre><code>$ mactelnet 0:c:42:43:58:a5 -u admin
Password: 
Connecting to 0:c:42:43:58:a5...done


  MMM      MMM       KKK                          TTTTTTTTTTT      KKK
  MMMM    MMMM       KKK                          TTTTTTTTTTT      KKK
  MMM MMMM MMM  III  KKK  KKK  RRRRRR     OOOOOO      TTT     III  KKK  KKK
  MMM  MM  MMM  III  KKKKK     RRR  RRR  OOO  OOO     TTT     III  KKKKK
  MMM      MMM  III  KKK KKK   RRRRRR    OOO  OOO     TTT     III  KKK KKK
  MMM      MMM  III  KKK  KKK  RRR  RRR   OOOOOO      TTT     III  KKK  KKK

  MikroTik RouterOS 4.0 (c) 1999-2009       http://www.mikrotik.com/


 [admin@HMG] &gt;
</code></pre>

<h2>MAC-Ping usage</h2>

<pre><code># macping -h
Usage: macping &lt;MAC&gt; [-h] [-c &lt;count&gt;] [-s &lt;packet size&gt;]

Parameters:
  MAC       MAC-Address of the RouterOS/mactelnetd device.
  -s        Specify size of ping packet.
  -c        Number of packets to send. (0 = for ever)
  -h        This help.
</code></pre>

<p>Example:</p>

<pre><code># macping 0:c:42:43:58:a5
0:c:42:43:58:a5 56 byte, ping time 1.17 ms
0:c:42:43:58:a5 56 byte, ping time 1.07 ms
0:c:42:43:58:a5 56 byte, ping time 1.20 ms
0:c:42:43:58:a5 56 byte, ping time 0.65 ms
0:c:42:43:58:a5 56 byte, ping time 1.19 ms

5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max = 0.65/1.06/1.20 ms
</code></pre>

<p>Or for use in bash-scripting:</p>

<pre><code># macping 0:c:42:43:58:a5 -c 2 &gt;/dev/null 2&gt;&amp;1 || ( echo "No answer for 2 pings" | mail -s "router down" my.email@address.com )
</code></pre>
      </section>
      <footer>
        <p>This project is maintained by <a href="https://github.com/haakonnessjoen">haakonnessjoen</a></p>
        <p><small>Hosted on GitHub Pages &mdash; Theme by <a href="https://github.com/orderedlist">orderedlist</a></small></p>
      </footer>
    </div>
    <script src="javascripts/scale.fix.js"></script>
    
  </body>
</html>