PDA

View Full Version : SLES 11 SP3 virtual interface on bond0



lbemont
02-Feb-2016, 17:24
I would like to add a virtual interface to an existing bonded interface. Can I accomplish by modifying the configuration file as shown below? If not, how do I do it? Also, is there a way to ifup this virtual interface independent of bond0 itself?

Thanks.

# more /etc/sysconfig/network/ifcfg-bond0
BONDING_MASTER='yes'
BONDING_MODULE_OPTS='mode=active-backup miimon=100'
BONDING_SLAVE0='eth0'
BONDING_SLAVE1='eth2'
BOOTPROTO='static'
BROADCAST=''
ETHTOOL_OPTIONS=''
IPADDR='192.168.1.7/24'
MTU=''
NAME=''
NETWORK=''
REMOTE_IPADDR=''
STARTMODE='auto'
USERCONTROL='no'
# new virtual interface
IPADDR_V1=192.168.1.8′
NETMASK_V1=255.255.255.0′
BROADCAST_V1=192.168.1.255′

jmozdzen
04-Feb-2016, 12:47
Hi lbemont,

by adding another address to the ifcfg file you're not adding a virtual interface, but a secondary IP address to the interface.

From /etc/sysconfig/network/ifcfg.template:


# For multiple addresses use this variable multiple times and extend them with
# different suffixes. For example IPADDR_1=, IPADDR_2=. See section 'Multiple
# addresses' in manpage ifcfg).

So your syntax of using the suffix "_V1" should work. On the other hand, individual "up/down" of that IP address will not work.

To see the configure secondary IP address, use "ip addr list bond0".

Regards,
Jens