Monday, July 24, 2006

etc.

This is a Latin phrase meaning "and the rest, and so forth".
Unfortunately, many people do not know how to pronounce it, and normally "E... T... C...".

This is the way...

et cetera


Saturday, July 22, 2006

How to Change IP Address from Static to DHCP and vice versa in Command Prompt

You can use the netsh command to script the process of changing a computer from a static Internet Protocol (IP) address to Dynamic Host Configuration Protocol (DHCP) or vice versa. The netsh command accomplishes this task without the need to restart the computer. This feature is particularly useful for laptops that move from one environment to another, when it is necessary to use statically assigned IP addresses at one location and DHCP assigned IP addresses at another.


To switch the specified adapter from a static address to DHCP, type the following command:

netsh interface ip set address "Local Area Connection" dhcp

NOTE: Typing this command changes the interface named "Local Area Connection" to DHCP.

To display all of the adapters in the computer with their current IP addresses to determine the correct adapter name, type the following command:

netsh interface ip show config

To change to a static address, type the following command:

netsh interface ip set address "Local Area Connection" static ipaddr subnetmask gateway metric

NOTE: Replace ipaddr with the static IP address, subnetmask with the subnet mask, gateway with the default gateway and, if necessary, metric with the appropriate metric. The following example changes the interface "Local Area Connection" to a static address of 192.168.0.10 with a subnet mask of 255.255.255.0, and the interface has a default gateway of 192.168.0.1 with a metric of 1:

netsh interface ip set address "Local Area Connection" static 192.168.0.10 255.255.255.0 192.168.0.1 1


You can create a batch file to simplify your changing:

To use static IP Address:

@ECHO OFF
CLS
ECHO.
ECHO CLI IP Configuration
ECHO ====================
ECHO.
ECHO IP Address:
FOR /F "TOKENS=*" %%? IN ('LABEL C: 2^>NUL') DO SET IP=%%?
ECHO.
ECHO Subnet Mask:
FOR /F "TOKENS=*" %%? IN ('LABEL C: 2^>NUL') DO SET MASK=%%?
ECHO.
ECHO Default Gateway:
FOR /F "TOKENS=*" %%? IN ('LABEL C: 2^>NUL') DO SET GW=%%?
ECHO.
ECHO Configuring IP Address...
@netsh interface ip set address name="eth0" static %IP% %MASK% %GW% 1
ECHO.
ECHO DNS: (if you do not have DNS, just type 127.0.0.1)
FOR /F "TOKENS=*" %%? IN ('LABEL C: 2^>NUL') DO SET DNS=%%?
ECHO.
ECHO Configuring DNS...
@netsh interface ip set dns "eth0" static %DNS% primary
@pause
@ipconfig /all

To use DHCP:

@netsh interface ip set address name="eth0" dhcp
@netsh interface ip set dns name="eth0" source=dhcp

Saturday, July 15, 2006

天使般清香的花蕊


I don’t know how to start this… but it has been bringing a new level of friendship between us.

Last Monday morning, July 3, her name came into my mind out-of-sudden, and I decided to contact her and hoping the number is still valid. I sent her a message, and she replied with a surprise that how I knew her Chinese name. Actually, her name stated in my report, when I was attended a break-fix call for her Dell laptop. I don’t know whether she will think this is an evil action that I kept her name in full. Anyway, a true friendship will not count on this, I believe.

I haven’t seen her since that, it’s probably 3 years. She is a very quiet and innocent girl. She got a very strong sense of Christianity. The very last time I met her, thinking of taking her out for lunch, and unfortunately she was on fasting. Ever since that, I’ve been transferred back to KL, and too busy to visit JB again. It’s quite sad.

I’m hoping for a reunion. It will be a great and wonderful feeling to see someone for the first time in years and have so much to share not to mention all the memories that resurface. It's such a wonderful thing you can imagine!