YanoRyuichi.com/
Wiki
Blog
GitHub
Sandbox
開始行:
* 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
*** ネットワーク設定変更の反映 [#z8af422f]
''RHEL/CentOS''
systemctl reload NetworkManager
''RHEL6/CentOS6''
service network restart
*** 設定確認 [#k548e810]
''RHEL/CentOS''
ip link show
ip address show
''RHEL6/CentOS6''
ifconfig
*** 参考 [#kcf9cb46]
https://access.redhat.com/documentation/ja-jp/red_hat_ent...
** 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 o...
# and how to activate them. For more information, see in...
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
allow-hotplug eth0
iface eth0 inet dhcp
詳しくはman 5 interfacesを参照する。
*** IPエイリアス debian [#k0f2fdd4]
- /etc/network/interfacesを書き換える。
- eth0(192.168.0.2)にeth0:0(192.168.0.3)を追加する場合、...
auto eth0
iface eth0 inet static
address 192.168.0.2
netmask 255.255.255.0
gateway 192.168.0.1
auto eth0:0
iface eth0:0 inet static
address 192.168.0.3
netmask 255.255.255.0
gateway 192.168.0.1
終了行:
* 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
*** ネットワーク設定変更の反映 [#z8af422f]
''RHEL/CentOS''
systemctl reload NetworkManager
''RHEL6/CentOS6''
service network restart
*** 設定確認 [#k548e810]
''RHEL/CentOS''
ip link show
ip address show
''RHEL6/CentOS6''
ifconfig
*** 参考 [#kcf9cb46]
https://access.redhat.com/documentation/ja-jp/red_hat_ent...
** 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 o...
# and how to activate them. For more information, see in...
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
allow-hotplug eth0
iface eth0 inet dhcp
詳しくはman 5 interfacesを参照する。
*** IPエイリアス debian [#k0f2fdd4]
- /etc/network/interfacesを書き換える。
- eth0(192.168.0.2)にeth0:0(192.168.0.3)を追加する場合、...
auto eth0
iface eth0 inet static
address 192.168.0.2
netmask 255.255.255.0
gateway 192.168.0.1
auto eth0:0
iface eth0:0 inet static
address 192.168.0.3
netmask 255.255.255.0
gateway 192.168.0.1
ページ名: