路由与交换技术

引言

本综合实验是基于华为ENSP完成的。

实验要求

拓扑图如下:
实验拓扑图
按拓扑图连接设备接口,按下表给设备命名并配置IP地址。

设备接口IP连接设备接口IP
PC1Eth0/0/110.10.10.10/24LSW1Eth0/0/1
PC2Eth0/0/120.20.20.20/24LSW1Eth0/0/1
PC3Eth0/0/130.30.30.30/24LSW2Eth0/0/1
PC4Eth0/0/140.40.40.40/24LSW2Eth0/0/1
LSW1Eth0/0/21LSW3GE0/0/21
LSW1Eth0/0/22LSW3GE0/0/22
LSW2GE0/0/1LSW3GE0/0/1
LSW2GE0/0/2LSW3GE0/0/2
LSW3VLANIF1192.168.10.10/24AR1GE0/0/0192.168.10.11/24
AR1GE0/0/1192.168.12.11/24AR2GE0/0/0192.168.12.20/24
AR2GE0/0/1192.168.20.254/24Server1Eth0/0/0192.168.20.20/24
  1. 在交换机LSW1上创建VLAN10、VLAN20,并设置VLANIF10接口地址为10.10.10.253/24,VLANIF20接口地址为20.20.20.253/24。
  2. 在交换机LSW2上创建VLAN30、VLAN40,并设置VLANIF30接口地址为30.30.30.253/24,VLANIF40接口地址为40.40.40.253/24。
  3. 在交换机LSW3上创建VLAN10、VLAN20、VLAN30、VLAN40,并设置VLANIF10接口地址为10.10.10.254/24,VLANIF20接口地址为20.20.20.254/24,VLANIF30接口地址为30.30.30.254/24,VLANIF40接口地址为40.40.40.254/24。VLANIF1接口地址为192.168.10.10/24。
  4. 交换机LSW1与交换机LSW3之间完成MTSP协议配置,MST域名为SR20181218,VLAN 10映射为会话10,VLAN 20映射为会话20,LSW1作为VLAN10的主根桥,VLAN20的备份根桥;LSW3作为VLAN20的主根桥,VLAN10的备份根桥。
  5. 交换机LSW2与交换机LSW3之间完成链路聚合配置,Eth-Trunk编号为1,负载分担方式为源MAC地址与目的地址方式,实现流量在Eth-Trunk各成员接口间的负载分担。
  6. 在LSW3、AR1、AR2上做RIP路由协议配置,版本为2,完成全网联通。
  7. 将LSW3核心交换机配置成DHCP服务器,创建2个地址池for-net10、for-net20,为VLAN10、VLAN20的主机分配IP地址,其中排除地址分别为10.10.10.253、20.20.20.253。
  8. 在AR2上创建访问控制列表,编号为2000,规则步长为5,即5、10、15……;规划依次为:(1)限制PC1主机;(2)限制PC2主机;(3)其它均允许;并将此列表用在AR2的G0/0/0端口上。

这就是我们学校老师作为期末机考的蓝本-综合实验,为了让大家进一步了解路由实验,我会在每道题下面附上答案和相关的知识点或知识点链接。

第一题

在交换机LSW1上创建VLAN10、VLAN20,并设置VLANIF10接口地址为10.10.10.253/24,VLANIF20接口地址为20.20.20.253/24。

所用知识

VLAN

命令

LSW1

# 创建vlan10、20:
vlan batch 10 20
# 设置vlanif10、vlanif20 的接口地址:
interface Vlanif10
ip address 10.10.10.253 255.255.255.0
interface Vlanif20
ip address 20.20.20.253 255.255.255.0

第二题

在交换机LSW2上创建VLAN30、VLAN40,并设置VLANIF30接口地址为30.30.30.253/24,VLANIF40接口地址为40.40.40.253/24。

命令

LSW3

# 创建vlan10、vlan20
vlan batch 30 40
# 设置虚拟接口vlanif30、vlanif40的IP地址
interface Vlanif30
ip address 30.30.30.253 255.255.255.0
interface Vlanif40
ip address 40.40.40.253 255.255.255.0

第三题

在交换机LSW3上创建VLAN10、VLAN20、VLAN30、VLAN40,并设置VLANIF10接口地址为10.10.10.254/24,VLANIF20接口地址为20.20.20.254/24,VLANIF30接口地址为30.30.30.254/24,VLANIF40接口地址为40.40.40.254/24。VLANIF1接口地址为192.168.10.10/24。

命令

# 创建vlan10、20、30、40
vlan batch 10 20 30 40
# 设置虚拟接口vlanif1、10、20、30、40接口地址
interface Vlanif1
ip address 192.168.10.10 255.255.255.0
interface Vlanif10
ip address 10.10.10.254 255.255.255.0
interface Vlanif20
ip address 20.20.20.254 255.255.255.0
interface Vlanif30 
ip address 30.30.30.254 255.255.255.0
interface Vlanif40
ip address 40.40.40.254 255.255.255.0

第四题

交换机LSW1与交换机LSW3之间完成MTSP协议配置,MST域名为SR20181218,VLAN 10映射为会话10,VLAN 20映射为会话20,LSW1作为VLAN10的主根桥,VLAN20的备份根桥;LSW3作为VLAN20的主根桥,VLAN10的备份根桥。

所用知识

MSTP协议

边缘接口

命令

【LSW1】MTSP协议配置:

stp region-configuration   //进入MSTP域视图
region-name SR20181218  //指定该MST域名称为SR20181218
instance 10 vlan 10    //vlan10 的映射会话 10
instance 20 vlan 20    //vlan20 的映射会话 20
active region-configuration //对以上配置进行激活

【LSW1】物理接口的vlan划分边缘端口的设置:

interface Ethernet0/0/1
port link-type access
port default vlan 10   //让E0/0/0 接口加入 vlan 10
stp edged-port enable   //**将该接口设置为边缘端口**
interface Ethernet0/0/11
port link-type access   //注意此处的eth接口设置是access模式
port default vlan 20
stp edged-port enable   //**至此同上**
interface Ethernet0/0/21
port link-type trunk
port trunk allow-pass vlan 2 to 4094
interface Ethernet0/0/22
port link-type trunk
port trunk allow-pass vlan 2 to 4094   //配置trunk允许通过的vlan id

【LSW1】STP对vlan10、20的根网桥、备用网桥的配置:

stp instance 10 root primary  //设置vlan10的根网桥
stp instance 20 root secondary   //设置vlan20的备用网桥
//LSW1设置了边缘路径,因此会参与竞选

【LSW3】MTSP协议配置:

stp region-configuration
region-name SR20181218
instance 10 vlan 10
instance 20 vlan 20
active region-configuration

【LSW3】STP对vlan10、20的根网桥、备用网桥的配置:

stp instance 10 root secondary  //设置vlan10的备份网桥
stp instance 20 root primary   //设置vlan20的根网桥
//LSW1设置了边缘路径,因此会参与竞选

第五题

交换机LSW2与交换机LSW3之间完成链路聚合配置,Eth-Trunk编号为1,负载分担方式为源MAC地址与目的地址方式,实现流量在Eth-Trunk各成员接口间的负载分担。

所用知识

链路聚合
负载均衡

命令

【LSW2】链路聚合与负载均衡的配置:

interface Eth-Trunk1   //创建Eth-Trunk链路聚合端口,编号1
port link-type trunk
port trunk allow-pass vlan 2 to 4094   //**trunk****接口的配置都需要设置**
load-balance src-dst-mac   //配置普通负载分担,类型为mac或者目的地址

interface GigabitEthernet0/0/1
eth-trunk 1            //将G0/0/1加入到链路聚合eth-trunk1

interface GigabitEthernet0/0/2
eth-trunk 1            //同上,因此这两个几口无需显示指定IP

【LSW2】各接口的相关配置:

interface Ethernet0/0/1
port link-type access
port default vlan 30   //E0/0/1接口设置默认vlan 30
stp edged-port enable   //并设置该接口为边缘端口

interface Ethernet0/0/11
port link-type access
port default vlan 40
stp edged-port enable   //至此同上

【LSW2】各接口的相关配置:

interface Ethernet0/0/1
port link-type access
port default vlan 30   //E0/0/1接口设置默认vlan 30
stp edged-port enable   //并设置该接口为边缘端口

interface Ethernet0/0/11
port link-type access
port default vlan 40
stp edged-port enable   //至此同上

【LSW3】链路聚合与负载均衡的配置:

interface Eth-Trunk1
port link-type trunk
port trunk allow-pass vlan 2 to 4094
load-balance src-dst-mac
interface GigabitEthernet0/0/1
eth-trunk 1
interface GigabitEthernet0/0/2
eth-trunk 1

【LSW3】其他接口IP配置以及vlan允许通过的id:

interface GigabitEthernet0/0/21
port link-type trunk
port trunk allow-pass vlan 2 to 4094
interface GigabitEthernet0/0/22
port link-type trunk
port trunk allow-pass vlan 2 to 4094
interface GigabitEthernet0/0/24
port link-type trunk
port trunk allow-pass vlan 2 to 4094

第六题

在LSW3、AR1、AR2上做RIP路由协议配置,版本为2,完成全网联通。

所用知识

RIP
地址详解

命令

【LSW3】RIP路由协议配置,设置为版本2:

rip 1       //启用RIP进程1
undo summary    //禁用路由汇总功能
version 2     //启用版本2
network 10.0.0.0
network 20.0.0.0
network 30.0.0.0
network 40.0.0.0
network 192.168.10.0   //通告主类网络地址,以上都是

【AR1】RIP路由协议配置,设置为版本2:

rip 1
undo summary
version 2
network 192.168.12.0
network 192.168.10.0   //注意此处的10

【AR2】RIP路由协议配置,设置为版本2:

rip 1
undo summary
version 2
network 192.168.12.0
network 192.168.20.0   //注意此处的20

第七题

将LSW3核心交换机配置成DHCP服务器,创建2个地址池for-net10、for-net20,为VLAN10、VLAN20的主机分配IP地址(实际4个地址池),其中排除地址分别为10.10.10.253、20.20.20.253。

所用知识

DHCP

命令

【LSW3】的DHCP配置:

ip pool for-net10   //创建全局地址池for-net10
gateway-list 10.10.10.254   //为DHCP客户端配置出口网关地址
network 10.10.10.0 mask 255.255.255.0  //配置地址池可分配的网段地址
excluded-ip-address 10.10.10.253 //配置IP地址池中不参与自动分配的IP

ip pool for-net20
gateway-list 20.20.20.254
network 20.20.20.0 mask 255.255.255.0
excluded-ip-address 20.20.20.253

ip pool for-net30
gateway-list 30.30.30.254
network 30.30.30.0 mask 255.255.255.0
excluded-ip-address 30.30.30.253

ip pool for-net40
gateway-list 40.40.40.254
network 40.40.40.0 mask 255.255.255.0
excluded-ip-address 40.40.40.253

【LSW3】设置DHCP基于全局的配置:

interface Vlanif10
dhcp select global         //设置DHCP基于全局的配置
interface Vlanif20
dhcp select global         //设置DHCP基于全局的配置
interface Vlanif30 
dhcp select global         //设置DHCP基于全局的配置
interface Vlanif40
dhcp select global         //设置DHCP基于全局的配置

第八题

在AR2上创建访问控制列表,编号为2000,规则步长为5,即5、10、15……;规划依次为:(1)限制PC1主机;(2)限制PC2主机;(3)其它均允许;并将此列表用在AR2的G0/0/0端口上。

所用知识

ACL

命令

acl number 2000      //创建ACL访问控制列表
//指定步长规则为5,限制PC1
rule 5 deny source 10.10.10.10 0 
//指定步长规则为10,限制PC2
rule 10 deny source 20.20.20.20 0
//允许步长15的报文通过
rule 15 permit

interface GigabitEthernet0/0/0
ip address 192.168.12.20 255.255.255.0
//指定在接口入方向上配置ACL报文过滤
traffic-filter inbound acl 2000

interface GigabitEthernet0/0/1
ip address 192.168.20.254 255.255.255.0

完整命令

LSW1

system-view
sysname LSW1

vlan batch 10 20
interface vlanif10
	ip address 10.10.10.253 255.255.255.0
interface vlanif20
	ip address 20.20.20.253 255.255.255.0
quit

stp region-configuration
	region-name SR20181218
    instance 10 vlan 10
    instance 20 vlan 20
    active region-configuration
stp instance 20 root secondary
stp instance 10 root primary

interface Ethernet0/0/1
    port link-type access
    port default vlan 10
    stp edged-port enable

interface Ethernet0/0/11
    port link-type access
    port default vlan 20
    stp edged-port enable

interface Ethernet0/0/21
    port link-type trunk
    port trunk allow-pass vlan 2 to 4094

interface Ethernet0/0/22
    port link-type trunk
    port trunk allow-pass vlan 2 to 4094

LSW2

system-view
sysname LSW2

vlan batch 30 40
interface vlanif30
	ip address 30.30.30.253 255.255.255.0
interface vlanif40
	ip address 40.40.40.253 255.255.255.0

interface Eth-Trunk1
    port link-type trunk
    port trunk allow-pass vlan 2 to 4094
	load-balance src-dst-mac
quit

interface GigabitEthernet0/0/1
	eth-trunk 1
interface GigabitEthernet0/0/2
	eth-trunk 1

interface Ethernet0/0/1
    port link-type access
    port default vlan 30
    stp edged-port enable

interface Ethernet0/0/11
    port link-type access
    port default vlan 40
    stp edged-port enable

LSW3

system-view
sysname LSW3

vlan batch 10 20 30 40
interface vlanif10
	ip address 10.10.10.254 255.255.255.0
interface vlanif20
	ip address 20.20.20.254 255.255.255.0
interface vlanif30
	ip address 30.30.30.254 255.255.255.0
interface vlanif40
	ip address 40.40.40.254 255.255.255.0
interface vlanif1
	ip address 192.168.10.10 255.255.255.0
quit


stp region-configuration
region-name SR20181218
    instance 10 vlan 10
    instance 20 vlan 20
    active region-configuration
stp instance 10 root secondary
stp instance 20 root primary

interface Eth-Trunk1
    port link-type trunk
    port trunk allow-pass vlan 2 to 4094
    load-balance src-dst-mac
quit

interface GigabitEthernet0/0/1
	eth-trunk 1
interface GigabitEthernet0/0/2
	eth-trunk 1

rip
    version 2
    network 10.0.0.0
    network 20.0.0.0
    network 30.0.0.0
    network 40.0.0.0
    network 192.168.10.0
    undo summary
quit

ip pool for-net10
    gateway-list 10.10.10.254
    network 10.10.10.0 mask 255.255.255.0
    excluded-ip-address 10.10.10.253
quit
ip pool for-net20
    gateway-list 20.20.20.254
    network 20.20.20.0 mask 255.255.255.0
    excluded-ip-address 20.20.20.253
quit
ip pool for-net30
    gateway-list 30.30.30.254
    network 30.30.30.0 mask 255.255.255.0
    excluded-ip-address 30.30.30.253
quit
ip pool for-net40
    gateway-list 40.40.40.254
    network 40.40.40.0 mask 255.255.255.0
    excluded-ip-address 40.40.40.253
dhcp enable

interface Vlanif10
	dhcp select global

interface Vlanif20
	dhcp select global

interface Vlanif30
	dhcp select global

interface Vlanif40
	dhcp select global

interface GigabitEthernet0/0/21
    port link-type trunk
    port trunk allow-pass vlan 2 to 4094

interface GigabitEthernet0/0/22
    port link-type trunk
    port trunk allow-pass vlan 2 to 4094

interface GigabitEthernet0/0/24
    port link-type trunk
    port trunk allow-pass vlan 2 to 4094

AR1

system-view
sysname AR1
 rip 1
    version 2
    network 192.168.12.0
    network 192.168.10.0
    undo summary

interface GigabitEthernet0/0/0
	ip address 192.168.10.11 255.255.255.0

interface GigabitEthernet0/0/1
	ip address 192.168.12.11 255.255.255.0

AR2

system-view
sysname AR2
rip 1
    undo summary
    version 2
    network 192.168.12.0
    network 192.168.20.0
quit
acl number 2000
    rule 5 deny source 10.10.10.10 0
    rule 10 deny source 20.20.20.20 0
    rule 15 permit
quit

interface GigabitEthernet0/0/0
    ip address 192.168.12.20 255.255.255.0
	traffic-filter inbound acl 2000
	
interface GigabitEthernet0/0/1
    ip address 192.168.20.254 255.255.255.0

总结

最终实现PC主机互相能ping通,服务器能ping通PC3和和PC3,而不能ping通PC1和PC2。
总之,每道题放的都是我挑选过的讲的比较好的博客,再附上我们老师给的标准答案,希望各位能够利用这份博客好好学习下路由技术,如果这份博客有写的不好的地方,欢迎与我私聊或者在评论区进行反馈。

  • 20
    点赞
  • 69
    收藏
    觉得还不错? 一键收藏
  • 3
    评论
路由交换技术实验pdf是一份关于路由交换技术实验的电子文档。在这份pdf中,我们可以获得与路由交换技术相关的实验内容、步骤、图表和实验所需的软件、硬件等信息。 路由交换技术是计算机网络领域中的核心技术之一,它主要涉及到网络数据的引导和传输。在实验中,我们将学习如何通过路由器和交换机来进行网络数据的传输和转发。 这份pdf中的实验内容包括但不限于: 1. 路由器配置实验:学习如何配置路由器,并使用路由协议来实现不同网络之间的数据传输。 2. 交换机配置实验:学习如何配置交换机,并使用交换技术来实现局域网内部设备之间的数据传输。 3. Vlan配置实验:学习如何使用Vlan技术来实现虚拟局域网的划分和管理。 4. 动态路由实验:学习如何配置动态路由协议,使得网络可以自动选择最佳的路由路径进行数据传输。 5. 配置网络安全实验:学习如何配置路由器和交换机的安全设置,以提高网络的安全性。 通过这份pdf中的实验内容,我们可以掌握路由交换技术的基本原理和实践操作。这将对我们理解计算机网络的工作原理和提高网络管理能力有很大的帮助。 总之,路由交换技术实验pdf提供了有关路由交换技术实验的详细信息和实例,帮助我们深入理解和学习相关知识,提升计算机网络技术能力。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值