根据企业的情况,决定设置DHCP解决IP地址分配的问题,管理员小张通过在网关

题库2022-08-02  31

问题 根据企业的情况,决定设置DHCP解决IP地址分配的问题,管理员小张通过在网关设备Switch上配置DHCP服务器,实现为企业两个网段内的终端动态分配IP地址。其中,网段10.1.1.0/24内的PC为员工固定办公终端,IP地址租期配置为30天;网段10.1.2.0/24供企业出差人员临时接入网络,IP地址租期配置为1天以下是小张进行的相关配置: (1)在交换机上开启DHCP服务system-view [HUAWEI] sysname Switch [Switch] (1)//使能dhcp //配置交换机上端口Vlan [Switch] vlan batch 10 to 11 [Switch] (2) [Switch-GigabitEthernet0/0/1] port link-type access [Switch-GigabitEthernet0/0/1] (3) [Switch-GigabitEthernet0/0/1] quit //配置Vlan虚接口的IP地址信息 [Switch] (4) [Switch-Vlanif10] (5) //企业为固定办公终端的网段 [Switch-Vlanif10] quit //设置接口获取DHCP分配地址信息 [Switch] interface vlanif 10 [Switch-Vlanif10] (6) //使能接口采用接口地址池的DHCP服务器功能 [Switch-Vlanif10] dhcp server lease (7) //租期的缺省值为1天,修改租期为30天 [Switch-Vlanif10] dhcp server static-bind ip-address 10.1.1.100 mac-address 286e-d488-b684 //为 Client_1分配固定的IP地址[HUAWEI] sysname Switch[Switch] (1)//使能dhcp//配置交换机上端口Vlan[Switch] vlan batch 10 to 11[Switch] (2)[Switch-GigabitEthernet0/0/1] port link-type access[Switch-GigabitEthernet0/0/1] (3)[Switch-GigabitEthernet0/0/1] quit//配置Vlan虚接口的IP地址信息[Switch] (4)[Switch-Vlanif10] (5) //企业为固定办公终端的网段[Switch-Vlanif10] quit//设置接口获取DHCP分配地址信息[Switch] interface vlanif 10[Switch-Vlanif10] (6) //使能接口采用接口地址池的DHCP服务器功能[Switch-Vlanif10] dhcp server lease (7) //租期的缺省值为1天,修改租期为30天[Switch-Vlanif10] dhcp server static-bind ip-address 10.1.1.100 mac-address 286e-d488-b684 //为Client_1分配固定的IP地址

选项

答案

解析 (1)dhcp enable (2)interface gigabitethernet 0/0/1 (3)port default vlan 10  (4)interface vlanif 10  (5) ip address 10.1.1.1 24 或者 ip address 10.1.1.1 255.255.255.0 (6)dhcp select interface  (7) day 30动态主机配置协议DHCP(Dynamic Host Configuration Protocol)采用客户端/服务器模式对用户的网络参数进行动态配置和集中管理。其中,DHCP服务器通过地址池为用户分配IP地址等网络参数。华为设备配置中,地址池分为接口地址池和全局地址池两种。 1.接口地址池配置方式简单,只能用于用户与DHCP服务器在同一个网段的情况,并且只 能给对应接口下的用户分配IP地址等网络参数;适用于设备数量有限的小型网络。在用户网关设备上配置基于接口地址池的DHCP服务器功能之后,对应接口下的固定主机、移动终端等都可以自动获取IP地址等网络参数,不需要用户手动配置修改。 2.全局地址池方式,与接口地址池相比,全局地址池可应用于大型网络,推荐在核心层设备上配置基于全局地址池的DHCP服务器功能或在服务器区域搭建一台专门的DHCP服务器统一分配IP地址等网络参数,而用户网关设备上只需要启用简单的DHCP中继功能即可。 本题考察的是使用接口地址池的形式。 (1) 使能DHCP服务,缺省未使能[HUAWEI] sysname Switch [Switch] dhcp enable //配置接口加入VLAN [Switch] vlan batch 10 to 11 [Switch] interface gigabitethernet 0/0/1 [Switch-GigabitEthernet0/0/1] port link-type access [Switch-GigabitEthernet0/0/1] port default vlan 10 [Switch-GigabitEthernet0/0/1] quit // 配置VLANIF接口IP地址 [Switch] interface vlanif 10 [Switch-Vlanif10] ip address 10.1.1.1 24 //企业为固定办公终端的网段 [Switch-Vlanif10] quit //配置接口地址池 [Switch] interface vlanif 10 [Switch-Vlanif10] dhcp select interface //使能接口采用接口地址池的DHCP服务器功能,缺省未使能 [Switch-Vlanif10] dhcp server lease day 30 //租期的缺省值为1天,修改租期为30天 [Switch-Vlanif10] dhcp server static-bind ip-address 10.1.1.100 mac-address 286e-d488-b684 //为Client_1分配固定的IP地址 [Switch-Vlanif10] quit 考试中若考到全局地址,无非就是首先在dhcp设备上先生成DHCP全局地址池。如下: [Switch] ip pool pool1 [Switch-ip-pool-pool1] network 10.1.1.0 mask 255.255.255.128 [Switch-ip-pool-pool1] dns-list 10.1.2.3 [Switch-ip-pool-pool1] gateway-list 10.1.1.1 [Switch-ip-pool-pool1] lease day 10 [Switch-ip-pool-pool1] quit 然后修改接口获取地址的方式为global。如下 [Switch] interface vlanif 10 [Switch-Vlanif10] dhcp select global [Switch-Vlanif10] quit
转载请注明原文地址:https://tihaiku.com/congyezige/2404635.html

最新回复(0)