华为交换机与路由配置Word文档下载推荐.docx

上传人:b****6 文档编号:19688814 上传时间:2023-01-08 格式:DOCX 页数:19 大小:711.43KB
下载 相关 举报
华为交换机与路由配置Word文档下载推荐.docx_第1页
第1页 / 共19页
华为交换机与路由配置Word文档下载推荐.docx_第2页
第2页 / 共19页
华为交换机与路由配置Word文档下载推荐.docx_第3页
第3页 / 共19页
华为交换机与路由配置Word文档下载推荐.docx_第4页
第4页 / 共19页
华为交换机与路由配置Word文档下载推荐.docx_第5页
第5页 / 共19页
点击查看更多>>
下载资源
资源描述

华为交换机与路由配置Word文档下载推荐.docx

《华为交换机与路由配置Word文档下载推荐.docx》由会员分享,可在线阅读,更多相关《华为交换机与路由配置Word文档下载推荐.docx(19页珍藏版)》请在冰豆网上搜索。

华为交换机与路由配置Word文档下载推荐.docx

[S3026-Vlan-interface1]quit

[S3026]iproute-static0.0.0.00.0.0.010.65.1.2

[S3026]ipdefault-gateway10.65.1.2

[S3026]save

双击小电脑:

login:

root

linux

[root@PCAroot]#ifconfigeth010.65.1.1netmask255.255.0.0

[root@PCAroot]#ifconfig

[root@PCAroot]#routeadddefaultgw10.65.1.2

[root@PCAroot]#route

[root@PCAroot]#ping10.65.1.8

[root@PCAroot]#telnet10.65.1.8

 

实验二配置端口聚合

要求聚合的端口工作在全双工,速度一致,在同一槽口且连续。

参数:

ingress:

源MAC,both:

源和目的MAC

对于SwitchA:

[Quidway]sysnameSwitchA

[SwitchA]interfaceethernet0/1

[SwitchA-Ethernet0/1]duplexfull

[SwitchA-Ethernet0/1]speed100

[SwitchA-Ethernet0/1]portlink-typetrunk

[SwitchA-Ethernet0/1]porttrunkpermitvlanall

[SwitchA-Ethernet0/1]inte0/2

[SwitchA-Ethernet0/2]duplexfull

[SwitchA-Ethernet0/2]speed100

[SwitchA-Ethernet0/2]portlink-typetrunk

[SwitchA-Ethernet0/2]porttrunkpermitvlanall

对于SwitchB:

[Quidway]sysnameSwitchB

[SwitchB]interfaceethernet0/1

[SwitchB-Ethernet0/1]duplexfull

[SwitchB-Ethernet0/1]speed100

[SwitchB-Ethernet0/1]portlink-typetrunk

[SwitchB-Ethernet0/1]porttrunkpermitvlanall

[SwitchB-Ethernet0/1]inte0/2

[SwitchB-Ethernet0/2]duplexfull

[SwitchB-Ethernet0/2]speed100

[SwitchB-Ethernet0/2]portlink-typetrunk

[SwitchB-Ethernet0/2]porttrunkpermitvlanall

聚合操作:

[SwitchA]link-aggregationethernet0/1toethernet0/2both

[SwitchB]link-aggregationethernet0/1toethernet0/2both

[SwitchA]displaylink-aggregationethernet0/1

[SwitchA]undolink-aggregationall

实验三基本VLAN设置

[SwitchA]vlan2

[SwitchA-vlan2]porte0/2

[SwitchA-vlan2]porte0/3toe0/4

[SwitchA-vlan2]vlan3

[SwitchA-vlan3]porte0/5toe0/6

[SwitchA]disvlanall

[SwitchA]discurrent

[SwitchB]vlan2

[SwitchB-vlan2]porte0/3toe0/4

[SwitchB-vlan2]vlan3

[SwitchB-vlan3]porte0/5toe0/6

[SwitchB-vlan3]quit

[SwitchB]disvlanall

[SwitchB]discurrent

设置计算机的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

[S3026A-Ethernet0/8]portlink-typetrunk

[S3026A-Ethernet0/8]porttrunkpermitvlanall

[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(通)

(3)设置vtp

VTP是vlan传输协议,在VTPServer上配置的vlan在条件允许条件下,可以从VTPClient端看到VTPServer上的vlan,并将自己端口加入到vlan中。

[S3026C]vtpdomainabc

[S3026C]vtpmodeserver

[S3026C]vtppasswordok

[S3026B]vtpdomainabc

[S3026B]vtpmodeclient

[S3026B]vtppasswordok

[S3026A]#dispvlan

[S3026B]#dispvlan

[S3026C]#dispvlan

当口令和域名一致时,client端可以学习到server端的vlan,在VTPServer端还可以有很多策略,这里只是说明最基本的问题。

VTP在企业、机关、学校的应用是很多的,在主交换机上设置好vlan以后,下级的

交换机不用再设置vlan,可以将client的某些端口添加到VTPServer中定义的vlan中去,加强了管理。

实验四配置primaryVlan和secondaryVlan

主附vlan一般用于一个网络段的情况,主vlan和子vlan间可以访问,

而子vlan之间是不能访问的。

[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]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;

实验五交换机的镜像与生成树

(一)设置镜像

镜像是一个端口的数据被映射到另一个端口,进行数据分析。

[Quidway]monitor-porte0/8

[Quidway]portmirrore0/1

或:

[Quidway]portmirrore0/1toe0/2observing-porte0/8

(二)生成树

[Quidway]stp{enable|disable}

[Quidway]stppriority4096设置交换机的优先级

[Quidway]stprootprimary设置交换机为树根

[Quidway-Ethernet0/1]stpcost200设置交换机端口的花费

实验六路由器BootROM升级

[Quidway]reload

PressCtrl+BtoenterBootMenu…

BootMenu:

1:

Downloadapplicationprogram

2:

DownloadBootromprogram

3:

ModifyBootrompassword

4:

Exitmenu

5:

Reboot

Enteryourchoice(1-5):

1

Downloadingapplicationprogram

fromserial...(rs232)

pleasechooseyourdownloadspeed:

9600bps

19200bps

38400bps

Exitandreboot

Enteryourchoice(1-4):

2

Downloadspeedis38400bps.

Pleasechangetheterminal'

sspeedto38400bps.

AndselectXMODEM

protocol.PressENTERkeywhenready.

Downloading...CC(pleaseselect[File]->

[Send])

###########ok!

Downloadcompleted.

Writeflashauccessfully!

[Quidway]

实验七直联路由

Quidwqy>

[Quidway]interfaceethernet0

[Quidway-Ethernet0]ipaddr10.65.1.2255.255.255.0

[Quidway-Ethernet0]undoshutdown

[Quidway-Ethernet0]inte1

[Quidway-Ethernet1]ipaddr10.66.1.2255.255.255.0

[Quidway-Ethernet1]undoshutdown

[root@PCBroot]#ifconfigeth010.66.1.1netmask255.255.0.0

[root@PCAroot]#ping10.65.1.2(通,没有关只能ping直连的口)

[root@PCAroot]#ping10.66.1.2(不通,PCA没有设置网关)

[root@PCAroot]#ping10.66.1.2(通)

[root@PCAroot]#ping10.66.1.1(不通,因PCB没有网关)

[root@PCBroot]#routeadddefaultgw10.66.1.2

[root@PCAroot]#ping10.66.1.1(通)

去掉计算机HostB与Router的连线,再ping:

[root@PCAroot]#ping10.66.1.2不通(没有接线端口会自动down掉)

再连接HostB与Router的连线,再ping:

实验八单臂路由

设置PCAip:

10.65.1.1gateway:

10.65.1.2

设置PCBip:

10.66.1.1gateway:

10.66.1.2

1.一个接口两个IP的情况

[Quidway-Ethernet1]ipaddr10.66.1.2255.255.255.0secondary

[root@PCAroot]#ping10.66.1.1通

2.划分两个子接口,对两个vlan的路由

[SwitchA-vlan2]porte0/3

[SwitchA-vlan3]porte0/6

[SwitchA]inee0/1

[SwitchA-Ethernet0/1]porttrunkencapdot1q

[SwitchA]discurr

[Quidway]inte0

[SwitchA-Ethernet0]inte0.1

[SwitchA-Ethernet0.1]encapsulationdot1q2

[SwitchA-Ethernet0.1]ipaddr10.65.1.2255.255.255.0

[SwitchA-Ethernet0.1]nudoshut

[SwitchA-Ethernet0.1]inte0.2

[SwitchA-Ethernet0.2]encapsulationdot1q2

[SwitchA-Ethernet0.2]ipaddr10.66.1.2255.255.255.0

[SwitchA-Ethernet0.2]nudoshut

实验九静态路由实验

10.70.1.1PCD:

10.71.1.1

[RouterA]interfaceethernet0

[RouterA-Ethernet0]ipaddrress10.65.1.2255.255.0.0

[RouterA-Ethernet0]undoshutdown

[RouterA-Ethernet0]inte1

[RouterA-Ethernet1]ipaddrress10.66.1.2255.255.0.0

[RouterA-Ethernet1]undoshutdown

[RouterA-Ethernet1]ints1

[RouterA-Serial1]ipaddrress10.68.1.2255.255.0.0

[RouterA-Serial1]undoshutdown

[RouterA-Serial1]clockrate64000

[RouterA-Serial1]quit

[RouterA]iprouting

[RouterA]discurr

[RouterB]interfaceethernet0

[RouterB-Ethernet0]ipaddrress10.70.1.2255.255.0.0

[RouterB-Ethernet0]undoshutdown

[RouterB-Ethernet0]inte1

[RouterB-Ethernet1]ipaddrress10.71.1.2255.255.0.0

[RouterB-Ethernet1]undoshutdown

[RouterB-Ethernet1]ints0

[RouterB-Serial0]ipaddrress10.68.1.1255.255.0.0

[RouterB-Serial0]undoshutdown

[RouterB-Serial0]quit

[RouterB]iprouting

[RouterB]discurr

[root@PCAroot]#ping10.65.1.2通

[root@PCAroot]#ping10.66.1.2通

[root@PCAroot]#ping10.67.1.2通

[root@PCAroot]#ping10.68.1.2不通

[root@PCAroot]#ping10.69.1.2不通

[RouterA]iproute-static10.69.0.0255.255.0.010.67.1.1

[root@PCAroot]#ping10.69.1.1通

三个路由器的静态路由(参考实验九图)

设置RouterA的IP:

f0/0:

10.65.1.2--->

10.65.1.1

f0/1:

10.66.1.2--->

PCB:

10.66.1.1

s0/0:

10.67.1.2

s0/1:

10.68.1.2--->

接RouterCs0/0

设置RouterC的IP:

10.68.1.1<

---

10.78.1.2--->

接RouterBs0/0

设置RouterB的IP:

10.78.1.1<

10.67.1.1

10

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 工程科技 > 电子电路

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1