路由交换实验指导书1.docx

上传人:b****9 文档编号:26384898 上传时间:2023-06-18 格式:DOCX 页数:19 大小:360.07KB
下载 相关 举报
路由交换实验指导书1.docx_第1页
第1页 / 共19页
路由交换实验指导书1.docx_第2页
第2页 / 共19页
路由交换实验指导书1.docx_第3页
第3页 / 共19页
路由交换实验指导书1.docx_第4页
第4页 / 共19页
路由交换实验指导书1.docx_第5页
第5页 / 共19页
点击查看更多>>
下载资源
资源描述

路由交换实验指导书1.docx

《路由交换实验指导书1.docx》由会员分享,可在线阅读,更多相关《路由交换实验指导书1.docx(19页珍藏版)》请在冰豆网上搜索。

路由交换实验指导书1.docx

路由交换实验指导书1

计算机网络路由交换实验平台

 

 打造新一代高校通信实验平台

深圳市讯方通信技术有限公司

目录

实验一:

VLAN间通过VLANIF接口通信3

实验二:

配置交换机VLAN聚合实验5

实验三:

配置路由远程桥接功能8

实验四:

配置防火墙的PPPoE功能10

实验五:

配置防火墙VLAN间通过VLANIF接口通信12

实验六:

配置防火墙VLANTrunk15

实验一:

VLAN间通过VLANIF接口通信

一,组网需求

企业的不同部门拥有相同的业务,如上网、VoIP等业务,且各个部门中的用户位于不同的网段。

目前存在不同的部门中相同的业务所属的VLAN不相同,现需要实现不同VLAN中的用户相互通信。

如图1-1所示,部门1和部门2中拥有相同的业务上网业务,但是属于不同的VLAN且位于不同的网段。

现需要实现部门1与部门2的用户互通。

图1-1配置VLAN间通过VLANIF接口通信组网图

二,配置思路

采用如下的思路配置VLAN间通过VLANIF接口通信:

1.在交换机上创建VLAN,确定用户所属的VLAN。

2.在交换机上配置允许用户所属的VLAN通过当前二层端口。

3.在三层交换机上创建VLANIF接口并配置IP地址,实现三层互通。

 说明:

为了成功实现VLAN间互通,VLAN内主机的缺省网关必须是对应VLANIF接口的IP地址。

三,数据准备

为完成此配置例,需准备如下的数据:

1.在Switch上配置接口Eth0/0/1加入VLAN10和VLAN20。

2.在Switch上配置VLANIF10的IP地址为10.10.10.2/24。

3.在Switch上配置VLANIF20的IP地址为20.20.20.2/24。

4.在SwitchA上配置接口Eth0/0/1加入VLAN10和VLAN20。

5.在SwitchA上配置接口Eth0/0/2加入VLAN10。

6.在SwitchA上配置接口Eth0/0/3加入VLAN20。

 

四,配置步骤

1.配置Switch

#创建VLAN

system-view

[Quidway]vlanbatch1020

#配置接口加入VLAN

[Quidway]interfaceethernet0/0/1

[Quidway-Ethernet0/0/1]portlink-typetrunk

[Quidway-Ethernet0/0/1]porttrunkallow-passvlan1020

[Quidway-Ethernet0/0/1]quit

#配置VLANIF接口的IP地址

[Quidway]interfacevlanif10

[Quidway-Vlanif10]ipaddress10.10.10.224

[Quidway-Vlanif10]quit

[Quidway]interfacevlanif20

[Quidway-Vlanif20]ipaddress20.20.20.224

[Quidway-Vlanif20]quit

2.配置SwitchA

#创建VLAN

system-view

[Quidway]vlanbatch1020

#配置接口加入VLAN

[Quidway]interfaceethernet0/0/1

[Quidway-Ethernet0/0/1]portlink-typetrunk

[Quidway-Ethernet0/0/1]porttrunkallow-passvlan1020

[Quidway-Ethernet0/0/1]quit

[Quidway]interfaceethernet0/0/2

[Quidway-Ethernet0/0/2]portlink-typeaccess

[Quidway-Ethernet0/0/2]portdefaultvlan10

[Quidway-Ethernet0/0/2]quit

[Quidway]interfaceethernet0/0/3

[Quidway-Ethernet0/0/3]portlink-typeaccess

[Quidway-Ethernet0/0/3]portdefaultvlan20

[Quidway-Ethernet0/0/3]quit

五,检查配置结果

在VLAN10中的PC1上配置缺省网关为VLANIF10接口的IP地址10.10.10.2/24。

在VLAN20中的PC2上配置缺省网关为VLANIF20接口的IP地址20.20.20.2/24。

配置完成后,VLAN10内的PC1与VLAN20内的PC2能够相互访问。

 

实验二:

配置交换机VLAN聚合实验

一,组网需求

如图2-1所示,S-switch的接口Ethernet0/0/1连接PC1,Ethernet0/0/2连接PC2,Ethernet0/0/3连接PC3,Ethernet0/0/4连接PC4。

要求通过ProxyARP后,VLAN2和VLAN3之间可以互相三层通信。

图2-1配置VLAN聚合组网图

二,配置思路

采用如下的思路配置VLAN聚合:

1.创建sub-VLAN。

2.把sub-VLAN聚合为super-VLAN。

3.配置VLANIF接口的IP地址。

4.配置sub-VLAN的ProxyARP。

说明:

PC1、PC2、PC3和PC4需要预先配置IP地址,并使它们和VLAN4处于同一网段。

三,数据准备

为完成此配置例,需准备如下的数据:

1.sub-VLAN的ID为2和3,super-VLAN的ID为4。

2.Ethernet0/0/1、Ethernet0/0/2属于VLAN2。

3.Ethernet0/0/3、Ethernet0/0/4属于VLAN3。

4.super-VLAN的IP地址为129.9.0.1。

5.将终端PC的IP地址分别设置为:

PC1为129.9.0.101/255.255.255.0。

PC2为129.9.0.102/255.255.255.0。

PC3为129.9.0.103/255.255.255.0。

PC4为129.9.0.104/255.255.255.0。

四,配置步骤

1.设置接口的类型。

system-view

[Quidway]interfaceEthernet0/0/1

[Quidway-Ethernet0/0/1]portlink-typeaccess

[Quidway-Ethernet0/0/1]quit

[Quidway]interfaceEthernet0/0/2

[Quidway-Ethernet0/0/2]portlink-typeaccess

[Quidway-Ethernet0/0/2]quit

[Quidway]interfaceEthernet0/0/3

[Quidway-Ethernet0/0/3]portlink-typeaccess

[Quidway-Ethernet0/0/3]quit

[Quidway]interfaceEthernet0/0/4

[Quidway-Ethernet0/0/4]portlink-typeaccess

[Quidway-Ethernet0/0/4]quit

2.创建sub-VLAN的ID为2。

[Quidway]vlan2

3.将接口Ethernet0/0/1、Ethernet0/0/2加入到VLAN2中。

[Quidway-vlan2]portethernet0/0/10/0/2

[Quidway-vlan2]quit

4.创建sub-VLAN的ID为3。

[Quidway]vlan3

5.将接口Ethernet0/0/3、Ethernet0/0/4加入到VLAN3中。

[Quidway-vlan3]portethernet0/0/30/0/4

[Quidway-vlan3]quit

6.创建super-VLAN的ID为4,并将sub-VLAN2、3加入到super-VLAN中。

[Quidway]vlan4

[Quidway-vlan4]aggregate-vlan

[Quidway-vlan4]access-vlan2to3

[Quidway-vlan4]quit

7.配置接口VLANIF4的IP地址为129.9.0.1(如果是二层交换机的话,就要先实行命令:

undointerfacevlanif1。

因为接口默认类型为vlanif1类型)。

[Quidway]interfacevlanif4

[S-switch-Vlanif4]ipaddress129.9.0.1255.255.255.0

8.配置ProxyARP功能。

[S-switch-Vlanif4]arp-proxyinter-sub-vlan-proxyenable

[S-switch-Vlanif4]quit

五,验证配置结果

VLAN2的PC与VLAN3的PC间可以互相三层通信:

1.用PC1pingPC3或PC4可以ping通。

2.用PC2pingPC3或PC4可以ping通。

3.更改VLAN4的接口地址与终端PC不在同一网段后,PC1和PC2不能与PC3或PC4进行通信,此时只能PC1ping通PC2,PC3ping通PC4。

更改VLAN4接口IP的命令如下:

例如:

将VLAN4接口的IP地址更改为10.10.10.1255.255.255.0

[S-switch]interfacevlanif4

[S-switch-Vlanif4]ipaddress10.10.10.1255.255.255.0

[S-switch-Vlanif4]quit

 

实验三:

配置路由远程桥接功能

一,组网需求

LAN1和LAN2中的PC终端可以通过桥接通信,不需要进行IP路由,从而达到透过广域网,进行网上邻居的直接访问和其他应用。

二,硬件需求与连线

1.硬件需求:

路由器AR2200(2台),终端PC(2台)。

备注:

本实验以第1组为例,终端PC分别为第1组的WS1,WS2。

三,配置思路

采用如下的思路配置QinQ接口:

1.在创建网桥组,生成虚拟网桥;

2.创建网桥组,生成虚拟网桥

3.在RouterA和RouterB上配置Ethernet1/0/1接口加入网桥组;

四,数据准备

为完成此配置例,需准备如下的数据:

1.将终端PC的IP地址分别设置为:

PC1为129.9.0.101/255.255.255.0。

PC2为129.9.0.102/255.255.255.0。

五,配置步骤

1.RouterA的配置

[Router]system-view

[Router]sysnameRouterA

[RouterA]bridge1

[RouterA-bridge1]interfaceEthernet1/0/0

[RouterA-Ethernet1/0/0]bridge1

[RouterA-Ethernet1/0/0]interfaceEthernet1/0/1

[RouterA-Ethernet1/0/0]bridge1

[RouterA-Ethernet1/0/0]return

2.RouterB的配置

[Router]system-view

[Router]sysnameRouterB

[RouterB]bridge1

[RouterB-bridge1]interfaceEthernet1/0/0

[RouterB-Ethernet1/0/0]bridge1

[RouterB-Ethernet1/0/0]interfaceEthernet1/0/1

[RouterB-Ethernet1/0/0]bridge1

[RouterB-Ethernet1/0/0]return

∙加入网桥组的接口为三层接口,三层接口除了以太类型,还有ATM、Serial等其他类型。

∙LAN1和LAN2中的PC终端在同一网段。

∙网桥组编号相同。

六,验证配置结果

LAN1中的PC终端和LAN2中的PC终端可以互相ping通

即:

PC1和PC2可以互相ping通。

 

实验四:

配置防火墙的PPPoE功能

一,组网需求

如图1所示,USG_A和USG_B通过GigabitEthernet0/0/0相连。

要求USG_A采用PAP方式验证USG_B。

图1PPPoE配置举例

二,数据准备

(1)接口号:

GigabitEthernet0/0/0,安全区域:

Trust

(2)接口号:

GigabitEthernet0/0/0,安全区域:

Trust

Virtual-Template1IP地址:

10.10.10.1/24,安全区域:

三,配置步骤

#配置USG_A作为PPPoEServer。

#增加一个PPPoE用户。

system-view

[USG_A]aaa

[USG_A-aaa]local-useruserbpasswordsimplePassword2

[USG_A-aaa]local-useruserbservice-typeppp

[USG_A-aaa]quit

#配置虚拟模板参数。

[USG_A]interfacevirtual-template1

[USG_A-Virtual-Template1]pppauthentication-modepap

[USG_A-Virtual-Template1]ipaddress10.10.10.124

[USG_A-Virtual-Template1]remoteaddress10.10.10.2

[USG_A-Virtual-Template1]quit

#配置PPPoEServer。

[USG_A]interfaceGigabitEthernet0/0/0

[USG_A-GigabitEthernet0/0/0]pppoe-serverbindvirtual-template1

[USG_A-GigabitEthernet0/0/0]shutdown

[USG_A-GigabitEthernet0/0/0]undoshutdown

[USG_A-GigabitEthernet0/0/0]quit

配置USG_B作为PPPoEClient。

#配置USG_B作为PPPoEClient。

system-view

[USG_B]dialer-rule1ippermit

[USG_B]interfacedialer1

[USG_B-Dialer1]dialeruseruserb

[USG_B-Dialer1]dialer-group1

[USG_B-Dialer1]dialerbundle1

[USG_B-Dialer1]ipaddressppp-negotiate

[USG_B-Dialer1]ppppaplocal-useruserbpasswordsimplePassword2

[USG_B-Dialer1]quit

#配置PPPoE会话。

[USG_B]interfaceGigabitEthernet0/0/0

[USG_B-GigabitEthernet0/0/0]pppoe-clientdial-bundle-number1

对于USG系列,将接口加入安全区域,并配置域间包过滤,以保证网络基本通信正常,具体步骤略。

对于USGBSR/HSR系列,不需要将接口加入安全区域以及配置包过滤。

四,验证配置结果

配置完成后,可以查看到PPPoEServer端和PPPoEClient端的session信息。

且USG_A和USG_B可以相互ping通。

查看PPPoEServer端的session信息。

[USG_A]displaypppoe-serversessionall

SIDIntfStateOIntfRemMACLocMAC

1Virtual-Template1:

0UPGE0/0/00022.a100.11ab0018.82cf.ebed

查看PPPoEClient端的session信息。

[USG_B]displaypppoe-clientsessionsummarydial-bundle-number1

PPPoEClientSession:

IDBundleDialerIntfClient-MACServer-MACState

111GE0/0/00022a10011ab001882cfebedPPPUP

实验五:

配置防火墙VLAN间通过VLANIF接口通信

一,组网需求

如图1所示,USG的VLAN2包含接口Ethernet5/0/0和接口Ethernet5/0/1;VLAN3包含Ethernet5/0/2和Ethernet5/0/3。

要求VLAN2内的主机和VLAN3内的主机之间可以相互通信。

二,配置思路

1.配置VLAN,并加入接口,将USG下的设备划分到两个VLAN。

2.创建VLANIF接口,配置VLANIF接口的IP地址。

3.配置安全区域及域间包过滤规则。

4.配置主机网关为VLANIF接口的IP地址。

三,操作步骤

1.配置VLAN,并加入接口。

#创建VLAN2,向VLAN2中加入接口Ethernet5/0/0和Ethernet5/0/1。

system-view

[USG]vlan2

[USG-vlan-2]portinterfaceEthernet5/0/0

[USG-vlan-2]portinterfaceEthernet5/0/1

[USG-vlan-2]quit

#创建VLAN3,向VLAN3中加入接口Ethernet5/0/2和Ethernet5/0/3。

[USG]vlan3

[USG-vlan-3]portinterfaceEthernet5/0/2

[USG-vlan-3]portinterfaceEthernet5/0/3

[USG-vlan-3]quit

2.配置VLANIF接口。

#创建并进入VLANIF2接口。

[USG]interfacevlanif2

#配置VLANIF2的IP地址。

[USG-Vlanif2]ipaddress120.1.1.124

#退回到系统视图。

[USG-Vlanif2]quit

#创建并进入VLANIF3接口。

[USG]interfacevlanif3

#配置VLANIF3的IP地址。

[USG-Vlanif3]ipaddress130.1.1.124

#退回到系统视图。

[USG-Vlanif3]quit

3.配置VLANIF接口加入安全域并配置域间包过滤规则。

#将VLANIF2接口加入Trust区域。

[USG]firewallzonetrust

[USG-zone-trust]addinterfaceVlanif2

[USG-zone-trust]quit

#将VLANIF3接口加入Untrust区域。

[USG]firewallzoneuntrust

[USG-zone-trust]addinterfaceVlanif3

[USG-zone-trust]quit

#配置域间缺省包过滤规则。

[USG]firewallpacket-filterdefaultpermitinterzonetrustuntrust

4.配置属于VLAN2的主机的网关为120.1.1.1,配置属于VLAN3的主机的网关为130.1.1.1。

四,验证配置结果

配置完成后,查看VLAN2和VLAN3之间的主机能否相互Ping通

假设VLAN3内存在IP地址为130.1.1.2/24的主机。

在VLAN2中的主机上执行ping130.1.1.2命令,查看能否ping通VLAN3内的主机。

C:

\>ping130.1.1.2

Pinging130.1.1.2with32bytesofdata:

Replyfrom130.1.1.2:

bytes=32time<1msTTL=128

Replyfrom130.1.1.2:

bytes=32time<1msTTL=128

Replyfrom130.1.1.2:

bytes=32time<1msTTL=128

Replyfrom130.1.1.2:

bytes=32time<1msTTL=128

Pingstatisticsfor130.1.1.2:

Packets:

Sent=4,Received=4,Lost=0<0%loss>,

Approximatesroundtriptimesinmilli-seconds:

Minimum=0ms,Maximum=0ms,Average=0ms

 

实验六:

配置防火墙VLANTrunk

一,组网需求

VLAN的组成不受物理位置的限制,一个VLAN可以在一个设备内,也可以跨设备。

当VLAN跨越设备实现时,需要配置设备相连的接口为Trunk接口,允许VLAN通过。

如图1所示,USGA通过二层接口Ethernet5/0/0连接USGB的二层接口Ethernet5/0/0。

VLAN5和VLAN9都是跨设备的VLAN。

VLAN5中包含的接口有USGA的Ethernet5/0/1和Ethernet5/0/2,USGB的Ethernet5/0/1和Ethernet5/0/2。

VLAN9中包含的接口有USGA的Ethernet5/0/3和Ethernet5/0/4,USGB的Ethernet5/0/3和Ethernet5/0/4。

要求跨设备的VLAN5内的主机之间可以相互通信,跨设备的VLAN9内的主机之间可以相互通信。

二,配置思路

1.创建跨设备的VLAN5、VLAN9,并将二层接口加入VLAN。

2.配置USGA的二层接口Ethernet5/0/0为Trunk接口,允许VLAN5、VLAN9通过。

配置USGB的二层接口Ethernet5/0/0为Trunk接口,允许V

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

当前位置:首页 > IT计算机 > 电脑基础知识

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

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