All posts by Omega-00

Scriplet: Grabbing PPPoE IP Address

A quick scriptlet I whipped up for a friend tonight to allow them to retrieve an IP addess from a specific PPPoE interface.
Handy for updating DynDNS entries among other things.

:local wanip [/ip address get [/ip address find where interface=pppoe-wan] address];
:set wanip [:pick $wanip 0 ([:len $wanip]-3) ];
#whatever you want to do with said IP goes here
:put $wanip;

Obviously update pppoe-wan with your interface name 😉

Subnetting and Serial over SSH

Subnetting:

 

Given my general lazyness in all things requiring pen and pencil; I like many others am prone to using a subnet calculator in day to day network building. That and when you think about it.. which is more likely to be correct, a computer with static algorithms or a coffee-fueled network administrator adding things up in his head? 😛

That spiel over; I discovered the following program by a company called ‘BitCricket’ whilst searching for an IPv6 compatible subnet calculator I could use offline.

http://www.bitcricket.com/ip-subnet-calculator.html – Both a Mac and Windows version are available and I’ve also been able to confirm the Windows version will run under wine for those of you using linux (one would assume your Linux computers already have Wine installed to run Winbox right? :-D)

It nicely grabs a list of all the IP (v4 and v6) addresses on the local machine and adds them to a drop down box so you can quickly check your own subnets, or just clear the address box and type in your required range.

While at this time it doesn’t actually “Subnet” IPv6 ranges for you, it does have the handy function of telling you what standard each address on a machine belongs to (or any address you type in) and we all know that /64 should be the smallest range you’re allocating to anything anyway?

I realise I’m doing a lot of this “telling you how to run your network” stuff today, but I’m a big fan of the standards defined for IPv6 and they make everyones job easier if you stick to them!

Serial over SSH:

 

I mentioned to some of the MUM participants the other day that there was an easy way to use the serial port on a Mikrotik to gain remote access to a device, logging in via an ssh user on the MikroTik. It seemed very few people were aware of this option so I figured I’d put a basic tutorial together on how to get it working.

Edit: There’s actually a rather complete explanation on the wiki – http://wiki.mikrotik.com/wiki/Manual:Special_Login

Edit 2: Another one (more in depth info in the manual) – http://wiki.mikrotik.com/wiki/Serial_Port_Usage#Accessing_a_serial_device_directly_by_SSH_.2F_telnet_.2F_mac-telnet

Serial

MUM Australia – April 2011

So I’m sitting in a hotel in Brisbane after having had a fun filled week of all things MikroTik.

Highlights:

  • I’m now a fully qualified MTCNA.
  • Meeting Normis, Janis and Arnis.
  • Seeing the new RB751N (pics later on).

 

All in all the meeting was great and I’m sure we’ll see presentations (my favourites were the MPLS and IPv6 presentations) appear on http://www.tiktube.com/ soon!

Many of the planned IPv6 features were also mentioned so I’m hanging out and keeping my ear open for any updates there, specifically in the hotspot and DHCPv6 (prefix delegation) areas.

Now, those aforementioned pictures:

Size comparison photo.. for comparing sizes..
RB751 + USB + High Power 2.4ghz 802.11n Dual-chain MIMO.
MikroTik's answer to the Ubiquiti bullet.. of course this is a fully functioning router thou 😀
RB751UP = RB751 + USB port + PoE for MikroTik devices.

Huge thanks to DuxTel for organising the event and hope to see everyone back there again next year or the year after! 🙂

Improved Netwatch-style script.

There have been a number of improved netwatch scripts listed on the mikrotik wiki in the past however many of these are hard to understand, broken or both.

I had a request from an associate to assist them finding a solution to fall over VPN traffic from one link to another in the event of an outage; in a network configuration where it wasn’t possible to use the local upstream router as an indication of the VPNs status, so I took the opportunity to revise a netwatch script based loosely on the one located here: http://wiki.mikrotik.com/wiki/Improved_Netwatch_II

My rewrite of this allows both the “up” and “down” scripts to be called from the same place (preferably a scheduler entry) and to be extra nice I’ve commented the whole script so you’re all welcome to modify as you see fit.

Continue reading Improved Netwatch-style script.