当前位置:首页 » 机关扶贫 » 交换机关机命令

交换机关机命令

发布时间: 2020-11-26 08:22:01

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

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

B. 交换机配置相关命令是什么

你那什么牌子的呀 他的设置大同小类了
我给你几个 前面是通用的 后面的你自己慢慢研究 不会问我了
交换机基本配置命令(3026)

PCA login: root ;使用root用户
password: linux ;口令是linux
# shutdown -h now ;关机
# init 0 ;关机
# logout
# login
# ifconfig ;显示IP地址
# ifconfig eth0 <ip address> netmask <netmask> ;设置IP地址
# ifconfig eht0 <ip address> netmask <netmask> down ; 删除IP地址
# route add 0.0.0.0 gw <ip>
# route del 0.0.0.0 gw <ip>
# route add default gw <ip> ;设置网关
# route del default gw <ip> ;删除网关
# route ;显示网关
# ping <ip>
# telnet <ip> ;建议telnet之前先ping一下
交换机命令
[Quidway]super password 修改特权用户密码
[Quidway]sysname 交换机命名
[Quidway]interface ethernet 0/1 进入接口视图
[Quidway]interface vlan x 进入接口视图
[Quidway-Vlan-interfacex]ip address 10.65.1.1 255.255.0.0
[Quidway]ip route-static 0.0.0.0 0.0.0.0 10.65.1.2 静态路由=网关

[Quidway]user-interface vty 0 4
[S3026-ui-vty0-4]authentication-mode password
[S3026-ui-vty0-4]set authentication-mode password simple 222
[S3026-ui-vty0-4]user privilege level 3

[Quidway-Ethernet0/1]plex {half|full|auto} 配置端口双工工作状态
[Quidway-Ethernet0/1]speed {10|100|auto} 配置端口工作速率
[Quidway-Ethernet0/1]flow-control 配置端口流控
[Quidway-Ethernet0/1]mdi {across|auto|normal} 配置端口MDI/MDIX状态平接或扭接
[Quidway-Ethernet0/1]port link-type {trunk|access|hybrid} 设置接口工作模式
[Quidway-Ethernet0/1]shutdown 关闭/重起接口
[Quidway-Ethernet0/2]quit 退出系统视图

[Quidway]vlan 3 创建/删除一个VLAN/进入VLAN模式
[Quidway-vlan3]port ethernet 0/1 to ethernet 0/4 在当前VLAN增加/删除以太网接口
[Quidway-Ethernet0/2]port access vlan 3 将当前接口加入到指定VLAN
[Quidway-Ethernet0/2]port trunk permit vlan {ID|All} 设trunk允许的VLAN
[Quidway-Ethernet0/2]port trunk pvid vlan 3 设置trunk端口的PVID

[Quidway]monitor-port <interface_type interface_num> 指定和清除镜像端口
[Quidway]port mirror <interface_type interface_num> 指定和清除被镜像端口
[Quidway]port mirror int_list observing-port int_type int_num 指定镜像和被镜像

[Quidway]description string 指定VLAN描述字符
[Quidway]description 删除VLAN描述字符
[Quidway]display vlan [vlan_id] 查看VLAN设置

[Quidway]stp {enable|disable} 开启/关闭生成树,默认关闭
[Quidway]stp priority 4096 设置交换机的优先级
[Quidway]stp root {primary|secondary} 设置交换机为根或根的备份
[Quidway-Ethernet0/1]stp cost 200 设置交换机端口的花费

[SwitchA-vlanx]isolate-user-vlan enable 设置主vlan
[SwitchA]Isolate-user-vlan <x> secondary <list> 设置主vlan包括的子vlan
[Quidway-Ethernet0/2]port hybrid pvid vlan <id> 设置vlan的pvid
[Quidway-Ethernet0/2]port hybrid pvid 删除vlan的pvid
[Quidway-Ethernet0/2]port hybrid vlan vlan_id_list untagged 设置无标识的vlan
如果包的vlan id与PVId一致,则去掉vlan信息. 默认PVID=1。
所以设置PVID为所属vlan id, 设置可以互通的vlan为untagged.

C. 交换机的基本命令

交换机的基本命令有以下四种:
一、模式命令:
1. 用户模式:Switch>
2. 特权模式:Switch>enable
Switch#
3. 全局配置模式:Switch#config terminal
Switch(config)#
4. 接口配置模式:Switch(config)#interface fastethernet0/1
Switch(config-if)#
5. Line模式:Switch(config)#line console 0
Switch(config-line)#
二、特权模式下的命令:
1. 查看机MAC地址:Switch#show mac-address-table
2. 发现(CDP):
Switch#show cdp
Switch#show cdp interface fastethernet0/1
Switch#show cdp neighbors
Switch#show cdp neighbors detail
Switch#show cdp entry
3. 保存机配置:
Switch# running-config startup-config或者Switch#write
4. 恢复交换机出厂值:
Switch#erase startup-config
Switch#reload
三、全局配置模式下的命令:
1. 配置主机名:Switch(config)#hostname Sw1
Sw1(config)#
2、 设置登陆台密码:Switch(config)#line console 0
Switch(config-line)#password 密码
Switch(config-line)#login
3. 使能口令:Switch(config)#enable Password 密码
4. 加密保存的使能口令:Switch(config)#enable secret 密码
5. 配置IP地址:
Switch(config)#interface vlan 1
Switch(config-if)#ip address IP地址 网关
Switch(config-if)#no shutdown
6. 配置交换机网关:Switch(config)#ip default-gateway 网关
四、VLAN配置命令:
1. 创建vlan命令:
a) 全局配置模式下:
Switch(config)#vlan 2
Switch(config)#name v2
Switch(config)#mtu 数值
Switch(config)#end
b) Vlan数据库下:
Switch#vlan database
Switch#vlan 2 name v2
Switch#vlan 2 mut 数值
Switch#exit
2. 删除vlan命令:
a) 全局配置模式下:
Switch(config)#no vlan 2
Switch(config)#end
b) Vlan数据库下:
Switch#no vlan 2 name v2
Switch#exit
3. 在vlan中添加端口:
Switch#config terminal
Switch(config)#interface f0/1(端口)
Switch(config-if)#Switchport mode access
Switch(config-if)#switchport access vlan 2
Switch(config-if)#end
一次将多个端口添加到vlan中:
Switch#config terminal
Switch(config)#interface range f0/1 - 5(端口)
Switch(config-if)#switchport access vlan 2
Switch(config-if)#end
注:switch#show vlan biref(查看vlan信息)
4. 配置vlan trunk:
1. 配置接口为trunk命令:
Switch(config)# interface f0/1(端口)
Switch(config-if)#Switchport mode trunk
2. 配置接口为动态协商模式的命令:
Switch(config)# interface f0/1(端口)
Switch(config-if)#switchport mode dynamic desirable/auto
3. 从trunk中删除vlan:
Switch(config)# interface f0/1(端口)
Switch(config-if)#Switchport trunk allowed vlan remove 2
4. 在trunk中添加vlan:
Switch(config)# interface f0/1(端口)
Switch(config-if)#Switchport trunk allowed vlan add 2

D. CISCO交换机有没有关机命令

没有,很多型号的设备电源键都没有,只有重启,没有关闭,关闭只能拔电源,即便有电源开关的设备也需要手动关闭开关。

E. 交换机上的dos命令(所有)

以下进部分命令
全部命令地址:http://www.it286.net/ExamCertification/Cisco/200606/11689.html
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 do

F. 思科交换机关闭端口命令

思科交换机端口命令开关如下:
config# int port 15
# shut down
这条命令就是 关闭15端口

config# Int port 15
# no shut down
这条命令就是 开启15端口

以此类推。

如果向远程管理建议配置交换机管理IP
vlan 1
IP ADD XXX.XXX.XXX.XXX
xxx表示IP 如果公网IP必须使用合法有效IP 内网的话,使用192.168.1.2 就可以。但是要注意不能和内网用户电脑IP地址冲突。

G. 交换机配置命令

1、交换机配置命令,英文名Switchboard Command,是一种计算机语言,用来控制交换机的语言。

H. 求交换机命令大全

每个厂家的 产品命令也是不一样的
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]

I. cisco交换机的关机命令什么哪位大侠 知道

没有关机命令吧。不过有重新加载配置的命令,相当于重启。
reload

J. 思科cisco交换机关机可以用命令设置吗

关机不行,多数交换机都不带电源开关的,用reload命令可以重启。

热点内容
影视转载限制分钟 发布:2024-08-19 09:13:14 浏览:319
韩国电影伤口上纹身找心里辅导 发布:2024-08-19 09:07:27 浏览:156
韩国电影集合3小时 发布:2024-08-19 08:36:11 浏览:783
有母乳场景的电影 发布:2024-08-19 08:32:55 浏览:451
我准备再看一场电影英语 发布:2024-08-19 08:14:08 浏览:996
奥迪a8电影叫什么三个女救人 发布:2024-08-19 07:56:14 浏览:513
邱淑芬风月片全部 发布:2024-08-19 07:53:22 浏览:341
善良妈妈的朋友李采潭 发布:2024-08-19 07:33:09 浏览:760
哪里还可以看查理九世 发布:2024-08-19 07:29:07 浏览:143
看电影需要多少帧数 发布:2024-08-19 07:23:14 浏览:121