Virtual interfaces in the Virtual NIC mode are activated or deactivated in conjunction with the network service of the operating system in the same manner as normal physical NICs. Therefore, you need to define settings for IP addresses or subnet masks in the interface setting file (/etc/sysconfig/network-scripts/ifcfg-shaX).
Confirmation method
Check that the IP addresses, subnet masks, or prefixes are defined in the interface setting file (/etc/sysconfig/network-scripts/ifcfg-shaX) for the virtual interface.
For RHEL7
# cat /etc/sysconfig/network-scripts/ifcfg-sha0 DEVICE=sha0 IPADDR=192.168.1.1 |
For RHEL8 or later
# cat /etc/sysconfig/network-scripts/ifcfg-sha0 DEVICE=sha0 IPADDR=192.168.1.1 PREFIX=24 BOOTPROTO=none ONBOOT=yes TYPE=Ethernet |