Proxmox and Quagga and OSPF

A few quick notes on getting Proxmox running with Quagga routers so they can serve up OSPF routes. I did this with Proxmox 3.1-3 and Quagga 0.99.22.4-1+wheezy1.

  1. apt-get update
  2. apt-get install quagga
  3.  vi /etc/quagga/daemons
    • turn on zebra and ospfd
  4. cp /usr/share/doc/quagga/examples/vtysh.conf.sample /etc/quagga/vtysh.conf
  5. cp /usr/share/doc/quagga/examples/ospfd.conf.sample /etc/quagga/ospfd.conf
  6. cp /usr/share/doc/quagga/examples/zebra.conf.sample /etc/quagga/zebra.conf
  7. modify above conf files if you want (can leave default)
  8. turn off annoying splash screens in vtysh
    • vi /etc/bash.bashrc
    • export VTYSH_PAGER=more
  9. vtysh
  10. configure terminal
  11. router ospf
  12. set the ospf id name. Usually set to this machine’s IP (replace <MACHINE_IP> below)
    • router-id <MACHINE_IP>
    • eg router-id 192.168.1.1
  13. specify networks to route and for what ospf area
    • network <IP>/<CIDR> area <AREA>
    • eg. network 192.168.1.0/24 area 1
  14. end
  15. copy running-config startup-config
  16. now start watching show ip route for the routes to show up from other ospf routers with an O in the front.
    • can also look at show ip ospf neighbor to see your ospf neighbors.

Fish shell and Putty

If you run into some weird characters while using Fish shell from Putty, try changing Putty’s remote character set to UTF-8:

Right Click Putty -> Change Settings -> Window -> Translation -> Remote Character Set -> UTF-8.

Before and after:

And if your Home and End keys don’t work, try putting this into your config.fish file .

 

 

dnsmasq DNS server and multiple subnets

If you run into a problem where your dnsmasq DNS server is not responding to dns queries from separate subnets than the DNS server’s subnet, try setting the listen-address to the DNS server’s IP (e.g. where you’re running dnsmasq).

On the Ubiquiti EdgeRouter Lite (which is based on mips Debian wheezy) the file to change is:

(make it if it doesn’t exist)

add this to that file:

Where <DNS-SERVER-IP> is the IP of your machine that’s running dnsmasq.

If you’re running dnsmasq from the command line, without using the conf files, add this parameter

EdgeRouter Lite Performance Tests

Starting with two laptops connected to one ERL each. ERLs both running 1.5.0.

Laptop A <-> ERL <-> ERL <-> Laptop B
192.168.20.100 <-> 192.168.20.1 192.168.1.2 <-> 192.168.1.1 192.168.10.1 <-> 192.168.10.10020141010_22362

 

I’m using OSPF to expose these two networks to each other for this test. See EdgeRouter Lite Simple OSPF Guide

iperf results from one laptop to the other:

 Near wire. Great!

 Next we’ll remove the OSPF routing and setup an IPSec tunnel between the two an retest.

I used the GUI’s IPSec site-to-site feature to set this up. Here’s what it generated:

And the results with IPSec hardware offload disabled.

And with IPSec hardware offload enabled.

Not bad!

However, even with IPSec enabled, load average increases a good bit when pushing max data through the IPSec VPN

Compared to without pushing data

While this didn’t seem to affect the usage of the router, it is a little worrying. I don’t have any firewalls or other services enabled on the router. What happens when we take this into the real world? It’s worth noting that this is a dual core router, so really that’s only 1/4 of total processing power.

EdgeRouter Lite Simple OSPF Guide

Here’s a really simple OSPF setup on two Ubiquiti Edge Router Lites.

Two ERLs hooked together via eth0.

ERL20 <-> ERL10
192.168.20.1 192.168.1.2 <-> 192.168.1.1 192.168.10.1

20141010_22362

on ERL20 get into configure and run the following:

on ERL10 get into configure and run the following.

run ‘commit’ on both them, (‘save’ if you want to) and ‘exit’ to prompt.

Now watch ospf work it’s magic.

Now you should have routes

 

Swann HD-820CAM

I picked up a Swann HD-820CAM (NHD-820)

SWANN SWNHD-820CAM-US 1080p HD Network Security Camera for Swann’s 1080p NVRs

Manufacturer Link: http://www.swann.com/us/swnhd-820cam

You don’t need a Swann receiver to use it.

Plug it into a switch that supports PoE. I’m using this one and can confirm it will run the IP Camera:

TP-LINK TL-SF1008P 10/100Mbps 8-Port PoE Switch, 4 POE ports, IEEE 802.3af, 53W

Set your computer to an IP in 192.0.0.0/24 (i.e. 192.168.0.200) and go to 192.0.0.64 in your browser. That’s the default IP of the camera.
Username is admin
Password is 12345

You can change it’s IP in the web management to whatever you want.

To stream via VLC use RTSP:

Media->Open Network Stream
type in one of the following:

Main (1st) Stream (720p or 1080p)
rtsp://YOUR_CAMERA_IP/Streaming/channels/1

Sub (2nd) Stream (240p or 480p)
rtsp://YOUR_CAMERA_IP/Streaming/channels/2

I can also confirm that Wowza Streaming Engine will read in the RTSP streams above and properly converts them to RTMP (which is what Flash requires).

Here’s all the screens in the web management:

Dell Vostro 3560: Removing Base Cover

Removing the Base Cover on the Dell Vostro 3560 is quite tricky.

Here’s what the manual says to do:

Screenshot_100513_104405_PM.jpg

 

Seems easy enough. In actuality it’s much harder. The cover won’t slide. You have to work your way around the edges with a small screw driver. Be very careful since the base cover is plastic.

Your goal is to get each one of these plastic lips out.

20130920_200109

 

There are 13 of them as seen below.

20130920_200026

Another view of these annoying little bastards.

20130920_200037

 

Here’s what the 3560 looks like with the base cover removed.

20130920_200240

 

Good luck!

 

Autosave untitled/new Notepad++ files

I often type random notes into a Notepad++ new file (AKA untitled). Sometimes these are important notes that I don’t want to loose. Most of the time I remember to save these somewhere, or at least I remember when closing Notepad++. But on one occasion I forgot the save it, and then accidentally clicked ‘No’ when it asked me if I wanted to save the file. Arg. Important notes lost…

But I found the answer. The plugin called Autosave will save these new (AKA untitled) files every X minutes, or when Notepad++ looses focus, or both.

You can get Autosave here:

http://sourceforge.net/apps/mediawiki/notepad-plus/index.php?title=Plugin_Central#A

or here:

https://sites.google.com/site/fstellari/nppplugins

Then figure out if you’re using the Unicode or ASCII version of Notepad++ by navigating to the menu bar in Notepad++, clicking the “?” and then going to “About Notepad++”. Most likely you’ll be running the Unicode version. In that case you’ll use the AutoSaveU.dll.

After you know your Notepad++ flavor, grab the respective dll and place it in your plugins folder under the Notepad++ folder. For me this is:
C:\Program Files (x86)\Notepad++\plugins

Then restart Notepad++ and modify the options by going to the Notepad++ menu bar and navigating to Plugins->AutoSave->Options.

I like my AutoSave configured to the following:autosave

Bash: Run command after another

What many of you probably know is that you can chain commands together with the semicolon. Like so:

So here we’re running a unixbench, and then directly after, we’re appending “unixbench finished” to unixbench.log.

But what you might not know about is the ‘&&’ replacement for ‘;’. This will only do the next command if the first command returns 0, meaning clean finish.

And taking it a step further, there’s ‘||’ which does the opposite of ‘&&’. If the first command fails, then the next command happens.