豚吐露@wiki
ネットワークの設定を変更する
最終更新:
Bot(ページ名リンク)
-
view
ネットワークの設定を変更する
~環境~
Ubuntu10.04LTS Server
Ubuntu10.04LTS Server
■現在のネットワーク環境の確認
$ ifconfig
■ルーティングテーブルの確認
$ netstat -nr
カーネルIP経路テーブル 受信先サイト ゲートウェイ ネットマスク フラグ MSS Window irtt インタフェース 192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth0 |
■静的IPの設定
$ sudo vi /etc/[[network]]/interfaces
デフォルトはDHCP設定
auto eth0 iface eth0 inet dhcp |
静的IP設定するときはこんな感じ
auto eth0 iface eth0 inet static address 192.168.1.10 netmask 255.255.255.0 network 192.168.1.0 broadcast 192.168.1.255 gateway 192.168.1.1 |
■ネットワークサービスの操作
再起動
再起動
$ sudo /etc/init.d/networking restart
停止
$ sudo /etc/init.d/networking stop
開始
$ sudo /etc/init.d/networking start
更新日: 2011年08月18日 (木) 02時00分15秒