Configuration example: Huawei switch vlan solution description and code

Source: Internet
Author: User

Configuration example: Huawei switch vlan solution description and code, which are frequently encountered in vlan configuration of Huawei switches. how to properly configure the vlan becomes a concern. This article describes the solution: IP address and mask list of the four PCS: describes how to configure the vlan of a Huawei switch.

Database Engineer Senior Project Manager interface design manager ChinaItLab2004-4-1 save this article recommended to friends favorites this page welcome to the Huawei community forum, and 2 million technical staff interaction> enter the use of 4 pcpcs more and less, the principle is the same, so here I only use four PCs), Huawei router R2621), switch S3026e), one each, and build a Huawei switch vlan, implements the connection between the virtual network and the physical network. Implement firewall policies and access control ACLs ).

Solution Description: the IP addresses and masks of the four PCs are listed as follows:
The IP address of the p1194251.1255.255.255.0 gateway is 192.168.1.5.
P2192.168.1.22.16255.255.0 the gateway IP address is 192.168.1.5.
The IP address of the p3192.168.1.32.16255.255.0 gateway is 192.168.1.6.
P4192.168.1.255.5.255.255.0 the gateway IP address is 192.168.1.6.
The IP address of Ethernet0 on the vro is 192.168.1.5.
The IP address of Ethernet1 is 192.168.1.6.
The default value of firewall is deny.

Implementation command list:
Set on the vswitch to divide the vlan of the Huawei switch:
Sys
// Switch to System View
[Quidway] vlanenable
[Quidway] vlan2
[Quidway-vlan2] porte0/1toe0/8
[Quidway-vlan2] quit
// By default, all ports belong to vlan1 of the Huawei switch. Eight ports from e0/1 to e0/8 of the specified switch belong to vlan2 of the Huawei switch.
[Quidway] vlan3
[Quidway-vlan3] porte0/9toe0/16
[Quidway-vlan3] quit
// The e0/9 to e0/16 ports of the specified vswitch belong to the vlan3 of the Huawei switch.
[Quidway] disvlanall
[Quidway] discu

Vlan settings of Huawei switches on the vro for access control:
[Router] interfaceethernet0
[Router-Ethernet0] ipaddress192.168.1.520.255.0
[Router-Ethernet0] quit
// Specify the ip address of ethernet0
[Router] interfaceethernet1
[Router-Ethernet1] ipaddress192.168.1.6255.255.255.0
[Router-Ethernet1] quit
// Enable firewall and set the default vlan of the Huawei switch to deny
[Router] fireenable
[Router] firedefadendeny
// Allow 192.168.1.1 to access 192.168.1.3
// Add a vlan for the Huawei switch based on the firewall policy
[Router] acl101
[Router-acl-101] rulepermitipsource192.168.1.1255.255.255.0destination192.168.1.32.16255.255.0
[Router-acl-101] quit
// Enable 101 rules
A [Router-Ethernet0] firepa101
[Router-Ethernet0] quit
A [Router-Ethernet1] firepa101
[Router-Ethernet1] 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.