日韩av黄I国产麻豆传媒I国产91av视频在线观看I日韩一区二区三区在线看I美女国产在线I麻豆视频国产在线观看I成人黄色短片

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 >

将计算机设置成交换机主机名,交换机命令

發布時間:2025/3/17 40 豆豆
生活随笔 收集整理的這篇文章主要介紹了 将计算机设置成交换机主机名,交换机命令 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

交換機命令,一種計算機語言,用來控制交換機的語言。

中文名

交換機命令外文名

Switchboard Command

H3C Switch命令:

一、模式命令:

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#copy 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

-----------------------------------------------------------

Catalyst 2950交換機密碼恢復

(1)拔下交換機的電源。

(2)用手按再交換機的MODE按鍵上,插上電源線。

(3)看到控制臺出現如下提示,松開MODE建。

switch:

(4)再switch:后執行flash_init命令。

(5)查看Flash中的文件。

(6)把config.text文件改名為config.old文件。

(7)執行boot命令,啟動交換機。

(8)進入特權模式查看flash里的文件。

(9)把文件config.old改為config.text文件。

(10)把config.text復制為系統的running-config.

(11)進入配置模式重新設置密碼并存盤,密碼恢復完成。

總結

以上是生活随笔為你收集整理的将计算机设置成交换机主机名,交换机命令的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。