Advanced network configuration--bond/team/bridging network

Source: Internet
Author: User

A. Learn to configure Bond network interfaces

Red Hat Enterprise Linux allows administrators to bind multiple network interfaces to one channel using the bonding kernel module and a special network interface called the channel binding interface. Depending on the binding mode chosen, channel binding makes two or more network interfaces as a network interface, increasing bandwidth and/or providing redundancy
1. Manage bond with the NMCLI command
Nm-connection-editor
Remove all network interfaces
NMCLI Connection Add type Bond con-name BOND0 ifname bond0 mode active-backup IP4 172.25.254.199/24
Ifconfig
Watch-n 1 cat/proc/net/bonding/bond0

NMCLI connection Add type Bond-slave con-name eth0 ifname eth0 Master bond0
NMCLI connection Add type Bond-slave con-name eth1 ifname eth1 Master bond0
Ifconfig eth0 Down
2. Select Linux Ethernet Binding Mode
Mode 0 (Balanced round robin BALANCE-RR)-round robin, all interfaces use a round-robin approach to transmit packets in all Slave; Any slave can receive
Mode 1 (active backup active-backup)-fault tolerance. Only one slave interface can be used at a time, but if the interface fails, the other slave will replace it
Mode 3 (broadcast broadcast)-fault tolerance. All packets are broadcast through all slave interfaces
3. Active Backup Configuration Example
3-1 establishing the Binding interface bond0 configuration file:
/etc/sysconfig/network-scripts/ifcfg-bond0

–bootproto= "None"
–ipaddr= "10.1.1.250"
–prefix= "24"
–onboot= "Yes"
–bonding_opts= "Mode=1 miimon=50"
3-2 establishing the Slave interface eth0 configuration file:
/etc/sysconfig/network-scripts/ifcfg-eth0
–device= "Eth0" # # # #硬件网卡名
–bootproto= "None"
–onboot= "Yes"
–master= "Bond0"
–slave= "Yes"
3-3 establishing the Slave interface eth1 configuration file:
/etc/sysconfig/network-scripts/ifcfg-eth1
–device= "Eth1"
–bootproto= "None"
–onboot= "Yes"
–master= "Bond0"
–slave= "Yes"
3-4 Configuring the System Load Binding module:
/etc/modprobe.d/bonding.conf
–alias bond0 Bonding
Ifenslave bond0 eth0 eth1

Systemctl Stop NetworkManager
Systemctl Restart Network

View bonding Status
–cat/proc/net/bonding/bond0

two. Learning to configure the team network interface
1.Team Interface
Team and BOND0 functions are similar
Team does not need to manually load the appropriate kernel modules
Team is more scalable.
– 8 Fast NIC Support

Types of 2.Team

Broadcast broadcast fault tolerance
Roundrobin Polling
Activebackup Master Preparation
LoadBalance Load Balancing

3. Set Team with Nmcli
NMCLI connection Add type team con-name TEAM0 ifname team0 config ' {"runner" {"name": "LoadBalance"}} ' Ip4 172.25.254.198/24
NMCLI connection Add con-name eth0 ifname eth0 type Team-slave Master TEAM0
NMCLI connection Add con-name eth1 ifname eth1 type Team-slave Master TEAM0

4. Monitor the TEAM0 and test
TEAMCTL TEAM0 Stat
Ifconfig eth0 Down
Ifconfig eth0 up
Ifconfig eth1 Down
Ifconfig eth1 up

three. Learning to configure network bridging
1. Network Bridging
The Network Bridge uses the network Bridge realizes the shared Internet host and the client computer in addition to use the software, but also can use the system to bring the network Bridge to establish the connection uses the dual network card the machine to make the host

2. Configuration of network bridging
Vim/etc/sysconfig/network-scripts/ifcfg-eth0
Device=eth0 # # #设备名, may be different
Onboot=yes
Bootproto=none
BRIDGE=BR0 # # #重点, it must be explained
Vim/etc/sysconfig/network-scripts/ifcfg-br0
Device=eth0
Onboot=yes
Bootproto=none
Type=bridge # # #重点, it must be explained
ipaddr=172.25.254.198

3. Management commands for network bridging
Brctl
# # # Bridge Management commands
–show # # # Display
–ADDBR # # # Add a bridge
–DELBR # # # Delete a network bridge
–ADDIF # # # Add a bridge connection
–delif # # # Delete a bridge connection

uninstalling the Bridging interface Process
Brctl Show
Brctl Delif br0 eth0
Brctl Show
Brctl DELBR Br0
Ifconfig br0 Down
Brctl Show

This article from the "Technology life, Simple not simple" blog, please be sure to keep this source http://willis.blog.51cto.com/11907152/1847036

Advanced network configuration--bond/team/bridging network

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.