The VLAN configuration example of Huawei router switch

Source: Internet
Author: User

This article uses 4 pcs (more and less PC, the principle is the same, so here I only use 4 pcs), Huawei Router (R2621), switch (s3026e) each one, build a VLAN, realize the connection between virtual network and physical network. Implement firewall policies, and access control (ACLs).

Programme description:
The IP addresses and masks of the four PCs are listed below:

P1 192.168.1.1 255.255.255.0 gateway IP is 192.168.1.5
P2 192.168.1.2 255.255.255.0 gateway IP 192.168.1.5 P3
255.255.255.0 gateway IP for 192.168.1.6
P4 192.168.1.4 255.255.255.0 gateway IP for 192.168.1.6

Ethernet0 IP on the router is 192.168.1.5
Ethernet1 IP for 192.168.1.6
Firewall setting defaults to deny

Implementation Command list:
Set up on the switch, divide the VLAN:

SYS
//switch to System view
[Quidway]vlan enable
[Quidway]vlan 2
[Quidway-vlan2]port E0/1 to E0/8
[ Quidway-vlan2]quit
//default all ports belong to VLAN1, the E0/1 to E0/8 of the specified switch is VLAN2
[Quidway]vlan 3
[Quidway-vlan3]port E0/9 to E0/16
[quidway-vlan3]quit
//designated switch E0/9 to E0/16 eight ports are VLAN3
[Quidway]dis vlan all
[Quidway ]dis CU

Set on the router to implement access control:

 [router]interface Ethernet 0 [router-ethernet0]ip address 192.168.1.5 255.255.255.0 [router-ethernet0]quit// Specify Ethernet 0 IP [router]interface Ethernet 1 [router-ethernet1]ip address 192.168.1.6 255.255.255.0 [Router-ethernet1] Quit//Open firewall and set default to deny [Router]fire enable [Router]fire default Deny//Allow 192.168.1.1 access 192.168.1.3// The firewall policy can be added as needed [ROUTER]ACL [router-acl-101]rule permit IP Source 192.168.1.1 255.255.255.0-Destination 192.168.1.3 255.255.255.0 [router-acl-101]quit//Enable 101 rule [Router-ethernet0]fire pa [Router-ethernet0]quit [ Router-ethernet1]fire PA [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.