魔杰夫-‘思想不成熟的’和狗不得进入

December 20, 2007

Configuring TCP/IP Statically in Linux

Filed under: Poem, Tech — jfree @ 11:00 pm

It has never been too painful for me to setup my IP address and default gateway blah blah blah in my Windows world, however it is not the same case when comes to Linux. Nevertheless, it is relatively easy as well.

Each Linux distro stores their network configuration file in a different location. For instance, Debian keeps the config file that contains the IP information in /etc/network/interfaces. By making changes to the file, we can actually statically changing the TCP/IP information for the workstation. The changes is permanent, that carries the meaning that the changes stay even you reboot your system.

The next method which just give a temporary effect is Command-line Configuration. There are just 2 commands needed in order to make things work:

host:~# ifconfig eth0 {ip add} netmask {subnet mask}
host:~# route add default gw {gateway add}

The first command tells the system to configure Ethernet adapter 0 on your NIC to have {ip add} as the IP address with {subnet mask} as the netmask. The second command configures the gateway of the system. However, it should be noted that the configuration will lose once the device is turned off or reboot.

Lastly, to check whether or not the TCP/IP changes have been made on the NIC, there are 2 commands could be used, depending on your choice:

route

or

netstat -nr

By issuing one of the commands, you can verify whether the changes have take effect with looking at the routing table.

ps: Note that you will need super user privilege in order to perform the configuration. “sudo bash” could be used in some case.

Powered by ScribeFire.

November 6, 2007

《施氏食獅史》

Filed under: Poem — jfree @ 4:01 pm

石室詩士施氏,嗜獅,誓食十獅。施氏時時適市視獅。
十時,適十獅適市。
是時,適施氏適市。
氏視是十獅,恃矢勢,使是十獅逝世。
氏拾是十獅屍, 適石室。
石室濕,氏使侍拭石室。
石室拭,氏始試食是十獅。
食時,始識是十獅,實十石獅屍 。
試釋是事。

注意︰ 只用一個發音來敘述一件事,除了中文,怕是再無其他語言能做到了。

Powered by ScribeFire.

November 1, 2006

《饮酒》

Filed under: Poem — jfree @ 2:14 pm

结庐在人境,而无车马喧。

问君何能尔?心远地自偏。

采菊东篱下,悠然见南山。

山气日夕佳,飞鸟相与还。

此中有真意,欲辨已忘言。

Blog at WordPress.com.