I want to setup an IP address alias on a network card. I created a file
/etc/sysconfig/network/ifcfg-ens160 and its contents are:
BOOTPROTO='static' STARTMODE='onboot' IPADDR='192.168.0.113' NETMASK='255.255.255.0' BROADCAST='' ETHTOOL_OPTIONS='' MTU='' NAME='' NETWORK='' REMOTE_IPADDR='' IPADDR_0='192.168.0.194' NETMASK_0='255.255.255.0' LABEL_0='0'
Restarted network using
systemctl restart network.service. Still when I do
ifconfig -a I do not get IP address from alias (IPADDR_0) only it shows IP address mentioned in
When I do individual interface restart:
ifdown ens160:0 ifdown: no matching interfaces ifup ens160 wicked: No valid configuration files found at /etc/wicked/ifconfig ifup: no matching interfaces
But I notice that pings to both IP address works. It just that it does not showup in the list when I give ifconfig -a.
I suspect that I have to create a config file in /etc/wicked/ifconfig to get this listed in ifconfig -a. Is there any way to detect if IP alias is set other than