嗨,Linux 新手,请原谅任何错误。
我已经配置了网络命名空间本地路由表并在命名空间内启动了 eth3 接口:
# ip netns exec local-routeTable ifconfig
eth3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 9000
inet 10.2.32.1 netmask 255.255.240.0 broadcast 10.2.47.255
inet6 fe80::b3ff:fe12:84d7 prefixlen 64 scopeid 0x20<link>
ether 02:00:b3:12:84:d7 txqueuelen 1000 (Ethernet)
RX packets 503 bytes 64792 (63.2 KiB)
RX errors 0 dropped 283 overruns 0 frame 0
TX packets 152 bytes 30010 (29.3 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
到目前为止一切都很好,但现在我想在我的 root/default 命名空间中启动一个子接口 eth3.1:
# cat /etc/sysconfig/network-scripts/ifcfg-eth3.1
DEVICE=eth3.1
BOOTPROTO=none
IPADDR=10.2.16.1
ONBOOT=yes
VLAN=yes
NETMASK=255.255.240.0
但始终如一地解决这个问题:
[root@wdc-10-206-223-62 tmp]# ifup eth3.1
WARN : [ifup] You are using 'ifup' script provided by 'network-scripts', which are now deprecated.
WARN : [ifup] 'network-scripts' will be removed in one of the next major releases of RHEL.
WARN : [ifup] It is advised to switch to 'NetworkManager' instead - it provides 'ifup/ifdown' scripts as well.
Error: Connection activation failed: Failed to find a compatible device for this connection
即使我尝试在 eth3 接口所在的命名空间内启动子接口,它仍然会失败并出现同样的问题:
[root@wdc-10-206-223-62 tmp]# ip netns exec local-routeTable ifup eth3.1
WARN : [ifup] You are using 'ifup' script provided by 'network-scripts', which are now deprecated.
WARN : [ifup] 'network-scripts' will be removed in one of the next major releases of RHEL.
WARN : [ifup] It is advised to switch to 'NetworkManager' instead - it provides 'ifup/ifdown' scripts as well.
Error: Connection activation failed: Failed to find a compatible device for this connection
我对命名空间不熟悉,任何解决此问题以及深入研究命名空间的指针都将受到赞赏。