导航:首页 > 程序命令 > 交换机网络命令使用步骤

交换机网络命令使用步骤

发布时间:2022-08-27 07:37:59

① 交换机的配置命令

1.在基于IOS的交换机上设置主机名/系统名:
switch(config)# hostname hostname
在基于CLI的交换机上设置主机名/系统名:
switch(enable) set system name name-string

2.在基于IOS的交换机上设置登录口令:
switch(config)# enable password level 1 password
在基于CLI的交换机上设置登录口令:
switch(enable) set password
switch(enable) set enalbepass

3.在基于IOS的交换机上设置远程访问:

switch(config)# interface vlan 1

switch(config-if)# ip address ip-address netmask

switch(config-if)# ip default-gateway ip-address

在基于CLI的交换机上设置远程访问:

switch(enable) set interface sc0 ip-address netmask broadcast-address

switch(enable) set interface sc0 vlan

switch(enable) set ip route default gateway

4.在基于IOS的交换机上启用和浏览CDP信息:

switch(config-if)# cdp enable

switch(config-if)# no cdp enable

为了查看Cisco邻接设备的CDP通告信息:

switch# show cdp interface [type modle/port]

switch# show cdp neighbors [type mole/port] [detail]

在基于CLI的交换机上启用和浏览CDP信息:

switch(enable) set cdp {enable|disable} mole/port

为了查看Cisco邻接设备的CDP通告信息:

switch(enable) show cdp neighbors[mole/port] [vlan|plex|capabilities|detail]

5.基于IOS的交换机的端口描述:

switch(config-if)# description description-string

基于CLI的交换机的端口描述:

switch(enable)set port name mole/number description-string

6.在基于IOS的交换机上设置端口速度:

switch(config-if)# speed{10|100|auto}

在基于CLI的交换机上设置端口速度:

switch(enable) set port speed moudle/number {10|100|auto}

switch(enable) set port speed moudle/number {4|16|auto}

7.在基于IOS的交换机上设置以太网的链路模式:

switch(config-if)# plex {auto|full|half}

在基于CLI的交换机上设置以太网的链路模式:

switch(enable) set port plex mole/number {full|half}

8.在基于IOS的交换机上配置静态VLAN:

switch# vlan database

switch(vlan)# vlan vlan-num name vla

switch(vlan)# exit

switch# configure teriminal

switch(config)# interface interface mole/number

switch(config-if)# switchport mode access

switch(config-if)# switchport access vlan vlan-num

switch(config-if)# end

在基于CLI的交换机上配置静态VLAN:

switch(enable) set vlan vlan-num [name name]

switch(enable) set vlan vlan-num mod-num/port-list

9. 在基于IOS的交换机上配置VLAN中继线:

switch(config)# interface interface mod/port

switch(config-if)# switchport mode trunk

switch(config-if)# switchport trunk encapsulation {isl|dotlq}

switch(config-if)# switchport trunk allowed vlan remove vlan-list

switch(config-if)# switchport trunk allowed vlan add vlan-list

在基于CLI的交换机上配置VLAN中继线:

switch(enable) set trunk mole/port [on|off|desirable|auto|nonegotiate]

Vlan-range [isl|dotlq|dotl0|lane|negotiate]

10.在基于IOS的交换机上配置VTP管理域:

switch# vlan database

switch(vlan)# vtp domain domain-name

在基于CLI的交换机上配置VTP管理域:

switch(enable) set vtp [domain domain-name]

11.在基于IOS的交换机上配置VTP 模式:

switch# vlan database

switch(vlan)# vtp domain domain-name

switch(vlan)# vtp {sever|cilent|transparent}

switch(vlan)# vtp password password

在基于CLI的交换机上配置VTP 模式:

switch(enable) set vtp [domain domain-name] [mode{ sever|cilent|transparent }][password password]

12. 在基于IOS的交换机上配置VTP版本:

switch# vlan database

switch(vlan)# vtp v2-mode

在基于CLI的交换机上配置VTP版本:

switch(enable) set vtp v2 enable

13. 在基于IOS的交换机上启动VTP剪裁:

switch# vlan database

switch(vlan)# vtp pruning

在基于CL I 的交换机上启动VTP剪裁:

switch(enable) set vtp pruning enable

14.在基于IOS的交换机上配置以太信道:

switch(config-if)# port group group-number [distribution {source|destination}]

在基于CLI的交换机上配置以太信道:

switch(enable) set port channel moudle/port-range mode{on|off|desirable|auto}

15.在基于IOS的交换机上调整根路径成本:

switch(config-if)# spanning-tree [vlan vlan-list] cost cost

在基于CLI的交换机上调整根路径成本:

switch(enable) set spantree portcost moudle/port cost

switch(enable) set spantree portvlancost moudle/port [cost cost][vlan-list]

16.在基于IOS的交换机上调整端口ID:

switch(config-if)# spanning-tree[vlan vlan-list]port-priority port-priority

在基于CLI的交换机上调整端口ID:

switch(enable) set spantree portpri {mlle/port}priority

switch(enable) set spantree portvlanpri {mole/port}priority [vlans]

17. 在基于IOS的交换机上修改STP时钟:

switch(config)# spanning-tree [vlan vlan-list] hello-time seconds

switch(config)# spanning-tree [vlan vlan-list] forward-time seconds

switch(config)# spanning-tree [vlan vlan-list] max-age seconds

在基于CLI的交换机上修改STP时钟:

switch(enable) set spantree hello interval[vlan]

switch(enable) set spantree fwddelay delay [vlan]

switch(enable) set spantree maxage agingtiame[vlan]

18. 在基于IOS的交换机端口上启用或禁用Port Fast 特征:

switch(config-if)#spanning-tree portfast

在基于CLI的交换机端口上启用或禁用Port Fast 特征:

switch(enable) set spantree portfast {mole/port}{enable|disable}

19. 在基于IOS的交换机端口上启用或禁用UplinkFast 特征:

switch(config)# spanning-tree uplinkfast [max-update-rate pkts-per-second]

在基于CLI的交换机端口上启用或禁用UplinkFast 特征:

switch(enable) set spantree uplinkfast {enable|disable}[rate update-rate] [all-protocols off|on]

20. 为了将交换机配置成一个集群的命令交换机,首先要给管理接口分配一个IP地址,然后使用下列命令: switch(config)# cluster enable cluster-name cv

② 华为交换机典型配置,请给出详细步骤和说明

交换初始化方法:
1、通过CONTROL口连接交换机,使用SecureCRTPortable软件连接,打开软件后选择“新建会话”,在对话框中选择“Serial”选项,点击下一步,波特率9600,端口以实际使用的端口为准,不要选中RTS/CTS,否则键盘不能使用。
2、连接交换机。
3、进入交换机后,输入
reset saved-configuration
命令运行后,输入
reboot
在第一个提示(是否保存),输入N,不保存。
接着在提示是否重启中输入Y,回车后交换机自动重启。
重启完成后,可开始执行交换基础配置了。
1、配置设备名称
system-view进入系统视图
sysname HeXin命名为“HeXin”
2、配置管理VLAN
[HeXin]vlan 1进入VLAN 1
[HeXin-vlan1]description admin_VLAN设置VLAN 1为管理VLAN
3、配置HeXin与汇聚交换的连接端口为trunk
[HeXin]interface Gigabitethernet 0/0/1进入端口G速端口1
[HeXin-GigabitEthernet0/0/1]port link-type trunk配置端口1为trunk口
[HeXin-GigabitEthernet0/0/1]port trunk allow-pass vlan 1配置允许从端口1通行的VLAN为VLAN 1,如果想让所有的VLAN都可以通过端口1,可执行命令port trunk allow-pass vlan all
[HeXin-GigabitEthernet0/0/1]quit退出端口1
4、配置交换机的管理IP
[HeXin]interface vlanif 1
[HeXin-Vlanif1]ip 10.10.10.1 255.255.255.0管理IP地址为10.10.10.1,网关255.255.255.0
[HeXin-Vla

③ 交换机如何配置

准备工具/原料:一台PC和一台交换机

1、首先将一台PC和一台交换机用线缆连接起来。

④ 交换机网关的配置命令

交换机网关设置方法一:

要利用Telnet方式登录连接到交换机,交换机就必须有一个IP地址,二层交换机的端口是无法设置IP地址,但由于交换机都默认有一个VLAN1接口,VLAN接口是可以设置IP地址的,因此,对于二层交换机,其管理地址,就是VLAN1接口的地址。

⑤ 交换机的基本命令是什么

“Switch>”

⑥ 交换机的命令具体怎么使用

交换机的命令非常多,主要是用来配置交换机的,只有可网管的交换机(有console口的交换机)才能进行配置。
不同厂家、不同型号的交换机的配置命令也不大一样。
举个CISCO的命令例子吧:
hostname是给交换机命名的命令,如交换机本来的名字是Switch,使用(config)#hostname
JIAOHUANJI,就可以把交换机的名字改成JIAOHUANJI了。
交换机配置时还分很多种模式,每种模式下的配置命令也都有很大区别,具体的真不是三两句说得清的,你只有买些教材看看了。

⑦ 交换机的基本命令

交换机的启动及基本配置
1924交换机上配置

sw1924_b#delete nvram
全部清除交换机的所有配置
sw1924_b#reload
重新启动交换机(初始提示符为> )
sw1924_b#hostname sw1924
设置交换机的主机名
sw1924_b#enable secret cisco
设置加密密码
sw1924_b#enable password level 1 cisco1
设置等级密码(1最低)
sw1924_b#enable password level 15 cisco15
设置等级密码(15最高)
sw1924_b#ip address 192.168.14.1 255.255.255.0
设置交换机的管理IP地址
sw1924_b#ip default-gateway 192.168.198.2
设置交换机的网关地址
sw1924_b#ip domain-name pctc.com.cn
设置交换机所连域的域名
sw1924_b#ip name-server 218.87.18.230
设置交换机所连域的域名服务器IP
sw1924_b#show ip
查看上述设置环境
sw1924_b#show version
查看交换机的版本等信息
sw1924_b#show running-config
查看交换机的当前运行配置等全部信息
sw1924_b#show int e0/1
查看交换机的第1个端口信息

1924交换机配置端口属性

sw1924_b#conf t
sw1924_b#interface ethernet 0/1
进入第1个端口
sw1924_b#description sw1924_b-e0/1-pc1
给端口写入注释信息
sw1924_b#plex auto/full/full-flow-control/half
设置端口的工作模式
sw1924_b#port secure
启用端口安全性
sw1924_b#port secure max-mac-count 1
设置该端口允许对应的MAC地址数(默认132个)
sw1924_b#sh mac-address-table security
查看端口安全性

sw1912_a#conf t
进入全局配置模式
sw1912_a#interface fastethernet 0/1
进入第1个端口
sw1912_a#description sw2912_a-f0/1-pc1
给端口写入注释信息
sw1912_a#plex auto/full/half
设置端口的工作模式
sw1912_a#port security
启用端口安全性
sw1912_a#port security max-mac-count 1
设置该端口允许对应的MAC地址数(默认132个)
sw1912_a#end
返回特权模式
sw1912_a#sh port security
查看端口安全性

配置和查看MAC地址表

1924交换机配置MAC地址表

sw1924_b#mac-address-table aging-time 600
设置动态地址超时时间
sw1924_b#mac-address-table permanent 0000.0cdd.5a4d e0/3
定义永久MAC地址(绑定MAC地址)
sw1924_b#mac-address-table restricted static 0000.0cdd.aaed e0/6 e0/7
定义受限MAC地址
sw1924_b#address-violation disable/ignore/suspend
定义地址安全违规
sw1924_b#show mac-address-table
查看上述配置
sw1924_b#clear mac-addr restric static
清除受限MAC地址表项

2912交换机配置MAC地址表

sw2912_a#mac-address-table aging-time 700
设置动态地址超时时间
sw2912_a#mac-address-table static 0000.0cdd.5a4d e0/3
定义永久MAC地址(绑定MAC地址)
sw2912_a#mac-address-table secure 00d0.f80d.3333 f0/3 vlan 1
定义受限MAC地址
sw2912_a#port security action shutdown/trap
定义地址安全违规
sw2912_a#show port security
查看上述配置

配置VTP、VLAN、VLAN Trunk和STP

配置VTP

sw1924_a#conf t
sw1924_a#vtp server
定义VTP的工作模式
sw1924_a#vtp domain cisco
定义VTP的域名
sw1924_a#trunk on
启用干道

sw1924_b#vtp domain cisco
加入VTP域
sw1924_b#vtp client
定义VTP的工作模式
sw1924_b#trunk on
启用干道

sw1924_a#show trunk b
sw1924_a#show trunk b allowed-vlans
查看干道信息

配置VLAN

sw1924_a#vlan 10 dept1
sw1924_a#vlan 20 dept2
sw1924_a#vlan 30 dept3
sw1924_a#vlan 40 dept4
定义所需VLAN
sw1924_a#show vlan
查看VLAN信息

sw1924_b#show vlan
sw1924_b#show vtp
查看VTP的信息
sw1924_b#int e0/1
sw1924_b#vlan-membership static 10
sw1924_b#int e0/2
sw1924_b#vlan-membership static 20
sw1924_b#int e0/3
sw1924_b#vlan-membership static 30
sw1924_b#int e0/4
sw1924_b#vlan-membership static 40
把接口划入各自VLAN

配置spanning tree

sw1924_b#spantree 1
启用生成树协议
sw1924_b#sh spantree 1
查看生成树信息
sw1924_b#no spantree 1
关闭生成树协议
sw1924_b#sh spantree 1
查看生成树信息

⑧ 交换机配置命令是什么

1、交换机配置命令,英文名Switchboard
Command,是一种计算机语言,用来控制交换机的语言。
2、交换机的配置方式
(1)使用控制(console)端口,使用超级终端配置交换机
console是一个用来连接配置终端的异步串行接口,其接口标准是RJ-45。
(2)使用telnet配置交换机
用远程登陆telnet对交换机进行配置,是一种远程管理设备的常用方式。
(3)使用浏览器配置交换机
该方式可以对交换机进行配置,也可以修改交换机的参数,以便对交换机进行管理,还可以查看交换机的运行状态。
3、显示交换表命令的使用方法
(1)大中型交换机
在交换机超级用户模式下输入命令:Cisco-4000#show
cam
dynamic。
(2)小型交换机
在交换机超级用户模式下输入命令:
Cisco-3548#show
mac-address-table。

阅读全文

与交换机网络命令使用步骤相关的资料

热点内容
批处理转exe反编译工具 浏览:74
pdf怎么换成图片 浏览:323
换位加密能够按照一定 浏览:388
安卓开发入门pdf 浏览:190
日医pdf 浏览:861
指定文件夹换壁纸 浏览:898
天玥服务器是什么架构 浏览:236
苹果为什么回购安卓手机 浏览:87
27岁程序员发型 浏览:196
图库文件夹是什么意思 浏览:532
空调压缩机隔音 浏览:351
簿荷阅读app为什么登陆不了 浏览:516
zigbee与单片机通信 浏览:439
下载服务器错误怎么办 浏览:652
pdf读取库 浏览:483
如何找到底层算法 浏览:329
小宅z3下载什么app 浏览:816
快速打印pdf 浏览:636
安卓手机怎么设置禁止卸载 浏览:87
钢琴小车编程图解 浏览:884