DHCP中继(实验操作)

本文涉及的产品
全局流量管理 GTM,标准版 1个月
云解析 DNS,旗舰版 1个月
公共DNS(含HTTPDNS解析),每月1000万次HTTP解析
简介: DHCP中继(实验操作)

DHCP中继(实验操作)

实验拓扑:

20200821120053346.png

实验配置:

#DHCP服务器基础配置
sys
sys AR1
int g0/0/0
ip add 192.168.12.1 24
ip route-static 192.168.10.0 24 192.168.12.2
ip route-static 192.168.20.0 24 192.168.12.2
#DHCP中继基础配置
sys
sys SW1
vlan batch 10 20
int g0/0/1
p l a
p d v 10
int g0/0/2
p l a
p d v 20
int vlanif 10
ip add 192.168.10.254 24
int vlanif 20
ip add 192.168.20.254 24
int vlanif 1
ip add 192.168.12.2 24
#DHCP服务器配置全局地址池
#开启全局DHCP
[AR1]dhcp enable 
Info: The operation may take a few seconds. Please wait for a moment.done.
[AR1]
#配置vlan10 地址池
[AR1]ip pool vlan10
Info: It's successful to create an IP address pool. 
[AR1-ip-pool-vlan10]network 192.168.10.0 mask 24  
[AR1-ip-pool-vlan10]gateway-list 192.168.10.254 
[AR1-ip-pool-vlan10]dns-list 114.114.114.114
[AR1-ip-pool-vlan10]dis thi
[V200R003C00]
#
ip pool vlan10
 gateway-list 192.168.10.254 
 network 192.168.10.0 mask 255.255.255.0 
 dns-list 114.114.114.114 
#
return
[AR1-ip-pool-vlan10]
#配置vlan20 地址池
[AR1]ip pool vlan20
Info: It's successful to create an IP address pool.
[AR1-ip-pool-vlan20]
[AR1-ip-pool-vlan20] gateway-list 192.168.20.254 
[AR1-ip-pool-vlan20]
[AR1-ip-pool-vlan20] network 192.168.20.0 mask 255.255.255.0 
[AR1-ip-pool-vlan20]
[AR1-ip-pool-vlan20] dns-list 114.114.114.114 
[AR1-ip-pool-vlan20]
[AR1-ip-pool-vlan20]dis thi
[V200R003C00]
#
ip pool vlan20
 gateway-list 192.168.20.254 
 network 192.168.20.0 mask 255.255.255.0 
 dns-list 114.114.114.114 
#
return
[AR1-ip-pool-vlan20]
#进入接口,开启全局DHCP服务功能
[AR1]interface GigabitEthernet 0/0/0
[AR1-GigabitEthernet0/0/0]dhcp select global 
#查询DHCP地址池
[AR1]display ip pool 
  -----------------------------------------------------------------------
  Pool-name      : vlan10
  Pool-No        : 0
  Position       : Local           Status           : Unlocked
  Gateway-0      : 192.168.10.254  
  Mask           : 255.255.255.0
  VPN instance   : --
  -----------------------------------------------------------------------
  Pool-name      : vlan20
  Pool-No        : 1
  Position       : Local           Status           : Unlocked
  Gateway-0      : 192.168.20.254  
  Mask           : 255.255.255.0
  VPN instance   : --
  IP address Statistic
    Total       :506   
    Used        :0          Idle        :506   
    Expired     :0          Conflict    :0          Disable   :0     
[AR1]
#DHCP中继
[SW1]dhcp enable 
Info: The operation may take a few seconds. Please wait for a moment.done.
[SW1]
[SW1]dhcp server group office
Info:It's successful to create a DHCP server group.
[SW1-dhcp-server-group-office]dhcp-server 192.168.12.1
[SW1]interface Vlanif 10
[SW1-Vlanif10]dhcp select relay 
[SW1-Vlanif10]dhcp relay server-select office
[SW1-Vlanif10]dis thi
#
interface Vlanif10
 ip address 192.168.10.254 255.255.255.0
 dhcp select relay
 dhcp relay server-select office
#
return
[SW1-Vlanif10]
[SW1]interface Vlanif20
[SW1-Vlanif20] ip address 192.168.20.254 255.255.255.0
Error: The address already exists.
[SW1-Vlanif20] dhcp select relay
[SW1-Vlanif20] dhcp relay server-select office
[SW1-Vlanif20]dis thi
#
interface Vlanif20
 ip address 192.168.20.254 255.255.255.0
 dhcp select relay
 dhcp relay server-select office
#
return
[SW1-Vlanif20]
#主机自动获取DHCP IP地址
#vlan 10 PC1
PC>ipconfig /renew
IP Configuration
Link local IPv6 address...........: fe80::5689:98ff:fe35:5abc
IPv6 address......................: :: / 128
IPv6 gateway......................: ::
IPv4 address......................: 192.168.10.253
Subnet mask.......................: 255.255.255.0
Gateway...........................: 192.168.10.254
Physical address..................: 54-89-98-35-5A-BC
DNS server........................: 114.114.114.114
#vlan20 PC2
PC>ipconfig
Link local IPv6 address...........: fe80::5689:98ff:fe98:45b7
IPv6 address......................: :: / 128
IPv6 gateway......................: ::
IPv4 address......................: 192.168.20.253
Subnet mask.......................: 255.255.255.0
Gateway...........................: 192.168.20.254
Physical address..................: 54-89-98-98-45-B7
DNS server........................: 114.114.114.114
PC>

20200821120526544.png

相关文章
|
网络协议 Linux Shell
CentOS 7系统下DHCP及中继服务部署
设备 IP地址 主DNS服务器 192.168.100.254 从DNS服务器 192.168.100.1 客户端 192.168.200.2 一、DHCP服务器的部署
280 0
|
2月前
|
安全 小程序 网络安全
Cisco-DHCP中继配置
Cisco-DHCP中继配置
|
2月前
|
网络协议 网络虚拟化 网络架构
【网络实验】/主机/路由器/交换机/网关/路由协议/RIP+OSPF/DHCP(上)
【网络实验】/主机/路由器/交换机/网关/路由协议/RIP+OSPF/DHCP(上)
82 1
|
2月前
|
网络协议 数据安全/隐私保护 网络虚拟化
【网络实验】/主机/路由器/交换机/网关/路由协议/RIP+OSPF/DHCP(下)
【网络实验】/主机/路由器/交换机/网关/路由协议/RIP+OSPF/DHCP(下)
69 0
|
7月前
|
网络虚拟化 网络架构
|
7月前
|
网络协议 网络安全 数据库
DHCP的interface(接口),global(全局)配置以及DHCP relay(中继),DHCP snooping,DHCP option
DHCP的interface(接口),global(全局)配置以及DHCP relay(中继),DHCP snooping,DHCP option
154 0
网络技术基础(16)——DHCP中继
【3月更文挑战第3天】刚加完班又去南京出差了,实在是太忙了。。。。网络基础笔记(加班了几天,中途耽搁了,预计推迟6天),这篇借鉴了之前师兄的笔记。
|
7月前
|
网络协议 网络架构
DHCP中继实验
DHCP中继实验
|
7月前
|
网络协议
DHCP实验-动态主机配置协议
DHCP实验-动态主机配置协议
|
2月前
|
安全 网络协议 网络安全
Cisco-DHCP配置
Cisco-DHCP配置