Linux notes 3-2. Advanced network Configuration

Source: Internet
Author: User

2. Advanced network Configuration ***********
Goal:
Configure Network bridging
configuring The Bond network interface
configuring the Team network interface


# #1. Configuring 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

Real-machine configuration

Vim/etc/sysconfig/network-scripts/ifcfg-westos

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/8B/B4/wKioL1hWlcaxSn9XAAA0Gzt3DNU409.png "title=" Picture 1.png "alt=" Wkiol1hwlcaxsn9xaaa0gzt3dnu409.png "/>

Vim/etc/sysconfig/network-scripts/ifcfg-br0

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/8B/B8/wKiom1hWldWyWi8IAAAj4yXLCQc436.png "title=" Picture 2.png "alt=" Wkiom1hwldwywi8iaaaj4yxlcqc436.png "/>

just turn it off . NetworkManager service, and then restart the network

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/8B/B4/wKioL1hWlemCWXCTAACYlzcJ3V4050.png "title=" Picture 3.png "alt=" Wkiol1hwlemcwxctaacylzcj3v4050.png "/>


Virtual machine configuration

Systemctl Stop NetworkManager
Add to
Brctl ADDBR Adding a network bridge

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/8B/B4/wKioL1hWlfuwB7SLAAANJ-yZtYM657.png "title=" Picture 4.png "alt=" Wkiol1hwlfuwb7slaaanj-yztym657.png "/>

Configure the Network bridge IP, subnet mask

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/8B/B4/wKioL1hWlhCS7elfAAASkwqQ_nI309.png "title=" Picture 5.png "alt=" Wkiol1hwlhcs7elfaaaskwqq_ni309.png "/>
Brctl Show display

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M00/8B/B4/wKioL1hWliHwo4JTAAAaQaoVRWY078.png "title=" Picture 6.png "alt=" Wkiol1hwlihwo4jtaaaaqaovrwy078.png "/>

Brctl addif Add a bridge connection

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/8B/B8/wKiom1hWljaDTemJAAAUJOOrfcU751.png "title=" Picture 7.png "alt=" Wkiom1hwljadtemjaaaujoorfcu751.png "/>
Delete
Brctl Delif Delete a bridge connection

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/8B/B4/wKioL1hWlobzJVB_AAANFPWtJg4516.png "title=" Picture 8.png "alt=" Wkiol1hwlobzjvb_aaanfpwtjg4516.png "/>
Brctl DELBR Delete a network bridge

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/8B/B4/wKioL1hWlpbQcH9iAAAMM5bNoUQ710.png "title=" Picture 9.png "alt=" Wkiol1hwlpbqch9iaaamm5bnouq710.png "/>

# #2. Bond Network # # //support only two NICs

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 providing redundancy

binding Mode

Mode 0 (Balanced round)-round-robin strategy, all interfaces use round robin to transmit packets in all Slave; Any slave can receive
Mode 1 (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)-fault tolerance. All packets are broadcast through all slave interfaces

Manage with nmcli

establishing a binding interface Bond0

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/8B/B8/wKiom1hWlqXj2REVAAB1NNw5xbY702.png "title=" Picture 10.png "alt=" Wkiom1hwlqxj2revaab1nnw5xby702.png "/>

Establish Slave interface eth0 and eth1

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/8B/B4/wKioL1hWluCCqDxRAADK4ULLga4494.png "title=" Picture 11.png "alt=" Wkiol1hwluccqdxraadk4ullga4494.png "/>

View Bonding status

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M00/8B/B8/wKiom1hWlu2zRIndAAC6gLVmQxg309.png "title=" Picture 12.png "alt=" Wkiom1hwlu2zrindaac6glvmqxg309.png "/>

# #3. Team Network # #

Team and bond functions are similar
Team does not need to manually load the appropriate kernel modules
Team is more scalable and supports 8 NICs

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

Manage Team with NMCLI

establishing a binding interface TEAM0

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M01/8B/B8/wKiom1hWlvqxMxOMAABqvNpS1dQ934.png "title=" Picture 13.png "alt=" Wkiom1hwlvqxmxomaabqvnps1dq934.png "/>

Establish Slave interface eth0 and eth1

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M01/8B/B4/wKioL1hWlwWg4iZ3AAC-urQfDhk237.png "title=" Picture 14.png "alt=" Wkiol1hwlwwg4iz3aac-urqfdhk237.png "/>

View Team status Teamctl team0 stat

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/8B/B4/wKioL1hWly-Ti2TGAABKYwGnJgs844.png "title=" Picture 15.png "alt=" Wkiol1hwly-ti2tgaabkywgnjgs844.png "/>


Linux notes 3-2. Advanced network Configuration

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.