星期日, 10月 25, 2015

SMC 8126L2常用指令

●設定校時與時區
Vty-0#configure
Vty-0(config)#clock timezone Taiwan hours 8 minute 0 after-UTC =>設定時區,timezone可自訂
Vty-0(config)#exit

Vty-0#configure
Vty-0(config)#sntp server 118.163.81.61 =>設定sntp server的IP,可以設3組,空格分隔
Vty-0(config)#sntp poll 60 =>設定送出查詢的間隔時間,預設16秒,此處設60秒,可設16-16384秒
Vty-0(config)#sntp client  =>設定交換器為sntp client
Vty-0(config)#exit
Vty-0#show sntp
Current Time:  Oct 25 19:47:34 2015
Poll Interval: 60
Current  Mode: unicast
SNTP Status:   Enabled
SNTP Server:    118.163.81.61 0.0.0.0  0.0.0.0
Current Server: 118.163.81.61

Vty-0#show calendar =>顯示日期與時間資訊
 19:45:54 October 25 2015
Vty-0#


●觀看某一埠(範例為24埠)學習的mac,可用來遠端觀看該埠是否有通
Vty-0#show mac-address-table interface ethernet 1/24
 Interface MAC Address       VLAN Type
 --------- ----------------- ---- -----------------
  Eth 1/24 00-02-5B-XX-05-62    1 Learned
  Eth 1/24 00-08-22-XX-40-2F    1 Learned
  Eth 1/24 00-08-22-XX-0E-EE    1 Learned
  Eth 1/24 00-08-22-XX-31-0A    1 Learned

●查詢vlan id 1及vlan id 11的狀況
Vty-0#show vlan id 1
Default VLAN ID : 1

VLAN ID:               1
Type:                  Static
Name:                  DefaultVlan
Status:                Active
Ports/Port Channels:   Eth1/21(S) Eth1/23(S) Eth1/24(S)

Vty-0#show vlan id 11
Default VLAN ID : 1

VLAN ID:               11
Type:                  Static
Name:
Status:                Active
Ports/Port Channels:   Eth1/ 1(S) Eth1/ 2(S) Eth1/ 3(S) Eth1/ 4(S) Eth1/21(S)
                       Eth1/23(S) Eth1/24(S)

●儲存設定
Vty-0#copy running-config startup-config
Startup configuration file name [startup1.cfg]:按enter
Write to FLASH Programming.
Write to FLASH finish.
Success.

●上傳設定檔到TFTP
Vty-0#copy file tftp
Choose file type:
 1. config:  2. opcode: <1-2>: 1
Source file name: startup1.cfg
TFTP server IP address: TFTP的IP
Destination file name: 自行定義要存在TFTP Server上的設定檔名稱,如smc8126l2.cfg
Success.

●更新firmware
Vty-0#copy tftp file
TFTP server IP address: 輸入TFTP 的IP
Choose file type:
 1. config:  2. opcode: <1-2>: 2
Source file name: SMC8126L2_V1.4.6.1.bix
Destination file name: SMC8126L2_V1.4.6.1.bix
Write to FLASH Programming.
Write to FLASH finish.
Success.
Vty-0#configure
Vty-0(config)#boot system  opcode:SMC8126L2_V1.4.6.1.bix
Success.
Vty-0(config)#exit
Vty-0#reload
System will be restarted. Continue ?y
Session is waiting for rebooting..........................................


沒有留言: