VLAN Configuration Lab (Detailed)

First, the experimental environment

Ready GNS3, SCRT, WireShark.

-------------lab environment------------

1, first open GNS3 interface, open the icon bar on the left, drag a router, then click on the PC icon, select VPC, dragged three topologies PC to the operating area.

VLAN Configuration Lab (Detailed)

2, the routing switch instead of the icon, change the name to SW, add a two-story business card.

VLAN Configuration Lab (Detailed)


VLAN Configuration Lab (Detailed)


VLAN Configuration Lab (Detailed)


VLAN Configuration Lab (Detailed)

2, the switch will no disk space, we will be error when creating a VLAN.

VLAN Configuration Lab (Detailed)

In order to prove that the switch is not configured disk space, open switch, double-click to enter the CRT screen, enter dir (to view the disk space), then appeared Error error.
VLAN Configuration Lab (Detailed)

Then again if we can create a VLAN experimental look. ( In privileged mode )

1, input into the vlan database VLAN database mode, time can be obtained by entering.

VLAN Configuration Lab (Detailed)

2, to create a VLAN name, enter vlan10 name yun hit Enter, find the names have been added up, and then we add to exit the current mode.

VLAN Configuration Lab (Detailed)

3, enter exit, appears Error error, then enter the abort, you can quit.

VLAN Configuration Lab (Detailed)

4, after the withdrawal has not added VLAN look good, enter the show vlan-switch brief, it found no added successfully.VLAN Configuration Lab (Detailed)

5, exit CRT interface is added to the switch disk space, and then double-click to enter the CRT screen, type dir to see the disk space found or does not appear, enter the abort exit, enter the erase flash :( erase the disk), three times in a row hitting the Enter key disk clean-up.

VLAN Configuration Lab (Detailed)

另一种方法就是把GNS3和CRT全部关闭,打开GNS3重新拖入一台路由器和三台VPC的PC机,先不开启,进行配置(改名称、改图标、二层业务单板、添加磁盘容量128Mb),要不然就要还是要使用erase flash:进行清除磁盘。

6、修改完之后双击进去CRT界面输入dir查看磁盘空间。

VLAN Configuration Lab (Detailed)

7、接下来用网线连接起来,并显示出端口,然后点击开启。

VLAN Configuration Lab (Detailed)

8、我们把PC1放在VLAN10里,配置IP地址为192.168.10.10 把PC2和PC3放在VLAN20里配置IP为192.168.10.20 192.168.10.30.

VLAN Configuration Lab (Detailed)

9、接下来我们要去做VLAN划分,在交换机里输入configure terminal 进入全局模式输入no ip routing,关闭路由功能(因为是由路由器的镜像文件改变而来)

VLAN Configuration Lab (Detailed)

10、接下来给PC端配置IP地址。

VLAN Configuration Lab (Detailed)


VLAN Configuration Lab (Detailed)


VLAN Configuration Lab (Detailed)VLAN Configuration Lab (Detailed)

11、配置完IP地址后ping一下看看能否互通(如果ping不通,就重启交换机,重新对三台PC机配置IP)

在PC1上输入ping 192.168.10.20
VLAN Configuration Lab (Detailed)

在PC2上输入ping 192.168.10.30
VLAN Configuration Lab (Detailed)
在PC3上面输入ping 192.168.10.10
VLAN Configuration Lab (Detailed)
这个时候就表明三台PC端已经互通了,实现环境就可以了。

--------------开始试验-----------

1、输入configure terminal 进入全局模式。
2、输入no ip routing 关闭路由功能。
3、输入end退回到特权模式。
4、输入vlan database 进入vlan数据库模式。
5、输入vlan 10 name yun
6、’输入exit退出

VLAN Configuration Lab (Detailed)
7、输入show vlan-switch brief查看vlan。

VLAN Configuration Lab (Detailed)
8、再创建第二vlan:
(1)、输入configure terminal 进入全局模式。
(2)、输入vlan 20,30同事添加多个vlan。(如果要配置vlan名称需单独进行配置,此时是在集体模式下)。
VLAN Configuration Lab (Detailed)
(3)、这个时候输入exit ,再输入do show vlan-switch brief查看vlan是否添加进去。
VLAN Configuration Lab (Detailed)
(4)、输入vlan 20进入,输入aaa,给vlan20添加名称,输入exit推出再进入vlan 30,输入bbb,给vlan30添加名称。
VLAN Configuration Lab (Detailed)
(5)、输入do show vlan-swtich brief,查看vlan。
VLAN Configuration Lab (Detailed)
9、vlan名称配置好之后,就要把端口添加到vlan中。
(1)、输入 int f1/1 进入f1/1。
(2)、输入switchport mode access 接入链路。
(3)、输入switchport mode access vlan 10添加到vlan10中。
VLAN Configuration Lab (Detailed)
(4) 、输入exit退出
(5) 、输入 do show vlan-switch brief,查看vlan。
VLAN Configuration Lab (Detailed)
10、接下来我们把f1/2和f1/3配置到Vlan20中。
(1) 、输入int range f1/1 -3进入集体模式。
(2) 、输入switchport mode access。
(3) 、输入switchport access vlan 20。
(4) 、输入do show vlan-switch brief查看vlan。
VLAN Configuration Lab (Detailed)

------------ ---------- results

1, the original is PC1 and PC2 \ PC3 interoperability, we try to go now Can PC1.
VLAN Configuration Lab (Detailed)
2, PC1 is not possible and PC2, PC3 interworking, PC2 and PC3 time can communicate.
VLAN Configuration Lab (Detailed)

----------Experimental results------------

In the same network in a vlan, they can communicate, but not in the same vlan even if the address is not in the same network segment can communicate. (Not a broadcast domain, ARP can not get the other MAC address)

Guess you like

Origin blog.51cto.com/14307755/2427902