分からないこと
/etc/sysconfig/network-scripts/ifcfg-eth3
で現在eth4となっているnicをeth3に変更したいと思いました。
ip link
で表示されたeth4のmacaddressを上記ファイルのHWADDR=
の部分に書いたのですが、journalctl -u network
には
[/etc/sysconfig/network-scripts/ifup-eth] Device eth3 has different MAC address than expected, ignoring. ``` と出て、eth3が起動できません。 ### 実現したいこと 現在eth4と表示されているデバイスをeth3という名前にしたいです。 ### 各種設定環境 centos7(kvm仮想化) ``` root@myhost ~]# ip link show 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000 link/ether <macアドレス> brd ff:ff:ff:ff:ff:ff 3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000 link/ether fa:16:3e:9c:7b:f2 brd ff:ff:ff:ff:ff:ff 4: eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000 link/ether fa:16:3e:40:a3:1c brd ff:ff:ff:ff:ff:ff 5: eth3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000 link/ether fa:16:3e:55:66:05 brd ff:ff:ff:ff:ff:ff 6: eth4: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000 link/ether fa:16:3e:ac:f8:51 brd ff:ff:ff:ff:ff:ff 7: eth5: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000 link/ether fa:16:3e:bc:2d:e8 brd ff:ff:ff:ff:ff:ff ``` ``` [root@myhost ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth3 # IPV6_DEFAULTGW= HWADDR=fa:16:3e:4f:87:61 NETMASK=255.255.255.0 IPADDR=172.16.3.18 ONBOOT=yes BROADCAST= BOOTPROTO=static DEVICE="eth3" # IPV6ADDR= IPV6INIT=yes NM_CONTROLLED="yes" ``` ``` [root@myhost ~]# journalctl -u network -- Logs begin at 金 2019-07-05 13:48:49 JST, end at 金 2019-07-05 14:04:12 JST. -- 7月 05 13:48:51 myhost.net systemd[1]: Starting LSB: Bring up/down networking... 7月 05 13:48:52 myhost.net network[2298]: Bringing up loopback interface: [ OK ] 7月 05 13:49:00 myhost.net network[2298]: Bringing up interface eth0: INFO : [ipv6_wait_tentative] Waiting for interface eth0 IPv 7月 05 13:49:01 myhost.net network[2298]: INFO : [ipv6_wait_tentative] Waiting for interface eth0 IPv6 address(es) to leave the 't 7月 05 13:49:03 myhost.net network[2298]: [ OK ] 7月 05 13:49:07 myhost.net network[2298]: Bringing up interface eth1: [ OK ] 7月 05 13:49:11 myhost.net network[2298]: Bringing up interface eth2: [ OK ] 7月 05 13:49:11 myhost.net network[2298]: Bringing up interface eth3: ERROR : [/etc/sysconfig/network-scripts/ifup-eth] Device eth 7月 05 13:49:11 myhost.net network[2298]: [FAILED] 7月 05 13:49:11 myhost.net systemd[1]: network.service: control process exited, code=exited status=1 7月 05 13:49:11 myhost.net systemd[1]: Failed to start LSB: Bring up/down networking. 7月 05 13:49:11 myhost.net systemd[1]: Unit network.service entered failed state. 7月 05 13:49:11 myhost.net systemd[1]: network.service failed. ``` ``` root@myhost ~]# journalctl | grep eth1 7月 05 16:18:31 myhost.net systemd-udevd[1455]: Error changing net interface name 'eth1' to 'eth3': File exists 7月 05 16:18:31 myhost.net systemd-udevd[1455]: could not rename interface '3' from 'eth1' to 'eth3': File exists 7月 05 16:18:31 myhost.net systemd-udevd[1461]: Error changing net interface name 'eth3' to 'eth1': File exists 7月 05 16:18:31 myhost.net systemd-udevd[1461]: could not rename interface '5' from 'eth3' to 'eth1': File exists ``` ### 7/5追記 `/usr/lib/udev/rules.d/60-net.rules`での挙動を確かめるため、`/etc/udev/rules.d/60-net.rules`を作成し、下記のようにしました。 `KERNELS=="0000:00:05.0"`は`ethtool`を使ってbusのidを取得しました。 ``` ACTION=="add", SUBSYSTEM=="net", DRIVERS=="?*", ATTR{type}=="1", KERNELS=="0000:00:05.0", NAME="eth1" RUN+="/bin/logger eth1 $attr{address}" ACTION=="add", SUBSYSTEM=="net", DRIVERS=="?*", ATTR{type}=="1", KERNELS=="0000:00:06.0", NAME="eth2" RUN+="/bin/logger eth2 $attr{address}" ACTION=="add", SUBSYSTEM=="net", DRIVERS=="?*", ATTR{type}=="1", KERNELS=="0000:00:04.0", NAME="eth3" RUN+="/bin/logger eth3 $attr{address}" ``` ですが、上記エラーと変わりません。 ``` 7月 05 17:23:11 myhost.net systemd-udevd[1449]: Error changing net interface name 'eth2' to 'eth1': File exists 7月 05 17:23:11 myhost.net systemd-udevd[1449]: could not rename interface '4' from 'eth2' to 'eth1': File exists 7月 05 17:23:11 myhost.net systemd-udevd[1444]: Error changing net interface name 'eth1' to 'eth3': File exists 7月 05 17:23:11 myhost.net systemd-udevd[1444]: could not rename interface '3' from 'eth1' to 'eth3': File exists 7月 05 17:23:11 myhost.net systemd-udevd[1435]: Error changing net interface name 'eth3' to 'eth2': File exists 7月 05 17:23:11 myhost.net systemd-udevd[1435]: could not rename interface '5' from 'eth3' to 'eth2': File exists 7月 05 17:23:11 myhost.net root[2135]: eth2 fa:16:3e:55:66:05 7月 05 17:23:11 myhost.net root[2117]: eth3 fa:16:3e:9c:7b:f2 7月 05 17:23:11 myhost.net root[2115]: eth1 fa:16:3e:40:a3:1c ```
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。