Juniper-华为-H3C设备维护常用命令.doc

上传人:w****2 文档编号:6668329 上传时间:2020-03-01 格式:DOC 页数:19 大小:25.79KB
返回 下载 相关 举报
Juniper-华为-H3C设备维护常用命令.doc_第1页
第1页 / 共19页
Juniper-华为-H3C设备维护常用命令.doc_第2页
第2页 / 共19页
Juniper-华为-H3C设备维护常用命令.doc_第3页
第3页 / 共19页
点击查看更多>>
资源描述
Juniper_华为_H3C设备维护常用命令1、Router&Swithc华为/H3C设备常规巡检命令#系统时间display clock#系统以及各单板软件版本display version#设备温度display environment#日志信息display logbuffer#单板运行状态display device#电源状态display device#风扇状态display device#CPU占用状态display cpu-usage#内存占用率display memory limit#接口流量display interface#接口、链路状态display interface#地址分配display current-configuration interface#路由扩散display current-configuration | include ospf#OSPF(Open Shortest Path First)配置display router id#路由信息display ip routing-table#端口统计数据display ip interface#当前配置文件display current-configuration#保存配置文件display saved-configuration端口使用状态display interface GigabitEthernet/Ten-GigabitEthernet briefVLAN使用状态display ip interface brief2、脚本华为display versiondis patch-informationdisplay clockdis dustproofdis frame-typedis healthdisplay cpu-usagedisplay memorydisplay memory limitdisplay devicedisplay device manuinfodisplay powerdisplay fandisplay voltagedir cfcard2:/dir cfcard: display device pic-statusdis switchover statedisplay environmentdisplay interfacedisplay logbufferdis alarm dis bootrom ethernetdisplay current-configurationdisplay current-configuration interface#display router iddisplay ip routing-tabledisplay ip interfacedisplay ip interface briefdisplay current-configurationdisplay saved-configuration display diagnostic-information3、脚本华为NE40edisplay version 查看VRP版本等信息dis patch-information 查看版本补丁display clock 查看时钟dis dustproof 防尘网信息Dis frame-type 显示NE40E机框类型dis health 显示系统资源的使用情况display cpu-usage 查看1分钟CPU利用率display memory 查看内存使用情况display memory limitdisplay device 查看母板信息display device manuinfodisplay power 查看电源状态display fan 查看风扇状态display voltage 查看板卡电压dir cfcard2:/ 查看设备crash信息dir cfcard: 查看设备cf卡信息display device pic-status 查看子卡型号,序列号 (NE40E NE80E)dis switchover state 查看引擎HA情况display environmentdisplay interface 查看接口状态display logbuffer 查看日志dis alarm 查看设备告警dis bootrom ethernet 查看设备bootrom信息display current-configuration查看当前配置display current-configuration interface# 查看设备当前接口配置display router id 查看设备路由IDdisplay ip routing-table 查看设备路由display ip interface 查看设备接口情况display ip interface brief 查看设备接口状态display current-configuration 查看设备当前配置display saved-configuration 查看设备内存配置(相当show start)display diagnostic-information 抓取设备完整信息相对于show tech二、JUNIPER设备常用维护巡检命令1、脚本JUNIPER show system uptime show version detail show chassis hardware detail show chassis environment /显示设备的环境信息,包括温度、风扇状况、电源状况、路由引擎状况。show chassis routing-engineshow chassis firmwareshow configurationshow chassis fpc detailshow interfaceshow interfaces terseshow chassis alarmsshow system alarmsshow log messages|no-moreshow log chassisd|no-moreshow log logfile Displaysshow chassis sfm Reportsshow system boot-messagesshow system core-dumpsshow system processes extensiveshow pfe statistics errorshow chassis routing-engineshow system storageshow system virtual-memoryshow system buffershow system queuesshow system statisticsshow configuration | except SECRET-DATAshow interfaces extensiveshow chassis hardware extensive2、脚本Juniper Firewallget systemget configget log eventget filiterget per cpu detailget session infoget per session detailget mac-learnget alarm eventget techget log systemget chassis基本命令1. get int 查看接口配置信息2. get int eth x/x 查看指定接口配置信息3. get mip 查看映射ip关系4. get route 查看路由表5. get policy id x 查看指定策略6. get nsrp 查看nsrp信息,后可接参数查看具体vsd组、端口监控设置等7. get per cpu de 查看cpu利用率信息8. get per session de 查看每秒新建会话信息9. get session 查看当前会话信息,后可匹配源地址、源端口、目的地址、目的端口、协议等选项10. get session info 查看当前会话数量11. get system 查看系统信息、包括当前OS版本,接口信息,设备运行时间等12. get chaiss 查看设备及板卡序列号,查看设备运行温度13. get counter stat 查看所有 接口计数信息14. get counter stat eth x/x 查看指定接口计数信息15. get counter flow zone untrust/untrust 查看指定区域数据流信息16. get counter screen zone untrust/trust 查看指定区域攻击防护统计信息17. get tech-support 查看设备状态命令集,一般在出现故障时,收集该信息寻求JTAC支持常用设置命令Set int ethx/x zone trust/untrust/dmz/ha 配置指定接口进入指定区域(trust/untrust/dmz/ha等) Set int ethx/x ip x.x.x.x/xx 配置指定接口ip地址 Set int ethx/x manage 配置指定接口管理选项,打开所有管理选项 Set int ethx/x manage web/telnet/ssl/ssh 配置指定接口指定管理选项 Set int ethx/x phy full 100mb 配置指定接口速率及双工方式 Set int ethx/x phy link-down 配置指定接口 shutdown Set nsrp vsd id 0 monitor interface ethx/x 配置ha监控端口,如此端口断开,则设备发生主/备切换 Exec nsrp vsd 0 mode backup 手工进行设备主/备切换,在当前的主设备上执行 set route 0.0.0.0/0 interface ethernet1/3 gateway 222.92.116.33 配置路由,需同时指定下一跳接口及ip地址所有set命令,都可以通过unset命令来取消,相当于cisco中的no 所有命令都可以通过“TAB”键进行命令补全,通过“?”来查看后续支持的命令防火墙基本配置1.登录 create account admin | user 回车 输入密码: 再次输入密码: configure account admin 回车 输入密码: 再次输入密码:2.port配置 config ports auto off speed 10 | 100 | 1000 duplex half | full auto off3.Vlan配置 无论是核心还是接入层,都要先创建三个Vlan,并且将所有归于Default Vlan的端口删除: config vlan default del port all create vlan Server create vlan User create vlan Manger 定义802.1q标记 config vlan Server tag 10 config vlan User tag 20 config vlan Manger tag 30 设定Vlan网关地址: config vlan Server ipa 192.168.41.1/24 config vlan User ipa 192.168.40.1/24 config vlan Manger ipa 192.168.*.*/24 Enable ipforwarding 启用ip路由转发,即vlan间路由 Trunk 配置 config vlan Server add port 1-3 t config vlan User add port 1-3 t config vlan manger add port 1-3 t 4.VRRP配置 enable vrrp configure vrrp add vlan UserVlan configure vrrp vlan UserVlan add master vrid 10 192.168.6.254 configure vrrp vlan UserVlan authentication simple-password extreme configure vrrp vlan UserVlan vrid 10 priority 200 configure vrrp vlan UserVlan vrid 10 advertisement-interval 15 configure vrrp vlan UserVlan vrid 10 preempt5.端口镜像配置 首先将端口从VLAN中删除 enable mirroring to port 3 选择3作为镜像口 config mirroring add port 1 把端口1的流量发送到3 config mirroring add port 1 vlan default 把1和vlan default的流量都发送到36.port-channel配置 enable sharing grouping port-based | address-based | round-robin show port sharing /查看配置7.stp配置 enable stpd /启动生成树 create stpd stp-name /创建一个生成树 configure stpd add vlan ports dot1d | emistp | pvst-plus configure stpd stpd1 priority 16384 configure vlan marketing add ports 2-3 stpd stpd1 emistp8.DHCP 中继配置 enable bootprelay config bootprelay add 9.NAT配置 Enable nat 启用nat Static NAT Rule Example config nat add out_vlan_1 map source 192.168.1.12/32 to 216.52.8.32/32 Dynamic NAT Rule Example config nat add out_vlan_1 map source 192.168.1.0/24 to 216.52.8.1 - 216.52.8.31 Portmap NAT Rule Example config nat add out_vlan_2 map source 192.168.2.0/25 to 216.52.8.32 /28 both portmap Portmap Min-Max Example config nat add out_vlan_2 map source 192.168.2.128/25 to 216.52.8.64/28 tcp portmap 1024 819210.OSPF配置 enable ospf 启用OSPF进程 create ospf area 创建OSPF区域 configure ospf routerid automatic | 配置Routerid configure ospf add vlan | all area passive 把某个vlan加到某个Area中去,相当于Cisco中的 network的作用 configure ospf area add range advertise | noadvertise type-3 | type-7 把某个网段加到 某个Area中去,相当于Cisco中的network的作用 configure ospf vlan neighbor add OSPF中路由重发布配置enable ospf export direct cost ase-type-1 | ase-type-2 tag | enable ospf export static cost ase-type-1 | ase-type-2 tag | enable ospf originate-default always cost ase-type-1 | ase-type-2 tag enable ospf originate-router-id11.SNMP配置 enable snmp access enable snmp traps create access-profile type ipaddress | vlan config snmp access-profile readonly | none配置snmp的只读访问列表,none是去除 config snmp access-profile readwrite | none 这是控制读写控制 config snmp add trapreceiver port community from 配置snmp接收host和团体字符串12.安全配置 disable ip-option loose-source-route disable ip-option strict-source-route disable ip-option record-route disable ip-option record-timestamp disable ipforwarding broadcast disable udp-echo-server disable irdp vlan disable icmp redirect disable web 关闭web方式访问交换机 enable cpu-dos-protect13.AccessLists配置 create access-list icmp destination source create access-list ip destination source ports create access-list tcp destination source ports create access-list udp destination source ports14.默认路由配置 config iproute add default 15.恢复出厂值 但不包括用户改的时间和用户帐号信息 unconfig switch all16.检查配置 show version show config show session show management 查看管理信息,以及snmp信息 show bannershow ports configuration show ports utilization ? show memory/show cpu-monitoring show ospf show access-list | port show access-list-monitor show ospf area show ospf area detail show ospf ase-summary show ospf interfaces vlan | area unconfigure ospf vlan | area switch show switch show config show diag show iparp show iproute show ipstat show log show tech all show version detail17.备份和升级软件 download image | primary | secondary upload image | primary | secondary use image primary | secondary18.密码恢复。 Extreme交换机在你丢失或忘记密码后,需要重新启动交换机,常按空格键,进入Bootrom模式,输入“h”, 选择“d: Force Factory default configuration”清除配置文件,最后选择“f: Boot on board flash” 重新启动后密码会被清除掉。注意:恢复密码后,以前的配置文件将会被清空。 对于extreme x450e-48p 进入bootrom 后 输入h,然后boot 1 回车即可18.switch licese 的添加 enable licese xxxx-xxxx-xxxx-xxxx-xxxx 会提示添加成功,显示Advanced Edge为成功 HN-HUAIHUA-ANQUAN-LS1.33 # show licenses Enabled License Level: Advanced Edge Enabled Feature Packs: None 步骤:a,HN-HUAIHUA-ANQUAN-LS1.34 # show versionSwitch : 800190-00-04 0804G-80211 Rev 4.0 BootROM: 1.0.2.2 IMG: 11.6.1.9 XGM2-1 : Image : ExtremeXOS version 11.6.1.9 v1161b9 by release-manager on Wed Nov 29 22:40:47 PST 2006 BootROM : 1.0.2.2 其中 0804G-80211 为交换机的serial number b然后在装有licese的信封里找到voucher serial number c根据这两个serial number 在指定网站上查找liceses 的key 共16位, d然后 enable licese 输入key值即可NS系列防火墙安装与管理 NetScreen防火墙支持多种管理方式:WEB管理,CLI (Telnet) 管理等,由于一般调试工作中,我们最常用的也就是前面两种。 (ScreenOS 4.0) 首先,使用CONSOLE口进行配置 1.把配送的线的一端插在防火墙的CONSOLE口,线的另一端插在转换插头后插在PC的串行口上。 2.打开WINDOWS的附件-通讯-超级终端,选择插有CONSOLE线的串口连接。(设置串口属性:9600-8-无-硬件) 3.出现提示符号后输入帐号密码进入设置命令行界面。(默认帐号:Netscreen;密码Netscreen) 4.进入Netscreen命令行管理界面Web管理连接设置 1.设置接口IP 若所有接口均未配置IP(Netscreen设备初始化设置),需设置一个端口IP,用于连接web管理界面,这里设置trust端口;在命令行模式下输入: ns5XT-set int trust ip * 命令说明: A.B.C.D为IP地址,通常设置为一个内网地址,E 为IP地址的掩码位,通常设为24。 此时通过get interface命令可以看到端口状态的信息(类似CISCO SHOW 接口命令)2.启动接口的web管理功能 ns5XT-set int trust manage web 3.连通PC和防火墙间的网络 通过浏览器的web界面进行具体功能设置 DW, 建立对于NS-5,NS-10,NS-100防火墙,PC与trust口,DMZ口采用直通电缆连接,PC与untrust口的连接采用交叉线。对于NS-25,NS-200及以上产品,PC与防火墙所有端口的连接都采用直通电缆。注意:将PC网卡的IP地址设置成与防火墙相应端口的管理IP同一个网段内; 打开IE浏览器,键入防火墙的管理IP,打开登陆画面;防火墙基本设置 1.设置访问超时时间: Web: 在Web中的ConfigurationAdminManagement中的Enabel Web Management Idle Timeout 中填入访问超时的分钟数,并在前面打勾。 CLI: NS5XT-set admin auth timeout 2.Netscreen的管理权限: 设置超级管理员(Root) WEB: 进入ConfigurationAdminAdministrators ,在这里可以管理所有的管理员。 CLI: D NS5XT-set admin name NS5XT-set admin password 添加本地管理员 WEB: 点击New链接,打开配置页。输入管理员登录名和密码,指定权限(可选ALL或Read_ONLY,ALL表示该管理员具有更改配置的权限,READ_ONLY表示该管理员只能查看配置,无权更改)。 CLI: D NS5XT-set admin user password privilege 3.设置DNS Web:打开NetworkDNS页面,可配置Host Name(主机名),Domain Name(域名),Primary DNS Server(主域名服务器),Second DNS Server(副哉名服务器),还有DNS每天更新的时间。配置完后按Apply按键实施。 NS5XT-set hostname hMRr6 NS5XT-set domain B NS5XT-set DNS host4.设置Zone(安全区域) Web: 打开NetworkZones页面,可配置已存在于Netscreen设备的所有Zone(并不是所有Zone都可以配置,有许多默认的Zone 是不允许配置的,在Configure中不会出现Edit)。按New按键可以新增一个Zone。 CLI: ho NS5XT-set zone vrouter OWV6jS 5.设置Interface(接口) v WEB:打开NetworkInterfaces,选择需要配置的接口对应的属性页(有四个可选接口Trust、Untrust、DMZ和 Tunnel,其中Trust、Untrust和DMZ为物理接口,Tunnel接口为逻辑接口,用于VPN。对于ns-5系列防火墙,无DMZ端口)。 点击对应接口Configure列中的Edit链接,打开接口配置窗口。(对于不同模式的Interface,进入后的配置会不同,这里用NAT模式做例子,透明模式会少一些配置的内容) Zone name: 设置从属的安全区域;IP Address/Netmask:设置接口的IP和掩码; Manage IP:设置该接口的管理用IP,该IP必须与接口IP处在同一个网络段中,如果系统IP被设为0.0.0.0,则该Manage IP默认为接口IP。 Interface Mode:设置接口模式,仅trust接口具有该项。可以选择NAT模式或Route模式。当trust接口工作在NAT模式时,任何进入该接口的数据包都会被强制做地址转换。当接口工作在Route模式时,防火墙的默认工作相当与一台路由器,如果要将防火墙实现基于策略的NAT功能,请将trust接口设置成此模式。 Management Services:选中或清除web、telnet、snmp等复选框可以启用或禁止该接口的相应管理功能。如清除web复选框,再点击save按钮后,该接口的web管理功能关闭,用户无法通过该接口的管理ip进入web管理界面,同时在该接口上的所有web管理连接都将丢失。 wF=W .da2 设置完成后点击Apply按钮记录设置。 CLI:设置接口IP: NS5XT-set interface ip 设置接口网关: $NS5XT-set interface gateway J 启动接口的管理功能: NS5XT-set interface manage关闭接口的管理功能: NS5XT-unset interface manage 设置Trust接口工作模式: NS5XT-set interface trust 结合CLI和WEB方式,我们能很轻松的将NS搞定。
展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 临时分类 > 人文社科


copyright@ 2023-2025  zhuangpeitu.com 装配图网版权所有   联系电话:18123376007

备案号:ICP2024067431-1 川公网安备51140202000466号


本站为文档C2C交易模式,即用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。装配图网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知装配图网,我们立即给予删除!