‘壹’ cisco2960交换机的简单配置
你还在为cisco2960交换机的简单配置而烦恼么?不用担心,接下来是我为大家收集的cisco2960交换机的简单配置,欢迎大家阅读:
cisco2960交换机的简单配置的方法
2950是只支持二层的交换机
支持VLAN
第1步:单击“开始”按钮,在“程序”菜单的“附件”选项中单击“超级终端”
第2步:在“名称”文本框中键入“Cisco”
第3步:在“连接时使用”下拉列表框中选择与交换机相连的计算机的串口。台式机为“com 1”,笔记本为“com 3或者com 5”。
第4步:在“波特率”下拉列表框中选择“9600”-确定.
如果通信正常的话就会出现类似于如下所示的主配置界面,并会在这个窗口中就会显示交换机的初始配置情况。
enter
enter
enter
no!
1)配置交换机姓名
switch>ena
switch#configure
enter
switch#configure terminal (进入配置状态)
Switch(config)#hostname 配置的交换机姓名 如:30FLoor-2960-1
30FLoor-2960-1(config)#end
30FLoor-2960-1#
2)配置交换机的ip
30FLoor-2960-1#configure terminal (进入配置状态)
30FLoor-2960-1(config)#interface vlan 1
30FLoor-2960-1(config)#ip address ip地址 子网掩码
例如:30FLoor-2960-1(config)#ip address 10.11.90.10 255.255.255.0
30FLoor-2960-1(config)#no shutdown
30FLoor-2960-1(config)#end
30FLoor-2960-1#
30FLoor-2960-1#
3)配置交换机的 默认网关
30FLoor-2960-1(config)#ip default-gateway 网关ip
例如:30FLoor-2960-1(config)#ip default-gateway 10.11.90.254
4)设置路由
30FLoor-2960-1(config)#ip route 0.0.0.0 X.X.X.X
5)设置console口密码
30FLoor-2960-1(config)#line console 0
30FLoor-2960-1(config-line)#password 输入密码
30FLoor-2960-1(config-line)#login
30FLoor-2960-1(config-line)#end
6)设置telnet的密码
30FLoor-2960-1(config)#line vty 0 10
30FLoor-2960-1(config-line)#password 输入密码(yuxuan)
30FLoor-2960-1(config-line)#login
30FLoor-2960-1(config-line)#end
7)设置交换机的enable密码
30FLoor-2960-1(config)#enable password 输入密码(xuan)
30FLoor-2960-1(config)#enable secret 输入密码(yuxuan)
30FLoor-2960-1(config)#end
8)将当前配置信息保存到闪存中
30FLoor-2960-1(config)#write
9)查看交换机信息
30FLoor-2960-1#
show version 查看交换机版本信息
show ip interfaces 查看交换机的ip地址
show interface vlan 1 验证管理ip地址已经配置并开启
show ip redirect 查看交换机的网关
show running-configure 查看交换机当前的配置信息
show configure 查看交换机保存的配置信息
switch#write ; 保存配置信息
switch#show vtp ; 查看vtp配置信息
switch#show run ; 查看当前配置信息
switch#show vlan ; 查看vlan配置信息
switch#show interface ; 查看端口信息
switch#show int f0/0 ; 查看指定端口信息
10)交换机基本配置步骤
1.登陆到交换机
2.进入特权模式
命令:enable
3.进入全局配置模式
命令:configure terminal
4.进入相应的配置子模式
如:接口子模式
命令:interface vlan 1
看了“cisco2960交换机的简单配置”还想看:
1. cisco2960交换机安装配置基础详解
2. Cisco 2960交换机的基础安装配置教程
3. 思科交换机基本配置实例讲解
4. 思科交换机配置教程详解
5. cisco交换机如何清空配置
6. CISCO系列交换机如何清空配置
‘贰’ 配置思科2960命令是什么
int f0/1 (进入到要配置的接口)
ip address 192.168.1.1 255.255.255.0
no sh (打开端口)
(int 和 sh 是简写)
‘叁’ 思科2960交换机配置命令都有哪些
(一)使能口令(enable
password),口令以明文显示
使能密码(enbale
secret),
口令以密文显示
Switch.>
/*用户直行模式提示符
Switch.>enable
/*进入特权模式
Switch.#
/*特权模式(进入前要输入密文)
Switch.#config
terminal
/*进入全局配置模式
Switch.(config)#
/*配置模式提示符
Switch.(config)#
hostname
Pconline
/*设置主机名Pconline
Pconline(config)#
enable
password
cisco3560
/*设置使能口令为pconline
Pconline(config)#
enable
secret
cisco3560
/*设置使能密码为network
Pconline(config)#
line
vty
0
15
/*设置虚拟终端线
Pconline(config-line)#
login
/*设置登陆验证
Pconline(config-line)#
password
cisco3560
/*设置虚拟终端登陆密码
二、
交换机VLAN设置
Switch.>
/*用户直行模式提示符
Switch.>enable
/*进入特权模式
switch#vlan
database
;
进入VLAN设置
switch(vlan)#
vlan
2
;
建VLAN
2
switch(vlan)#no
vlan
2
;
删vlan
2
switch(config)#int
f0/1
;
进入网络端口1
switch(config)#int
giga0/1
;
进入汇聚千兆口1
switch(config-if)#
plex
{auto
|
full
|
half}
设置端口为---自动/全双工/半双工
switch(config-if)#switchport
mode
trunk
;
当前端口设置为汇聚口
switch(config-if)#switchport
mode
access
;
当前端口设置为接入模式
switch(config-if)#switchport
trunk
allowed
vlan
1,2
;设置1,2号口允许的vlan
组
switch(config-if)#switchport
trunk
vlan
2
;
设置1号口允许的vlan
switch(config-if)#switchport
access
vlan
2
;
当前端口加入vlan
2
switch(config-if)#switchport
trunk
encap
dot1q
;
设置vlan
中继
cisco网络中,交换机在局域网中最终稳定状态的接口类型主要有四种:
access/
trunk/
multi/
dot1q-tunnel。
1、access:
主要用来接入终端设备,如PC机、服务器、打印服务器等。
2、trunk:
主要用在连接其它交换机,以便在线路上承载多个vlan。
3、multi:
在一个线路中承载多个vlan,但不像trunk,它不对承载的数据打标签。
主要用于接入支持多vlan的服务器或者一些网络分析设备。现在基本不使用此类接
口,在cisco的网络设备中,也基本不支持此类接口了。
4、dot1q-tunnel:
用在Q-in-Q隧道配置中。
switch(config)#vtp
domain
;
设置发vtp域名
switch(config)#vtp
password
;
设置发vtp密码
switch(config)#vtp
mode
server
;设置发vtp模式
switch(config)#vtp
mode
client
;设置发vtp模式
三.
交换机设置IP地址
switch(config)#interface
vlan
1
进入vlan
1
switch(config-if)#ip
address
132.37.48.3
255.255.255.0;
设置交换机管理IP
switch(config)#ip
default-gateway
132.37.48.1
;设置交换机默认网关
switch(config)#end;
退出当前模式
Switch#conf
t
进入特权模式
Switch(config)#
interface
fa0/5
Switch(config-if)#
shutdown
关闭端口
Switch(config-if)#
no
shutdown
打开端口
四.
交换机显示命令
特权模式下:
switch#write
;
保存配置信息
switch#show
vtp
;
查看vtp配置信息
switch#show
run
;
查看当前配置信息
switch#show
vtp
;
查看交换机vtp信息
switch#show
vlan
;
查看vlan配置信息
switch#show
interface
;
查看端口信息
Switch#show
interfaces
fastethernet
0/1
switchport
;显示二层端口的状
态,可以用来决定此口是否为二层或三层口。
switch#show
int
f0/0
;
查看指定端口信息
sw1924_b#show
ip;
查看上述设置环境
sw1924_b#show
versi;查看交换机的版本等信息
sw1924_b#show
running-config;查看交换机的当前运行配置等全部信息
sw1924_b#show
int
e0/1;查看交换机的第1个端口信息
基于端口的MAC地址绑定
Switch#config
terminal
#进入配置模式
Switch(config)#
Interface
fastethernet
0/1
#进入具体端口配置模式
Switch(config-if)#Switchport
port-secruity
#配置端口安全模式
Switch(config-if
)switchport
port-security
mac-address
MAC(主机的MAC地址)
#配置该端口要绑定的主机的MAC地址
Switch(config-if
)no
switchport
port-security
mac-address
MAC(主机的MAC地
址)
#删除绑定主机的MAC地址
‘肆’ cisco 2960交换机可以在trunk上封装dot1q吗命令是什么
2960默认封装就是dot1q,不再支持cisco的私有封装ISL,因此2960系列交换机在配置trunk的时候不需要指定封装。
‘伍’ cisco 2960 二层交换机管理ip配置
使用三层交换机配置DHCP服务器,实现IP的自动分配。使用Cisco Packet Tracer student模拟此场景。具体方法如下:
1、首先需要画一个好的拓扑,只有画出拓扑图,才能事半功倍,以下计算机的IP地址是自动分配的,只需标记。
注意事项:
随着计算机及其互连技术的飞速发展,以太网已成为目前最流行的短距离两层计算机网络,以太网的核心部件是以太网交换机。
‘陆’ 思科2960交换机查vlan的网段命令
你要看VLAN所属的网段就只能在三层设备上查
二层设备只能查端口及MAC
ip信息得到你的3560上去查看
命令是:dis int vlan ***(vlanID)
‘柒’ 如何给cisco 2960 交换机配置IP地址
修改思科2960交换机的IP地址,有三种连接方式:
一、通过连接2960的Console端口修改(无需知道原本IP地址):
1、用Console线连接(电脑如果没有COM口,可用USB转COM线)。
2、电脑打开超级终端,新建连线,名称随意填写,确定(如果Win7没有超级终端的,可下载一个),选择连接到交换机的COM口编号,点击“还原默认值”,再点确定即可连接到交换机配置界面。