Add another IP address to a Bonding Interface

20,217

What you want is called an Interface Alias.

Based on the files you mention, I think you're on Fedora, Red Hat or similar.

Their Interface Configuration Files Reference Guide suggest you want a new file called /etc/sysconfig/network-scripts/ifcfg-bond0:0 containing

DEVICE=bond0:0
IPADDR=XX.XX.XX.YY

I assume you also need the other entries, e.g.

BOOTPROTO=static
ONBOOT=yes
NETMASK=255.255.255.0
GATEWAY=XX.XX.XX.XXX
Share:
20,217

Related videos on Youtube

WAEL
Author by

WAEL

Updated on September 18, 2022

Comments

  • WAEL
    WAEL over 1 year

    I have a Linux network Bonding interface for two Ethernet interfaces (eth0 and eth1)

    $ cat /etc/sysconfig/network-scripts/ifcfg-bond0   
    DEVICE=bond0  
    BOOTPROTO=static  
    ONBOOT=yes  
    IPADDR=XX.XX.XX.XX  
    NETMASK=255.255.255.0  
    GATEWAY=XX.XX.XX.XXX  
    

    How i can add another IPADDR to this bonding Interface ?

  • WAEL
    WAEL almost 12 years
    Thank Mikel for your help i am using Ret Hat shall i add only these two lines you mentioned in the new file ???
  • Mikel
    Mikel almost 12 years
    I'm guessing you also want to specify NETMASK and GATEWAY. And the docs say DHCP is not supported, so you may need BOOTPROTO too.
  • WAEL
    WAEL almost 12 years
    Do i need to restart anything after creating this file ?
  • Mikel
    Mikel almost 12 years
    I'd try ifup bond0:0 first. If that doesn't work, try /etc/init.d/network restart.
  • Mikel
    Mikel almost 12 years
    Welcome! Please try it and let us know if it works.
  • WAEL
    WAEL almost 12 years
    Thanks Mikel its working great, that is exactly what i want thanks for your help