vlan实验手册

实验手册

1. 实验模型架构

vlan实验手册

2.1 vlan划分

LSW1:

Switch>en

Switch>enable

Switch#config

Configuring from terminal, memory, or network [terminal]?

Enter configuration commands, one per line. End with CNTL/Z.

Switch(config)#vl

Switch(config)#vlan 10

Switch(config-vlan)#ex

Switch(config-vlan)#exit

Switch(config)#vlan 20

Switch(config-vlan)#ex

Switch(config-vlan)#exit

Switch(config)#vlan 30

Switch(config-vlan)#ex

Switch(config-vlan)#exit

Switch(config)#int f0/1

Switch(config-if)#sw

Switch(config-if)#switchport ac

Switch(config-if)#switchport access vl

Switch(config-if)#switchport access vlan 10

Switch(config-if)#ex

Switch(config-if)#exit

Switch(config)#int f0/2

Switch(config-if)#switchport access vlan 20

Switch(config-if)#ex

Switch(config-if)#exit

Switch(config)#int f0/3

Switch(config-if)#switchport access vlan 10

Switch(config-if)#^Z

Switch#

%SYS-5-CONFIG_I: Configured from console by console

Switch#wr

Switch#write

Building configuration…

[OK]

LSW2:

Switch>en

Switch>enable

Switch#config

Configuring from terminal, memory, or network [terminal]?

Enter configuration commands, one per line. End with CNTL/Z.

Switch(config)#vl

Switch(config)#vlan 10

Switch(config-vlan)#ex

Switch(config-vlan)#exit

Switch(config)#vlan 20

Switch(config-vlan)#ex

Switch(config-vlan)#exit

Switch(config)#vlan 30

Switch(config-vlan)#ex

Switch(config-vlan)#exit

Switch(config)#int f0/4

Switch(config-if)#sw

Switch(config-if)#switchport ac

Switch(config-if)#switchport access vl

Switch(config-if)#switchport access vlan 10

Switch(config-if)#ex

Switch(config-if)#exit

Switch(config)#int f0/5

Switch(config-if)#switchport access vlan 20

Switch(config-if)#exit

Switch(config)#int f0/6

Switch(config-if)#switchport access vlan 30

Switch(config-if)#exit

Switch(config)#^Z

Switch#

%SYS-5-CONFIG_I: Configured from console by console

Switch#wr

Switch#write

Building configuration…

[OK]

LSW3:

Switch>en

Switch>enable

Switch#config

Configuring from terminal, memory, or network [terminal]?

Enter configuration commands, one per line. End with CNTL/Z.

Switch(config)#vl

Switch(config)#vlan 10

Switch(config-vlan)#ex

Switch(config-vlan)#exit

Switch(config)#vlan 20

Switch(config-vlan)#exit

Switch(config)#vlan 30

Switch(config-vlan)#exit

Switch(config)#int f0/7

Switch(config-if)#sw

Switch(config-if)#switchport a

Switch(config-if)#switchport access v

Switch(config-if)#switchport access vlan 10

Switch(config-if)#exit

Switch(config)#int f0/8

Switch(config-if)#switchport access vlan 20

Switch(config-if)#exit

Switch(config)#int f0/9

Switch(config-if)#switchport access vlan 30

Switch(config-if)#exit

Switch(config)#^Z

Switch#

%SYS-5-CONFIG_I: Configured from console by console

Switch#wr

Switch#write

Building configuration…

[OK]

2.2创建trunk****

LSW1:

Switch#config

Configuring from terminal, memory, or network [terminal]?

Enter configuration commands, one per line. End with CNTL/Z.

Switch(config)#int f0/10

Switch(config-if)#switchport trunk allowed vlan 10,20,30

Switch(config-if)#switchport mode trunk

Switch(config-if)#

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/10, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/10, changed state to up

Switch(config-if)#^Z

Switch#

%SYS-5-CONFIG_I: Configured from console by console

Switch#wri

Switch#write

Building configuration…

[OK]

LSW2:

Switch>en

Switch>enable

Switch#config

Configuring from terminal, memory, or network [terminal]?

Enter configuration commands, one per line. End with CNTL/Z.

Switch(config)#int ra

Switch(config)#int range f0/11-12

Switch(config-if-range)#sw

Switch(config-if-range)#switchport tr

Switch(config-if-range)#switchport mode trunk

Switch(config-if-range)#^Z

Switch#

%SYS-5-CONFIG_I: Configured from console by console

Switch#wr

Switch#write

Building configuration…

[OK]

LSW3:

Switch#config

Configuring from terminal, memory, or network [terminal]?

Enter configuration commands, one per line. End with CNTL/Z.

Switch(config)#int f0/13

Switch(config-if)#switchport trunk allowed vlan 10,20,30

Switch(config-if)#switchport mode trunk

Switch(config-if)#

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/13, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/13, changed state to up

^Z

Switch#

%SYS-5-CONFIG_I: Configured from console by console

Switch#wr

Switch#write

Building configuration…

[OK]

2.3验证****
vlan实验手册
![在这里插入图片描述](https://img-blog.****img.cn/20200811012634759.jpg?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80OTg5Njc0Ng==,size_16,color_FFFFFF,t_70
vlan实验手册
vlan实验手册
vlan实验手册