Ubuntu > サーバ管理 > サーバ起動時ネットワーク自動起動

以下設定ファイルを編集する


/etc/network/interfaces

私の環境では、次の2行だけが設定されていた。
auto lo
iface lo inet loopback

これに以下のような行を追加する
auto eth0
iface eth0 inet static
address 192.168.0.100
netmask 255.255.255.0
gateway 192.168.0.1

auto eth0 がサーバー起動時に、eth0を自動的に有効にする
その他は自分の環境に合わせる。

合わせて /etc/resolv.conf も作成しネームサーバを追記する

nameserver 192.168.0.1

ネットワークを再起動する

/etc/inet.d/networking restart





最終更新:2012年06月06日 06:17