DHCP中继代理原理和配置

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了DHCP中继代理原理和配置相关的知识,希望对你有一定的参考价值。

DHCP中继代理原理和配置

4.1 问题
1)配置DHCP中继,让客户端从DHCP服务器获取地址

2)客户机可以ping通R1

[DHCP]int g0/0/0
[DHCP-GigabitEthernet0/0/0]ip add 192.168.2.2 24 /设定接口ip
[DHCP-GigabitEthernet0/0/0]q
[DHCP]dhcp enable /启用DHCP
Info: The operation may take a few seconds. Please wait for a moment.done.
[DHCP]ip pool p1 /设置IP地址池P1
Info: It‘s successful to create an IP address pool.
[DHCP-ip-pool-p1]network 192.168.1.0 mask 24 /设置网段
[DHCP-ip-pool-p1]gateway-list 192.168.1.1 /设置网关地址
[DHCP-ip-pool-p1]dns-list 8.8.8.8 /设置dns
[DHCP-ip-pool-p1]q
[DHCP]int g0/0/0
[DHCP-GigabitEthernet0/0/0]dhcp select global /接口开启全局模式
[DHCP]ip route-static 192.168.1.0 24 192.168.2.1 /设置静态路由

[DHCPZJ]int g0/0/0
[DHCPZJ-GigabitEthernet0/0/0]ip add 192.168.1.1 24
[DHCPZJ-GigabitEthernet0/0/0]int g0/0/1
[DHCPZJ-GigabitEthernet0/0/1]ip add 192.168.2.1 24 /设置IP地址
[DHCPZJ-GigabitEthernet0/0/1]q
[DHCPZJ]dhcp enable /开启dhcp
Info: The operation may take a few seconds. Please wait for a moment.done.
[DHCPZJ]int g0/0/0
[DHCPZJ-GigabitEthernet0/0/0]dhcp select relay /网关地址接口开启中继模式
[DHCPZJ-GigabitEthernet0/0/0]dhcp relay server-ip 192.168.2.2 /指定服务器ip地址
[DHCPZJ-GigabitEthernet0/0/0]q

技术图片

增加一个网段DHCP

[DHCP]int g0/0/1
[DHCP-GigabitEthernet0/0/1]ip add 192.168.3.1 24
[DHCP-GigabitEthernet0/0/1]q
[DHCP]ip pool p3
Info: It‘s successful to create an IP address pool.
[DHCP-ip-pool-p3]network 192.168.3.0 mask 24
[DHCP-ip-pool-p3]gateway-list 192.168.3.1
[DHCP-ip-pool-p3]lease day 3
[DHCP-ip-pool-p3]dns-list 3.3.3.3
[DHCP-ip-pool-p3]q
[DHCP]int g0/0/1
[DHCP-GigabitEthernet0/0/1]dhcp select global

技术图片

以上是关于DHCP中继代理原理和配置的主要内容,如果未能解决你的问题,请参考以下文章

使用sever2008做DHCP中继代理

DHCP中继代理配置

DHCP中继代理,配置dhcp,中继代理,跨越不同vlan,给不同vlan下的客户机提供dhcp服务

软件模拟DHCP中继代理的配置

三层交换机配置路由DHCP中继代理

DHCP中继器