Ubuntuの固定IP設定

自宅サーバをUbuntu Serverにしたので設定しているわけなのだけど
NIC周りはディストリビューションごとに癖があるのでUbuntuの設定をメモ

$ vim sudo:/etc/network/interfaces

192.168.0.0のネットワークで192.168.0.100のIPを設定するとき

--- interfaces.org	2011-11-19 20:35:28.737059747 +0900
+++ interfaces	2011-11-19 20:28:48.776065219 +0900
@@ -7,6 +7,11 @@
 
 # The primary network interface
 auto eth0
-iface eth0 inet dhcp
+iface eth0 inet static
+    address 192.168.0.100
+    netmask 255.255.255.0
+    network 192.168.0.0
+    broadcast 192.168.0.255
+    gateway 192.168.0.1
 # This is an autoconfigured IPv6 interface
 iface eth0 inet6 auto