0

Red Hat 5 Family & Red Hat 6 Family.

I haven't found documentation for anyone who has successfully set up an LACP pair, put two IP addresses on it, and then tagging the primary and Virtual IP address with two different VLAN numbers. Does anyone know of anyone?...

# cat /etc/sysconfig/network-scripts/ifconfig-bond0.123
DEVICE=bond0.123
BOOTPROTO=none
IPADDR=192.168.10.12
NETMASK=255.255.255.0
GATEWAY=192.168.10.1
ONBOOT=yes
USERCTL=no
BONDING_OPTS="mode=802.3ad xmit_hash_policy=layer3+4 lacp_rate=slow miimon=100 updelay=5000 downdelay=5000"
VLAN=yes


# cat /etc/sysconfig/network-scripts/ifconfig-bond0:1.124
DEVICE=bond0:1.124
BOOTPROTO=none
IPADDR=192.168.12.12
NETMASK=255.255.255.0
GATEWAY=192.168.12.1
ONBOOT=yes
USERCTL=no
VLAN=yes
  • Does the VIP config file need a BONDING_OPTS line, or would it ride the bond configuration from the primary interface file?

  • Will Red Hat's 8021q module accept instructions to tag an outgoing packet differently based on its real vs. virtual IP address?

  • Would eth1 and eth2, being set to use bond0 as a master, pay any attention to bond0:1?

    • Thinking of which, do I need to change the MASTER entry? MASTER=bond0.123?
dafydd
  • 1,458
  • 4
  • 17
  • 32

1 Answers1

3

Yes, you can do this, but your configs are a little off.

You don't need bonding information on the VIFs. That's handled a layer below on bond0. In these cases, I normally create an interface (like bond0), and then create my VLAN interfaces on top of that (such as bond0.123 and bond0.124). This works as expected, in that bond0 uses the native VLAN (if there is one) and the VIFs use tagged VLANs.

All that's really needed is that you specify VLAN=yes in the VIF files, as you have done above.

HOWEVER, I don't believe that a VIF will acccept bonding options properly. In fact, I'm almost certain of it in regards to mode 4. Put bonding info on a plain bond interface, then run your VIFs off of that. An example follows:

# cat /etc/sysconfig/network-scripts/ifconfig-eth0
    DEVICE=eth0
    BOOTPROTO=none
    ONBOOT=yes
    MASTER=bond0
    SLAVE=yes

# cat /etc/sysconfig/network-scripts/ifconfig-eth1
    DEVICE=eth1
    BOOTPROTO=none
    ONBOOT=yes
    MASTER=bond0
    SLAVE=yes

#cat /etc/sysconfig/network-scripts/ifconfig-bond0
    DEVICE=bond0
    NAME=bond0
    BONDING_MASTER=yes
    BOOTPROTO=none
    IPADDR=192.168.10.12
    NETMASK=255.255.255.0
    GATEWAY=192.168.10.1
    ONBOOT=yes
    USERCTL=no
     BONDING_OPTS="mode=802.3ad xmit_hash_policy=layer3+4 lacp_rate=slow miimon=100 updelay=500 downdelay=200"


# cat /etc/sysconfig/network-scripts/ifconfig-bond0:1.123
    DEVICE=bond0:1.123
    BOOTPROTO=none
    IPADDR=192.168.12.12
    NETMASK=255.255.255.0
    ONBOOT=yes  
    USERCTL=no
    VLAN=yes

Here we see a bonding master, with a VIF running on top of it. The master may have its own IP (as long as its within the native VLAN - or no IP if there isn't a native VLAN configured on your switch for this bond). VIFs will only operate within the tagged VLAN that their number corresponds to. VIFs do not control bonding in any way.

Khirgiy Mikhail
  • 332
  • 1
  • 5
Spooler
  • 230
  • 1
  • 7
  • The trick turned out to be almost entirely this. The one thing that isn't right is that we don't need to combine the two labelling conventions. Don't use `bond0:1.123`. Just use `bind0.123`, `bond0.124`, etc., with the correctly associated `IPADDR`, `NETMASK`, etc. – dafydd Oct 23 '16 at 01:18