Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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 ?

share|improve this question
add comment

1 Answer

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|improve this answer
    
Thank Mikel for your help i am using Ret Hat shall i add only these two lines you mentioned in the new file ??? –  bob Jul 25 '12 at 14:27
    
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. –  Mikel Jul 25 '12 at 14:29
    
Do i need to restart anything after creating this file ? –  bob Jul 25 '12 at 14:30
    
I'd try ifup bond0:0 first. If that doesn't work, try /etc/init.d/network restart. –  Mikel Jul 25 '12 at 14:32
    
thanks for your help and support –  bob Jul 25 '12 at 14:34
show 2 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.