华为DSLAM MA5600批自动量端口调速.doc_第1页
华为DSLAM MA5600批自动量端口调速.doc_第2页
华为DSLAM MA5600批自动量端口调速.doc_第3页
华为DSLAM MA5600批自动量端口调速.doc_第4页
华为DSLAM MA5600批自动量端口调速.doc_第5页
已阅读5页,还剩11页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

华为DSLAM MA5600批量端口自动调速原理和实现=程序语言:vbscript 运行工具:secureCRT 6.7 +作者:鲍继川时间:208.52=原理:1. 通过已存的5600ip地址每台telnet进去。找到每块宽带板子,用命令 display board 02.找到相应的宽带模板,如命令:display current-configuration section global-config | include 6656没有则创建。3 进入步骤2找到的板卡 #interface adsl 0/0 。然后deactivate 9,然后 acvate 9 profile-index 9 。激活所需端口和宽带模板后,save,退出就完成。=程序执行效果图:脚本实际运行如下: Huawei MA5600 Multi-service Access Module. Copyright(C) 1998-2006 by Huawei Technologies Co., Ltd.User name:rootUser password:xxx.xxx.xxx5_5600enablexxx.xxx.xxx5_5600#configxxx.xxx.xxx5_5600(config)#display board 0 - SlotID BoardName Status SubType0 SubType1 - 0 H563ADGE Prohibited 1 H563ADGE Normal 2 H563ADGE Normal 3 H563ADGE Normal 4 H563ADGE Normal 5 H563ADGE Normal 6 H563ADGE Normal 7 H561SCU Active_normal O2GS 8 9 H563ADGE Normal 10 H563ADGE Normal 11 H563ADGE Normal 12 H563ADGE Normal 13 H563ADGE Normal 14 H563ADGE Normal 15 H563ADGE Normal -xxx.xxx.xxx5_5600(config)#display current-configuration section global-config | include 6656 It will take a long time if the content you search is too much or the string you input is too long, you can press CTRL_C to break at any time adsl line-profile quickadd 7 basic-para all trellis 1 bitswap 1 1 channelinterleaved 16 6 adapt at-startup snr 6 0 31 6 0 31 rate 32 6656 32 512 nameADSL LINE PROFILE 7xxx.xxx.xxx5_5600(config)#interface adsl 0/1xxx.xxx.xxx5_5600(config-if-adsl-0/1)#deactivate all xxx.xxx.xxx5_5600(config-if-adsl-0/1)# Deactivate port 0 successfullyxxx.xxx.xxx5_5600(config-if-adsl-0/1)#! EVENT WARNING 2012-09-21 19:01:09 ALARM NAME :ADSL port deactivation PARAMETERS :Frame ID: 0, Slot ID: 1, Port ID: 0xxx.xxx.xxx5_5600(config-if-adsl-0/1)# Deactivate port 1 successfullyxxx.xxx.xxx5_5600(config-if-adsl-0/1)# Deactivate port 2 successfullyxxx.xxx.xxx5_5600(config-if-adsl-0/1)#! EVENT WARNING 2012-09-21 19:01:09 ALARM NAME :ADSL port deactivation PARAMETERS :Frame ID: 0, Slot ID: 1, Port ID: 1xxx.xxx.xxx5_5600(config-if-adsl-0/1)# Deactivate port 3 successfullyxxx.xxx.xxx5_5600(config-if-adsl-0/1)# Deactivate port 4 successfullyxxx.xxx.xxx5_5600(config-if-adsl-0/1)#! EVENT WARNING 2012-09-21 19:01:09 ALARM NAME :ADSL port deactivation PARAMETERS :Frame ID: 0, Slot ID: 1, Port ID: 2xxx.xxx.xxx5_5600(config-if-adsl-0/1)#! EVENT WARNING 2012-09-21 19:01:09 ALARM NAME :ADSL port deactivation PARAMETERS :Frame ID: 0, Slot ID: 1, Port ID: 3xxx.xxx.xxx5_5600(config-if-adsl-0/1)#! EVENT WARNING 2012-09-21 19:01:09 ALARM NAME :ADSL port deactivation PARAMETERS :Frame ID: 0, Slot ID: 1, Port ID: 4xxx.xxx.xxx5_5600(config-if-adsl-0/1)# Deactivate port 5 successfullyxxx.xxx.xxx5_5600(config-if-adsl-0/1)# Deactivate port 6 successfullyxxx.xxx.xxx5_5600(config-if-adsl-0/1)# Deactivate port 7 successfullyxxx.xxx.xxx5_5600(config-if-adsl-0/1)# Deactivate port 8 successfullyxxx.xxx.xxx5_5600(config-if-adsl-0/1)#! EVENT WARNING 2012-09-21 19:01:09 ALARM NAME :ADSL port deactivation PARAMETERS :Frame ID: 0, Slot ID: 1, Port ID: 5xxx.xxx.xxx5_5600(config-if-adsl-0/1)# Deactivate port 9 successfullyxxx.xxx.xxx5_5600(config-if-adsl-0/1)# Deactivate port 10 successfullyxxx.xxx.xxx5_5600(config-if-adsl-0/1)#! EVENT WARNING 2012-09-21 19:01:09 ALARM NAME :ADSL port deactivation PARAMETERS :Frame ID: 0, Slot ID: 1, Port ID: 6xxx.xxx.xxx5_5600(config-if-adsl-0/1)#! EVENT WARNING 2012-09-21 19:01:09 ALARM NAME :ADSL port deactivation PARAMETERS :Frame ID: 0, Slot ID: 1, Port ID: 7xxx.xxx.xxx5_5600(config-if-adsl-0/1)# Deactivate port 11 successfullyxxx.xxx.xxx5_5600(config-if-adsl-0/1)# Deactivate port 12 successfullyxxx.xxx.xxx5_5600(config-if-adsl-0/1)# Deactivate port 13 successfullyxxx.xxx.xxx5_5600(config-if-adsl-0/1)#! EVENT WARNING 2012-09-21 19:01:09 ALARM NAME :ADSL port deactivation PARAMETERS :Frame ID: 0, Slot ID: 1, Port ID: 8xxx.xxx.xxx5_5600(config-if-adsl-0/1)#! EVENT WARNING 2012-09-21 19:01:09 ALARM NAME :ADSL port deactivation PARAMETERS :Frame ID: 0, Slot ID: 1, Port ID: 9xxx.xxx.xxx5_5600(config-if-adsl-0/1)# Deactivate port 14 successfullyxxx.xxx.xxx5_5600(config-if-adsl-0/1)# Deactivate port 15 successfullyxxx.xxx.xxx5_5600(config-if-adsl-0/1)#! EVENT WARNING 2012-09-21 19:01:09 ALARM NAME :ADSL port deactivation PARAMETERS :Frame ID: 0, Slot ID: 1, Port ID:10xxx.xxx.xxx5_5600(config-if-adsl-0/1)#! EVENT WARNING 2012-09-21 19:01:09 ALARM NAME :ADSL port deactivation PARAMETERS :Frame ID: 0, Slot ID: 1, Port ID:11xxx.xxx.xxx5_5600(config-if-adsl-0/1)#! EVENT WARNING 2012-09-21 19:01:09 ALARM NAME :ADSL port deactivation PARAMETERS :Frame ID: 0, Slot ID: 1, Port ID:12xxx.xxx.xxx5_5600(config-if-adsl-0/1)# Deactivate port 16 successfullyxxx.xxx.xxx5_5600(config-if-adsl-0/1)# Deactivate port 17 successfullyxxx.xxx.xxx5_5600(config-if-adsl-0/1)# Deactivate port 18 successfullyxxx.xxx.xxx5_5600(config-if-adsl-0/1)#! EVENT WARNING 2012-09-21 19:01:09 ALARM NAME :ADSL port deactivation PARAMETERS :Frame ID: 0, Slot ID: 1, Port ID:13xxx.xxx.xxx5_5600(config-if-adsl-0/1)#! EVENT WARNING 2012-09-21 19:01:09 ALARM NAME :ADSL port deactivation PARAMETERS :Frame ID: 0, Slot ID: 1, Port ID:14xxx.xxx.xxx5_5600(config-if-adsl-0/1)#! EVENT WARNING 2012-09-21 19:01:09 ALARM NAME :ADSL port deactivation PARAMETERS :Frame ID: 0, Slot ID: 1, Port ID:15xxx.xxx.xxx5_5600(config-if-adsl-0/1)# Deactivate port 19 successfullyxxx.xxx.xxx5_5600(config-if-adsl-0/1)# Deactivate port 20 successfullyxxx.xxx.xxx5_5600(config-if-adsl-0/1)# Deactivate port 21 successfullyxxx.xxx.xxx5_5600(config-if-adsl-0/1)#! EVENT WARNING 2012-09-21 19:01:09 ALARM NAME :ADSL port deactivation PARAMETERS :Frame ID: 0, Slot ID: 1, Port ID:16xxx.xxx.xxx5_5600(config-if-adsl-0/1)#! EVENT WARNING 2012-09-21 19:01:09 ALARM NAME :ADSL port deactivation PARAMETERS :Frame ID: 0, Slot ID: 1, Port ID:17xxx.xxx.xxx5_5600(config-if-adsl-0/1)#! EVENT WARNING 2012-09-21 19:01:09 ALARM NAME :ADSL port deactivation PARAMETERS :Frame ID: 0, Slot ID: 1, Port ID:18xxx.xxx.xxx5_5600(config-if-adsl-0/1)# Deactivate port 22 successfullyxxx.xxx.xxx5_5600(config-if-adsl-0/1)# Deactivate port 23 successfullyxxx.xxx.xxx5_5600(config-if-adsl-0/1)# Deactivate port 24 successfullyxxx.xxx.xxx5_5600(config-if-adsl-0/1)#! EVENT WARNING 2012-09-21 19:01:09 ALARM NAME :ADSL port deactivation PARAMETERS :Frame ID: 0, Slot ID: 1, Port ID:19xxx.xxx.xxx5_5600(config-if-adsl-0/1)#! EVENT WARNING 2012-09-21 19:01:09 ALARM NAME :ADSL port deactivation PARAMETERS :Frame ID: 0, Slot ID: 1, Port ID:20xxx.xxx.xxx5_5600(config-if-adsl-0/1)#! EVENT WARNING 2012-09-21 19:01:09 ALARM NAME :ADSL port deactivation PARAMETERS :Frame ID: 0, Slot ID: 1, Port ID:21xxx.xxx.xxx5_5600(config-if-adsl-0/1)# Deactivate port 25 successfullyxxx.xxx.xxx5_5600(config-if-adsl-0/1)# Deactivate port 26 successfullyxxx.xxx.xxx5_5600(config-if-adsl-0/1)# Deactivate port 27 successfullyxxx.xxx.xxx5_5600(config-if-adsl-0/1)#! EVENT WARNING 2012-09-21 19:01:09 ALARM NAME :ADSL port deactivation PARAMETERS :Frame ID: 0, Slot ID: 1, Port ID:22xxx.xxx.xxx5_5600(config-if-adsl-0/1)#! EVENT WARNING 2012-09-21 19:01:09 ALARM NAME :ADSL port deactivation PARAMETERS :Frame ID: 0, Slot ID: 1, Port ID:23xxx.xxx.xxx5_5600(config-if-adsl-0/1)#! EVENT WARNING 2012-09-21 19:01:09 ALARM NAME :ADSL port deactivation PARAMETERS :Frame ID: 0, Slot ID: 1, Port ID:24xxx.xxx.xxx5_5600(config-if-adsl-0/1)# Deactivate port 28 successfullyxxx.xxx.xxx5_5600(config-if-adsl-0/1)# Deactivate port 29 successfullyxxx.xxx.xxx5_5600(config-if-adsl-0/1)# Deactivate port 30 successfullyxxx.xxx.xxx5_5600(config-if-adsl-0/1)#! EVENT WARNING 2012-09-21 19:01:09 ALARM NAME :ADSL port deactivation PARAMETERS :Frame ID: 0, Slot ID: 1, Port ID:25xxx.xxx.xxx5_5600(config-if-adsl-0/1)#! EVENT WARNING 2012-09-21 19:01:09 ALARM NAME :ADSL port deactivation PARAMETERS :Frame ID: 0, Slot ID: 1, Port ID:26xxx.xxx.xxx5_5600(config-if-adsl-0/1)#! EVENT WARNING 2012-09-21 19:01:09 ALARM NAME :ADSL port deactivation PARAMETERS :Frame ID: 0, Slot ID: 1, Port ID:27xxx.xxx.xxx5_5600(config-if-adsl-0/1)# Deactivate port 31 successfullyxxx.xxx.xxx5_5600(config-if-adsl-0/1)#! EVENT WARNING 2012-09-21 19:01:09 ALARM NAME :ADSL port deactivation PARAMETERS :Frame ID: 0, Slot ID: 1, Port ID:28xxx.xxx.xxx5_5600(config-if-adsl-0/1)#! EVENT WARNING 2012-09-21 19:01:09 ALARM NAME :ADSL port deactivation PARAMETERS :Frame ID: 0, Slot ID: 1, Port ID:29xxx.xxx.xxx5_5600(config-if-adsl-0/1)#! EVENT WARNING 2012-09-21 19:01:09 ALARM NAME :ADSL port deactivation PARAMETERS :Frame ID: 0, Slot ID: 1, Port ID:30xxx.xxx.xxx5_5600(config-if-adsl-0/1)#! EVENT WARNING 2012-09-21 19:01:09 ALARM NAME :ADSL port deactivation PARAMETERS :Frame ID: 0, Slot ID: 1, Port ID:31xxx.xxx.xxx5_5600(config-if-adsl-0/1)#activate all profile-index 7xxx.xxx.xxx5_5600(config-if-adsl-0/1)# Send the command to activate port 0 successfullyxxx.xxx.xxx5_5600(config-if-adsl-0/1)# Send the command to activate port 1 successfullyxxx.xxx.xxx5_5600(config-if-adsl-0/1)# Send the command to activate port 2 successfullyxxx.xxx.xxx5_5600(config-if-adsl-0/1)# Send the command to activate port 3 successfullyxxx.xxx.xxx5_5600(config-if-adsl-0/1)# Send the command to activate port 4 successfullyxxx.xxx.xxx5_5600(config-if-adsl-0/1)# Send the command to activate port 5 successfullyxxx.xxx.xxx5_5600(config-if-adsl-0/1)# Send the command to activate port 6 successfullyxxx.xxx.xxx5_5600(config-if-adsl-0/1)# Send the command to activate port 7 successfullyxxx.xxx.xxx5_5600(config-if-adsl-0/1)# Send the command to activate port 8 successfullyxxx.xxx.xxx5_5600(config-if-adsl-0/1)# Send the command to activate port 9 successfullyxxx.xxx.xxx5_5600(config-if-adsl-0/1)# Send the command to activate port 10 successfullyxxx.xxx.xxx5_5600(config-if-adsl-0/1)# Send the command to activate port 11 successfullyxxx.xxx.xxx5_5600(config-if-adsl-0/1)# Send the command to activate port 12 successfullyxxx.xxx.xxx5_5600(config-if-adsl-0/1)# Send the command to activate port 13 successfullyxxx.xxx.xxx5_5600(config-if-adsl-0/1)# Send the command to activate port 14 successfullyxxx.xxx.xxx5_5600(config-if-adsl-0/1)# Send the command to activate port 15 successfullyxxx.xxx.xxx5_5600(config-if-adsl-0/1)# Send the command to activate port 16 successfullyxxx.xxx.xxx5_5600(config-if-adsl-0/1)# Send the command to activate port 17 successfullyxxx.xxx.xxx5_5600(config-if-adsl-0/1)# Send the command to activate port 18 successfullyxxx.xxx.xxx5_5600(config-if-adsl-0/1)# Send the command to activate port 19 successfullyxxx.xxx.xxx5_5600(config-if-adsl-0/1)# Send the command to activate port 20 successfullyxxx.xxx.xxx5_5600(config-if-adsl-0/1)# Send the command to activate port 21 successfullyxxx.xxx.xxx5_5600(config-if-adsl-0/1)# Send the command to activate port 22 successfullyxxx.xxx.xxx5_5600(config-if-adsl-0/1)# Send the command to activate port 23 successfullyxxx.xxx.xxx5_5600(config-if-adsl-0/1)# Send the command to activate port 24 successfullyxxx.xxx.xxx5_5600(config-if-adsl-0/1)# Send the command to activate port 25 successfullyxxx.xxx.xxx5_5600(config-if-adsl-0/1)# Send the command to activate port 26 successfullyxxx.xxx.xxx5_5600(config-if-adsl-0/1)# Send the command to activate port 27 successfullyxxx.xxx.xxx5_5600(config-if-adsl-0/1)# Send the command to activate port 28 successfullyxxx.xxx.xxx5_5600(config-if-adsl-0/1)# Send the command to activate port 29 successfullyxxx.xxx.xxx5_5600(config-if-adsl-0/1)# Send the command to activate port 30 successfullyxxx.xxx.xxx5_5600(config-if-adsl-0/1)# Send the command to activate port 31 successfullyxxx.xxx.xxx5_5600(config-if-adsl-0/1)#quitxxx.xxx.xxx5_5600(config)#=5600文件为 5600ip.txt 用来读取每个5600的ip的xxx.xxx.xxx.104 202xxx.xxx.xxx.105 200xxx.xxx.xxx.106 201xxx.xxx.xxx.113 209xxx.xxx.xxx.116 212xxx.xxx.xxx.122 218内容完;第一个值为ip,第二个为svlan第二个值暂时没用哦=完整代码:5600批量修改6.5M.vbs#$language = VBScript#$interface = 1.0Dim g_szErrorsSub Main() Dim objFso, objShell, objTextStream, szLine dim bandband= crt.Dialog.Prompt(输入宽带(M), 输入, 6.5, false) band=Trim(band)if(band=) thencrt.Dialog.MessageBox 宽带为空!exit subend if Set objFso = CreateObject(Scripting.FileSystemObject) Set objShell = CreateObject(WScript.Shell) Dim szMyDocs, szSessionsFile szMyDocs = objShell.SpecialFolders(5600ip.txt) szSessionsFile = e:Easy5600批量ip.txt if Not objFso.FileExists(szSessionsFile) then crt.Dialog.MessageBox Session list file not found: & vbcrlf & _ vbcrlf & _ szSessionsFile & vbcrlf & vbcrlf & _ Create a session list file as described in the description of & _ this script code and then run the script again. exit sub end if Set objTextStream = objFso.OpenTextFile(szSessionsFile, 1, false) Dim szSession Do While Not objTextStream.AtEndOfStream szSession = szSession = Trim(objTextStream.ReadLine) if szSession= then exit sub end if p=Split(szSession) telnet 5600 ip,循环执行 dim str1,str2,op1,op2,op3,op4str1=str2= op1=0op2=0op3=0op4=0 On Error Resume Next crt.Session.Connect(/telnet & chr(34) & p(0) & chr(34) szError = Err.Description On Error Goto 0Dim objTabSet objTab = crt.GetScriptTabobjTab.Screen.Synchronous = TrueobjTab.session.LogFileName = e:Easylog & Date() & & p(0) & .txt objTab.session.Log(true)objTab.Session.Connect /telnet & p(0) if objTab.Session.Connected=false thenexit sub end if if objTab.Session.Connected then objTab.Screen.Synchronous = Trueend if objTab.Screen.WaitForString User name:objTab.Screen.Send root & vbcrobjTab.Screen.WaitForString User password:objTab.Screen.Send dslam2011 & vbcrobjTab.Screen.WaitForString objTab.Screen.Send en & vbcrobjTab.Screen.WaitForString #objTab.Screen.Send conf & vbcrobjTab.Screen.WaitForString (config)#objTab.Screen.Send display board 0&vbcrobjTab.Screen.WaitForString (config)#str1=objTab.Screen.ReadString(config)#,3)msgbox(str1)取得每块宽带板子objTab.Screen.WaitForString (config)#str2=RePlace(str1,Normal,)len1=Len(str1)len2=Len(str2)dim nc,nxnc=0nx=0nc=(len1-len2)/6nc=Split(str1,Normal)nx=UBound(nc)nx=CInt(nc)msgbox(nx)dim z,x,c,str3str3=找到批量的模板objTab.Screen.Send display current-configuration section global-config | include &band*1024&vbcrz=objTab.Screen.ReadString(name,4)msgbox(z)op8=InStr(20,z,band*1024)没找到模板则创建一个if Trim(z)= thenobjTab.Screen.Send adsl line-profile add &vbcrobjTab.Screen.WaitForString :objTab.Screen.Send vbcrobjTab.Screen.WaitForString n:objTab.Screen.Send vbcrobjTab.Screen.WaitForString 0:objTab.Screen.Send 1 & vbcrobjTab.Screen.WaitForString n:objTab.Screen.Send vbcrobjTab.Screen.WaitForString 0:objTab.Screen.Send vbcrobjTab.Screen.WaitForString n:objTab.Screen.Send vbcrobjTab.Screen.WaitForString 1:objTab.Screen.Send vbcrobjTab.Screen.WaitForString n:objTab.Screen.Send vbcrobjTab.Screen.WaitForString n:objTab.Screen.

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论