dhcp实验

一、 要求:1.全网ip网段192.168.1.0/24

2.所有pc通过dhcp获取地址

3.网络可达

分析:1.划分网段

2.开启dhcp服务

3.接口配ip

4.创建ip池,加入网段、网关、dns

二、配置:1.开启dhcp服务

[Huawei]dhcp enable
Info: The operation may take a few seconds. Please wait for a moment.done

[Huawei-GigabitEthernet0/0/0]dhcp select global

2.接口配ip

[Huawei]in g 0/0/0
[Huawei-GigabitEthernet0/0/0]ip add 192.168.1.1 25
Aug 12 2022 18:51:18-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[2]:The line protocol
 IP on the interface GigabitEthernet0/0/0 has entered the UP state. 
[Huawei-GigabitEthernet0/0/0]q
[Huawei]in g 0/0/1
[Huawei-GigabitEthernet0/0/1]ip  add 192.168.1.129 25

3.创建ip pool

[Huawei]undo ip pool 1
[Huawei]ip pool 1
Info: It's successful to create an IP address pool.

4.网段、网关、dns

[Huawei-ip-pool-2]network  192.168.1.128 mask 25
[Huawei-ip-pool-2]ga    
[Huawei-ip-pool-2]gateway-list 192.168.1.129
[Huawei-ip-pool-2]dns    
[Huawei-ip-pool-2]dns-list 8.8.8.8

三、结果

PC>ping 192.168.1.125

Ping 192.168.1.125: 32 data bytes, Press Ctrl_C to break
From 192.168.1.125: bytes=32 seq=1 ttl=128 time=31 ms
From 192.168.1.125: bytes=32 seq=2 ttl=128 time=47 ms
From 192.168.1.125: bytes=32 seq=3 ttl=128 time=47 ms
From 192.168.1.125: bytes=32 seq=4 ttl=128 time=31 ms
From 192.168.1.125: bytes=32 seq=5 ttl=128 time=31 ms

--- 192.168.1.125 ping statistics ---
  5 packet(s) transmitted
  5 packet(s) received
  0.00% packet loss
  round-trip min/avg/max = 31/37/47 ms

PC>
PC>ping 192.168.1.254

Ping 192.168.1.254: 32 data bytes, Press Ctrl_C to break
Request timeout!
From 192.168.1.254: bytes=32 seq=2 ttl=127 time=63 ms
From 192.168.1.254: bytes=32 seq=3 ttl=127 time=62 ms
From 192.168.1.254: bytes=32 seq=4 ttl=127 time=63 ms
From 192.168.1.254: bytes=32 seq=5 ttl=127 time=62 ms

--- 192.168.1.254 ping statistics ---
  5 packet(s) transmitted
  4 packet(s) received
  20.00% packet loss
  round-trip min/avg/max = 0/62/63 ms

 

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值