当前位置:文档之家› 华为s5700交换机配置全局地址池dhcp服务器

华为s5700交换机配置全局地址池dhcp服务器

华为s5700交换机配置全局地址池dhcp服务器

system-view(进入全局模式)

[Huawei]sysname SW1(设备命名)

[SW1]dhcp enable(使用DHCP功能)

[SW1]ip pool10(创建全局地址池,同时进入全局地址池视图)

[SW1-ip-pool-10]network192.168.10.0mask24 (配置全局地址池可动态分配的IP地址范围)

[SW1-ip-pool-10]dns-list8.8.8.8(配置DNS)

[SW1-ip-pool-10]gateway-list192.168.10.1(配置网关)

[SW1-ip-pool-10]excluded-ip-address192.168.10.201192.168.10.254(保留不被分配的地址)

[SW1-ip-pool-10]lease day7(IP租约期限)

[SW1-ip-pool-10]dis this(查询当前模式的配置)

#ip pool10

gateway-list192.168.10.1(网关)

network192.168.10.0mask255.255.255.0(IP地址范围)

excluded-ip-address192.168.10.201192.168.10.254(保留IP地址范围)

lease day7hour0minute0(IP租约周期)

dns-list8.8.8.8

[SW1-ip-pool-10]quit(退出

[SW1]ip pool20

[SW1-ip-pool-20]network192.168.20.0mask24

[SW1-ip-pool-20]dns-list8.8.8.8

[SW1-ip-pool-20]gateway-list192.168.20.1

[SW1-ip-pool-20]excluded-ip-address192.168.20.201192.168.20.254

[SW1-ip-pool-20]lease day7

[SW1-ip-pool-20]q

------------------------------------------------

[SW1]vlan batch1020(批量创建vlan)

[SW1]interface GigabitEthernet0/0/1(进入port1)

[SW1-GigabitEthernet0/0/1]port link-type access(配置port1类型)[SW1-GigabitEthernet0/0/1]port default vlan10(配置port1vlan) [SW1-GigabitEthernet0/0/1]quit(退出)

[SW1]interface GigabitEthernet0/0/2

[SW1-GigabitEthernet0/0/2]port link-type access

[SW1-GigabitEthernet0/0/2]port default vlan20

[SW1-GigabitEthernet0/0/2]quit

(配置VLANIF10接口下的客户端从全局地址池中获取IP地址)

[SW1]interface Vlanif10(创建vlanif10)

[SW1-Vlanif10]ip address192.168.10.124(配置IP地址)

[SW1-Vlanif10]dhcp select global(在vlanif10模式下调用全局地址池)[SW1-Vlanif10]display this(查询当前配置参数)

#

interface Vlanif10

ip address192.168.10.1255.255.255.0

dhcp select global

#

Return

[SW1-Vlanif10]quit

[SW1]interface Vlanif20

[SW1-Vlanif20]ip address192.168.20.124

[SW1-Vlanif20]dhcp select global

[SW1-Vlanif20]quit

[SW1]display ip pool(查看IP地址池配置情况)

[SW1]quit

save(保存配置,写入设备)

相关主题
文本预览
相关文档 最新文档