版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
-Python⾼级编程-Python⾼级编程-2023深圳职业技术⼤学深圳职业技术⼤学-Python⾼级编程-2023Netmiko实验⼿册Netmiko简介Paramiko实现了SSHv2的功能,但它并不是专门为⽹设备开发的模块。在⽤Paramiko和⽹络设备交互时并不很简单和通⽤。Netmiko基于Paramiko开发专门处理⽹络设备的SSHSSH连接。源代码:/ktbyers/netmiko安装Netmiko在命令⾏中使⽤下⾯命令安装最新版本的Netmiko模块:pippipinstallnetmiko-i/pypi/simple/--trusted-host可以看到类似以下输出:C:\Users\Administrator>pipinstallnetmikoCollectingnetmikoUsingcachednetmiko-3.3.3-py3-none-any.whl(168kB)CollectingtenacityUsingcachedtenacity-7.0.0-py2.py3-none-any.whl(23kB)Collectingntc-templatesUsingcachedntc_templates-2.0.0-py3-none-any.whl(280kB)Requirementalreadysatisfied:paramiko>=2.6.0ind:\python3_7_6\lib\site-packages(fromnetmiko)(2.7.2)Collectingscp>=0.13.2Usingcachedscp-0.13.3-py2.py3-none-any.whl(8.2kB)CollectingpyserialUsingcachedpyserial-3.5-py2.py3-none-any.whl(90kB)Requirementalreadysatisfied:setuptools>=38.4.0ind:\python3_7_6\lib\site-packages(fromnetmiko)(41.2.0)Requirementalreadysatisfied:six>=1.9.0ind:\python3_7_6\lib\site-packages(fromtenacity->netmiko)(1.14.0)Collectingtextfsm<2.0.0,>=1.1.0Usingcachedtextfsm-1.1.0-py2.py3-none-any.whl(37kB)Requirementalreadysatisfied:cryptography>=2.5ind:\python3_7_6\lib\site-packages(fromparamiko>=2.6.0->netmiko)(3.4.6)Requirementalreadysatisfied:pynacl>=1.0.1ind:\python3_7_6\lib\site-packages(fromparamiko>=2.6.0->netmiko)(1.4.0)Requirementalreadysatisfied:bcrypt>=3.1.3ind:\python3_7_6\lib\site-packages(fromparamiko>=2.6.0->netmiko)(3.2.0)深圳职业技术⼤学-Python深圳职业技术⼤学-Python⾼级编程-2023CollectingfutureDownloadingfuture-0.18.2.tar.gz(829kB)|████████████████████████████████|829kB5.4kB/sRequirementalreadysatisfied:cffi>=1.12ind:\python3_7_6\lib\site-packages(fromcryptography>=2.5->paramiko>=2.6.0->netmiko)(1.14.5)Requirementalreadysatisfied:pycparserind:\python3_7_6\lib\site-packages(fromcffi>=1.12->cryptography>=2.5->paramiko>=2.6.0->netmiko)(2.20)Usinglegacy'setup.pyinstall'forfuture,sincepackage'wheel'isnotinstalled.Installingcollectedpackages:tenacity,future,textfsm,ntc-templates,scp,pyserial,netmikoRunningsetup.pyinstallforfuture...doneSuccessfullyinstalledfuture-0.18.2netmiko-3.3.3ntc-templates-2.0.0pyserial-3.5scp-0.13.3tenacity-7.0.0textfsm-1.1.0查看netmiko的版本,可能有更新的版本,此处展⽰的是3.3.3版本importimportnetmikoprint(netmiko.version)3.3.3实验⼀:通过Netmiko获取设备的ARP表⽹络拓扑在eNSP中搭建以下⽹络拓扑,交换机型号为S5700,Cloud1配置与Paramiko实验中相同,不再赘述。配置设备的SSH功能Netmiko使⽤SSHv2连接设备,⾸先需要进⾏华为交换机S5700的SSH配置。注意:⽬前,Netmiko中使⽤的设备不能是CE12800,因为经过测试发现时,不能使⽤“system-viewimmediate”和“commit”等。为⽅便起见,本实验使⽤密码登录,不使⽤公钥登录。<Huawei>system-view[Huawei]sysnameSW1[SW1]intvlanif1[SW1-Vlanif1]ipaddress0024[SW1-Vlanif1]quit[SW1]stelnetserverenableInfo:SucceededinstartingtheStelnetserver.[SW1]user-interfacevty04[SW1-ui-vty0-4]authentication-modeaaa[SW1-ui-vty0-4]userprivilegelevel3[SW1-ui-vty0-4]protocolinboundssh[SW1-ui-vty0-4]quit[SW1][SW1]aaa[SW1-aaa]local-userpythonpasswordcipherHuawei12#$Info:Addanewuser.[SW1-aaa]local-userpythonservice-typessh[SW1-aaa]quit[SW1][SW1]sshuserpythonInfo:SucceededinaddinganewSSHuser.[SW1]sshuserpythonauthentication-typepassword[SW1]sshuserpythonservice-typestelnetsystem-viewsysnameSW1intvlanif1ipaddress0024quitstelnetserverenableuser-interfacevty04authentication-modeaaauserprivilegelevel3protocolinboundsshquitaaalocal-userpythonpasswordcipherHuawei12#$local-userpythonservice-typesshquitsshuserpythonsshuserpythonauthentication-typepasswordsshuserpythonservice-typestelnet使⽤Netmiko登录SW1Python代码#1#1、导⼊netmiko模块importnetmiko#2、初始化netmiko.ConnectHandler类.初始化后,与⽹络设备建⽴SSH的连接con=netmiko.ConnectHandler(device_type="huawei",ip="00",username="python",password="Huawei12#$")#3、向⽹备发送⼀个命令"displayarp".send_command⽅法与paramiko中的exe_command⽅法不⼀样。out=con.send_command("displayarp")print(out)#4、关闭此SSH连接con.disconnect()I- I- Vlanif1D-0 GE0/0/11#执⾏输出<SW1>IP#执⾏输出<SW1>IPADDRESSMACADDRESSEXPIRE(M)TYPEINTERFACEVLANVPN-INSTANCE00 4c1f-cc75-80a3 0 0a00-2700-0013 19Total:2 Dynamic:1 Static:0 Interface:1实验⼆:使⽤Netmiko模块配置设备本实验中需要通过Netmiko来配置交换机的G0/0/10端⼜到Vlan10与实验⼀相同
⽹络拓扑与实验⼀相同
配置设备SSHPython代码#1、导⼊模块fromnetmikoimportConnectHandler#2、定义设备信息dev={'device_type':'huawei','ip':'00','username':'python','password':'Huawei12#$'}#3、连接设备con=ConnectHandler(**dev)#4、将需要的配置命令,放进⼀个列表中config_commands=['vlan10','intg0/0/10','descriptionTHISPORTISVLAN10','portlink-typeaccess','portdefaultvlan10']#5、批量发送命令到设备ret=con.send_config_set(config_commands)print(ret)#6、关闭连接con.disconnect()运⾏以上代码得到的输出如下:system-viewsystem-viewEntersystemview,returnuserviewwithCtrl+Z.[SW1]vlan10[SW1-vlan10]intg0/0/10[SW1-GigabitEthernet0/0/10]descriptionTHISPORTISVLAN10[SW1-GigabitEthernet0/0/10]portlink-typeaccess[SW1-GigabitEthernet0/0/10]portdefaultvlan10[SW1-GigabitEthernet0/0/10]return<SW1>实验三:使⽤Netmiko配置OSPF⽹络拓扑按照下列拓扑搭建⽹络环境。交换机型号为S5700,路由器型号为:AR2220。5.2.1配置SW1的SSH
配置设备的SSH功能#1、设置接⼝地址:<Huawei>system-viewEntersystemview,returnuserviewwithCtrl+Z.[Huawei]sysnameSW1[SW1]intvlanif1[SW1-Vlanif1]ipaddress0024[SW1-Vlanif1]quit#2、开启stelnet,配置⽤户访问[SW1]stelnetserverenableInfo:SucceededinstartingtheStelnetserver.[SW1]user-interfacevty04[SW1-ui-vty0-4]authentication-modeaaa[SW1-ui-vty0-4]userprivilegelevel3[SW1-ui-vty0-4]protocolinboundssh[SW1-ui-vty0-4]quit[SW1]#3、添加⽤户:[SW1]aaa[SW1-aaa]local-userpythonpasswordcipherHuawei12#$Info:Addanewuser.[SW1-aaa]local-userpythonservice-typessh[SW1-aaa]quit#4、添加SSH⽤户,使⽤⼝令认证:[SW1]sshuserpythonInfo:SucceededinaddinganewSSHuser.[SW1]sshuserpythonauthentication-typepassword[SW1]sshuserpythonservice-typestelnet的SSH<Huawei>system-view<Huawei>system-viewEntersystemview,returnuserviewwithCtrl+Z.[Huawei]sysnameR1[R1]intg0/0/2[R1-GigabitEthernet0/0/2] ipaddress0124[R1-GigabitEthernet0/0/2] quit[R1]stelnetserverenableInfo:SucceededinstartingtheSTELNETserver.[R1]user-interfacevty04[R1-ui-vty0-4]authentication-modeaaa[R1-ui-vty0-4]userprivilegelevel3[R1-ui-vty0-4]protocolinboundssh[R1-ui-vty0-4]quit[R1]aaa[R1-aaa][R1-aaa]local-userpythonpasswordcipherHuawei12#$Info:Addanewuser.[R1-aaa]local-userpythonservice-typessh[R1-aaa]quit[R1]sshuserpythonauthentication-typepasswordAuthenticationtypesetted,andwillbeineffectnexttime[R1]的SSH<Huawei>system-viewEntersystemview,returnuserviewwithCtrl+Z.[Huawei]sysnameR2[R2]intg0/0/0[R2-GigabitEthernet0/0/0] ipaddress0224[R2-GigabitEthernet0/0/0] quit[R2]stelnetserverenableInfo:SucceededinstartingtheSTELNETserver.[R2]user-interfacevty04[R2-ui-vty0-4]authentication-modeaaa[R2-ui-vty0-4]userprivilegelevel3[R2-ui-vty0-4]protocolinboundssh[R2-ui-vty0-4]quit[R2]aaa[R2-aaa][R2-aaa]local-userpythonpasswordcipherHuawei12#$Info:Addanewuser.[R2-aaa]local-userpythonservice-typessh[R2-aaa]quit[R2]sshuserpythonauthentication-typepasswordAuthenticationtypesetted,andwillbeineffectnexttime[R2]5.3Python代码#1、导⼊模块fromnetmikoimportConnectHandler#2、分别定义3台设备信息sw1={'device_type':'huawei','ip':'00','username':'python','password':'Huawei12#$'}r1={'device_type':'huawei','ip':'01','username':'python','password':'Huawei12#$'}r2={'device_type':'huawei','ip':'02','username':'python','password':'Huawei12#$'}#3、将3个设备组合为⼀个列表devices=[sw1,r1,r2]#4、定义每个设备上的配置sw1_conf=["ospf10","area0","network55"]r1_conf=["intloopback0","ipaddre55","ospf10","area0","network55","network"]r2_conf=["intloopback0","ipaddre55","ospf10","area0","network55","network"]#5、将3个设备配置组合为⼀个列表confs=[sw1_conf,r1_conf,r2_conf]6、通过循环⼀次性配置3台设备foriinrange(len(devices)):con=ConnectHandler(**devices[i])out=con.send_config_set(confs[i])print(out)con.disconnect()思考:以上Python代码有哪些可改进的地⽅?执⾏代码可以看到以下输出system-viewEntersystemview,returnuserviewwithCtrl+Z.[SW1]ospf10[SW1-ospf-10]area0[SW1-ospf-10-area-]network55[SW1-ospf-10-area-]return<SW1>system-viewEntersystemview,returnuserviewwithCtrl+Z.[R1]intloopback0[R1-LoopBack0]ipaddre55[R1-LoopBack0]ospf10[R1-ospf-10]area0[R1-ospf-10-area-]network55[R1-ospf-10-area-]network[R1-ospf-10-area-]return<R1>system-viewEntersystemview,returnuserviewwithCtrl+Z.[R2]intloopback0[R2-LoopBack0]ipaddre55[R2-LoopBack0]ipaddre55[R2-LoopBack0]ospf10[R2-ospf-10]area0[R2-ospf-10-area-]network55[R2-ospf-10-area-]network[R2-ospf-10-area-]return<R2>Python⾼级编程Python⾼级编程-2023NETCONFSchema实验⼿册1NETCONF简介NETCONF(NetworkConfigurationProtocol)⽹络配置协议,提供⼀套管理⽹络设备的机制。⽤户可以使⽤这套机制增加、修改、删除⽹络设备的配置,获取⽹络设备的配置和状态信息。NETCONF当前有两种建模语⾔,Schema和YANG:Schema是为了描述XML⽂档⽽定义的⼀套规则。Schema⽂件中定义了设备所有管理对象,以及管理对象的层次关系、读写属性和约束条件。是专门为NETCONF协议设计的数据建模语⾔,⽤来为NETCONF协议设计可操作的配置数据、状态数据模型、远程调⽤(RPCs)模型和通知机制等。2安装NETCONF客户端ncclient是⼀个专门⽤于NETCONF客户端的Python库。它提供直观的API,将NETCONF的XML编码特性映射到Python构造和习语,并使编写⽹络管理脚本更容易。使⽤下列命令安装ncclientpippipinstallncclient-i/pypi/simple/--trusted-hostCollectingncclientDownloadingncclient-0.6.10.tar.gz(105kB)|████████████████████████████████|105kB3.5kB/sRequirementalreadysatisfied:setuptools>0.6ind:\python3_7_6\lib\site-packages(fromncclient)(41.2.0)Requirementalreadysatisfied:paramiko>=1.15.0ind:\python3_7_6\lib\site-packages(fromncclient)(2.7.2)Collectinglxml>=3.3.0Downloadinglxml-4.6.2-cp37-cp37m-win_amd64.whl(3.5MB)|████████████████████████████████|3.5MB5.8kB/sRequirementalreadysatisfied:sixind:\python3_7_6\lib\site-packages(fromncclient)(1.14.0)Requirementalreadysatisfied:cryptography>=2.5ind:\python3_7_6\lib\site-packages(fromparamiko>=1.15.0->ncclient)(3.4.6)Requirementalreadysatisfied:bcrypt>=3.1.3ind:\python3_7_6\lib\site-packages(fromparamiko>=1.15.0->ncclient)(3.2.0)Requirementalreadysatisfied:pynacl>=1.0.1ind:\python3_7_6\lib\site-packages(fromparamiko>=1.15.0->ncclient)(1.4.0)Requirementalreadysatisfied:cffi>=1.12ind:\python3_7_6\lib\site-packages(fromcryptography>=2.5->paramiko>=1.15.0->ncclient)(1.14.5)深圳职业技术⼤学-Python深圳职业技术⼤学-Python⾼级编程-2023Requirementalreadysatisfied:pycparserind:\python3_7_6\lib\site-packages(fromcffi>=1.12->cryptography>=2.5->paramiko>=1.15.0->ncclient)(2.20)Usinglegacy'setup.pyinstall'forncclient,sincepackage'wheel'isnotinstalled.Installingcollectedpackages:lxml,ncclientRunningsetup.pyinstallforncclient...doneSuccessfullyinstalledlxml-4.6.2ncclient-0.6.10WARNING:Youareusingpipversion20.2.2;however,version21.0.1isavailable.#查看ncclientC:\Users\Administrator>pythonPython3.9.6(tags/v3.9.6:db3ff76,Jun282021,15:26:21)[MSCv.192964bit(AMD64)]onwin32Type"help","copyright","credits"or"license"formoreinformation.>>>importncclient>>>ncclient.version'0.6.12'>>>>>>exit()C:\Users\Administrator>实验⼀:Schema获取设备配置通过NETCONF协议获取设备的running配置。⽹络拓扑设置接⼜地址:
配置设备<Huawei>system-viewimmediately<Huawei>system-viewimmediatelyEntersystemview,returnuserviewwithCtrl+Z.[Huawei]sysnameCE1[CE1]intvlanif1[CE1-Vlanif1]ipaddress0024[CE1-Vlanif1]quit[CE1]打开stelnet,配置NETCONF[CE1]stelnetserverenable[CE1]aaa[CE1-aaa]local-usernetconfpasswordirreversible-cipherHuawei12#$[CE1-aaa]local-usernetconfservice-typessh[CE1-aaa]local-usernetconflevel3[CE1-aaa]quit[CE1]sshusernetconfauthentication-typepassword[CE1]sshusernetconfservice-typesnetconf[CE1]snetconfserverenable[CE1]netconf[CE1-netconf][CE1-netconf]protocolinboundsshport830[CE1-netconf]quit[CE1]全部配置指令如下:system-viewimmediatelysysnameCE1system-viewimmediatelysysnameCE1intvlanif1ipaddress0024quitintg1/0/0undoshutdownquitstelnetserverenableaaalocal-usernetconfpasswordirreversible-cipherHuawei12#$local-usernetconfservice-typesshlocal-usernetconflevel3quitsshusernetconfauthentication-typepasswordsshusernetconfservice-typesnetconfsnetconfserverenablenetconfprotocolinboundsshport830quit导⼊需要的python模块Python代码fromfromncclientimportmanagerfromncclientimportoperations定义变量,对应CE1的参数,分别为主机IP、NETCONF端⼜、NETCONF⽤户名和NETCONF密码ipip='00'netconf_port='830'netconf_user='netconf'netconf_password='Huawei12#$'建⽴NETCONF连接,此处定义了⼀个函数huawei_connect(hostportuserpassword)。函数输⼊四个参数为NETCONF主机的IP、端⼜、NETCONF⽤户名和密码。defdefhuawei_connect(host,port,user,password):returnmanager.connect(host=host,port=port,username=user,password=password,hostkey_verify=False,device_params={'name':"huawei"},allow_agent=False,look_for_keys=False)建⽴连接mm=huawei_connect(ip,netconf_port,netconf_user,netconf_password)使⽤get_config(),获取远程设备的running配置,返回的数据是xml格式。ce1_confce1_conf=m.get_config(source='running')print(ce1_conf)得到以下xml输出<?xmlversion="1.0"encoding="UTF-8"?><rpc-replymessage-id="urn:uuid:91fa68ef-8c53-4dc2-bd56-dc1dd13bbd49"xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"set-id="26"><data><ethernetxmlns="/netconf/vrp"format-version="1.0"content-version="1.0"><ethernetIfs><ethernetIf><ifName>GE1/0/0</ifName><ifIndex>5</ifIndex><l2Enable>enable</l2Enable><vlanAssigns/><l2Attribute><ifIndex>5</ifIndex><linkType>access</linkType><pvid>1</pvid><trunkVlans/><untagVlans/><taggedPacketDiscard>false</taggedPacketDiscard><portBridgEnable>false</portBridgEnable><portActiveVlanInfos><portActiveVlanInfo><unTagVlanList>1</unTagVlanList><tagVlanList/></portActiveVlanInfo></portActiveVlanInfos><muxVlanEna><enableVlans/></muxVlanEna></l2Attribute></ethernetIf><ethernetIf><ifName>GE1/0/1</ifName><ifIndex>6</ifIndex><l2Enable>enable</l2Enable><vlanAssigns/><l2Attribute><ifIndex>6</ifIndex><linkType>access</linkType><pvid>1</pvid><trunkVlans/><untagVlans/><taggedPacketDiscard>false</taggedPacketDiscard><portBridgEnable>false</portBridgEnable><portActiveVlanInfos><portActiveVlanInfo><unTagVlanList>1</unTagVlanList><tagVlanList/></portActiveVlanInfo></portActiveVlanInfos><muxVlanEna><enableVlans/></muxVlanEna></l2Attribute></ethernetIf><ethernetIf><ifName>GE1/0/2</ifName><ifIndex>7</ifIndex><l2Enable>enable</l2Enable><vlanAssigns/><l2Attribute><ifIndex>7</ifIndex><linkType>access</linkType><pvid>1</pvid><trunkVlans/><untagVlans/><taggedPacketDiscard>false</taggedPacketDiscard><portBridgEnable>false</portBridgEnable><portActiveVlanInfos><portActiveVlanInfo><unTagVlanList>1</unTagVlanList><tagVlanList/></portActiveVlanInfo></portActiveVlanInfos><muxVlanEna><enableVlans/></muxVlanEna></l2Attribute></ethernetIf><ethernetIf><ifName>GE1/0/3</ifName><ifIndex>8</ifIndex><l2Enable>enable</l2Enable><vlanAssigns/><l2Attribute><ifIndex>8</ifIndex><linkType>access</linkType><pvid>1</pvid><trunkVlans/><untagVlans/><taggedPacketDiscard>false</taggedPacketDiscard><portBridgEnable>false</portBridgEnable><portActiveVlanInfos><portActiveVlanInfo><unTagVlanList>1</unTagVlanList><tagVlanList/></portActiveVlanInfo></portActiveVlanInfos><muxVlanEna><enableVlans/></muxVlanEna></l2Attribute></ethernetIf><ethernetIf><ifName>GE1/0/4</ifName><ifIndex>9</ifIndex><l2Enable>enable</l2Enable><vlanAssigns/><l2Attribute><ifIndex>9</ifIndex><linkType>access</linkType><pvid>1</pvid><trunkVlans/><untagVlans/><taggedPacketDiscard>false</taggedPacketDiscard><portBridgEnable>false</portBridgEnable><portActiveVlanInfos><portActiveVlanInfo><unTagVlanList>1</unTagVlanList><tagVlanList/></portActiveVlanInfo></portActiveVlanInfos><muxVlanEna><enableVlans/></muxVlanEna></l2Attribute></ethernetIf><ethernetIf><ifName>GE1/0/5</ifName><ifIndex>10</ifIndex><l2Enable>enable</l2Enable><vlanAssigns/><l2Attribute><ifIndex>10</ifIndex><linkType>access</linkType><pvid>1</pvid><trunkVlans/><untagVlans/><taggedPacketDiscard>false</taggedPacketDiscard><portBridgEnable>false</portBridgEnable><portActiveVlanInfos><portActiveVlanInfo><unTagVlanList>1</unTagVlanList><tagVlanList/></portActiveVlanInfo></portActiveVlanInfos><muxVlanEna><enableVlans/></muxVlanEna></l2Attribute></ethernetIf><ethernetIf><ifName>GE1/0/6</ifName><ifIndex>11</ifIndex><l2Enable>enable</l2Enable><vlanAssigns/><l2Attribute><ifIndex>11</ifIndex><linkType>access</linkType><pvid>1</pvid><trunkVlans/><untagVlans/><taggedPacketDiscard>false</taggedPacketDiscard><portBridgEnable>false</portBridgEnable><portActiveVlanInfos><portActiveVlanInfo><unTagVlanList>1</unTagVlanList><tagVlanList/></portActiveVlanInfo></portActiveVlanInfos><muxVlanEna><enableVlans/></muxVlanEna></l2Attribute></ethernetIf><ethernetIf><ifName>GE1/0/7</ifName><ifIndex>12</ifIndex><l2Enable>enable</l2Enable><vlanAssigns/><l2Attribute><ifIndex>12</ifIndex><linkType>access</linkType><pvid>1</pvid><trunkVlans/><untagVlans/><taggedPacketDiscard>false</taggedPacketDiscard><portBridgEnable>false</portBridgEnable><portActiveVlanInfos><portActiveVlanInfo><unTagVlanList>1</unTagVlanList><tagVlanList/></portActiveVlanInfo></portActiveVlanInfos><muxVlanEna><enableVlans/></muxVlanEna></l2Attribute></ethernetIf><ethernetIf><ifName>GE1/0/8</ifName><ifIndex>13</ifIndex><l2Enable>enable</l2Enable><vlanAssigns/><l2Attribute><ifIndex>13</ifIndex><linkType>access</linkType><pvid>1</pvid><trunkVlans/><untagVlans/><taggedPacketDiscard>false</taggedPacketDiscard><portBridgEnable>false</portBridgEnable><portActiveVlanInfos><portActiveVlanInfo><unTagVlanList>1</unTagVlanList><tagVlanList/></portActiveVlanInfo></portActiveVlanInfos><muxVlanEna><enableVlans/></muxVlanEna></l2Attribute></ethernetIf><ethernetIf><ifName>GE1/0/9</ifName><ifIndex>14</ifIndex><l2Enable>enable</l2Enable><vlanAssigns/><l2Attribute><ifIndex>14</ifIndex><linkType>access</linkType><pvid>1</pvid><trunkVlans/><untagVlans/><taggedPacketDiscard>false</taggedPacketDiscard><portBridgEnable>false</portBridgEnable><portActiveVlanInfos><portActiveVlanInfo><unTagVlanList>1</unTagVlanList><tagVlanList/></portActiveVlanInfo></portActiveVlanInfos><muxVlanEna><enableVlans/></muxVlanEna></l2Attribute></ethernetIf></ethernetIfs></ethernet><macxmlns="/netconf/vrp"format-version="1.0"content-version="1.0"><globalAttribute><macAgeTimeEnable>enable</macAgeTimeEnable><macAgingTime>300</macAgingTime></globalAttribute><macUsages><macUsage><slot>0</slot></macUsage><macUsage><slot>1</slot></macUsage></macUsages><macflpDetectGlbAttr><macflpDetectEnable>enable</macflpDetectEnable><macflpDetectLevel>middle</macflpDetectLevel><macflpAgingTime>300</macflpAgingTime><macflpTrapEnable>disable</macflpTrapEnable><macflpTrapInterval/></macflpDetectGlbAttr><macflpDetectExcludeVlan><vlanLists/></macflpDetectExcludeVlan><ifStormContrls><ifStormContrl><ifName>GE1/0/0</ifName><ifIndex>5</ifIndex><action>normal</action><trapEnable>disable</trapEnable><logEnable>disable</logEnable><interval>5</interval></ifStormContrl><ifStormContrl><ifName>GE1/0/1</ifName><ifIndex>6</ifIndex><action>normal</action><trapEnable>disable</trapEnable><logEnable>disable</logEnable><interval>5</interval></ifStormContrl><ifStormContrl><ifName>GE1/0/2</ifName><ifIndex>7</ifIndex><action>normal</action><trapEnable>disable</trapEnable><logEnable>disable</logEnable><interval>5</interval></ifStormContrl><ifStormContrl><ifName>GE1/0/3</ifName><ifIndex>8</ifIndex><action>normal</action><trapEnable>disable</trapEnable><logEnable>disable</logEnable><interval>5</interval></ifStormContrl><ifStormContrl><ifName>GE1/0/4</ifName><ifIndex>9</ifIndex><action>normal</action><trapEnable>disable</trapEnable><logEnable>disable</logEnable><interval>5</interval></ifStormContrl><ifStormContrl><ifName>GE1/0/5</ifName><ifIndex>10</ifIndex><action>normal</action><trapEnable>disable</trapEnable><logEnable>disable</logEnable><interval>5</interval></ifStormContrl><ifStormContrl><ifName>GE1/0/6</ifName><ifIndex>11</ifIndex><action>normal</action><trapEnable>disable</trapEnable><logEnable>disable</logEnable><interval>5</interval></ifStormContrl><ifStormContrl><ifName>GE1/0/7</ifName><ifIndex>12</ifIndex><action>normal</action><trapEnable>disable</trapEnable><logEnable>disable</logEnable><interval>5</interval></ifStormContrl><ifStormContrl><ifName>GE1/0/8</ifName><ifIndex>13</ifIndex><action>normal</action><trapEnable>disable</trapEnable><logEnable>disable</logEnable><interval>5</interval></ifStormContrl><ifStormContrl><ifName>GE1/0/9</ifName><ifIndex>14</ifIndex><action>normal</action><trapEnable>disable</trapEnable><logEnable>disable</logEnable><interval>5</interval></ifStormContrl></ifStormContrls></mac><ftpcxmlns="/netconf/vrp"format-version="1.0"content-version="1.0"><ftpClient><sourceIpv4Address/><sourceInterfaceName/></ftpClient></ftpc><systemxmlns="/netconf/vrp"format-version="1.0"content-version="1.0"><systemInfo><sysName>CE1</sysName><sysContact>R&DBeijing,HuaweiTechnologiesco.,Ltd.</sysContact><sysLocation>BeijingChina</sysLocation><sysDesc>HuaweiVersatileRoutingPlatformSoftware VRP(R)software,Version8.180(CE12800V200R005C10SPC607B607) Copyright(C)2012-2018HuaweiTechnologiesCo.,Ltd. HUAWEICE12800 </sysDesc><sysObjectId>.4.1.20.3</sysObjectId><sysGmtTime>1629043915</sysGmtTime><sysUpTime>506</sysUpTime><sysService>78</sysService><platformName>VRP</platformName><platformVer>V800R018C10SPC607</platformVer><productName>CE12800</productName><productVer>V200R005C10SPC607</productVer><patchVer/><esn>11212323223163164</esn><mac>707B-E8E7-3FA4</mac><lsRole>admin</lsRole><authenFlag>false</authenFlag></systemInfo></system><directrtxmlns="/netconf/vrp"format-version="1.0"content-version="1.0"><directrtvlink><drVlinkIfTags><drVlinkIfTag><ifName>Vlanif1</ifName><addressFamily>ipv4uni</addressFamily><tag>0</tag></drVlinkIfTag></drVlinkIfTags><drVlinkSys><sysIpv4Enable>false</sysIpv4Enable><sysIpv6Enable>false</sysIpv6Enable></drVlinkSys></directrtvlink></directrt><ntpxmlns="/netconf/vrp"format-version="1.0"content-version="1.0"><ntpSystemCfg><maxSessCount>100</maxSessCount><isAuthEnable>false</isAuthEnable><isKodEnable>false</isKodEnable><syncInterval/><minDiscardIntvl>1</minDiscardIntvl><avgDiscardIntvl>5</avgDiscardIntvl><localPort>123</localPort><maxDistance>1</maxDistance></ntpSystemCfg></ntp><opsxmlns="/netconf/vrp"format-version="1.0"content-version="1.0"><assistant><totalAsstSwitch><suspend>false</suspend></totalAsstSwitch></assistant></ops><pp4xmlns="/netconf/vrp"format-version="1.0"content-version="1.0"><globalCfg><udphelperEnable>false</udphelperEnable><dscpPriorityValue/><icmpRateLimitEnable>true</icmpRateLimitEnable><icmpRateLmtThreshold>1500</icmpRateLmtThreshold><icmpTtlExdDrpEnable>false</icmpTtlExdDrpEnable><icmpWithOptDropEnable>false</icmpWithOptDropEnable><icmpBroadEchoEn>true</icmpBroadEchoEn><icmpUnrchRevEn>false</icmpUnrchRevEn></globalCfg><IpOptSecuritys><IpOptSecurity><optionType>routeAlert</optionType><switchOp>enable</switchOp></IpOptSecurity><IpOptSecurity><optionType>routeRecord</optionType><switchOp>enable</switchOp></IpOptSecurity><IpOptSecurity><optionType>sourceRoute</optionType><switchOp>enable</switchOp></IpOptSecurity><IpOptSecurity><optionType>timeStamp</optionType><switchOp>enable</switchOp></IpOptSecurity></IpOptSecuritys><ReasTimeout><timeout>30</timeout></ReasTimeout></pp4><radiusxmlns="/netconf/vrp"format-version="1.0"content-version="1.0"><rdsClient><isEnable>false</isEnable><deadCount>10</deadCount><deadInterval>5</deadInterval><deadTime>3</deadTime><failRate>100</failRate><srvRecoveryOnRspEnable>true</srvRecoveryOnRspEnable></rdsClient></radius><socketxmlns="/netconf/vrp"format-version="1.0"content-version="1.0"><TcpGlobalCfg><tcpFinTimeout>675</tcpFinTimeout><tcpSynTimeout>75</tcpSynTimeout><tcpWindow>8</tcpWindow><tcp6FinTimeout>675</tcp6FinTimeout><tcp6SynTimeout>75</tcp6SynTimeout><tcp6Window>8</tcp6Window><tcpMaxMss/><tcp6MaxMss/></TcpGlobalCfg></socket><dhcpv6xmlns="/netconf/vrp"format-version="1.0"content-version="1.0"><common><dhcpv6CommonCfg><dhcpv6Enable>false</dhcpv6Enable><remoteIdFormat>default</remoteIdFormat><remoteIdUserDefineText/><duidFormat>invalid</duidFormat><duidString/><dhcpv6IpsecSa/><sourceIpAdaptive>false</sourceIpAdaptive></dhcpv6CommonCfg></common><server><svrCommons><svrCommon><dataBaseEnable>false</dataBaseEnable><dataBaseRecover>false</dataBaseRecover><writeDelay>86400</writeDelay></svrCommon></svrCommons></server></dhcpv6><pp6xmlns="/netconf/vrp"format-version="1.0"content-version="1.0"><Ipv6GlobalCfg><bucketSize>10</bucketSize><interval>100</interval><echoReply>true</echoReply><hostUnreach>true</hostUnreach><portUnreach>true</portUnreach><timeout>10</timeout><blacklistFlag>false</blacklistFlag><toobigLimitFlag>true</toobigLimitFlag></Ipv6GlobalCfg><icmp6Securitys><icmp6Security><action>send</action><icmpType>0</icmpType><icmpCode>0</icmpCode><allFlag>yes</allFlag><switchOp>enable</switchOp></icmp6Security><icmp6Security><action>receive</action><icmpType>0</icmpType><icmpCode>0</icmpCode><allFlag>yes</allFlag><switchOp>enable</switchOp></icmp6Security></icmp6Securitys></pp6><segrxmlns="/netconf/vrp"format-version="1.0"content-version="1.0"><srSite><srEnable>false</srEnable><srPrefer>false</srPrefer></srSite></segr><vlanxmlns="/netconf/vrp"format-version="1.0"content-version="1.0"><vlans><vlan><vlanId>1</vlanId><vlanType>common</vlanType><vlanName/><vlanDesc>VLAN0001</vlanDesc><adminStatus>up</adminStatus><subVlans/><superVlan/><vlanif><ifName>Vlanif1</ifName><cfgBand>1000</cfgBand><dampTime>0</dampTime></vlanif><muxVlan><separateVlan/><groupVlans/></muxVlan></vlan></vlans><instances><instance><instanceId>0</instanceId><vlans>7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE</vlans><instanceType>default</instanceType></instance></instances></vlan><sshcxmlns="/netconf/vrp"format-version="1.0"content-version="1.0"><sshClient><keepAliveTime>0</keepAliveTime><keepAliveCount>3</keepAliveCount><firstTimeEnable>Disable</firstTimeEnable><SrcIpv4Addr/><SrcInterface/><vpnInstanceName/><scpSrcIpv4Addr/><scpSrcInterface/><scpVpnInstanceName/><packetDscp>48</packetDscp></sshClient><reKey><rekeyMaxPacketNo>2147483648</rekeyMaxPacketNo><rekeyTime>60</rekeyTime><rekeyMaxData>1000</rekeyMaxData></reKey><sshCCipherAlg><descbc>false</descbc><des3cbc>true</des3cbc><aes128cbc>true</aes128cbc><aes256cbc>true</aes256cbc><aes128ctr>true</aes128ctr><aes192ctr>true</aes192ctr><aes256ctr>true</aes256ctr><arcfour128>false</arcfour128><arcfour256>false</arcfour256><aes128gcm>true</aes128gcm><aes256gcm>true</aes256gcm><aes192cbc>false</aes192cbc></sshCCipherAlg><sshcKexAlg><dhGroupExchangeSha256>true</dhGroupExcha
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
评论
0/150
提交评论