Debian 7.0
Sponsored Link

ネットワークの設定2013/05/06

[1] ウィザードに従ってデフォルト設定でインストールすると、DHCPでのIPアドレス付与になっているため、 固定割り当てに変更しておきます。
root@dlp:~#
vi /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
# コメント化

#
iface eth0 inet dhcp
# 以下7行追記化

iface eth0 inet static
address 10.0.0.30
# IPアドレス指定

network 10.0.0.0
# ネットワークアドレス指定

netmask 255.255.255.0
# ネットマスク指定

broadcast 10.0.0.255
# ブロードキャストアドレス指定

gateway 10.0.0.1
# デフォルトゲートウェイ指定

dns-nameservers 10.0.0.10
# ネームサーバー指定
root@dlp:~#
ifdown eth0 && ifup eth0

[2] 必要なければIPv6を無効にしておきます。
root@dlp:~#
echo "net.ipv6.conf.all.disable_ipv6 = 1" >> /etc/sysctl.conf

root@dlp:~#
sysctl -p

net.ipv6.conf.all.disable_ipv6 = 1
root@dlp:~#
eth0      Link encap:Ethernet  HWaddr 00:0c:29:48:32:ff
          inet addr:10.0.0.30  Bcast:10.0.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1395 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1109 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:131131 (128.0 KiB)  TX bytes:148632 (145.1 KiB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:3 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:376 (376.0 B)  TX bytes:376 (376.0 B)
関連コンテンツ