华为模拟器 3.0-实验命令参考
- 格式:doc
- 大小:54.50 KB
- 文档页数:6
华为模拟器命令计算机命令PCA login: root ;使用root用户password: linux ;口令是linux# shutdown -h now ;关机# init 0 ;关机# logout ;用户注销# login ;用户登录# ifconfig ;显示IP地址# ifconfig eth0 <ip address> netmask <netmask> ;设置IP地址# ifconfig eht0 <ip address> netmask <netmask> down ;禁用IP地址# route add 0.0.0.0 gw <ip> ;设置网关# route del 0.0.0.0 gw <ip> ;删除网关# route add default gw <ip> ;设置网关# route del default gw <ip> ;删除网关# route ;显示网关# ping <ip> ;发ECHO包# telnet <ip> ;远程登录交换机命令[Huawei]dis cur ;显示当前配置[Huawei]display current-configuration ;显示当前配置[Huawei]display interfaces ;显示接口信息[Huawei]display vlan all ;显示路由信息[Huawei]display version ;显示版本信息[Huawei]super password ;修改特权用户密码[Huawei]sysname ;交换机命名[Huawei]interface ethernet 0/1 ;进入接口视图[Huawei]interface vlan x ;进入接口视图[Huawei-Vlan-interfacex]ip address 10.65.1.1 255.255.0.0 ;配置VLAN的IP地址[Huawei]ip route-static 0.0.0.0 0.0.0.0 10.65.1.2 ;静态路由=网关[Huawei]rip ;三层交换支持[Huawei]local-user ftp[Huawei]user-interface vty 0 4 ;进入虚拟终端[S3026-ui-vty0-4]authentication-mode password ;设置口令模式[S3026-ui-vty0-4]set authentication-mode password simple 222 ;设置口令[S3026-ui-vty0-4]user privilege level 3 ;用户级别[Huawei]interface ethernet 0/1 ;进入端口模式[Huawei]int e0/1 ;进入端口模式[Huawei-Ethernet0/1]duplex {half|full|auto} ;配置端口工作状态[Huawei-Ethernet0/1]speed {10|100|auto} ;配置端口工作速率[Huawei-Ethernet0/1]flow-control ;配置端口流控[Huawei-Ethernet0/1]mdi {across|auto|normal} ;配置端口平接扭接[Huawei-Ethernet0/1]port link-type {trunk|access|hybrid} ;设置端口工作模式[Huawei-Ethernet0/1]port access vlan 3 ;当前端口加入到VLAN [Huawei-Ethernet0/2]port trunk permit vlan {ID|All} ;设trunk允许的VLAN [Huawei-Ethernet0/3]port trunk pvid vlan 3 ;设置trunk端口的PVID [Huawei-Ethernet0/1]undo shutdown ;激活端口[Huawei-Ethernet0/1]shutdown ;关闭端口[Huawei-Ethernet0/1]quit ;返回[Huawei]vlan 3 ;创建VLAN [Huawei-vlan3]port ethernet 0/1 ;在VLAN中增加端口[Huawei-vlan3]port e0/1 ;简写方式[Huawei-vlan3]port ethernet 0/1 to ethernet 0/4 ;在VLAN中增加端口[Huawei-vlan3]port e0/1 to e0/4 ;简写方式[Huawei]monitor-port <interface_type interface_num> ;指定镜像端口[Huawei]port mirror <interface_type interface_num> ;指定被镜像端口[Huawei]port mirror int_list observing-port int_type int_num ;指定镜像和被镜像[Huawei]description string ;指定VLAN描述字符[Huawei]description ;删除VLAN描述字符[Huawei]display vlan [vlan_id] ;查看VLAN设置[Huawei]stp {enable|disable} ;设置生成树,默认关闭[Huawei]stp priority 4096 ;设置交换机的优先级[Huawei]stp root {primary|secondary} ;设置为根或根的备份[Huawei-Ethernet0/1]stp cost 200 ;设置交换机端口的花费[Huawei]link-aggregation e0/1 to e0/4 ingress|both ;端口的聚合[Huawei]undo link-aggregation e0/1|all ;始端口为通道号[SwitchA-vlanx]isolate-user-vlan enable ;设置主vlan [SwitchA]isolate-user-vlan <x> secondary <list> ;设置主vlan包括的子vlan [Huawei-Ethernet0/2]port hybrid pvid vlan <id> ;设置vlan的pvid [Huawei-Ethernet0/2]port hybrid pvid ;删除vlan的pvid [Huawei-Ethernet0/2]port hybrid vlan vlan_id_list untagged ;设置无标识的vlan如果包的vlan id与PVId一致,则去掉vlan信息. 默认PVID=1。
目录基本操作 (2)路由器 (2)动态路由 (2)RIP (2)OSPF (3)VLAN (3)链路聚合 (3)Vlan间路由 (3)DHCP (4)STP (4)ACL (4)基本ACL (4)高级ACL (4)调用ACL (4)NAT (4)静态NA T (4)END (5)eNSP实验操作基本操作修改时间<Huawei>clock datetime 16:29:30 2016 01-20<Huawei>保存<Huawei>saveThe current configuration will be written to the device.Are you sure to continue?[Y/N]y登陆为管理员账户<Huawei>sys 或<Huawei>system viewEnter system view, return user view with Ctrl+Z.[Huawei]重启<Huawei>reboot修改名称[Huawei]sysname R1[R1]配置console(管理)密码[Huawei]user-interface console 0[Huawei-ui-console0]authentication-mode password[Huawei-ui-console0]set authentication password cipher 123456Ping[Huawei]ping –a 192.168.1.1 12.1.1.1路由器修改网关[Huawei]interface GigabitEthernet 0/0/0ip address 192.168.1.1 255.255.255.0[Huawei]interface GigabitEthernet 0/0/1或[Huawei-GigabitEthernet0/0/0]int g 0/0/1查看路由器信息[Huawei]display this若查看全部信息则[Huawei]display current-configuration查看端口信息[Huawei]display ip interface brief开关端口[Huawei]shutdown[Huawei]undo shutdown反向操作undo路由器Telnet远程控制<Huawei>telnet 192.168.1.2 设置Telnet(vty)接口密码[Huawei]user-interface vty 0 4[Huawei-ui-vty0-4]set authentication passwprd ?Cipher 密文显示Simple 明文显示提升用户权限[Huawei-ui-vty0-4]user privilege level 3抓包右键设配->数据抓包查看路由表[Huawei]display ip routing-table增加路由表[Huawei]ip route-static 目的网络子网掩码出接口/下一跳[Huawei]ip route-static 192.168.2.0 24 12.1.1.2查看ARP表项[Huawei]arp -a提高路由优先级[Huawei]ip route-static 192.168.2.0 24 12.1.1.2 preference 50动态路由RIP配置RIP(更新至v2)[Huawei]rip[Huawei]version 2[Huawei]network 192.168.1.0[Huawei]network 12.0.0.0RIP(v2)认证[Huawei]interface GigabitEthernet 0/0/0[Huawei]rip authentication-mode md5/simple 123456 md5 密文simple 明文更改RIP跳数[Huawei]interface GigabitEthernet 0/0/0[Huawei]rip metricout 5抑制RIP[Huawei]rip[Huawei]silent interfaceOSPF配置OSPF[Huawei]ospf[Huawei]area 0[Huawei]network 192.168.1.0 0.0.0.255[Huawei]area 1[Huawei]network 12.1.1.0 0.0.0.255重置OSPF进程<Huawei>reset ospf process查看OSPF邻居[Huawei]display ospf peer brief修改routeID[Huawei]ospf router-id 1.1.1.1OSPF认证接口[Huawei]interface GigabitEthernet 0/0/0[Huawei]ospf authentication-mode ?hmac-md5keychain 密文认证md5null 空认证simple 明文认证[Huawei]ospf authentication-mode md5 123456修改DR优先级[Huawei]interface GigabitEthernet 0/0/0[Huawei]ospf dr-priority 0VLAN查看vlan[Huawei]display vlan查看关口vlan[Huawei]display port vlan创建vlan[Huawei]vlan 10[Huawei]vlan batch 30 40 50[Huawei]vlan batch 30 to 40配置设置PC-S链路类型[Huawei]interface Eth0/0/1[Huawei-Ethernet0/0/1]port link-type access设置PC-S所属vlan[Huawei]interface Eth0/0/1[Huawei-Ethernet0/0/1]port default vlan 10 配置设置S-S链路类型[Huawei]interface Eth0/0/1[Huawei-Ethernet0/0/1]port link-type trunk设置S-S允许通过的vlan[Huawei]interface Eth0/0/1[Huawei-Ethernet0/0/1]port trunk allow-pass vlan 9 10修改端口PVID[Huawei]interface Eth0/0/1[Huawei-Ethernet0/0/1]port trunk pvid vlan 10查看PVID[Huawei-Ethernet0/0/1]interface Ethernet0/0/1配置设置hybrid链路类型[Huawei]interface Eth0/0/1[Huawei-Ethernet0/0/1]port link-type hybrid手工定义hybrid允许通过vlan、动作[Huawei]interface Eth0/0/1[Huawei-Ethernet0/0/1]port hybrid tagged vlan 10 20 [Huawei-Ethernet0/0/1]port hybrid untagged vlan 9 10链路聚合创建虚拟接口[Huawei]interface Eth-Trunk 12[Huawei- Eth-Trunk12]interface G0/0/1[Huawei-GE0/0/1]Eth-trunk 12[Huawei-GE0/0/1]interface G0/0/2[Huawei-GE0/0/1]Eth-trunk 12查看链路聚合信息[Huawei]display interface eth-trunk 1Vlan间路由三级交换机配置对交换机[Huawei]vlan batch 10 20[Huawei]interface GE0/0/1[Huawei-GE0/0/1]port link-type trunk[Huawei-GE0/0/1]port trunk allow-pass vlan 10 20对路由器[Huawei]vlan 30[Huawei-vlan30] interface GigabitEthernet 0/0/1[Huawei-GigabitEthernet0/0/1]port link-type access[Huawei-GigabitEthernet0/0/1]port default vlan 30[Huawei]interface Vlanif 30[Huawei-Vlanif30]ip address 192.168.3.1 24三级交换机网关[Huawei]int g 0/0/1[Huawei-GE0/0/1]port link-type trunk[Huawei-GE0/0/1]port trunk allow-pass vlan 10 20 [Huawei] vlan batch 10 20[Huawei]interface Vlanif 10[Huawei-Vlanif10]ip address 192.168.1.124[Huawei]interface Vlanif 20[Huawei-Vlanif20]ip address 192.168.2.1 24路由器单臂路由设置子接口[Huawei]interface g0/0/1. ?<1-4096>[Huawei]interface g0/0/1.1[Huawei-G0/0/1.1]dot1q termination vid 10[Huawei-G0/0/1.1]arp broadcast enable[Huawei-G0/0/1.1]ip address 192.168.1.1 24DHCP基于接口地址池开启DHCP功能[Huawei]dhcp enable关联接口和接口地址池[Huawei]interface GigabitEthernet0/0/0[Huawei-GEthernet0/0/0]dhcp select interface设置DNS[Huawei-GEthernet0/0/0]dhcp server dns-list 8.8.8.8设置租期时间[Huawei-GEthernet0/0/0]dhcp server lease day ?Hour minute基于全局地址池[Huawei]开启功能同上[Huawei]ip pool Huawei设置掩码[Huawei-ip-pool-Huawei]network 1.1.1.0 mask 24 设置网关[Huawei-ip-pool-Huawei]gateway-list 1.1.1.1设置DNS[Huawei-GEthernet0/0/0]dhcp server dns-list 8.8.8.8设置租期时间[Huawei-ip-pool-Huawei]lease day 10调用地址池[Huawei]interface GigabitEthernet0/0/1[Huawei-GigabitEthernet0/0/1]dhcp select global关联接口和接口地址池[Huawei]interface GigabitEthernet0/0/0[Huawei-GEthernet0/0/0]dhcp select interface STP开启STP[Huawei]stp mode stp改优先级[Huawei]stp priority 4096<0-65536> step 4096查看stp端口[Huawei]display stp brief阻塞ALTE Discarding 丢弃正常ROOT ForwardingACL基本ACL[Huawei]acl 2000[Huawei-acl-basic-2000]rule ?<0-4294967294> Step 5deny 拒绝permit 允许[Huawei-acl-basic-2000]rule deny source 192.168.2.00.0.0.255高级ACL[Huawei]acl 3000[Huawei-acl-basic-3000]rule denyIp tcp udp 。
华为模拟器配置实例实验一计算机和交换机基本设置添加一个交换机,一个计算机,双击交换机,进入终端配置:systempassword:[Quidway]sysname S3026 ;交换机命名 [S3026]super password 111 ;设置特权密码 [S3026]user-interface vty 0 4[S3026-ui-vty0-4]authentication-mode password[S3026-ui-vty0-4]set authentication-mode password simple 222 [S3026-ui-vty0-4]user privilege level 3 [S3026-ui-vty0-4]quit [S3026]quitsys password:111[S3026]display currect-config [S3026]dis curr[S3026]vlan 2[S3026-vlan2]port ethernet0/2 [S3026-vlan2]port e0/4 to et0/6 [S3026-vlan2]quit [S3026]dis vlan [S3026]int e0/3[S3026-Ethernet1]port access vlan 2 [S3026-Ethernet1]quit [S3026]dis vlan [S3026]dis curr[S3026]interface vlan 1[S3026-Vlan-interface1]ip address 10.65.1.8 255.255.0.0 [S3026-Vlan-interface1]quit[S3026]ip route-static 0.0.0.0 0.0.0.0 10.65.1.2 [S3026]ip default-gateway 10.65.1.2 [S3026]dis curr [S3026]save双击小电脑: login:rootpassword:linux[root@PCA root]#ifconfig eth0 10.65.1.1 netmask 255.255.0.0 [root@PCA root]#ifconfig[root@PCA root]#route add default gw 10.65.1.2 [root@PCA root]#route[root@PCA root]#ping 10.65.1.8 [root@PCA root]#telnet 10.65.1.8实验二配置端口聚合要求聚合的端口工作在全双工,速度一致,在同一槽口且连续。
华为模拟器配置实例实验⼀计算机和交换机基本设置添加⼀个交换机,⼀个计算机,双击交换机,进⼊终端配置:systempassword:[Quidway]sysname S3026;交换机命名[S3026]super password111;设置特权密码[S3026]user-interface vty04 [S3026-ui-vty0-4]authentication-mode password[S3026-ui-vty0-4]set authentication-mode password simple222[S3026-ui-vty0-4]user privilege level3[S3026-ui-vty0-4]quit[S3026]quitsyspassword:111[S3026]display currect-config[S3026]dis curr[S3026]vlan2[S3026-vlan2]port ethernet0/2[S3026-vlan2]port e0/4to et0/6[S3026-vlan2]quit[S3026]dis vlan[S3026]int e0/3[S3026-Ethernet1]port access vlan2[S3026-Ethernet1]quit[S3026]dis vlan[S3026]dis curr[S3026]interface vlan1[S3026-Vlan-interface1]ip address10.65.1.8255.255.0.0[S3026-Vlan-interface1]quit[S3026]ip route-static0.0.0.00.0.0.010.65.1.2[S3026]ip default-gateway10.65.1.2[S3026]dis curr[S3026]save双击⼩电脑:login:rootpassword:linux[root@PCA root]#ifconfig eth010.65.1.1netmask255.255.0.0 [root@PCA root]#ifconfig[root@PCA root]#route add default gw10.65.1.2[root@PCA root]#route[root@PCA root]#ping10.65.1.8[root@PCA root]#telnet10.65.1.8实验⼆配置端⼝聚合要求聚合的端⼝⼯作在全双⼯,速度⼀致,在同⼀槽⼝且连续。
命令行注释命令行进入特权模式enable进入配置模式config切换语言switch language-mode查看全局配置display current-configuration查看单板温度display temperature 0查看DBA信息display dba-profile all查看线路模板信息display ont-lineprofile gpon all查看业务模板信息display ont-srvprofile gpon all查看流量模板信息display traffic table ip from-index 0查看设备单板display board 0查看设备某个单板,或者某个单板下ONU在线情况display board 0/2查看ONU是否上线display ont autofind all查看某个VLAN上下行Mac display mac-address vlan 3000进入单板interface gpon 0/2在单板下查看整个单板的配置interface gpon 0/1 display current-configuration在单板下查看某个PON口的光模块状态display port state 0在单板下查看某个PON口的流量display port traffic 0在单板下查看某个ONU的帧统计display statistics ont 0 0在单板下查看某个ONU的详细信息display ont info 0 0在单板下查看某个ONU的注册信息display ont register-info 0 0在单板下查看某个ONU的光模块信息display ont optical-info 0 0查看某个PON口配置信息display current-configuration port 0/1/0搜索匹配信息display current-configuration | begin进入主控板/上行板interface scu 0/9 interface giu 0/19在主控板/上行板模式下查看CRC错包display port statistics 0在主控板/上行板模式下查看光模块收发光信息display port ddm-info 0在主控板/上行板模式下查看端口流量信息display port traffic 0在主控板/上行板模式下查看光模块完整信息display port opticstate 0查看所有在线IPTV用户display igmp user online all查看某个PON口的IPTV用户display igmp user port 0/3/15查看某个IPTV用户是否正常观看节目display igmp user service-port 693查看BTV细节配置display current-configuration section btv查看聚合组、保护组细节配置display current-configuration section bbs查看SNMP细节配置display current-configuration section public 查看VLAN细节配置display current-configuration section vlan 命令行注释命令行进入特权模式enable进入配置模式config切换语言switch language-mode查看全局配置display current-configuration查看设备单板display board 0查看宽带端口在线情况display board 0/1查看语音端口在线情况display pstn state 0/2查看用户MAC地址display mac-address all查看语音H248接口协议状态信息display if-h248 all重启H248接口interface h248 0 reset coldstart y外线测试test pots loop-line-test 0/2/2 busy force语音仿真拨号(主叫)test pots emulational-caller caller-port 0/2/2 callee-telno 186********ONU常用命令OLT常用命令语音仿真拨号(被叫)test pots emulational-callee callee-port 0/2/2查看语音配置display current-configuration section h举例备注业务板、主控板、上行板等业务板类型有GPBD(8口)、GPFD(16口)等;主控板有SCUN 、SCUL;上行板有GICF根据注册信息可以查看设备上下线原因,一般情况下,有掉电(ONT dying-gasp)、丢光(LOSi)、断链等光模块信息需要查看ONU收OLT的光、OLT收ONU的光可根据IP地址、MAC地址、loid、设备描述等进行匹配搜索有错包影响IPTV用户使用根据查看结果可知道用户的service-port索引号根据查看结果可知道用户的service-port索引号根据用户的service-port索引号来查看举例备注可查看业务板、主控板,扣板等。
交换机VLAN配置一、实验目的1、掌握VLAN工作原理及配置技术;2、熟悉华为交换机常用的VLAN配置命令。
二、实验设备主机、交换机。
三、实验要求1、按图1构建网络拓朴图,主机IP地址可自定义;2、将PC3划分到VLAN 2,PC4划分到VLAN 3,查看配置并测试网络连通性。
图1 网络拓朴图3、增加4台主机,网络拓朴图如图2所示,将接GigabitEthernet 0/0/5-GigabitEthernet 0/0/6端口的主机划分到VLAN 2,接GigabitEthernet 0/0/7-GigabitEthernet 0/0/8端口的主机划分到VLAN4,查看配置并测试网络连通性。
图2 网络拓朴图4、配置登录验证方式(1) 配置配置aaa远程认证;(2) 配置交换机远程登录的用户名和密码;(3) 配置登录方式为telnet。
四、实验步骤1、创建网络拓朴图(1) 添加交换机双击交换机图标,添加交换机,修改名称为SwitchA(交换机名称可以自己定义)。
(2) 添加计算机双击计算机图标添加一台PC机,修改名称为PC1,采用相同的方法添加PC2、PC3、PC4。
(3) 添加交换机和计算机之间的连线2、配置主机IP地址和网关地址分别双击PC1 ~ PC4配置主机的IP地址和网关地址。
PC1的IP地址: 192.168.1.1 255.255.255.0 网关: 192.168.1.254PC2的IP地址: 192.168.1.2 255.255.255.0 网关: 192.168.1.254PC3的IP地址: 192.168.1.3 255.255.255.0 网关: 192.168.1.254PC4的IP地址: 192.168.1.4 255.255.255.0 网关: 192.168.1.254例如:配置PC1的IP地址如图3所示。
图3 配置主机A的IP地址和网关地址同理配置其他主机的IP地址和网关地址。
华为学习:华为模拟器的使用
最近我打算开始参加上海腾科的华为培训课程,因为思科课程我已经学习过了,所以再学习华为的话也会简单多了,因为华为和思科的基本原理都是相同的。
不同的就是它们的配置命令了,比如说思科的show在华为里变成了display,思科的no命令在华为里面是用undo来体现的,所以有了思科的基础学习华为完全就是信手拈来的,只要转变一下敲命令的习惯就可以了。
今天我开始先安装华为的模拟器,使用思科的就是packet tracer和GNS3,或者到了CCIE阶段就可以使用iou,而华为的模拟器很单一,就是eNSP。
刚开始安装的时候适合GNS3一样的,需要安装一些附带的软件,不过因为我的电脑里面有GNS3了,所以就不需要安装了,但是安装完之后我发现路由器打开的时候是一直处于###这个状态的,我本来以为是我少安装了一些东西。
然后把它给卸载了,重新安装了一次,但是再次安装的时候还是那个样子,完全不能敲命令,然后我在百度上面查看了一些,发现原来没有让防火墙把eNSP放行通过,允许了之后就发现没有任何的问题了。
做完之后我又把eNSP和CRT关联了一下,ensp的路由器的端口号是从2000开始的,然后通过Telnet登录过去。
最后折腾了好一阵子终于把模拟器安装好了,以后的时间就可以做实验了。
目录第1章 PPP、MP配置命令.....................................................................................................1-11.1 PPP、MP配置命令...........................................................................................................1-11.1.1 display ppp mp........................................................................................................1-11.1.2 ip tcp vjcompress.....................................................................................................1-21.1.3 link-protocol ppp......................................................................................................1-31.1.4 mp binding-mode....................................................................................................1-41.1.5 ppp accounting scheme..........................................................................................1-51.1.6 ppp authentication-mode.........................................................................................1-51.1.7 ppp callback............................................................................................................1-61.1.8 ppp callback ntstring...............................................................................................1-71.1.9 ppp chap password.................................................................................................1-81.1.10 ppp chap user........................................................................................................1-91.1.11 ppp compression iphc...........................................................................................1-91.1.12 ppp compression stac-lzs....................................................................................1-101.1.13 ppp ipcp dns........................................................................................................1-111.1.14 ppp mp................................................................................................................1-121.1.15 ppp mp lfi.............................................................................................................1-121.1.16 ppp mp max-bind................................................................................................1-131.1.17 ppp mp min-fragment..........................................................................................1-141.1.18 ppp mp user........................................................................................................1-151.1.19 ppp mp virtual-template.......................................................................................1-161.1.20 ppp pap local-user...............................................................................................1-161.1.21 timer hold.............................................................................................................1-171.1.22 ppp timer negotiate.............................................................................................1-18第2章 PPPoE配置命令.........................................................................................................2-12.1 PPPoE配置命令................................................................................................................2-12.1.1 display pppoe-server session..................................................................................2-12.1.2 pppoe-server bind virtual-template..........................................................................2-22.1.3 pppoe-server max-sessions local-mac...................................................................2-32.1.4 pppoe-server max-sessions remote-mac................................................................2-42.1.5 pppoe-server max-sessions total............................................................................2-5第3章 PPPoE Client配置命令...............................................................................................3-13.1 PPPoE Client配置命令......................................................................................................3-13.1.1 debugging pppoe-client...........................................................................................3-13.1.2 display pppoe-client session...................................................................................3-23.1.3 pppoe-client.............................................................................................................3-33.1.4 reset pppoe-client....................................................................................................3-5第4章 VLAN配置命令...........................................................................................................4-14.1 VLAN配置命令..................................................................................................................4-14.1.1 display vlan interface...............................................................................................4-14.1.2 display vlan max-packet-process............................................................................4-14.1.3 display vlan statistics interface................................................................................4-24.1.4 display vlan statistics vid.........................................................................................4-34.1.5 max-packet-process................................................................................................4-34.1.6 reset vlan statistics interface...................................................................................4-44.1.7 reset vlan statistics vid............................................................................................4-54.1.8 vlan-type dot1q........................................................................................................4-5第5章 ISDN配置命令............................................................................................................5-15.1 ISDN配置命令...................................................................................................................5-15.1.1 debugging isdn........................................................................................................5-15.1.2 display isdn active-channel.....................................................................................5-25.1.3 display isdn call-info................................................................................................5-35.1.4 display isdn call-record............................................................................................5-45.1.5 display isdn q931-timer...........................................................................................5-55.1.6 isdn bch-local-manage............................................................................................5-75.1.7 isdn bch-select-way.................................................................................................5-75.1.8 isdn caller-number...................................................................................................5-85.1.9 isdn calling...............................................................................................................5-85.1.10 isdn check-called-number.....................................................................................5-95.1.11 isdn pri-slipwnd-size............................................................................................5-105.1.12 isdn send-restart.................................................................................................5-105.1.13 isdn statistics.......................................................................................................5-11第6章 SLIP配置命令.............................................................................................................6-16.1 SLIP配置命令....................................................................................................................6-16.1.1 debugging slip.........................................................................................................6-16.1.2 link-protocol slip.......................................................................................................6-1第7章 HDLC配置命令...........................................................................................................7-17.1 HDLC配置命令..................................................................................................................7-17.1.1 link-protocol hdlc.....................................................................................................7-17.1.2 timer hold.................................................................................................................7-1第8章帧中继配置命令...........................................................................................................8-18.1 帧中继配置命令..................................................................................................................8-18.1.1 apply policy outbound.............................................................................................8-18.1.2 cbs...........................................................................................................................8-28.1.3 cir.............................................................................................................................8-38.1.4 cir allow...................................................................................................................8-48.1.5 congestion-threshold...............................................................................................8-48.1.6 cq.............................................................................................................................8-58.1.7 debugging fr............................................................................................................8-68.1.8 display fr compress.................................................................................................8-88.1.9 display fr dlci-switch................................................................................................8-98.1.10 display fr fragment-info........................................................................................8-108.1.11 display fr inarp-info..............................................................................................8-11 8.1.12 display fr interface...............................................................................................8-12 8.1.13 display fr lmi-info.................................................................................................8-13 8.1.14 display fr map-info...............................................................................................8-14 8.1.15 display fr pvc-info................................................................................................8-15 8.1.16 display fr statistics...............................................................................................8-16 8.1.17 display fr switch-table..........................................................................................8-17 8.1.18 display interface mfr............................................................................................8-18 8.1.19 display mfr...........................................................................................................8-19 8.1.20 display qos policy interface.................................................................................8-21 8.1.21 ebs.......................................................................................................................8-23 8.1.22 fifo queue-length.................................................................................................8-24 8.1.23 fr class.................................................................................................................8-24 8.1.24 fr compression frf9..............................................................................................8-25 8.1.25 fr compression iphc.............................................................................................8-26 8.1.26 fr congestion-threshold........................................................................................8-27 8.1.27 fr de del...............................................................................................................8-28 8.1.28 fr del inbound-interface.......................................................................................8-28 8.1.29 fr del protocol ip...................................................................................................8-29 8.1.30 fr dlci....................................................................................................................8-30 8.1.31 fr dlci-switch.........................................................................................................8-31 8.1.32 fr inarp.................................................................................................................8-32 8.1.33 fr interface-type...................................................................................................8-33 8.1.34 fr iphc...................................................................................................................8-34 8.1.35 fr lmi n391dte.......................................................................................................8-35 8.1.36 fr lmi n392dce......................................................................................................8-36 8.1.37 fr lmi n392dte.......................................................................................................8-37 8.1.38 fr lmi n393dce......................................................................................................8-38 8.1.39 fr lmi n393dte.......................................................................................................8-39 8.1.40 fr lmi t392dce.......................................................................................................8-40 8.1.41 fr lmi type.............................................................................................................8-40 8.1.42 fr map ip..............................................................................................................8-41 8.1.43 fr pvc-pq..............................................................................................................8-42 8.1.44 fr switch...............................................................................................................8-43 8.1.45 fr switching..........................................................................................................8-44 8.1.46 fr traffic-policing...................................................................................................8-45 8.1.47 fr traffic-shaping...................................................................................................8-46 8.1.48 fragment..............................................................................................................8-46 8.1.49 fr-class.................................................................................................................8-47 8.1.50 iterface mfr..........................................................................................................8-48 8.1.51 link-protocol fr......................................................................................................8-49 8.1.52 link-protocol fr mfr...............................................................................................8-50 8.1.53 mfr bundle-name.................................................................................................8-51 8.1.54 mfr fragment........................................................................................................8-51 8.1.55 mfr fragment-size................................................................................................8-52 8.1.56 mfr link-name.......................................................................................................8-538.1.57 mfr retry...............................................................................................................8-538.1.58 mfr timer ack........................................................................................................8-548.1.59 mfr timer hello......................................................................................................8-558.1.60 mfr window-size...................................................................................................8-568.1.61 pq........................................................................................................................8-568.1.62 pvc-pq..................................................................................................................8-578.1.63 rtpq......................................................................................................................8-588.1.64 shutdown.............................................................................................................8-598.1.65 reset fr inarp........................................................................................................8-598.1.66 timer hold.............................................................................................................8-608.1.67 traffic-shaping adaptation....................................................................................8-618.1.68 wfq.......................................................................................................................8-62第9章 ATM配置命令.............................................................................................................9-19.1 ATM配置命令....................................................................................................................9-19.1.1 atm-class.................................................................................................................9-19.1.2 atm class.................................................................................................................9-19.1.3 clock........................................................................................................................9-29.1.4 debugging atm all....................................................................................................9-39.1.5 debugging atm error................................................................................................9-49.1.6 debugging atm event...............................................................................................9-59.1.7 debugging atm packet.............................................................................................9-69.1.8 display atm class.....................................................................................................9-89.1.9 display atm interface...............................................................................................9-89.1.10 display atm map-info...........................................................................................9-109.1.11 display atm pvc-group.........................................................................................9-119.1.12 display atm pvc-info............................................................................................9-129.1.13 encapsulation......................................................................................................9-139.1.14 interface atm........................................................................................................9-149.1.15 ip-precedence......................................................................................................9-159.1.16 map bridge..........................................................................................................9-169.1.17 map ip..................................................................................................................9-179.1.18 map ppp..............................................................................................................9-199.1.19 mtu......................................................................................................................9-199.1.20 oam frequency.....................................................................................................9-209.1.21 pvc.......................................................................................................................9-219.1.22 pvc-group............................................................................................................9-229.1.23 pvc max-number..................................................................................................9-239.1.24 pvp limit...............................................................................................................9-249.1.25 service cbr...........................................................................................................9-259.1.26 service ubr...........................................................................................................9-269.1.27 service vbr-nrt......................................................................................................9-279.1.28 service vbr-rt........................................................................................................9-28第10章 LAPB和X.25配置命令...........................................................................................10-110.1 LAPB和X.25配置命令..................................................................................................10-110.1.1 channel................................................................................................................10-110.1.2 debugging pad.....................................................................................................10-1 10.1.3 debugging x25 xot...............................................................................................10-2 10.1.4 display interface..................................................................................................10-3 10.1.5 display x25 alias-policy.......................................................................................10-6 10.1.6 display x25 hunt-group-info.................................................................................10-7 10.1.7 display x25 map..................................................................................................10-8 10.1.8 display x25 pad...................................................................................................10-9 10.1.9 display x25 switch-table pvc..............................................................................10-10 10.1.10 display x25 switch-table svc............................................................................10-10 10.1.11 display x25 vc..................................................................................................10-11 10.1.12 display x25 xot................................................................................................10-14 10.1.13 lapb max-frame...............................................................................................10-15 10.1.14 lapb modulo.....................................................................................................10-15 10.1.15 lapb retry.........................................................................................................10-16 10.1.16 lapb timer.........................................................................................................10-17 10.1.17 lapb window-size.............................................................................................10-18 10.1.18 link-protocol lapb.............................................................................................10-18 10.1.19 link-protocol x25..............................................................................................10-19 10.1.20 pad..................................................................................................................10-20 10.1.21 reset xot...........................................................................................................10-21 10.1.22 x25 alias-policy................................................................................................10-21 10.1.23 x25 call-facility.................................................................................................10-23 10.1.24 x25 cug-service...............................................................................................10-24 10.1.25 x25 default-protocol.........................................................................................10-25 10.1.26 x25 hunt-group................................................................................................10-26 10.1.27 x25 ignore called-address...............................................................................10-27 10.1.28 x25 ignore calling-address..............................................................................10-28 10.1.29 x25 local-cug...................................................................................................10-29 10.1.30 x25 map...........................................................................................................10-29 10.1.31 x25 modulo......................................................................................................10-32 10.1.32 x25 packet-size...............................................................................................10-33 10.1.33 x25 pvc............................................................................................................10-34 10.1.34 x25 queue-length............................................................................................10-36 10.1.35 x25 receive-threshold......................................................................................10-36 10.1.36 x25 response called-address..........................................................................10-37 10.1.37 x25 response calling-address.........................................................................10-38 10.1.38 x25 reverse-charge-accept.............................................................................10-39 10.1.39 x25 roa-list.......................................................................................................10-40 10.1.40 x25 switch pvc.................................................................................................10-41 10.1.41 x25 switch svc hunt-group...............................................................................10-42 10.1.42 x25 switch svc xot...........................................................................................10-44 10.1.43 x25 switching...................................................................................................10-45 10.1.44 x25 timer hold..................................................................................................10-46 10.1.45 x25 timer idle...................................................................................................10-47 10.1.46 x25 timer tx0....................................................................................................10-47 10.1.47 x25 timer tx1....................................................................................................10-48。
华为模拟器使用操作
之前由于朋友公司需要学习华为路由交换,就推荐朋友在51cto下载了一个模拟器,在他打开后,却不知道如何使用,就在这里把之前给他的文档送给大家,如果有需要的,可以下载使用!
不多说了,请看图:
1.华为模拟器初始状态
2.华为模拟器文件操作栏
3.添加需要的网络设备
同软件内的图标栏中的设置一样
4.显示状态栏
5.作业操作
6.实验案例
实验小试1.添加设备
2.连接设备
只需要双击需要配置额的设备
4.保存文件
大家可以用此来畅游你的华为世界了!。
目录实验一以太网交换机基本配置 (1)实验二以太网端口配置实验 (7)实验三利用TFTP管理交换机配置 (13)实验四虚拟局域网VLAN (16)实验五生成树配置 (25)实验六802.1x和AAA配置 (38)实验七路由器基本配置 (445)实验八PPP配置 (51)实验九FR配置 (56)实验十静态路由协议配置 (64)实验十一RIP协议配置 (68)实验十二OSPF协议配置 (74)实验十三访问控制列表配置 (88)实验十四地址转换配置 (95)实验十五DHCP配置 (101)实验十六升级路由器或交换机的操作系统 (116)实验一以太网交换机基本配置一、交换机常用命令配置模式1 业务描述(1)Quidway系列产品的系统命令采用分级保护方式,命令被划分为参观级、监控级、配置级、管理级4个级别,简介如下:✧参观级:网络诊断工具命令(ping、tracert)、从本设备出发访问外部设备的命令(包括:Telnet客户端、RLogin)等,该级别命令不允许进行配置文件保存的操作。
✧监控级:用于系统维护、业务故障诊断等,包括display、debugging命令,该级别命令不允许进行配置文件保存的操作。
✧配置级:业务配置命令,包括路由、各个网络层次的命令,这些用于向用户提供直接网络服务。
✧管理级:关系到系统基本运行,系统支撑模块的命令,这些命令对业务提供支撑作用,包括文件系统、FTP、TFTP、XModem下载、配置文件切换命令、电源控制命令、备板控制命令、用户管理命令、命令级别设置命令、系统内部参数设置命令等。
(2)命令视图:系统将命令行接口划分为若干个命令视图,系统的所有命令都注册在某个(或某些)命令视图下,只有在相应的视图下才能执行该视图下的命令:各命令视图的功能特性、进入各视图的命令等的细则:◆命令视图功能特性列表2 配置参考命令(1)命令行在线帮助在任一命令视图下,键入“?”获取该命令视图下所有的命令及其简单描述。
实验一口令和主机名设置1.交换机的初始化当交换机没有进行配置时,接入超级终端会提示是否以对话方式进行配置,初始化内容主要有IP地址、网关、主机名和口令等。
配置文件是flash:config.text。
2924交换机进入ROM方式是在上电时按住其mode键,本软件是按Ctrl+Break键,出现:switch> ;按Ctrl+Break键switch:reset ;或用boot命令如果有配置文件进入用户模式,否则提交对话:--- System Configuration Dialog ---At any point you may enter a question mark '?' for help.Use ctrl-c to abort configuration dialog at any prompt.Default settings are in square brackets '[]'.Continue with configuration dialog? [yes/no]:yEnter IP address:10.65.1.8Enter IP netmask:255.255.0.0Would you like to enter a default gateway address? [yes]:IP address of default gateway:Enter host name [Switch]:swaThe enable secret is a one-way cryptographic secret used instead of the enable password when it exists.Enter enable secret:aaaWould you like to configure a Telnet password? [yes]:Enter Telnet password:aWould you like to enable as a cluster command switch? [no]:The following configuration command script was created:......Press RETURN to get started.swa>enpassword:aaaswa#copy run start (保存配置信息)swa#dir flash: (查看闪存中的文件)再次进入对话方式:swa#setup2.路由器的初始化(路由器初始化与交换机类似)router> ;用户模式,按Ctrl+Break rommon>reset ;进入ROM监控状态,复位引导Continue with configuration dialog? [yes/no]:yesAt any point you may enter a question mark '?' for help.Use ctrl-c to abort configuration dialog at any prompt.Default settings are in square brackets '[ ]'.Would you like to enter basic management setup? [yes/no]:yesConfiguring global parameters:Enter host name [router]:ra回车The enable secret is a password used to protect access toprivileged EXEC and configuration modes. This password,after entered,becomes encrypted in the configuration.Enter enable secret:aaa回车The enable password is used when you do not specify anenable secret password,with some older software versions,and some boot images.Enter enable password:aa回车The virtual terminal password is used to protectaccess to the router over a network interface.Enter virtual terminal password :a回车Enter interface name used to connect to the managementnetwork from the above interface summary:FastEthernet0/0回车Configuring interface FastEthernet0/0:回车Use the 100 Base-TX (RJ-45) connector? [yes]:回车Operate in full-duplex mode? [no]:回车Configure IP on this interface? [yes]:回车IP address for this interface [ ]:10.1.1.1回车Subnet mask for this interface [ ]:255.0.0.0回车[0] Go to the IOS command prompt without saving this config.[1] Return back to the setup without saving this config.[2] Save this configuration to nvram and exit.Enter your selection [2]:回车ra>enpassword aaa (进入特权模式)ra#show run (显示配置信息)ra#w (保存配置信息)ra#dir flash: (显示配置文件)(配置文件在2621路由器不能删除,放弁配置文件要用寄存器设置0x2142);3. 用命令行设置交换机和路由器的口令和主机名先对交换机进行操作,双击SwitchA,出现:switch>en ;第一次密码为空switch#conf t ;进入全局配置模式switch(config)#hostname swa ;设置交换机名swa(config)#enable secret aaa ;设置特权加密口令为aaaswa(config)#enable password aax ;设置特权非密口令为aaxswa(config)#line console 0 ;进入控制台口(Rs232)swa(config-line)#password aa ;设置console登录口令为aaswa(config-line)#login ;登录要求口令验证swa(config-line)#line vty 0 4 ;进入虚拟终端virtual ttyswa(config-line)#password a ;设置vty的登录口令为aswa(config-line)#login ;登录要求口令验证swa(config-line)#exit ;返回上一层swa(config)#exit ;返回上一层swa#sh run ;看配置信息swa#exit ;返回命令swa>enpassword: ;请问输入哪个口(aaa)secret是设置加密口令,一般都使用这种口令设置方式,它优先级高,即没设置secret 口令时,非加密口令才有效。
华为模拟器命令计算机命令PCA login: root ;使用root用户password: linux ;口令是linux# shutdown -h now ;关机# init 0 ;关机# logout ;用户注销# login ;用户登录# ifconfig ;显示IP地址# ifconfig eth0 <ip address> netmask <netmask> ;设置IP地址# ifconfig eht0 <ip address> netmask <netmask> down ;禁用IP地址# route add 0.0.0.0 gw <ip> ;设置网关# route del 0.0.0.0 gw <ip> ;删除网关# route add default gw <ip> ;设置网关# route del default gw <ip> ;删除网关# route ;显示网关# ping <ip> ;发ECHO包# telnet <ip> ;远程登录交换机命令[Huawei]dis cur ;显示当前配置[Huawei]display current-configuration ;显示当前配置[Huawei]display interfaces ;显示接口信息[Huawei]display vlan all ;显示路由信息[Huawei]display version ;显示版本信息[Huawei]super password ;修改特权用户密码[Huawei]sysname ;交换机命名[Huawei]interface ethernet 0/1 ;进入接口视图[Huawei]interface vlan x ;进入接口视图[Huawei-Vlan-interfacex]ip address 10.65.1.1 255.255.0.0 ;配置VLAN的IP地址[Huawei]ip route-static 0.0.0.0 0.0.0.0 10.65.1.2 ;静态路由=网关[Huawei]rip ;三层交换支持[Huawei]local-user ftp[Huawei]user-interface vty 0 4 ;进入虚拟终端[S3026-ui-vty0-4]authentication-mode password ;设置口令模式[S3026-ui-vty0-4]set authentication-mode password simple 222 ;设置口令[S3026-ui-vty0-4]user privilege level 3 ;用户级别[Huawei]interface ethernet 0/1 ;进入端口模式[Huawei]int e0/1 ;进入端口模式[Huawei-Ethernet0/1]duplex {half|full|auto} ;配置端口工作状态[Huawei-Ethernet0/1]speed {10|100|auto} ;配置端口工作速率[Huawei-Ethernet0/1]flow-control ;配置端口流控[Huawei-Ethernet0/1]mdi {across|auto|normal} ;配置端口平接扭接[Huawei-Ethernet0/1]port link-type {trunk|access|hybrid} ;设置端口工作模式[Huawei-Ethernet0/1]port access vlan 3 ;当前端口加入到VLAN [Huawei-Ethernet0/2]port trunk permit vlan {ID|All} ;设trunk允许的VLAN [Huawei-Ethernet0/3]port trunk pvid vlan 3 ;设置trunk端口的PVID [Huawei-Ethernet0/1]undo shutdown ;激活端口[Huawei-Ethernet0/1]shutdown ;关闭端口[Huawei-Ethernet0/1]quit ;返回[Huawei]vlan 3 ;创建VLAN [Huawei-vlan3]port ethernet 0/1 ;在VLAN中增加端口[Huawei-vlan3]port e0/1 ;简写方式[Huawei-vlan3]port ethernet 0/1 to ethernet 0/4 ;在VLAN中增加端口[Huawei-vlan3]port e0/1 to e0/4 ;简写方式[Huawei]monitor-port <interface_type interface_num> ;指定镜像端口[Huawei]port mirror <interface_type interface_num> ;指定被镜像端口[Huawei]port mirror int_list observing-port int_type int_num ;指定镜像和被镜像[Huawei]description string ;指定VLAN描述字符[Huawei]description ;删除VLAN描述字符[Huawei]display vlan [vlan_id] ;查看VLAN设置[Huawei]stp {enable|disable} ;设置生成树,默认关闭[Huawei]stp priority 4096 ;设置交换机的优先级[Huawei]stp root {primary|secondary} ;设置为根或根的备份[Huawei-Ethernet0/1]stp cost 200 ;设置交换机端口的花费[Huawei]link-aggregation e0/1 to e0/4 ingress|both ;端口的聚合[Huawei]undo link-aggregation e0/1|all ;始端口为通道号[SwitchA-vlanx]isolate-user-vlan enable ;设置主vlan [SwitchA]isolate-user-vlan <x> secondary <list> ;设置主vlan包括的子vlan [Huawei-Ethernet0/2]port hybrid pvid vlan <id> ;设置vlan的pvid [Huawei-Ethernet0/2]port hybrid pvid ;删除vlan的pvid [Huawei-Ethernet0/2]port hybrid vlan vlan_id_list untagged ;设置无标识的vlan如果包的vlan id与PVId一致,则去掉vlan信息. 默认PVID=1。
华为模拟器eNSP基本命令
华为模拟器eNSP常⽤命令
本⽂转⾃:
路由器命令⾏常⽤命令:
1. system-view
进⼊系统视图,默认我们打开命令⾏前⾯提⽰是尖括号<>,此为⽤户视图,当我们输⼊sys时就可以进⼊系统视图来对路由进⾏操作了
2.interface + 接⼝名
⽤来设置接⼝,例如路由器上有FE接⼝,和GE接⼝,我们可以输⼊ interface g 0/0/0 来选中指定的GE接⼝来进⾏设置
3.ip address IP地址⼦⽹掩码
⽤来添加IP地址,例如,我给vlanif1添加⼀个IP作为⽹关就可以⽤命令ip address 192.168.1.1 24 ,当然设置前我们需要先interface Vlanif 1 进⼊到该端⼝4.undo + 原先配置时的命令
可以取消配置信息
5.rip
进⼊rip配置,rip协议版本分为rip1和rip2,rip1采⽤⼴播,rip2使⽤组播,基于距离⽮量算法的路由协议,利⽤跳数来作为计量标准。
6.ctrl + z 快速退出到⽤户模式
7.quit 退出当前设置
8.save 保存配置信息
9.display ip routing-table 查看路由表
命令+ ? 查看帮助命令。
基本实验1.交换机和路由1-1交换机基础4-2-1交换机的分类根据交换方式划分:·存储转发式交换(Store and Forward)·直通式交换(Cut-through)·碎片过滤式交换(Fragment Free)根据交换的协议层划分:·第二层交换:根据MAC 地址进行交换·第三层交换:根据网络层地址(IP 地址)进行交换·多层交换:根据第四层端口号或应用协议进行交换根据交换机结构划分:·固定端口交换机·模块化交换机根据配置方式划分:·堆叠型交换机·非堆叠型交换机根据管理类型划分:·网管型交换机·非网管型交换机·智能型交换机根据层次型结构划分:·接入层交换机:接入层是工作站连接网络的入口,实现用户的网络访问控制·汇聚层交换机:汇聚层将网络划分为多个广播/组播域,可以实现VLAN 间的路由选择,并通过访问控制列表实现分组过滤,应提供第三层交换功能·核心层交换机:核心层应采用可扩展的高性能交换机组成园区网的主干线路,提供链路冗余、路由冗余、VLAN 中继和负载均衡等功能,与汇聚层交换机具有兼容的技术支持相同的协议4-2-2交换机的性能参数端口类型:·双绞线端口:双绞线端口主要有100Mbps 和1000Mbps 两种·光纤端口:SC 端口( Subscriber Connector ) 是一种光纤端口,可提供千兆位数据传输,,通常用于连接服务器的光纤网卡·GBIC端口:交换机上的GBIC ( Giga Bit-rate Interface Converter , GBIC ) 插槽( Slot )用于安装千兆位端口光电转换器·SFP端口:小型机架可插拔设备( Sm all Form-factor Pluggable, SFP ) 是GBIC的升级版本传输模式:·半双工(half-duplex)·全双工(full -duplex)·全双工/半双工自适应包转发率:包转发率也称端口吞吐率,指交换机进行数据包转发的能力,单位为pps(package per second)包转发速率是以单位时间内发送64 字节数据包的个数作为计算基准的,对千千兆以太网来说,计算方法如下:1000Mbps÷8b÷(64+8+12)B=1488095pps当以太网帧为64 字节时,需考虑8 字节的帧头和12 字节的帧间隙开销,据此,一台千兆交换机的包转发速率的计算方法如下:(1488)包转发率=千兆端口数x 1.488Mpps+百兆端口数x 0.1488Mpps+其余端口数x相应包转发数背板带宽:交换机的背板带宽是指交换机端口处理器和数据总线之间单位时间内所能传输的最大数据量,背板带宽标志了一台交换机总的交换能力,单位Gbps。
华为模拟器命令计算机命令PCA login: rootpassword: linux# shutdown -h now# init 0# logout# login# ifconfig# ifconfig eth0 <ip address> netmask <netmask># ifconfig eht0 <ip address> netmask <netmask> down # route add 0.0.0.0 gw <ip># route del 0.0.0.0 gw <ip># route add default gw <ip># route del default gw <ip># route# ping <ip># telnet <ip>;使用 root 用户;口令是linux;关机;关机;用户注销;用户登录;显示 IP 地址;设置 IP 地址;禁用 IP 地址;设置网关;删除网关;设置网关;删除网关;显示网关;发 ECHO 包;远程登录交换机命令[Huawei]dis cur[Huawei]display current-configuration [Huawei]display interfaces [Huawei]display vlan all [Huawei]display version ;显示当前配置;显示当前配置;显示接口信息;显示路由信息;显示版本信息[Huawei]super password[Huawei]sysname[Huawei]interface ethernet 0/1[Huawei]interface vlan x[Huawei-Vlan-interfacex]ip address 10.65.1.1 255.255.0.0;修改特权用户密码;交换机命名;进入接口视图;进入接口视图;配置 VLAN的IP地址[Huawei]ip route-static 0.0.0.0 0.0.0.0 10.65.1.2 [Huawei]rip[Huawei]local-user ftp ;静态路由=网关;三层交换支持[Huawei]user-interface vty 0 4[S3026-ui-vty0-4]authentication-mode password[S3026-ui-vty0-4]set authentication-mode password simple 222;进入虚拟终端;设置口令模式;设置口令[S3026-ui-vty0-4]user privilege level 3[Huawei]interface ethernet 0/1[Huawei]int e0/1[Huawei-Ethernet0/1]duplex {half|full|auto}[Huawei-Ethernet0/1]speed {10|100|auto}[Huawei-Ethernet0/1]flow-control[Huawei-Ethernet0/1]mdi {across|auto|normal} [Huawei-Ethernet0/1]port link-type {trunk|access|hybrid} [Huawei-Ethernet0/1]port access vlan 3 [Huawei-Ethernet0/2]port trunk permit vlan {ID|All} [Huawei-Ethernet0/3]port trunk pvid vlan 3 [Huawei-Ethernet0/1]undo shutdown [Huawei-Ethernet0/1]shutdown [Huawei-Ethernet0/1]quit[Huawei]vlan 3[Huawei-vlan3]port ethernet 0/1[Huawei-vlan3]port e0/1 [Huawei-vlan3]portethernet 0/1 to ethernet 0/4 [Huawei-vlan3]port e0/1 to e0/4[Huawei]monitor-port <interface_type interface_num> [Huawei]port mirror <interface_type interface_num> [Huawei]port mirror int_list observing-port int_type int_num[Huawei]description string[Huawei]description[Huawei]display vlan [vlan_id][Huawei]stp {enable|disable}[Huawei]stp priority 4096[Huawei]stp root {primary|secondary}[Huawei-Ethernet0/1]stp cost 200[Huawei]link-aggregation e0/1 to e0/4 ingress|both [Huawei]undo link-aggregation e0/1|all[SwitchA-vlanx]isolate-user-vlan enable [SwitchA]isolate-user-vlan <x> secondary <list> [Huawei-Ethernet0/2]port hybrid pvid vlan <id> [Huawei-Ethernet0/2]port hybrid pvid [Huawei-Ethernet0/2]port hybrid vlan vlan_id_list untagged;用户级别;进入端口模式;进入端口模式;配置端口工作状态;配置端口工作速率;配置端口流控;配置端口平接扭接;设置端口工作模式;当前端口加入到VLAN;设 trunk 允许的 VLAN;设置 trunk 端口的 PVID;激活端口;关闭端口;返回;创建 VLAN;在 VLAN中增加端口;简写方式;在 VLAN中增加端口;简写方式;指定镜像端口;指定被镜像端口;指定镜像和被镜像;指定 VLAN 描述字符;删除 VLAN描述字符;查看 VLAN设置;设置生成树,默认关闭;设置交换机的优先级;设置为根或根的备份;设置交换机端口的花费;端口的聚合;始端口为通道号;设置主vlan;设置主 vlan 包括的子 vlan ;设置 vlan 的 pvid;删除 vlan 的 pvid;设置无标识的vlan如果包的所以设置vlan id 与 PVId 一致,则去掉vlan 信息 . 默认PVID 为所属 vlan id,设置可以互通的vlan 为PVID=1 。
华为模拟器命令计算机命令PCA login: root ;使用root用户password: linux ;口令是linux# shutdown -h now ;关机# init 0 ;关机# logout ;用户注销# login ;用户登录# ifconfig ;显示IP地址# ifconfig eth0 <ip address> netmask <netmask> ;设置IP地址# ifconfig eht0 <ip address> netmask <netmask> down ;禁用IP地址# route add 0.0.0.0 gw <ip> ;设置网关# route del 0.0.0.0 gw <ip> ;删除网关# route add default gw <ip> ;设置网关# route del default gw <ip> ;删除网关# route ;显示网关# ping <ip> ;发ECHO包# telnet <ip> ;远程登录交换机命令[Huawei]dis cur ;显示当前配置[Huawei]display current-configuration ;显示当前配置[Huawei]display interfaces ;显示接口信息[Huawei]display vlan all ;显示路由信息[Huawei]display version ;显示版本信息[Huawei]super password ;修改特权用户密码[Huawei]sysname ;交换机命名[Huawei]interface ethernet 0/1 ;进入接口视图[Huawei]interface vlan x ;进入接口视图[Huawei-Vlan-interfacex]ip address 10.65.1.1 255.255.0.0 ;配置VLAN的IP地址[Huawei]ip route-static 0.0.0.0 0.0.0.0 10.65.1.2 ;静态路由=网关[Huawei]rip ;三层交换支持[Huawei]local-user ftp[Huawei]user-interface vty 0 4 ;进入虚拟终端[S3026-ui-vty0-4]authentication-mode password ;设置口令模式[S3026-ui-vty0-4]set authentication-mode password simple 222 ;设置口令[S3026-ui-vty0-4]user privilege level 3 ;用户级别[Huawei]interface ethernet 0/1 ;进入端口模式[Huawei]int e0/1 ;进入端口模式[Huawei-Ethernet0/1]duplex {half|full|auto} ;配置端口工作状态[Huawei-Ethernet0/1]speed {10|100|auto} ;配置端口工作速率[Huawei-Ethernet0/1]flow-control ;配置端口流控[Huawei-Ethernet0/1]mdi {across|auto|normal} ;配置端口平接扭接[Huawei-Ethernet0/1]port link-type {trunk|access|hybrid} ;设置端口工作模式[Huawei-Ethernet0/1]port access vlan 3 ;当前端口加入到VLAN [Huawei-Ethernet0/2]port trunk permit vlan {ID|All} ;设trunk允许的VLAN [Huawei-Ethernet0/3]port trunk pvid vlan 3 ;设置trunk端口的PVID [Huawei-Ethernet0/1]undo shutdown ;激活端口[Huawei-Ethernet0/1]shutdown ;关闭端口[Huawei-Ethernet0/1]quit ;返回[Huawei]vlan 3 ;创建VLAN [Huawei-vlan3]port ethernet 0/1 ;在VLAN中增加端口[Huawei-vlan3]port e0/1 ;简写方式[Huawei-vlan3]port ethernet 0/1 to ethernet 0/4 ;在VLAN中增加端口[Huawei-vlan3]port e0/1 to e0/4 ;简写方式[Huawei]monitor-port <interface_type interface_num> ;指定镜像端口[Huawei]port mirror <interface_type interface_num> ;指定被镜像端口[Huawei]port mirror int_list observing-port int_type int_num ;指定镜像和被镜像[Huawei]description string ;指定VLAN描述字符[Huawei]description ;删除VLAN描述字符[Huawei]display vlan [vlan_id] ;查看VLAN设置[Huawei]stp {enable|disable} ;设置生成树,默认关闭[Huawei]stp priority 4096 ;设置交换机的优先级[Huawei]stp root {primary|secondary} ;设置为根或根的备份[Huawei-Ethernet0/1]stp cost 200 ;设置交换机端口的花费[Huawei]link-aggregation e0/1 to e0/4 ingress|both ;端口的聚合[Huawei]undo link-aggregation e0/1|all ;始端口为通道号[SwitchA-vlanx]isolate-user-vlan enable ;设置主vlan [SwitchA]isolate-user-vlan <x> secondary <list> ;设置主vlan包括的子vlan [Huawei-Ethernet0/2]port hybrid pvid vlan <id> ;设置vlan的pvid [Huawei-Ethernet0/2]port hybrid pvid ;删除vlan的pvid [Huawei-Ethernet0/2]port hybrid vlan vlan_id_list untagged ;设置无标识的vlan如果包的vlan id与PVId一致,则去掉vlan信息. 默认PVID=1。
华为模拟器 3.0绿色特别版-实验命令参考计算机命令~~~~~~~~~~PCA login root ;使用root用户password linux ;口令是linux# shutdown -h now ;关机# init 0 ;关机# logout ;用户注销# login ;用户登录# ifconfig ;显示IP地址# ifconfig eth0 ip address netmask netmask ;设置IP地址# ifconfig eht0 ip address netmask netmask down ;禁用IP地址# route add 0.0.0.0 gw ip ;设置网关# route del 0.0.0.0 gw ip ;删除网关# route add default gw ip ;设置网关# route del default gw ip ;删除网关# route ;显示网关# ping ip ;发ECHO包# telnet ip ;远程登录----------------------------------------交换机命令~~~~~~~~~~[Quidway]dis cur ;显示当前配置[Quidway]display current-configuration ;显示当前配置[Quidway]display interfaces ;显示接口信息[Quidway]display vlan all ;显示路由信息[Quidway]display version ;显示版本信息[Quidway]ip route-static 0.0.0.0 0.0.0.0 10.65.1.2 ;静态路由=网关/设置缺省路由的下一跳为10.65.1.2 [Quidway]rip ;三层交换支持[Quidway]local-user ftp ;指定FTP用户[Quidway]user-interface vty 0 4 ;进入虚拟终端[S3026-ui-vty0-4]authentication-mode password ;设置口令模式[S3026-ui-vty0-4]set authentication-mode password simple 222 ;设置口令[S3026-ui-vty0-4]user privilege level 3 ;用户级别[Quidway]interface ethernet 01 ;进入端口模式[Quidway]int e01 ;进入端口模式[Quidway-Ethernet01]duplex {halffullauto} ;配置端口工作状态[Quidway-Ethernet01]speed {10100auto} ;配置端口工作速率[Quidway-Ethernet01]flow-control ;配置端口流控[Quidway-Ethernet01]mdi {acrossautonormal} ;配置端口平接扭接[Quidway-Ethernet01]port link-type {trunkaccesshybrid} ;设置端口工作模式[Quidway-Ethernet01]port access vlan 3 ;当前端口加入到VLAN [Quidway-Ethernet02]port trunk permit vlan {IDAll} ;设trunk允许的VLAN [Quidway-Ethernet03]port trunk pvid vlan 3 ;设置trunk端口的PVID [Quidway-Ethernet01]undo shutdown ;激活端口[Quidway-Ethernet01]shutdown ;关闭端口[Quidway-Ethernet01]quit ;返回[Quidway]vlan 3 ;创建VLAN [Quidway-vlan3]port ethernet 01 ;在VLAN中增加端口[Quidway-vlan3]port e01 ;简写方式[Quidway-vlan3]port ethernet 01 to ethernet 04 ;在VLAN中增加端口[Quidway-vlan3]port e01 to e04 ;简写方式[Quidway]monitor-port interface_type interface_num ;指定镜像端口[Quidway]port mirror interface_type interface_num ;指定被镜像端口[Quidway]port mirror int_list observing-port int_type int_num ;指定镜像和被镜像[Quidway]description string ;指定VLAN描述字符[Quidway]description ;删除VLAN描述字符[Quidway]display vlan [vlan_id] ;查看VLAN设置[Quidway]stp {enabledisable} ;设置生成树,默认关闭[Quidway]stp priority 4096 ;设置交换机的优先级[Quidway]stp root {primarysecondary} ;设置为根或根的备份[Quidway-Ethernet01]stp cost 200 ;设置交换机端口的花费[Quidway]link-aggregation e01 to e04 ingressboth ;端口的聚合[Quidway]undo link-aggregation e01all ;始端口为通道号[SwitchA-vlanx]isolate-user-vlan enable ;设置主vlan [SwitchA]isolate-user-vlan x secondary list ;设置主vlan包括的子vlan [Quidway-Ethernet02]port hybrid pvid vlan id ;设置vlan的pvid [Quidway-Ethernet02]port hybrid pvid ;删除vlan的pvid [Quidway-Ethernet02]port hybrid vlan vlan_id_list untagged ;设置无标识的vlan如果包的vlan id与PVId一致,则去掉vlan信息. 默认PVID=1。
所以设置PVID为所属vlan id, 设置可以互通的vlan为untagged.----------------------------------------路由器命令~~~~~~~~~~[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 maskmask_len ;配置端口IP地址[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 222[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 ipmask{interface numbernexthop}[value][rejectblackhole]例如:[Quidway]ip route-static 129.1.0.0 16 10.0.0.2[Quidway]ip route-static 129.1.0.0 255.255.0.0 10.0.0.2[Quidway]ip route-static 129.1.0.0 16 Serial 2[Quidway]ip route-static 0.0.0.0 0.0.0.0 10.0.0.2 ;静态路由=网关/设置缺省路由的下一跳为10.65.1.2动态路由:[Quidway]rip ;设置动态路由[Quidway]rip work ;设置工作允许[Quidway]rip input ;设置入口允许[Quidway]rip output ;设置出口允许[Quidway-rip]network 1.0.0.0 ;设置交换路由网络[Quidway-rip]network all ;设置与所有网络交换[Quidway-rip]peer ip-address[Quidway-rip]summary ;路由聚合[Quidway]rip version 1 ;设置工作在版本1 [Quidway]rip version 2 multicast ;设版本2,多播方式[Quidway-Ethernet0]rip split-horizon ;水平分隔[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 configauto] ;默认前者顺序匹配。
rule [normalspecial]{permitdeny} [source source-addr source-wildcardany]例:[Quidway]acl 10[Quidway-acl-10]rule normal permit source 10.0.0.0 0.0.0.255[Quidway-acl-10]rule normal deny source any扩展访问控制列表配置命令配置TCPUDP协议的扩展访问列表:rule {normalspecial}{permitdeny}{tcpudp}source {ip wildany}destination ip wildany}[operate]配置ICMP协议的扩展访问列表:rule {normalspecial}{permitdeny}icmp source {ip wildany]destination {ip wildany][icmp-code] [logging]扩展访问控制列表操作符的含义equal portnumber ;等于greater-than portnumber ;大于less-than portnumber ;小于not-equal portnumber ;不等range portnumber1 portnumber2 ;区间扩展访问控制列表举例[Quidway]acl 101[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 102[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 permitdeny[Quidway]int e0[Quidway-Ethernet0]firewall packet-filter 101 inboundoutbound地址转换配置举例[Quidway]firewall enable[Quidway]firewall default permit[Quidway]acl 101 ;内部指定主机可以进入e0 [Quidway-acl-101]rule deny ip source any 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-101]rule permit ip source 129.38.1.4 0 destination any[Quidway-acl-101]quit[Quidway]int e0[Quidway-Ethernet0]firewall packet-filter 101 inbound[Quidway]acl 102 ;外部特定主机和大于1024端口的数据包允许进入S0[Quidway-acl-102]rule deny ip source any destination any[Quidway-acl-102]rule permit tcp source 202.39.2.3 0 destination 202.38.160.1 0[Quidway-acl-102]rule permit tcp source any destination 202.38.160.1 0 destination-port great-than 1024 [Quidway-acl-102]quit[Quidway]int s0[Quidway-Serial0]firewall packet-filter 102 inbound ;设202.38.160.1是路由器出口IP。