Configuration of OVH IP Failover on VMs

Background
I have had a server with OVH for the past several years, and one of the things that took me many months of research, as well as trial and error, to get right was my IP address configuration for virtual machines.  The documentation available from OVH has been consistently lacking these past few years on how to properly configure it.

Debian \ Ubuntu systems will add to the complications, because they do not agree with the necessary configuration.  If you try to add it traditionally, just by editing /etc/network/interfaces, you will most likely end up with no default gateway when you’re all said and done, and your connection still won’t work.

For the first few months I was with OVH, I was launching my networking through a shell script in a cron job, because configuring it with /etc/network/interfaces just didn’t seem possible.

 

What You Need For This Guide \ Assumptions About Your Setup
1. A dedicated server on the OVH network.  This guide has been tested in the Roubaix datacenter  and the Gravelines datacenter, but OVH uses the same schema in Montreal as far as I know.
2. A virtualization platform installed, and a virtual switch bridged with your network interface.  I have been using VMWare, and a vSwitch bridged with my eth0 interface.  This guide should be applicable to any virtualization suite (Xen, OpenVZ, etc) as long as your networking is bridged.
3. A Debian \ Ubuntu VM.  You can apply the knowledge gained from this guide to other operating systems (eg. CentOS) but the configuration will be different as the files are located in different places and are parsed differently.
4. A purchased IP range.  You can purchase IP addresses from OVH in your Manager Panel.

 

Gather Your Information \ Initial Setup On OVH Side
1. Your dedicated server’s Main IP will be needed for this guide.   Say, for example, your main IP is 123.4.5.67.
2. Your dedicated server’s Gateway IP will be needed for this guide.  On the OVH network, this is the first three octets of your main IP, ending in 254.  For 123.4.5.67, the gateway is 123.4.5.254.
3. A Fail Over IP Range registered with OVH.  You can register any size IP block, and you can pick any IP from the block.  Say for example, you bought 5.6.77.8/29.  All of the Fail Over IPs are usable at OVH, so you have available all 8 IPs from 5.6.77.8 to 5.6.77.15 for use for your VMs.  You can purchase an IP block from your Manager Panel.
4. A Registered VM MAC Address associated on OVH’s routers.  Without this step, your connection will not work.  You can register VM MACs in your Manager Panel.

 

How To Register A VM MAC Address
In the new OVH Manager panel, you can register a VM MAC address by going to the “Manage IPs” page, clicking the gear icon next to the IP(s) you want to assign to the VM, and clicking “Add A Virtual MAC”.  You can choose an existing MAC address if you are assigning more than 1 IP, otherwise OVH will assign a new MAC address to you, and you will edit your VM preferences so your network interface has this MAC address.  Make sure you select the MAC address type “VMWare” if you are using a VMWare server, as this will generate MAC addresses which VMWare will accept.  You can use type “OVH” for any other virtualization platform.  The “name of virtual machine” field is just for your notes, and can be anything.

 

Operating System Installation
Install Debian \ Ubuntu to the VM, from a full install media.  Do not plan on doing a network install, as this guide does not cover how to make the OVH networking functional during installation; only after installation.  Skip the step for setting up networking during the installer, leave it unconfigured.

 

Setting Up /etc/network/interfaces
Now that you have your operating system installed, you are ready to configure your /etc/network/interfaces file.  This guide assumes that eth0 is your Internet interface. I will use IP addresses from the example above under “Gather Your Information”.  Do not use these addresses, substitute your own IP addresses.

A few things to note, for anyone asking any technical questions about what I just did above:

  • You should choose 1 IP address from your IP block.  If you want to add more, see the further instructions below.  This IP is the Main IP of your VM.
  • Regardless of the size of your block, you will treat the IP address as a /32 with a netmask 255.255.255.255.
  • Because you are using a /32, the network\broadcast IP is your IP.
  • Your default gateway should be the same as your dedicated server’s default gateway.  DO NOT try to use what should logically be the gateway IP for your IP block, and DO NOT try to set your dedicated server itself as the gateway.  The IP block is irrelevant, the gateway is always the dedicated server’s gateway IP.
  • The routes have to be added this way, because the configuration is not valid.  The gateway should not be reachable from this network range, because it’s a /32.  However, the gateway will be reachable anyway, and adding the routes this way should work.

 

DNS Resolution
You will also need to edit your /etc/resolv.conf to put a DNS name server in there, otherwise your server will be able to ping other IPs, but it will not be able to resolve DNS.  You can just put a line in there, like this line which uses the public OpenDNS resolver:

 

Want To Add More IPs?
Sometimes it is desirable to have more than one IP address on your server.  You can easily add additional IPs from any IP block as an alias IP.  You don’t need to configure any additional gateways, because the gateway is always your dedicated server gateway.  You can purchase as many IP blocks as you want, and assign them all this way, it doesn’t matter if they are totally different IP ranges.  In the example below, I will add 2 additional IPs from the IP range I used as an example, 5.6.77.8/29.

 

Having Problems?
If you are having any problems, please review these items:

  • First, reboot the VM to ensure that all of the networking changes you made are fully applied.
  • Can you ping your default gateway?  If not, did your route persist?  Run “route -n” and see if the route is there.  If it isn’t there, try adding it manually by running the commands in the post-up in /etc/network/interfaces.  See if you get any errors.
  • Did you configure DNS?  Try pinging just an IP address, (eg. ping 4.2.2.1) and see if you get any response.
  • Did you remember to register a MAC address, and did you change the MAC address for the VM?  Run “ifconfig eth0” and make sure the MAC address shown matches what’s registered in your OVH Manager Panel.

 

Need Further Assistance?
As always, feel free to leave a comment below if you need any assistance.  I will be happy to help!

Lenovo ThinkPad W520 – Workaround For Linux Freezing Issue At Boot

Background
I have been a proud Lenovo ThinkPad W520 owner for the past several years, but there has been a persistent issue I have experienced, as I have gone the route of dual booting Windows and Linux on my laptop.

Through the years, I have run Ubuntu 10.04, Xubuntu 12.04, Linux Mint 13, Linux Mint 14, and Linux Mint Debian Edition on this laptop.  Of these distributions, Ubuntu 10.04 is the only one I haven’t had an issue with.

The issue I have experienced is that after a fresh install of Linux, the laptop will freeze every other boot.  Sometimes, it freezes before reaching the login screen, sometimes before even reaching the boot splash screen, and sometimes just moments after logging in.  Other times, it would boot and function normally for hours.  It has been a very flaky issue.

In 2012, I posted a thread on the Ubuntu Forums on how I fixed the issue for 12.04.  I have applied this fix, necessarily, on Linux Mint several times since then as I have done new installs.  I wanted to create this post so others can find this information, and understand that it may apply to other future distributions down the line until this issue gets fixed upstream.

 

The Workaround
I have consistently resolved this issue by adding a boot flag to GRUB.

Edit /etc/default/grub, and add “nox2apic” to your boot parameters, like so:

After making this change, run update-grub and reboot the computer.

This has saved me so much frustration over the years, I hope it helps you as well!  If you run into a similar issue on another ThinkPad model, please let me know in the comments if this fix worked for you!

Teamviewer with UAC and Administrative Rights

Ran into an issue with a user where I needed to remotely access their computer.  They needed software installed ASAP and of course did not have admin access to the computer.  I had them go to www.teamviewer.com and install the light client which does not require administrative access.  

When going to install the application UAC came up but I could not see, click, or type when UAC was active.  With some quick googleing I was able to find that you can run the client with administrative credentials upon connecting to the client.   PROPS Teamviewer.

See the steps below.

1.

Fire up Teamviewer

 
2.

Ask for the ID number for the user, connect to that ID.

This will be a 9 digit number

 
3.

Local admin already?

If the user is not local admin already (if they are you will be able to interact with UAC), you will be prompted with this screen

 
804c7c24e3a1b7e2e4847b0a91dffee4a5db438c781e5308d18e7c4f45710207_1_big
4.

Click on ‘Click for additional information’

You will be prompted with the next window

 
97f3e68d0457d8c69d46f92ac4678355ce5193e874433fbaf6ef8e842fdb076c_2_big
5.

Authenticate as the local admin account

This basically allows you to restart the clients Teamviewer session with the local administrator account

A46209bd88214ff72860b0e697fa629dcb2a3b90fc1bf8053810e90d20a42ef8_3_big
6.

Connect & interact with UAC on a standard account!

Once you enter correct credentials, the status in the bottom left will tell you that it is restarting, and then you will join the end user’s session, as always

 
9be1c32a98eb178c326cc6756b624230e8ac4afa9ec9f90217bb41d656bc06c1_4_big

Tested and working

Running Land Elevation Surveys With Google Earth

Background Information

Living in a rural area, I am often tasked with finding ways to connect remote sites to the Internet in places where cable and DSL are not available.  In these situations, the best alternative is usually the local wireless Internet service provider (WISP).

Many of these providers utilize point-to-point (PTP) and point-to-multipoint (PTMP) wireless connections running on non-licensed frequencies (900MHz, 2.4GHz, 5GHz, and others) to provide service to these types of hard to reach locations.

These connections work best with a line of sight (LOS) between your location and your ISP tower site.

From the ISP standpoint, determining whether an installation is viable usually comes down to visiting the site and trying to establish a connection, but running a few elevation surveys can help determine whether land barriers may have  a strong probability of obstructing the signal.

ISPs purchase expensive software tools to conduct these surveys, but a lot of it can be done with a reasonable amount of accuracy in Google Earth!

This tutorial will describe the basic steps needed to generate an elevation survey in Google’s free Google Earth desktop software.

 

1. Download and Install Google Earth.
At the time of this writing, Google Earth can be obtained here.

2. Locate Your Sites
Find the desired install site and the potential tower sites on Google Earth.  You can search by address, GPS coordinates (latitude & longitude), or by simply scrolling around the view.

3. Go to the “Add” menu, and click “Path”.
This will open the path editor, and turn your mouse into a tool to create path points.

GoogleEarth-Add-Path

 

4. Locate your first site, and click once to create a path point.
This will appear on your screen as a blue dot.

GoogleEarth-Path-Dot1

 

5. Locate your second site, and repeat the procedure, clicking on the site to make a path point.
This will appear on your screen as a second blue dot, and will create a white line which is your path.

GoogleEarth-Path-Dot2

 

6. Name the path.
Call it something other than “Untitled Path” to describe what the path is.  (eg. Tower Site A to Customer Site B).

GoogleEarth-NamePath

 

7. Right click the path, and click “Show Elevation Profile”.
This will open the elevation profile view.

GoogleEarth-Show-Elevation-Profile

 

GoogleEarth-Showing-Elevation-Profile

 

8. Expand on this, if you like.

You can create as many paths as you choose, name them accordingly, and even organize them into folders.  You can save Google Earth project files, which can be sent to customers, others at your organization, or anyone who suits your needs.

Keep in mind that the elevation profile is ground level elevation, so you will need to add heights of towers and buildings at either side to make the profile useful.

Also keep in mind that the elevation profile doesn’t know about trees and buildings in the area, so these will need to be factored in as well when determining the viability of a wireless signal.

All in all, this is a guideline and the results are not guaranteed to be useful every time, but can be a helpful tool for the WISP arsenal!

Running Wolfenstein Enemy Territory At Native 1920×1080 Resolution (on Windows)

A lot of people I play Enemy Territory with have been contemplating switching to a version of the program called ET Legacy, and their reasoning is generally related to screen resolutions.

Wolfenstein Enemy Territory is a very old game, and the designers never conceived that it would ever be played on a 1920×1080 screen resolution, so it was never coded to have that option in the Video Settings.

That being said, you can make a few modifications to your launcher shortcut, and run Enemy Territory at true native 1920×1080 resolution.

Note: The only glitch I’ve encountered with this so far, is that when you’re changing video settings in the game, the game will not revert back to 1920×1080 without a game restart after a settings change (such as texture quality, dynamic lighting, etc changes).  So, go set your quality levels for textures and everything prior to modifying your shortcut, then you should avoid encountering any of those issues.

Linux\Mac: You can use similar command switches on Linux or Mac to achieve this goal, but the process of editing the shortcut\launcher may vary.

Right click your Enemy Territory shortcut, and hit Properties.

et-icon

 

You’ll want to add these options to your shortcut:
(com_hunkmegs is not related to the video settings, but a few extra hunkmegs will help your game performance.)

You can do so by adding them after the trailing quotation mark surrounding your program name, as show in the following screenshot:

et-settings

My full shortcut application path is as follows, since it’s not entirely visible above.  (The “Target” box above).

And there you have it!  Next time you launch Enemy Territory, you should be presented with a full screen 1920×1080 gaming experience.  Enjoy!