DHCP配置实验报告

实验报告

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接口)

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

  • 2
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值