• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

CentOS / RHEL : How to configure alias (virtual interface) of bond interface (bondx:y)

by admin

Configuring alias of a bonding interfaces is no different that configuring it for the normal interfaces like ethX. here is a short note on configuring alias of bonding interface. For the example setup, we have the bonding interface as bond0 as shown below :

# ip address show bond0
14: bond0: [BROADCAST,MULTICAST,MASTER,UP,LOWER_UP] mtu 1500 qdisc noqueue state UP qlen 1000
    link/ether 00:11:0a:6a:55:48 brd ff:ff:ff:ff:ff:ff
    inet 10.129.122.21/24 brd 10.129.122.0 scope global bond0
       valid_lft forever preferred_lft forever
    inet6 fe80::211:aff:fe6a:5548/64 scope link
       valid_lft forever preferred_lft forever

We will be configuring bond0:1 alias of the bonding interface.

Creating alias of bond interface bond0

1. Create a file named ifcfg-bond0:1 in /etc/sysconfig/network-scripts directory.

# touch /etc/sysconfig/network-scripts/ifcfg-bond0:1

2. Add below parameters into the configuration file of bonding alias – /etc/sysconfig/network-scripts/ifcfg-bond0:1.

# vi /etc/sysconfig/network-scripts/ifcfg-bond0:1
DEVICE=bond0:1
BOOTPROTO=none
IPADDR=10.129.122.22
NETMASK=255.255.255.0
USERCTL=no
TYPE=Ethernet
ONPARENT=yes

Change the parameter values IPADDR, NETMASK etc as per requirement.

Note : The BONDING_OPTS parameter is not needed in this file as the alias is not actually a bond interface, but merely a virtual interface of the underlying bond. Also note that instead of ONBOOT=yes, ONPARENT=yes parameter is added as this is a alias interface.

3. Once all this configuration is done , restart the network service:

# service network restart

If you have other networks running and do not want to disrupt their service, you can try bringing up the particular virtual interfaces configured on bond only.

# ifup bond0:1

Verify

Once you have restarted the network services or brought up the virtual interface manually, you can verify the configuration using below commands.

# ip address show
# ip link

Filed Under: Linux

Some more articles you might also be interested in …

  1. partprobe Command Examples in Linux
  2. /dev/shm permission change after node reboot
  3. assimp: Command-line client for the Open Asset Import Library
  4. dnsmap Command Examples in Linux
  5. Getting info with the vsish command (esxi only)
  6. git archive: Create an archive of files from a named tree
  7. local Command Examples
  8. CentOS / RHEL LVM : Backing Up Volume Group Metadata
  9. How to Check whether SELinux is Enabled or Disabled
  10. “git mailinfo” Command Examples

You May Also Like

Primary Sidebar

Recent Posts

  • Vanilla OS 2 Released: A New Era for Linux Enthusiasts
  • mk Command Examples
  • mixxx Command Examples
  • mix Command Examples

© 2025 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright