14th Thu
IPを固定にする
This article was migrated from http://rails.office.drecom.jp/hibi/archive/27
家のネットワークでは、DHCPを利用していたのですが、Windows->DebianにアクセスするのにIPアドレスが毎回変わるため、
windowsのhostsを変更したりととても面倒。
瀧内さんに相談したところ、固定できますよという話!
DebianはNATを使用。
下記のファイルを編集。
#/etc/network/interfaces
--------------------------------------------------
# The primary network interface
auto eth0
#iface eth0 inet dhcp
iface eth0 inet static
address 192.168.1.20
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255 #ここは255を使うのが定石
gateway 192.168.1.1
#/etc/init.d/networking restart
で設定更新!
いや〜楽チンです。
これで一つバッドノウハウが減った。
瀧内さん、感謝です♪ http://rails.office.drecom.jp/hibi/archive/27
This article was migrated from http://rails.office.drecom.jp/hibi/archive/27
posted by
satoko on Thu 14 Sep 2006 at 11:26 with 0 comments