Friday, December 30, 2005

Easy way to switch network-configuration

Category: Linux RedHat9 Tips

Suppose You should regularly switch your computer network-configuration :

configuration A:
IP: 192.168.1.251, Mask: 255.255.255.0, Gateway: 192.168.1.1
configuration B:
IP: 192.168.1.252, Mask: 255.255.255.0, Gateway: 192.168.1.2

Sure you can do this:
- System-Setting -> Network
- Enter the desired IP, netmask, gateway, etc
- Save and close Network-Configuration-menu
- System-Setting -> Server-Setting -> Services: restart network


Do those sequence everytime you want to switch the config. Painfull?

There is other way to do those task. The fact is (for single ethernet card) the network-configuration is stored in file:

···etc/sysconfig/network-scripts/ifcfg-eth0

The idea is by saving ifcfg-eth0 then restore it when we should.

Saving configuration file:
- System-Setting -> Network
- Enter configuration A
- Save and close Network-Configuration menu
- Copy ifcfg-eth0 to other filename and other location e.g. /etc/mynetconfig:
···$ cp etc/sysconfig/network-scripts/ifcfg-eth0 /etc/mynetconfig/ifcfg-eth0-A

- Do similar sequence for configuration B.
···$ cp etc/sysconfig/network-scripts/ifcfg-eth0 /etc/mynetconfig/ifcfg-eth0-B

Restoring:
When you want to activate configuration A:
···$ cp /etc/mynetconfig/ifcfg-eth0-A etc/sysconfig/network-scripts/ifcfg-eth0
···$ /etc/init.d/network restart

You can make a batch script for those squence of commands. Remember, user should has root-access to run the script, but regular user can also run the script if they have been given permission. How ? We will discuss it latter.

Repligo Pocket PC PDF viewer

I have been using Acrobat reader and Words to read ebook on my Ipaq 1940. I Found Acrobat reader has

flawn in reflowing document. Unproper tagging pdf file can not be reflowed. It is readable, but you should press 'left' 'right' button to read every single line!

I found information about document viewer called Repligo from Cerience.
The application use 510KB. The price is $29.95 USD.
Anybody has comment about this Repligo?

Thursday, December 29, 2005

Late at night..

This blog is about things that interest me:
Daily activity, electronics, programming, linux, hobby, art, fun, anything..
I hope my notes can be usefull for others.
Any comments from you is very much appreciated.

Thanks
p.s. My mom does not speak english