eNSP VLAN design of experiments

0, experimental purposes

1 , master based on IP address VLAN division;

2 , based on the master switch port VLAN division;

3 , achieved through different gateways VLAN communication between ;

1, the experimental environment

Environment: eNSP Simulator Version Information: 1.3.00.100 V100R003C00 SPC100

: A switch 2 units (the S5700) , PC4 station (the PC) , a plurality of twisted pair (Copper)

2, the experimental requirements

 

 

 1) into two based on the switch port VLAN A: VLAN100, VLAN200

VLAN

Port Membership

100

0/0/1~8

200

0/0/9~16

Trunk port

24

2) on the switch C is also divided into two port-based VLAN: VLAN100, VLAN200. The Port 1 set to TRUNK port. Switch C 24 is connected to a switch A

VLAN

IP addresses

Subnet Mask

100

192.168.10.1

255.255.255.0

200

192.168.20.1

255.255.255.0

Trunk port

 

0/0/1

3) PC1 and PC2 to the network:

device

IP addresses

Gateway

Subnet Mask

PC1

192.168.10.11

192.168.10.1

255.255.255.0

PC2

192.168.20.22

192.168.20.1

255.255.255.0

4) Verify test

(1) does not set the gateway to the PC:

   A member of the PC1 connected to the switch port on VLAN100 1 ~ 8; PC2 connected to the switch A VLAN200 member ports 9 to 16, each two PC Ping nowhere;

(2) to set the gateway to the PC:

  PC1 and PC2 are connected to the port VLAN100 and members of VLAN200 can Ping through.

3, experimental procedures

1) configuration switcher

0) the beginning of our first look at the version information about the switch

[S10009-01]display version

1) First, we need to switch to view the system defaults to the user view [] : System View   <> : User View

- Because the <> we have not made a lot of permissions, the view can be considered a system administrator

<Huawei>system-view

2) Change the name of the device

[Huawei]sysname S1

3) Create a Vlan100 Vlan200

- Method 1: Create a single vlan area

[S1]vlan 100

[S1]vlan 200

- Second way: create multiple vlan area

--vlan batch xxx yyy zzz create xxx yyy zzz three vlan area

[S1]vlan batch 100 200

4) Create and configure a port group port group added vlan region

- can be set by configuring the port to operate the plurality of ports. Command is as follows:

--注意如果执行port default vlan 100 需要在执行此命令前先执行vlan 100

--配置port 1~10Vlan100

[S1]port-group upto     !!端口组名

[S1-port-group-upto]group-member GigabitEthernet 0/0/1 to GigabitEthernet 0/0/10

[S1-port-group-upto]port link-type acc

[S1-port-group-upto]port default vlan 100

[S1-port-group-upto]quit

--配置port 11~16Vlan100

[S1]port-group uptoo     !!端口组名

[S1-port-group-uptoo]group-member GigabitEthernet 0/0/11 to GigabitEthernet 0/0/16

[S1-port-group-uptoo]port link-type acc

[S1-port-group-uptoo]port default vlan 200

[S1-port-group-uptoo]quit

------------------------------------------------------------------------------------------------------------------------------------

以下是对单个端口的操作

1) 进入接口视图

[S1]interface GigabitEthernet 0/0/24

2) GE24端口设置为Trunk

[S1-GigabitEthernet0/0/24]port link-type trunk

3) trunk 端口允许哪些vlan访问

[S1-GigabitEthernet0/0/24]port trunk allow-pass vlan all

4) 查看vlan信息

[S1] display vlan       //查看Vlan信息,此时显示24端口为tagged端口。

2) 三层交换机配置

--进入系统视图

<Huawei>system-view

--设置三层交换机名字

[Huawei] sysname S2

--创建两个Vlan在三层交换机中

[S2]vlan batch 100 200

--X为三层交换机与二层交换机连接的端口

[S2]interface GigabitEthernet 0/0/x

--设置0/0/x端口为trunk方式

[S2-GigabitEthernet0/0/X]port link-type trunk

--设置所有的vlan可以通过0/0/x连接

[S2-GigabitEthernet0/0/X]port trunk allow-pass vlan all

------------------------------------------------------------------------------------------------------------------------------------

//配置三层交换机的Vlan地址

 

--进入三层交换机的vlan100 注意一定要使用vlanif

[S1] interface vlanif 100

--Vlan 100进行网络设置  

--网关地址:192.168.10.1 网络号:192.168.10.0

[S1-Vlanif100] ip address 192.168.10.1 255.255.255.0

[S1-Vlanif100]quit

 

--进入三层交换机的vlan200 注意一定要使用vlanif

[S1] interface vlanif 200

--Vlan 200进行网络设置

--网关地址:192.168.20.1 网络号:192.168.20.0

[S1-Vlanif200] ip address 192.168.20.1  255.255.255.0

[S1-Vlanif200]quit

 

--查看配置的路由信息表

[S1] display ip route-table

3) PC机配置

设备

IP地址

网关

子网掩码

PC1

192.168.10.11

192.168.10.1

255.255.255.0

PC2

192.168.20.22

192.168.20.1

255.255.255.0

PC3

192.168.10.2

 

255.255.255.0

 

 

 

 

 

 

 

 

 

 

 4、实验验证设计

1) 不同Vlan下,PC不配置网关,互相ping,查看结果;

2) 不同Vlan下, PC配置网关,互相ping,查看结果;

3) 相同Vlan下,PC不配置网关,互相ping,查看结果;

4) 相同Vlan下, PC配置网关,互相ping,查看结果;

5、实验结果

6、实验小结

Guess you like

Origin www.cnblogs.com/CSAH/p/12609266.html