Linux网卡上添加多个IP

1、查看现有网卡
ip addr show
看到ens_xxx

2、进入网卡配置项
cd /etc/sysconfig/network-scripts/
vim ifcfg-ens192
末尾添加2行:
IPADDR1=192.168.6.10
NETMASK1=255.255.255.0

重启网卡使之生效
service network restart

3、验证
其他机器上
ping 192.168.6.10
查看路由表
route -n

posted @ 2019-09-06 13:07  安迪9468  阅读(1775)  评论(0)    收藏  举报