September 30, 2009

Driver Robot - Automatically Search and Update Your Drivers

I'm a PC technician, and I hate installing drivers on my customer's PC only to found that I don't have them. Sure I have all the DriverPack packages slipstreamed into my universal Windows image, but that's not enough. Every now and then I'd still encounter one or two devices on the system left without a correct driver, mainly they're display, audio, or modem device.

I could imagine this very frustrating to the average users who aren't so fluent with computers, searching the internet for driver updates is often time consuming. It sure easy for us who know where to look, but for them it's really different. It would be really helpful and time-saving to have such a software utility that will automatically scan our system for drivers that need to be installed or updated, and then automatically search and install those updates. In fact when we regularly update our drivers we'll be constantly benefited with features introduced by those new drivers.

This is where Driver Robot comes to rescue. It has the world's largest driver database, and its fast scan is guaranteed to identify the right driver for your system. It's free to try, it will scan your system and when you are satisfied with the scan result you can buy it and get updated. Give it a try.

April 11, 2009

How to configure a Linux router with multiple ISP

Assume you have a PC with Fedora Core 4 installed, acting as a router.

You have a local network and 2 ISPs.

Your local network
Network: 192.168.1.0/24
Router's IP for this network: 192.168.1.254

ISP 1
Network: 10.0.1.0/24
Router's IP for this network: 10.0.1.1
Gateway: 10.0.1.254

ISP 2
Network: 10.0.2.0/24
Router's IP for this network: 10.0.2.1
Gateway: 10.0.2.254

Configuring Interfaces
First, we configure interface eth0 for the local network:
# ifconfig eth0 192.168.1.254/24

Then we configure interface eth1 for ISP 1:
# ifconfig eth1 10.0.1.1/24

Next we configure interface eth2 for ISP 2:
# ifconfig eth2 10.0.2.1/24

That's all for interface configuration, next we'll setup routing.

Configuring Routing Tables
When configuring multiple ISP, we need a separate routing table for each of them.

We'll use the number 101 for the name of ISP 1's routing table.
And 102 for the name of ISP 2's routing table.

ISP 1 Routing Table
Make sure we start with empty table
# ip route flush all table 101

Add loopback network
# ip route add 127.0.0.0/8 dev lo table 101

Add local network
# ip route add 192.168.1.0/24 dev eth0 table 101

Add the network of ISP 1
# ip route add 10.0.1.0/24 dev eth1 table 101

Add default gateway for ISP 1
# ip route add default via 10.0.1.254 dev eth1 table 101

ISP 2 Routing Table
Make sure we start with empty table
# ip route flush all table 102

Add loopback network
# ip route add 127.0.0.0/8 dev lo table 102

Add local network
# ip route add 192.168.1.0/24 dev eth0 table 102

Add the network of ISP 2
# ip route add 10.0.2.0/24 dev eth2 table 102

Add default gateway for ISP 2
# ip route add default via 10.0.2.254 dev eth2 table 102

And we all set for ISPs routing tables.

Fixed or Balanced?
Next, we'll need to decide, how we will be using those ISPs?

Do we need split access, that is some of the computers on our local network will be using ISP 1, and some other use ISP 2?

Or we just want to use both ISP, utilizing it's connection and balance the load of them?

Case A: Split Access
Assume we want some of the computers on our local network to use ISP 1.
Their IP addresses are: 192.168.1.11 through 192.168.1.13

And some other will use ISP 2.
Their IP addresses are: 192.168.1.21 through 192.168.1.23

Thus we need to define ip rules, to classify the packets by source address.

Rules for ISP 1
# ip rule add from 192.168.1.11 table 101
# ip rule add from 192.168.1.12 table 101
# ip rule add from 192.168.1.13 table 101

Rules for ISP 2
# ip rule add from 192.168.1.21 table 102
# ip rule add from 192.168.1.22 table 102
# ip rule add from 192.168.1.23 table 102

That's it for ip rules, we just have one last step to do and all will work as expected, jump to SNAT below.

* Edit *
I forgot that this one also needs default gateway on the main table for packets originating from the router itself, here it is:

# ip route add default via 10.0.1.254

Case B: Load Balance
For this we don't need ip rules, we only need to setup default gateway on the main routing table so packets will be using each ISP in a balanced way.

Remove the existing default gateway
# ip route del default

And add a load balanced gateway
# ip route add default nexthop via 10.0.1.254 weight 1 nexthop via 10.0.2.254 weight 1

The key is to use same values for 'weight' parameter. You could guess what would happen if you put more weight on one gateway than the other.

SNAT
We need to map local ip addresses to public ip address that's been assigned by our ISPs.

So all packets that will be going out through ISP 1 on interface eth1 will be using 10.0.1.1 as their source ip address.

And all packets that will be going out through ISP 2 on interface eth2 will be using 10.0.2.1 as their source ip address.

For ISP 1
# iptables -t nat -A POSTROUTING -o eth1 -j SNAT --to 10.0.1.1

For ISP 2
# iptables -t nat -A POSTROUTING -o eth2 -j SNAT --to 10.0.2.1

And we all set.

April 07, 2009

Remote Desktop Connection Problem

The problem can be identified by frequent disconnection from the terminal server. Your remote desktop client did reconnect automatically when the connection was lost, but still it is very annoying to have to wait for the reconnect screen to disappear before you can continue your interrupted task.

To fix this, open 'Experience' tab in the RDP (Terminal Services Client) settings. The option usually defaults to '56k Modem', which is why you experience frequent disconnection. The pipe was too small for that much water. Change the option to Broadband or LAN to get bigger pipe and enabled bandwidth throttling.

March 31, 2009

How to Upgrade Your Laptop Graphics Card

This guide will show you how to upgrade the graphics card of your laptop, so you can run those killer 3d games you’re long for.

Is Your Laptop Capable?

Before you run to the shop excited to buy a new graphics card for your laptop, read this. You have to first check if your laptop is capable or not, or you'll be the one sitting on the corner of the room curled, wondering why the life is so cruel. So take your time and read your laptop manual, or do a Google search if you can't find the information. You might be crying anyway if your laptop is incapable of graphics card upgrade, but you didn't waste bucks.

From my personal experiences, Dell laptops were easily upgraded. Some people and friends of mine told me it was problematic with other manufacturers. So in my humble opinion, it's a very good idea to invest in a Dell gaming laptop, so you can replace the stock graphics card when it has been beaten up by the game technology.

Here's How You Do It

Don't sweat, it will be simple, it doesn't need a technician to do this.

1. Open Your Mouth to Eat

It shouldn't be any different with your laptop; you just got to help the poor thing. So remove the hinge of your laptop to reveal the secrets beyond, you can find it don't you? Google image search might help in an unfortunate event. It easier on some newer laptops, you just have to remove a panel on the bottom side.

2. Lift the Boulder and Save the Cat

It's no different in our case; we'll save the old cat and replace it with a faster cat before putting down the boulder. Can't you see a perfect analogy here? I can. Lift the keyboard after detaching it, put it somewhere safe. Take out the teeth beneath the lips, remove the screws underneath the hinge cover before you remove the keyboard, or you'll pry it broken. Again, on some newer laptops your life would be easier, a convenient latches on the chassis is all you need to use to remove the keyboard.

3. Don't Look To the Eyes

This will be a bit tricky, you need some patience here. What you have to do is remove the entire screen, examine the display assembly first, and find the screws that tied it on the back and the bottom of your laptop. You'll find cables belong to Wi-Fi and video, carefully remove them as well.

4. Open the Treasure Chest

Beneath the laptop shell lies the golden turtle, remove the shell.

5. Die with Honor

Don't rush taking out the graphics card, give it a moment to sit there for the last time, it once served you well. Now take it out before you changed your mind, and slowly insert the real thing into the old one's place.

6. No Missing Pieces

Remember what have you done and how have you done it. Trace back into your short term memory and put all the assembly back together in reverse steps. Remember, no missing pieces. Enjoy!

From here on it should be all fun now and no tears if you follow my guide carefully. Install the stock driver of the graphics card first that came in with the disc, ride with it into your favorite 3d game world. When everything went well, download and install the latest driver from the manufacturer website, don't forget to uninstall the current one. It should be all laughs and no scream (in a bad way).

Conclusion

You've done it, it simple, really. No big deal. It's not this guide that made you successful, but the power within you; you are the one, the chosen one. Okay, I'll leave all the imagination to you, happy gaming.

March 14, 2009

How to Multi-Wan on Mikrotik RouterOS with Policy Routing part 2

Let's continue from where we left off.

So we got nth working to mark connections, good, but we're not finished with routing mark yet. We only did connection-mark, which will put subsequent packets related to the connections we have marked under the same connection-mark, but it has nothing to do with routing, for that we should add rules to set routing-mark so the connections will go out on different path.
/ip firewall mangle add chain=prerouting connection-state=new
dst-address=!192.168.0.0/16 nth=1,1,0 action=mark-connection
new-connection-mark=CONN1
/ip firewall mangle add chain=prerouting connection-mark=CONN1
action=mark-routing new-routing-mark=LINE1 passthrough=no

/ip firewall mangle add chain=prerouting connection-state=new
dst-address=!192.168.0.0/16 nth=1,1,1 action=mark-connection
new-connection-mark=CONN2

/ip firewall mangle add chain=prerouting connection-mark=CONN2
action=mark-routing new-routing-mark=LINE2 passthrough=no
The newly added rules state that every packets with connection-mark CONN1/CONN2 should be marked with routing mark LINE1/LINE2 and when the rules matched stop traversing the next rule in prerouting chain (passthrough=no).

We're finished with routing-mark step, in the following we should set source address of every packets that will go out to the internet to the correct one so they will get routed by our uplink providers.

2. Source NAT

Assume we're connected to the internet by two ADSL modems, where each have 1024kbits downstream bandwidth, modem A is connected to ISP 1 and its local IP address is 192.168.1.1,
modem B is connected to ISP 2 and its address is 192.168.2.1.

So we can configure our uplink interfaces as:

ether1 IP address: 192.168.1.2

ether2 IP address: 192.168.2.2

To have our connection packets routed correctly we must change their source IP to inteface's IP address depending on which interface they'll go out from, source NAT will do this for us and automatically translate them back when the answer packets are arrived on the router.
/ip firewall nat add chain=srcnat out-interface=ether1 action=src-nat
to-addresses=192.168.1.2

/ip firewall nat add chain=srcnat out-interface=ether2 action=src-nat
to-addresses=192.168.2.2
That's it for source NAT, in the following we'll be configuring the routing table which will be the main reason why our packets get routed to different path each time.

3. Default Routing For Each Routing Mark

Every packet that will go out from the machine will first consult the routing table to know which way it should go to reach its destination address. The default routing handles the packet destined to the internet.
/ip route add gateway=192.168.1.1 routing-mark=LINE1

/ip route add gateway=192.168.2.1 routing-mark=LINE2

/ip route add gateway=192.168.1.1,192.168.2.1
The first and second rules will handle packets having routing-mark LINE1 and LINE2, so a connection marked with LINE1 will go out on modem A and the others marked with LINE2 will go out on modem B, it's because nth that make it possible to flip flop path like this.

The last rule will handle any other packets that neither marked with LINE1 or LINE2, such as packets originating from the router itself, like DNS requests.

From now on we will benefit from the combined bandwidths, when there are 100 connections initiated from our LAN, 50 will go out on ISP 1, and the other 50 go out on ISP 2. When we opened a web page, some connections will download images/data via modem A, and some others will download data/images via modem B. If it's not already obvious to you, a connection that is downloading file using regular browser download will just using either uplink, to use combined bandwidth when downloading single file use download manager like FlashGet, IDM, BitTorrent and the like.

This ended our journey of load balancing with policy routing on Mikrotik RouterOS.