Centos7 vswitch Configuration

Source: Internet
Author: User

Centos7 vswitch Configuration

Vswitch Configuration

Inux VLAN configuration (vconfig)

Install vlan (vconfig) and load the 8021q Module

[Root @ test0001 ~] # Yum install vconfig

[Root @ test0001 ~] # Modprobe 8021q

[Root @ test0001 ~] # Lsmod | grep-I 8021q

Use the linux vconfig command to configure a vlan

[Root @ test0001 ~] # Vconfig add eth0 10

Added VLAN with VID = 10 to IF-: eth0 :-

[Root @ test0001 ~] # Vconfig add eth0 20

Added VLAN with VID = 20 to IF-: eth0 :-

Create two bridges

Brctl addbr br10

Brctl addbr br20

Ifconfig br10 up

Ifconfig br20 up

Link bridge and VLAN

Brctl addif br10 eth0.10

Brctl addif br10 eth0.20

Use virt-manager to create four virtual machines

After starting the virtual machine, add the Logical Network Ports vnet0, vnet1, vnet2, and vnet4 produced by the virtual machine to different VLANs.

Brctl addif br10 vnet0, vnet1

Brctl addif br20 vnet2, vnet3

Configure ip addresses for each of the four virtual machines


There are two hosts under the two network segments br10 and br20 respectively.
The vnet0 and vnet1ip addresses under br10 are 192.168.10.30 and 192.168.10.99, respectively.
The vnet2 and vnet3ip addresses under br20 are 192.168.10.40 and 192.168.10.101.
Vnet0 and vnet1 can ping each other

Vnet2 and vnet3 can ping each other

Vnet0 and vnet2 cannot ping each other

Vnet1 and vnet3 cannot ping each other

On another Vm with kvm, you just need to modify the ip address.

Then the two physical machines connect to the interface of the real switch.

The vswitch configuration is as follows:

1. Install the driver first

D: \ D bits \ Company \ Huawei S5700S-28P-LI-AC \ driver \ Huawei S5700 Series Switch Switch-MiniUSB-driver.002 Console software \ TI_WDF_USBUART_SINGLE_DRIVER_V6.7.2.0_WHQL. If the installation is successful, you can see a TUSB3410 Device (COM3) under the Port (COM and LPT) in the windows Device Manager)

2. Start HyperTerminal (nok)

D: \ Software \ Windows \ xpzhongduan \ Super Terminal (OK)

File-New Connection

The parameter settings are as follows:

Serial Port: COM3

Baud Rate: 9600

Data bit: 8 bits

Check bit: None

Stop bit: 1 bit

Traffic control: None

Transmit Delay (char): 0

Transmit Delay (line): 0

3. Press enter and enter the password cisco123

4. Configure vswitch ports

Configuration Port 3

System-view

Int g0/0/3

Port link-type trunk

Port trunk allow-pass vlan all

Configuration Port 4

System-view

Int g0/0/4

Port link-type trunk

Port trunk allow-pass vlan all

5. create as many VLANs as possible. Here we create vlan10 and vlan20.

[Quidway] vlan 10
[Quidway-Vlan10] quit

[Quidway] vlan 20
[Quidway-Vlan20] quit

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.