DHCP配置练习

1 篇文章 0 订阅
该文详细描述了如何配置一台华为路由器作为DHCP服务器,为GigabitEthernet0/0/0接口使用接口DHCP分配IP,GigabitEthernet0/0/1口则使用全局DHCP分配IP。配置包括设置接口IP,启用DHCP服务,定义地址池和DNS服务器。此外,文中还提及了PC的IP获取及连通性测试。
摘要由CSDN通过智能技术生成

1、拓扑图

 2、需求分析

        DHCP Server0/0/0口使用接口DHCP进行分配IP

        DHCP Server0/0/1口使用全局DHCP进行分配IP

        各PC间均可互通

3、所有配置内容

路由器操作如下:

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname DHCF Server

[DHCF Server]interface GigabitEthernet 0/0/0
[DHCF Server-GigabitEthernet0/0/0]ip address 192.168.1.1 24
Apr 19 2023 14:49:58-08:00 DHCF Server %%01IFNET/4/LINK_STATE(l)[2]:The line pro
tocol IP on the interface GigabitEthernet0/0/0 has entered the UP state. 
[DHCF Server-GigabitEthernet0/0/0]q
[DHCF Server]dhcp enable
Info: The operation may take a few seconds. Please wait for a moment.done.
[DHCF Server]interface GigabitEthernet 0/0/0
[DHCF Server-GigabitEthernet0/0/0]dhcp select interface
[DHCF Server-GigabitEthernet0/0/0]dhcp server dns-list 1.2.3.4
[DHCF Server-GigabitEthernet0/0/0]q

[DHCF Server]interface GigabitEthernet 0/0/1
[DHCF Server-GigabitEthernet0/0/1]ip address 192.168.2.1 24
Apr 19 2023 14:53:18-08:00 DHCF Server %%01IFNET/4/LINK_STATE(l)[3]:The line pro
tocol IP on the interface GigabitEthernet0/0/1 has entered the UP state. 
[DHCF Server-GigabitEthernet0/0/1]dhcp enable
[DHCF Server]ip pool 123456789a
Info: It's successful to create an IP address pool.
[DHCF Server-ip-pool-123456789a]network 192.168.2.0 mask 24
[DHCF Server-ip-pool-123456789a]gateway-list 192.168.2.1
[DHCF Server-ip-pool-123456789a]dns-list 8.8.8.8 114.114.114.114
[DHCF Server-ip-pool-123456789a]q
[DHCF Server]interface GigabitEthernet 0/0/1
[DHCF Server-GigabitEthernet0/0/1]dhcp select global
[DHCF Server-GigabitEthernet0/0/1]q

PC1-4的IP进行DHCP应用;命令行输入ipconfig获取ip

PC1/2与PC3/4随机连接(ping   ip地址)

4、测试结果

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值