admin 管理员组

文章数量: 1087139


2024年4月28日发(作者:rearview歌曲)

配置 Cisco2950 交换机1

2009年11月21日 星期六 09:47

一.CISCO2950交换机的基本配置

Switch>

Switch>enable 进入特权执行模式

Switch#

Switch#show running-config 列出运行配置清单

Switch#config terminal 进入配置模式

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

Switch(config)#

Switch(config)#enable password cisco 设置enable口令

Switch(config)#enable secret cisco1 设置enable密码

Switch(config)#hostname c2950 设置主机名

c2950(config)#interface VLAN 1 进入VLAN 1的配置模式

c2950(config-if)#ip address 192.168.1.2 255.255.255.0

c2950(config-if)#no shut 保存配置

c2950(config-if)exit 退出

c2950(config)#ip default-gateway 192.168.1.10 设置缺省网关

c2950(config)#ip domain-name 设置域名

c2950(config)#ip name-server 202.1.1.1 202.1.1.2 设置域名服务器地址

c2950(config)#^Z

c2950#show version 查看版本信息

c2950#show interface VLAN 1 查看VLAN 1的配置和统计信息

二.配置CISCOc2950交换机的端口属性

c2950(config)#interface fastEthernet 0/1进入子接口配置模式

c2950(config-if)

c2950(config-if)#speed ?

10 Force 10 Mbps operation

100 Force 100 Mbps operation

auto Enable AUTO speed configuration

c2950(config-if)#speed 100 设置端口速率为100Mbit/s

c2950(config-if)#duplex ?

auto Enable AUTO duplex configuration

full Force full duplex operation

half Force half-duplex operation

c2950(config-if)#duplex full 设置端口为全双工

c2950(config-if)description TO_PC1 端口描述

c2950(config)#^Z

c2950#show interface fastEthernet 0/1

c2950#show interface fastEthernet 0/1 status

c2950#show interface fastEthernet 0/1 description

三.配置 和VLAN Trunk

两台2950交换机:c2950A,c2950B

(1)配置c2950A交换机的VTP和VLAN

c2950A#vlan database 进入VLAN配置模式

c2950A(vlan)#vtp ?

client Set the device to client mode.

domain Set the name of the VTP administrative domain.

password Set the password for the VTP administrative domain.

pruning Set the administrative domain to permit pruning.

server Set the device to server mode.

transparent Set the device to transparent mode.

v2-mode Set the administrative domain to V2 mode

c2950A(vlan)#vtp server 设置VTP模式

Device mode already VTP SERVER

c2950A(vlan)#vtp domain test 设置VTP域名

Changing VTP domain name from NULL to test

c2950A(vlan)#vlan 10 name v10 定义VLAN

VLAN 10 added:

Name: v10

c2950A(vlan)#

c2950A(vlan)#vlan 11 name v11

VLAN 11 added:

Name: v11

c2950A(vlan)#vlan 12 name v12

VLAN 11 added:

Name: v12

c2950A(vlan)#vlan 13 name v13

VLAN 13 added:

Name: v13

c2950A(vlan)#exit

APPLY completed.

c2950A#show vtp status 查看VTP状态

c2950A#show vtp counters 查看VTP统计数据

c2950A(config)#interface fastEthernet 0/1

c2950A(config-if)#switchport mode access设置静态VLAN访问模式

c2950A(config-if)#switchport acces vlan 10配置VLAN的归属

c2950A(config-if)#exit

c2950A(config)#interface fastEthernet 0/2

c2950A(config-if)#switchport mode access

c2950A(config-if)#switchport acces vlan 11

c2950A(config)#interface fastEthernet 0/3

c2950A(config-if)#switchport mode access

c2950A(config-if)#switchport acces vlan 12

c2950A(config)#interface fastEthernet 0/4


本文标签: 配置 设置 模式 查看 进入