ネットワークインターフェイスを手動で起動する方法
Environment
- Red Hat Enterprise Linux 9
- Red Hat Enterprise Linux 8
- Red Hat Enterprise Linux 7
- Red Hat Enterprise Linux 6
Issue
- ネットワークインターフェイスを手動で起動する方法
Resolution
- たとえば、 eth1 に IP アドレス 192.168.122.100/24 を設定するには、以下を実行します。
# ip link set dev eth1 up
# arping -c 2 -w 3 -D -I eth1 192.168.122.100 | grep "Unicast reply from"
注記: "Unicast reply from 192.168.122.100 [
# ip addr add 192.168.122.100/24 brd 192.168.122.255 dev eth1 label eth1
# arping -q -A -c 1 -w 3 -I eth1 192.168.122.100
# sleep 2
# arping -q -U -c 1 -w 3 -I eth1 192.168.122.100
- ネットワークインターフェイスを停止するには、以下を実行します。
# ip addr flush dev eth1 label eth1 scope global
# ip link set dev eth1 down
- 注記: ifconfig コマンドを使用して IP アドレスを設定する場合は、Why 'ifconfig' command does not update "arp tables" on routers or systems on the subnet? を参照してください。
- 注記: 通常、Red Hat Enterprise Linux 7 では nmcli コマンドを使用してネットワークインターフェイスを設定できます。ただし、nmcli コマンドが使用できない環境でも ip コマンドは機能します。
Root Cause
Diagnostic Steps
詳細は、RHEL7 の /etc/sysconfig/network-scripts/ifup-eth を参照してください。
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments