123
分类:
2012-06-01 00:00:38
原文地址:Cisco Packet Tracer应用 作者:咩羊。
Switch>enable 拥护模式
Switch#config t 进入特权模式
Enter configuration commands, one per line. End with CNTL/Z. 终端配置模式
Switch(config)#hostname 10530302 设置设备名称
10530302(config)#line console 0 配置带带外网管
10530302(config-line)#password 123
10530302(config-line)#login 密码启用
10530302(config-line)#exit
10530302(config)#interface vlan1 配置WLAN 接口1
10530302(config-if)#ip address 192.168.1.0 255.255.255.0
Bad mask /24 for address 192.168.1.0
10530302(config-if)#no shut
12313333
10530302(config)#line vty 0 4 带内网管
10530302(config-line)#password 123
10530302(config-line)#login local
10530302(config-line)#exit
%LINK-5-CHANGED: Interface Vlan1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to up
10530302(config-if)#exit
10530302(config)#enable password 123
基本配置结束
10530302(config)#username 10530302 password 123
10530302(config)#service password-encryption
10530302(config)#exit
10530302#
%SYS-5-CONFIG_I: Configured from console by console
10530302#show vlan
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
Gig1/1, Gig1/2
1002 fddi-default act/unsup
1003 token-ring-default act/unsup
1004 fddinet-default act/unsup
1005 trnet-default act/unsup
VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1 enet 100001 1500 - - - - - 0 0
1002 fddi 101002 1500 - - - - - 0 0
1003 tr 101003 1500 - - - - - 0 0
1004 fdnet 101004 1500 - - - ieee - 0 0
1005 trnet 101005 1500 - - - ibm - 0 0
Remote SPAN VLANs
------------------------------------------------------------------------------
Primary Secondary Type Ports
------- --------- ----------------- ------------------------------------------
10530302#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.
10530302(vlan)#?
VLAN database editing buffer manipulation commands:
exit Apply changes, bump revision number, and exit mode
no Negate a command or set its defaults
vlan Add, delete, or modify values associated with a single VLAN
vtp Perform VTP administrative functions.
10530302(vlan)#vlan 2 name JS
VLAN 2 added:
Name: JS
10530302(vlan)#exit
APPLY completed.
Exiting....
10530302#show vlan
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
Gig1/1, Gig1/2
2 JS active
1002 fddi-default act/unsup
1003 token-ring-default act/unsup
1004 fddinet-default act/unsup
1005 trnet-default act/unsup
VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1 enet 100001 1500 - - - - - 0 0
2 enet 100002 1500 - - - - - 0 0
1002 fddi 101002 1500 - - - - - 0 0
1003 tr 101003 1500 - - - - - 0 0
1004 fdnet 101004 1500 - - - ieee - 0 0
1005 trnet 101005 1500 - - - ibm - 0 0
10530302#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.
10530302(vlan)#vlan 3 name kf
VLAN 3 added:
Name: kf
10530302(vlan)#vlan 4 name ru
VLAN 4 added:
Name: ru
10530302(vlan)#exit
APPLY completed.
Exiting....
10530302#enble
Translating "enble"...domain server (255.255.255.255)
% Unknown command or computer name, or unable to find computer address
10530302#config t
Enter configuration commands, one per line. End with CNTL/Z.
10530302(config)#interface fa0/1
10530302(config-if)#switchport mode access
10530302(config-if)#switchport access vlan 2
10530302(config-if)#exit
10530302(config)#exit
%SYS-5-CONFIG_I: Configured from console by console
10530302#show vlan
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active 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, Gig1/1
Gig1/2
2 JS active Fa0/1
3 kf active
4 ru active
1002 fddi-default act/unsup
1003 token-ring-default act/unsup
1004 fddinet-default act/unsup
1005 trnet-default act/unsup
VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1 enet 100001 1500 - - - - - 0 0
2 enet 100002 1500 - - - - - 0 0
3 enet 100003 1500 - - - - - 0 0
4 enet 100004 1500 - - - - - 0 0
1002 fddi 101002 1500 - - - - - 0 0
10530302#config t
Enter configuration commands, one per line. End with CNTL/Z.
10530302(config)#interface range fastEthernet 0/2-8
10530302(config-if-range)#switchport access vlan 2
10530302(config-if-range)#exit
10530302(config)#exit
%SYS-5-CONFIG_I: Configured from console by console
10530302#config t
Enter configuration commands, one per line. End with CNTL/Z.
10530302(config)#interface range fastEthernet 0/9-14
10530302(config-if-range)#switchport access vlan 3
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to down
10530302(config-if-range)#exit
10530302(config)#exit
%SYS-5-CONFIG_I: Configured from console by console
10530302#show vlan
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/15, Fa0/16, Fa0/17, Fa0/18
Fa0/19, Fa0/20, Fa0/21, Fa0/22
Fa0/23, Fa0/24, Gig1/1, Gig1/2
2 JS active Fa0/1, Fa0/2, Fa0/3, Fa0/4
Fa0/5, Fa0/6, Fa0/7, Fa0/8
3 kf active Fa0/9, Fa0/10, Fa0/11, Fa0/12
Fa0/13, Fa0/14
4 ru active
1002 fddi-default act/unsup
1003 token-ring-default act/unsup
1004 fddinet-default act/unsup
1005 trnet-default act/unsup
VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1 enet 100001 1500 - - - - - 0 0
2 enet 100002 1500 - - - - - 0 0
3 enet 100003 1500 - - - - - 0 0
4 enet 100004 1500 - - - - - 0 0
10530302#show run
Building configuration...
Current configuration : 1510 bytes
!
version 12.1
no service timestamps log datetime msec
no service timestamps debug datetime msec
service password-encryption
!
hostname 10530302
!
enable password 7 08701E1D
!
!
username 10530302 password 7 08701E1D
!
!
interface FastEthernet0/1
switchport access vlan 2
switchport mode access
!
interface FastEthernet0/2
--More—
Ip config / all 查看所有的ip地址
10530302#show run
Building configuration...
Current configuration : 1510 bytes
!
version 12.1
no service timestamps log datetime msec
no service timestamps debug datetime msec
service password-encryption
!
hostname 10530302
!
enable password 7 08701E1D
!
!
username 10530302 password 7 08701E1D
!
!
interface FastEthernet0/1
switchport access vlan 2
switchport mode access
!
interface FastEthernet0/2
10530302#config t
Enter configuration commands, one per line. End with CNTL/Z.
10530302(config)#interface fastEthernet 0/1
10530302(config-if)#switch port-security
10530302(config-if)#
10530302#enabl
10530302#config t
Enter configuration commands, one per line. End with CNTL/Z.
10530302(config)#interface fa0/1
10530302(config-if)#switchport mode access
10530302(config-if)#interface range fa0/1-8
10530302(config-if-range)#switchport mode access
10530302(config-if-range)#switchport access vlan 3
10530302(config-if-range)#interface range fa0/9-15
10530302(config-if-range)#switchport mode access
10530302(config-if-range)#switchport access vlan 3
10530302(config-if-range)#interface range fa0/16-20
10530302(config-if-range)#switchport mode access
10530302(config-if-range)#switchport access vlan 4
10530302(config)#exit
%SYS-5-CONFIG_I: Configured from console by console
10530302#show vlan
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/21, Fa0/22, Fa0/23, Fa0/24
Gig1/1, Gig1/2
2 JS active
3 KF 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
4 cw active Fa0/16, Fa0/17, Fa0/18, Fa0/19
Fa0/20
1002 fddi-default act/unsup
1003 token-ring-default act/unsup
1004 fddinet-default act/unsup
1005 trnet-default act/unsup
VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1 enet 100001 1500 - - - - - 0 0
2 enet 100002 1500 - - - - - 0 0
3 enet 100003 1500 - - - - - 0 0
--More—
Press RETURN to get started!
User Access Verification
Password:
Password:
10530302>123
Translating "123"...domain server (255.255.255.255)
% Unknown command or computer name, or unable to find computer address
10530302>enable
10530302#config t
10530302(config-if)#interface fa 0/22
10530302(config-if)#switch no
Command rejected: Conflict between 'nonegotiate' and 'dynamic' status.
10530302(config-if)#switchport mode trunk
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/22, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/22, changed state to up
10530302(config-if)#switch trunk allowed vlan 2,3
10530302(config-if)#