我的ifcfg-enp2s0文件:
TYPE="Ethernet"
BOOTPROTO="none"
DEFROUTE="yes"
IPV4_FAILURE_FATAL="no"
IPV6INIT="yes"
IPV6_AUTOCONF="yes"
IPV6_DEFROUTE="yes"
IPV6_FAILURE_FATAL="no"
NAME="enp2s0"
UUID="5307f18a-9028-4b93-9588-de820329169d"
DEVICE="enp2s0"
ONBOOT="yes"
PEERDNS="yes"
PEERROUTES="yes"
IPV6_PEERDNS="yes"
IPV6_PEERROUTES="yes"
IPV6_PRIVACY="no"
IPADDR0="192.168.2.37"
IPADDR1="192.168.2.212"
IPADDR2="192.168.161.212"
PREFIX0=24
PREFIX2=16
重启网络后,使用ip addr:
1: lo: mtu 65536 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp2s0: mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 94:de:80:b3:91:32 brd ff:ff:ff:ff:ff:ff
inet 192.168.2.37/24 brd 192.168.2.255 scope global enp2s0
valid_lft forever preferred_lft forever
inet 192.168.161.212/16 brd 192.168.255.255 scope global enp2s0
valid_lft forever preferred_lft forever
inet 192.168.2.212/24 brd 192.168.2.255 scope global secondary enp2s0
valid_lft forever preferred_lft forever
inet6 fe80::96de:80ff:feb3:9132/64 scope link
valid_lft forever preferred_lft forever
可以看到网卡中已经显式3个ip了,但是192.168.161.212这个ip是ping不通的,求教这是为什么?