Posted on 25 August 2010. Tags: colocation, data center operations, Disaster Recovery, homemade monitoring systems, mikrotik, power utility monitoring
Is it possible to monitor utility power at a POP (point of presence) without forking over the standard $200 for a monitoring device?
With a little ingenuity and some macgyvering…you can use Mikrotik to put a monitoring system together for less than $15. Here’s what I came up with…
Supplies:
DPDT 12V Relay – I used two SPDTs
Cat5 Patch Cable
12V Transformer
Plastic enclosure – I used an old tape box

1. Cut your cable in half and then strip off a couple of inches of the jacket.

2. Strip a little of the jacket from the remaining wires.

3. Wire the green/white to the common leg of relay # 1 or the first common if you are using a DPDT and the orange/white to the normally open (NO) leg. Then wire the green to the second common leg (DPDT) or to the common of the second relay and the orange to the NO leg.
4. Tie in your 12V transformer to the positive and negative polls on your relay(s). Throw everything into your plastic container, and you are just about done.
At your POP, plug the router into the UPS, and then plug the 12V adapter into the main power outside of the UPS. Next, plug the ethernet cable into an available port on the MTK.
When power is live on the 12V transformer, the relay is actuated and the cable we wired up is now looped up. With the loopback active, the port on your router comes up and the script running at the bottom of the page sends a message to you indicating that power is restored. When the power goes down, the UPS will keep the router up, but the relay will fail and thus the loopback will fail. The router’s script will see the change in port status and send you an email saying the port is down.
Schedule the above script to run every 15 seconds or so. If done correctly, you should be able to scrape all of this together for less than $15. If you spend $15 putting this together and it saves you a truck roll in the middle of the night, then it was well worth it!

Happy hacking my friends. Read more about Mikrotik at my personal blog.
Posted in Data Center & Colocation
Posted on 17 August 2010. Tags: colocation efficiencies, concurrently maintainable, data center operations, hardware redundancy, mikrotik, routing protocal
I hear plenty of data center buzz words…and what good colocation sales guy doesn’t work one into every other sentence? One of those phrases you hear is “concurrently maintainable.” This means you can sustain loss in your infrastructure and still be up. We are talking about hardware redundancy.
If you aren’t using BGP (a protocol backing the core routing decisions on the Internet), you would do well to use VRRP (a redundancy protocol designed to increase the availability of the default gateway servicing hosts on the same subnet).
You have two routers connected to the same layer 2 segment. You have a subnet configured that is /29 or larger. You configure a physical IP on the interfaces, then you create a VRRP interface on each router associated with those connected interfaces. You then assign the same VRRP IP address on both routers to the VRRP interface.
The VRRP router that has the higher priority(default is 100) is the master. The master responds to ARP requests for the VRRP IP. If the master router fails, then the backup router takes over and owns the VRRP IP.
Your default gateway points towards the VRRP IP so that if the master fails and the backup takes over, your default route is still valid! There is also a concept of premption. By default, preemption will migrate the VRRP IP over to the router with the highest priority.




So here’s our demo configuration:

So what happens when one of our providers fail?

Provider fails on one link. The backup guy takes over the VRRP IP. Our default route points to 10.0.0.1 so we still route out!

We drop half of our network gear, but have no fear. The ISP was pointing towards 10.0.0.6 to route to me, so all is good in the hood.
Router 10.0.0.4
Create the VRRP interface *assign it higher priority – default is 100*:



This is great for the WAN side, but is quite often used for the LAN also. You can also run two separate VRRP groups on a single interface which will allow you to load balance with redundancy.
Go forth and route my peoples!
(Learn more about Mikrotik at my blog)
Posted in Data Center & Colocation