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
Related videos on Youtube
Author by
WAEL
Updated on September 18, 2022Comments
-
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 almost 12 yearsThank Mikel for your help i am using Ret Hat shall i add only these two lines you mentioned in the new file ???
-
Mikel almost 12 yearsI'm guessing you also want to specify
NETMASK
andGATEWAY
. And the docs say DHCP is not supported, so you may needBOOTPROTO
too. -
WAEL almost 12 yearsDo i need to restart anything after creating this file ?
-
Mikel almost 12 yearsI'd try
ifup bond0:0
first. If that doesn't work, try/etc/init.d/network restart
. -
Mikel almost 12 yearsWelcome! Please try it and let us know if it works.
-
WAEL almost 12 yearsThanks Mikel its working great, that is exactly what i want thanks for your help