首页 > 其他分享 >28、中继配置DHCP服务(relay模式)

28、中继配置DHCP服务(relay模式)

时间:2023-08-18 17:00:37浏览次数:46  
标签:quit relay ip 28 Server sw1 DHCP pool

中继配置的意义:

DHCP服务器与DHCP客户端不在同一网段内,避免每一个网段都布置DHCP服务,DHCP中继负责DHCP服务器与DHCP客户端之间的DHCP报文转发。

1、拓扑如下

2、交换机配置 

SW2的配置如下

The device is running!

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname sw2
[sw2]vlan batch 10 20
Info: This operation may take a few seconds. Please wait for a moment...done.  
[sw2]interface Ethernet 0/0/1
[sw2-Ethernet0/0/1]port link-type trunk
[sw2-Ethernet0/0/1]port trunk allow-pass vlan 10 20
[sw2-Ethernet0/0/1]quit 
<sw2>sys Enter system view, return user view with Ctrl+Z. [sw2]interface Ethernet 0/0/2 [sw2-Ethernet0/0/2]port link-type access [sw2-Ethernet0/0/2]port default vlan 10 [sw2-Ethernet0/0/2]quit <sw2>sys Enter system view, return user view with Ctrl+Z. [sw2]inter [sw2]interface Ethernet 0/0/3 [sw2-Ethernet0/0/3]port link-type access [sw2-Ethernet0/0/3]port default vlan 20 [sw2-Ethernet0/0/3]quit [sw2]quit <sw2>save The current configuration will be written to the device. Are you sure to continue?[Y/N]Y Info: Please input the file name ( *.cfg, *.zip ) [vrpcfg.zip]: Aug 18 2023 15:33:58-08:00 sw2 %%01CFM/4/SAVE(l)[0]:The user chose Y when decidi ng whether to save the configuration to the device. Now saving the current configuration to the slot 0. Save the configuration successfully. <sw2> <sw2> Aug 18 2023 15:33:59-08:00 sw2 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25 .191.3.1 configurations have been changed. The current change number is 11, the change loop count is 0, and the maximum number of records is 4095.

查看sw2 vlan 和配置信息

dis vlan 、display current-configuration

 SW3的配置如下

The device is running!

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname sw3 
[sw3]vlan batch 30 40
[sw3]interface Ethernet 0/0/1  
[sw3-Ethernet0/0/1]ports link-type trunk
[sw3-Ethernet0/0/1]port trunk allow-pass vlan 30 40
[sw3-Ethernet0/0/1]quit

[sw3]interface Ethernet 0/0/2 
[sw3-Ethernet0/0/2]port link-type access  
[sw3-Ethernet0/0/2]port default vlan 30
[sw3-Ethernet0/0/2]quit

[sw3]interface Ethernet 0/0/3
[sw3-Ethernet0/0/3]port link-type access
[sw3-Ethernet0/0/3]port default vlan 40
[sw3-Ethernet0/0/3]quit
[sw3]quit
<sw3>save
The current configuration will be written to the device.
Are you sure to continue?[Y/N]Y
Info: Please input the file name ( *.cfg, *.zip ) [vrpcfg.zip]:
Aug 18 2023 15:57:23-08:00 sw3 %%01CFM/4/SAVE(l)[0]:The user chose Y when decidi
ng whether to save the configuration to the device.
Now saving the current configuration to the slot 0.
Save the configuration successfully.
<sw3>

 SW1的配置如下 (汇聚层交换机)

The device is running!
##################################################
<Huawei>
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname sw1
Aug 18 2023 16:07:52-08:00 sw1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 5, the c
hange loop count is 0, and the maximum number of records is 4095.
[sw1]un info en #关闭配置更改提示信息
Info: Information center is disabled.
[sw1]vlan batch 10 20 30 40 100
Info: This operation may take a few seconds. Please wait for a moment...done.
[sw1-GigabitEthernet0/0/1]port link-type access 
[sw1-GigabitEthernet0/0/1]port default vlan 100
[sw1-GigabitEthernet0/0/1]quit
[sw1]interface GigabitEthernet 0/0/2
[sw1-GigabitEthernet0/0/2]port link-type trunk 
[sw1-GigabitEthernet0/0/2]port trunk allow-pass vlan 10 20
[sw1-GigabitEthernet0/0/2]quit
[sw1]interface GigabitEthernet 0/0/3
[sw1-GigabitEthernet0/0/3]port link-type trunk
[sw1-GigabitEthernet0/0/3]port trunk allow-pass vlan 30 40
[sw1-GigabitEthernet0/0/3]quit
[sw1]interface Vlanif 100 [sw1-Vlanif100]ip add [sw1-Vlanif100]ip address 192.168.10.254 24 [sw1-Vlanif100]quit [sw1]interface Vlanif 10 [sw1-Vlanif10]ip address 10.1.10.254 24 [sw1-Vlanif10]quit [sw1]interface Vlanif 20 [sw1-Vlanif20]ip address 10.1.20.254 24 [sw1-Vlanif20]quit [sw1]interface Vlanif 30 [sw1-Vlanif30]ip address 10.1.30.254 24 [sw1-Vlanif30]quit [sw1]interface Vlanif 40 [sw1-Vlanif40]ip address 10.1.40.254 24 [sw1-Vlanif40]quit [sw1]quit <sw1>save The current configuration will be written to the device. Are you sure to continue?[Y/N]Y Info: Please input the file name ( *.cfg, *.zip ) [vrpcfg.zip]: Now saving the current configuration to the slot 0. Save the configuration successfully. <sw1>

 路由器AR1配置 DHCP-Server配置

<Huawei>sys
[Huawei]sysname DHCP-Server
[DHCP-Server]un info en
Info: Information center is disabled.
[DHCP-Server]interface GigabitEthernet 0/0/0
[DHCP-Server-GigabitEthernet0/0/0]ip address 192.168.10.1 24
[DHCP-Server-GigabitEthernet0/0/0]quit
[DHCP-Server]ip route-static 0.0.0.0 0 192.168.10.254
[DHCP-Server]

3、地址池配置

[DHCP-Server]dhcp enable
Info: The operation may take a few seconds. Please wait for a moment.done.
[DHCP-Server]ip pool liu10 Info:It's successful to create an IP address pool. [DHCP-Server-ip-pool-liu10]dns-list 192.168.9.99 192.168.9.98 [DHCP-Server-ip-pool-liu10]network 10.1.10.0 mask 255.255.255.0 [DHCP-Server-ip-pool-liu10]gateway-list 10.1.10.254 [DHCP-Server-ip-pool-liu10]quit
[DHCP-Server]ip pool liu20 Info:It's successful to create an IP address pool. [DHCP-Server-ip-pool-liu20]network 10.1.20.0 mask 24 [DHCP-Server-ip-pool-liu20]gateway-list 10.1.20.254 [DHCP-Server-ip-pool-liu20]dns-list 192.168.9.99 192.168.9.98 [DHCP-Server-ip-pool-liu20]quit [DHCP-Server]ip pool liu30 Info:It's successful to create an IP address pool. [DHCP-Server-ip-pool-liu30]network 10.1.30.0 mask 24 [DHCP-Server-ip-pool-liu30]gateway-list 10.1.30.254 [DHCP-Server-ip-pool-liu30]dns-list 192.168.9.99 192.168.9.98 [DHCP-Server-ip-pool-liu30]quit [DHCP-Server]ip pool liu40 Info:It's successful to create an IP address pool. [DHCP-Server-ip-pool-liu40]network 10.1.40.0 mask 24 [DHCP-Server-ip-pool-liu40]gateway-list 10.1.40.254 [DHCP-Server-ip-pool-liu40]dns-list 192.168.9.99 192.168.9.98 [DHCP-Server-ip-pool-liu40]quit [DHCP-Server]interface GigabitEthernet 0/0/0 [DHCP-Server-GigabitEthernet0/0/0]dhcp select global [DHCP-Server-GigabitEthernet0/0/0]quit [DHCP-Server]quit <DHCP-Server>save The current configuration will be written to the device. Are you sure to continue?[Y/N]Y Info: Please input the file name ( *.cfg, *.zip ) [vrpcfg.zip]: Now saving the current configuration to the slot 17. Save the configuration successfully. <DHCP-Server>

 

4、SW1 交换机中继配置

[sw1]interface Vlanif 10
[sw1-Vlanif10]dhcp select relay
[sw1-Vlanif10]dhcp relay server-ip 192.168.10.1
[sw1-Vlanif10]quit
[sw1]interface Vlanif 20
[sw1-Vlanif20]dhcp select relay
[sw1-Vlanif20]dhcp relay server-ip 192.168.10.1
[sw1-Vlanif20]quit
[sw1]interface Vlanif 30
[sw1-Vlanif30]dhcp select relay
[sw1-Vlanif30]dhcp relay server-ip 192.168.10.1
[sw1-Vlanif30]quit
[sw1]interface Vlanif 40
[sw1-Vlanif40]dhcp select relay
[sw1-Vlanif40]dhcp relay server-ip 192.168.10.1
[sw1-Vlanif40]quit
[sw1]quit
<sw1>save
The current configuration will be written to the device.
Are you sure to continue?[Y/N]Y
Now saving the current configuration to the slot 0.
Save the configuration successfully.
<sw1>

5、PC间通信测试,PC端设置自动获取IP方式

PC间是可以互通的

标签:quit,relay,ip,28,Server,sw1,DHCP,pool
From: https://www.cnblogs.com/lvjing/p/17641022.html

相关文章

  • ID为12848的进程未运行,解决方法
    1.win+R输入eventvwr,打开事件查看器打开windows事件查看器查看报错具体信息,跟具文件位置判断,认证服务没有启动。2.查看具体报错信息,发现由于项目框架为asp.net3.1,本地并未安装该框架,点击下载安装包。3.不报错,运行成功,......
  • Atcoder_[abc284E]Count Simple Paths题解
    题目链接这题就是很简单的图上深搜,我觉得放在E题太水了,代码里有详细注释。#include<bits/stdc++.h>usingnamespacestd;#defineintlonglongvector<int>v[200010];//邻接表intans;//答案boolvis[200010];//vis[i]记录i号点有没有被访问过voiddfs(intx)......
  • java:使用flexmark-java 实现 CommonMark(规范 0.28)解析
    文档https://github.com/vsch/flexmark-java依赖Java8<dependency><groupId>com.vladsch.flexmark</groupId><artifactId>flexmark-all</artifactId><version>0.62.2</version></dependency>Java9+&l......
  • 25、DHCP动态获取IP地址
    DHCP动态获取IP地址的过程:DHCP通过法师部分广播报文,发现DHCP服务器;DHCP服务器分配一个IP地址通过单播报文;DHCP客户端发送广播报文,请求IP地址;DHCP服务器收到请求报文后,服务器向DHCP客户端发送单播确认报文,包含iIP地址相关信息。DHCP常见的部署方法有interface与global两种模......
  • 国标GB28181视频平台EasyGBS国标平台针对数据库删除级联数据后的无效数据进行优化的具
    EasyGBS国标视频云服务可支持通过国标GB28181协议将设备接入,实现视频的实时监控直播、录像、语音对讲、云存储、告警、级联等功能,同时也支持将接入的视频流进行全终端、全平台分发,分发的视频流包括RTSP、RTMP、FLV、HLS、WebRTC等格式。同时EasyGBS平台也支持海康Ehome协议及SDK等......
  • 文件解压 //problem/2928 or /contest/1709/problem/3
    字符串套递归#include<bits/stdc++.h>usingnamespacestd;chars[1005];intn,i;stringwork(){stringp;intt=0;while(++i<=n){if(s[i]>='0'&&s[i]<='9'){t=s[i]-'0......
  • [OSWP] 无线渗透:DHCP,过滤规则和wifi协议
    DHCPDHCP分为两个部分:一个是服务器端,另一个是客户端。所有客户机的IP地址设定资料都由DHCP服务器集中管理,并负责处理客户端的DHCP请求;而客户端则会使用从服务器分配下来的IP地址。在标准情况下DHCP客户端和DHCP服务器之间会进行四次通讯。DHCP协议通讯使用端口UDP67(服务器端)和UDP......
  • 国标GB28181视频平台EasyGBS国标平台的应用场景以及方案实现
    EasyGBS国标视频融合云平台基于端-边-云一体化架构,部署轻量简单、功能灵活多样,平台可支持多协议(GB28181/RTSP/Onvif/海康SDK/Ehome/大华SDK/RTMP推流等)、多类型设备接入(IPC/NVR/监控平台),在视频能力上,可实现视频直播、录像、回放、检索、云存储、告警上报、语音对讲、集群、智能......
  • WORD| 企业大数据治理平台需求规格说明书 P288
    WORD总共有288页,受篇幅有限,以下为部分资料......
  • 国标GB28181视频监控平台EasyGBS国标平台无法播放,抓包返回ICMP的问题解决方案
    国标GB28181视频平台EasyGBS是基于国标GB/T28181协议的行业内安防视频流媒体能力平台,可实现的视频功能包括:实时监控直播、录像、检索与回看、语音对讲、云存储、告警、平台级联等功能。国标GB28181视频监控平台部署简单、可拓展性强,支持将接入的视频流进行全终端、全平台分发,分发的......