h3c3180g如何配置
Ⅰ H3C交換機如何初始化配置
H3C交換機如何初始化配置
你知道H3C交換機如何初始化嗎?配置命令是哪些呢?下面跟我一起來看看吧!
1、連接配置電纜
1.1 將配置電纜的DB-9孔式插頭接到要對交換機進行配置的PC的串口上;
1.2 將配置電纜的 RJ-45 的一端連到交換機的 Console 口上。
2、設置終端參數
2.1 打開 PC,並在 PC 上運行終端模擬程序(如超級終端)
2.2 設置終端參數(以 Windows XP 的超級終端為例)
2.2.1 參數要求:波特率為9600,數據位為8,奇偶校驗為無,停止位為1,流量控制為無
2.2.2 在超級終端屬性對話框中選擇【文件/屬性】菜單項,進入屬性窗口。點擊屬性窗口中的“設置”頁簽,進入屬性設置窗口,在其中選擇終端模擬為 VT100,選擇完成後,單擊<確定>按鈕。
3、起動交換機
接通交換機電源,起動交換機。
4、設置交換機名稱
system-view // 進入系統視圖模式
[H3C] sysname h3c-3100 // 為設備命名
[h3c-3100]
註:修改交換機名稱,只需重新輸入 sysname XXXX 就可以重命名為:XXXX
5、設置 VLAN 管理地址
[h3c-3100] interface vlan-interface 1 // 進入 VLAN 1
[h3c-3100] ip address 192.168.12.11 255.255.255.0 // 設置VLAN 1 的管理地址為:192.168.12.11/24
註:修改地址不需用 undo 命令,只需重新輸入 ip address 命令即可用新地址替換原地址
[h3c-3100] ip address 192.168.12.12 255.255.255.0 // 修改 ip 為:192.168.12.12/24
6、設置默認網關路由
如果不設置路由,交換機將不能與LAN外通信
[h3c-3100] ip route-static 0.0.0.0 255.255.255.0 192.168.12.1 // 設置 192.168.12.1/24 為網關路由地址
註:修改、替換網關路由,需首先用 undo 命令刪除原來的路由
[h3c-3100] undo ip route-static 0.0.0.0 255.255.255.0 192.168.12.1 // 刪除原有路由
[h3c-3100] ip route-static 0.0.0.0 255.255.255.0 192.168.12.254 // 設置新的網關路由
7、設置 Console 用戶登陸的口令認證
Console 用戶有如下三種認證方式:
None: 不需要口令認證
Password: 需要簡單的本地口令認證,包含明文(Simple)和密文(cipher)
Scheme: 通過 RADIUS 伺服器或本地提供用戶名和認證口令
配置命令如下:
system-view
[H3C] user-interface aux 0
[H3C-ui-aux0] authentication-mode password
[H3C-ui-aux0] set authentication password simple h3c
退出重新啟動後,交換機提示用戶輸入訪問口令
Login authentication
Password:
用戶的命令控制級別設置
[H3C-ui-aux0] user privilege level 0
[H3C] super password level 1 simple 111111
[H3C] super password level 2 simple 222222
[H3C] super password level 3 simple 333333
8、TELNET密碼驗證配置
[h3c-3100] user-interface vty 0 4
[h3c-3100-ui-vty0-4] authentication-mode password // 設置認證方式為密碼驗證
[h3c-3100-ui-vty0-4] set authentication password simple h3c // 設置登陸驗證密碼為h3c(明文保存)
[h3c-3100-ui-vty0-4] user privilege level 3 // 設置登陸用戶的級別為最高級3(預設為1)
9、TELNET本地用戶名和密碼驗證配置
需要輸入用戶名和密碼才可以登陸交換機。
[h3c-3100] user-interface vty 0 4
[h3c-3100-ui-vty0-4] authentication-mode scheme
[h3c-3100-ui-vty0-4] local-user h3c // 設置本地用戶名為:h3c
[h3c-3100-user-h3c] password simple h3c // 設置驗證密碼為:h3c (明碼保存)
[h3c-3100-user-h3c] service-type telnet level 3 // 設置為TELNET服務,級別為3
10、保存交換機配置
[h3c-3100] save
[h3c-3100] quit
至此,可以斷開與交換機的Console口的連接,轉而通過交換機的網路介面連接PC,通過 Telnet 登陸,對交換機進行進一步的管理和配置。
11、如果忘記登陸密碼
11.1、重新啟動該設備,在啟動階段看到顯示“press ctrl-b to enter boot menu”界面時按Ctrl和B鍵。這樣將進入啟動菜單,一般這個密碼是不會被設置的,默認是空口令,直接回車即可。如果這個密碼也被設置那麼我們就只有將設備返廠維修了。
11.2、當交換機顯示出boot menu界面時,我們會看到有9個選項
BOOT MENU
1. Download application file to flash
2. Select application file to boot
3. Display all files in flash
4. Delete file from flash
5. Modify bootrom password
6. Enter bootrom upgrade menu
7. Skip current configuration file
8. Set bootrom password recovery
9. Set switch startup mode
0. Reboot
Enter your choice(0-9):
依次為:
download application file to flash -- 下載配置文件到flash中
select application file to boot -- 選擇要啟動的配置文件
display all files in flash -- 顯示flash中保存的所有配置文件信息
delete file from flash -- 刪除flash中的配置文件
modify bootrom password -- 修改boot menu的密碼
enter bootrom upgrade menu -- 進入bootrom升級菜單
skip current configuration file -- 啟動載入時跳過當前配置文件
set bootrom password recovery -- 設置bootrom恢復密碼
set switch startup mode -- 設置交換機啟動模式
reboot -- 重新啟動交換機
選擇 7.skip current configuration file(啟動載入時跳過當前配置文件)即可。
11.3、選擇skip current configuration file(啟動載入時跳過當前配置文件)後,繼續選擇 0.Reboot 來重新啟動交換機,不過這次啟動和以往不同的是將不載入當前的configuration file配置文件,也就是說裡面設置的密碼驗證都將暫時無效。
11.4、再次啟動交換機自檢完畢後就會顯示startup configuration is skipped,user interface aux0 is available的.信息,這表明當前的配置文件沒有載入,用戶順利進入 aux0 即 console 控制台管理界面,不用輸入任何密碼就可以近來了。
11.5、通過user-interface aux 0進入console設置模式,然後通過authentication-mode none將控制台驗證密碼取消。最後千萬不要忘記使用save將修改保存,否則重新啟動後又將回到之前的配置文件,同樣需要密碼驗證了。
system-view
[H3C] user-interface aux 0
[H3C-ui-aux0] authentication-mode none
[H3C-ui-aux0] quit
[H3C] quit
save
12、如何恢復出廠設置
reset saved-configuration
The saved configuration file will be erased. Are you sure? [Y/N]: y // 提示是否擦除配置文件
Configuration in the device is being cleared.
Please wait ...
...
Configuration in the device is cleared.
reboot
This command will reboot the system. Since the current configuration may have been changed, all changes may be lost if you continue. Continue? [Y/N] Y // 提示是否重啟設備,按Y將重新啟動
【提示】擦除配置文件後,必須要重啟設備後才能恢復到出廠設置。
13、主要H3C品牌路由交換設備命令行查詢條碼的方法
display device manuinfo [slot x]
//(用戶視圖下輸入display device manuinfo)x指槽位號。
13.1 對於盒式設備查詢主機條碼時,省略slot x,直接輸入display device manuinfo。
舉例一:查詢H3C S3100主機條碼
display device manuinfo
DEVICE NAME : S3100-26TP-EI // 設備名稱
DEVICE SERIAL NUMBER : 210235A23LX07B000100 // 設備序列號
MAC ADDRESS : 000F-E274-933D // 設備出廠 MAC 地址
MANUFACTURED DATE : 2007-11-07 // 設備調測日期
VENDOR NAME : H3C // 製造商名稱
13.2 對於機箱式設備,根據主控板和介面模塊所插入的槽位號輸入相應的值可以查詢主控板條碼和介面板條碼,如果省略slot x參數則輸出所有模塊條碼。
註:機箱式設備無法查詢機箱條碼,只能查詢主控板及介面模塊條碼。
舉例二:查詢H3C S7502E主控板條碼(主控板插在0號槽)
display device manuinfo slot 0
DEVICE_NAME : LSQ1MPUA0
DEVICE_SERIAL_NUMBER : 210231A73SX079000033
MAC_ADDRESS : 000F-E22E-9C75
MANUFACTURING_DATE : 2007-9-13
VENDOR_NAME : H3C
13.3 對於介面模塊上面攜帶子卡的模塊,如需要查詢子卡條碼,除了需要指定模塊所插的槽位號外,還需輸入子卡號
舉例三:查詢H3C SR8800插槽6模塊上面1號子卡條碼
display device manuinfo slot 6 subslot 1
DEVICE_NAME : PIC-GT20R
DEVICE_SERIAL_NUMBER : 210231A76C007B000019
MAC_ADDRESS : NONE
MANUFACTURING_DATE : 2007-12-02
VENDOR_NAME : H3C
如有部分主機或模塊不能通過該命令查詢出條碼,可能是因為主機版本或模塊型號不支持通過命令行方式查詢,或者需要使用特殊命令查詢,如有此種情況請聯系H3C呼叫中心進一步確認。
13.4 對於華為設備,查詢命令為:display elabel
;Ⅱ H3C交換機配置
分那麼少
給你一些命令你好好看看吧
Cisco路由器交換機配置命令詳解
1. 交換機支持的命令:
交換機基本狀態:
switch: ;
ROM狀態,
路由器是rommon>hostname> ;
用戶模式hostname# ;
特權模式hostname(config)# ;
全局配置模式hostname(config-if)# ;
介面狀態
交換機口令設置:
switch>enable ;
進入特權模式switch#config terminal ;
進入全局配置模式switch(config)#hostname ;
設置交換機的主機名switch(config)#enable secret xxx ;
設置特權加密口令switch(config)#enable password xxa ;
設置特權非密口令switch(config)#line console 0 ;
進入控制台口switch(config-line)#line vty 0 4 ;
進入虛擬終端switch(config-line)#login ;
允許登錄switch(config-line)#password xx ;
設置登錄口令xxswitch#exit ;
返回命令
交換機VLAN設置:
switch#vlan database ;
進入VLAN設置switch(vlan)#vlan 2 ;
建VLAN 2switch(vlan)#no vlan 2 ;
刪vlan 2switch(config)#int f0/1 ;
進入埠1switch(config-if)#switchport access vlan 2 ;
當前埠加入vlan 2switch(config-if)#switchport mode trunk ;
設置為干線switch(config-if)#switchport trunk allowed vlan 1,2 ;
設置允許的vlanswitch(config-if)#switchport trunk encap dot1q ;
設置vlan 中繼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 1switch(config-if)#ip address ;
設置IP地址switch(config)#ip default-gateway ;
設置默認網關switch#dir flash: ;
查看快閃記憶體
交換機顯示命令:
switch#write ;
保存配置信息switch#show vtp ;
查看vtp配置信息switch#show run ;
查看當前配置信息switch#show vlan ;
查看vlan配置信息switch#show interface ;
查看埠信息switch#show int f0/0 ;
查看指定埠信息
2. 路由器支持的命令:
路由器顯示命令:
router#show run ;
顯示配置信息router#show interface ;
顯示介面信息router#show ip route ;
顯示路由信息router#show cdp nei ;
顯示鄰居信息router#reload ;重新起動
路由器口令設置:
router>enable ;
進入特權模式router#config terminal ;
進入全局配置模式router(config)#hostname ;
設置交換機的主機名router(config)#enable secret xxx ;
設置特權加密口令router(config)#enable password xxb ;
設置特權非密口令router(config)#line console 0 ;
進入控制台口router(config-line)#line vty 0 4 ;
進入虛擬終端router(config-line)#login ;
要求口令驗證router(config-line)#password xx ;
設置登錄口令xxrouter(config)#(Ctrl+z) ;
返回特權模式router#exit ;返回命令
路由器配置:
router(config)#int s0/0 ;
進入Serail介面router(config-if)#no shutdown ;
激活當前介面router(config-if)#clock rate 64000 ;
設置同步時鍾router(config-if)#ip address ;
設置IP地址router(config-if)#ip address second ;
設置第二個IProuter(config-if)#int f0/0.1 ;
進入子介面router(config-subif.1)#ip address ;
設置子介面IProuter(config-subif.1)#encapsulation dot1q ;
綁定vlan中繼協議router(config)#config-register 0x2142 ;
跳過配置文件router(config)#config-register 0x2102 ;
正常使用配置文件router#reload ;重新引導
路由器文件操作:
router# running-config startup-config ;
保存配置router# running-config tftp ;
保存配置到tftprouter# startup-config tftp ;
開機配置存到tftprouter# tftp flash: ;
下傳文件到flashrouter# tftp startup-config;
下載配置文件ROM狀態:Ctrl+Break ;
進入ROM監控狀態rommon>confreg 0x2142 ;
跳過配置文件rommon>confreg 0x2102 ;
恢復配置文件rommon>reset ;
重新引導rommon> xmodem: flash: ;
從console傳輸文件rommon>IP_ADDRESS=10.65.1.2 ;
設置路由器IPrommon>IP_SUBNET_MASK=255.255.0.0 ;
設置路由器掩碼rommon>TFTP_SERVER=10.65.1.1 ;
指定TFTP伺服器IPrommon>TFTP_FILE=c2600.bin ;
指定下載的文件rommon>tftpdnld ;
從tftp下載rommon>dir flash: ;
查看快閃記憶體內容rommon>boot ;引導IOS
靜態路由:
ip route ;
命令格式router(config)#ip route 2.0.0.0 255.0.0.0 1.1.1.2 ;
靜態路由舉例router(config)#ip route 0.0.0.0 0.0.0.0 1.1.1.2 ;默認路由舉例
動態路由:
router(config)#ip routing ;
啟動路由轉發router(config)#router rip ;
啟動RIP路由協議。router(config-router)#network ;
設置發布路由router(config-router)#negihbor ;點對點幀中繼用。
幀中繼命令:
router(config)#frame-relay switching ;
使能幀中繼交換router(config-s0)#encapsulation frame-relay ;
使能幀中繼router(config-s0)#fram-relay lmi-type cisco ;
設置管理類型router(config-s0)#frame-relay intf-type DCE ;
設置為DCErouter(config-s0)#frame-relay dlci 16 ;router(config-s0)#frame-relay local-dlci 20 ;
設置虛電路號router(config-s0)#frame-relay interface-dlci 16 ;
router(config)#log-adjacency-changes ;
記錄鄰接變化router(config)#int s0/0.1 point-to-point ;
設置子介面點對點router#show frame pvc ;
顯示永久虛電路router#show frame map ;顯示映射
基本訪問控制列表:
router(config)#access-list permit|deny router(config)#interface ;
default:deny anyrouter(config-if)#ip access-group in|out ;
default: Out
例1:router(config)#access-list 4 permit 10.8.1.1router(config)#access-list 4 deny 10.8.1.0 0.0.0.255
router(config)#access-list 4 permit 10.8.0.0 0.0.255.255
router(config)#access-list 4 deny 10.0.0.0 0.255.255.255
router(config)#access-list 4 permit any
router(config)#int f0/0router(config-if)#ip access-group 4 in
擴展訪問控制列表:
access-list permit|deny icmp <DESTINATIONIPwild>[type]access-list permit|deny tcp <DESTINATIONIPwild>[port]
例3:router(config)#access-list 101 deny icmp any 10.64.0.2 0.0.0.0 echorouter(config)#access-list 101 permit ip any any
router(config)#int s0/0
router(config-if)#ip access-group 101 in
例3:router(config)#access-list 102 deny tcp any 10.65.0.2 0.0.0.0 eq 80
router(config)#access-list 102 permit ip any any
router(config)#interface s0/1
router(config-if)#ip access-group 102 out
刪除訪問控制例表:
router(config)#no access-list 102
router(config-if)#no ip access-group 101 in
路由器的nat配置
Router(config-if)#ip nat inside ;
當前介面指定為內部介面Router(config-if)#ip nat outside ;
當前介面指定為外部介面Router(config)#ip nat inside source static [p] <私有IP><公網IP> [port]
Router(config)#ip nat inside source static 10.65.1.2 60.1.1.1
Router(config)#ip nat inside source static tcp 10.65.1.3 80 60.1.1.1 80
Router(config)#ip nat pool p1 60.1.1.1 60.1.1.20 255.255.255.0
Router(config)#ip nat inside source list 1 pool p1
Router(config)#ip nat inside destination list 2 pool p2
Router(config)#ip nat inside source list 2 interface s0/0 overload
Router(config)#ip nat pool p2 10.65.1.2 10.65.1.4 255.255.255.0 type rotary
Router#show ip nat translationrotary 參數是輪流的意思,地址池中的IP輪流與NAT分配的地址匹配。overload參數用於PAT 將內部IP映射到一個公網IP不同的埠上。
外部網關協議配置:
routerA(config)#router bgp 100
routerA(config-router)#network 19.0.0.0
routerA(config-router)#neighbor 8.1.1.2 remote-as 200
配置PPP驗證:
RouterA(config)#username password
RouterA(config)#int s0
RouterA(config-if)#ppp authentication {chap|pap}
3.PIX防火牆命令
Pix525(config)#nameif ethernet0 outside security0 ;
命名介面和級別Pix525(config)#interface ethernet0 auto ;
設置介面方式Pix525(config)#interface ethernet1 100full ;
設置介面方式Pix525(config)#interface ethernet1 100full shutdown
Pix525(config)#ip address inside 192.168.0.1 255.255.255.0
Pix525(config)#ip address outside 133.0.0.1 255.255.255.252
Pix525(config)#global (if_name) natid ip-ip ;定義公網IP區間
Pix525(config)#global (outside) 1 7.0.0.1-7.0.0.15 ;
例句Pix525(config)#global (outside) 1 133.0.0.1 ;
例句Pix525(config)#no global (outside) 1 133.0.0.1 ;
去掉設置Pix525(config)#nat (if_name) nat_id local_ip [netmark]
Pix525(config)#nat (inside) 1 0 0內網所有主機(0代表0.0.0.0)可以訪問global 1指定的外網。
Pix525(config)#nat (inside) 1 172.16.5.0 255.255.0.0內網172.16.5.0/16網段的主機可以訪問global 1指定的外網。
Pix525(config)#route if_name 0 0 gateway_ip [metric] ;
命令格式Pix525(config)#route outside 0 0 133.0.0.1 1 ;
例句Pix525(config)#route inside 10.1.0.0 255.255.0.0 10.8.0.1 1 ;
例句Pix525(config)#static (inside, outside) 133.0.0.1 192.168.0.8表示內部ip地址192.168.0.8,訪問外部時被翻譯成133.0.0.1全局地址。
Pix525(config)#static (dmz, outside) 133.0.0.1 172.16.0.8中間區域ip地址172.16.0.8,訪問外部時被翻譯成133.0.0.1全局地址。
Ⅲ H3C交換機如何設置
H3C交換機怎麼設置呢?交換機比較常見的設置是跨網段管理問題通常有如下幾種:跨網段限制電腦網速、跨網段控制電腦上網行為(比如禁止迅雷下載、禁止在線玩游戲、限制在線看視頻、禁止上班炒股、禁止工作時間網購等),跨網段綁定電腦IP和MAC地址,防止電腦修改IP地址等行為。
那麼,如何實現上述跨網段監控電腦上網、管理三層交換機多網段電腦上網行為呢? 可以通過以下兩種方法來實現:
第一、通過三層交換機自帶的'網管功能來實現控制多網段電腦網速、跨網段限制電腦上網行為以及跨網段實現交換機埠限速、跨網段實現三層交換機固定IP上網。
兩種設置IP地址的命令:一種直接在物理埠上設置IP地址,設置過程比較簡單。如三層交換機上配置埠1/0/1為路由埠,IP地址為172.16.1.0,OSPF採用點到點類型,配置過程如下:
#interface Ethernet 1/1
#port link-mode route
#ip address 172.16.1.0 255.255.255.0
#ospf networt-type p2p
第二種IP地址配置方式是通過邏輯VLAN設置IP地址,需先給VLAN設置IP地址,然後將物理埠配置在VLAN下。為了保證IP地址和物理埠一一對應的關系。例如在和上面一樣的三層交換機上要配置埠1/0/1為路由埠,並配置埠的VLAN ID為101,VLAN 101 IP地址為172.16.1.1,OSPF採用點到點類型,配置過程如下:
#interface Vlan-interface 101
#ip address 172.16.1.0 255.255.255.0
#ospf network-type p2p
#interface Ethernet 1/0/1
#port link-mode route
#port access Vlan 101
以上兩種方法都能為交換機埠設置IP地址,從操作步驟上看,第一種方法比較簡單,第二種方法需要先將埠和VLAN對應起來再設置IP地址。而且第2種方法在配置IP地址時還需同時使用對應的VLAN,過多使用VLAN號後可能會給日後的運行維護帶來了不便。
Ⅳ H3C交換機常用配置方法
H3C交換機常用配置方法
交換機的配置一直以來是非常神秘的,不僅對於一般用戶,對於絕大多數網管人員來說也是如此,同時也是作為網管水平高低衡量的一個重要而又基本的標志。以下是關於H3C交換機常用配置方法,希望大家認真閱讀!
華為H3C配置
1.h3C交換機WEB管理用戶配置
在系統試圖[H3C]下,輸入localuser XXX(WEB user name) XXX(WEB user password) 1(許可權,當該值為0的時候只具有guest許可權,1為管理員許可權)
如:為系統添加一個名為test,密碼為123,具有管理員許可權的用戶
Localuser test 123 1
2.H3C交換機配置ip地址以及網關
先<>下sys進入配置界面
因為是二層交換機,要為其配置ip地址及網關必須在管理vlan介面下配置:vlan1
從系統試圖進如vlan1介面試圖:interface vlan-interface 1
在vlan介面試圖下配置ip地址:ip address X.X.X.X X.X..X..X(前面為ip地址,後面為子網掩碼)
在vlan介面試圖下配置網關:ip gateway X.X.X.X
如:interface vlan-interface 1
ip address 1.1.1.2 255.255.255.0
ip gateway 1.1.1.1
3.H3C交換機配置telnet
從系統試圖進入vty介面:user-interface vty 0
在vty介面下配置驗證密碼:set authentication password XXX
如:設置telnet密碼為123
user-interface vty 0
set authentication password 123
4.將H3C交換機當前的配置保存起來
在用戶試圖下執行save命令,會提示是否保存,輸入Y,系統將當前正在運行的配置保存到寄存器中
如: save
This will save the configuration in the EEPROM memory
Are you sure?[Y/N]y
可以查看當前寄存器中保存的配置: display saved-configuration
可以查看當前系統運行的配置: display current-configuration
5.H3C交換機SNMP流量統計配置
在系統試圖下開啟snmp服務。
[H3C] snmp-agent
然後配置snmp的團體名,同時為此團體名指定許可權(有可讀許可權,和讀寫許可權,做流量統計時讀許可權就可以)
[H3C]snmp-agent community read XXX
其次設置snmp的版本,如果不知道mrtg伺服器所使用的.版本,可以在設備上設置所有版本
[H3C]snmp-agent sys-info version all
最後開啟snmp 的trap功能,不同型號設備有可能支持trap功能不一同。
[H3C]snmp-agent trap enable standard
(註:輸入snmp-agent trap enable命令回車後,將把所有trap信息發送,後面可加需要發送特定信息的參數)
6.恢復出廠值
sys
[sys]restore default 也可以 res d
7.埠與MAC綁定 (防止非法接入,不防ARP)
IP-add static mac地址 intface e0/埠號
8.查看交換機上每個埠對應的伺服器的MAC 地址
dis mac 或
dis int e0/1
7.鏡像埠
例:將eht0/1上聯口作為被鏡像埠,eht0/25作為鏡像監控埠。命令如下
sys
[quidway] monitor eth 0/25
[quidway] mirror eht 0/1 both (both表示雙向)
[quidway] dis mir (查看像像配置)
[quidway] quit
save
;