今回はubuntuでネットワーク設定を変更する方法です。
基本的には設定ファイル「/etc/network/interface」を変更して、以下のようにリスタートするだけです。
root@local:~# /etc/init.d/networking restart * Reconfiguring network interfaces... SIOCDELRT: No such process [ OK ]
設定ファイルの中身についてですが、DHCPで自動取得する場合は以下のように記述します。
auto eth0 iface eth0 inet dhcp
例えば、固定IPを設定する場合には以下の通りです。
auto eth0 iface eth0 inet static address 192.168.1.2 netmask 255.255.255.0 network 192.168.1.0 broadcast 192.168.1.255 gateway 192.168.1.1
沓名 亮典 平山 智恵
技術評論社
売り上げランキング: 11797
技術評論社
売り上げランキング: 11797
おすすめ度の平均: 

旧版と新版
Linux使うなら必携の一冊
コメントする