Sie sind auf Seite 1von 5

http://mars.tekkom.dk/mediawiki/index.

php/VLAN_Cisco_IOS

1 of 5

http://mars.tekkom.dk/mediawiki/index.php/VLAN_Cisco_IOS

VLAN Cisco IOS


From House of Technology

Contents
1 Related topics
2 Cisco Materials
3 Show commands
3.1 Show vlan
3.1.1 Show VLAN Field Descriptions
3.2 Show interfaces
3.3 show switchport status
4 Adding VLAN's
4.1 Adding VLAN's from configure mode
4.2 Adding VLAN's from database mode
5 Access Ports
5.1 Adding a port statically to a VLAN
5.2 Adding a range of ports to a VLAN

Related topics
VLAN Trunk Cisco IOS

Cisco Materials
CCNP 3 chapter 2 Implementing VLAN's (http://mars.tekkom.dk/cisco/ccnp3/ch2/2_2_1/index.html)

Show commands
Show vlan
Gives a great view of VLAN's and which ports are assigned to it. Try also show vlan brief
SW2#show vlan
VLAN
---1
100
101
102

Name
-------------------------------default
Admin
Sales
Students

Status
--------active
active
active
active

1002
1003
1004
1005

fddi-default
token-ring-default
fddinet-default
trnet-default

act/unsup
act/unsup
act/unsup
act/unsup

Ports
------------------------------Fa0/1, Fa0/2, Gi0/2
Fa0/8, Fa0/9, Fa0/10, Fa0/11
Fa0/12, Fa0/13, Fa0/14, Fa0/22

VLAN Type SAID


MTU
Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------

2014.06.17. 21:51

http://mars.tekkom.dk/mediawiki/index.php/VLAN_Cisco_IOS

2 of 5

1
100
101
102
1002
1003
1004
1005

enet
enet
enet
enet
fddi
tr
fdnet
trnet

100001
100100
100101
100102
101002
101003
101004
101005

1500
1500
1500
1500
1500
1500
1500
1500

http://mars.tekkom.dk/mediawiki/index.php/VLAN_Cisco_IOS

ieee
ibm

0
0
0
0
0
0
0
0

0
0
0
0
0
0
0
0

Remote SPAN VLANs


-----------------------------------------------------------------------------Primary Secondary Type
Ports
------- --------- ----------------- ------------------------------------------

Show VLAN Field Descriptions


Show VLAN Field Descriptions
Field
Description
VLAN
VLAN number
Name
Name of the VLAN, if configured
Status
Status of the VLAN (Active or suspended)
Ports
Ports taht belong to the VLAN
Type
Media type of the VLAN
SAID
Security Association ID value of the VLAN
MTU
Maximum Transfer Unit of the VLAN
Parent
Parent VLAN if existing
RingNo Ring Number of the VLAN, if applicable
BrdgNo Brudge number of the VLAN, if applicable
STP
Spanning Tree Protocol type used on the VLAN
BrdgMode Bridging mode for this VLAN
Trans1
Translation bridge 1
AREHops Maximum number of hops for all-routers explorer frames
STEHops Maximum number of hops for spanning tree explorer frames

Show interfaces
A quick summary of all ports and their status
SW2#show interfaces status
Port
....
Fa0/8
Fa0/9
Fa0/10
....

Name

Status

Vlan

notconnect
notconnect
notconnect

102
102
102

Duplex
auto
auto
auto

Speed Type
auto 10/100BaseTX
auto 10/100BaseTX
auto 10/100BaseTX

show switchport status


SW2#show interfaces fastEthernet 0/10 switchport
Name: Fa0/10
Switchport: Enabled
Administrative Mode: static access

2014.06.17. 21:51

http://mars.tekkom.dk/mediawiki/index.php/VLAN_Cisco_IOS

3 of 5

http://mars.tekkom.dk/mediawiki/index.php/VLAN_Cisco_IOS

Operational Mode: down


Administrative Trunking Encapsulation: dot1q
Negotiation of Trunking: Off
Access Mode VLAN: 102 (Students)
Trunking Native Mode VLAN: 1 (default)
Administrative Native VLAN tagging: enabled
Voice VLAN: none
Administrative private-vlan host-association: none
Administrative private-vlan mapping: none
Administrative private-vlan trunk native VLAN: none
Administrative private-vlan trunk Native VLAN tagging: enabled
Administrative private-vlan trunk encapsulation: dot1q
Administrative private-vlan trunk normal VLANs: none
Administrative private-vlan trunk private VLANs: none
Operational private-vlan: none
Trunking VLANs Enabled: ALL
Pruning VLANs Enabled: 2-1001
Capture Mode Disabled
Capture VLANs Allowed: ALL
Protected: false
Unknown unicast blocked: disabled
Unknown multicast blocked: disabled
Appliance trust: none

Adding VLAN's
The VLAN configuration is stored in a file named VLAN.DAT
Switch1#dir
Directory of flash:/
2
3
5
6
7
21
22
8
24
25
26

-rwx
-rwx
-rwx
-rwx
drwx
-rwx
-rwx
-rwx
-rwx
-rwx
-rwx

128
2888547
616
1663
832
109
109
3727
306
880640
47

Mar
Mar
Apr
Mar
Mar
Mar
Mar
Mar
Mar
Mar
Mar

26
01
27
01
04
01
01
22
01
08
22

2007
1993
2009
1993
1993
1993
1993
2009
1993
1993
2009

13:58:48
01:16:05
12:40:25
00:05:49
23:52:10
00:04:30
00:04:30
10:12:56
00:03:48
22:39:07
10:12:56

layout.text
c2950-i6q4l2-mz.121-13.EA1.bin
vlan.dat
config.backup-1.2
html
info
info.ver
config.text
env_vars
html2.tar
private-config.text

7741440 bytes total (1981952 bytes free)

Adding VLAN's from configure mode


To add VLAN's from configure mode is recomended.
Switch1#configure terminal
Enter configuration commands, one per line.
Switch1(config)#vlan 100
Switch1(config-vlan)#name Admin
Switch1(config-vlan)#vlan 101
Switch1(config-vlan)#name Sales
Switch1(config-vlan)#vlan 102
Switch1(config-vlan)#name Students
Switch1(config-vlan)#^Z
Switch1#sh vlan brief

End with CNTL/Z.

VLAN Name
Status
Ports
---- -------------------------------- --------- ------------------------------1
default
active
Fa0/1, Fa0/2, Fa0/3, Fa0/4

2014.06.17. 21:51

http://mars.tekkom.dk/mediawiki/index.php/VLAN_Cisco_IOS

4 of 5

http://mars.tekkom.dk/mediawiki/index.php/VLAN_Cisco_IOS

Fa0/5, Fa0/6, Fa0/7, Fa0/8


Fa0/9, Fa0/10, Fa0/11, Fa0/12
Fa0/13, Fa0/14, Fa0/15, Fa0/16
Fa0/17, Fa0/18, Fa0/19, Fa0/20
Fa0/21, Fa0/22, Fa0/23, Fa0/24
Gi0/1
100
101
102
1002
1003
1004
1005

Admin
Sales
Students
fddi-default
token-ring-default
fddinet-default
trnet-default

active
active
active
active
active
active
active

Adding VLAN's from database mode


You can add VLAN's from vlan database
Switch1#vlan database
% 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.
Switch1(vlan)#vlan 100 name Admin
VLAN 100 added:
Name: Admin
Switch1(vlan)#vlan 101 name Sales
VLAN 101 added:
Name: Sales
Switch1(vlan)#vlan 102 name Students
VLAN 102 added:
Name: Students
Switch1(vlan)#exit
APPLY completed.
Exiting....
Switch1#sh vlan brief
VLAN Name
Status
Ports
---- -------------------------------- --------- ------------------------------1
default
active
Fa0/1, Fa0/2, Fa0/3, Fa0/4
Fa0/5, Fa0/6, Fa0/7, Fa0/8
Fa0/9, Fa0/10, Fa0/11, Fa0/12
Fa0/13, Fa0/14, Fa0/15, Fa0/16
Fa0/17, Fa0/18, Fa0/19, Fa0/20
Fa0/21, Fa0/22, Fa0/23, Fa0/24
Gi0/1
100 Admin
active
101 Sales
active
102 Students
active
1002 fddi-default
active
1003 token-ring-default
active
1004 fddinet-default
active
1005 trnet-default
active

Access Ports
Access Ports are ports that are connected to specific vlans.

Adding a port statically to a VLAN


To put fastethernet 0/7 port in VLAN 102, use the following commands.
Switch1#conf t

2014.06.17. 21:51

http://mars.tekkom.dk/mediawiki/index.php/VLAN_Cisco_IOS

5 of 5

http://mars.tekkom.dk/mediawiki/index.php/VLAN_Cisco_IOS

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


Switch1(config)#interface fastethernet 0/7
Switch1(config-if)#switchport mode access
Switch1(config-if)#switchport access vlan 102

Adding a range of ports to a VLAN


To put fastethernet 0/8, 0/9, 0/10, 0/11, 0/12, 0/13, 0/14 and 0/22 in VLAN 102
Switch1(config)#interface range fastEthernet 0/8 - 14, fastEthernet 0/22
Switch1(config-if-range)#switchport mode access
Switch1(config-if-range)#switchport access vlan 102

To view ports in VLAN Students


Switch1#show vlan name Students
VLAN Name
Status
Ports
---- -------------------------------- --------- ------------------------------102 Students
active
Fa0/7, Fa0/8, Fa0/9, Fa0/10
Fa0/11, Fa0/12, Fa0/13, Fa0/14
Fa0/22, Gi0/2
VLAN Type SAID
MTU
Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ -----102 enet 100102
1500 0
0
Remote SPAN VLAN
---------------Disabled
Primary Secondary Type
Ports
------- --------- ----------------- ------------------------------------------

Retrieved from "http://mars.tekkom.dk/mediawiki/index.php/VLAN_Cisco_IOS"


Categories: Cisco | CCNA | CCNP | IOS | Network | CCNP3
Powered by MediaWiki
Design by Paul Gu

2014.06.17. 21:51

Das könnte Ihnen auch gefallen