实验44: 划分VLAN<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

1. 实验目的

通过本实验,读者可以掌握如下技能:

1熟悉VLAN 的创建

2把交换机接口划分到特定VLAN

2. 实验拓扑

拓扑图

NA-NP-IE系列实验44: 划分VLAN

3. 实验步骤

要配置VLAN,首先要先创建VLAN,然后才把交换机的端口划分到特定的端口上:

(1) 步骤1:在划分VLAN 前,配置PC2PC3PC2 PING PC3

默认时,交换机的全部接口都在VLAN1 上,PC2 PC3 应该能够通信;

(2) 步骤2:在SW0划分VLAN2 前,F0/2划分到VLAN2,此时PC2 PING PC3, PC2 PC3 应该不能能够通信;

配置如下:

C2960 Boot Loader (C2960-HBOOT-M) Version 12.2(25r)FX, RELEASE SOFTWARE (fc4)

Cisco WS-C2960-24TT (RC32300) processor (revision C0) with 21039K bytes of memory.

2960-24TT starting...

Base ethernet MAC Address: 00E0.8F00.788D

Xmodem file system is available.

Initializing Flash...

flashfs[0]: 1 files, 0 directories

flashfs[0]: 0 orphaned files, 0 orphaned directories

flashfs[0]: Total bytes: 64016384

flashfs[0]: Bytes used: 4414921

flashfs[0]: Bytes available: 59601463

flashfs[0]: flashfs fsck took 1 seconds.

...done Initializing Flash.

 

Boot Sector Filesystem (bs:) installed, fsid: 3

Parameter Block Filesystem (pb:) installed, fsid: 4

 

 

Loading "flash:/c2960-lanbase-mz.122-25.FX.bin"...

########################################################################## [OK]

              Restricted Rights Legend

 

Use, duplication, or disclosure by the Government is

subject to restrictions as set forth in subparagraph

(c) of the Commercial Computer Software - Restricted

Rights clause at FAR sec. 52.227-19 and subparagraph

(c) (1) (ii) of the Rights in Technical Data and Computer

Software clause at DFARS sec. 252.227-7013.

 

           cisco Systems, Inc.

           <?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" />
170 West Tasman Drive

           San Jose, California95134-1706

 

 

 

 

Cisco IOS Software, C2960 Software (C2960-LANBASE-M), Version 12.2(25)FX, RELEASE SOFTWARE (fc1)

Copyright (c) 1986-2005 by Cisco Systems, Inc.

Compiled Wed 12-Oct-05 22:05 by pt_team

Image text-base: 0x80008098, data-base: 0x814129C4

 

 

 

Cisco WS-C2960-24TT (RC32300) processor (revision C0) with 21039K bytes of memory.

 

 

24 FastEthernet/IEEE 802.3 interface(s)

2 Gigabit Ethernet/IEEE 802.3 interface(s)

 

63488K bytes of flash-simulated non-volatile configuration memory.

Base ethernet MAC Address       : 00E0.8F00.788D

Motherboard assembly number     : 73-9832-06

Power supply part number        : 341-0097-02

Motherboard serial number       : FOC103248MJ

Power supply serial number      : DCA102133JA

Model revision number           : B0

Motherboard revision number     : C0

Model number                    : WS-C2960-24TT

System serial number            : FOC1033Z1EY

Top Assembly Part Number        : 800-26671-02

Top Assembly Revision Number    : B0

Version ID                      : V02

CLEI Code Number                : COM3K00BRA

Hardware Board Revision Number  : 0x01

 

 

Switch   Ports  Model              SW Version              SW Image

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

*    1   26     WS-C2960-24TT      12.2                    C2960-LANBASE-M

 

Cisco IOS Software, C2960 Software (C2960-LANBASE-M), Version 12.2(25)FX, RELEASE SOFTWARE (fc1)

Copyright (c) 1986-2005 by Cisco Systems, Inc.

Compiled Wed 12-Oct-05 22:05 by pt_team

 

Press RETURN to get started!

 

 

%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up

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

%LINK-5-CHANGED: Interface FastEthernet0/2, changed state to up

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

 

Switch>en

Switch#conf t

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

Switch(config)#ho sw0

sw0(config)#no ip domain loo

sw0(config)#lin c 0

sw0(config-line)#logg s

sw0(config-line)#exec-t 00

sw0(config-line)#exit

sw0(config)#exit

sw0#

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

sw0#vlan data

% Warning: It is recommended to configure VLAN from config mode,

  as VLAN database mode is being deprecated. Please consult user

  documentation for configuring VTP/VLAN in config mode.

 

sw0(vlan)#vlan 2 name cisco

VLAN 2 added:

    Name: cisco

sw0(vlan)#exit

APPLY completed.

Exiting....

sw0#conf t

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

sw0(config)#int f0/2

sw0(config-if)#switch mode access

sw0(config-if)#switch access vlan 2

sw0(config-if)#
PC2:
NA-NP-IE系列实验44: 划分VLAN