华为配置解释

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

华为配置解释实验一计算机和交换机基本设置•添加一个交换机,一个计算机,双击交换机,进入终端配置:•Quidwaysystem•password:•[Quidway]sysnameS3026;交换机命名•[S3026]superpassword111;设置特权密码•[S3026]user-interfacevty04;设置TELNET用户有5个,从0到4•[S3026-ui-vty0-4]authentication-modepassword;认证模式为密码•[S3026-ui-vty0-4]setauthentication-modepasswordsimple222;设置密码为明文222•[S3026-ui-vty0-4]userprivilegelevel3;用户权限为3•[S3026-ui-vty0-4]quit;退出•[S3026]quit;退出•S3026sys;进入系统视图•password:111;设置系统密码为111•[S3026]displaycurrect-config;显示当前配置•[S3026]discurr;显示当前配置•[S3026]vlan2;创建VLAN2•[S3026-vlan2]portethernet0/2;把端口2放入VLAN2•[S3026-vlan2]porte0/4toet0/6;把端口4,5,6放入VLAN2•[S3026-vlan2]quit;退出•[S3026]disvlan;显示当前VLAN•[S3026]inte0/3;进入端口3视图•[S3026-Ethernet1]portaccessvlan2;把端口1放入VLAN2•[S3026-Ethernet1]quit;退出•[S3026]disvlan;显示VLAN现状•[S3026]discurr;显示当前配置•[S3026]interfacevlan1;进入VLAN1接口视图•[S3026-Vlan-interface1]ipaddress10.65.1.8255.255.0.0;配置IP地址•[S3026-Vlan-interface1]quit•[S3026]iproute-static0.0.0.00.0.0.010.65.1.2;配置静态路由•[S3026]ipdefault-gateway10.65.1.2;配置默认网关•[S3026]discurr•[S3026]save;保持配置信息到FLASH•双击小电脑:•login:root;登陆系统•password:linux;密码为LINUX•[root@PCAroot]#ifconfigeth010.65.1.1netmask255.255.0.0;设置IP地址和掩码•[root@PCAroot]#ifconfig;显示IP地址•[root@PCAroot]#routeadddefaultgw10.65.1.2;设置默认网关•[root@PCAroot]#route;显示默认网关•[root@PCAroot]#ping10.65.1.8;测试本机与10.65.1.8主机间的连通性•[root@PCAroot]#telnet10.65.1.8;远程登陆10.65.1.8主机对交换机进行配置实验二配置端口聚合•要求聚合的端口工作在全双工,速度一致,在同一槽口且连续。•参数:ingress:源MAC,both:源和目的MAC•对于SwitchA:•[Quidway]sysnameSwitchA;设置交换机名•[SwitchA]interfaceethernet0/1;进入接口1视图•[SwitchA-Ethernet0/1]duplexfull;设置接口通信方式为全双工•[SwitchA-Ethernet0/1]speed100;设置接口速率为100M•[SwitchA-Ethernet0/1]portlink-typetrunk;设置端口链路类型为TRUNK•[SwitchA-Ethernet0/1]porttrunkpermitvlanall;允许所有VLAN中的端口数据都能从本端口通过•[SwitchA-Ethernet0/1]inte0/2•[SwitchA-Ethernet0/2]duplexfull•[SwitchA-Ethernet0/2]speed100•[SwitchA-Ethernet0/2]portlink-typetrunk•[SwitchA-Ethernet0/2]porttrunkpermitvlanall•对于SwitchB:同样的配置•[SwitchA]link-aggregationethernet0/1toethernet0/2both;把端口1和端口2进行捆绑•[SwitchB]link-aggregationethernet0/1toethernet0/2both•[SwitchA]displaylink-aggregationethernet0/1;显示端口1捆绑情况•[SwitchA]undolink-aggregationall;去除所有捆绑配置实验三基本VLAN设置•[SwitchA]vlan2;创建VLAN2•[SwitchA-vlan2]porte0/2;VLAN2中放入端口2•[SwitchA-vlan2]porte0/3toe0/4;VLAN2中放入端口3,4•[SwitchA-vlan2]vlan3;•[SwitchA-vlan3]porte0/5toe0/6•[SwitchA]disvlanall;显示全部VLAN信息•[SwitchA]discurrent显示当前配置信息•交换机B同样配置•设置计算机的IP为:•PCA:10.65.1.1PCB:10.66.1.1PCC:10.65.1.3PCD:10.66.1.3•[root@PCAroot]#ping10.65.1.1通(本机IP)•[root@PCAroot]#ping10.65.1.3不通(中间连接线是vlan1)•[root@PCAroot]#ping10.66.1.1不通(不同网络,不同vlan)•[root@PCAroot]#ping10.66.1.3不通(不同网络,不同vlan)•[root@PCBroot]#ping10.66.1.3不通(中间连接线是vlan1)•将PCA改接到SwitchAE0/2(vlan1)•[root@PCAroot]#ping10.65.1.3不通(同网络,不同vlan)•将PCC改接到SwitchBE0/2(vlan1)•[root@PCAroot]#ping10.65.1.3通(同网络,同在vlan1)•再改回来,并设置trunk:•[S3026A]interfaceethernet0/8;进入端口8视图•[S3026A-Ethernet0/8]portlink-typetrunk;设置端口8链路类型为TRUNK•[S3026A-Ethernet0/8]porttrunkpermitvlanall;端口8允许所有VLAN数据通过•[S3026B]interfaceethernet0/1•[S3026B-Ethernet0/1]portlink-typetrunk•[S3026B-Ethernet0/1]porttrunkpermitvlanall•[S3026B-Ethernet0/1]quit•[S3026B]discurr•[root@PCAroot]#ping10.65.1.3通•[root@PCAroot]#ping10.66.1.3不通•[root@PCBroot]#ping10.66.1.3通•即:PCA和PCC同在vlan2是通的,PCB和PCD同在vlan3是通的。•PCA和PCB是不通的。同理PCC和PCD也是不通的。•再加入一个交换机switchC,将它串入switchA和switchB之间,连接方式:•switchA:E0/8--switchC:E0/3;switchC:E0/6--switchB:E0/1•(1)新加入的SwitchC默认状态时,测试连通性。•从PCA-PCC,从PCB-PCD测试:•[root@PCAroot]#ping10.65.1.3(不通)•[root@PCBroot]#ping10.66.1.3(不通)•由于新加入的交换机没有设置trunk,端口默认vlan1,交换机的trunk•要成对出现,因为当dot1q不能和另一端交换信息时,会自动down掉。•(2)将交换机之间的连线都设置成trunk时,再测试连通性。•[S3026C]interfaceethernet0/3•[S3026C-Ethernet0/1]portlink-typetrunk•[S3026C-Ethernet0/1]porttrunkpermitvlanall•[S3026C]interfaceethernet0/6•[S3026C-Ethernet0/8]portlink-typetrunk•[S3026C-Ethernet0/8]porttrunkpermitvlanall•现在有两条正确的trunk,再看一下联通情况:•[root@PCAroot]#ping10.65.1.3(通)•[root@PCBroot]#ping10.66.1.3(通)实验四配置primaryVLAN和secondaryVLAN•主附vlan一般用于一个网络段的情况,主vlan和子vlan间可以访问,•而子vlan之间是不能访问的。•[SwitchA]vlan2•[SwitchA-vlan2]portethernet0/5toethernet0/6•[SwitchA]vlan3•[SwitchA-vlan3]portethernet0/7toethernet0/8•[SwitchA]vlan5•[SwitchA-vlan5]portethernet0/1toethernet0/4•[SwitchA-vlan5]isolate-user-vlanenable;vlan5是主vlan•[SwitchA-vlan5]quit•[SwitchA]isolate-user-vlan5secondary2,3;vlan2,3是子vlan•[SwitchB]vlan2•[SwitchB-vlan2]portethernet0/5toethernet0/6•[SwitchB]vlan3•[SwitchB-vlan3]portethernet0/7toethernet0/8•[SwitchA]vlan4•[SwitchB-vlan4]portethernet0/1toethernet0/4•[SwitchB-vlan4]isolate-user-vlanenable;vlan4是主vlan•[SwitchB-vlan4]quit•[SwitchB]isolate-user-vlan4secondary2,3;vlan2,3是子vlan实验五交换机的镜像与生成树•(一)设置镜像•镜像是一个端口的数据被映射到另一个端口,进行数据分析。•[Quidway]monitor-porte0/8;被镜像端口•[Quidway]portmirrore0/1;镜像端口•或:•[Quidway]portmirrore0/1toe0/2observing-porte0/8端口1,2镜像端口8•(二)生成树•[Quidway]stp{enable|disable}•[Quidway]stppriority4096设置交换机的优先级•[Quidway]stprootprimary设置交换机为树根•[Quidway-Ethernet0/1]stpcost200设置交换机端口的花费实验七直联路由•Quidwqysystem;进入系统视图•password:;输入系统密码•[Quidway]interfaceethernet0;进入端口0•[Quidway-Ethernet0]ipaddr10.65.1.2255.25

1 / 30
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功