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