- 追加された行はこの色です。
- 削除された行はこの色です。
* Linuxネットワーク設定 [#d528a39f]
** Redhat/CentOS [#v0f2cd86]
*** /etc/sysconfig/network-scripts/ifcfg-eth0 [#md91f9ce]
スタティック
DEVICE=eth0
BOOTPROTO=static
IPADDR=192.168.0.150
NETMASK=255.255.255.0
ONBOOT=yes
DHCP
DEVICE=eth0
BOOTPROTO=dhcp
ONBOOT=yes
*** /etc/sysconfig/network [#ica723a9]
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=localhost.localdomain
GATEWAY=192.168.0.1
** Ubuntu [#w534a5a4]
*** /etc/network/interfaces [#oeb71d92]
スタティック
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.0.150
netmask 255.255.255.0
gateway 192.168.0.1
network 192.168.0.0
broardcast 192.168.0.255
DHCP
# 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
allow-hotplug eth0
iface eth0 inet dhcp
詳しくはman 5 interfacesを参照する。