




已阅读5页,还剩11页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
H3C 路由器和交换机的基本配置 交换机: 1.基本配置: (1)视图: 用户视图 H3C 系统视图 H3C-ui-vty0-4 用户界面视图 H3C-ethernet1/0/1 以太网视图 (2) reset saved-configuration 初始化 reboot 重启 system-view 进入系统视图 H3Csysname H3C 设置主机名 H3Csuper password (level 1/2/3) simple/cipher password 配置特权口令 H3Csave (safely) 保存设置 配置管理 IP H3Cinterface vlan 1 H3C-Vlan-interface1ip address 192.168.1.2 255.255.255.0 undo ip add 配置端口 H3Cinterface e1/0/2 H3C-ethernet1/0/2duplex auto/full/half flow-control 开启以太网端口 Ethernet0/0 的流量控制。 undo flow-control 关闭以太网端口流量控制 speed 10/100/auto display interface ethernet0/0 配置网关 H3Cip route-static 0.0.0.0 0.0.0.0 192.168.1.1 配置 Aux 口令 H3Cuser-interface aux 0 7 H3C-ui-aux0-7authentication-mode password set authentication password simple/cipher wnt user privilege level 0/1/2/3 配置 Console 口令 H3Cuser-interface 0 H3C-ui0authentication-mode password set authentication password simple/cipher wnt user privilege level 0/1/2/3 配置 vty 口令 H3Cuser-interface vty 0 4 H3C-ui-vty0-4authentication-mode password set authentication password simple/cipher wnt user privilege level 0/1/2/3 查看的命令 H3Cdisplay history-command H3Cdisplay version H3Cdisplay current-configuration H3Cdisplay saved-configuration H3Cdisplay interface H3Cdisplay ip interface H3Cdisplay interface ethernet(0/0) H3Cdisplay ip host 显示域名解析表 2.telnet (1)基于 vty H3Cip host hostname ip-address 静态域名解析 display ip host H3Cinterface vlan 1 H3C-Vlan-interface1ip address 192.168.1.2 255.255.255.0 quit H3Cuser-interface vty 0 4 H3C-ui-vty0-4authentication-mode password (none/password/scheme) set authentication password simple/cipher wnt user privilege level 0/1/2/3 quit (按 Ctrl+键,断开 telnet) (按 Ctrl+K 键,断开 telnet) H3Cdisplay users all display users 显示连接本地的 telnet 会话 display tcp status 显示当前建立的所有 TCP 链接情况 (2)基于用户 Switch H3Cinterface vlan 1 H3C-Vlan-interface1ip address 192.168.1.2 255.255.255.0 quit H3Clocal-user bob H3C-luser-bobpassword simple/cipher wnt service-type telnet level 0/1/2/3 quit H3Csuper password simple/cipher wnt H3Cuser-interface vty 0 4 H3C-ui-vty0-4authentication-mode scheme quit H3Cdomain system H3C-isp-systemauthentication default local Cisco 和 H3C 路由器交换机基本配置 第 3 页 共 16 页 telnet IP 3.vlan (1)可用命令 H3C(undo) vlan 3 H3C-Vlan3name wnt description gongsi (undo)port ethernet1/0/2 to ethernet1/0/5 把 e1/0/2、3、4、5 加入 vlan 3 port ethernet1/0/6 ethernet1/0/10 把 e1/0/6 和 e1/0/10 加入 vlan 3 port ethernet1/0/12 save (safely) undo name/description return/quit H3Cdisplay brief interface ethernet 查看端口属于哪个 Vlan H3Cdisplay brief interface vlan-interface 查看有几个 Vlan H3Cdisplay ip interface brief 查看 Vlan 信息 H3Cdisplay ip interface vlan-interface 3 查看已配置 IP 的 Vlan 信息 H3Cdisplay ip interface 查看配置 IP 的 Vlan H3Cdisplay vlan all H3Cdisplay interface vlan-interface H3Cinterface vlan 0001 H3C-Vlan-interface1ip address 192.168.1.2 255.255.255.0 undo ip add return/quit H3Cinterface e1/0/5 H3C-ethernet1/0/5port access vlan 2 (2)单个交换机+Vlan 间路由 H3Cvlan 2 H3C-vlan2name caiwu port e1/0/3 to e1/0/6 quit H3Cvlan 3 H3C-vlan3name kaifa port e1/0/8 to e1/0/10 quit H3Cinterface vlan 2 H3C-vlan-interface2ip add 192.168.1.1 255.255.255.0 quit H3Cinterface vlan 3 H3C-vlan-interface3ip add 192.168.2.1 255.255.255.0 quit (3)Vlan 间路由 SwitchA H3Cvlan 2 H3C-vlan2name caiwu port e1/0/2 to e1/0/3 quit H3Cvlan 3 H3C-vlan3name kaifa port e1/0/4 to e1/0/5 quit H3Cinterface e1/0/1 H3C-ethernete1/0/1port link-type trunk port trunk permit vlan all H3Cdisplay vlan all RouterA H3Cinterface e0/0 H3C-ethernet0/0undo ip address H3Cinterface e0/0.2 H3C-ethernet0/0.2vlan-type dot1q vid 2 ip address 192.168.1.1 255.255.255.0 interface e0/0.3 e0/0.3vlan-type dot1q vid 3 ip address 192.168.2.1 255.255.255.0 HostA :192.168.1.2 GW:192.168.1.1 HostB :192.168.2.2 GW:192.168.2.1 HostA:ping 192.168.2.2 路由器: 1.基本配置: (1)视图: 用户视图 Cisco 和 H3C 路由器交换机基本配置 第 5 页 共 16 页 H3C 系统视图 H3C-ui-vty0-4 用户界面视图 H3C-ethernet1/0/1 以太网视图 H3C-serial1/0/0.1 子接口视图 H3C-ospf ospf 协议视图 H3C-rip rip 协议视图 H3C-serial1/0/0 H3C-serial1/0/0:1 同/异步串口视图 H3C-async1/0/0 异步视图 (2) 修改系统时间 clock datatime 11:20:30 2009/11/16 H3Cdisplay clock reset saved-configuration 初始化 reboot 重启 system-view H3Csysname H3C 设置主机名 H3Csuper password (level 1/2/3) simple/copher password 配置特权口令 H3Csave (safely) 保存设置 配置端口 H3Cinterface e0/0 H3C-ethernet0/0ip address 192.168.1.1 255.255.255.0 duplex auto/full/half flow-control 开启以太网端口 Ethernet0/0 的流量控制。 undo flow-control 关闭以太网端口流量控制 speed 10/100/auto display interface ethernet0/0 配置 aux 口令 H3Cuser-interface aux 0 7 H3C-ui-aux0-7authentication-mode password set authentication password simple/cipher wnt user privilege level 0/1/2/3 配置 vty 口令 H3Cuser-interface vty 0 4 H3C-ui-vty0-4authentication-mode password password set authentication password simple/cipher wnt user privilege level 0/1/2/3 配置 console 口令 H3Cuser-interface console 0 H3C-ui-console0authentication-mode password set auehtication password simple/cipher wnt user privilege level 0/1/2/3 配置接口 IP H3Cinterface e0/0 H3C-ethernet0/0ip address 192.168.1.1 255.255.255.0 H3Cdns resolve (开启 DNS 解析) undo dns resolve (关闭 DNS 解析) H3Cdisplay brief interface 查看端口信息 H3Cdisplay brief interface ethernet/seail 查看 E/S 口信息 H3Cdisplay history-command 查看历史命令 Debug 命令 debug 是设备调试,排错中非常重要也非常有效的手段。 过程: 无论使用 console 配置、还是使用远程 telnet,都只需要输入: terminal monitor terminal debugging 此处以调试链路层协议 ppp 数据包为例 debugging ppp all debugging ppp pap/chap packet debugging ospf packet debugging telnet debugging nat packet debugging ip packet 注意 1.特权模式下 debug;可以从 display debug 看出现在有哪些调试开关是打开的 2.关闭调试信息: Routerundo debug all,或者 ctrl+d 亦可 2.telnet 禁止用户 TELNET 到中低端路由器有哪些配置方法 1)禁止部分用户 telnet:可以通过配置 ACL 扩展访问列表,deny 源是用户主 机、目的是路由器、端口是 23 的 tcp 类型报文进入。2)禁止全部用户 telnet:配置 login telnet 命令,但不配置任何类型是 exec 的用户。这样 telnet 用户登录时会被要求进行验证,但由于没有配置任何用户名,因此不可 能验证通过。 (1)基于 vty H3Cinterface e0/0 H3C-ethernet0/0ip address 192.168.1.1 255.255.255.0 quit H3Cuser-interface vty 0 4 H3C-ui-vty0-4authentication-mode password(none/password/scheme) set authentication password simple/cipher wnt user privilege level 0/1/2/3 quit H3Ctelnet server enable (按 Ctrl+键,挂起 telnet) (按 Ctrl+K 键,断开 telnet) H3Cdisplay users all 显示每个用户界面连接情况 display tcp status 显示当前建立的所有 TCP 链接情况 (2)基于用户 Cisco 和 H3C 路由器交换机基本配置 第 7 页 共 16 页 H3Csuper password simple/cipher wnt H3Cinterface e0/0 H3C-ethernet0/0ip address 192.168.1.1 255.255.255.0 quit H3Clocal-user tom(username) H3C-luser-tompassword simple/cipher wnt service-type telnet level 0/1/2/3 quit H3Cuser-interface vty 0 4 H3C-ui-vty0-4authentication-mode scheme quit H3Ctelnet server enable telnet 192.168.1.2 (3)基于端口 H3Cuser-interface vty 0 4 H3C-ui-vty0-4authentication-mode none 登录验证不需要密码 authentication-mode password 登录验证需要密码 set authentication password cipher/simple wnt user privilege level 0-3 quit H3Ctelnet server enable 开启 telnet 功能 telnet client source ip 192.168.1.2(客户端 ip) telnet client source interface e0/s0(连接客户端的本地端口) quit H3Ctelnet server enable telnet 192.168.1.2 Cisco 路由器常用配置命令汇总 启动接口,分配 IP 地址: router router enable router# router# configure terminal router(config)# router(config)# interface Type Port router(config-if)# no shutdown router(config-if)# ip address IP-Address Subnet-Mask router(config-if)# z 配置 RIP 路由协议:30 秒更新一次 router(config)# router rip router(config-if)# network Network-Number router(config-if)# z 配置 IGRP 路由协议:90 秒更新一次 router(config)# router igrp AS-Number router(config-if)# network Network-Number router(config-if)# z 配置 Novell IPX 路由协议: Novell RIP 60 秒更新一次 router(config)# ipx routing node address router(config)# ipx maximum-paths Paths Cisco 和 H3C 路由器交换机基本配置 第 9 页 共 16 页 router(config)# interface Type Port router(config-if)# ipx network Network-Number encapsulation encapsulation-type secondary router(config-if)# z 配置 DDR: router(config)# dialer-list Group-Number protocol Protocol-Type permit list ACL-Number router(config)# interface bri 0 router(config-if)# dialer-group Group-Number router(config-if)# dialer map Protocol-Type Next-Hop-Address name Hostname Telphone- Number router(config-if)# z 配置 ISDN: router(config)# isdn swith-type Swith-Type router(config-if)# z 配置 Frame Relay: router(config-if)# encapsulation frame-relay cisco | ietf router(config-if)# frame-relay lmi-type ansi | cisco | q933a router(config-if)# bandwidth kilobits router(config-if)# frame-relay invers-arp Protocol dlci router(config-if)# z 配置标准 ACL: router(config)# access-list Access-List-Number permit | deny source source-mask router(config)# interface Type Port router(config-if)# ip access-group Access-List-Number in | out router(config-if)# z 配置扩展 ACL: router(config)# access-list Access-List-Number permit | deny Protocol | Protocol- Number source source-wildcard Source-Port destination destination-wildcard Destination- Port established router(config)# interface Type Port Cisco 和 H3C 路由器交换机基本配置 第 11 页 共 16 页 router(config-if)# ip access-group Access-List-Number in | out router(config-if)# z H3C sysname AR2830 AR2830 super password super password level user-level simple | cipher password undo super password level user-level user-level 1 - 3 simple 明文 cipher 密文 H3C super password level 3 simple zbr local-user password-display-mode local-user password-display-mode cipher-force | auto undo local-user password-display-mode cipher-force 强制方式,即所有接入用户的密码显示方式必须采用密文方式 auto 自动方式,即接入用户的密码显示方式可以由用户通过 password 命令来设置 H3C local-user password-display-mode cipher-force radius scheme system Cisco 和 H3C 路由器交换机基本配置 第 13 页 共 16 页 radius scheme radius-scheme-name undo radius scheme radius-scheme-name RADIUS 方案名,为不超过 32 个字符的字符串,且不能包括“/“ “:“ “ “?“ “ 缺省情况下,系统中已创建一个名为“system“的 RADIUS 方案,其各项属性均为缺省值, 该方案不能删除。可以用 display radius 命令来查看缺省 RADIUS 方案 system 的设置。 H3C radius scheme h3c H3C-radius-h3c ip vpn-instance vpn-instance-name undo ip vpn-instance vpn-instance-name ip vpn-instance 命令用来创建一个 VPN 实例,undo ip vpn-instance 命令用来删除指定的 vpn 实例。 H3C ip vpn-instance vpn1 H3C-vpn-vpn1 local-user user-name undo local-user user-name | all user-name 本地用户名,为不超过 80 个字符的字符串,字符串中不能包括“/“ “:“ “?“ “ 等字符,并且“ 出现的次数不能多于 1 次,纯用户名(“以前的部分,即用户表示符) 不 能超过 55 个字符。用户名不区分大小写,输入 UserA 和 usera,系统视为同一个用户。用 户名不能以“P“开头。all 所有用户 display local-user H3C local-user h3c1 H3C-luser-h3c1 password simple | cipher password | sha-256 shapassword undo password simple 表示密码用明文 cipher 表示密码用密文 sha-256 表示密码为 sha-256 摘要 simple password 长度为 1-48 个字符的字符串 cipher 长度为 1-48 个字符的字符串 当采用 local-user password-display-mode cipher-force 命令后,即使用户通过 password 命令 指定密码显示方式为明文显示后。也不起作用。 H3C-luser-h3c1 password simple 20040422 service-type service-type dvpn | telnet | ssh | termina
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2024年小自考行政管理考生的应变能力提升试题及答案
- 个人拖欠材料款合同标准文本
- 信息技术助力生本课堂变革与实践方案
- 房地产管理岗试题及答案
- 提升县域中职教育质量的有效策略与实践路径
- 个人车子售卖合同样本
- 乳制品保税加工项目创新发展方案
- 买房定金协议合同样本
- 修建新房合同样本
- 视觉传播设计小自考展览策划技巧与试题及答案
- 湖南省长沙市麓山国际实验学校2024-2025学年高二下学期第一次学情检测化学试卷(图片版含答案)
- 2025年高考作文备考之热点素材解读及相关题目:高中双休
- 2025届八省八校部分重点中学高三下学期3月联合测评(T8联考)数学试题
- 二年级阅读课教案
- xx地块房地产项目可行性研究报告(参考)
- 统编版2024新版七年级下册德道与法治第一单元《珍惜青春时光》复习课件
- 物理-甘肃省2025年高三月考试卷(3月)(甘肃一诊)试题和答案
- 2025年沈阳北软信息职业技术学院单招职业技能考试题库完美版
- 中医医生笔试试题及答案
- 《晴隆县长兴煤矿有限责任公司晴隆县长流乡长兴煤矿(变更)矿产资源绿色开发利用方案(三合一)》评审意见
- 2024-2025学年第二学期天域全国名校协作体高三3月联考 语文试卷(含答案)
评论
0/150
提交评论