SwitchB为三层交换机,SwitchA为二层交换机,现在要实现研发部和质量部

admin2022-08-02  41

问题 SwitchB为三层交换机,SwitchA为二层交换机,现在要实现研发部和质量部之间的互通,要求SwitchB使用子接口形式实现的配置如下:……# 使连接三层交换机的接口使用trunk方式透传VLAN。[SwitchA] interface gigabitethernet 1/0/5  //(1)[SwitchA-GigabitEthernet1/0/5] (2)[SwitchA-GigabitEthernet1/0/5] port trunk allow-pass (3)  [SwitchA-GigabitEthernet1/0/5] quit#接下来配置三层交换机SwitchB,利用子接口对应不同Vlan的网关<HUAWEI> system-view[HUAWEI] sysname SwitchB //修改设备的名称为SwitchB[SwitchB] interface gigabitethernet 1/0/1[SwitchB-GigabitEthernet1/0/1] (4) //配置链路类型为hybrid[SwitchB-GigabitEthernet1/0/1] quit[SwitchB] (5) //创建子接口并进入子接口视图[SwitchB-GigabitEthernet1/0/1.1] (6) //子接口对应接入VLAN 2[SwitchB-GigabitEthernet1/0/1.1] (7)  //设置相应的IP地址[SwitchB-GigabitEthernet1/0/1.1] arp broadcast enable //终结子接口默认直接丢弃广播报文,因此需要配置子接口可以转发ARP广播报文的功能[SwitchB-GigabitEthernet1/0/1.1] quit[SwitchB] interface gigabitethernet 1/0/1.2 //创建子接口并进入子接口视图[SwitchB-GigabitEthernet1/0/1.2] dot1q termination vid 3 //子接对应接入VLAN 3[SwitchB-GigabitEthernet1/0/1.2] ip address 2.2.2.1 24[SwitchB-GigabitEthernet1/0/1.2] (8)[SwitchB-GigabitEthernet1/0/1.2] quit

选项

答案

解析 (1)进入接口视图 (2)port link-type trunk? (3)vlan2  3 或者vlan 2 to 3 (4)? port link-type hybrid? (5)interface gigabitethernet 1/0/1.1? (6) dot1q termination vid 2 (7)ip address 1.1.1.1 24 或者)ip address 1.1.1.1 255.255.255.0?
(8)  arp broadcast enable
【解析】
试题分析:
这类题一定要注意上下文,会有很多可以相互提示的信息,另外,对于接口的编号问题,注意前面提示符的提示。完整的配置形式如下:# 创建VLAN。<HUAWEI> system-view[HUAWEI] sysname SwitchA //修改设备的名称为SwitchA,便于识别[SwitchA] vlan batch 2 to 3 //批量创建VLAN 2和VLAN 3# 将连接Host的接口加入相应VLAN。[SwitchA] interface gigabitethernet 1/0/1[SwitchA-GigabitEthernet1/0/1] port link-type access //将与PC相连接口的接口类型设置为access[SwitchA-GigabitEthernet1/0/1] port default vlan 2 //将Host A划分到VLAN 2[SwitchA-GigabitEthernet1/0/1] quit。。。。。#其他接口如1/0/2到1/0/4,配置类似1/0/1的配置。注意下一下即可。?# 使连接三层交换机的接口透传相应VLAN。[SwitchA] interface gigabitethernet 1/0/5[SwitchA-GigabitEthernet1/0/5] port link-type trunk //将与交换设备相连接口的接口类型设置为trunk[SwitchA-GigabitEthernet1/0/5] port trunk allow-pass vlan 2 to 3 //透传VLAN 2和VLAN 3[SwitchA-GigabitEthernet1/0/5] quit接下来配置三层交换机SwitchB<HUAWEI> system-view[HUAWEI] sysname SwitchB //修改设备的名称为SwitchB[SwitchB] interface gigabitethernet 1/0/1[SwitchB-GigabitEthernet1/0/1] port link-type hybrid //V200R005之前版本,不需要手动配置链路类型为hybrid[SwitchB-GigabitEthernet1/0/1] quit[SwitchB] interface gigabitethernet 1/0/1.1 //创建子接口并进入子接口视图[SwitchB-GigabitEthernet1/0/1.1] dot1q termination vid 2 //子接口GE1/0/1.1对应接入VLAN 2[SwitchB-GigabitEthernet1/0/1.1] ip address 1.1.1.1 24[SwitchB-GigabitEthernet1/0/1.1] arp broadcast enable //终结子接口默认直接丢弃广播报文,因此需要配置子接口可以转发ARP广播报文的功能[SwitchB-GigabitEthernet1/0/1.1] quit[SwitchB] interface gigabitethernet 1/0/1.2 //创建子接口并进入子接口视图[SwitchB-GigabitEthernet1/0/1.2] dot1q termination vid 3 //子接口GE1/0/1.2对应接入VLAN 3[SwitchB-GigabitEthernet1/0/1.2] ip address 2.2.2.1 24[SwitchB-GigabitEthernet1/0/1.2] arp broadcast enable[SwitchB-GigabitEthernet1/0/1.2] quit
转载请注明原文地址:https://tihaiku.com/congyezige/2403365.html

最新回复(0)