H3C路由器配置命令88630精编版
- 格式:doc
- 大小:49.00 KB
- 文档页数:4
h3c路由器基本配置命令大全精品文档H3C路由器基本配置命令大全H3C路由器基本配置命令有哪些?下面跟gkstk小编一起来学习一下吧! [Quidway]displayversion 显示版本信息[Quidway]displaycurrent-configuration 显示当前配置[Quidway]displayinterfaces 显示接口信息[Quidway]displayip route 显示路由信息[Quidway]sysnameaabbcc 更改主机名[Quidway]superpasswrod 12345设置口令[Quidway]interfaceserial0 进入接口[Quidway-serial0]ipaddress[Quidway-serial0]undoshutdown 激活端口[Quidway]link-protocolhdlc 绑定hdlc协议[Quidway]user-interfacevty 0[Quidway-ui-vty0-4]authentication-modepassword[Quidway-ui-vty0-4]setauthentication-modepassword simple22[Quidway-ui-vty0-4]userprivilege level[Quidway-ui-vty0-4]quit[Quidway]debugginghdlc all serial0 显示所有信息[Quidway]debugginghdlc event serial0 调试事件信1 / 8精品文档息[Quidway]debugginghdlc packet serial0 显示包的信息[Quidway]iproute-static{interfacenumber|nexthop}[value][reject|blackhole] 例如:[Quidway]iproute-static 129.1.0.0 110.0.0.2 [Quidway]iproute-static 129.1.0.055.255.0.0 10.0.0.2 [Quidway]iproute-static 129.1.0.0 1Serial [Quidway]iproute-static 0.0.0.0 0.0.0.0 10.0.0.2 [Quidway]rip[Quidway]rip work[Quidway]rip input[Quidway]ripoutput[Quidway-rip]network1.0.0.0 ;可以all[Quidway-rip]network2.0.0.0[Quidway-rip]peerip-address[Quidway-rip]summary[Quidway]ripversion 1[Quidway]ripversion multicast[Quidway-Ethernet0]ripsplit-horizon ;水平分隔2 / 8精品文档H3C路由器基本配置命令大全H3C路由器基本配置命令大全[Quidway]router idA.B.C.D 配置路由器的ID[Quidway]ospfenable 启动OSPF协议[Quidway-ospf]import-routedirect 引入直联路由[Quidway-Serial0]ospfenable area 配置OSPF区域acl [match-order config|auto] 默认前者顺序匹配。
H3C的路由器配置命令详解SYS进入视图配置模式in s0 进入serial 0 端口配置ip add xxx.xxx.xxx.xxx xxx.xxx.xxx.xxx 添加ip 地址和掩码,电信分配enca hdlc/ppp 捆绑链路协议hdlc 或者pppip unn e0exit 回到全局配置模式in e0 进入以太接口配置ip add xxx.xxx.xxx.xxx xxx.xxx.xxx.xxx 添加ip 地址和掩码,电信分配exit 回到全局配置模式ip route 0.0.0.0 0.0.0.0 s 0 添加路由表ena password 口令writeexit以上根据中国电信ddn 专线多数情况应用普通用户模式enable 转入特权用户模式exit 退出配置help 系统帮助简述language 语言模式切换ping 检查网络主机连接及主机是否可达show 显示系统运行信息telnet 远程登录功能tracert 跟踪到目的地经过了哪些路由器特权用户模式#?clear 清除各项统计信息clock 管理系统时钟configure 进入全局配置模式debug 开启调试开关disable 返回普通用户模式download 下载新版本软件和配置文件erase 擦除FLASH中的配置exec-timeout 打开EXEC超时退出开关exit 退出配置first-config 设置或清除初次配置标志help 系统帮助简述language 语言模式切换monitor 打开用户屏幕调试信息输出开关no 关闭调试开关ping 检查网络主机连接及主机是否可达reboot 路由器重启setup 配置路由器参数show 显示系统运行信息telnet 远程登录功能tracert 跟踪到目的地经过了哪些路由器unmonitor 关闭用户屏幕调试信息输出开关write 将当前配置参数保存至FLASH MEM中全局配置模式aaa-enable 使能配置AAA(认证,授权和计费) access-list 配置标准访问表arp 设置静态ARP人口chat-script 生成一个用在modem上的执行脚本custom-list 创建定制队列列表dialer-list 创建dialer-listdram-wait 设置DRAM等待状态enable 修改ENABLE口令exit 退出全局配置模式firewall 配置防火墙状态flow-interval 设置流量控制时间间隔frame-relay 帧中继全局配置命令集FTP 服务器help 系统帮助命令简述host 添加主机名称和其IP地址hostname 修改主机名ifquelen 更改接口队列长度interface 选择配置接口ip 全局IP配置命令子集ipx 全局IPX配置命令子集loghost 设置日志主机IP地址logic-channel 配置逻辑通道login 启动EXEC登录验证modem-timeout 设置modem 超时时间multilink 配置multilink 用户使用的接口multilink-user 配置multilink 用户使用的接口natserver 设置服务的IP地址no 关闭某些参数开关priority-list 创建优先级队列列表router 启动路由处理settr 设置时间范围snmp-server 修改SNMP参数tcp 配置全局TCP参数timerange 启动或关闭时间区域user 为PPP验证向系统中加入用户vpdn 设置VPDNvpdn-group 设置VPDN组x25 X.25协议分组层H3C交换机常用命令解释作者:admin 日期:2009-12-19字体大小: 小中大H3C交换机常用命令注释H3C交换机#######################################################################31、system-view 进入系统视图模式2、sysname 为设备命名3、display current-configuration 当前配置情况4、language-mode Chinese|English 中英文切换5、interface Ethernet 1/0/1 进入以太网端口视图6、port link-type Access|Trunk|Hybrid 设置端口访问模式7、undo shutdown 打开以太网端口8、shutdown 关闭以太网端口9、quit 退出当前视图模式10、vlan 10 创建VLAN 10并进入VLAN 10的视图模式11、port access vlan 10 在端口模式下将当前端口加入到vlan 10中12、port E1/0/2 to E1/0/5 在VLAN模式下将指定端口加入到当前vlan中13、port trunk permit vlan all 允许所有的vlan通过H3C路由器######################################################## ##############################1、system-view 进入系统视图模式2、sysname R1 为设备命名为R13、display ip routing-table 显示当前路由表4、language-mode Chinese|English 中英文切换5、interface Ethernet 0/0 进入以太网端口视图6、ip address 192.168.1.1 255.255.255.0 配置IP地址和子网掩码7、undo shutdown 打开以太网端口8、shutdown 关闭以太网端口9、quit 退出当前视图模式10、ip route-static 192.168.2.0 255.255.255.0 192.168.12.2 description To.R2 配置静态路由11、ip route-static 0.0.0.0 0.0.0.0 192.168.12.2 description To.R2 配置默认的路由H3C S3100 SwitchH3C S3600 SwitchH3C MSR 20-20 Router######################################################## ##################################1、调整超级终端的显示字号;2、捕获超级终端操作命令行,以备日后查对;3、language-mode Chinese|English 中英文切换;4、复制命令到超级终端命令行,粘贴到主机;5、交换机清除配置:reset save ;reboot ;6、路由器、交换机配置时不能掉电,连通测试前一定要检查网络的连通性,不要犯最低级的错误。
1、system-view 进入系统视图模式2、sysname 为设备命名3、display current-configuration 当前配置情况4、 language-mode Chinese|English 中英文切换5、interface Ethernet 1/0/1 进入以太网端口视图6、 port link-type Access|Trunk|Hybrid 设置端口访问模式7、 undo shutdown 打开以太网端口8、 shutdown 关闭以太网端口9、 quit 退出当前视图模式10、 vlan 10 创建VLAN 10并进入VLAN 10的视图模式11、 port access vlan 10 在端口模式下将当前端口加入到vlan 10中12、port E1/0/2 to E1/0/5 在VLAN模式下将指定端口加入到当前vlan中13、port trunk permit vlan all 允许所有的vlan通过H3C路由器############################################################################### #######1、system-view 进入系统视图模式2、sysname R1 为设备命名为R13、display ip routing-table 显示当前路由表4、 language-mode Chinese|English 中英文切换5、interface Ethernet 0/0 进入以太网端口视图6、 ip address 192.168.1.1 255.255.255.0 配置IP地址和子网掩码7、 undo shutdown 打开以太网端口8、 shutdown 关闭以太网端口9、 quit 退出当前视图模式10、 ip route-static 192.168.2.0 255.255.255.0 192.168.12.2 description To.R2 配置静态路由11、 ip route-static 0.0.0.0 0.0.0.0 192.168.12.2 description To.R2 配置默认的路由H3C S3100 SwitchH3C S3600 SwitchH3C MSR 20-20 Router############################################################################### ###########1、调整超级终端的显示字号;2、捕获超级终端操作命令行,以备日后查对;3、 language-mode Chinese|English 中英文切换;4、复制命令到超级终端命令行,粘贴到主机;5、交换机清除配置 :<H3C>reset save ;<H3C>reboot ;6、路由器、交换机配置时不能掉电,连通测试前一定要检查网络的连通性,不要犯最低级的错误。
H3C路由器配置H3C路由器配置文档1、硬件安装1.1 连接电源和网线1.2 连接管理电脑1.3 连接其他设备2、登录路由器管理界面2.1 打开网页浏览器2.2 输入默认IP地质2.3 输入登录用户名和密码3、基本配置3.1 修改主机名3.2 设置管理IP地质3.3 设置默认网关3.4 配置域名解析3.5 配置系统时间4、网络配置4.1 配置接口4.2 配置静态路由4.3 配置动态路由4.4 配置VLAN4.5 配置ACL5、无线配置5.1 配置SSID5.2 设置无线加密方式 5.3 配置访问控制5.4 配置无线信道6、防火墙配置6.1 设置入站规则6.2 设置出站规则6.3 配置NAT6.4 配置VPN7、服务配置7.1 配置DHCP服务器 7.2 配置DNS服务器7.3 配置日志服务器7.4 配置SNMP服务8、安全配置8.1 配置用户身份验证 8.2 配置访问控制列表 8.3 配置IP源地质过滤8.4 配置端口安全策略9、系统维护9.1 升级路由器固件9.2 备份和恢复配置9.3 重启路由器9.4 查看系统日志10、附件附件1:示例配置文件附件2:用户手册法律名词及注释:1、IP地质:Internet Protocol Address的缩写,用于唯一标识网络设备的地质。
2、VLAN:Virtual Local Area Network的缩写,是一种虚拟的局域网技术,可以将局域网划分为多个逻辑上的子网。
3、ACL:Access Control List的缩写,是一种用于控制网络流量的列表,可限制网络中的访问权限。
4、NAT:Network Address Translation的缩写,是一种将私有IP地质转换为公共IP地质的技术,用于解决IP地质不足的问题。
5、VPN:Virtual Private Network的缩写,是一种通过公共网络建立安全连接的技术,用于远程访问和保护数据传输。
6、DHCP:Dynamic Host Configuration Protocol的缩写,是一种自动为网络设备分配IP地质的协议。
H3C路由器配置命令表H3C路由器配置命令表1·路由器基本配置命令1·1 接口配置命令●interface <interface_name>: 进入接口配置模式●ip address <ip_address> <subnet_mask>: 设置接口IP地质和子网掩码●description <description>: 给接口添加描述信息1·2 路由配置命令●ip route <destination_network> <subnet_mask> <next_hop>: 配置路由●ip default-gateway <default-gateway_address>: 配置默认网关●ip routing: 开启路由功能1·3 主机名与域名配置命令●hostname <hostname>: 设置路由器主机名●domn-name <domn_name>: 设置路由器域名●enable password <password>: 设置访问特权模式的密码●line vty 0 4、进入VTY线路配置模式●login: 启用登录验证●password <password>: 设置VTP登录密码●exit: 退出线路配置模式2·协议配置命令2·1 静态路由配置命令●ip route-static <destination_network><subnet_mask> <next_hop>: 配置静态路由2·2 动态路由配置命令●router rip: 进入RIP路由配置模式●network <network_address>: 配置本地网络●router ospf <process_id>: 进入OSPF路由配置模式●network <network_address> <subnet_mask> area <area_id>: 配置本地网络●router bgp <AS_number>: 进入BGP路由配置模式●network <network_address> mask<subnet_mask>: 配置本地网络●neighbor <neighbor_address> remote-as<AS_number>: 配置BGP邻居3·安全配置命令3·1 访问控制列表(ACL)配置命令●access-list <acl_number> {permit ---●deny} <protocol> <source_ip> <destination_ip>: 配置ACL规则●interface <interface_name>●inbound----outbound ip access-group<acl_number>: 将ACL应用于接口的进或出方向3·2 密码和认证配置命令●enable secret <password>: 设置特权模式密码●username <username> password <password>: 创建本地用户名和密码4·网络地质转换(NAT)配置命令4·1 静态NAT配置命令●interface <inside_interface>●nat static <inside_local_ip><outside_global_ip>4·2 动态NAT配置命令●interface <inside_interface>●nat dynamic <outside_interface>5·本地管理配置命令5·1 SSH配置命令●rsa local-key-pr create: RSA密钥对●ssh server enable: 启用SSH服务器●ssh user <username> authentication-type password: 设置SSH用户身份验证方式为密码●user-interface vty 0 4、进入VTY用户界面配置模式●authentication-mode aaa: 设置认证模式为AAA●protocol inbound ssh: 允许SSH访问5·2 SNMP配置命令●snmp-agent sys-info version <version>: 设置SNMP版本●snmp-agent community read <community_name>: 配置SNMP读社区字符串附件:本文档不涉及附件。
H3C的路由器配置命令详解H3C路由器配置命令详解一、概述本文档旨在介绍H3C路由器配置命令的详细使用方法。
通过本文可以了解到H3C路由器配置命令的各种功能和参数,并能够根据具体需求进行相应配置。
二、H3C路由器配置命令1:基本配置命令1.1 系统配置命令a) sysname 命令:设置设备名称b) ipv6 enable 命令:开启IPv6支持c) banner motd 命令:设置登录提示信息d) password simple 命令:设置用户简单密码1.2 接口配置命令a) interface 命令:进入接口配置模式b) ip address 命令:设置接口IP地址c) description 命令:设置接口描述信息d) shutdown 命令:关闭接口2:路由配置命令2.1 静态路由配置命令a) ip route-static 命令:配置静态路由b) preference 命令:设置路由优先级c) nexthop 命令:设置下一跳地址2.2 动态路由配置命令a) ospf area 命令:配置OSPF区域b) ospf network 命令:配置OSPF网络类型c) bgp as-number 命令:配置BGP自治系统号d) rip version 命令:配置RIP协议版本号3:安全配置命令3.1 访问控制列表(ACL)配置命令a) acl number 命令:创建ACL列表b) rule 命令:配置ACL规则c) acl apply 命令:将ACL应用到接口3.2 密码配置命令a) local-user 命令:创建本地用户b) password cipher 命令:设置用户密码4:其他配置命令4.1 网络地址转换(NAT)配置命令a) nat enable 命令:开启NAT功能b) nat server 命令:配置NAT服务器地址映射c) nat outbound 命令:配置NAT出口地址池4.2 服务质量(QoS)配置命令a) qos car 命令:配置流量控制b) qos queue 命令:配置队列策略c) qos dscp 命令:配置DSCP值5:保存配置命令save 命令:保存当前配置到设备三、附件本文档的附件包括相关的配置示例和命令使用示例。
H3C路由器设置概述H3C路由器是一种常用的网络设备,用于实现局域网和广域网之间的数据传输。
本文档将介绍如何进行H3C路由器的基本设置和配置。
硬件连接在进行H3C路由器的设置之前,确保已正确连接硬件设备。
以下是常见的硬件连接步骤:1.通过网线将H3C路由器的WAN口与外部网络连接,例如将WAN口连接到宽带调制解调器或其他网络设备。
2.使用网线将H3C路由器的LAN口与计算机或其他局域网设备连接。
登录路由器1.打开你的计算机的网络连接,并确保与H3C路由器连接的网线正常工作。
2.打开一个浏览器,输入H3C路由器的默认网关地址(一般为192.168.1.1或192.168.0.1)。
3.在浏览器中按下回车键后,将显示H3C路由器的登录页面。
4.输入默认的用户名和密码进行登录。
常见的默认用户名和密码是admin/admin或者root/admin。
如果你不确定,请参考H3C路由器的用户手册或者咨询网络管理员。
路由器基本设置完成登录后,可以进行以下基本设置:修改管理员密码为了保护路由器的安全,需要修改默认的管理员密码。
以下是修改管理员密码的步骤:1.在路由器的管理界面中,找到“系统管理”或“设置”选项。
2.点击“密码”或“管理员密码”选项。
3.输入当前的管理员密码。
4.输入新的管理员密码,并确认新密码。
5.点击“保存”或“应用”按钮以保存修改后的密码。
设置路由器名称为了便于识别和管理,可以设置一个自定义的路由器名称。
以下是设置路由器名称的步骤:1.在路由器的管理界面中,找到“系统管理”或“设置”选项。
2.点击“设备名称”或“路由器名称”选项。
3.输入新的路由器名称。
4.点击“保存”或“应用”按钮以保存修改后的路由器名称。
配置IP地址和子网掩码路由器需要一个IP地址和子网掩码才能与其他设备通信。
以下是配置IP地址和子网掩码的步骤:1.在路由器的管理界面中,找到“网络设置”或“LAN设置”选项。
2.点击“IP地址设置”或“IP配置”选项。
华三交换机-路由器配置命令华三交换机-路由器配置命令第一章:登录华三交换机-路由器1. 使用浏览器登录:a. 打开浏览器;b. 在地址栏中输入交换机-路由器的IP地址;c. 输入正确的用户名和密码;d. 单击登录按钮。
2. 使用命令行登录:a. 打开命令提示符或终端窗口;b. 输入telnet或ssh命令,后跟交换机-路由器的IP地址;c. 输入正确的用户名和密码;d. 按下回车键登录。
第二章:基本配置1. 设置主机名:hostname [主机名]2. 设置登录密码:enable password [密码]3. 配置管理接口:interface [接口]ip address [IP地址] [子网掩码] 4. 配置默认网关:ip default-gateway [默认网关]第三章:VLAN(虚拟局域网)配置1. 创建VLAN:vlan [VLAN号]name [VLAN名称]2. 配置端口―VLAN关联:interface [端口]switchport mode accessswitchport access vlan [VLAN号] 3. 配置交换机端口为Trunk口:interface [端口]switchport mode trunk第四章:路由配置1. 静态路由配置:ip route [目标网络] [目标子网掩码] [下一跳IP地址] 2. OSPF(开放最短路径优先)配置:router ospf [进程号]network [网络地址] [通配符] area [区域号]3. BGP(边界网关协议)配置:router bgp [自治系统号]neighbor [对等体IP地址] remote-as [对等体自治系统号]第五章:安全配置1. 配置SSH(安全外壳协议):crypto key generate rsaip ssh server enable2. 配置访问控制列表(ACL):ip access-list [ACL名称]permit/deny [源IP地址] [目标IP地址] [协议]第六章:性能优化配置1. 配置端口速率限制:interface [端口]bandwidth [带宽]2. 配置端口链路聚合(LACP):interface port-channel [聚合组号]channel-group [组号] mode active3. 配置端口流量控制:interface [端口]storm-control [选项]附件:本文档涉及的附件可在[link]。
H3C交换机配置命令大全1、system-view 进入系统视图模式2、sysname 为设备命名3、display current-configuration 当前配置情况4、 language-mode Chinese|English 中英文切换5、interface Ethernet 1/0/1 进入以太网端口视图6、 port link-type Access|Trunk|Hybrid 设置端口访问模式7、 undo shutdown 打开以太网端口8、 shutdown 关闭以太网端口9、 quit 退出当前视图模式10、 vlan 10 创建VLAN 10并进入VLAN 10的视图模式11、 port access vlan 10 在端口模式下将当前端口加入到vlan 10中12、port E1/0/2 to E1/0/5 在VLAN模式下将指定端口加入到当前vlan中13、port trunk permit vlan all 允许所有的vlan通过H3C路由器1、system-view 进入系统视图模式2、sysname R1 为设备命名为R13、display ip routing-table 显示当前路由表4、 language-mode Chinese|English 中英文切换5、interface Ethernet 0/0 进入以太网端口视图6、 ip address 192.168.1.1 255.255.255.0 配置IP地址和子网掩码7、 undo shutdown 打开以太网端口8、 shutdown 关闭以太网端口9、 quit 退出当前视图模式10、ip route-static 192.168.2.0 255.255.255.0 192.168.12.2 description To.R2 配置静态路由11、 ip route-static 0.0.0.0 0.0.0.0 192.168.12.2 description To.R2 配置默认的路由H3C S3100 SwitchH3C S3600 SwitchH3C MSR 20-20 Router1、调整超级终端的显示字号;2、捕获超级终端操作命令行,以备日后查对;3、 language-mode Chinese|English 中英文切换;4、复制命令到超级终端命令行,粘贴到主机;5、交换机清除配置 :<H3C>reset save ;<H3C>reboot ;6、路由器、交换机配置时不能掉电,连通测试前一定要检查网络的连通性,不要犯最低级的错误。
H3C路由器常用基本配置命令H3C 路由器常用基本配置命令如下:1、系统配置1.1 主机名配置在进入配置模式后,使用 `sysname <主机名>` 命令来配置设备的主机名。
主机名用于标识设备。
示例:```[Router] sysname Router-1```1.2 基本配置保存在进行配置之后,使用 `save` 命令将基本配置保存到设备的NVRAM 中。
这样可以在设备重启后,加载该配置。
示例:```[Router] save```2、接口配置2.1 Ethernet 接口配置在进入接口配置模式后,使用 `interface Ethernet <接口号>` 命令来配置 Ethernet 接口。
可以配置接口的描述、IP 地质、子网掩码等。
示例:```[Router-Ethernet0/0/1] description LAN interface[Router-Ethernet0/0/1] ip address 192.168:0.1255.255.255:0```2.2 VLAN 接口配置在进入接口配置模式后,使用 `interface Vlan <VLAN 号>`命令来配置 VLAN 接口。
可以配置接口的描述、IP 地质、子网掩码等。
示例:```[Router-Vlan10] description Management VLAN[Router-Vlan10] ip address 10:0:0.1 255.255.255:0```3、静态路由配置使用 `ip route-static <目的网络> <子网掩码> <下一跳地质>` 命令来配置静态路由。
静态路由指定了如何将数据包从一个网络发送到另一个网络。
示例:```[Router] ip route-static 192.168.2:0 255.255.255:0 10:0:0.2```4、路由协议配置4.1 OSPF 配置使用 `ospf <进程 ID>` 命令进入 OSPF 配置模式,并使用`area <区域 ID>` 命令配置区域。
h3c路由器配置方案H3C路由器配置方案1.简介本文档旨在详细介绍H3C路由器的配置方案。
H3C路由器是一款高性能、可靠性强的网络设备,具备灵活的配置能力和多种安全功能,可广泛应用于各种规模的企业网络环境。
2.路由器基本配置2.1 初始设置2.1.1 连接路由器2.1.2 进入路由器命令行界面2.1.3 配置路由器主机名2.1.4 设置管理口IP地质2.1.5 配置登录密码和特权级密码2.2 网络接口配置2.2.1 配置以太网接口参数2.2.2 配置VLAN接口参数2.2.3 配置子接口参数2.3 静态路由配置2.3.1 配置默认路由2.3.2 配置静态路由表2.4 动态路由配置2.4.1 配置OSPF动态路由2.4.2 配置BGP动态路由2.5 策略路由配置2.5.1 配置基于源IP的策略路由2.5.2 配置基于目的IP的策略路由3.安全配置3.1 访问控制列表(ACL)配置3.1.1 配置标准ACL3.1.2 配置扩展ACL3.1.3 配置ACL应用3.2 防火墙配置3.2.1 配置基于ACL的防火墙策略 3.2.2 配置应用层防火墙策略3.3 VPN配置3.3.1 配置IPSec VPN3.3.2 配置SSL VPN4.高可用性配置4.1 VRRP配置4.1.1 配置VRRP组4.1.2 配置虚拟IP地质 4.1.3 配置优先级4.2 HSRP配置4.2.1 配置HSRP组4.2.2 配置虚拟IP地质 4.2.3 配置优先级4.3 GLBP配置4.3.1 配置GLBP组4.3.2 配置虚拟IP地质4.3.3 配置优先级5.附件本文档附带以下附件,供参考:- 示例配置文件- H3C路由器官方文档6.法律名词及注释- ACL:访问控制列表(Access Control List),一种用于对网络流量进行过滤和控制的技术。
- VRRP:虚拟路由器冗余协议(Virtual Router Redundancy Protocol),用于实现路由器的冗余备份。
H3C路由器配置命令表H3C路由器配置命令表1. 登录路由器打开终端软件,通过SSH或Telnet等方式登录路由器。
查看连接路由器的IP地址,并使用相应的登录命令。
登录命令示例:```telnet 192.168.1.1```2. 基本配置配置路由器的基本信息,包括主机名、域名、设备密码等。
主机名配置命令示例:```sysname Router```域名配置命令示例:```ip domn nam```设备密码配置命令示例:```password level 3 password123```3. 网络接口配置配置路由器的各个网络接口,包括IP地址、接口描述、接口状态等。
配置接口IP地址命令示例:```interface GigabitEthernet0/0/1ip address 192.168.1.1 255.255.255.0```配置接口描述命令示例:```interface GigabitEthernet0/0/1description LAN 1```配置接口状态命令示例:```interface GigabitEthernet0/0/1shutdown```4. 静态路由配置配置静态路由,指定路由器的下一跳地址。
配置静态路由命令示例:```ip route-static 10.0.0.0 255.0.0.0 192.168.2.1```5. 动态路由配置配置动态路由,使路由器能够自动学习并转发路由信息。
启用动态路由命令示例:```router ripnetwork 192.168.0.0```配置邻居关系命令示例:```ipv6 rip 1 enableipv6 rip 1 neighbor 2001:db8::1 GigabitEthernet0/0/1 ```6. ACL配置配置访问控制列表(ACL),用于控制数据包的转发。
创建ACL命令示例:```acl number 2001rule 10 permit ip source 192.168.1.0 0.0.0.255```将ACL应用到接口命令示例:```interface GigabitEthernet0/0/1traffic-filter acl 2001 outbound```7. NAT配置配置网络地址转换(NAT),用于实现内部私有IP地址与外部公有IP地址之间的映射。
h3c路由器配置命令h3c路由器是一款比较只能且配置相对复杂的一款设备,很多时候配置h3c路由器都需要用到命令,下面是店铺整理的一些关于h3c 路由器配置命令的相关资料,供您参考。
h3c路由器配置命令[Quidway]sysname router_name 命名路由器(或交换机)[Quidway]delete 删除Flash ROM中的配置[Quidway]save 将配置写入Flash ROM[Quidway]interface serial 0 进入接口配置模式[Quidway]quit 退出接口模式到系统视图[Quidway]shutdown/undo shutdown 关闭/重启接口[Quidway]ip address ip_address subnet_mask 为接口配置IP 地址和子网掩码[Quidway]display version 显示VRP版本号[Quidway]display current-configuration 显示系统运行配置信息[Quidway]display interfaces 显示接口配置信息[Quidway]display ip routing 显示路由表[Quidway]ping ip_address 测试网络连通性[Quidway]tracert ip_address 测试数据包从主机到目的地所经过的网关[Quidway]debug all 打开所有调试信息[Quidway]undo debug all 关闭所有调试信息[Quidway]info-center enable 开启调试信息输出功能[Quidway]info-center console dubugging 将调试信息输出到PC[Quidway]info-center monitor dubugging 将调试信息输出到Telnet终端或哑终端换机配置命令举例(大括号{}中的选项为单选项,斜体字部分为参数值[Quidway]super password password 修改特权模式口令[Quidway]sysname switch_name 命名交换机(或路[Quidway]interface ethernet 0/1 进入接口视图[Quidway]quit 退出系统视图[Quidway-Ethernet0/1]duplex {half|full|auto} 配置接口双工工[Quidway-Ethernet0/1]speed {10|100|auto} 配置接口速率[Quidway-Ethernet0/1]flow-control 开启流控制[Quidway-Ethernet0/1]mdi {across|normal|auto} 配置MDI/MDIX[Quidway-Ethernet0/1]shutdown/undo shutdown 关闭/重启端口VLAN基本配置命令(以Quidway S3026为例) [Quidway]vlan 3 创建并进入VLAN配置模式,缺省时系统将所有端口加入VLAN 1,这个端口既不能被创建也不能被删除。
H3C路由器简单命令H3C路由器简单命令本文档将介绍H3C路由器的一些简单命令,以帮助用户快速了解和使用该设备。
1.登录和退出路由器1.1 登录路由器使用以下命令登录路由器:```login```输入正确的用户名和密码后,即可成功登录路由器。
1.2 退出路由器使用以下命令退出路由器:```quit```输入该命令后,会退出当前路由器的登录状态。
2.配置路由器2.1 进入全局配置模式使用以下命令进入全局配置模式:```system-view```进入全局配置模式后,可以进行路由器的各种配置操作。
2.2 配置接口使用以下命令配置路由器的接口:```interface <interface-name>```其中,<interface-name>为接口的名称,例如GigabitEthernet 0/0/1.接口名称可以通过以下命令进行查看:```display interface brief```2.3 配置IP地质使用以下命令配置接口的IP地质:```ip address <ip-address> <subnet-mask>```其中,<ip-address>为IP地质,<subnet-mask>为子网掩码。
2.4 配置静态路由使用以下命令配置静态路由:```ip route-static <destination-network> <subnet-mask> <next-hop-address>```其中,<destination-network>为目标网络,<subnet-mask>为目标网络的子网掩码,<next-hop-address>为下一跳的IP地质。
3.查看路由器信息3.1 查看接口信息使用以下命令查看接口的详细信息:```display interface <interface-name>```其中,<interface-name>为接口的名称。
路由器:1、进入SETUP模式Router#setup2、时间设置router#clock set hh:mm:ss date moth year3、 router>show historyRouter>terminal history size lines4、 router#show version5、 router#show running-config6、 router#show starup-config7、 router(config)#hostname name 主机命名8、 router(config)#banner motd # message # 开机时的固定显示信息9、 router(config)#enable password password 特权模式明文密码10、 router(config)#no enable password11、 router(config)#enable secret password 特权模式加密密码12、 router(config)#no enable secret13、 router(config)#service password-encryption特权模式把明文密码加密密码,但没enable secret安全可以反解14、 router(config)#line console控制台密码15、 router(config-line)#login16、 router(config-line)#password password17、 router(config-line)#exec-timeout mm ss 禁止控制台会话自动退出18、 router(config-line)#logging synchronous重显被打乱的控制台输入router(config)#no ip domain-lookup 禁止域名解析19、 router(config)#line vty 0 4虚拟终端密码20、 router(config-line)#login21、 router(config-line)#password password22、 router(config)#interface type number(slot/port)端口设置23、 router(config-if)#ip address ip summast24、 router(config-if)#clock rate 64000〔时钟频率单位为bps,只在DCE端设置〕25、 router(config-if)#bandwith 64(带宽设置,单位为KB)26、 router(config-if)#no shutdown(shutdown)27、 router(config-if )#media-type type(10base) 为以太网端口选择适当的介质类型28、 router(config-if )#ctrl+z保存退出到特权模式29、 router#30、 router>用户模式enable进入router#特权模式config terminal进入router(config)#全局配置模式31、Interface Router(config-if)#端口设置Subinterface Router(config-subif)# 子端口设置Controller Router(config-controller)# 控制口设置Line Router(config-line)# 虚拟口设置Router Router(config-router)# 路由设置IPX router Router(config-ipx-router)#IPX路由设置32、 router#show interface33、 router#show interface Ethernet 034、 router#show interface serial 035、 router#show running-config36、 router#show starup-config37、 router#show flash38、 router#show controller39、 router#show controller interface type40、 router#show running-configrouter#copy running-config starup-configrouter#copy running-config tftprouter#copy starup-config tftprouter#copy flash tftprouter#copy tftp star-configrouter#copy tftp flash--------------------------------------------------------------------------------端口状态Serial1 is up, line protocol is up正常工作Serial1 is up, line protocol is down连接问题Serial1 is down, line protocol is down端口问题Serial1 is administratively down, line protocol is down人为关闭配置存放器的值1、关闭路由器的电源重新启动按住ctrl+break键入进2、>3、>o/r 0×2142(跳过nvarm启动恢复密码)4、>I5、当系统提示是否进入setup模式时,按N6、 router>7、 router>enable8、 router#9、进入修改后〔包括密码、存放器的值:0×2100为rom monitor启动、0×2101为setup 模式启动、0×2102为10、 router#copy running-config starup-config11、 router#reload12、也可以在router#setup进入setup模式静态路由协议设置router(config)#ip route network submask(要到达的网络号掩码)ip address(下一跳或出口ip地址)router(config)#ip route 0.0.0.0 s0〔出口端口或下一跳IP地址〕rip设置router(config)#router riprouter(config-router)#network network-numberrouter#show ip protocol查看RIP信息router#show ip route 查看路由表router#debug ip rip查看RIP更新信息router(config-router)#passive-interface e0(阻止发出作息)router(config-router)#ip rip receive version 1 2接收1、2RIP版本信息igrp设置router(config)#router igrp as numberrouter(config-router)#network network numberrouter#show ip route 查看路由表router#debug ip igrp events 查看IGRP路由更新大概信息router#debug ip igrp transaction 查看IGRP路由更新详细信息Router(config-router)#variance multiplier 控制 IGRP load balancingRouter(config-router)#traffic-share {balanced | min}控制load-balanced traffic 的分布eigrp设置router(config)#router eigrp as numberrouter(config-router)#network network numberrouter(config)#no auto-summry 关闭自动汇总router(config)# auto-summry 打开自动汇总〔默认是打开的〕router#show ip route eigrp 显示当前的路由表里的EIGRP条目router#show ip protocol 显示活动的路由协议进程的参数和当前的状态router#show ip eigrp neighbors 显示被EIGRP发现的邻居router#show ip eigrp traffic 显示发出和收到的IP EIGRP 包的数量router#show ip eigrp topology 显示IP EIGRP的拓扑表Router#debug ip eigrpospf设置1. Router(config)#router ospf process-idRouter(config-router)#network address(可以是网络号也可以是Ip地址 mask〔通配掩码〕area area-idRouter(config-if)# ip ospf priority numbe 配置OSPF的优先级Router#show ip protocols 验证OSPF的配置Router#show ip route 显示路由器学到的所有路由Router#show ip ospf interface type number 显示 area-ID 和邻接信息Router#show ip ospf neighbor 基于每接口显示OSPF邻居信息Router#debug ip ospf eventsRouter#debug ip ospf packet2. Router(config)# interface loopback number〔lookback回路配置〕Router(config-if)# ip address ip-address subnet-maskRouter(config-if)# ip ospf cost cost-numbe 修改OSPF 的Cost数值Router(config-if)# ip ospf authentication-key key 配置明文口令Router(config-if)# ip ospf messge-digest-key keyid md5 key 配置MD5口令(keyid和key必须配对一致,两邻居才可以通信)Router(config-route)# area area-id authentication [message-digest]message-digest为可选项,使用后路由器只传送口令消息的摘要〔或散列〕配置OSPF区域的验证:3. Router(config-if)# ip ospf hello-interval seconds 配置hello间隔:Router(config-if)# ip ospf dead-interval seconds配置down机判断间隔--------------------------------------------------------------------------------访问列表1.标准访问列表(standard access lists):只使用源IP地址来做过滤决定Router(config)#access-list 10 permit anyRouter(config)#int e1Router(config-if)#ip access-group 10 out使用IP标准ACL来控制VTY线路的访问.Router(config)#line vty 0 4Router(config-line)#access-class 50 in删除IP标准ACLRouter(config-line)#no ip access-class 50 inRouter(config)#no access-list 502.扩展访问列表(extended access lists):它比拟源IP地址和目标IP地址,层3的协议字段,层4端口号来做过滤决定Router(config)#access-list 110 deny tcp any host 172.16.30.5 eq 21Router(config)#access-list 110 deny tcp any host 172.16.30.5 eq 23Router(config)#access-list 110 permit ip any anyRouter(config)#int e1Router(config-if)#ip access-group 110 outrouter(config)#line vty 0 4outer(config-line)#access-class 12 in3.show ip interface:只显示IP访问列表信息4.show ip interface:显示所有接口的信息和配置的ACL信息5.show ip interface [接口号]:显示具体某个接口的信息和配置的ACL信息6.show running-config:显示DRAM信息和ACL信息,以与接口对ACL的应用信息. 交换机配置交换机上设置登陆口令Switch(config)# enable password level level passwordSwitch(config)# no enable password level level passwordhostname1900/2900(config)#hostname hostnameIP Address1900(config)#ip address {ip address} {mask}2950(config#interface vlan 12950(config-if)#ip address {ip_address} {mask}2950(config)#interface vlan 1default gateway1900/2950(config)#ip default-gateway {ip address}查看交换机的IP地址1900#show ipManagement VLAN: 12950#show interface vlan 1Vlan1 is up, line protocol is upHardware is Cat5k Virtual Ethernet, address is 0010.f6a9.9800 (bia 0010.f6a9.9800)设置双工选项1900(config)#interface e0/11900(config-if)#duplex {auto | full |full-flow-control | half}2950(config)#interface fe0/12950(config-if)#duplex {auto | full | half}设置端口速度:switch(config-if)# speed {10|100|auto}查勘双工选项Switch#show interfaces fastethernet0/3查看MAC地址表1900/2950#show mac-address-table配置永久MAC地址1900(config)#mac-address-table permanent {mac-address type module/port}1900(config)#mac-address-table permanent 2222.2222.2222 ethernet 0/31900#show mac-address-table2950(config)#mac-address-table static mac_addr {vlan vlan_id} [interface int1 [int2 ... int15]]--------------------------------------------------------------------------------配置受限静态MAC地址1900(config)#mac-address-table restricted static {mac-address type module/port src-if-list}1900(config)#mac-address-table restricted static 1111.1111.1111 e0/4 e0/11900#show mac-address-table2950(config)#mac-address-table secure mac-addr interface [vlan vlan-id]2950(config)#mac-address-table secure 0003.3333.3333 fa 0/1 vlan 12950#show mac-address-table配置端口安全性1900(config-if)#port secure max-mac-count count1900(config)#interface e0/41900(config-if)#port secure1900(config-if)#port secure max-mac-count 11900(config)#address-violation {suspend | disable | ignore1900# show mac-address-table security2950(config-if)#port security max-mac-count count2950(config)#interface fa0/12950(config-if)#port security2950(config-if)#port security max-mac-count 102950(config-if)#port security action {shutdown | trap} 2950#show mac-address-table secure2950#show port-security管理配置文件1900#copy nvram tftp://host/dst_file1900#copy tftp://host/src_file nvram2950#copy startup-config tftp://host/dst_file去除 NVRAM1900#delete nvram2950#erase startup-configvlan配置1900 VLAN建立1900下,使用vlan [vlan#] name [name] [vlan#]命令, 如下: >en#config t(config)#hostname 19001900(config)#vlan 2 name sales1900(config)#vlan 3 name marketing1900(config)#vlan 4 name mis1900(config)#exit端口分配1900(config)#int e0/21900(config-if)#vlan-membership static 21900(config)#int e0/41900(config-if)#vlan-membership static 31900(config)#int e0/51900(config-if)#vlan-membership static 41900(config-if)#exit1900(config)#exitVLAN验证1900#sh vlan2900 VLAN建立在2950下创建VLAN,在特权模式下使用vlan database命令2950#vlan database2950(vlan)#vlan 2 name MarketingVLAN 2 modified:Name: Marketing2950(vlan)#vlan 3 name AccountingVLAN 3 added:Name: Accounting2950(vlan)#applyAPPLY plete2950(vlan)#Ctrl+C2950#端口分配2950下的端口配置,使用switchport access vlan [vlan#]命令, 2950(config-if)#int f0/22950(config-if)#switchport access vlan 22950(config-if)#int f0/32950(config-if)#switchport access vlan 32950(config-if)#int f0/42950(config-if)#switchport access vlan 42950(config-if)#exit2950(config)#exit验证配置信息,如下:2950#sh vlan或2950#sh vlan brieftrunk配置1900 trunk配置1900(config)#int f0/261900(config-if)#trunk on2950下在接口配置模式,使用switchport命令,如下:2950(config)#int f0/122950(config-if)#switchport mode trunk2950(config-if)# switchport trunk encapsulation {isl|dot1q}2950(config-if)#^Z将某VLAN从中继中删除2950(config-if)# switchport trunk allowed vlan remove vlan-list添加某个VLAN到中继线路2950(config-if)# switchport trunk allowed vlan add vlan-listConfiguring Inter-VLAN Routing给连接1900的trunk端口配置,使用encapsulation isl [vlan#]命令,如下:2600Router(config-subif)#encapsulation isl [vlan#]2600Router(config-subif)#ip add ip add submask给连接2950的这样配置,如下:2600Router(config-subif)#encapsulation dot1q [vlan#]2600Router(config-subif)#ip add ip add submask--------------------------------------------------------------------------------VTP配置1900(config)#vtp server1900(config)#vtp domain noco1900(config)#vtp password noko在特权模式下使用show vtp命令验证,如下:1900#sh vtpVTP version: 1Configuration revision: 0Maximum VLANs supported locally: 1005Number of existing VLANs: 5VTP domain name: nocoVTP password: nokoVTP operating mode: Server2950如下:2950(config)#vtp mode server2950(config)#vtp domain noco验证信息,如下:2950#sh vtp ?counters VTP statisticsstatus VTP domain status2950#sh vtp statusNAT配置配置静态转换Router(config)#ip nat inside source static local-ip global-ipRouter(config-if)#ip nat insideRouter(config-if)#ip nat outside配置动态地址转换Router(config)#ip nat pool name start-ip end-ip {netmask netmask | prefix-length prefix-length}Router(config)#access-list access-list-number permit source [source-wildcard]Router(config)#ip nat inside source listaccess-list-number pool name配置OverloadingRouter(config)#access-list access-list-number permitsource source-wildcardRouter(config)#ip nat inside source listaccess-list-number interface interface overload去除NAT Translation TableRouter#clear ip nat translation * 去除所有的动态地址转换条目Router#clear ip nat translation inside global-iplocal-ip [outside local-ip global-ip] 去除一个简单的动态地址转换条目〔、外〕Router#clear ip nat translation outsidelocal-ip global-ip去除一个简单的动态地址转换〔外〕Router#clear ip nat translation protocol inside global-ipglobal-port local-ip local-port [outside local-iplocal-port global-ip global-port] 去除一个扩展动态地址转换条目Show命令输出信息Router#show ip nat translations------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------交换机:1.在基于IOS的交换机上设置主机名/系统名:switch(config)# hostname hostname在基于CLI的交换机上设置主机名/系统名:switch(enable) set system name name-string2.在基于IOS的交换机上设置登录口令:switch(config)# enable password level 1 password在基于CLI的交换机上设置登录口令:switch(enable) set passwordswitch(enable) set enalbepass3.在基于IOS的交换机上设置远程访问:switch(config)# interface vlan 1switch(config-if)# ip address ip-address netmaskswitch(config-if)# ip default-gateway ip-address在基于CLI的交换机上设置远程访问:switch(enable) set interface sc0 ip-address netmask broadcast-addressswitch(enable) set interface sc0 vlanswitch(enable) set ip route default gateway4.在基于IOS的交换机上启用和浏览CDP信息:switch(config-if)# cdp enableswitch(config-if)# no cdp enable为了查看Cisco邻接设备的CDP通告信息:switch# show cdp interface [type modle/port]switch# show cdp neighbors [type module/port] [detail]在基于CLI的交换机上启用和浏览CDP信息:switch(enable) set cdp {enable|disable} module/port为了查看Cisco邻接设备的CDP通告信息:switch(enable) show cdp neighbors[module/port] [vlan|duplex|capabilities|detail] 5.基于IOS的交换机的端口描述:switch(config-if)# de脚本ion de脚本ion-string基于CLI的交换机的端口描述:switch(enable)set port name module/number de脚本ion-string6.在基于IOS的交换机上设置端口速度:switch(config-if)# speed{10|100|auto}在基于CLI的交换机上设置端口速度:switch(enable) set port speed moudle/number {10|100|auto}switch(enable) set port speed moudle/number {4|16|auto}7.在基于IOS的交换机上设置以太网的链路模式:switch(config-if)# duplex {auto|full|half}在基于CLI的交换机上设置以太网的链路模式:switch(enable) set port duplex module/number {full|half}8.在基于IOS的交换机上配置静态VLAN:switch# vlan databaseswitch(vlan)# vlan vlan-num name vlaswitch(vlan)# exitswitch# configure teriminalswitch(config)# interface interface module/numberswitch(config-if)# switchport mode accessswitch(config-if)# switchport access vlan vlan-numswitch(config-if)# end在基于CLI的交换机上配置静态VLAN:switch(enable) set vlan vlan-num [name name]switch(enable) set vlan vlan-num mod-num/port-list9. 在基于IOS的交换机上配置VLAN中继线:switch(config)# interface interface mod/portswitch(config-if)# switchport mode trunkswitch(config-if)# switchport trunk encapsulation {isl|dotlq}switch(config-if)# switchport trunk allowed vlan remove vlan-listswitch(config-if)# switchport trunk allowed vlan add vlan-list在基于CLI的交换机上配置VLAN中继线:switch(enable) set trunk module/port [on|off|desirable|auto|nonegotiate]Vlan-range [isl|dotlq|dotl0|lane|negotiate]--------------------------------------------------------------------------------10.在基于IOS的交换机上配置VTP管理域:switch# vlan databaseswitch(vlan)# vtp domain domain-name在基于CLI的交换机上配置VTP管理域:switch(enable) set vtp [domain domain-name]11.在基于IOS的交换机上配置VTP 模式:switch# vlan databaseswitch(vlan)# vtp domain domain-nameswitch(vlan)# vtp {sever|cilent|transparent}switch(vlan)# vtp password password在基于CLI的交换机上配置VTP 模式:switch(enable) set vtp [domain domain-name] [mode{ sever|cilent|transparent }][password password]12. 在基于IOS的交换机上配置VTP版本:switch# vlan databaseswitch(vlan)# vtp v2-mode在基于CLI的交换机上配置VTP版本:switch(enable) set vtp v2 enable13. 在基于IOS的交换机上启动VTP剪裁:switch# vlan databaseswitch(vlan)# vtp pruning在基于CL I 的交换机上启动VTP剪裁:switch(enable) set vtp pruning enable14.在基于IOS的交换机上配置以太信道:switch(config-if)# port group group-number [distribution {source|destination}] 在基于CLI的交换机上配置以太信道:switch(enable) set port channel moudle/port-range mode{on|off|desirable|auto}--------------------------------------------------------------------------------15.在基于IOS的交换机上调整根路径本钱:switch(config-if)# spanning-tree [vlan vlan-list] cost cost在基于CLI的交换机上调整根路径本钱:switch(enable) set spantree portcost moudle/port costswitch(enable) set spantree portvlancost moudle/port [cost cost][vlan-list]16.在基于IOS的交换机上调整端口ID:switch(config-if)# spanning-tree[vlan vlan-list]port-priority port-priority在基于CLI的交换机上调整端口ID:switch(enable) set spantree portpri {mldule/port}priorityswitch(enable) set spantree portvlanpri {module/port}priority [vlans]17. 在基于IOS的交换机上修改STP时钟:switch(config)# spanning-tree [vlan vlan-list] hello-time secondsswitch(config)# spanning-tree [vlan vlan-list] forward-time secondsswitch(config)# spanning-tree [vlan vlan-list] max-age seconds在基于CLI的交换机上修改STP时钟:switch(enable) set spantree hello interval[vlan]switch(enable) set spantree fwddelay delay [vlan]switch(enable) set spantree maxage agingtiame[vlan]18. 在基于IOS的交换机端口上启用或禁用Port Fast 特征:switch(config-if)#spanning-tree portfast在基于CLI的交换机端口上启用或禁用Port Fast 特征:switch(enable) set spantree portfast {module/port}{enable|disable}19. 在基于IOS的交换机端口上启用或禁用UplinkFast 特征:switch(config)# spanning-tree uplinkfast [max-update-rate pkts-per-second]在基于CLI的交换机端口上启用或禁用UplinkFast 特征:switch(enable) set spantree uplinkfast {enable|disable}[rate update-rate] [all-protocols off|on]--------------------------------------------------------------------------------20. 为了将交换机配置成一个集群的命令交换机,首先要给管理接口分配一个IP地址,然后使用如下命令: switch(config)# cluster enable cluster-name cv21. 为了从一条中继链路上删除VLAN,可使用如下命令:switch(enable) clear trunk module/port vlan-range22. 用show vtp domain 显示管理域的VTP参数.23. 用show vtp statistics显示管理域的VTP参数.24. 在Catalyst交换机上定义TrBRF的命令如下:switch(enable) set vlan vlan-name [name name] type trbrf bridge bridge-num[stp {ieee|ibm}]--------------------------------------------------------------------------------25. 在Catalyst交换机上定义TrCRF的命令如下:switch (enable) set vlan vlan-num [name name] type trcrf{ring hex-ring-num|decring decimal-ring-num} parent vlan-num26. 在创建好TrBRF VLAN之后,就可以给它分配交换机端口.对于以太网交换,可以采用如下命令给VLAN分配端口:switch(enable) set vlan vlan-num mod-num/port-num27. 命令show spantree显示一个交换机端口的STP状态.28. 配置一个ELAN的LES和BUS,可以使用如下命令:ATM (config)# interface atm number.subint multiointATM(config-subif)# lane serber-bus ethernet elan-name29. 配置LECS:ATM(config)# lane database database-nameATM(lane-config-databade)# name elan1-name server-atm-address les1-nsap-addressATM(lane-config-databade)# name elan2-name server-atm-address les2-nsap-addressATM(lane-config-databade)# name …--------------------------------------------------------------------------------30. 创建完数据库后,必须在主接口上启动LECS.命令如下:ATM(config)# interface atm numberATM(config-if)# lane config database database-nameATM(config-if)# lane config auto-config-atm-address31. 将每个LEC配置到一个不同的ATM子接口上.命令如下:ATM(config)# interface atm number.subint multipointATM(config)# lane client ethernet vlan-num elan-num32. 用show lane server 显示LES的状态.33. 用show lane bus显示bus的状态.34. 用show lane database显示LECS数据库可容.35. 用show lane client显示LEC的状态.36. 用show module显示已安装的模块列表.37. 用物理接口建立与VLAN的连接:router# configure terminalrouter(config)# interface media module/portrouter(config-if)# de脚本ion de脚本ion-stringrouter(config-if)# ip address ip-addr subnet-maskrouter(config-if)# no shutdown38. 用中继链路来建立与VLAN的连接:router(config-ig)# encapsulation[isl|dotlq] vlan-numberrouter(config-if)# ip address ip-address subnet-mask39. 用LANE 来建立与VLAN的连接:router(config)# interface atm module/portrouter(config-if)# no ip addressrouter(config-if)# atm pvc 1 0 5 qsaalrouter(config-if)# atm pvc 2 0 16 ilnirouter(config-if)# interface atm module/port.subinterface multipoint router(config-if)# ip address ip-address subnet-maskrouter(config-if)# lane client ethernet elan-numrouter(config-if)# interface atm module/port.subinterface multipointrouter(config-if)# ip address ip-address subnet-namerouter(config-if)# lane client ethernet elan-namerouter(config-if)# …--------------------------------------------------------------------------------40. 为了在路由处理器上进展动态路由配置,可以用如下IOS命令来进展:router(config)# ip routingrouter(config)# router ip-routing-protocolrouter(config-router)# network ip-network-numberrouter(config-router)# network ip-network-number 〔FengNet.〕41. 配置默认路由:switch(enable) set ip route default gateway42. 为一个路由处理器分配VLANID,可在接口模式下使用如下命令:router(config)# interface interface numberrouter(config-if)# mls rp vlan-id vlan-id-num43. 在路由处理器启用MLSP:router(config)# mls rp ip44. 为了把一个外置的路由处理器接口和交换机安置在同一个VTP域中:router(config)# interface interface numberrouter(config-if)# mls rp vtp-domain domain-name45. 查看指定的VTP域的信息:router# show mls rp vtp-domain vtp domain name46. 要确定RSM或路由器上的管理接口,可以在接口模式下输入如下命令:router(config-if)#mls rp management-interface47. 要检验MLS-RP的配置情况:router# show mls rp48. 检验特定接口上的MLS配置:router# show mls rp interface interface number49. 为了在MLS-SE上设置流掩码而又不想在任一个路由处理器接口上设置访问列表:set mls flow [destination|destination-source|full]50. 为使MLS和输入访问列表可以兼容,可以在全局模式下使用如下命令:router(config)# mls rp ip input-acl--------------------------------------------------------------------------------51. 当某个交换机的第3层交换失效时,可在交换机的特权模式下输入如下命令:switch(enable) set mls enable52. 假如想改变老化时间的值,可在特权模式下输入以下命令:switch(enable) set mls agingtime agingtime53. 设置快速老化:switch(enable) set mls agingtime fast fastagingtime pkt_threshold54. 确定那些MLS-RP和MLS-SE参与了MLS,可先显示交换机引用列表中的容再确定:switch(enable) show mls include55. 显示MLS高速缓存记录:switch(enable) show mls entry56. 用命令show in arp显示ARP高速缓存区的容。
H3C路由器配置命令一、路由器基本配置命令1、system-view 进入系统视图模式2、sysname R1 为设备命名为R3、display ip routing-table 显示当前路由表4、language-mode Chinese|English 中英文切换5、interface Ethernet 0/0 进入以太网端口视图6、ip address 192.168.1.1 255.255.255.0 配置IP地址和子网掩码7、undo shutdown 打开以太网端口8、shutdown 关闭以太网端口9、quit 退出当前视图模式10、ip route-static 192.168.2.0 255.255.255.0 192.168.12.2 description To.R2配置静态路由11、ip route-static 0.0.0.0 0.0.0.0 192.168.12.2 description To.R2配置默认的路由基本配置案例[Quidway]display version 显示版本信息[Quidway]display current-configuration 显示当前配置[Quidway]display interfaces 显示接口信息[Quidway]display ip route 显示路由信息[Quidway]sysname aabbcc 更改主机名[Quidway]super passwrod 123456 设置口令[Quidway]interface serial0 进入接口[Quidway-serial0]ip address <ip><mask>[Quidway-serial0]undo shutdown 激活端口[Quidway]link-protocol hdlc 绑定hdlc协议[Quidway]user-interface vty 0 4[Quidway-ui-vty0-4]authentication-mode password[Quidway-ui-vty0-4]set authentication-mode password simple 2[Quidway-ui-vty0-4]user privilege level 3[Quidway-ui-vty0-4]quit[Quidway]debugging hdlc all serial0 显示所有信息[Quidway]debugging hdlc event serial0 调试事件信息[Quidway]debugging hdlc packet serial0 显示包的信息静态路由配置案例:[Quidway]ip route-static <ip><mask>{interfacenumber|nexthop}[value][reject|blackhole]例如:[Quidway]ip route-static 129.1.0.0 16 10.0.0.[Quidway]ip route-static 129.1.0.0 255.255.0.0 10.0.0.[Quidway]ip route-static 129.1.0.0 16 Serial[Quidway]ip route-static 0.0.0.0 0.0.0.0 10.0.0.动态路由配置案例(RIP):[Quidway]rip[Quidway]rip work[Quidway]rip input[Quidway]rip output[Quidway-rip]network 1.0.0.0 ;可以all[Quidway-rip]network 2.0.0.0[Quidway-rip]peer ip-address[Quidway-rip]summary[Quidway]rip version[Quidway]rip version 2 multicast[Quidway-Ethernet0]rip split-horizon ;水平分隔动态路由配置案例(OSPF):[Quidway]router id A.B.C.D 配置路由器的ID[Quidway]ospf enable 启动OSPF协议[Quidway-ospf]import-route direct 引入直联路由[Quidway-Serial0]ospf enable area <area_id> 配置OSPF区域标准访问列表命令格式如下:acl <acl-number> [match-order config|auto] 默认前者顺序匹配。
rule [normal|special]{permit|deny} [source source-addr source-wildcard|any] 例:[Quidway]acl 10[Quidway-acl-10]rule normal permit source 10.0.0.0 0.0.0.25[Quidway-acl-10]rule normal deny source any二、ACL配置扩展访问控制列表配置命令1.配置TCP/UDP协议的扩展访问列表:rule {normal|special}{permit|deny}{tcp|udp}source {<ipwild>|any}destination <ip wild>|any}[operate]2.配置ICMP协议的扩展访问列表:rule {normal|special}{permit|deny}icmp source {<ip wild>|any]destination {<ip wild>|any][icmp-code] [logging]扩展访问控制列表操作符的含义equal portnumber 等于greater-than portnumber 大于less-than portnumber 小于not-equal portnumber 不等range portnumber1 portnumber区间3.扩展访问控制列表案例[Quidway]acl 10[Quidway-acl-101]rule deny souce any destination any[Quidway-acl-101]rule permit icmp source any destination any icmp-type echo [Quidway-acl-101]rule permit icmp source any destination any icmp-type echo-reply[Quidway]acl 10[Quidway-acl-102]rule permit ip source 10.0.0.1 0.0.0.0 destination 202.0.0.1 0.0.0.0[Quidway-acl-102]rule deny ip source any destination any[Quidway]acl 103[Quidway-acl-103]rule permit tcp source any destination 10.0.0.1 0.0.0.0 destination-port equal ftp[Quidway-acl-103]rule permit tcp source any destination 10.0.0.2 0.0.0.0 destination-port equal www[Quidway]firewall enable[Quidway]firewall default permit|deny[Quidway]int e0[Quidway-Ethernet0]firewall packet-filter 101 inbound|outbound4. NAT的配置地址转换配置案例[Quidway]firewall enable[Quidway]firewall default permit[Quidway]acl 10[Quidway-acl-101]rule deny ip source any destination any[Quidway-acl-101]rule permit ip source 129.38.1.4 0 destination any [Quidway-acl-101]rule permit ip source 129.38.1.1 0 destination any [Quidway-acl-101]rule permit ip source 129.38.1.2 0 destination any [Quidway-acl-101]rule permit ip source 129.38.1.3 0 destination any [Quidway]acl 10[Quidway-acl-102]rule permit tcp source 202.39.2.3 0 destination202.38.160.1 0[Quidway-acl-102]rule permit tcp source any destination 202.38.160.1 0 destination-port great-than1024[Quidway-Ethernet0]firewall packet-filter 101 inbound[Quidway-Serial0]firewall packet-filter 102 inbound[Quidway]nat address-group 202.38.160.101 202.38.160.103 pool [Quidway]acl[Quidway-acl-1]rule permit source 10.110.10.0 0.0.0.25[Quidway-acl-1]rule deny source any[Quidway-acl-1]int serial 0[Quidway-Serial0]nat outbound 1 address-group pool[Quidway-Serial0]nat server global 202.38.160.101 inside 10.110.10.1 ftp tcp [Quidway-Serial0]nat server global 202.38.160.102 inside 10.110.10.2 www tcp[Quidway-Serial0]nat server global 202.38.160.102 8080 inside 10.110.10.3 www tcp[Quidway-Serial0]nat server global 202.38.160.103 inside 10.110.10.4 smtp udp5. PPP验证配置:主验方:pap|chap[Quidway]local-user u2 password {simple|cipher} aaa[Quidway]interface serial 0[Quidway-serial0]ppp authentication-mode {pap|chap}[Quidway-serial0]ppp chap user u1 //pap时,不用此句pap被验方:[Quidway]interface serial 0[Quidway-serial0]ppp pap local-user u2 password {simple|cipher} aaachap被验方:[Quidway]interface serial 0[Quidway-serial0]ppp chap user u1[Quidway-serial0]local-user u2 password {simple|cipher} aaa。