Ubuntu bonding + VLAN

Source: Internet
Author: User

System version: Ubuntu 14.04 (4.4.0)

Create bonding

1. The system automatically loads the bonding module

cat /etc/timefileTime "#" is ignored.bonding

2. Installing the Ifenslave Plugin

Install Ifenslave

3. Configure the NIC

cat /etc/network//etc/network/interfaces.d/*# the loopback network Interfaceauto Loiface Lo inet loopbackup ifenslave bond0 enp0s3 enp0s8down ifenslave-d bond0 enp0s3 enp0s8auto bond0iface bond0 inet dh CP  #此处配置需要正常启动, otherwise the module 4 device fails Bond-mode 4bond-miimon 100bond-slaves enp0s3 enp0s8

Creating VLANs

1. The system automatically loads the 8021q module

cat /etc/timefileTime "#" is ignored.bonding8021q

2. Configure the NIC

cat /etc/network//etc/network/interfaces.d/*# the loopback network Interfaceauto Loiface Lo inet loopbackup ifenslave bond0 enp0s3 enp0s8down ifenslave-d bond0 enp0s3 enp0s8auto bond0iface bond0 inet dh Cpbond-mode 4bond-miimon 100bond-slaves enp0s3 enp0s8auto vlan41iface vlan41 inet staticaddress 192.168.10.10netmask 255.255.255.0network 192.168.10.0broadcast 192.168.10.255vlan-raw-device bond0

Note: 1. The bonding module supports a bond by default, if you need to create 2 bond, configure/etc/modprobe.d/bonding.conf * (Options bonding max_bonds=2)

2. If the NIC needs to boot and does not require IP, use manual (Dhcp/static/manual)

Script Small Note:

[Email protected]:/home/ubuntu#Cat/etc/network/interfaces# Thisfiledescribes the network interfaces available on your system# and how to activate them. for Moreinformation, see Interfaces (5). SOURCE/etc/network/interfaces.d/*# The loopback network Interfaceauto loiface lo inet loopbackup (ifenslave bond0 enp0s3;       Ifenslave bond1 enp0s8) down (ifenslave-d bond0 enp0s3;  ifenslave-d bond1 enp0s8) Auto bond0iface bond0 inet dhcpbond-mode 4bond-miimon 100bond-slaves enp0s3auto bond1iface bond1 inet staticbond-mode 0bond-miimon 100address 192.168.230.100netmask 255.255.255.0network 192.168.230.0broadcast 192.168.230.255auto vlan41iface vlan41 inet staticaddress 192.168.10.10netmask 255.255.255.0network 192.168.10.0broadcast 192.168.10.255vlan-raw-device Bond1

Ubuntu bonding + VLAN

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.