华为交换机测试题及答案

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

一个简单的公司网络场景,SW1和SW2为楼层交换机,PC-1和PC-3属于公司的部门A,PC-2和PC-4属于公司的部门B,PC-5属于部门A和部门B的上级部门C。

在网络规划中,部门A 属于VLAN 10,部门B属于VLAN 20,部门C属于VLAN 30。

公司希望通过VLAN的划分和配置,使部门A和部门B均能够与部门C进行通信,但是部门A和部门B之间不能互相通信。

Host通过Switch接入网络,Gateway为企业出口网关,各Host均使用静态配置的IP 地址。

管理员希望Host使用管理员分配的固定IP地址上网,不允许私自更改IP地址非法获取网络访问权限。

题目1答案:
步骤1:配置SW1
vlan batch 10 20 30
#
interface GigabitEthernet0/0/1
port link-type hybrid
port hybrid untagged vlan 10 30
port hybrid pvid vlan 10
#
interface GigabitEthernet0/0/2
port link-type hybrid
port hybrid untagged vlan 20 30
port hybrid pvid vlan 20
#
interface GigabitEthernet0/0/24
port link-type hybrid
port hybrid tagged vlan 10 20 30
#
步骤2:配置SW2
vlan batch 10 20 30
#
interface GigabitEthernet0/0/1
port link-type hybrid
port hybrid untagged vlan 10 30
port hybrid pvid vlan 10
#
interface GigabitEthernet0/0/2
port link-type hybrid
port hybrid untagged vlan 20 30
port hybrid pvid vlan 20
#
interface GigabitEthernet0/0/3
port link-type hybrid
port hybrid untagged vlan 10 20 30
port hybrid pvid vlan 30
#
interface GigabitEthernet0/0/24
port link-type hybrid
port hybrid tagged vlan 10 20 30
#
题目2答案:
采用如下的思路在Switch上配置IPSG功能,实现上述需求。

在Switch上配置Host_1和Host_2的静态绑定表,固定IP和MAC的绑定关系。

在Switch连接用户主机的接口使能IPSG,实现Host只能使用管理员分配的固定IP地址上网。

同时,在接口开启IP报文检查告警功能,当交换机丢弃非法上网用户的报文达到阈值后上报告警。

步骤1:创建Host_1和Host_2的静态绑定表项
<HUAWEI> system-view
[HUAWEI] sysname Switch
[Switch] user-bind static ip-address 10.0.0.1 mac-address 0001-0001-0001
[Switch] user-bind static ip-address 10.0.0.11 mac-address
0002-0002-0002
步骤2:使能IPSG并设置丢弃报文上报告警功能
# 在连接Host_1的GE1/0/1接口使能IPSG和IP报文检查告警功能,当丢弃报
文阈值到达200将上报告警。

[Switch] interface gigabitethernet 1/0/1
[Switch-GigabitEthernet1/0/1] ip source check user-bind enable
[Switch-GigabitEthernet1/0/1] ip source check user-bind alarm enable
[Switch-GigabitEthernet1/0/1] ip source check user-bind alarm threshold
200
[Switch-GigabitEthernet1/0/1] quit
# 在连接Host_2的GE1/0/2接口使能IPSG和IP报文检查告警功能,当丢弃报
文阈值到达200将上报告警。

[Switch] interface gigabitethernet 1/0/2
[Switch-GigabitEthernet1/0/2] ip source check user-bind enable
[Switch-GigabitEthernet1/0/2] ip source check user-bind alarm enable
[Switch-GigabitEthernet1/0/2] ip source check user-bind alarm threshold
200
[Switch-GigabitEthernet1/0/2] quit
步骤3:验证配置结果
在Switch上执行display dhcp static user-bind all命令,可以查看静态绑
定表信息。

[Switch] display dhcp static user-bind all
DHCP static Bind-table: Flags:O - outer vlan ,I - inner vlan ,P - Vlan-mapping IP Address MAC Address VSI/VLAN(O/I/P)
Interface
---------------------------------------------------------------------
-----------
10.0.0.1 0001-0001-0001 -- /-- /-- --
10.0.0.11 0002-0002-0002 -- /-- /-- --
--------------------------------------------------------------------------------
Print count: 2 Total count: 2
Host_1和Host_2使用管理员分配的固定IP地址可以正常访问网络,更改IP地址后无法访问网络。

Welcome !!! 欢迎您的下载,资料仅供参考!。

相关文档
最新文档