实验报告
1.拓扑信息
2.要求及分析
要求
1.DHCP Server 0/0/0使用接口DHCP进行分配IP
2.DHCP Server 0/0/1使用全局DHCP进行分配IP
3.各PC间均可互通
分析-要求1:
1.开启DHCP服务。
2.进入0/0/0接口,完成配置IP等基本操作。
3.建立DHCP服务器
分析-要求2:
1.开启DHCP服务
2.建立IP地址池
3.配置网络段
4.激活全局模式
3.配置IP
1.接口模式
<Huawei>system-view //进入系统视图模式
[DHCP Server]dhcp enable //开启DHCP服务
[Huawei]sysname DHCP Server //修改路由器名称
[DHCP Server]interface GigabitEthernet 0/0/0 //进入接口
[DHCP Server-GigabitEthernet0/0/0]ip address 192.168.1.1 24 //绑定IP
[DHCP Server-GigabitEthernet0/0/0]dhcp select interface //选择DHCP接口模式
[DHCP Server-GigabitEthernet0/0/0]dhcp server lease day 2 //设置DHCP租期
[DHCP Server-GigabitEthernet0/0/0]dhcp server dns-list 8.8.8.8 //配置dns服务器
[DHCP Server-GigabitEthernet0/0/0]quit //返回上一级
配置信息
[DHCP Server-GigabitEthernet0/0/0]display this
[V200R003C00]
#
interface GigabitEthernet0/0/0
ip address 192.168.1.1 255.255.255.0
dhcp select interface
dhcp server lease day 2 hour 0 minute 0
dhcp server dns-list 8.8.8.8
#
return
[DHCP Server-GigabitEthernet0/0/0]display ip interface brief
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 3
The number of interface that is DOWN in Physical is 1
The number of interface that is UP in Protocol is 3
The number of interface that is DOWN in Protocol is 1
Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 192.168.1.1/24 up up
GigabitEthernet0/0/1 192.168.2.1/24 up up
GigabitEthernet0/0/2 unassigned down down
NULL0 unassigned up up(s)
2.全局模式
[DHCP Server]dhcp enable //开启dhcp服务
[DHCP Server]interface GigabitEthernet 0/0/1 进入接口
[DHCP Server-GigabitEthernet0/0/1]ip address 192.168.2.1 24 //绑定ip
[DHCP Server-GigabitEthernet0/0/1]quit //返回上一级
[DHCP Server]ip pool cippus //建立ip地址池
[DHCP Server-ip-pool-cippus]network 192.168.2.0 mask 24 //配置可分配的IP地址网段
[DHCP Server-ip-pool-cippus]gateway-list 192.168.2.1 //配置网关IP地址
[DHCP Server-ip-pool-cippus]dns-list 8.8.8.8 114.114.114.114 //配置DNS服务器
[DHCP Server-ip-pool-cippus]quit //返回上一级
[DHCP Server]interface GigabitEthernet 0/0/1 //进入接口
[DHCP Server-GigabitEthernet0/0/1]dhcp select global //在该接口激活全局地址池
配置信息
![屏幕截图 2023-03-12 173230](C:\Users\86186\Pictures\screenshots\屏幕截图 2023-03-12 173230.png)[DHCP Server-GigabitEthernet0/0/1]display this
[V200R003C00]
#
interface GigabitEthernet0/0/1
ip address 192.168.2.1 255.255.255.0
dhcp select global
#
return
[DHCP Server-GigabitEthernet0/0/1]display ip interface brief
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 3
The number of interface that is DOWN in Physical is 1
The number of interface that is UP in Protocol is 3
The number of interface that is DOWN in Protocol is 1
Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 192.168.1.1/24 up up
GigabitEthernet0/0/1 192.168.2.1/24 up up
GigabitEthernet0/0/2 unassigned down down
NULL0 unassigned up up(s)
4.配置截图
PC1~PC4
5.测试
1.PC1—PC2/3/4
PC>ping 192.168.1.253
Ping 192.168.1.253: 32 data bytes, Press Ctrl_C to break
From 192.168.1.253: bytes=32 seq=1 ttl=128 time=47 ms
From 192.168.1.253: bytes=32 seq=2 ttl=128 time=47 ms
From 192.168.1.253: bytes=32 seq=3 ttl=128 time=31 ms
From 192.168.1.253: bytes=32 seq=4 ttl=128 time=15 ms
From 192.168.1.253: bytes=32 seq=5 ttl=128 time=47 ms
--- 192.168.1.253 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 15/37/47 ms
PC>ping 192.168.2.254
Ping 192.168.2.254: 32 data bytes, Press Ctrl_C to break
From 192.168.2.254: bytes=32 seq=1 ttl=127 time=62 ms
From 192.168.2.254: bytes=32 seq=2 ttl=127 time=63 ms
From 192.168.2.254: bytes=32 seq=3 ttl=127 time=63 ms
From 192.168.2.254: bytes=32 seq=4 ttl=127 time=94 ms
From 192.168.2.254: bytes=32 seq=5 ttl=127 time=47 ms
--- 192.168.2.254 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 47/65/94 ms
PC>ping 192.168.2.253
Ping 192.168.2.253: 32 data bytes, Press Ctrl_C to break
From 192.168.2.253: bytes=32 seq=1 ttl=127 time=78 ms
From 192.168.2.253: bytes=32 seq=2 ttl=127 time=78 ms
From 192.168.2.253: bytes=32 seq=3 ttl=127 time=62 ms
From 192.168.2.253: bytes=32 seq=4 ttl=127 time=63 ms
From 192.168.2.253: bytes=32 seq=5 ttl=127 time=62 ms
--- 192.168.2.253 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 62/68/78 ms
2.PC2—PC3/4
PC>ping 192.168.2.254
Ping 192.168.2.254: 32 data bytes, Press Ctrl_C to break
From 192.168.2.254: bytes=32 seq=1 ttl=127 time=62 ms
From 192.168.2.254: bytes=32 seq=2 ttl=127 time=78 ms
From 192.168.2.254: bytes=32 seq=3 ttl=127 time=78 ms
From 192.168.2.254: bytes=32 seq=4 ttl=127 time=78 ms
From 192.168.2.254: bytes=32 seq=5 ttl=127 time=94 ms
--- 192.168.2.254 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 62/78/94 ms
PC>ping 192.168.2.253
Ping 192.168.2.253: 32 data bytes, Press Ctrl_C to break
From 192.168.2.253: bytes=32 seq=1 ttl=127 time=78 ms
From 192.168.2.253: bytes=32 seq=2 ttl=127 time=47 ms
From 192.168.2.253: bytes=32 seq=3 ttl=127 time=78 ms
From 192.168.2.253: bytes=32 seq=4 ttl=127 time=78 ms
From 192.168.2.253: bytes=32 seq=5 ttl=127 time=78 ms
--- 192.168.2.253 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 47/71/78 ms
3.PC3—PC4
PC>ping 192.168.2.253
Ping 192.168.2.253: 32 data bytes, Press Ctrl_C to break
From 192.168.2.253: bytes=32 seq=1 ttl=128 time=31 ms
From 192.168.2.253: bytes=32 seq=2 ttl=128 time=31 ms
From 192.168.2.253: bytes=32 seq=3 ttl=128 time=47 ms
From 192.168.2.253: bytes=32 seq=4 ttl=128 time=47 ms
From 192.168.2.253: bytes=32 seq=5 ttl=128 time=47 ms
--- 192.168.2.253 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 31/40/47 ms
附:抓包信息
接口GE 0/0/0
接口GE 0/0/1
测试时的抓包信息(0/0/0接口)
测试时的抓包信息(0/0/1接口)