Monday, April 04, 2005

Adding Routes

Is it me, or does it feels like adding new static routes has been a moving target for too long ..
Every *nix flavor I worked on had a different scheme. In fact, even Linux changed the tune a couple of times..
It used to be that you added your routes in /etc/static-routes but (while may still work on some system) this is not the latest.

You add static routes per interface now.
Adding the route dynamically is easy, just type : route add <destination> gw <gateway>
But .. how do you make it persistent ? (i.e. linger after you boot)..

Well, you need to create a file in /etc/sysconfig/network-scripts.
The file name is: route-<interface> e.g. /etc/sysconfig/network-scripts/route-eth0

In this file add lines for your static routes. You can use "#" for comments.
# my local routes via

that should do the trick ..
If you want to test your settings, you can run: ifup-routes eth0


So, when I installed my machine I had my one netoworked laser printer (HP 4050TN), and Mandrake did a great job helping me to install it through the print manager. Worked without a hitch.
However, I recently got an inkjet, HP DeskJet 6540xi. After a quick look around I found out that I don't have the the right driver. However, HP is doing a damn good job to make sure the community is creating driver support for many printer, and is a great resource to learn how to configure your printers, as well as find the right drivers.

Mandrake comes with hpisj (which is the recommended driver for my deskjet). It is included in the printer-filters-10.1-0.2mdk rpm
(btw, you can find that out by typing : $ rpm -q --whatprovides /usr/bin/hpijs)
The included version is 1.6.1, which is almost the latest...
All that I had to do was to download the PPD file from, and using the Mandrake Control Center, go to Hardware->printing and add my new printer (first add the PPD and then pick it from the list).
After that, I just added a new queue, and started printing pictures!

One nice little tip, cups has a great little GUI to manage printers, jobs, etc. You can access it via: http://localhost:631

I have to admit, this was a lot easier than I thought!

print away.. :)