Differences between revisions 3 and 4
| Deletions are marked like this. | Additions are marked like this. |
| Line 15: | Line 15: |
| {{{ONBOOT=YES}}} |
{{{ ONBOOT=YES }}} |
| Line 17: | Line 19: |
| and make it | and make it |
| Line 19: | Line 21: |
| {{{ONPARENT=YES}}} |
{{{ ONPARENT=YES }}} |
Virtual IP addresses
You can add several virtual IP addresses to a physical network interface. A good starting point is to copy the interface definition file of the device you want to add a virtual IP address to.
cp /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth0:0
You may have to modify ifcfg-eth0 to match your physical interface name.
Now you can edit the new file ifcfg-eth0:0 and specify the network settings of the virtual interface.
If you want the virtual IP address come up on boot, you need to remove
ONBOOT=YES
and make it
ONPARENT=YES
This makes the interface only come up when the parent interface comes up, while ONBOOT=YES would pull up the parent interface even if that is configured to not come up on boot.
To make the changes take effect please restart the network services using:
service network restart
