当前位置: 首页 > article >正文

H3C交换机配置DHCP中继

H3C交换机配置DHCP

DHCP简介

DHCP(Dynamic Host Configuration Protocol,动态主机配置协议)用来为网络设备动态地分配IP地址等网络配置参数。
DHCP采用C/S通信模式,由客户端向服务器提出请求分配网络配置参数的申请,服务器返回为客户端分配的IP地址等配置信息,以实现IP地址等信息的动态配置。

实验拓扑

在这里插入图片描述

实验目标

1.网络中有两个vlan,vlan10,vlan20, DHCP Server服务器能够跨网段为vlan10、vlan20分配地址,PC1能够从DHCP服务器上获取192.168.10.0/24网段的地址,PC2能够从DHCP服务器上获取192.168.20.0/24网段的地址。

实验步骤

1.配置SW1
[H3C]sysname SW1
[SW1]vlan 10 20
[SW1]interface GigabitEthernet 1/0/2
[SW1-GigabitEthernet1/0/2]port access vlan 10
[SW1-GigabitEthernet1/0/2]interface GigabitEthernet 1/0/3
[SW1-GigabitEthernet1/0/3]port access vlan 20
[SW1-GigabitEthernet1/0/3]exit
[SW1]interface GigabitEthernet 1/0/1
[SW1-GigabitEthernet1/0/1]port link-type trunk
[SW1-GigabitEthernet1/0/1]port trunk permit vlan 10 20
[SW1]dhcp enable2.配置 DHCP Relay
[H3C]sysname DHCP Relay
[DHCP Relay]dhcp enable
[DHCP Relay]vlan 10 20 30
[DHCP Relay]interface GigabitEthernet 1/0/1
[DHCP Relay-GigabitEthernet1/0/1]port link-type trunk
[DHCP Relay-GigabitEthernet1/0/1]port trunk permit vlan 10 20
[DHCP Relay-GigabitEthernet1/0/2]port access vlan 30
[DHCP Relay-GigabitEthernet1/0/2]exit
[DHCP Relay]interface Vlan-interface 30
[DHCP Relay-Vlan-interface30]ip address 10.1.23.2 24
[DHCP Relay]interface Vlan-interface 10
[DHCP Relay-Vlan-interface10]dhcp relay server-address 10.1.23.3
[DHCP Relay-Vlan-interface10]dhcp select relay
[DHCP Relay-Vlan-interface10]interface Vlan-interface 20
[DHCP Relay-Vlan-interface20]dhcp select relay
[DHCP Relay-Vlan-interface20]dhcp relay server-address 10.1.23.3
[DHCP Relay-Vlan-interface20]quit3.配置DHCP Server
[DHCP Server]dhcp enable
[DHCP Server]vlan 10 20 30
[DHCP Server]interface Vlan-interface 30
[DHCP Server-Vlan-interface30]ip address 10.1.23.3 24
[DHCP Server]interface GigabitEthernet 1/0/1
[DHCP Server-GigabitEthernet1/0/1]port access vlan 30
[DHCP Server]dhcp server ip-pool vlan10
[DHCP Server-dhcp-pool-vlan10]gateway-list 192.168.10.254
[DHCP Server-dhcp-pool-vlan10]network 192.168.10.0 24
[DHCP Server-dhcp-pool-vlan10]dns-list 114.114.114.114 8.8.8.8
[DHCP Server]dhcp server ip-pool vlan20
[DHCP Server-dhcp-pool-vlan20]gateway-list 192.168.20.254
[DHCP Server-dhcp-pool-vlan20]network 192.168.20.0 24
[DHCP Server-dhcp-pool-vlan20]dns-list 114.114.114.114 8.8.8.8
[DHCP Server]interface Vlan-interface 10
[DHCP Server-Vlan-interface10]dhcp server apply ip-pool vlan10
[DHCP Server-Vlan-interface10]interface Vlan-interface 20
[DHCP Server-Vlan-interface20]dhcp server apply ip-pool vlan20
[DHCP Server]ip route-static 0.0.0.0 0 10.1.23.2

实验结果

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

http://www.lryc.cn/news/2416747.html

相关文章:

  • 编译hyperscan
  • CydiaSubstrate的简单使用
  • 探索MS17-010漏洞利用工具:All-In-One全方位解析
  • mysql用decimal_MySQL数据类型DECIMAL用法详解
  • MySQL - 存储过程 [Stored Procedure] - 学习/实践
  • INA3221和 ESP8266 6通道电流表
  • HTML自动暂停按钮,css 播放暂停按钮实现_html/css_WEB-ITnose
  • Linux命令及详解
  • c语言学习网站大全
  • 部署weblogic
  • 设计模式、设计模式的分类、作用、介绍
  • pushpop指令的操作数必须是字操作数_欧姆龙PLC(CPM1A)功能指令
  • VC++程序由Visual Studio 2003升级到Visual Studio 2005手记
  • (八)SQL SELECT INTO 语句和 INSERT INTO SELECT 语句
  • VS2010序列号(激活码)
  • Java的日期类说明Calendar、Data、日期转化格式化以及注意事项
  • 移动开发最新腾讯一面:请你分别谈谈SharedPreferences 和MMKV,2024年最新今日头条测试面试题
  • GNS3-1.3.10环境部署(新手必备,通俗易懂)
  • 虚拟语气用法总结及真题解析
  • 一键彻底清理!解密如何清理电脑C盘垃圾的绝佳方法
  • linux系统无线驱动在哪下载,在Linux系统中BCM4356无线网卡驱动问题的解决
  • java的递归详细讲解
  • 非常值得收藏的15个 Google 高级搜索技巧
  • Java ClassLoader getResources()方法与示例
  • 计算机毕设ssmSSM农村电商网站3252s(开题+源码)
  • 【个人学习笔记】统一网关gateway
  • 模板王-网页模板,网站模板素材免费下
  • 超详细的Springboot入门教程,看了必会
  • java filter mapping_Java可以从filter-mapping内部的url-pattern中排除一些具体的url吗?...
  • 数据库SQL入门教程