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

The Geek Diary

CONCEPTS | BASICS | HOWTO

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • Linux Services
    • VCS
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
    • Data Guard
  • DevOps
    • Docker
    • Shell Scripting
  • Interview Questions
  • 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. Which network ports are reserved by the Linux Operating System?
  2. What causes iptables to load every time after a reboot even when it’s completely turned off
  3. CentOS / RHEL : How to Disable and Blacklist Linux Kernel Module to prevent it from loading automatically
  4. CentOS / RHEL : anacron basics (What is anacron and how to configure it)
  5. How to use shell expansions for generating shell tokens under Linux
  6. Beginners guide to vi editor (command line reference)
  7. CentOS / RHEL : How to migrate storage (LVM) with pvmove Command
  8. CentOS / RHEL 6 : How do I find my current runlevel?
  9. UNIX / Linux : How to delete root equivalent user (Non-Root User with UID 0)
  10. Linux OS Service ‘NetworkManager’

You May Also Like

Primary Sidebar

Recent Posts

  • What are Command Rules in oracle Database
  • Using Rule Sets in Oracle Database Vault
  • How Realms Work in Oracle Database Vault
  • How to use Privilege Analysis in Oracle Database
  • Archives
  • Contact Us
  • Copyright

© 2021 · The Geek Diary