我在EC2上创建了一个CentOS 7实例,安装了所需的应用程序,为默认网络接口 ( eth0 ) 分配了 1 个弹性 IP,并且所有这些都可以访问。
现在,我创建了另一个网络接口,为其分配了弹性 IP ,然后将ENI附加到实例。现在,无法在eth1(新的附加网络接口)上访问该实例。
我尝试过在 google 上找到的各种方法在/etc/sysconfig/network-scripts中创建ifcfg-eth1但没有运气。
如需帮助,这是ifconfig -a的输出(IP 屏蔽):
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 9001
inet 1XX.3XX.2XX.4XX netmask 255.255.240.0 broadcast 1XX.3XX.2XX.4XX
inet6 fe80::2e:a1ff:fe01:c763 prefixlen 64 scopeid 0x20<link>
ether 02:2e:a1:01:c7:63 txqueuelen 1000 (Ethernet)
RX packets 219 bytes 28188 (27.5 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 284 bytes 31055 (30.3 KiB)
TX errors …
Run Code Online (Sandbox Code Playgroud)