Skip to content

Instantly share code, notes, and snippets.

@hansode
Created November 14, 2011 05:53
Show Gist options
  • Save hansode/1363345 to your computer and use it in GitHub Desktop.
Save hansode/1363345 to your computer and use it in GitHub Desktop.
bridge & bonding configuration files of rhel on virtualbox
alias bond0 bonding
alias bond1 bonding
alias bond2 bonding
alias bond3 bonding
DEVICE=bond0
ONBOOT=yes
BOOTPROTO=static
BRIDGE=br0
BONDING_OPTS="mode=1 primary=eth0 miimon=100"
TYPE=Ethernet
DEVICE=bond1
ONBOOT=yes
BOOTPROTO=static
BRIDGE=br1
BONDING_OPTS="mode=1 primary=eth1 miimon=100"
TYPE=Ethernet
DEVICE=bond2
ONBOOT=yes
BOOTPROTO=static
BRIDGE=br2
BONDING_OPTS="mode=1 primary=eth2 miimon=100"
TYPE=Ethernet
DEVICE=bond3
ONBOOT=yes
BOOTPROTO=static
BRIDGE=br3
BONDING_OPTS="mode=1 primary=eth3 miimon=100"
TYPE=Ethernet
DEVICE=br0
TYPE=Bridge
ONBOOT=yes
BOOTPROTO=dhcp
DEVICE=br1
TYPE=Bridge
ONBOOT=yes
BOOTPROTO=static
IPADDR=192.168.56.12
NETMASK=255.255.255.0
DEVICE=br2
TYPE=Bridge
ONBOOT=yes
BOOTPROTO=static
IPADDR=192.0.2.1
NETMASK=255.255.255.128
DEVICE=br3
TYPE=Bridge
ONBOOT=yes
BOOTPROTO=static
IPADDR=192.0.2.129
NETMASK=255.255.255.128
DEVICE=eth0
MASTER=bond0
SLAVE=yes
BOOTPROTO=none
USERCTL=no
ONBOOT=yes
DEVICE=eth1
MASTER=bond1
SLAVE=yes
BOOTPROTO=none
USERCTL=no
ONBOOT=yes
DEVICE=eth2
MASTER=bond2
SLAVE=yes
BOOTPROTO=none
USERCTL=no
ONBOOT=yes
DEVICE=eth3
MASTER=bond3
SLAVE=yes
BOOTPROTO=none
USERCTL=no
ONBOOT=yes
all: deploy setup
restart:
/etc/init.d/network restart
setup:
yum install bridge-utils
modprobe bonding
deploy:
install -m 644 bonding.conf /etc/modprobe.d/bonding.conf
install -m 644 ifcfg-br0 /etc/sysconfig/network-scripts/ifcfg-br0
install -m 644 ifcfg-br1 /etc/sysconfig/network-scripts/ifcfg-br1
install -m 644 ifcfg-br2 /etc/sysconfig/network-scripts/ifcfg-br2
install -m 644 ifcfg-br3 /etc/sysconfig/network-scripts/ifcfg-br3
install -m 644 ifcfg-bond0 /etc/sysconfig/network-scripts/ifcfg-bond0
install -m 644 ifcfg-bond1 /etc/sysconfig/network-scripts/ifcfg-bond1
install -m 644 ifcfg-bond2 /etc/sysconfig/network-scripts/ifcfg-bond2
install -m 644 ifcfg-bond3 /etc/sysconfig/network-scripts/ifcfg-bond3
install -m 644 ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth0
install -m 644 ifcfg-eth1 /etc/sysconfig/network-scripts/ifcfg-eth1
install -m 644 ifcfg-eth2 /etc/sysconfig/network-scripts/ifcfg-eth2
install -m 644 ifcfg-eth3 /etc/sysconfig/network-scripts/ifcfg-eth3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment